You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
59 lines
1.0 KiB
59 lines
1.0 KiB
// |
|
// BluetoothDelegate.h |
|
// BluetoothDemo |
|
// |
|
// Created by mac on 17/3/9. |
|
// Copyright © 2017年 . All rights reserved. |
|
// |
|
|
|
#import <Foundation/Foundation.h> |
|
#import "BLEModel.h" |
|
|
|
@class Bluetooth; |
|
|
|
@protocol BluetoothDelegate <NSObject> |
|
|
|
|
|
/** |
|
扫描到设备后回调 |
|
|
|
@param bleModel 返回ble模型 |
|
*/ |
|
@optional |
|
- (void)onDiscoverToPeripheralsBleModel:(BLEModel *)bleModel; |
|
|
|
|
|
/** |
|
发现设备的Services的委托 |
|
|
|
@param peripheral 外设 |
|
*/ |
|
@optional |
|
- (void)onDiscoverServices:(CBPeripheral *)peripheral; |
|
|
|
|
|
/** |
|
发现设备service的Characteristics的委托 |
|
|
|
@param peripheral 外设 |
|
@param service 服务 |
|
*/ |
|
@optional |
|
- (void)OnDiscoverCharacteristics:(CBPeripheral *)peripheral |
|
Service:(CBService *)service; |
|
|
|
|
|
/** |
|
读取characteristics的委托 |
|
|
|
@param peripheral 外设 |
|
@param characteristics 特征值 |
|
*/ |
|
@optional |
|
- (void)OnReadValueForCharacteristic:(CBPeripheral *)peripheral |
|
characteristicsL:(CBCharacteristic *)characteristics; |
|
|
|
|
|
|
|
|
|
@end
|
|
|