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.
25 lines
820 B
25 lines
820 B
import Foundation
|
|
|
|
/// BLE服务回调代理协议
|
|
protocol BleDelegate: AnyObject {
|
|
/// 扫描结果回调
|
|
/// - Parameter devices: 设备列表,每个设备包含id、name、rssi和uuids等信息
|
|
func onScanResult(devices: [[String: Any]])
|
|
|
|
/// 连接状态改变回调
|
|
/// - Parameter state: 连接状态,参考BleConst中的STATE_*常量
|
|
func onConnectionStateChanged(state: Int)
|
|
|
|
/// 音频数据接收回调
|
|
/// - Parameter data: 接收到的音频数据
|
|
func onAudioDataReceived(data: Data)
|
|
|
|
/// 唤醒信号接收回调
|
|
func onWakeupSignalReceived()
|
|
|
|
/// 设备信息接收回调
|
|
/// - Parameters:
|
|
/// - infoType: 信息类型
|
|
/// - infoData: 信息数据
|
|
func onDeviceInfoReceived(infoType: Int, infoData: [String: Any])
|
|
}
|