码迷,mamicode.com
首页 > 其他好文 > 详细

CBCentralManager

时间:2014-09-19 11:38:46      阅读:446      评论:0      收藏:0      [点我收藏+]

标签:style   blog   io   ar   for   div   sp   cti   log   

Initializing a Central Manager

- (instancetype)initWithDelegate:(id<CBCentralManagerDelegate>)delegate queue:(dispatch_queue_t)queue
- (instancetype)initWithDelegate:(id<CBCentralManagerDelegate>)delegate queue:(dispatch_queue_t)queue options:(NSDictionary *)options

 

Establishing or Canceling Connections with Peripherals

- (void)connectPeripheral:(CBPeripheral *)peripheral options:(NSDictionary *)options
- (void)cancelPeripheralConnection:(CBPeripheral *)peripheral

 

Retrieving Lists of Peripherals

- (void)retrieveConnectedPeripherals
- (NSArray *)retrieveConnectedPeripheralsWithServices:(NSArray *)serviceUUIDs
- (void)retrievePeripherals:(NSArray *)peripheralUUIDs
- (NSArray *)retrievePeripheralsWithIdentifiers:(NSArray *)identifiers

 

Scanning or Stopping Scans of Peripherals

- (void)scanForPeripheralsWithServices:(NSArray *)serviceUUIDs options:(NSDictionary *)options
- (void)stopScan

 

Monitoring Properties

@property(readonly) CBCentralManagerState state
@property(weak, nonatomic) id< CBCentralManagerDelegate > delegate

 

Constants

  

Central Manager Initialization Options

NSString *const  CBCentralManagerOptionShowPowerAlertKey ;
NSString *const  CBCentralManagerOptionRestoreIdentifierKey;

  

Peripheral Scanning Options

NSString *const  CBCentralManagerScanOptionAllowDuplicatesKey ;
NSString *const  CBCentralManagerScanOptionSolicitedServiceUUIDsKey;

 


Peripheral Connection Options

NSString *const  CBConnectPeripheralOptionNotifyOnConnectionKey ;
NSString *const  CBConnectPeripheralOptionNotifyOnDisconnectionKey ;
NSString *const  CBConnectPeripheralOptionNotifyOnNotificationKey;

 

Central Manager State

typedef enum {
   CBCentralManagerStateUnknown  = 0,
   CBCentralManagerStateResetting ,
   CBCentralManagerStateUnsupported ,
   CBCentralManagerStateUnauthorized ,
   CBCentralManagerStatePoweredOff ,
   CBCentralManagerStatePoweredOn ,
} CBCentralManagerState;

 

CBCentralManager

标签:style   blog   io   ar   for   div   sp   cti   log   

原文地址:http://www.cnblogs.com/zhongriqianqian/p/3980906.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!