Beispiel #1
0
 public void ScanForPeripherals(CBUUID [] peripheralUuids, NSDictionary options)
 {
     if (peripheralUuids == null)
         ScanForPeripherals ((NSArray) null, options);
     else
         ScanForPeripherals (NSArray.FromObjects (peripheralUuids), options);
 }
Beispiel #2
0
        public void RetrievePeripherals(CBUUID [] peripheralUuids)
        {
            if (peripheralUuids == null)
                throw new ArgumentNullException ("peripheralUuids");
            var ptrs = new IntPtr [peripheralUuids.Length];
            for (int i =0; i < peripheralUuids.Length; i++) {
                using (var s = new NSString (peripheralUuids[i].ToString(true)))
                    ptrs [i] = CFUUID.CFUUIDCreateFromString (IntPtr.Zero, s.Handle);
            }
            using (var arr = NSArray.FromIntPtrs (ptrs))
                RetrievePeripherals (arr);

            foreach (var p in ptrs)
                CFObject.CFRelease (p);
        }
Beispiel #3
0
 public void RetrievePeripherals(CBUUID peripheralUuid)
 {
     RetrievePeripherals(new [] { peripheralUuid });
 }
Beispiel #4
0
 public void ScanForPeripherals(CBUUID serviceUuid)
 {
     ScanForPeripherals(new [] { serviceUuid }, null as NSDictionary);
 }
Beispiel #5
0
 public void ScanForPeripherals(CBUUID serviceUuid, NSDictionary options)
 {
     ScanForPeripherals(new [] { serviceUuid }, options);
 }
Beispiel #6
0
 public void RetrievePeripherals(CBUUID peripheralUuid)
 {
     RetrievePeripherals (new [] { peripheralUuid });
 }
Beispiel #7
0
 public void ScanForPeripherals(CBUUID serviceUuid)
 {
     ScanForPeripherals (new [] { serviceUuid }, null as NSDictionary);
 }
Beispiel #8
0
 public void ScanForPeripherals(CBUUID serviceUuid, NSDictionary options)
 {
     ScanForPeripherals (new [] { serviceUuid }, options);
 }
Beispiel #9
0
 public void ScanForPeripherals(CBUUID [] peripheralUuids)
 {
     ScanForPeripherals (peripheralUuids, null as NSDictionary);
 }
Beispiel #10
0
 public void ScanForPeripherals(CBUUID[] peripheralUuids, PeripheralScanningOptions options = null)
 {
     ScanForPeripherals (peripheralUuids, options == null ? null : options.Dictionary);
 }
Beispiel #11
0
 public void DiscoverServices(CBUUID [] services)
 {
     if (services == null)
         DiscoverServices ((NSArray) null);
     else
         DiscoverServices (NSArray.FromObjects (services));
 }
Beispiel #12
0
 public void DiscoverIncludedServices(CBUUID [] includedServiceUUIDs, CBService forService)
 {
     if (includedServiceUUIDs == null)
         DiscoverIncludedServices ((NSArray) null, forService);
     else
         DiscoverIncludedServices (NSArray.FromObjects (includedServiceUUIDs), forService);
 }
Beispiel #13
0
 public void DiscoverCharacteristics(CBUUID [] charactersticUUIDs, CBService forService)
 {
     if (charactersticUUIDs == null)
         DiscoverCharacteristics ((NSArray) null, forService);
     else
         DiscoverCharacteristics (NSArray.FromObjects (charactersticUUIDs), forService);
 }