fix codecheck

Signed-off-by: liuqian_herb <704938153@qq.com>
This commit is contained in:
liuqian_herb 2024-02-01 15:18:54 +08:00
parent 5a66b2a13f
commit 20cc702bb2
3 changed files with 108 additions and 0 deletions

View File

@ -637,6 +637,15 @@ declare namespace bluetooth {
off(type: 'connectionStateChange', callback?: Callback<StateChangeParam>): void;
}
/**
* Provides methods to operate or manage Bluetooth.
*
* @namespace BLE
* @syscap SystemCapability.Communication.Bluetooth.Core
* @since 7
* @deprecated since 9
* @useinstead ohos.bluetoothManager/bluetoothManager.BLE
*/
namespace BLE {
/**
* create a JavaScript Gatt server instance.

View File

@ -1803,6 +1803,15 @@ declare namespace bluetoothManager {
isTetheringOn(): boolean;
}
/**
* Provides methods to operate or manage Bluetooth.
*
* @namespace BLE
* @syscap SystemCapability.Communication.Bluetooth.Core
* @since 9
* @deprecated since 10
* @useinstead ohos.bluetooth.ble/ble
*/
namespace BLE {
/**
* create a JavaScript Gatt server instance.

View File

@ -24,9 +24,33 @@
* @since 6
*/
export interface StartBLEScanOptions {
/**
* Time of delay for reporting the scan result
*
* @syscap SystemCapability.Communication.Bluetooth.Lite
* @since 6
*/
interval: number;
/**
* StartBLEScanOptions success
*
* @syscap SystemCapability.Communication.Bluetooth.Lite
* @since 6
*/
success: () => void;
/**
* StartBLEScanOptions failed
*
* @syscap SystemCapability.Communication.Bluetooth.Lite
* @since 6
*/
fail: (data: string, code: number) => void;
/**
* StartBLEScanOptions completed
*
* @syscap SystemCapability.Communication.Bluetooth.Lite
* @since 6
*/
complete: () => void;
}
@ -36,8 +60,26 @@ export interface StartBLEScanOptions {
* @since 6
*/
export interface StopBLEScanOptions {
/**
* StopBLEScanOptions success
*
* @syscap SystemCapability.Communication.Bluetooth.Lite
* @since 6
*/
success: () => void;
/**
* StopBLEScanOptions failed
*
* @syscap SystemCapability.Communication.Bluetooth.Lite
* @since 6
*/
fail: (data: string, code: number) => void;
/**
* StopBLEScanOptions completed
*
* @syscap SystemCapability.Communication.Bluetooth.Lite
* @since 6
*/
complete: () => void;
}
@ -47,10 +89,40 @@ export interface StopBLEScanOptions {
* @since 6
*/
export interface BluetoothDevice {
/**
* The addrType of address, may be public or random
*
* @syscap SystemCapability.Communication.Bluetooth.Lite
* @since 6
*/
addrType: 'public' | 'random';
/**
* Address of BluetoothDevice
*
* @syscap SystemCapability.Communication.Bluetooth.Lite
* @since 6
*/
addr: string;
/**
* RSSI of the remote device
*
* @syscap SystemCapability.Communication.Bluetooth.Lite
* @since 6
*/
rssi: number;
/**
* Transmission power level for advertising
*
* @syscap SystemCapability.Communication.Bluetooth.Lite
* @since 6
*/
txpower: string;
/**
* The data of BluetoothDevice
*
* @syscap SystemCapability.Communication.Bluetooth.Lite
* @since 6
*/
data: string;
}
@ -60,6 +132,12 @@ export interface BluetoothDevice {
* @since 6
*/
export interface BLEFoundResponse {
/**
* The devices of BLEFoundResponse
*
* @syscap SystemCapability.Communication.Bluetooth.Lite
* @since 6
*/
devices: Array<BluetoothDevice>;
}
@ -69,7 +147,19 @@ export interface BLEFoundResponse {
* @since 6
*/
export interface SubscribeBLEFoundOptions {
/**
* SubscribeBLEFoundOptions success
*
* @syscap SystemCapability.Communication.Bluetooth.Lite
* @since 6
*/
success: (data: BLEFoundResponse) => void;
/**
* SubscribeBLEFoundOptions failed
*
* @syscap SystemCapability.Communication.Bluetooth.Lite
* @since 6
*/
fail: (data: string, code: number) => void;
}