mirror of
https://gitee.com/openharmony/interface_sdk-js
synced 2024-11-27 09:22:53 +00:00
fix codecheck
Signed-off-by: liuqian_herb <704938153@qq.com>
This commit is contained in:
parent
5a66b2a13f
commit
20cc702bb2
9
api/@ohos.bluetooth.d.ts
vendored
9
api/@ohos.bluetooth.d.ts
vendored
@ -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.
|
||||
|
9
api/@ohos.bluetoothManager.d.ts
vendored
9
api/@ohos.bluetoothManager.d.ts
vendored
@ -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.
|
||||
|
90
api/@system.bluetooth.d.ts
vendored
90
api/@system.bluetooth.d.ts
vendored
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user