mirror of
https://gitee.com/openharmony/interface_sdk-js
synced 2024-11-27 17:31:12 +00:00
bluetooth 整改
Signed-off-by: lverpeng <lverpeng118@163.com>
This commit is contained in:
parent
c63c6660a0
commit
68a9bc9168
2309
api/@ohos.bluetooth.d.ts
vendored
2309
api/@ohos.bluetooth.d.ts
vendored
File diff suppressed because it is too large
Load Diff
2
api/@ohos.bluetoothManager.d.ts
vendored
2
api/@ohos.bluetoothManager.d.ts
vendored
@ -13,7 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { AsyncCallback, Callback } from './@ohos.base';
|
||||
import type { AsyncCallback, Callback } from './@ohos.base';
|
||||
|
||||
/**
|
||||
* Provides methods to operate or manage Bluetooth.
|
||||
|
28
api/@system.bluetooth.d.ts
vendored
28
api/@system.bluetooth.d.ts
vendored
@ -14,6 +14,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef StartBLEScanOptions
|
||||
* @syscap SystemCapability.Communication.Bluetooth.Lite
|
||||
* @since 6
|
||||
*/
|
||||
@ -25,6 +26,7 @@ export interface StartBLEScanOptions {
|
||||
}
|
||||
|
||||
/**
|
||||
* @typedef StopBLEScanOptions
|
||||
* @syscap SystemCapability.Communication.Bluetooth.Lite
|
||||
* @since 6
|
||||
*/
|
||||
@ -35,11 +37,12 @@ export interface StopBLEScanOptions {
|
||||
}
|
||||
|
||||
/**
|
||||
* @typedef BluetoothDevice
|
||||
* @syscap SystemCapability.Communication.Bluetooth.Lite
|
||||
* @since 6
|
||||
*/
|
||||
export interface BluetoothDevice {
|
||||
addrType: "public" | "random";
|
||||
addrType: 'public' | 'random';
|
||||
addr: string;
|
||||
rssi: number;
|
||||
txpower: string;
|
||||
@ -47,6 +50,7 @@ export interface BluetoothDevice {
|
||||
}
|
||||
|
||||
/**
|
||||
* @typedef BLEFoundResponse
|
||||
* @syscap SystemCapability.Communication.Bluetooth.Lite
|
||||
* @since 6
|
||||
*/
|
||||
@ -55,6 +59,7 @@ export interface BLEFoundResponse {
|
||||
}
|
||||
|
||||
/**
|
||||
* @typedef SubscribeBLEFoundOptions
|
||||
* @syscap SystemCapability.Communication.Bluetooth.Lite
|
||||
* @since 6
|
||||
*/
|
||||
@ -65,30 +70,43 @@ export interface SubscribeBLEFoundOptions {
|
||||
|
||||
/**
|
||||
* Provides methods to manage BLE scan.
|
||||
* @since 6
|
||||
*
|
||||
* @syscap SystemCapability.Communication.Bluetooth.Lite
|
||||
* @since 6
|
||||
*/
|
||||
export default class Bluetooth {
|
||||
/**
|
||||
* Start BLE scan
|
||||
* @param options Options
|
||||
*
|
||||
* @param { StartBLEScanOptions } options - Options
|
||||
* @syscap SystemCapability.Communication.Bluetooth.Lite
|
||||
* @since 6
|
||||
*/
|
||||
static startBLEScan(options: StartBLEScanOptions): void;
|
||||
|
||||
/**
|
||||
* Stop BLE scan
|
||||
* @param options Options
|
||||
*
|
||||
* @param { StopBLEScanOptions } options - Options
|
||||
* @syscap SystemCapability.Communication.Bluetooth.Lite
|
||||
* @since 6
|
||||
*/
|
||||
static stopBLEScan(options: StopBLEScanOptions): void;
|
||||
|
||||
/**
|
||||
* Subscribe BLE found
|
||||
* @param options Options
|
||||
*
|
||||
* @param { SubscribeBLEFoundOptions } options - Options
|
||||
* @syscap SystemCapability.Communication.Bluetooth.Lite
|
||||
* @since 6
|
||||
*/
|
||||
static subscribeBLEFound(options: SubscribeBLEFoundOptions): void;
|
||||
|
||||
/**
|
||||
* Stop the subscription of BLE found
|
||||
*
|
||||
* @syscap SystemCapability.Communication.Bluetooth.Lite
|
||||
* @since 6
|
||||
*/
|
||||
static unsubscribeBLEFound(): void;
|
||||
}
|
Loading…
Reference in New Issue
Block a user