[Fix] Add missing strong dict chectionaries in CoreBluetooth. (#168)

This commit is contained in:
Manuel de la Pena 2016-06-17 03:34:31 +02:00 коммит произвёл Sebastien Pouliot
Родитель ff381fe6f5
Коммит c3b768d739
2 изменённых файлов: 68 добавлений и 12 удалений

Просмотреть файл

@ -33,19 +33,9 @@ using XamCore.ObjCRuntime;
namespace XamCore.CoreBluetooth {
public class PeripheralScanningOptions : DictionaryContainer
public partial class PeripheralScanningOptions
{
#if !COREBUILD
public PeripheralScanningOptions ()
: base (new NSMutableDictionary ())
{
}
public PeripheralScanningOptions (NSDictionary dictionary)
: base (dictionary)
{
}
public bool AllowDuplicatesKey {
get {
var value = GetBoolValue (CBCentralManager.ScanOptionAllowDuplicatesKey);
@ -58,4 +48,3 @@ namespace XamCore.CoreBluetooth {
#endif
}
}

Просмотреть файл

@ -148,6 +148,73 @@ namespace XamCore.CoreBluetooth {
#endif
}
[StrongDictionary ("AdvertisementDataKeys")]
interface AdvertisementData {
string LocalName { get; set; }
NSData ManufacturerData { get; set; }
#if XAMCORE_2_0
NSDictionary <CBUUID, NSData> ServiceData { get; set; }
#else
NSDictionary ServiceData { get; set; }
#endif
CBUUID [] ServiceUuids { get; set; }
CBUUID [] OverflowServiceUuids { get; set; }
NSNumber TxPowerLevel { get; set; }
bool IsConnectable { get; set; }
CBUUID [] SolicitedServiceUuids { get; set; }
}
[Static, Internal]
interface AdvertisementDataKeys {
[Field ("CBAdvertisementDataLocalNameKey")]
NSString LocalNameKey { get; }
[Field ("CBAdvertisementDataManufacturerDataKey")]
NSString ManufacturerDataKey { get; }
[Field ("CBAdvertisementDataServiceDataKey")]
NSString ServiceDataKey { get; }
[Field ("CBAdvertisementDataServiceUUIDsKey")]
NSString ServiceUuidsKey { get; }
[Field ("CBAdvertisementDataOverflowServiceUUIDsKey")]
NSString OverflowServiceUuidsKey { get; }
[Field ("CBAdvertisementDataTxPowerLevelKey")]
NSString TxPowerLevelKey { get; }
[Field ("CBAdvertisementDataIsConnectable")]
NSString IsConnectableKey { get; }
[Field ("CBAdvertisementDataSolicitedServiceUUIDsKey")]
NSString SolicitedServiceUuidsKey { get; }
}
[StrongDictionary ("PeripheralScanningOptionsKeys")]
interface PeripheralScanningOptions { }
[StrongDictionary ("RestoredStateKeys")]
interface RestoredState {
CBPeripheral [] Peripherals { get; set; }
CBPeripheral [] ScanServices { get; set; }
PeripheralScanningOptions ScanOptions { get; set; }
}
[Static, Internal]
interface RestoredStateKeys {
[Field ("CBCentralManagerRestoredStatePeripheralsKey")]
NSString PeripheralsKey { get; }
[Field ("CBCentralManagerRestoredStateScanServicesKey")]
NSString ScanServicesKey { get; }
[Field ("CBCentralManagerRestoredStateScanOptionsKey")]
NSString ScanOptionsKey { get; }
}
[BaseType (typeof (NSObject))]
[Model]
[Protocol]