From 2c3b1b07eaa17e6199d08739e0c4fdfd183aa1e2 Mon Sep 17 00:00:00 2001 From: guoxiadi Date: Wed, 25 Jun 2025 14:17:52 +0800 Subject: [PATCH] delete onoff Signed-off-by: guoxiadi --- api/@ohos.bluetooth.access.d.ts | 6 +- api/@ohos.bluetooth.baseProfile.d.ts | 3 +- api/@ohos.bluetooth.ble.d.ts | 111 +++++++++------------------ api/@ohos.bluetooth.connection.d.ts | 30 +++----- 4 files changed, 51 insertions(+), 99 deletions(-) diff --git a/api/@ohos.bluetooth.access.d.ts b/api/@ohos.bluetooth.access.d.ts index e04cf930b1..d2e5946d9e 100644 --- a/api/@ohos.bluetooth.access.d.ts +++ b/api/@ohos.bluetooth.access.d.ts @@ -288,8 +288,7 @@ declare namespace access { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ function on(type: 'stateChange', callback: Callback): void; @@ -336,8 +335,7 @@ declare namespace access { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ function off(type: 'stateChange', callback?: Callback): void; diff --git a/api/@ohos.bluetooth.baseProfile.d.ts b/api/@ohos.bluetooth.baseProfile.d.ts index ad71f84813..27764959f4 100644 --- a/api/@ohos.bluetooth.baseProfile.d.ts +++ b/api/@ohos.bluetooth.baseProfile.d.ts @@ -425,8 +425,7 @@ declare namespace baseProfile { * @throws { BusinessError } 801 - Capability not supported. * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ on(type: 'connectionStateChange', callback: Callback): void; diff --git a/api/@ohos.bluetooth.ble.d.ts b/api/@ohos.bluetooth.ble.d.ts index 0a0853d7e7..1b3bb5e4bb 100644 --- a/api/@ohos.bluetooth.ble.d.ts +++ b/api/@ohos.bluetooth.ble.d.ts @@ -570,8 +570,7 @@ declare namespace ble { * @throws { BusinessError } 2900099 - Operation failed. * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ function stopAdvertising(advertisingId: number, callback: AsyncCallback): void; @@ -608,8 +607,7 @@ declare namespace ble { * @throws { BusinessError } 2900099 - Operation failed. * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ function stopAdvertising(advertisingId: number): Promise; @@ -640,8 +638,7 @@ declare namespace ble { * @throws { BusinessError } 2900099 - Operation failed. * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ function on(type: 'advertisingStateChange', callback: Callback): void; @@ -672,8 +669,7 @@ declare namespace ble { * @throws { BusinessError } 2900099 - Operation failed. * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ function off(type: 'advertisingStateChange', callback?: Callback): void; @@ -720,8 +716,7 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ function on(type: 'BLEDeviceFind', callback: Callback>): void; @@ -768,8 +763,7 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ function off(type: 'BLEDeviceFind', callback?: Callback>): void; @@ -1159,8 +1153,7 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ on(type: 'characteristicRead', callback: Callback): void; @@ -1204,8 +1197,7 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ off(type: 'characteristicRead', callback?: Callback): void; @@ -1249,8 +1241,7 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ on(type: 'characteristicWrite', callback: Callback): void; @@ -1294,8 +1285,7 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ off(type: 'characteristicWrite', callback?: Callback): void; @@ -1339,8 +1329,7 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ on(type: 'descriptorRead', callback: Callback): void; @@ -1384,8 +1373,7 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ off(type: 'descriptorRead', callback?: Callback): void; @@ -1429,8 +1417,7 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ on(type: 'descriptorWrite', callback: Callback): void; @@ -1474,8 +1461,7 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ off(type: 'descriptorWrite', callback?: Callback): void; @@ -1519,8 +1505,7 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ on(type: 'connectionStateChange', callback: Callback): void; @@ -1564,8 +1549,7 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ off(type: 'connectionStateChange', callback?: Callback): void; @@ -1594,8 +1578,7 @@ declare namespace ble { * @throws { BusinessError } 801 - Capability not supported. * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ on(type: 'BLEMtuChange', callback: Callback): void; @@ -1624,8 +1607,7 @@ declare namespace ble { * @throws { BusinessError } 801 - Capability not supported. * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ off(type: 'BLEMtuChange', callback?: Callback): void; } @@ -1925,8 +1907,7 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ getServices(callback: AsyncCallback>): void; @@ -1973,8 +1954,7 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ getServices(): Promise>; @@ -2242,8 +2222,7 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ writeCharacteristicValue( characteristic: BLECharacteristic, @@ -2303,8 +2282,7 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ writeCharacteristicValue(characteristic: BLECharacteristic, writeType: GattWriteType): Promise; @@ -2357,8 +2335,7 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ writeDescriptorValue(descriptor: BLEDescriptor, callback: AsyncCallback): void; @@ -2411,8 +2388,7 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ writeDescriptorValue(descriptor: BLEDescriptor): Promise; @@ -2441,8 +2417,7 @@ declare namespace ble { * @throws { BusinessError } 2900099 - Operation failed. * @syscap SystemCapability.Communication.Bluetooth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ getRssiValue(callback: AsyncCallback): void; @@ -2471,8 +2446,7 @@ declare namespace ble { * @throws { BusinessError } 2900099 - Operation failed. * @syscap SystemCapability.Communication.Bluetooth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ getRssiValue(): Promise; @@ -2557,8 +2531,7 @@ declare namespace ble { * @throws { BusinessError } 2900099 - Operation failed. * @syscap SystemCapability.Communication.Bluetooth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ setCharacteristicChangeNotification( characteristic: BLECharacteristic, @@ -2599,8 +2572,7 @@ declare namespace ble { * @throws { BusinessError } 2900099 - Operation failed. * @syscap SystemCapability.Communication.Bluetooth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ setCharacteristicChangeNotification(characteristic: BLECharacteristic, enable: boolean): Promise; @@ -2707,8 +2679,7 @@ declare namespace ble { * @throws { BusinessError } 801 - Capability not supported. * @syscap SystemCapability.Communication.Bluetooth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ on(type: 'BLECharacteristicChange', callback: Callback): void; @@ -2737,8 +2708,7 @@ declare namespace ble { * @throws { BusinessError } 801 - Capability not supported. * @syscap SystemCapability.Communication.Bluetooth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ off(type: 'BLECharacteristicChange', callback?: Callback): void; @@ -2782,8 +2752,7 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ on(type: 'BLEConnectionStateChange', callback: Callback): void; @@ -2827,8 +2796,7 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ off(type: 'BLEConnectionStateChange', callback?: Callback): void; @@ -2872,8 +2840,7 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ on(type: 'BLEMtuChange', callback: Callback): void; @@ -2917,8 +2884,7 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ off(type: 'BLEMtuChange', callback?: Callback): void; } @@ -2992,8 +2958,7 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ on(type: 'BLEDeviceFind', callback: Callback): void; /** @@ -3010,8 +2975,7 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ off(type: 'BLEDeviceFind', callback?: Callback): void; } @@ -5351,7 +5315,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ interface ScanFilter { /** diff --git a/api/@ohos.bluetooth.connection.d.ts b/api/@ohos.bluetooth.connection.d.ts index 014f7757e2..ee61698e20 100644 --- a/api/@ohos.bluetooth.connection.d.ts +++ b/api/@ohos.bluetooth.connection.d.ts @@ -1369,8 +1369,7 @@ declare namespace connection { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ function on(type: 'bluetoothDeviceFind', callback: Callback>): void; @@ -1411,8 +1410,7 @@ declare namespace connection { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ function off(type: 'bluetoothDeviceFind', callback?: Callback>): void; @@ -1443,8 +1441,7 @@ declare namespace connection { * @throws { BusinessError } 801 - Capability not supported. * @throws { BusinessError } 2900099 - Operation failed. * @syscap SystemCapability.Communication.Bluetooth.Core - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ function on(type: 'discoveryResult', callback: Callback>): void; @@ -1471,8 +1468,7 @@ declare namespace connection { * @throws { BusinessError } 801 - Capability not supported. * @throws { BusinessError } 2900099 - Operation failed. * @syscap SystemCapability.Communication.Bluetooth.Core - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ function off(type: 'discoveryResult', callback?: Callback>): void; @@ -1503,8 +1499,7 @@ declare namespace connection { * @throws { BusinessError } 2900099 - Operation failed. * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ function on(type: 'bondStateChange', callback: Callback): void; @@ -1535,8 +1530,7 @@ declare namespace connection { * @throws { BusinessError } 2900099 - Operation failed. * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ function off(type: 'bondStateChange', callback?: Callback): void; @@ -1552,8 +1546,7 @@ declare namespace connection { * @throws { BusinessError } 801 - Capability not supported. * @throws { BusinessError } 2900099 - Operation failed. * @syscap SystemCapability.Communication.Bluetooth.Core - * @since arkts {'1.1':'10','1.2':'20'} - * @arkts 1.1&1.2 + * @since 10 */ function on(type: 'pinRequired', callback: Callback): void; @@ -1569,8 +1562,7 @@ declare namespace connection { * @throws { BusinessError } 801 - Capability not supported. * @throws { BusinessError } 2900099 - Operation failed. * @syscap SystemCapability.Communication.Bluetooth.Core - * @since arkts {'1.1':'10','1.2':'20'} - * @arkts 1.1&1.2 + * @since 10 */ function off(type: 'pinRequired', callback?: Callback): void; @@ -1583,8 +1575,7 @@ declare namespace connection { * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 2900099 - Operation failed. * @syscap SystemCapability.Communication.Bluetooth.Core - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ function on(type: 'batteryChange', callback: Callback): void; @@ -1597,8 +1588,7 @@ declare namespace connection { * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 2900099 - Operation failed. * @syscap SystemCapability.Communication.Bluetooth.Core - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ function off(type: 'batteryChange', callback?: Callback): void; -- Gitee