CBCentralManager

时间:2014-09-19 11:38:46   收藏:0   阅读:975

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;

 

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

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!