123456789101112131415161718192021222324252627282930313233343536373839404142 |
- /*
- BabyBluetooth
- 简单易用的蓝牙ble库,基于CoreBluetooth 作者:刘彦玮
- https://github.com/coolnameismy/BabyBluetooth
-
- @brief babybluetooth block查找和channel切换
- */
- // Created by 刘彦玮 on 15/9/2.
- // Copyright (c) 2015年 刘彦玮. All rights reserved.
- //
- #import "BabyCallback.h"
- #import <CoreBluetooth/CoreBluetooth.h>
- @interface BabySpeaker : NSObject
- - (BabyCallback *)callback;
- - (BabyCallback *)callbackOnCurrChannel;
- - (BabyCallback *)callbackOnChnnel:(NSString *)channel;
- - (BabyCallback *)callbackOnChnnel:(NSString *)channel
- createWhenNotExist:(BOOL)createWhenNotExist;
- //切换频道
- - (void)switchChannel:(NSString *)channel;
- //添加到notify list
- - (void)addNotifyCallback:(CBCharacteristic *)c
- withBlock:(void(^)(CBPeripheral *peripheral, CBCharacteristic *characteristics, NSError *error))block;
- //添加到notify list
- - (void)removeNotifyCallback:(CBCharacteristic *)c;
- //获取notify list
- - (NSMutableDictionary *)notifyCallBackList;
- //获取notityBlock
- - (void(^)(CBPeripheral *peripheral, CBCharacteristic *characteristics, NSError *error))notifyCallback:(CBCharacteristic *)c;
- @end
|