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;
NSString *const CBCentralManagerScanOptionAllowDuplicatesKey ; NSString *const CBCentralManagerScanOptionSolicitedServiceUUIDsKey;
NSString *const CBConnectPeripheralOptionNotifyOnConnectionKey ; NSString *const CBConnectPeripheralOptionNotifyOnDisconnectionKey ; NSString *const CBConnectPeripheralOptionNotifyOnNotificationKey;
typedef enum { CBCentralManagerStateUnknown = 0, CBCentralManagerStateResetting , CBCentralManagerStateUnsupported , CBCentralManagerStateUnauthorized , CBCentralManagerStatePoweredOff , CBCentralManagerStatePoweredOn , } CBCentralManagerState;
原文:http://www.cnblogs.com/zhongriqianqian/p/3980906.html
评论(0)