@onbright/bluetooth-sdk
Advanced tools
Comparing version 1.1.22 to 1.1.23
@@ -11,44 +11,2 @@ interface Communication { | ||
declare class ConnectHandler { | ||
private status; | ||
private callback; | ||
private currentDevice; | ||
private disconnectTime; | ||
private mtu; | ||
private maxMTU; | ||
private communicationService; | ||
private communicationWriteCharacteristic; | ||
private communication; | ||
constructor(communication: Communication); | ||
connect(device: WechatMiniprogram.BlueToothDevice, isOTA: boolean): boolean; | ||
setMaxMTU(mtu: number): void; | ||
disconnect(): void; | ||
setCallback(callback: ConnectCallback | null): void; | ||
getConnectedDevice(): WechatMiniprogram.BlueToothDevice | null; | ||
getCommunicationService(): WechatMiniprogram.BLEService | null; | ||
getCommunication(): Communication; | ||
getCommunicationWriteCharacteristic(): WechatMiniprogram.BLECharacteristic | null; | ||
getMTU(): number | undefined; | ||
isConnectedOrConnecting(): boolean; | ||
isConnecting(): boolean; | ||
isConnected(): boolean; | ||
private _registerConnStatusListener; | ||
private _getBLEDeviceServices; | ||
private _getBLEDeviceCharacteristics; | ||
private _notifyBLECharacteristicValueChange; | ||
private _disconnect; | ||
private _connectFailed; | ||
private _connectSuccsed; | ||
} | ||
interface ConnectCallback { | ||
onDisconnect?: ConnectDisconnectCallback; | ||
onFailed?: ConnectFailedCallback; | ||
onSuccess?: ConnectSuccessCallback; | ||
onMTUChange?: DeviceMTUChangeCallback; | ||
} | ||
type ConnectDisconnectCallback = (result: WechatMiniprogram.BlueToothDevice) => void; | ||
type ConnectFailedCallback = (result: WechatMiniprogram.BlueToothDevice) => void; | ||
type ConnectSuccessCallback = (result: WechatMiniprogram.BlueToothDevice) => void; | ||
type DeviceMTUChangeCallback = (result: WechatMiniprogram.BlueToothDevice, mtu: number) => void; | ||
declare class BluetoothManager { | ||
@@ -60,3 +18,3 @@ private _ConnectHandler; | ||
private init; | ||
setConnectHandler(connectHandler: ConnectHandler): void; | ||
setConnectHandler(communication: Communication): void; | ||
addBluetoothEventCallback(callback: BluetoothEventCallback): void; | ||
@@ -63,0 +21,0 @@ removeBluetoothEventCallback(callback: BluetoothEventCallback): void; |
{ | ||
"name": "@onbright/bluetooth-sdk", | ||
"version": "1.1.22", | ||
"version": "1.1.23", | ||
"scripts": { | ||
@@ -5,0 +5,0 @@ "build": "tsup", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
343985
4580