161847f8eSopenharmony_ci/*
261847f8eSopenharmony_ci * Copyright (C) 2023-2024 Huawei Device Co., Ltd.
361847f8eSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
461847f8eSopenharmony_ci * you may not use this file except in compliance with the License.
561847f8eSopenharmony_ci * You may obtain a copy of the License at
661847f8eSopenharmony_ci *
761847f8eSopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
861847f8eSopenharmony_ci *
961847f8eSopenharmony_ci * Unless required by applicable law or agreed to in writing, software
1061847f8eSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
1161847f8eSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1261847f8eSopenharmony_ci * See the License for the specific language governing permissions and
1361847f8eSopenharmony_ci * limitations under the License.
1461847f8eSopenharmony_ci */
1561847f8eSopenharmony_ci
1661847f8eSopenharmony_ci/**
1761847f8eSopenharmony_ci * @file
1861847f8eSopenharmony_ci * @kit ConnectivityKit
1961847f8eSopenharmony_ci */
2061847f8eSopenharmony_ci
2161847f8eSopenharmony_ciimport type { AsyncCallback, Callback } from './@ohos.base';
2261847f8eSopenharmony_ciimport type constant from './@ohos.bluetooth.constant';
2361847f8eSopenharmony_ci
2461847f8eSopenharmony_ci/**
2561847f8eSopenharmony_ci * Provides methods to operate or manage Bluetooth.
2661847f8eSopenharmony_ci *
2761847f8eSopenharmony_ci * @namespace ble
2861847f8eSopenharmony_ci * @syscap SystemCapability.Communication.Bluetooth.Core
2961847f8eSopenharmony_ci * @since 10
3061847f8eSopenharmony_ci */
3161847f8eSopenharmony_ci/**
3261847f8eSopenharmony_ci * Provides methods to operate or manage Bluetooth.
3361847f8eSopenharmony_ci *
3461847f8eSopenharmony_ci * @namespace ble
3561847f8eSopenharmony_ci * @syscap SystemCapability.Communication.Bluetooth.Core
3661847f8eSopenharmony_ci * @atomicservice
3761847f8eSopenharmony_ci * @since 12
3861847f8eSopenharmony_ci */
3961847f8eSopenharmony_ci/**
4061847f8eSopenharmony_ci * Provides methods to operate or manage Bluetooth.
4161847f8eSopenharmony_ci *
4261847f8eSopenharmony_ci * @namespace ble
4361847f8eSopenharmony_ci * @syscap SystemCapability.Communication.Bluetooth.Core
4461847f8eSopenharmony_ci * @crossplatform
4561847f8eSopenharmony_ci * @atomicservice
4661847f8eSopenharmony_ci * @since 13
4761847f8eSopenharmony_ci */
4861847f8eSopenharmony_cideclare namespace ble {
4961847f8eSopenharmony_ci  /**
5061847f8eSopenharmony_ci   * Indicate the profile connection state.
5161847f8eSopenharmony_ci   *
5261847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
5361847f8eSopenharmony_ci   * @since 10
5461847f8eSopenharmony_ci   */
5561847f8eSopenharmony_ci  /**
5661847f8eSopenharmony_ci   * Indicate the profile connection state.
5761847f8eSopenharmony_ci   *
5861847f8eSopenharmony_ci   * @typedef { constant.ProfileConnectionState } ProfileConnectionState
5961847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
6061847f8eSopenharmony_ci   * @atomicservice
6161847f8eSopenharmony_ci   * @since 12
6261847f8eSopenharmony_ci   */
6361847f8eSopenharmony_ci  /**
6461847f8eSopenharmony_ci   * Indicate the profile connection state.
6561847f8eSopenharmony_ci   *
6661847f8eSopenharmony_ci   * @typedef { constant.ProfileConnectionState } ProfileConnectionState
6761847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
6861847f8eSopenharmony_ci   * @crossplatform
6961847f8eSopenharmony_ci   * @atomicservice
7061847f8eSopenharmony_ci   * @since 13
7161847f8eSopenharmony_ci   */
7261847f8eSopenharmony_ci  type ProfileConnectionState = constant.ProfileConnectionState;
7361847f8eSopenharmony_ci
7461847f8eSopenharmony_ci  /**
7561847f8eSopenharmony_ci   * create a Gatt server instance.
7661847f8eSopenharmony_ci   *
7761847f8eSopenharmony_ci   * @returns { GattServer } Returns a Gatt server instance {@code GattServer}.
7861847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
7961847f8eSopenharmony_ci   * @since 10
8061847f8eSopenharmony_ci   */
8161847f8eSopenharmony_ci  /**
8261847f8eSopenharmony_ci   * create a Gatt server instance.
8361847f8eSopenharmony_ci   *
8461847f8eSopenharmony_ci   * @returns { GattServer } Returns a Gatt server instance {@code GattServer}.
8561847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
8661847f8eSopenharmony_ci   * @atomicservice
8761847f8eSopenharmony_ci   * @since 12
8861847f8eSopenharmony_ci   */
8961847f8eSopenharmony_ci  /**
9061847f8eSopenharmony_ci   * create a Gatt server instance.
9161847f8eSopenharmony_ci   *
9261847f8eSopenharmony_ci   * @returns { GattServer } Returns a Gatt server instance {@code GattServer}.
9361847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
9461847f8eSopenharmony_ci   * @crossplatform
9561847f8eSopenharmony_ci   * @atomicservice
9661847f8eSopenharmony_ci   * @since 13
9761847f8eSopenharmony_ci   */
9861847f8eSopenharmony_ci  function createGattServer(): GattServer;
9961847f8eSopenharmony_ci
10061847f8eSopenharmony_ci  /**
10161847f8eSopenharmony_ci   * create a Gatt client device instance.
10261847f8eSopenharmony_ci   *
10361847f8eSopenharmony_ci   * @param { string } deviceId - Indicates device ID. For example, "11:22:33:AA:BB:FF".
10461847f8eSopenharmony_ci   * @returns { GattClientDevice } Returns a Gatt client device instance {@code GattClientDevice}.
10561847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
10661847f8eSopenharmony_ci   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
10761847f8eSopenharmony_ci   * @throws { BusinessError } 801 - Capability not supported.
10861847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
10961847f8eSopenharmony_ci   * @since 10
11061847f8eSopenharmony_ci   */
11161847f8eSopenharmony_ci  /**
11261847f8eSopenharmony_ci   * create a Gatt client device instance.
11361847f8eSopenharmony_ci   *
11461847f8eSopenharmony_ci   * @param { string } deviceId - Indicates device ID. For example, "11:22:33:AA:BB:FF".
11561847f8eSopenharmony_ci   * @returns { GattClientDevice } Returns a Gatt client device instance {@code GattClientDevice}.
11661847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
11761847f8eSopenharmony_ci   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
11861847f8eSopenharmony_ci   * @throws { BusinessError } 801 - Capability not supported.
11961847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
12061847f8eSopenharmony_ci   * @atomicservice
12161847f8eSopenharmony_ci   * @since 12
12261847f8eSopenharmony_ci   */
12361847f8eSopenharmony_ci  /**
12461847f8eSopenharmony_ci   * create a Gatt client device instance.
12561847f8eSopenharmony_ci   *
12661847f8eSopenharmony_ci   * @param { string } deviceId - Indicates device ID. For example, "11:22:33:AA:BB:FF".
12761847f8eSopenharmony_ci   * @returns { GattClientDevice } Returns a Gatt client device instance {@code GattClientDevice}.
12861847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
12961847f8eSopenharmony_ci   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
13061847f8eSopenharmony_ci   * @throws { BusinessError } 801 - Capability not supported.
13161847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
13261847f8eSopenharmony_ci   * @crossplatform
13361847f8eSopenharmony_ci   * @atomicservice
13461847f8eSopenharmony_ci   * @since 13
13561847f8eSopenharmony_ci   */
13661847f8eSopenharmony_ci  function createGattClientDevice(deviceId: string): GattClientDevice;
13761847f8eSopenharmony_ci
13861847f8eSopenharmony_ci  /**
13961847f8eSopenharmony_ci   * Obtains the list of devices in the connected status.
14061847f8eSopenharmony_ci   *
14161847f8eSopenharmony_ci   * @permission ohos.permission.ACCESS_BLUETOOTH
14261847f8eSopenharmony_ci   * @returns { Array<string> } Returns the list of device address.
14361847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
14461847f8eSopenharmony_ci   * @throws { BusinessError } 801 - Capability not supported.
14561847f8eSopenharmony_ci   * @throws { BusinessError } 2900001 - Service stopped.
14661847f8eSopenharmony_ci   * @throws { BusinessError } 2900003 - Bluetooth disabled.
14761847f8eSopenharmony_ci   * @throws { BusinessError } 2900099 - Operation failed.
14861847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
14961847f8eSopenharmony_ci   * @since 10
15061847f8eSopenharmony_ci   */
15161847f8eSopenharmony_ci  /**
15261847f8eSopenharmony_ci   * Obtains the list of devices in the connected status.
15361847f8eSopenharmony_ci   *
15461847f8eSopenharmony_ci   * @permission ohos.permission.ACCESS_BLUETOOTH
15561847f8eSopenharmony_ci   * @returns { Array<string> } Returns the list of device address.
15661847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
15761847f8eSopenharmony_ci   * @throws { BusinessError } 801 - Capability not supported.
15861847f8eSopenharmony_ci   * @throws { BusinessError } 2900001 - Service stopped.
15961847f8eSopenharmony_ci   * @throws { BusinessError } 2900003 - Bluetooth disabled.
16061847f8eSopenharmony_ci   * @throws { BusinessError } 2900099 - Operation failed.
16161847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
16261847f8eSopenharmony_ci   * @crossplatform
16361847f8eSopenharmony_ci   * @since 13
16461847f8eSopenharmony_ci   */
16561847f8eSopenharmony_ci  function getConnectedBLEDevices(): Array<string>;
16661847f8eSopenharmony_ci
16761847f8eSopenharmony_ci  /**
16861847f8eSopenharmony_ci   * Starts scanning for specified BLE devices with filters.
16961847f8eSopenharmony_ci   *
17061847f8eSopenharmony_ci   * @permission ohos.permission.ACCESS_BLUETOOTH
17161847f8eSopenharmony_ci   * @param { Array<ScanFilter> } filters - Indicates the list of filters used to filter out specified devices.
17261847f8eSopenharmony_ci   * If you do not want to use filter, set this parameter to {@code null}.
17361847f8eSopenharmony_ci   * @param { ScanOptions } options - Indicates the parameters for scanning and if the user does not assign a value, the default value will be used.
17461847f8eSopenharmony_ci   * {@link ScanOptions#interval} set to 0, {@link ScanOptions#dutyMode} set to {@link SCAN_MODE_LOW_POWER}
17561847f8eSopenharmony_ci   * and {@link ScanOptions#matchMode} set to {@link MATCH_MODE_AGGRESSIVE}.
17661847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
17761847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
17861847f8eSopenharmony_ci   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
17961847f8eSopenharmony_ci   * @throws { BusinessError } 801 - Capability not supported.
18061847f8eSopenharmony_ci   * @throws { BusinessError } 2900001 - Service stopped.
18161847f8eSopenharmony_ci   * @throws { BusinessError } 2900003 - Bluetooth disabled.
18261847f8eSopenharmony_ci   * @throws { BusinessError } 2900099 - Operation failed.
18361847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
18461847f8eSopenharmony_ci   * @since 10
18561847f8eSopenharmony_ci   */
18661847f8eSopenharmony_ci  /**
18761847f8eSopenharmony_ci   * Starts scanning for specified BLE devices with filters.
18861847f8eSopenharmony_ci   *
18961847f8eSopenharmony_ci   * @permission ohos.permission.ACCESS_BLUETOOTH
19061847f8eSopenharmony_ci   * @param { Array<ScanFilter> } filters - Indicates the list of filters used to filter out specified devices.
19161847f8eSopenharmony_ci   * If you do not want to use filter, set this parameter to {@code null}.
19261847f8eSopenharmony_ci   * @param { ScanOptions } options - Indicates the parameters for scanning and if the user does not assign a value, the default value will be used.
19361847f8eSopenharmony_ci   * {@link ScanOptions#interval} set to 0, {@link ScanOptions#dutyMode} set to {@link SCAN_MODE_LOW_POWER}
19461847f8eSopenharmony_ci   * and {@link ScanOptions#matchMode} set to {@link MATCH_MODE_AGGRESSIVE}.
19561847f8eSopenharmony_ci   * and {@link ScanOptions#phyType} set to {@link PHY_LE_ALL_SUPPORTED}.
19661847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
19761847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
19861847f8eSopenharmony_ci   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
19961847f8eSopenharmony_ci   * @throws { BusinessError } 801 - Capability not supported.
20061847f8eSopenharmony_ci   * @throws { BusinessError } 2900001 - Service stopped.
20161847f8eSopenharmony_ci   * @throws { BusinessError } 2900003 - Bluetooth disabled.
20261847f8eSopenharmony_ci   * @throws { BusinessError } 2900099 - Operation failed.
20361847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
20461847f8eSopenharmony_ci   * @atomicservice
20561847f8eSopenharmony_ci   * @since 12
20661847f8eSopenharmony_ci   */
20761847f8eSopenharmony_ci  /**
20861847f8eSopenharmony_ci   * Starts scanning for specified BLE devices with filters.
20961847f8eSopenharmony_ci   *
21061847f8eSopenharmony_ci   * @permission ohos.permission.ACCESS_BLUETOOTH
21161847f8eSopenharmony_ci   * @param { Array<ScanFilter> } filters - Indicates the list of filters used to filter out specified devices.
21261847f8eSopenharmony_ci   * If you do not want to use filter, set this parameter to {@code null}.
21361847f8eSopenharmony_ci   * @param { ScanOptions } options - Indicates the parameters for scanning and if the user does not assign a value, the default value will be used.
21461847f8eSopenharmony_ci   * {@link ScanOptions#interval} set to 0, {@link ScanOptions#dutyMode} set to {@link SCAN_MODE_LOW_POWER}
21561847f8eSopenharmony_ci   * and {@link ScanOptions#matchMode} set to {@link MATCH_MODE_AGGRESSIVE}.
21661847f8eSopenharmony_ci   * and {@link ScanOptions#phyType} set to {@link PHY_LE_ALL_SUPPORTED}.
21761847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
21861847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
21961847f8eSopenharmony_ci   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
22061847f8eSopenharmony_ci   * @throws { BusinessError } 801 - Capability not supported.
22161847f8eSopenharmony_ci   * @throws { BusinessError } 2900001 - Service stopped.
22261847f8eSopenharmony_ci   * @throws { BusinessError } 2900003 - Bluetooth disabled.
22361847f8eSopenharmony_ci   * @throws { BusinessError } 2900099 - Operation failed.
22461847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
22561847f8eSopenharmony_ci   * @crossplatform
22661847f8eSopenharmony_ci   * @atomicservice
22761847f8eSopenharmony_ci   * @since 13
22861847f8eSopenharmony_ci   */
22961847f8eSopenharmony_ci  function startBLEScan(filters: Array<ScanFilter>, options?: ScanOptions): void;
23061847f8eSopenharmony_ci
23161847f8eSopenharmony_ci  /**
23261847f8eSopenharmony_ci   * Stops BLE scanning.
23361847f8eSopenharmony_ci   *
23461847f8eSopenharmony_ci   * @permission ohos.permission.ACCESS_BLUETOOTH
23561847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
23661847f8eSopenharmony_ci   * @throws { BusinessError } 801 - Capability not supported.
23761847f8eSopenharmony_ci   * @throws { BusinessError } 2900001 - Service stopped.
23861847f8eSopenharmony_ci   * @throws { BusinessError } 2900003 - Bluetooth disabled.
23961847f8eSopenharmony_ci   * @throws { BusinessError } 2900099 - Operation failed.
24061847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
24161847f8eSopenharmony_ci   * @since 10
24261847f8eSopenharmony_ci   */
24361847f8eSopenharmony_ci  /**
24461847f8eSopenharmony_ci   * Stops BLE scanning.
24561847f8eSopenharmony_ci   *
24661847f8eSopenharmony_ci   * @permission ohos.permission.ACCESS_BLUETOOTH
24761847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
24861847f8eSopenharmony_ci   * @throws { BusinessError } 801 - Capability not supported.
24961847f8eSopenharmony_ci   * @throws { BusinessError } 2900001 - Service stopped.
25061847f8eSopenharmony_ci   * @throws { BusinessError } 2900003 - Bluetooth disabled.
25161847f8eSopenharmony_ci   * @throws { BusinessError } 2900099 - Operation failed.
25261847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
25361847f8eSopenharmony_ci   * @atomicservice
25461847f8eSopenharmony_ci   * @since 12
25561847f8eSopenharmony_ci   */
25661847f8eSopenharmony_ci  /**
25761847f8eSopenharmony_ci   * Stops BLE scanning.
25861847f8eSopenharmony_ci   *
25961847f8eSopenharmony_ci   * @permission ohos.permission.ACCESS_BLUETOOTH
26061847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
26161847f8eSopenharmony_ci   * @throws { BusinessError } 801 - Capability not supported.
26261847f8eSopenharmony_ci   * @throws { BusinessError } 2900001 - Service stopped.
26361847f8eSopenharmony_ci   * @throws { BusinessError } 2900003 - Bluetooth disabled.
26461847f8eSopenharmony_ci   * @throws { BusinessError } 2900099 - Operation failed.
26561847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
26661847f8eSopenharmony_ci   * @crossplatform
26761847f8eSopenharmony_ci   * @atomicservice
26861847f8eSopenharmony_ci   * @since 13
26961847f8eSopenharmony_ci   */
27061847f8eSopenharmony_ci  function stopBLEScan(): void;
27161847f8eSopenharmony_ci
27261847f8eSopenharmony_ci  /**
27361847f8eSopenharmony_ci   * Starts BLE advertising.
27461847f8eSopenharmony_ci   *
27561847f8eSopenharmony_ci   * @permission ohos.permission.ACCESS_BLUETOOTH
27661847f8eSopenharmony_ci   * @param { AdvertiseSetting } setting - Indicates the settings for BLE advertising.
27761847f8eSopenharmony_ci   * @param { AdvertiseData } advData - Indicates the advertising data.
27861847f8eSopenharmony_ci   * @param { AdvertiseData } advResponse - Indicates the scan response associated with the advertising data.
27961847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
28061847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
28161847f8eSopenharmony_ci   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
28261847f8eSopenharmony_ci   * @throws { BusinessError } 801 - Capability not supported.
28361847f8eSopenharmony_ci   * @throws { BusinessError } 2900001 - Service stopped.
28461847f8eSopenharmony_ci   * @throws { BusinessError } 2900003 - Bluetooth disabled.
28561847f8eSopenharmony_ci   * @throws { BusinessError } 2900099 - Operation failed.
28661847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
28761847f8eSopenharmony_ci   * @since 10
28861847f8eSopenharmony_ci   */
28961847f8eSopenharmony_ci  /**
29061847f8eSopenharmony_ci   * Starts BLE advertising.
29161847f8eSopenharmony_ci   *
29261847f8eSopenharmony_ci   * @permission ohos.permission.ACCESS_BLUETOOTH
29361847f8eSopenharmony_ci   * @param { AdvertiseSetting } setting - Indicates the settings for BLE advertising.
29461847f8eSopenharmony_ci   * @param { AdvertiseData } advData - Indicates the advertising data.
29561847f8eSopenharmony_ci   * @param { AdvertiseData } advResponse - Indicates the scan response associated with the advertising data.
29661847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
29761847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
29861847f8eSopenharmony_ci   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
29961847f8eSopenharmony_ci   * @throws { BusinessError } 801 - Capability not supported.
30061847f8eSopenharmony_ci   * @throws { BusinessError } 2900001 - Service stopped.
30161847f8eSopenharmony_ci   * @throws { BusinessError } 2900003 - Bluetooth disabled.
30261847f8eSopenharmony_ci   * @throws { BusinessError } 2900099 - Operation failed.
30361847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
30461847f8eSopenharmony_ci   * @atomicservice
30561847f8eSopenharmony_ci   * @since 12
30661847f8eSopenharmony_ci   */
30761847f8eSopenharmony_ci  /**
30861847f8eSopenharmony_ci   * Starts BLE advertising.
30961847f8eSopenharmony_ci   *
31061847f8eSopenharmony_ci   * @permission ohos.permission.ACCESS_BLUETOOTH
31161847f8eSopenharmony_ci   * @param { AdvertiseSetting } setting - Indicates the settings for BLE advertising.
31261847f8eSopenharmony_ci   * @param { AdvertiseData } advData - Indicates the advertising data.
31361847f8eSopenharmony_ci   * @param { AdvertiseData } advResponse - Indicates the scan response associated with the advertising data.
31461847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
31561847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
31661847f8eSopenharmony_ci   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
31761847f8eSopenharmony_ci   * @throws { BusinessError } 801 - Capability not supported.
31861847f8eSopenharmony_ci   * @throws { BusinessError } 2900001 - Service stopped.
31961847f8eSopenharmony_ci   * @throws { BusinessError } 2900003 - Bluetooth disabled.
32061847f8eSopenharmony_ci   * @throws { BusinessError } 2900099 - Operation failed.
32161847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
32261847f8eSopenharmony_ci   * @crossplatform
32361847f8eSopenharmony_ci   * @atomicservice
32461847f8eSopenharmony_ci   * @since 13
32561847f8eSopenharmony_ci   */
32661847f8eSopenharmony_ci  function startAdvertising(setting: AdvertiseSetting, advData: AdvertiseData, advResponse?: AdvertiseData): void;
32761847f8eSopenharmony_ci
32861847f8eSopenharmony_ci  /**
32961847f8eSopenharmony_ci   * Stops BLE advertising.
33061847f8eSopenharmony_ci   *
33161847f8eSopenharmony_ci   * @permission ohos.permission.ACCESS_BLUETOOTH
33261847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
33361847f8eSopenharmony_ci   * @throws { BusinessError } 801 - Capability not supported.
33461847f8eSopenharmony_ci   * @throws { BusinessError } 2900001 - Service stopped.
33561847f8eSopenharmony_ci   * @throws { BusinessError } 2900003 - Bluetooth disabled.
33661847f8eSopenharmony_ci   * @throws { BusinessError } 2900099 - Operation failed.
33761847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
33861847f8eSopenharmony_ci   * @since 10
33961847f8eSopenharmony_ci   */
34061847f8eSopenharmony_ci  /**
34161847f8eSopenharmony_ci   * Stops BLE advertising.
34261847f8eSopenharmony_ci   *
34361847f8eSopenharmony_ci   * @permission ohos.permission.ACCESS_BLUETOOTH
34461847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
34561847f8eSopenharmony_ci   * @throws { BusinessError } 801 - Capability not supported.
34661847f8eSopenharmony_ci   * @throws { BusinessError } 2900001 - Service stopped.
34761847f8eSopenharmony_ci   * @throws { BusinessError } 2900003 - Bluetooth disabled.
34861847f8eSopenharmony_ci   * @throws { BusinessError } 2900099 - Operation failed.
34961847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
35061847f8eSopenharmony_ci   * @atomicservice
35161847f8eSopenharmony_ci   * @since 12
35261847f8eSopenharmony_ci   */
35361847f8eSopenharmony_ci  /**
35461847f8eSopenharmony_ci   * Stops BLE advertising.
35561847f8eSopenharmony_ci   *
35661847f8eSopenharmony_ci   * @permission ohos.permission.ACCESS_BLUETOOTH
35761847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
35861847f8eSopenharmony_ci   * @throws { BusinessError } 801 - Capability not supported.
35961847f8eSopenharmony_ci   * @throws { BusinessError } 2900001 - Service stopped.
36061847f8eSopenharmony_ci   * @throws { BusinessError } 2900003 - Bluetooth disabled.
36161847f8eSopenharmony_ci   * @throws { BusinessError } 2900099 - Operation failed.
36261847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
36361847f8eSopenharmony_ci   * @crossplatform
36461847f8eSopenharmony_ci   * @atomicservice
36561847f8eSopenharmony_ci   * @since 13
36661847f8eSopenharmony_ci   */
36761847f8eSopenharmony_ci  function stopAdvertising(): void;
36861847f8eSopenharmony_ci
36961847f8eSopenharmony_ci  /**
37061847f8eSopenharmony_ci   * Starts BLE advertising.
37161847f8eSopenharmony_ci   * The API returns a advertising ID. The ID can be used to temporarily enable or disable this advertising
37261847f8eSopenharmony_ci   * using the API {@link enableAdvertising} or {@link disableAdvertising}.
37361847f8eSopenharmony_ci   * To completely stop the advertising corresponding to the ID, invoke the API {@link stopAdvertising} with ID.
37461847f8eSopenharmony_ci   *
37561847f8eSopenharmony_ci   * @permission ohos.permission.ACCESS_BLUETOOTH
37661847f8eSopenharmony_ci   * @param { AdvertisingParams } advertisingParams - Indicates the params for BLE advertising.
37761847f8eSopenharmony_ci   * @param { AsyncCallback<number> } callback - the callback of advertise ID.
37861847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
37961847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
38061847f8eSopenharmony_ci   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
38161847f8eSopenharmony_ci   * @throws { BusinessError } 801 - Capability not supported.
38261847f8eSopenharmony_ci   * @throws { BusinessError } 2900001 - Service stopped.
38361847f8eSopenharmony_ci   * @throws { BusinessError } 2900003 - Bluetooth disabled.
38461847f8eSopenharmony_ci   * @throws { BusinessError } 2900099 - Operation failed.
38561847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
38661847f8eSopenharmony_ci   * @since 11
38761847f8eSopenharmony_ci   */
38861847f8eSopenharmony_ci  /**
38961847f8eSopenharmony_ci   * Starts BLE advertising.
39061847f8eSopenharmony_ci   * The API returns a advertising ID. The ID can be used to temporarily enable or disable this advertising
39161847f8eSopenharmony_ci   * using the API {@link enableAdvertising} or {@link disableAdvertising}.
39261847f8eSopenharmony_ci   * To completely stop the advertising corresponding to the ID, invoke the API {@link stopAdvertising} with ID.
39361847f8eSopenharmony_ci   *
39461847f8eSopenharmony_ci   * @permission ohos.permission.ACCESS_BLUETOOTH
39561847f8eSopenharmony_ci   * @param { AdvertisingParams } advertisingParams - Indicates the params for BLE advertising.
39661847f8eSopenharmony_ci   * @param { AsyncCallback<number> } callback - the callback of advertise ID.
39761847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
39861847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
39961847f8eSopenharmony_ci   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
40061847f8eSopenharmony_ci   * @throws { BusinessError } 801 - Capability not supported.
40161847f8eSopenharmony_ci   * @throws { BusinessError } 2900001 - Service stopped.
40261847f8eSopenharmony_ci   * @throws { BusinessError } 2900003 - Bluetooth disabled.
40361847f8eSopenharmony_ci   * @throws { BusinessError } 2900099 - Operation failed.
40461847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
40561847f8eSopenharmony_ci   * @crossplatform
40661847f8eSopenharmony_ci   * @since 13
40761847f8eSopenharmony_ci   */
40861847f8eSopenharmony_ci  function startAdvertising(advertisingParams: AdvertisingParams, callback: AsyncCallback<number>): void;
40961847f8eSopenharmony_ci
41061847f8eSopenharmony_ci  /**
41161847f8eSopenharmony_ci   * Starts BLE advertising.
41261847f8eSopenharmony_ci   * The API returns a advertising ID. The ID can be used to temporarily enable or disable this advertising
41361847f8eSopenharmony_ci   * using the API {@link enableAdvertising} or {@link disableAdvertising}.
41461847f8eSopenharmony_ci   * To completely stop the advertising corresponding to the ID, invoke the API {@link stopAdvertising} with ID.
41561847f8eSopenharmony_ci   *
41661847f8eSopenharmony_ci   * @permission ohos.permission.ACCESS_BLUETOOTH
41761847f8eSopenharmony_ci   * @param { AdvertisingParams } advertisingParams - Indicates the param for BLE advertising.
41861847f8eSopenharmony_ci   * @returns { Promise<number> } Returns the promise object.
41961847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
42061847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
42161847f8eSopenharmony_ci   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
42261847f8eSopenharmony_ci   * @throws { BusinessError } 801 - Capability not supported.
42361847f8eSopenharmony_ci   * @throws { BusinessError } 2900001 - Service stopped.
42461847f8eSopenharmony_ci   * @throws { BusinessError } 2900003 - Bluetooth disabled.
42561847f8eSopenharmony_ci   * @throws { BusinessError } 2900099 - Operation failed.
42661847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
42761847f8eSopenharmony_ci   * @since 11
42861847f8eSopenharmony_ci   */
42961847f8eSopenharmony_ci  /**
43061847f8eSopenharmony_ci   * Starts BLE advertising.
43161847f8eSopenharmony_ci   * The API returns a advertising ID. The ID can be used to temporarily enable or disable this advertising
43261847f8eSopenharmony_ci   * using the API {@link enableAdvertising} or {@link disableAdvertising}.
43361847f8eSopenharmony_ci   * To completely stop the advertising corresponding to the ID, invoke the API {@link stopAdvertising} with ID.
43461847f8eSopenharmony_ci   *
43561847f8eSopenharmony_ci   * @permission ohos.permission.ACCESS_BLUETOOTH
43661847f8eSopenharmony_ci   * @param { AdvertisingParams } advertisingParams - Indicates the param for BLE advertising.
43761847f8eSopenharmony_ci   * @returns { Promise<number> } Returns the promise object.
43861847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
43961847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
44061847f8eSopenharmony_ci   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
44161847f8eSopenharmony_ci   * @throws { BusinessError } 801 - Capability not supported.
44261847f8eSopenharmony_ci   * @throws { BusinessError } 2900001 - Service stopped.
44361847f8eSopenharmony_ci   * @throws { BusinessError } 2900003 - Bluetooth disabled.
44461847f8eSopenharmony_ci   * @throws { BusinessError } 2900099 - Operation failed.
44561847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
44661847f8eSopenharmony_ci   * @crossplatform
44761847f8eSopenharmony_ci   * @since 13
44861847f8eSopenharmony_ci   */
44961847f8eSopenharmony_ci  function startAdvertising(advertisingParams: AdvertisingParams): Promise<number>;
45061847f8eSopenharmony_ci
45161847f8eSopenharmony_ci  /**
45261847f8eSopenharmony_ci   * Enable the advertising with a specific ID temporarily.
45361847f8eSopenharmony_ci   *
45461847f8eSopenharmony_ci   * @permission ohos.permission.ACCESS_BLUETOOTH
45561847f8eSopenharmony_ci   * @param { AdvertisingEnableParams } advertisingEnableParams - Indicates the params for enable advertising.
45661847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - the callback result.
45761847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
45861847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
45961847f8eSopenharmony_ci   * <br>2. Incorrect parameter types.
46061847f8eSopenharmony_ci   * @throws { BusinessError } 801 - Capability not supported.
46161847f8eSopenharmony_ci   * @throws { BusinessError } 2900001 - Service stopped.
46261847f8eSopenharmony_ci   * @throws { BusinessError } 2900003 - Bluetooth disabled.
46361847f8eSopenharmony_ci   * @throws { BusinessError } 2900099 - Operation failed.
46461847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
46561847f8eSopenharmony_ci   * @since 11
46661847f8eSopenharmony_ci   */
46761847f8eSopenharmony_ci  function enableAdvertising(advertisingEnableParams: AdvertisingEnableParams, callback: AsyncCallback<void>): void;
46861847f8eSopenharmony_ci
46961847f8eSopenharmony_ci  /**
47061847f8eSopenharmony_ci   * Enable the advertising with a specific ID temporarily.
47161847f8eSopenharmony_ci   *
47261847f8eSopenharmony_ci   * @permission ohos.permission.ACCESS_BLUETOOTH
47361847f8eSopenharmony_ci   * @param { AdvertisingEnableParams } advertisingEnableParams - Indicates the params for enable advertising.
47461847f8eSopenharmony_ci   * @returns { Promise<void> } Returns the promise object.
47561847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
47661847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
47761847f8eSopenharmony_ci   * <br>2. Incorrect parameter types.
47861847f8eSopenharmony_ci   * @throws { BusinessError } 801 - Capability not supported.
47961847f8eSopenharmony_ci   * @throws { BusinessError } 2900001 - Service stopped.
48061847f8eSopenharmony_ci   * @throws { BusinessError } 2900003 - Bluetooth disabled.
48161847f8eSopenharmony_ci   * @throws { BusinessError } 2900099 - Operation failed.
48261847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
48361847f8eSopenharmony_ci   * @since 11
48461847f8eSopenharmony_ci   */
48561847f8eSopenharmony_ci  function enableAdvertising(advertisingEnableParams: AdvertisingEnableParams): Promise<void>;
48661847f8eSopenharmony_ci
48761847f8eSopenharmony_ci  /**
48861847f8eSopenharmony_ci   * Disable the advertising with a specific ID temporarily.
48961847f8eSopenharmony_ci   *
49061847f8eSopenharmony_ci   * @permission ohos.permission.ACCESS_BLUETOOTH
49161847f8eSopenharmony_ci   * @param { AdvertisingDisableParams } advertisingDisableParams - Indicates the params for disable advertising.
49261847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - the callback result.
49361847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
49461847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
49561847f8eSopenharmony_ci   * <br>2. Incorrect parameter types.
49661847f8eSopenharmony_ci   * @throws { BusinessError } 801 - Capability not supported.
49761847f8eSopenharmony_ci   * @throws { BusinessError } 2900001 - Service stopped.
49861847f8eSopenharmony_ci   * @throws { BusinessError } 2900003 - Bluetooth disabled.
49961847f8eSopenharmony_ci   * @throws { BusinessError } 2900099 - Operation failed.
50061847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
50161847f8eSopenharmony_ci   * @since 11
50261847f8eSopenharmony_ci   */
50361847f8eSopenharmony_ci  function disableAdvertising(advertisingDisableParams: AdvertisingDisableParams, callback: AsyncCallback<void>): void;
50461847f8eSopenharmony_ci
50561847f8eSopenharmony_ci  /**
50661847f8eSopenharmony_ci   * Disable the advertising with a specific ID temporarily.
50761847f8eSopenharmony_ci   *
50861847f8eSopenharmony_ci   * @permission ohos.permission.ACCESS_BLUETOOTH
50961847f8eSopenharmony_ci   * @param { AdvertisingDisableParams } advertisingDisableParams - Indicates the params for disable advertising.
51061847f8eSopenharmony_ci   * @returns { Promise<void> } Returns the promise object.
51161847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
51261847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
51361847f8eSopenharmony_ci   * <br>2. Incorrect parameter types.
51461847f8eSopenharmony_ci   * @throws { BusinessError } 801 - Capability not supported.
51561847f8eSopenharmony_ci   * @throws { BusinessError } 2900001 - Service stopped.
51661847f8eSopenharmony_ci   * @throws { BusinessError } 2900003 - Bluetooth disabled.
51761847f8eSopenharmony_ci   * @throws { BusinessError } 2900099 - Operation failed.
51861847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
51961847f8eSopenharmony_ci   * @since 11
52061847f8eSopenharmony_ci   */
52161847f8eSopenharmony_ci  function disableAdvertising(advertisingDisableParams: AdvertisingDisableParams): Promise<void>;
52261847f8eSopenharmony_ci
52361847f8eSopenharmony_ci  /**
52461847f8eSopenharmony_ci   * Stops BLE advertising.
52561847f8eSopenharmony_ci   * Completely stop the advertising corresponding to the ID.
52661847f8eSopenharmony_ci   *
52761847f8eSopenharmony_ci   * @permission ohos.permission.ACCESS_BLUETOOTH
52861847f8eSopenharmony_ci   * @param { number } advertisingId - Indicates the ID for this BLE advertising.
52961847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - the callback result.
53061847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
53161847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
53261847f8eSopenharmony_ci   * <br>2. Incorrect parameter types.
53361847f8eSopenharmony_ci   * @throws { BusinessError } 801 - Capability not supported.
53461847f8eSopenharmony_ci   * @throws { BusinessError } 2900001 - Service stopped.
53561847f8eSopenharmony_ci   * @throws { BusinessError } 2900003 - Bluetooth disabled.
53661847f8eSopenharmony_ci   * @throws { BusinessError } 2900099 - Operation failed.
53761847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
53861847f8eSopenharmony_ci   * @since 11
53961847f8eSopenharmony_ci   */
54061847f8eSopenharmony_ci  /**
54161847f8eSopenharmony_ci   * Stops BLE advertising.
54261847f8eSopenharmony_ci   * Completely stop the advertising corresponding to the ID.
54361847f8eSopenharmony_ci   *
54461847f8eSopenharmony_ci   * @permission ohos.permission.ACCESS_BLUETOOTH
54561847f8eSopenharmony_ci   * @param { number } advertisingId - Indicates the ID for this BLE advertising.
54661847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - the callback result.
54761847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
54861847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
54961847f8eSopenharmony_ci   * <br>2. Incorrect parameter types.
55061847f8eSopenharmony_ci   * @throws { BusinessError } 801 - Capability not supported.
55161847f8eSopenharmony_ci   * @throws { BusinessError } 2900001 - Service stopped.
55261847f8eSopenharmony_ci   * @throws { BusinessError } 2900003 - Bluetooth disabled.
55361847f8eSopenharmony_ci   * @throws { BusinessError } 2900099 - Operation failed.
55461847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
55561847f8eSopenharmony_ci   * @crossplatform
55661847f8eSopenharmony_ci   * @since 13
55761847f8eSopenharmony_ci   */
55861847f8eSopenharmony_ci  function stopAdvertising(advertisingId: number, callback: AsyncCallback<void>): void;
55961847f8eSopenharmony_ci
56061847f8eSopenharmony_ci  /**
56161847f8eSopenharmony_ci   * Stops BLE advertising.
56261847f8eSopenharmony_ci   * Completely stop the advertising corresponding to the ID.
56361847f8eSopenharmony_ci   *
56461847f8eSopenharmony_ci   * @permission ohos.permission.ACCESS_BLUETOOTH
56561847f8eSopenharmony_ci   * @param { number } advertisingId - Indicates the ID for this BLE advertising.
56661847f8eSopenharmony_ci   * @returns { Promise<void> } Returns the promise object.
56761847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
56861847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
56961847f8eSopenharmony_ci   * <br>2. Incorrect parameter types.
57061847f8eSopenharmony_ci   * @throws { BusinessError } 801 - Capability not supported.
57161847f8eSopenharmony_ci   * @throws { BusinessError } 2900001 - Service stopped.
57261847f8eSopenharmony_ci   * @throws { BusinessError } 2900003 - Bluetooth disabled.
57361847f8eSopenharmony_ci   * @throws { BusinessError } 2900099 - Operation failed.
57461847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
57561847f8eSopenharmony_ci   * @since 11
57661847f8eSopenharmony_ci   */
57761847f8eSopenharmony_ci  /**
57861847f8eSopenharmony_ci   * Stops BLE advertising.
57961847f8eSopenharmony_ci   * Completely stop the advertising corresponding to the ID.
58061847f8eSopenharmony_ci   *
58161847f8eSopenharmony_ci   * @permission ohos.permission.ACCESS_BLUETOOTH
58261847f8eSopenharmony_ci   * @param { number } advertisingId - Indicates the ID for this BLE advertising.
58361847f8eSopenharmony_ci   * @returns { Promise<void> } Returns the promise object.
58461847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
58561847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
58661847f8eSopenharmony_ci   * <br>2. Incorrect parameter types.
58761847f8eSopenharmony_ci   * @throws { BusinessError } 801 - Capability not supported.
58861847f8eSopenharmony_ci   * @throws { BusinessError } 2900001 - Service stopped.
58961847f8eSopenharmony_ci   * @throws { BusinessError } 2900003 - Bluetooth disabled.
59061847f8eSopenharmony_ci   * @throws { BusinessError } 2900099 - Operation failed.
59161847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
59261847f8eSopenharmony_ci   * @crossplatform
59361847f8eSopenharmony_ci   * @since 13
59461847f8eSopenharmony_ci   */
59561847f8eSopenharmony_ci  function stopAdvertising(advertisingId: number): Promise<void>;
59661847f8eSopenharmony_ci
59761847f8eSopenharmony_ci  /**
59861847f8eSopenharmony_ci   * Subscribing to advertising state change event.
59961847f8eSopenharmony_ci   *
60061847f8eSopenharmony_ci   * @permission ohos.permission.ACCESS_BLUETOOTH
60161847f8eSopenharmony_ci   * @param { 'advertisingStateChange' } type - Type of the advertising state to listen for.
60261847f8eSopenharmony_ci   * @param { Callback<AdvertisingStateChangeInfo> } callback - Callback used to listen for the advertising state.
60361847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
60461847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
60561847f8eSopenharmony_ci   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
60661847f8eSopenharmony_ci   * @throws { BusinessError } 801 - Capability not supported.
60761847f8eSopenharmony_ci   * @throws { BusinessError } 2900099 - Operation failed.
60861847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
60961847f8eSopenharmony_ci   * @since 11
61061847f8eSopenharmony_ci   */
61161847f8eSopenharmony_ci  /**
61261847f8eSopenharmony_ci   * Subscribing to advertising state change event.
61361847f8eSopenharmony_ci   *
61461847f8eSopenharmony_ci   * @permission ohos.permission.ACCESS_BLUETOOTH
61561847f8eSopenharmony_ci   * @param { 'advertisingStateChange' } type - Type of the advertising state to listen for.
61661847f8eSopenharmony_ci   * @param { Callback<AdvertisingStateChangeInfo> } callback - Callback used to listen for the advertising state.
61761847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
61861847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
61961847f8eSopenharmony_ci   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
62061847f8eSopenharmony_ci   * @throws { BusinessError } 801 - Capability not supported.
62161847f8eSopenharmony_ci   * @throws { BusinessError } 2900099 - Operation failed.
62261847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
62361847f8eSopenharmony_ci   * @crossplatform
62461847f8eSopenharmony_ci   * @since 13
62561847f8eSopenharmony_ci   */
62661847f8eSopenharmony_ci  function on(type: 'advertisingStateChange', callback: Callback<AdvertisingStateChangeInfo>): void;
62761847f8eSopenharmony_ci
62861847f8eSopenharmony_ci  /**
62961847f8eSopenharmony_ci   * Unsubscribe from advertising state change event.
63061847f8eSopenharmony_ci   *
63161847f8eSopenharmony_ci   * @permission ohos.permission.ACCESS_BLUETOOTH
63261847f8eSopenharmony_ci   * @param { 'advertisingStateChange' } type - Type of the advertising state to listen for.
63361847f8eSopenharmony_ci   * @param { Callback<AdvertisingStateChangeInfo> } callback - Callback used to listen for the advertising state.
63461847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
63561847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
63661847f8eSopenharmony_ci   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
63761847f8eSopenharmony_ci   * @throws { BusinessError } 801 - Capability not supported.
63861847f8eSopenharmony_ci   * @throws { BusinessError } 2900099 - Operation failed.
63961847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
64061847f8eSopenharmony_ci   * @since 11
64161847f8eSopenharmony_ci   */
64261847f8eSopenharmony_ci  /**
64361847f8eSopenharmony_ci   * Unsubscribe from advertising state change event.
64461847f8eSopenharmony_ci   *
64561847f8eSopenharmony_ci   * @permission ohos.permission.ACCESS_BLUETOOTH
64661847f8eSopenharmony_ci   * @param { 'advertisingStateChange' } type - Type of the advertising state to listen for.
64761847f8eSopenharmony_ci   * @param { Callback<AdvertisingStateChangeInfo> } callback - Callback used to listen for the advertising state.
64861847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
64961847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
65061847f8eSopenharmony_ci   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
65161847f8eSopenharmony_ci   * @throws { BusinessError } 801 - Capability not supported.
65261847f8eSopenharmony_ci   * @throws { BusinessError } 2900099 - Operation failed.
65361847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
65461847f8eSopenharmony_ci   * @crossplatform
65561847f8eSopenharmony_ci   * @since 13
65661847f8eSopenharmony_ci   */
65761847f8eSopenharmony_ci  function off(type: 'advertisingStateChange', callback?: Callback<AdvertisingStateChangeInfo>): void;
65861847f8eSopenharmony_ci
65961847f8eSopenharmony_ci  /**
66061847f8eSopenharmony_ci   * Subscribe BLE scan result.
66161847f8eSopenharmony_ci   *
66261847f8eSopenharmony_ci   * @permission ohos.permission.ACCESS_BLUETOOTH
66361847f8eSopenharmony_ci   * @param { 'BLEDeviceFind' } type - Type of the scan result event to listen for.
66461847f8eSopenharmony_ci   * @param { Callback<Array<ScanResult>> } callback - Callback used to listen for the scan result event.
66561847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
66661847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
66761847f8eSopenharmony_ci   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
66861847f8eSopenharmony_ci   * @throws { BusinessError } 801 - Capability not supported.
66961847f8eSopenharmony_ci   * @throws { BusinessError } 2900099 - Operation failed.
67061847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
67161847f8eSopenharmony_ci   * @since 10
67261847f8eSopenharmony_ci   */
67361847f8eSopenharmony_ci  /**
67461847f8eSopenharmony_ci   * Subscribe BLE scan result.
67561847f8eSopenharmony_ci   *
67661847f8eSopenharmony_ci   * @permission ohos.permission.ACCESS_BLUETOOTH
67761847f8eSopenharmony_ci   * @param { 'BLEDeviceFind' } type - Type of the scan result event to listen for.
67861847f8eSopenharmony_ci   * @param { Callback<Array<ScanResult>> } callback - Callback used to listen for the scan result event.
67961847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
68061847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
68161847f8eSopenharmony_ci   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
68261847f8eSopenharmony_ci   * @throws { BusinessError } 801 - Capability not supported.
68361847f8eSopenharmony_ci   * @throws { BusinessError } 2900099 - Operation failed.
68461847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
68561847f8eSopenharmony_ci   * @atomicservice
68661847f8eSopenharmony_ci   * @since 12
68761847f8eSopenharmony_ci   */
68861847f8eSopenharmony_ci  /**
68961847f8eSopenharmony_ci   * Subscribe BLE scan result.
69061847f8eSopenharmony_ci   *
69161847f8eSopenharmony_ci   * @permission ohos.permission.ACCESS_BLUETOOTH
69261847f8eSopenharmony_ci   * @param { 'BLEDeviceFind' } type - Type of the scan result event to listen for.
69361847f8eSopenharmony_ci   * @param { Callback<Array<ScanResult>> } callback - Callback used to listen for the scan result event.
69461847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
69561847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
69661847f8eSopenharmony_ci   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
69761847f8eSopenharmony_ci   * @throws { BusinessError } 801 - Capability not supported.
69861847f8eSopenharmony_ci   * @throws { BusinessError } 2900099 - Operation failed.
69961847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
70061847f8eSopenharmony_ci   * @crossplatform
70161847f8eSopenharmony_ci   * @atomicservice
70261847f8eSopenharmony_ci   * @since 13
70361847f8eSopenharmony_ci   */
70461847f8eSopenharmony_ci  function on(type: 'BLEDeviceFind', callback: Callback<Array<ScanResult>>): void;
70561847f8eSopenharmony_ci
70661847f8eSopenharmony_ci  /**
70761847f8eSopenharmony_ci   * Unsubscribe BLE scan result.
70861847f8eSopenharmony_ci   *
70961847f8eSopenharmony_ci   * @permission ohos.permission.ACCESS_BLUETOOTH
71061847f8eSopenharmony_ci   * @param { 'BLEDeviceFind' } type - Type of the scan result event to listen for.
71161847f8eSopenharmony_ci   * @param { Callback<Array<ScanResult>> } callback - Callback used to listen for the scan result event.
71261847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
71361847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
71461847f8eSopenharmony_ci   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
71561847f8eSopenharmony_ci   * @throws { BusinessError } 801 - Capability not supported.
71661847f8eSopenharmony_ci   * @throws { BusinessError } 2900099 - Operation failed.
71761847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
71861847f8eSopenharmony_ci   * @since 10
71961847f8eSopenharmony_ci   */
72061847f8eSopenharmony_ci  /**
72161847f8eSopenharmony_ci   * Unsubscribe BLE scan result.
72261847f8eSopenharmony_ci   *
72361847f8eSopenharmony_ci   * @permission ohos.permission.ACCESS_BLUETOOTH
72461847f8eSopenharmony_ci   * @param { 'BLEDeviceFind' } type - Type of the scan result event to listen for.
72561847f8eSopenharmony_ci   * @param { Callback<Array<ScanResult>> } callback - Callback used to listen for the scan result event.
72661847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
72761847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
72861847f8eSopenharmony_ci   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
72961847f8eSopenharmony_ci   * @throws { BusinessError } 801 - Capability not supported.
73061847f8eSopenharmony_ci   * @throws { BusinessError } 2900099 - Operation failed.
73161847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
73261847f8eSopenharmony_ci   * @atomicservice
73361847f8eSopenharmony_ci   * @since 12
73461847f8eSopenharmony_ci   */
73561847f8eSopenharmony_ci  /**
73661847f8eSopenharmony_ci   * Unsubscribe BLE scan result.
73761847f8eSopenharmony_ci   *
73861847f8eSopenharmony_ci   * @permission ohos.permission.ACCESS_BLUETOOTH
73961847f8eSopenharmony_ci   * @param { 'BLEDeviceFind' } type - Type of the scan result event to listen for.
74061847f8eSopenharmony_ci   * @param { Callback<Array<ScanResult>> } callback - Callback used to listen for the scan result event.
74161847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permission denied.
74261847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
74361847f8eSopenharmony_ci   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
74461847f8eSopenharmony_ci   * @throws { BusinessError } 801 - Capability not supported.
74561847f8eSopenharmony_ci   * @throws { BusinessError } 2900099 - Operation failed.
74661847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
74761847f8eSopenharmony_ci   * @crossplatform
74861847f8eSopenharmony_ci   * @atomicservice
74961847f8eSopenharmony_ci   * @since 13
75061847f8eSopenharmony_ci   */
75161847f8eSopenharmony_ci  function off(type: 'BLEDeviceFind', callback?: Callback<Array<ScanResult>>): void;
75261847f8eSopenharmony_ci
75361847f8eSopenharmony_ci  /**
75461847f8eSopenharmony_ci   * Manages GATT server. Before calling an Gatt server method, you must use {@link createGattServer} to create an GattServer instance.
75561847f8eSopenharmony_ci   *
75661847f8eSopenharmony_ci   * @typedef GattServer
75761847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
75861847f8eSopenharmony_ci   * @since 10
75961847f8eSopenharmony_ci   */
76061847f8eSopenharmony_ci  /**
76161847f8eSopenharmony_ci   * Manages GATT server. Before calling an Gatt server method, you must use {@link createGattServer} to create an GattServer instance.
76261847f8eSopenharmony_ci   *
76361847f8eSopenharmony_ci   * @typedef GattServer
76461847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
76561847f8eSopenharmony_ci   * @atomicservice
76661847f8eSopenharmony_ci   * @since 12
76761847f8eSopenharmony_ci   */
76861847f8eSopenharmony_ci  /**
76961847f8eSopenharmony_ci   * Manages GATT server. Before calling an Gatt server method, you must use {@link createGattServer} to create an GattServer instance.
77061847f8eSopenharmony_ci   *
77161847f8eSopenharmony_ci   * @typedef GattServer
77261847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
77361847f8eSopenharmony_ci   * @crossplatform
77461847f8eSopenharmony_ci   * @atomicservice
77561847f8eSopenharmony_ci   * @since 13
77661847f8eSopenharmony_ci   */
77761847f8eSopenharmony_ci  interface GattServer {
77861847f8eSopenharmony_ci    /**
77961847f8eSopenharmony_ci     * Adds a specified service to be hosted.
78061847f8eSopenharmony_ci     * <p>The added service and its characteristics are provided by the local device.
78161847f8eSopenharmony_ci     *
78261847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
78361847f8eSopenharmony_ci     * @param { GattService } service - Indicates the service to add.
78461847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
78561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
78661847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
78761847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
78861847f8eSopenharmony_ci     * @throws { BusinessError } 2900001 - Service stopped.
78961847f8eSopenharmony_ci     * @throws { BusinessError } 2900003 - Bluetooth disabled.
79061847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
79161847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
79261847f8eSopenharmony_ci     * @since 10
79361847f8eSopenharmony_ci     */
79461847f8eSopenharmony_ci    /**
79561847f8eSopenharmony_ci     * Adds a specified service to be hosted.
79661847f8eSopenharmony_ci     * <p>The added service and its characteristics are provided by the local device.
79761847f8eSopenharmony_ci     *
79861847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
79961847f8eSopenharmony_ci     * @param { GattService } service - Indicates the service to add.
80061847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
80161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
80261847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
80361847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
80461847f8eSopenharmony_ci     * @throws { BusinessError } 2900001 - Service stopped.
80561847f8eSopenharmony_ci     * @throws { BusinessError } 2900003 - Bluetooth disabled.
80661847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
80761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
80861847f8eSopenharmony_ci     * @atomicservice
80961847f8eSopenharmony_ci     * @since 12
81061847f8eSopenharmony_ci     */
81161847f8eSopenharmony_ci    /**
81261847f8eSopenharmony_ci     * Adds a specified service to be hosted.
81361847f8eSopenharmony_ci     * <p>The added service and its characteristics are provided by the local device.
81461847f8eSopenharmony_ci     *
81561847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
81661847f8eSopenharmony_ci     * @param { GattService } service - Indicates the service to add.
81761847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
81861847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
81961847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
82061847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
82161847f8eSopenharmony_ci     * @throws { BusinessError } 2900001 - Service stopped.
82261847f8eSopenharmony_ci     * @throws { BusinessError } 2900003 - Bluetooth disabled.
82361847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
82461847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
82561847f8eSopenharmony_ci     * @crossplatform
82661847f8eSopenharmony_ci     * @atomicservice
82761847f8eSopenharmony_ci     * @since 13
82861847f8eSopenharmony_ci     */
82961847f8eSopenharmony_ci    addService(service: GattService): void;
83061847f8eSopenharmony_ci
83161847f8eSopenharmony_ci    /**
83261847f8eSopenharmony_ci     * Removes a specified service from the list of GATT services provided by this device.
83361847f8eSopenharmony_ci     *
83461847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
83561847f8eSopenharmony_ci     * @param { string } serviceUuid - Indicates the UUID of the service to remove.
83661847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
83761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
83861847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
83961847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
84061847f8eSopenharmony_ci     * @throws { BusinessError } 2900001 - Service stopped.
84161847f8eSopenharmony_ci     * @throws { BusinessError } 2900003 - Bluetooth disabled.
84261847f8eSopenharmony_ci     * @throws { BusinessError } 2900004 - Profile not supported.
84361847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
84461847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
84561847f8eSopenharmony_ci     * @since 10
84661847f8eSopenharmony_ci     */
84761847f8eSopenharmony_ci    /**
84861847f8eSopenharmony_ci     * Removes a specified service from the list of GATT services provided by this device.
84961847f8eSopenharmony_ci     *
85061847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
85161847f8eSopenharmony_ci     * @param { string } serviceUuid - Indicates the UUID of the service to remove.
85261847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
85361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
85461847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
85561847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
85661847f8eSopenharmony_ci     * @throws { BusinessError } 2900001 - Service stopped.
85761847f8eSopenharmony_ci     * @throws { BusinessError } 2900003 - Bluetooth disabled.
85861847f8eSopenharmony_ci     * @throws { BusinessError } 2900004 - Profile not supported.
85961847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
86061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
86161847f8eSopenharmony_ci     * @atomicservice
86261847f8eSopenharmony_ci     * @since 12
86361847f8eSopenharmony_ci     */
86461847f8eSopenharmony_ci    /**
86561847f8eSopenharmony_ci     * Removes a specified service from the list of GATT services provided by this device.
86661847f8eSopenharmony_ci     *
86761847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
86861847f8eSopenharmony_ci     * @param { string } serviceUuid - Indicates the UUID of the service to remove.
86961847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
87061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
87161847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
87261847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
87361847f8eSopenharmony_ci     * @throws { BusinessError } 2900001 - Service stopped.
87461847f8eSopenharmony_ci     * @throws { BusinessError } 2900003 - Bluetooth disabled.
87561847f8eSopenharmony_ci     * @throws { BusinessError } 2900004 - Profile not supported.
87661847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
87761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
87861847f8eSopenharmony_ci     * @crossplatform
87961847f8eSopenharmony_ci     * @atomicservice
88061847f8eSopenharmony_ci     * @since 13
88161847f8eSopenharmony_ci     */
88261847f8eSopenharmony_ci    removeService(serviceUuid: string): void;
88361847f8eSopenharmony_ci
88461847f8eSopenharmony_ci    /**
88561847f8eSopenharmony_ci     * Closes this {@code GattServer} object and unregisters its callbacks.
88661847f8eSopenharmony_ci     *
88761847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
88861847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
88961847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
89061847f8eSopenharmony_ci     * @throws { BusinessError } 2900001 - Service stopped.
89161847f8eSopenharmony_ci     * @throws { BusinessError } 2900003 - Bluetooth disabled.
89261847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
89361847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
89461847f8eSopenharmony_ci     * @since 10
89561847f8eSopenharmony_ci     */
89661847f8eSopenharmony_ci    /**
89761847f8eSopenharmony_ci     * Closes this {@code GattServer} object and unregisters its callbacks.
89861847f8eSopenharmony_ci     *
89961847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
90061847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
90161847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
90261847f8eSopenharmony_ci     * @throws { BusinessError } 2900001 - Service stopped.
90361847f8eSopenharmony_ci     * @throws { BusinessError } 2900003 - Bluetooth disabled.
90461847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
90561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
90661847f8eSopenharmony_ci     * @atomicservice
90761847f8eSopenharmony_ci     * @since 12
90861847f8eSopenharmony_ci     */
90961847f8eSopenharmony_ci    /**
91061847f8eSopenharmony_ci     * Closes this {@code GattServer} object and unregisters its callbacks.
91161847f8eSopenharmony_ci     *
91261847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
91361847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
91461847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
91561847f8eSopenharmony_ci     * @throws { BusinessError } 2900001 - Service stopped.
91661847f8eSopenharmony_ci     * @throws { BusinessError } 2900003 - Bluetooth disabled.
91761847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
91861847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
91961847f8eSopenharmony_ci     * @crossplatform
92061847f8eSopenharmony_ci     * @atomicservice
92161847f8eSopenharmony_ci     * @since 13
92261847f8eSopenharmony_ci     */
92361847f8eSopenharmony_ci    close(): void;
92461847f8eSopenharmony_ci
92561847f8eSopenharmony_ci    /**
92661847f8eSopenharmony_ci     * Sends a notification of a change in a specified local characteristic with a asynchronous callback.
92761847f8eSopenharmony_ci     * <p>This method should be called for every BLE peripheral device that has requested notifications.
92861847f8eSopenharmony_ci     *
92961847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
93061847f8eSopenharmony_ci     * @param { string } deviceId - Indicates device ID. For example, "11:22:33:AA:BB:FF".
93161847f8eSopenharmony_ci     * @param { NotifyCharacteristic } notifyCharacteristic - Indicates the local characteristic that has changed.
93261847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - Callback used to return the result.
93361847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
93461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
93561847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
93661847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
93761847f8eSopenharmony_ci     * @throws { BusinessError } 2900001 - Service stopped.
93861847f8eSopenharmony_ci     * @throws { BusinessError } 2900003 - Bluetooth disabled.
93961847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
94061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
94161847f8eSopenharmony_ci     * @since 10
94261847f8eSopenharmony_ci     */
94361847f8eSopenharmony_ci    /**
94461847f8eSopenharmony_ci     * Sends a notification of a change in a specified local characteristic with a asynchronous callback.
94561847f8eSopenharmony_ci     * <p>This method should be called for every BLE peripheral device that has requested notifications.
94661847f8eSopenharmony_ci     *
94761847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
94861847f8eSopenharmony_ci     * @param { string } deviceId - Indicates device ID. For example, "11:22:33:AA:BB:FF".
94961847f8eSopenharmony_ci     * @param { NotifyCharacteristic } notifyCharacteristic - Indicates the local characteristic that has changed.
95061847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - Callback used to return the result.
95161847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
95261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
95361847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
95461847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
95561847f8eSopenharmony_ci     * @throws { BusinessError } 2900001 - Service stopped.
95661847f8eSopenharmony_ci     * @throws { BusinessError } 2900003 - Bluetooth disabled.
95761847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
95861847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
95961847f8eSopenharmony_ci     * @atomicservice
96061847f8eSopenharmony_ci     * @since 12
96161847f8eSopenharmony_ci     */
96261847f8eSopenharmony_ci    /**
96361847f8eSopenharmony_ci     * Sends a notification of a change in a specified local characteristic with a asynchronous callback.
96461847f8eSopenharmony_ci     * <p>This method should be called for every BLE peripheral device that has requested notifications.
96561847f8eSopenharmony_ci     *
96661847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
96761847f8eSopenharmony_ci     * @param { string } deviceId - Indicates device ID. For example, "11:22:33:AA:BB:FF".
96861847f8eSopenharmony_ci     * @param { NotifyCharacteristic } notifyCharacteristic - Indicates the local characteristic that has changed.
96961847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - Callback used to return the result.
97061847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
97161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
97261847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
97361847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
97461847f8eSopenharmony_ci     * @throws { BusinessError } 2900001 - Service stopped.
97561847f8eSopenharmony_ci     * @throws { BusinessError } 2900003 - Bluetooth disabled.
97661847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
97761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
97861847f8eSopenharmony_ci     * @crossplatform
97961847f8eSopenharmony_ci     * @atomicservice
98061847f8eSopenharmony_ci     * @since 13
98161847f8eSopenharmony_ci     */
98261847f8eSopenharmony_ci    notifyCharacteristicChanged(
98361847f8eSopenharmony_ci      deviceId: string,
98461847f8eSopenharmony_ci      notifyCharacteristic: NotifyCharacteristic,
98561847f8eSopenharmony_ci      callback: AsyncCallback<void>
98661847f8eSopenharmony_ci    ): void;
98761847f8eSopenharmony_ci
98861847f8eSopenharmony_ci    /**
98961847f8eSopenharmony_ci     * Sends a notification of a change in a specified local characteristic with a asynchronous callback.
99061847f8eSopenharmony_ci     * <p>This method should be called for every BLE peripheral device that has requested notifications.
99161847f8eSopenharmony_ci     *
99261847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
99361847f8eSopenharmony_ci     * @param { string } deviceId - Indicates device ID. For example, "11:22:33:AA:BB:FF".
99461847f8eSopenharmony_ci     * @param { NotifyCharacteristic } notifyCharacteristic - Indicates the local characteristic that has changed.
99561847f8eSopenharmony_ci     * @returns { Promise<void> } Promise used to return the result.
99661847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
99761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
99861847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
99961847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
100061847f8eSopenharmony_ci     * @throws { BusinessError } 2900001 - Service stopped.
100161847f8eSopenharmony_ci     * @throws { BusinessError } 2900003 - Bluetooth disabled.
100261847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
100361847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
100461847f8eSopenharmony_ci     * @since 10
100561847f8eSopenharmony_ci     */
100661847f8eSopenharmony_ci    /**
100761847f8eSopenharmony_ci     * Sends a notification of a change in a specified local characteristic with a asynchronous callback.
100861847f8eSopenharmony_ci     * <p>This method should be called for every BLE peripheral device that has requested notifications.
100961847f8eSopenharmony_ci     *
101061847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
101161847f8eSopenharmony_ci     * @param { string } deviceId - Indicates device ID. For example, "11:22:33:AA:BB:FF".
101261847f8eSopenharmony_ci     * @param { NotifyCharacteristic } notifyCharacteristic - Indicates the local characteristic that has changed.
101361847f8eSopenharmony_ci     * @returns { Promise<void> } Promise used to return the result.
101461847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
101561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
101661847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
101761847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
101861847f8eSopenharmony_ci     * @throws { BusinessError } 2900001 - Service stopped.
101961847f8eSopenharmony_ci     * @throws { BusinessError } 2900003 - Bluetooth disabled.
102061847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
102161847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
102261847f8eSopenharmony_ci     * @atomicservice
102361847f8eSopenharmony_ci     * @since 12
102461847f8eSopenharmony_ci     */
102561847f8eSopenharmony_ci    /**
102661847f8eSopenharmony_ci     * Sends a notification of a change in a specified local characteristic with a asynchronous callback.
102761847f8eSopenharmony_ci     * <p>This method should be called for every BLE peripheral device that has requested notifications.
102861847f8eSopenharmony_ci     *
102961847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
103061847f8eSopenharmony_ci     * @param { string } deviceId - Indicates device ID. For example, "11:22:33:AA:BB:FF".
103161847f8eSopenharmony_ci     * @param { NotifyCharacteristic } notifyCharacteristic - Indicates the local characteristic that has changed.
103261847f8eSopenharmony_ci     * @returns { Promise<void> } Promise used to return the result.
103361847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
103461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
103561847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
103661847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
103761847f8eSopenharmony_ci     * @throws { BusinessError } 2900001 - Service stopped.
103861847f8eSopenharmony_ci     * @throws { BusinessError } 2900003 - Bluetooth disabled.
103961847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
104061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
104161847f8eSopenharmony_ci     * @crossplatform
104261847f8eSopenharmony_ci     * @atomicservice
104361847f8eSopenharmony_ci     * @since 13
104461847f8eSopenharmony_ci     */
104561847f8eSopenharmony_ci    notifyCharacteristicChanged(deviceId: string, notifyCharacteristic: NotifyCharacteristic): Promise<void>;
104661847f8eSopenharmony_ci
104761847f8eSopenharmony_ci    /**
104861847f8eSopenharmony_ci     * Sends a response to a specified read or write request to a given BLE peripheral device.
104961847f8eSopenharmony_ci     *
105061847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
105161847f8eSopenharmony_ci     * @param { ServerResponse } serverResponse - Indicates the response parameters {@link ServerResponse}.
105261847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
105361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
105461847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
105561847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
105661847f8eSopenharmony_ci     * @throws { BusinessError } 2900001 - Service stopped.
105761847f8eSopenharmony_ci     * @throws { BusinessError } 2900003 - Bluetooth disabled.
105861847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
105961847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
106061847f8eSopenharmony_ci     * @since 10
106161847f8eSopenharmony_ci     */
106261847f8eSopenharmony_ci    /**
106361847f8eSopenharmony_ci     * Sends a response to a specified read or write request to a given BLE peripheral device.
106461847f8eSopenharmony_ci     *
106561847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
106661847f8eSopenharmony_ci     * @param { ServerResponse } serverResponse - Indicates the response parameters {@link ServerResponse}.
106761847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
106861847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
106961847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
107061847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
107161847f8eSopenharmony_ci     * @throws { BusinessError } 2900001 - Service stopped.
107261847f8eSopenharmony_ci     * @throws { BusinessError } 2900003 - Bluetooth disabled.
107361847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
107461847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
107561847f8eSopenharmony_ci     * @atomicservice
107661847f8eSopenharmony_ci     * @since 12
107761847f8eSopenharmony_ci     */
107861847f8eSopenharmony_ci    /**
107961847f8eSopenharmony_ci     * Sends a response to a specified read or write request to a given BLE peripheral device.
108061847f8eSopenharmony_ci     *
108161847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
108261847f8eSopenharmony_ci     * @param { ServerResponse } serverResponse - Indicates the response parameters {@link ServerResponse}.
108361847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
108461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
108561847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
108661847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
108761847f8eSopenharmony_ci     * @throws { BusinessError } 2900001 - Service stopped.
108861847f8eSopenharmony_ci     * @throws { BusinessError } 2900003 - Bluetooth disabled.
108961847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
109061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
109161847f8eSopenharmony_ci     * @crossplatform
109261847f8eSopenharmony_ci     * @atomicservice
109361847f8eSopenharmony_ci     * @since 13
109461847f8eSopenharmony_ci     */
109561847f8eSopenharmony_ci    sendResponse(serverResponse: ServerResponse): void;
109661847f8eSopenharmony_ci
109761847f8eSopenharmony_ci    /**
109861847f8eSopenharmony_ci     * Subscribe characteristic read event.
109961847f8eSopenharmony_ci     *
110061847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
110161847f8eSopenharmony_ci     * @param { 'characteristicRead' } type - Type of the characteristic read event to listen for.
110261847f8eSopenharmony_ci     * @param { Callback<CharacteristicReadRequest> } callback - Callback used to listen for the characteristic read event.
110361847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
110461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
110561847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
110661847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
110761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
110861847f8eSopenharmony_ci     * @since 10
110961847f8eSopenharmony_ci     */
111061847f8eSopenharmony_ci    /**
111161847f8eSopenharmony_ci     * Subscribe characteristic read event.
111261847f8eSopenharmony_ci     *
111361847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
111461847f8eSopenharmony_ci     * @param { 'characteristicRead' } type - Type of the characteristic read event to listen for.
111561847f8eSopenharmony_ci     * @param { Callback<CharacteristicReadRequest> } callback - Callback used to listen for the characteristic read event.
111661847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
111761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
111861847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
111961847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
112061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
112161847f8eSopenharmony_ci     * @atomicservice
112261847f8eSopenharmony_ci     * @since 12
112361847f8eSopenharmony_ci     */
112461847f8eSopenharmony_ci    /**
112561847f8eSopenharmony_ci     * Subscribe characteristic read event.
112661847f8eSopenharmony_ci     *
112761847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
112861847f8eSopenharmony_ci     * @param { 'characteristicRead' } type - Type of the characteristic read event to listen for.
112961847f8eSopenharmony_ci     * @param { Callback<CharacteristicReadRequest> } callback - Callback used to listen for the characteristic read event.
113061847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
113161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
113261847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
113361847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
113461847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
113561847f8eSopenharmony_ci     * @crossplatform
113661847f8eSopenharmony_ci     * @atomicservice
113761847f8eSopenharmony_ci     * @since 13
113861847f8eSopenharmony_ci     */
113961847f8eSopenharmony_ci    on(type: 'characteristicRead', callback: Callback<CharacteristicReadRequest>): void;
114061847f8eSopenharmony_ci
114161847f8eSopenharmony_ci    /**
114261847f8eSopenharmony_ci     * Unsubscribe characteristic read event.
114361847f8eSopenharmony_ci     *
114461847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
114561847f8eSopenharmony_ci     * @param { 'characteristicRead' } type - Type of the characteristic read event to listen for.
114661847f8eSopenharmony_ci     * @param { Callback<CharacteristicReadRequest> } callback - Callback used to listen for the characteristic read event.
114761847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
114861847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
114961847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
115061847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
115161847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
115261847f8eSopenharmony_ci     * @since 10
115361847f8eSopenharmony_ci     */
115461847f8eSopenharmony_ci    /**
115561847f8eSopenharmony_ci     * Unsubscribe characteristic read event.
115661847f8eSopenharmony_ci     *
115761847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
115861847f8eSopenharmony_ci     * @param { 'characteristicRead' } type - Type of the characteristic read event to listen for.
115961847f8eSopenharmony_ci     * @param { Callback<CharacteristicReadRequest> } callback - Callback used to listen for the characteristic read event.
116061847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
116161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
116261847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
116361847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
116461847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
116561847f8eSopenharmony_ci     * @atomicservice
116661847f8eSopenharmony_ci     * @since 12
116761847f8eSopenharmony_ci     */
116861847f8eSopenharmony_ci    /**
116961847f8eSopenharmony_ci     * Unsubscribe characteristic read event.
117061847f8eSopenharmony_ci     *
117161847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
117261847f8eSopenharmony_ci     * @param { 'characteristicRead' } type - Type of the characteristic read event to listen for.
117361847f8eSopenharmony_ci     * @param { Callback<CharacteristicReadRequest> } callback - Callback used to listen for the characteristic read event.
117461847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
117561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
117661847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
117761847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
117861847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
117961847f8eSopenharmony_ci     * @crossplatform
118061847f8eSopenharmony_ci     * @atomicservice
118161847f8eSopenharmony_ci     * @since 13
118261847f8eSopenharmony_ci     */
118361847f8eSopenharmony_ci    off(type: 'characteristicRead', callback?: Callback<CharacteristicReadRequest>): void;
118461847f8eSopenharmony_ci
118561847f8eSopenharmony_ci    /**
118661847f8eSopenharmony_ci     * Subscribe characteristic write event.
118761847f8eSopenharmony_ci     *
118861847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
118961847f8eSopenharmony_ci     * @param { 'characteristicWrite' } type - Type of the characteristic write event to listen for.
119061847f8eSopenharmony_ci     * @param { Callback<CharacteristicWriteRequest> } callback - Callback used to listen for the characteristic write event.
119161847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
119261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
119361847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
119461847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
119561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
119661847f8eSopenharmony_ci     * @since 10
119761847f8eSopenharmony_ci     */
119861847f8eSopenharmony_ci    /**
119961847f8eSopenharmony_ci     * Subscribe characteristic write event.
120061847f8eSopenharmony_ci     *
120161847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
120261847f8eSopenharmony_ci     * @param { 'characteristicWrite' } type - Type of the characteristic write event to listen for.
120361847f8eSopenharmony_ci     * @param { Callback<CharacteristicWriteRequest> } callback - Callback used to listen for the characteristic write event.
120461847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
120561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
120661847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
120761847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
120861847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
120961847f8eSopenharmony_ci     * @atomicservice
121061847f8eSopenharmony_ci     * @since 12
121161847f8eSopenharmony_ci     */
121261847f8eSopenharmony_ci    /**
121361847f8eSopenharmony_ci     * Subscribe characteristic write event.
121461847f8eSopenharmony_ci     *
121561847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
121661847f8eSopenharmony_ci     * @param { 'characteristicWrite' } type - Type of the characteristic write event to listen for.
121761847f8eSopenharmony_ci     * @param { Callback<CharacteristicWriteRequest> } callback - Callback used to listen for the characteristic write event.
121861847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
121961847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
122061847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
122161847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
122261847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
122361847f8eSopenharmony_ci     * @crossplatform
122461847f8eSopenharmony_ci     * @atomicservice
122561847f8eSopenharmony_ci     * @since 13
122661847f8eSopenharmony_ci     */
122761847f8eSopenharmony_ci    on(type: 'characteristicWrite', callback: Callback<CharacteristicWriteRequest>): void;
122861847f8eSopenharmony_ci
122961847f8eSopenharmony_ci    /**
123061847f8eSopenharmony_ci     * Unsubscribe characteristic write event.
123161847f8eSopenharmony_ci     *
123261847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
123361847f8eSopenharmony_ci     * @param { 'characteristicWrite' } type - Type of the characteristic write event to listen for.
123461847f8eSopenharmony_ci     * @param { Callback<CharacteristicWriteRequest> } callback - Callback used to listen for the characteristic write event.
123561847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
123661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
123761847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
123861847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
123961847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
124061847f8eSopenharmony_ci     * @since 10
124161847f8eSopenharmony_ci     */
124261847f8eSopenharmony_ci    /**
124361847f8eSopenharmony_ci     * Unsubscribe characteristic write event.
124461847f8eSopenharmony_ci     *
124561847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
124661847f8eSopenharmony_ci     * @param { 'characteristicWrite' } type - Type of the characteristic write event to listen for.
124761847f8eSopenharmony_ci     * @param { Callback<CharacteristicWriteRequest> } callback - Callback used to listen for the characteristic write event.
124861847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
124961847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
125061847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
125161847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
125261847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
125361847f8eSopenharmony_ci     * @atomicservice
125461847f8eSopenharmony_ci     * @since 12
125561847f8eSopenharmony_ci     */
125661847f8eSopenharmony_ci    /**
125761847f8eSopenharmony_ci     * Unsubscribe characteristic write event.
125861847f8eSopenharmony_ci     *
125961847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
126061847f8eSopenharmony_ci     * @param { 'characteristicWrite' } type - Type of the characteristic write event to listen for.
126161847f8eSopenharmony_ci     * @param { Callback<CharacteristicWriteRequest> } callback - Callback used to listen for the characteristic write event.
126261847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
126361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
126461847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
126561847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
126661847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
126761847f8eSopenharmony_ci     * @crossplatform
126861847f8eSopenharmony_ci     * @atomicservice
126961847f8eSopenharmony_ci     * @since 13
127061847f8eSopenharmony_ci     */
127161847f8eSopenharmony_ci    off(type: 'characteristicWrite', callback?: Callback<CharacteristicWriteRequest>): void;
127261847f8eSopenharmony_ci
127361847f8eSopenharmony_ci    /**
127461847f8eSopenharmony_ci     * Subscribe descriptor read event.
127561847f8eSopenharmony_ci     *
127661847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
127761847f8eSopenharmony_ci     * @param { 'descriptorRead' } type - Type of the descriptor read event to listen for.
127861847f8eSopenharmony_ci     * @param { Callback<DescriptorReadRequest> } callback - Callback used to listen for the descriptor read event.
127961847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
128061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
128161847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
128261847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
128361847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
128461847f8eSopenharmony_ci     * @since 10
128561847f8eSopenharmony_ci     */
128661847f8eSopenharmony_ci    /**
128761847f8eSopenharmony_ci     * Subscribe descriptor read event.
128861847f8eSopenharmony_ci     *
128961847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
129061847f8eSopenharmony_ci     * @param { 'descriptorRead' } type - Type of the descriptor read event to listen for.
129161847f8eSopenharmony_ci     * @param { Callback<DescriptorReadRequest> } callback - Callback used to listen for the descriptor read event.
129261847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
129361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
129461847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
129561847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
129661847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
129761847f8eSopenharmony_ci     * @atomicservice
129861847f8eSopenharmony_ci     * @since 12
129961847f8eSopenharmony_ci     */
130061847f8eSopenharmony_ci    /**
130161847f8eSopenharmony_ci     * Subscribe descriptor read event.
130261847f8eSopenharmony_ci     *
130361847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
130461847f8eSopenharmony_ci     * @param { 'descriptorRead' } type - Type of the descriptor read event to listen for.
130561847f8eSopenharmony_ci     * @param { Callback<DescriptorReadRequest> } callback - Callback used to listen for the descriptor read event.
130661847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
130761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
130861847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
130961847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
131061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
131161847f8eSopenharmony_ci     * @crossplatform
131261847f8eSopenharmony_ci     * @atomicservice
131361847f8eSopenharmony_ci     * @since 13
131461847f8eSopenharmony_ci     */
131561847f8eSopenharmony_ci    on(type: 'descriptorRead', callback: Callback<DescriptorReadRequest>): void;
131661847f8eSopenharmony_ci
131761847f8eSopenharmony_ci    /**
131861847f8eSopenharmony_ci     * Unsubscribe descriptor read event.
131961847f8eSopenharmony_ci     *
132061847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
132161847f8eSopenharmony_ci     * @param { 'descriptorRead' } type - Type of the descriptor read event to listen for.
132261847f8eSopenharmony_ci     * @param { Callback<DescriptorReadRequest> } callback - Callback used to listen for the descriptor read event.
132361847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
132461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
132561847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
132661847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
132761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
132861847f8eSopenharmony_ci     * @since 10
132961847f8eSopenharmony_ci     */
133061847f8eSopenharmony_ci    /**
133161847f8eSopenharmony_ci     * Unsubscribe descriptor read event.
133261847f8eSopenharmony_ci     *
133361847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
133461847f8eSopenharmony_ci     * @param { 'descriptorRead' } type - Type of the descriptor read event to listen for.
133561847f8eSopenharmony_ci     * @param { Callback<DescriptorReadRequest> } callback - Callback used to listen for the descriptor read event.
133661847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
133761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
133861847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
133961847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
134061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
134161847f8eSopenharmony_ci     * @atomicservice
134261847f8eSopenharmony_ci     * @since 12
134361847f8eSopenharmony_ci     */
134461847f8eSopenharmony_ci    /**
134561847f8eSopenharmony_ci     * Unsubscribe descriptor read event.
134661847f8eSopenharmony_ci     *
134761847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
134861847f8eSopenharmony_ci     * @param { 'descriptorRead' } type - Type of the descriptor read event to listen for.
134961847f8eSopenharmony_ci     * @param { Callback<DescriptorReadRequest> } callback - Callback used to listen for the descriptor read event.
135061847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
135161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
135261847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
135361847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
135461847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
135561847f8eSopenharmony_ci     * @crossplatform
135661847f8eSopenharmony_ci     * @atomicservice
135761847f8eSopenharmony_ci     * @since 13
135861847f8eSopenharmony_ci     */
135961847f8eSopenharmony_ci    off(type: 'descriptorRead', callback?: Callback<DescriptorReadRequest>): void;
136061847f8eSopenharmony_ci
136161847f8eSopenharmony_ci    /**
136261847f8eSopenharmony_ci     * Subscribe descriptor write event.
136361847f8eSopenharmony_ci     *
136461847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
136561847f8eSopenharmony_ci     * @param { 'descriptorWrite' } type - Type of the descriptor write event to listen for.
136661847f8eSopenharmony_ci     * @param { Callback<DescriptorWriteRequest> } callback - Callback used to listen for the descriptor write event.
136761847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
136861847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
136961847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
137061847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
137161847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
137261847f8eSopenharmony_ci     * @since 10
137361847f8eSopenharmony_ci     */
137461847f8eSopenharmony_ci    /**
137561847f8eSopenharmony_ci     * Subscribe descriptor write event.
137661847f8eSopenharmony_ci     *
137761847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
137861847f8eSopenharmony_ci     * @param { 'descriptorWrite' } type - Type of the descriptor write event to listen for.
137961847f8eSopenharmony_ci     * @param { Callback<DescriptorWriteRequest> } callback - Callback used to listen for the descriptor write event.
138061847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
138161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
138261847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
138361847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
138461847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
138561847f8eSopenharmony_ci     * @atomicservice
138661847f8eSopenharmony_ci     * @since 12
138761847f8eSopenharmony_ci     */
138861847f8eSopenharmony_ci    /**
138961847f8eSopenharmony_ci     * Subscribe descriptor write event.
139061847f8eSopenharmony_ci     *
139161847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
139261847f8eSopenharmony_ci     * @param { 'descriptorWrite' } type - Type of the descriptor write event to listen for.
139361847f8eSopenharmony_ci     * @param { Callback<DescriptorWriteRequest> } callback - Callback used to listen for the descriptor write event.
139461847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
139561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
139661847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
139761847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
139861847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
139961847f8eSopenharmony_ci     * @crossplatform
140061847f8eSopenharmony_ci     * @atomicservice
140161847f8eSopenharmony_ci     * @since 13
140261847f8eSopenharmony_ci     */
140361847f8eSopenharmony_ci    on(type: 'descriptorWrite', callback: Callback<DescriptorWriteRequest>): void;
140461847f8eSopenharmony_ci
140561847f8eSopenharmony_ci    /**
140661847f8eSopenharmony_ci     * Unsubscribe descriptor write event.
140761847f8eSopenharmony_ci     *
140861847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
140961847f8eSopenharmony_ci     * @param { 'descriptorWrite' } type - Type of the descriptor write event to listen for.
141061847f8eSopenharmony_ci     * @param { Callback<DescriptorWriteRequest> } callback - Callback used to listen for the descriptor write event.
141161847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
141261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
141361847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
141461847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
141561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
141661847f8eSopenharmony_ci     * @since 10
141761847f8eSopenharmony_ci     */
141861847f8eSopenharmony_ci    /**
141961847f8eSopenharmony_ci     * Unsubscribe descriptor write event.
142061847f8eSopenharmony_ci     *
142161847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
142261847f8eSopenharmony_ci     * @param { 'descriptorWrite' } type - Type of the descriptor write event to listen for.
142361847f8eSopenharmony_ci     * @param { Callback<DescriptorWriteRequest> } callback - Callback used to listen for the descriptor write event.
142461847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
142561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
142661847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
142761847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
142861847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
142961847f8eSopenharmony_ci     * @atomicservice
143061847f8eSopenharmony_ci     * @since 12
143161847f8eSopenharmony_ci     */
143261847f8eSopenharmony_ci    /**
143361847f8eSopenharmony_ci     * Unsubscribe descriptor write event.
143461847f8eSopenharmony_ci     *
143561847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
143661847f8eSopenharmony_ci     * @param { 'descriptorWrite' } type - Type of the descriptor write event to listen for.
143761847f8eSopenharmony_ci     * @param { Callback<DescriptorWriteRequest> } callback - Callback used to listen for the descriptor write event.
143861847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
143961847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
144061847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
144161847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
144261847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
144361847f8eSopenharmony_ci     * @crossplatform
144461847f8eSopenharmony_ci     * @atomicservice
144561847f8eSopenharmony_ci     * @since 13
144661847f8eSopenharmony_ci     */
144761847f8eSopenharmony_ci    off(type: 'descriptorWrite', callback?: Callback<DescriptorWriteRequest>): void;
144861847f8eSopenharmony_ci
144961847f8eSopenharmony_ci    /**
145061847f8eSopenharmony_ci     * Subscribe server connection state changed event.
145161847f8eSopenharmony_ci     *
145261847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
145361847f8eSopenharmony_ci     * @param { 'connectionStateChange' } type - Type of the connection state changed event to listen for.
145461847f8eSopenharmony_ci     * @param { Callback<BLEConnectionChangeState> } callback - Callback used to listen for the connection state changed event.
145561847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
145661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
145761847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
145861847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
145961847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
146061847f8eSopenharmony_ci     * @since 10
146161847f8eSopenharmony_ci     */
146261847f8eSopenharmony_ci    /**
146361847f8eSopenharmony_ci     * Subscribe server connection state changed event.
146461847f8eSopenharmony_ci     *
146561847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
146661847f8eSopenharmony_ci     * @param { 'connectionStateChange' } type - Type of the connection state changed event to listen for.
146761847f8eSopenharmony_ci     * @param { Callback<BLEConnectionChangeState> } callback - Callback used to listen for the connection state changed event.
146861847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
146961847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
147061847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
147161847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
147261847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
147361847f8eSopenharmony_ci     * @atomicservice
147461847f8eSopenharmony_ci     * @since 12
147561847f8eSopenharmony_ci     */
147661847f8eSopenharmony_ci    /**
147761847f8eSopenharmony_ci     * Subscribe server connection state changed event.
147861847f8eSopenharmony_ci     *
147961847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
148061847f8eSopenharmony_ci     * @param { 'connectionStateChange' } type - Type of the connection state changed event to listen for.
148161847f8eSopenharmony_ci     * @param { Callback<BLEConnectionChangeState> } callback - Callback used to listen for the connection state changed event.
148261847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
148361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
148461847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
148561847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
148661847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
148761847f8eSopenharmony_ci     * @crossplatform
148861847f8eSopenharmony_ci     * @atomicservice
148961847f8eSopenharmony_ci     * @since 13
149061847f8eSopenharmony_ci     */
149161847f8eSopenharmony_ci    on(type: 'connectionStateChange', callback: Callback<BLEConnectionChangeState>): void;
149261847f8eSopenharmony_ci
149361847f8eSopenharmony_ci    /**
149461847f8eSopenharmony_ci     * Unsubscribe server connection state changed event.
149561847f8eSopenharmony_ci     *
149661847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
149761847f8eSopenharmony_ci     * @param { 'connectionStateChange' } type - Type of the connection state changed event to listen for.
149861847f8eSopenharmony_ci     * @param { Callback<BLEConnectionChangeState> } callback - Callback used to listen for the connection state changed event.
149961847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
150061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
150161847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
150261847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
150361847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
150461847f8eSopenharmony_ci     * @since 10
150561847f8eSopenharmony_ci     */
150661847f8eSopenharmony_ci    /**
150761847f8eSopenharmony_ci     * Unsubscribe server connection state changed event.
150861847f8eSopenharmony_ci     *
150961847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
151061847f8eSopenharmony_ci     * @param { 'connectionStateChange' } type - Type of the connection state changed event to listen for.
151161847f8eSopenharmony_ci     * @param { Callback<BLEConnectionChangeState> } callback - Callback used to listen for the connection state changed event.
151261847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
151361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
151461847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
151561847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
151661847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
151761847f8eSopenharmony_ci     * @atomicservice
151861847f8eSopenharmony_ci     * @since 12
151961847f8eSopenharmony_ci     */
152061847f8eSopenharmony_ci    /**
152161847f8eSopenharmony_ci     * Unsubscribe server connection state changed event.
152261847f8eSopenharmony_ci     *
152361847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
152461847f8eSopenharmony_ci     * @param { 'connectionStateChange' } type - Type of the connection state changed event to listen for.
152561847f8eSopenharmony_ci     * @param { Callback<BLEConnectionChangeState> } callback - Callback used to listen for the connection state changed event.
152661847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
152761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
152861847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
152961847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
153061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
153161847f8eSopenharmony_ci     * @crossplatform
153261847f8eSopenharmony_ci     * @atomicservice
153361847f8eSopenharmony_ci     * @since 13
153461847f8eSopenharmony_ci     */
153561847f8eSopenharmony_ci    off(type: 'connectionStateChange', callback?: Callback<BLEConnectionChangeState>): void;
153661847f8eSopenharmony_ci
153761847f8eSopenharmony_ci    /**
153861847f8eSopenharmony_ci     * Subscribe mtu changed event.
153961847f8eSopenharmony_ci     *
154061847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
154161847f8eSopenharmony_ci     * @param { 'BLEMtuChange' } type - Type of the mtu changed event to listen for.
154261847f8eSopenharmony_ci     * @param { Callback<number> } callback - Callback used to listen for the mtu changed event.
154361847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
154461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
154561847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
154661847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
154761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
154861847f8eSopenharmony_ci     * @since 10
154961847f8eSopenharmony_ci     */
155061847f8eSopenharmony_ci    /**
155161847f8eSopenharmony_ci     * Subscribe mtu changed event.
155261847f8eSopenharmony_ci     *
155361847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
155461847f8eSopenharmony_ci     * @param { 'BLEMtuChange' } type - Type of the mtu changed event to listen for.
155561847f8eSopenharmony_ci     * @param { Callback<number> } callback - Callback used to listen for the mtu changed event.
155661847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
155761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
155861847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
155961847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
156061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
156161847f8eSopenharmony_ci     * @crossplatform
156261847f8eSopenharmony_ci     * @since 13
156361847f8eSopenharmony_ci     */
156461847f8eSopenharmony_ci    on(type: 'BLEMtuChange', callback: Callback<number>): void;
156561847f8eSopenharmony_ci
156661847f8eSopenharmony_ci    /**
156761847f8eSopenharmony_ci     * Unsubscribe mtu changed event.
156861847f8eSopenharmony_ci     *
156961847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
157061847f8eSopenharmony_ci     * @param { 'BLEMtuChange' } type - Type of the mtu changed event to listen for.
157161847f8eSopenharmony_ci     * @param { Callback<number> } callback - Callback used to listen for the mtu changed event.
157261847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
157361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
157461847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
157561847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
157661847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
157761847f8eSopenharmony_ci     * @since 10
157861847f8eSopenharmony_ci     */
157961847f8eSopenharmony_ci    /**
158061847f8eSopenharmony_ci     * Unsubscribe mtu changed event.
158161847f8eSopenharmony_ci     *
158261847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
158361847f8eSopenharmony_ci     * @param { 'BLEMtuChange' } type - Type of the mtu changed event to listen for.
158461847f8eSopenharmony_ci     * @param { Callback<number> } callback - Callback used to listen for the mtu changed event.
158561847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
158661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
158761847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
158861847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
158961847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
159061847f8eSopenharmony_ci     * @crossplatform
159161847f8eSopenharmony_ci     * @since 13
159261847f8eSopenharmony_ci     */
159361847f8eSopenharmony_ci    off(type: 'BLEMtuChange', callback?: Callback<number>): void;
159461847f8eSopenharmony_ci  }
159561847f8eSopenharmony_ci
159661847f8eSopenharmony_ci  /**
159761847f8eSopenharmony_ci   * Manages GATT client. Before calling an Gatt client method, you must use {@link createGattClientDevice} to create an GattClientDevice instance.
159861847f8eSopenharmony_ci   *
159961847f8eSopenharmony_ci   * @typedef GattClientDevice
160061847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
160161847f8eSopenharmony_ci   * @since 10
160261847f8eSopenharmony_ci   */
160361847f8eSopenharmony_ci  /**
160461847f8eSopenharmony_ci   * Manages GATT client. Before calling an Gatt client method, you must use {@link createGattClientDevice} to create an GattClientDevice instance.
160561847f8eSopenharmony_ci   *
160661847f8eSopenharmony_ci   * @typedef GattClientDevice
160761847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
160861847f8eSopenharmony_ci   * @atomicservice
160961847f8eSopenharmony_ci   * @since 12
161061847f8eSopenharmony_ci   */
161161847f8eSopenharmony_ci  /**
161261847f8eSopenharmony_ci   * Manages GATT client. Before calling an Gatt client method, you must use {@link createGattClientDevice} to create an GattClientDevice instance.
161361847f8eSopenharmony_ci   *
161461847f8eSopenharmony_ci   * @typedef GattClientDevice
161561847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
161661847f8eSopenharmony_ci   * @crossplatform
161761847f8eSopenharmony_ci   * @atomicservice
161861847f8eSopenharmony_ci   * @since 13
161961847f8eSopenharmony_ci   */
162061847f8eSopenharmony_ci  interface GattClientDevice {
162161847f8eSopenharmony_ci    /**
162261847f8eSopenharmony_ci     * Connects to a BLE peripheral device.
162361847f8eSopenharmony_ci     * <p>The 'BLEConnectionStateChange' event is subscribed to return the connection state.
162461847f8eSopenharmony_ci     *
162561847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
162661847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
162761847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
162861847f8eSopenharmony_ci     * @throws { BusinessError } 2900001 - Service stopped.
162961847f8eSopenharmony_ci     * @throws { BusinessError } 2900003 - Bluetooth disabled.
163061847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
163161847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
163261847f8eSopenharmony_ci     * @since 10
163361847f8eSopenharmony_ci     */
163461847f8eSopenharmony_ci    /**
163561847f8eSopenharmony_ci     * Connects to a BLE peripheral device.
163661847f8eSopenharmony_ci     * <p>The 'BLEConnectionStateChange' event is subscribed to return the connection state.
163761847f8eSopenharmony_ci     *
163861847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
163961847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
164061847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
164161847f8eSopenharmony_ci     * @throws { BusinessError } 2900001 - Service stopped.
164261847f8eSopenharmony_ci     * @throws { BusinessError } 2900003 - Bluetooth disabled.
164361847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
164461847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
164561847f8eSopenharmony_ci     * @atomicservice
164661847f8eSopenharmony_ci     * @since 12
164761847f8eSopenharmony_ci     */
164861847f8eSopenharmony_ci    /**
164961847f8eSopenharmony_ci     * Connects to a BLE peripheral device.
165061847f8eSopenharmony_ci     * <p>The 'BLEConnectionStateChange' event is subscribed to return the connection state.
165161847f8eSopenharmony_ci     *
165261847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
165361847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
165461847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
165561847f8eSopenharmony_ci     * @throws { BusinessError } 2900001 - Service stopped.
165661847f8eSopenharmony_ci     * @throws { BusinessError } 2900003 - Bluetooth disabled.
165761847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
165861847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
165961847f8eSopenharmony_ci     * @crossplatform
166061847f8eSopenharmony_ci     * @atomicservice
166161847f8eSopenharmony_ci     * @since 13
166261847f8eSopenharmony_ci     */
166361847f8eSopenharmony_ci    connect(): void;
166461847f8eSopenharmony_ci
166561847f8eSopenharmony_ci    /**
166661847f8eSopenharmony_ci     * Disconnects from or stops an ongoing connection to a BLE peripheral device.
166761847f8eSopenharmony_ci     *
166861847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
166961847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
167061847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
167161847f8eSopenharmony_ci     * @throws { BusinessError } 2900001 - Service stopped.
167261847f8eSopenharmony_ci     * @throws { BusinessError } 2900003 - Bluetooth disabled.
167361847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
167461847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
167561847f8eSopenharmony_ci     * @since 10
167661847f8eSopenharmony_ci     */
167761847f8eSopenharmony_ci    /**
167861847f8eSopenharmony_ci     * Disconnects from or stops an ongoing connection to a BLE peripheral device.
167961847f8eSopenharmony_ci     *
168061847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
168161847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
168261847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
168361847f8eSopenharmony_ci     * @throws { BusinessError } 2900001 - Service stopped.
168461847f8eSopenharmony_ci     * @throws { BusinessError } 2900003 - Bluetooth disabled.
168561847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
168661847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
168761847f8eSopenharmony_ci     * @atomicservice
168861847f8eSopenharmony_ci     * @since 12
168961847f8eSopenharmony_ci     */
169061847f8eSopenharmony_ci    /**
169161847f8eSopenharmony_ci     * Disconnects from or stops an ongoing connection to a BLE peripheral device.
169261847f8eSopenharmony_ci     *
169361847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
169461847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
169561847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
169661847f8eSopenharmony_ci     * @throws { BusinessError } 2900001 - Service stopped.
169761847f8eSopenharmony_ci     * @throws { BusinessError } 2900003 - Bluetooth disabled.
169861847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
169961847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
170061847f8eSopenharmony_ci     * @crossplatform
170161847f8eSopenharmony_ci     * @atomicservice
170261847f8eSopenharmony_ci     * @since 13
170361847f8eSopenharmony_ci     */
170461847f8eSopenharmony_ci    disconnect(): void;
170561847f8eSopenharmony_ci
170661847f8eSopenharmony_ci    /**
170761847f8eSopenharmony_ci     * Disables a BLE peripheral device.
170861847f8eSopenharmony_ci     * <p> This method unregisters the device and clears the registered callbacks and handles.
170961847f8eSopenharmony_ci     *
171061847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
171161847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
171261847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
171361847f8eSopenharmony_ci     * @throws { BusinessError } 2900001 - Service stopped.
171461847f8eSopenharmony_ci     * @throws { BusinessError } 2900003 - Bluetooth disabled.
171561847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
171661847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
171761847f8eSopenharmony_ci     * @since 10
171861847f8eSopenharmony_ci     */
171961847f8eSopenharmony_ci    /**
172061847f8eSopenharmony_ci     * Disables a BLE peripheral device.
172161847f8eSopenharmony_ci     * <p> This method unregisters the device and clears the registered callbacks and handles.
172261847f8eSopenharmony_ci     *
172361847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
172461847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
172561847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
172661847f8eSopenharmony_ci     * @throws { BusinessError } 2900001 - Service stopped.
172761847f8eSopenharmony_ci     * @throws { BusinessError } 2900003 - Bluetooth disabled.
172861847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
172961847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
173061847f8eSopenharmony_ci     * @atomicservice
173161847f8eSopenharmony_ci     * @since 12
173261847f8eSopenharmony_ci     */
173361847f8eSopenharmony_ci    /**
173461847f8eSopenharmony_ci     * Disables a BLE peripheral device.
173561847f8eSopenharmony_ci     * <p> This method unregisters the device and clears the registered callbacks and handles.
173661847f8eSopenharmony_ci     *
173761847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
173861847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
173961847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
174061847f8eSopenharmony_ci     * @throws { BusinessError } 2900001 - Service stopped.
174161847f8eSopenharmony_ci     * @throws { BusinessError } 2900003 - Bluetooth disabled.
174261847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
174361847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
174461847f8eSopenharmony_ci     * @crossplatform
174561847f8eSopenharmony_ci     * @atomicservice
174661847f8eSopenharmony_ci     * @since 13
174761847f8eSopenharmony_ci     */
174861847f8eSopenharmony_ci    close(): void;
174961847f8eSopenharmony_ci
175061847f8eSopenharmony_ci    /**
175161847f8eSopenharmony_ci     * Obtains the name of BLE peripheral device.
175261847f8eSopenharmony_ci     *
175361847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
175461847f8eSopenharmony_ci     * @param { AsyncCallback<string> } callback - Callback used to obtain the device name.
175561847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
175661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
175761847f8eSopenharmony_ci     * <br>2. Incorrect parameter types.
175861847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
175961847f8eSopenharmony_ci     * @throws { BusinessError } 2900001 - Service stopped.
176061847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
176161847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
176261847f8eSopenharmony_ci     * @since 10
176361847f8eSopenharmony_ci     */
176461847f8eSopenharmony_ci    /**
176561847f8eSopenharmony_ci     * Obtains the name of BLE peripheral device.
176661847f8eSopenharmony_ci     *
176761847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
176861847f8eSopenharmony_ci     * @param { AsyncCallback<string> } callback - Callback used to obtain the device name.
176961847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
177061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
177161847f8eSopenharmony_ci     * <br>2. Incorrect parameter types.
177261847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
177361847f8eSopenharmony_ci     * @throws { BusinessError } 2900001 - Service stopped.
177461847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
177561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
177661847f8eSopenharmony_ci     * @atomicservice
177761847f8eSopenharmony_ci     * @since 12
177861847f8eSopenharmony_ci     */
177961847f8eSopenharmony_ci    /**
178061847f8eSopenharmony_ci     * Obtains the name of BLE peripheral device.
178161847f8eSopenharmony_ci     *
178261847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
178361847f8eSopenharmony_ci     * @param { AsyncCallback<string> } callback - Callback used to obtain the device name.
178461847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
178561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
178661847f8eSopenharmony_ci     * <br>2. Incorrect parameter types.
178761847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
178861847f8eSopenharmony_ci     * @throws { BusinessError } 2900001 - Service stopped.
178961847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
179061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
179161847f8eSopenharmony_ci     * @crossplatform
179261847f8eSopenharmony_ci     * @atomicservice
179361847f8eSopenharmony_ci     * @since 13
179461847f8eSopenharmony_ci     */
179561847f8eSopenharmony_ci    getDeviceName(callback: AsyncCallback<string>): void;
179661847f8eSopenharmony_ci
179761847f8eSopenharmony_ci    /**
179861847f8eSopenharmony_ci     * Obtains the name of BLE peripheral device.
179961847f8eSopenharmony_ci     *
180061847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
180161847f8eSopenharmony_ci     * @returns { Promise<string> } Returns a string representation of the name if obtained;
180261847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
180361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter.Possible causes: 1. Mandatory parameters are left unspecified.
180461847f8eSopenharmony_ci     * <br>2. Incorrect parameter types.
180561847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
180661847f8eSopenharmony_ci     * @throws { BusinessError } 2900001 - Service stopped.
180761847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
180861847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
180961847f8eSopenharmony_ci     * @since 10
181061847f8eSopenharmony_ci     */
181161847f8eSopenharmony_ci    /**
181261847f8eSopenharmony_ci     * Obtains the name of BLE peripheral device.
181361847f8eSopenharmony_ci     *
181461847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
181561847f8eSopenharmony_ci     * @returns { Promise<string> } Returns a string representation of the name if obtained;
181661847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
181761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter.Possible causes: 1. Mandatory parameters are left unspecified.
181861847f8eSopenharmony_ci     * <br>2. Incorrect parameter types.
181961847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
182061847f8eSopenharmony_ci     * @throws { BusinessError } 2900001 - Service stopped.
182161847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
182261847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
182361847f8eSopenharmony_ci     * @atomicservice
182461847f8eSopenharmony_ci     * @since 12
182561847f8eSopenharmony_ci     */
182661847f8eSopenharmony_ci    /**
182761847f8eSopenharmony_ci     * Obtains the name of BLE peripheral device.
182861847f8eSopenharmony_ci     *
182961847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
183061847f8eSopenharmony_ci     * @returns { Promise<string> } Returns a string representation of the name if obtained;
183161847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
183261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter.Possible causes: 1. Mandatory parameters are left unspecified.
183361847f8eSopenharmony_ci     * <br>2. Incorrect parameter types.
183461847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
183561847f8eSopenharmony_ci     * @throws { BusinessError } 2900001 - Service stopped.
183661847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
183761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
183861847f8eSopenharmony_ci     * @crossplatform
183961847f8eSopenharmony_ci     * @atomicservice
184061847f8eSopenharmony_ci     * @since 13
184161847f8eSopenharmony_ci     */
184261847f8eSopenharmony_ci    getDeviceName(): Promise<string>;
184361847f8eSopenharmony_ci
184461847f8eSopenharmony_ci    /**
184561847f8eSopenharmony_ci     * Starts discovering services.
184661847f8eSopenharmony_ci     *
184761847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
184861847f8eSopenharmony_ci     * @param { AsyncCallback<Array<GattService>> } callback - Callback used to catch the services.
184961847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
185061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
185161847f8eSopenharmony_ci     * <br>2. Incorrect parameter types.
185261847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
185361847f8eSopenharmony_ci     * @throws { BusinessError } 2900001 - Service stopped.
185461847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
185561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
185661847f8eSopenharmony_ci     * @since 10
185761847f8eSopenharmony_ci     */
185861847f8eSopenharmony_ci    /**
185961847f8eSopenharmony_ci     * Starts discovering services.
186061847f8eSopenharmony_ci     *
186161847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
186261847f8eSopenharmony_ci     * @param { AsyncCallback<Array<GattService>> } callback - Callback used to catch the services.
186361847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
186461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
186561847f8eSopenharmony_ci     * <br>2. Incorrect parameter types.
186661847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
186761847f8eSopenharmony_ci     * @throws { BusinessError } 2900001 - Service stopped.
186861847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
186961847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
187061847f8eSopenharmony_ci     * @atomicservice
187161847f8eSopenharmony_ci     * @since 12
187261847f8eSopenharmony_ci     */
187361847f8eSopenharmony_ci    /**
187461847f8eSopenharmony_ci     * Starts discovering services.
187561847f8eSopenharmony_ci     *
187661847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
187761847f8eSopenharmony_ci     * @param { AsyncCallback<Array<GattService>> } callback - Callback used to catch the services.
187861847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
187961847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
188061847f8eSopenharmony_ci     * <br>2. Incorrect parameter types.
188161847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
188261847f8eSopenharmony_ci     * @throws { BusinessError } 2900001 - Service stopped.
188361847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
188461847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
188561847f8eSopenharmony_ci     * @crossplatform
188661847f8eSopenharmony_ci     * @atomicservice
188761847f8eSopenharmony_ci     * @since 13
188861847f8eSopenharmony_ci     */
188961847f8eSopenharmony_ci    getServices(callback: AsyncCallback<Array<GattService>>): void;
189061847f8eSopenharmony_ci
189161847f8eSopenharmony_ci    /**
189261847f8eSopenharmony_ci     * Starts discovering services.
189361847f8eSopenharmony_ci     *
189461847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
189561847f8eSopenharmony_ci     * @returns { Promise<Array<GattService>> } Returns the list of services {@link GattService} of the BLE peripheral device.
189661847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
189761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
189861847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
189961847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
190061847f8eSopenharmony_ci     * @throws { BusinessError } 2900001 - Service stopped.
190161847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
190261847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
190361847f8eSopenharmony_ci     * @since 10
190461847f8eSopenharmony_ci     */
190561847f8eSopenharmony_ci    /**
190661847f8eSopenharmony_ci     * Starts discovering services.
190761847f8eSopenharmony_ci     *
190861847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
190961847f8eSopenharmony_ci     * @returns { Promise<Array<GattService>> } Returns the list of services {@link GattService} of the BLE peripheral device.
191061847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
191161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
191261847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
191361847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
191461847f8eSopenharmony_ci     * @throws { BusinessError } 2900001 - Service stopped.
191561847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
191661847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
191761847f8eSopenharmony_ci     * @atomicservice
191861847f8eSopenharmony_ci     * @since 12
191961847f8eSopenharmony_ci     */
192061847f8eSopenharmony_ci    /**
192161847f8eSopenharmony_ci     * Starts discovering services.
192261847f8eSopenharmony_ci     *
192361847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
192461847f8eSopenharmony_ci     * @returns { Promise<Array<GattService>> } Returns the list of services {@link GattService} of the BLE peripheral device.
192561847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
192661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
192761847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
192861847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
192961847f8eSopenharmony_ci     * @throws { BusinessError } 2900001 - Service stopped.
193061847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
193161847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
193261847f8eSopenharmony_ci     * @crossplatform
193361847f8eSopenharmony_ci     * @atomicservice
193461847f8eSopenharmony_ci     * @since 13
193561847f8eSopenharmony_ci     */
193661847f8eSopenharmony_ci    getServices(): Promise<Array<GattService>>;
193761847f8eSopenharmony_ci
193861847f8eSopenharmony_ci    /**
193961847f8eSopenharmony_ci     * Reads the characteristic of a BLE peripheral device.
194061847f8eSopenharmony_ci     *
194161847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
194261847f8eSopenharmony_ci     * @param { BLECharacteristic } characteristic - Indicates the characteristic to read.
194361847f8eSopenharmony_ci     * @param { AsyncCallback<BLECharacteristic> } callback - Callback invoked to return the characteristic value read.
194461847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
194561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
194661847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
194761847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
194861847f8eSopenharmony_ci     * @throws { BusinessError } 2900001 - Service stopped.
194961847f8eSopenharmony_ci     * @throws { BusinessError } 2901000 - Read forbidden.
195061847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
195161847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
195261847f8eSopenharmony_ci     * @since 10
195361847f8eSopenharmony_ci     */
195461847f8eSopenharmony_ci    /**
195561847f8eSopenharmony_ci     * Reads the characteristic of a BLE peripheral device.
195661847f8eSopenharmony_ci     *
195761847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
195861847f8eSopenharmony_ci     * @param { BLECharacteristic } characteristic - Indicates the characteristic to read.
195961847f8eSopenharmony_ci     * @param { AsyncCallback<BLECharacteristic> } callback - Callback invoked to return the characteristic value read.
196061847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
196161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
196261847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
196361847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
196461847f8eSopenharmony_ci     * @throws { BusinessError } 2900001 - Service stopped.
196561847f8eSopenharmony_ci     * @throws { BusinessError } 2901000 - Read forbidden.
196661847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
196761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
196861847f8eSopenharmony_ci     * @atomicservice
196961847f8eSopenharmony_ci     * @since 12
197061847f8eSopenharmony_ci     */
197161847f8eSopenharmony_ci    /**
197261847f8eSopenharmony_ci     * Reads the characteristic of a BLE peripheral device.
197361847f8eSopenharmony_ci     *
197461847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
197561847f8eSopenharmony_ci     * @param { BLECharacteristic } characteristic - Indicates the characteristic to read.
197661847f8eSopenharmony_ci     * @param { AsyncCallback<BLECharacteristic> } callback - Callback invoked to return the characteristic value read.
197761847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
197861847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
197961847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
198061847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
198161847f8eSopenharmony_ci     * @throws { BusinessError } 2900001 - Service stopped.
198261847f8eSopenharmony_ci     * @throws { BusinessError } 2901000 - Read forbidden.
198361847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
198461847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
198561847f8eSopenharmony_ci     * @crossplatform
198661847f8eSopenharmony_ci     * @atomicservice
198761847f8eSopenharmony_ci     * @since 13
198861847f8eSopenharmony_ci     */
198961847f8eSopenharmony_ci    readCharacteristicValue(characteristic: BLECharacteristic, callback: AsyncCallback<BLECharacteristic>): void;
199061847f8eSopenharmony_ci
199161847f8eSopenharmony_ci    /**
199261847f8eSopenharmony_ci     * Reads the characteristic of a BLE peripheral device.
199361847f8eSopenharmony_ci     *
199461847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
199561847f8eSopenharmony_ci     * @param { BLECharacteristic } characteristic - Indicates the characteristic to read.
199661847f8eSopenharmony_ci     * @returns { Promise<BLECharacteristic> } - Promise used to return the characteristic value read.
199761847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
199861847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
199961847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
200061847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
200161847f8eSopenharmony_ci     * @throws { BusinessError } 2900001 - Service stopped.
200261847f8eSopenharmony_ci     * @throws { BusinessError } 2901000 - Read forbidden.
200361847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
200461847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
200561847f8eSopenharmony_ci     * @since 10
200661847f8eSopenharmony_ci     */
200761847f8eSopenharmony_ci    /**
200861847f8eSopenharmony_ci     * Reads the characteristic of a BLE peripheral device.
200961847f8eSopenharmony_ci     *
201061847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
201161847f8eSopenharmony_ci     * @param { BLECharacteristic } characteristic - Indicates the characteristic to read.
201261847f8eSopenharmony_ci     * @returns { Promise<BLECharacteristic> } - Promise used to return the characteristic value read.
201361847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
201461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
201561847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
201661847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
201761847f8eSopenharmony_ci     * @throws { BusinessError } 2900001 - Service stopped.
201861847f8eSopenharmony_ci     * @throws { BusinessError } 2901000 - Read forbidden.
201961847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
202061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
202161847f8eSopenharmony_ci     * @atomicservice
202261847f8eSopenharmony_ci     * @since 12
202361847f8eSopenharmony_ci     */
202461847f8eSopenharmony_ci    /**
202561847f8eSopenharmony_ci     * Reads the characteristic of a BLE peripheral device.
202661847f8eSopenharmony_ci     *
202761847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
202861847f8eSopenharmony_ci     * @param { BLECharacteristic } characteristic - Indicates the characteristic to read.
202961847f8eSopenharmony_ci     * @returns { Promise<BLECharacteristic> } - Promise used to return the characteristic value read.
203061847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
203161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
203261847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
203361847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
203461847f8eSopenharmony_ci     * @throws { BusinessError } 2900001 - Service stopped.
203561847f8eSopenharmony_ci     * @throws { BusinessError } 2901000 - Read forbidden.
203661847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
203761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
203861847f8eSopenharmony_ci     * @crossplatform
203961847f8eSopenharmony_ci     * @atomicservice
204061847f8eSopenharmony_ci     * @since 13
204161847f8eSopenharmony_ci     */
204261847f8eSopenharmony_ci    readCharacteristicValue(characteristic: BLECharacteristic): Promise<BLECharacteristic>;
204361847f8eSopenharmony_ci
204461847f8eSopenharmony_ci    /**
204561847f8eSopenharmony_ci     * Reads the descriptor of a BLE peripheral device.
204661847f8eSopenharmony_ci     *
204761847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
204861847f8eSopenharmony_ci     * @param { BLEDescriptor } descriptor - Indicates the descriptor to read.
204961847f8eSopenharmony_ci     * @param { AsyncCallback<BLEDescriptor> } callback - Callback invoked to return the descriptor read.
205061847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
205161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
205261847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
205361847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
205461847f8eSopenharmony_ci     * @throws { BusinessError } 2900001 - Service stopped.
205561847f8eSopenharmony_ci     * @throws { BusinessError } 2901000 - Read forbidden.
205661847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
205761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
205861847f8eSopenharmony_ci     * @since 10
205961847f8eSopenharmony_ci     */
206061847f8eSopenharmony_ci    /**
206161847f8eSopenharmony_ci     * Reads the descriptor of a BLE peripheral device.
206261847f8eSopenharmony_ci     *
206361847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
206461847f8eSopenharmony_ci     * @param { BLEDescriptor } descriptor - Indicates the descriptor to read.
206561847f8eSopenharmony_ci     * @param { AsyncCallback<BLEDescriptor> } callback - Callback invoked to return the descriptor read.
206661847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
206761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
206861847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
206961847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
207061847f8eSopenharmony_ci     * @throws { BusinessError } 2900001 - Service stopped.
207161847f8eSopenharmony_ci     * @throws { BusinessError } 2901000 - Read forbidden.
207261847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
207361847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
207461847f8eSopenharmony_ci     * @atomicservice
207561847f8eSopenharmony_ci     * @since 12
207661847f8eSopenharmony_ci     */
207761847f8eSopenharmony_ci    /**
207861847f8eSopenharmony_ci     * Reads the descriptor of a BLE peripheral device.
207961847f8eSopenharmony_ci     *
208061847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
208161847f8eSopenharmony_ci     * @param { BLEDescriptor } descriptor - Indicates the descriptor to read.
208261847f8eSopenharmony_ci     * @param { AsyncCallback<BLEDescriptor> } callback - Callback invoked to return the descriptor read.
208361847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
208461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
208561847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
208661847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
208761847f8eSopenharmony_ci     * @throws { BusinessError } 2900001 - Service stopped.
208861847f8eSopenharmony_ci     * @throws { BusinessError } 2901000 - Read forbidden.
208961847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
209061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
209161847f8eSopenharmony_ci     * @crossplatform
209261847f8eSopenharmony_ci     * @atomicservice
209361847f8eSopenharmony_ci     * @since 13
209461847f8eSopenharmony_ci     */
209561847f8eSopenharmony_ci    readDescriptorValue(descriptor: BLEDescriptor, callback: AsyncCallback<BLEDescriptor>): void;
209661847f8eSopenharmony_ci
209761847f8eSopenharmony_ci    /**
209861847f8eSopenharmony_ci     * Reads the descriptor of a BLE peripheral device.
209961847f8eSopenharmony_ci     *
210061847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
210161847f8eSopenharmony_ci     * @param { BLEDescriptor } descriptor - Indicates the descriptor to read.
210261847f8eSopenharmony_ci     * @returns { Promise<BLEDescriptor> } - Promise used to return the descriptor read.
210361847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
210461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
210561847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
210661847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
210761847f8eSopenharmony_ci     * @throws { BusinessError } 2900001 - Service stopped.
210861847f8eSopenharmony_ci     * @throws { BusinessError } 2901000 - Read forbidden.
210961847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
211061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
211161847f8eSopenharmony_ci     * @since 10
211261847f8eSopenharmony_ci     */
211361847f8eSopenharmony_ci    /**
211461847f8eSopenharmony_ci     * Reads the descriptor of a BLE peripheral device.
211561847f8eSopenharmony_ci     *
211661847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
211761847f8eSopenharmony_ci     * @param { BLEDescriptor } descriptor - Indicates the descriptor to read.
211861847f8eSopenharmony_ci     * @returns { Promise<BLEDescriptor> } - Promise used to return the descriptor read.
211961847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
212061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
212161847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
212261847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
212361847f8eSopenharmony_ci     * @throws { BusinessError } 2900001 - Service stopped.
212461847f8eSopenharmony_ci     * @throws { BusinessError } 2901000 - Read forbidden.
212561847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
212661847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
212761847f8eSopenharmony_ci     * @atomicservice
212861847f8eSopenharmony_ci     * @since 12
212961847f8eSopenharmony_ci     */
213061847f8eSopenharmony_ci    /**
213161847f8eSopenharmony_ci     * Reads the descriptor of a BLE peripheral device.
213261847f8eSopenharmony_ci     *
213361847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
213461847f8eSopenharmony_ci     * @param { BLEDescriptor } descriptor - Indicates the descriptor to read.
213561847f8eSopenharmony_ci     * @returns { Promise<BLEDescriptor> } - Promise used to return the descriptor read.
213661847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
213761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
213861847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
213961847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
214061847f8eSopenharmony_ci     * @throws { BusinessError } 2900001 - Service stopped.
214161847f8eSopenharmony_ci     * @throws { BusinessError } 2901000 - Read forbidden.
214261847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
214361847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
214461847f8eSopenharmony_ci     * @crossplatform
214561847f8eSopenharmony_ci     * @atomicservice
214661847f8eSopenharmony_ci     * @since 13
214761847f8eSopenharmony_ci     */
214861847f8eSopenharmony_ci    readDescriptorValue(descriptor: BLEDescriptor): Promise<BLEDescriptor>;
214961847f8eSopenharmony_ci
215061847f8eSopenharmony_ci    /**
215161847f8eSopenharmony_ci     * Writes the characteristic of a BLE peripheral device.
215261847f8eSopenharmony_ci     *
215361847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
215461847f8eSopenharmony_ci     * @param { BLECharacteristic } characteristic - Indicates the characteristic to write.
215561847f8eSopenharmony_ci     * @param { GattWriteType } writeType - Write type of the characteristic.
215661847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - Callback used to return the result.
215761847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
215861847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
215961847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
216061847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
216161847f8eSopenharmony_ci     * @throws { BusinessError } 2900001 - Service stopped.
216261847f8eSopenharmony_ci     * @throws { BusinessError } 2901001 - Write forbidden.
216361847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
216461847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
216561847f8eSopenharmony_ci     * @since 10
216661847f8eSopenharmony_ci     */
216761847f8eSopenharmony_ci    /**
216861847f8eSopenharmony_ci     * Writes the characteristic of a BLE peripheral device.
216961847f8eSopenharmony_ci     *
217061847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
217161847f8eSopenharmony_ci     * @param { BLECharacteristic } characteristic - Indicates the characteristic to write.
217261847f8eSopenharmony_ci     * @param { GattWriteType } writeType - Write type of the characteristic.
217361847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - Callback used to return the result.
217461847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
217561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
217661847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
217761847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
217861847f8eSopenharmony_ci     * @throws { BusinessError } 2900001 - Service stopped.
217961847f8eSopenharmony_ci     * @throws { BusinessError } 2901001 - Write forbidden.
218061847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
218161847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
218261847f8eSopenharmony_ci     * @atomicservice
218361847f8eSopenharmony_ci     * @since 12
218461847f8eSopenharmony_ci     */
218561847f8eSopenharmony_ci    /**
218661847f8eSopenharmony_ci     * Writes the characteristic of a BLE peripheral device.
218761847f8eSopenharmony_ci     *
218861847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
218961847f8eSopenharmony_ci     * @param { BLECharacteristic } characteristic - Indicates the characteristic to write.
219061847f8eSopenharmony_ci     * @param { GattWriteType } writeType - Write type of the characteristic.
219161847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - Callback used to return the result.
219261847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
219361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
219461847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
219561847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
219661847f8eSopenharmony_ci     * @throws { BusinessError } 2900001 - Service stopped.
219761847f8eSopenharmony_ci     * @throws { BusinessError } 2901001 - Write forbidden.
219861847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
219961847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
220061847f8eSopenharmony_ci     * @crossplatform
220161847f8eSopenharmony_ci     * @atomicservice
220261847f8eSopenharmony_ci     * @since 13
220361847f8eSopenharmony_ci     */
220461847f8eSopenharmony_ci    writeCharacteristicValue(
220561847f8eSopenharmony_ci      characteristic: BLECharacteristic,
220661847f8eSopenharmony_ci      writeType: GattWriteType,
220761847f8eSopenharmony_ci      callback: AsyncCallback<void>
220861847f8eSopenharmony_ci    ): void;
220961847f8eSopenharmony_ci
221061847f8eSopenharmony_ci    /**
221161847f8eSopenharmony_ci     * Writes the characteristic of a BLE peripheral device.
221261847f8eSopenharmony_ci     *
221361847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
221461847f8eSopenharmony_ci     * @param { BLECharacteristic } characteristic - Indicates the characteristic to write.
221561847f8eSopenharmony_ci     * @param { GattWriteType } writeType - Write type of the characteristic.
221661847f8eSopenharmony_ci     * @returns { Promise<void> } Promise used to return the result.
221761847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
221861847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
221961847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
222061847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
222161847f8eSopenharmony_ci     * @throws { BusinessError } 2900001 - Service stopped.
222261847f8eSopenharmony_ci     * @throws { BusinessError } 2901001 - Write forbidden.
222361847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
222461847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
222561847f8eSopenharmony_ci     * @since 10
222661847f8eSopenharmony_ci     */
222761847f8eSopenharmony_ci    /**
222861847f8eSopenharmony_ci     * Writes the characteristic of a BLE peripheral device.
222961847f8eSopenharmony_ci     *
223061847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
223161847f8eSopenharmony_ci     * @param { BLECharacteristic } characteristic - Indicates the characteristic to write.
223261847f8eSopenharmony_ci     * @param { GattWriteType } writeType - Write type of the characteristic.
223361847f8eSopenharmony_ci     * @returns { Promise<void> } Promise used to return the result.
223461847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
223561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
223661847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
223761847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
223861847f8eSopenharmony_ci     * @throws { BusinessError } 2900001 - Service stopped.
223961847f8eSopenharmony_ci     * @throws { BusinessError } 2901001 - Write forbidden.
224061847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
224161847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
224261847f8eSopenharmony_ci     * @atomicservice
224361847f8eSopenharmony_ci     * @since 12
224461847f8eSopenharmony_ci     */
224561847f8eSopenharmony_ci    /**
224661847f8eSopenharmony_ci     * Writes the characteristic of a BLE peripheral device.
224761847f8eSopenharmony_ci     *
224861847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
224961847f8eSopenharmony_ci     * @param { BLECharacteristic } characteristic - Indicates the characteristic to write.
225061847f8eSopenharmony_ci     * @param { GattWriteType } writeType - Write type of the characteristic.
225161847f8eSopenharmony_ci     * @returns { Promise<void> } Promise used to return the result.
225261847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
225361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
225461847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
225561847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
225661847f8eSopenharmony_ci     * @throws { BusinessError } 2900001 - Service stopped.
225761847f8eSopenharmony_ci     * @throws { BusinessError } 2901001 - Write forbidden.
225861847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
225961847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
226061847f8eSopenharmony_ci     * @crossplatform
226161847f8eSopenharmony_ci     * @atomicservice
226261847f8eSopenharmony_ci     * @since 13
226361847f8eSopenharmony_ci     */
226461847f8eSopenharmony_ci    writeCharacteristicValue(characteristic: BLECharacteristic, writeType: GattWriteType): Promise<void>;
226561847f8eSopenharmony_ci
226661847f8eSopenharmony_ci    /**
226761847f8eSopenharmony_ci     * Writes the descriptor of a BLE peripheral device.
226861847f8eSopenharmony_ci     *
226961847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
227061847f8eSopenharmony_ci     * @param { BLEDescriptor } descriptor - Indicates the descriptor to write.
227161847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - Callback used to return the result.
227261847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
227361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
227461847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
227561847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
227661847f8eSopenharmony_ci     * @throws { BusinessError } 2900001 - Service stopped.
227761847f8eSopenharmony_ci     * @throws { BusinessError } 2901001 - Write forbidden.
227861847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
227961847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
228061847f8eSopenharmony_ci     * @since 10
228161847f8eSopenharmony_ci     */
228261847f8eSopenharmony_ci    /**
228361847f8eSopenharmony_ci     * Writes the descriptor of a BLE peripheral device.
228461847f8eSopenharmony_ci     *
228561847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
228661847f8eSopenharmony_ci     * @param { BLEDescriptor } descriptor - Indicates the descriptor to write.
228761847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - Callback used to return the result.
228861847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
228961847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
229061847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
229161847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
229261847f8eSopenharmony_ci     * @throws { BusinessError } 2900001 - Service stopped.
229361847f8eSopenharmony_ci     * @throws { BusinessError } 2901001 - Write forbidden.
229461847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
229561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
229661847f8eSopenharmony_ci     * @atomicservice
229761847f8eSopenharmony_ci     * @since 12
229861847f8eSopenharmony_ci     */
229961847f8eSopenharmony_ci    /**
230061847f8eSopenharmony_ci     * Writes the descriptor of a BLE peripheral device.
230161847f8eSopenharmony_ci     *
230261847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
230361847f8eSopenharmony_ci     * @param { BLEDescriptor } descriptor - Indicates the descriptor to write.
230461847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - Callback used to return the result.
230561847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
230661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
230761847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
230861847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
230961847f8eSopenharmony_ci     * @throws { BusinessError } 2900001 - Service stopped.
231061847f8eSopenharmony_ci     * @throws { BusinessError } 2901001 - Write forbidden.
231161847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
231261847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
231361847f8eSopenharmony_ci     * @crossplatform
231461847f8eSopenharmony_ci     * @atomicservice
231561847f8eSopenharmony_ci     * @since 13
231661847f8eSopenharmony_ci     */
231761847f8eSopenharmony_ci    writeDescriptorValue(descriptor: BLEDescriptor, callback: AsyncCallback<void>): void;
231861847f8eSopenharmony_ci
231961847f8eSopenharmony_ci    /**
232061847f8eSopenharmony_ci     * Writes the descriptor of a BLE peripheral device.
232161847f8eSopenharmony_ci     *
232261847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
232361847f8eSopenharmony_ci     * @param { BLEDescriptor } descriptor - Indicates the descriptor to write.
232461847f8eSopenharmony_ci     * @returns { Promise<void> } Promise used to return the result.
232561847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
232661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
232761847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
232861847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
232961847f8eSopenharmony_ci     * @throws { BusinessError } 2900001 - Service stopped.
233061847f8eSopenharmony_ci     * @throws { BusinessError } 2901001 - Write forbidden.
233161847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
233261847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
233361847f8eSopenharmony_ci     * @since 10
233461847f8eSopenharmony_ci     */
233561847f8eSopenharmony_ci    /**
233661847f8eSopenharmony_ci     * Writes the descriptor of a BLE peripheral device.
233761847f8eSopenharmony_ci     *
233861847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
233961847f8eSopenharmony_ci     * @param { BLEDescriptor } descriptor - Indicates the descriptor to write.
234061847f8eSopenharmony_ci     * @returns { Promise<void> } Promise used to return the result.
234161847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
234261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
234361847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
234461847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
234561847f8eSopenharmony_ci     * @throws { BusinessError } 2900001 - Service stopped.
234661847f8eSopenharmony_ci     * @throws { BusinessError } 2901001 - Write forbidden.
234761847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
234861847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
234961847f8eSopenharmony_ci     * @atomicservice
235061847f8eSopenharmony_ci     * @since 12
235161847f8eSopenharmony_ci     */
235261847f8eSopenharmony_ci    /**
235361847f8eSopenharmony_ci     * Writes the descriptor of a BLE peripheral device.
235461847f8eSopenharmony_ci     *
235561847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
235661847f8eSopenharmony_ci     * @param { BLEDescriptor } descriptor - Indicates the descriptor to write.
235761847f8eSopenharmony_ci     * @returns { Promise<void> } Promise used to return the result.
235861847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
235961847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
236061847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
236161847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
236261847f8eSopenharmony_ci     * @throws { BusinessError } 2900001 - Service stopped.
236361847f8eSopenharmony_ci     * @throws { BusinessError } 2901001 - Write forbidden.
236461847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
236561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
236661847f8eSopenharmony_ci     * @crossplatform
236761847f8eSopenharmony_ci     * @atomicservice
236861847f8eSopenharmony_ci     * @since 13
236961847f8eSopenharmony_ci     */
237061847f8eSopenharmony_ci    writeDescriptorValue(descriptor: BLEDescriptor): Promise<void>;
237161847f8eSopenharmony_ci
237261847f8eSopenharmony_ci    /**
237361847f8eSopenharmony_ci     * Get the RSSI value of this BLE peripheral device.
237461847f8eSopenharmony_ci     *
237561847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
237661847f8eSopenharmony_ci     * @param { AsyncCallback<number> } callback - Callback invoked to return the RSSI, in dBm.
237761847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
237861847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
237961847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
238061847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
238161847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
238261847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
238361847f8eSopenharmony_ci     * @since 10
238461847f8eSopenharmony_ci     */
238561847f8eSopenharmony_ci    /**
238661847f8eSopenharmony_ci     * Get the RSSI value of this BLE peripheral device.
238761847f8eSopenharmony_ci     *
238861847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
238961847f8eSopenharmony_ci     * @param { AsyncCallback<number> } callback - Callback invoked to return the RSSI, in dBm.
239061847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
239161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
239261847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
239361847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
239461847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
239561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
239661847f8eSopenharmony_ci     * @atomicservice
239761847f8eSopenharmony_ci     * @since 12
239861847f8eSopenharmony_ci     */
239961847f8eSopenharmony_ci    getRssiValue(callback: AsyncCallback<number>): void;
240061847f8eSopenharmony_ci
240161847f8eSopenharmony_ci    /**
240261847f8eSopenharmony_ci     * Get the RSSI value of this BLE peripheral device.
240361847f8eSopenharmony_ci     *
240461847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
240561847f8eSopenharmony_ci     * @returns { Promise<number> } Returns the RSSI value.
240661847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
240761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
240861847f8eSopenharmony_ci     * <br>2. Incorrect parameter types.
240961847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
241061847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
241161847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
241261847f8eSopenharmony_ci     * @since 10
241361847f8eSopenharmony_ci     */
241461847f8eSopenharmony_ci    /**
241561847f8eSopenharmony_ci     * Get the RSSI value of this BLE peripheral device.
241661847f8eSopenharmony_ci     *
241761847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
241861847f8eSopenharmony_ci     * @returns { Promise<number> } Returns the RSSI value.
241961847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
242061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
242161847f8eSopenharmony_ci     * <br>2. Incorrect parameter types.
242261847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
242361847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
242461847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
242561847f8eSopenharmony_ci     * @atomicservice
242661847f8eSopenharmony_ci     * @since 12
242761847f8eSopenharmony_ci     */
242861847f8eSopenharmony_ci    getRssiValue(): Promise<number>;
242961847f8eSopenharmony_ci
243061847f8eSopenharmony_ci    /**
243161847f8eSopenharmony_ci     * Set the mtu size of a BLE peripheral device.
243261847f8eSopenharmony_ci     *
243361847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
243461847f8eSopenharmony_ci     * @param { number } mtu - The maximum transmission unit.
243561847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
243661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
243761847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
243861847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
243961847f8eSopenharmony_ci     * @throws { BusinessError } 2900001 - Service stopped.
244061847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
244161847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
244261847f8eSopenharmony_ci     * @since 10
244361847f8eSopenharmony_ci     */
244461847f8eSopenharmony_ci    /**
244561847f8eSopenharmony_ci     * Set the mtu size of a BLE peripheral device.
244661847f8eSopenharmony_ci     *
244761847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
244861847f8eSopenharmony_ci     * @param { number } mtu - The maximum transmission unit.
244961847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
245061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
245161847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
245261847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
245361847f8eSopenharmony_ci     * @throws { BusinessError } 2900001 - Service stopped.
245461847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
245561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
245661847f8eSopenharmony_ci     * @atomicservice
245761847f8eSopenharmony_ci     * @since 12
245861847f8eSopenharmony_ci     */
245961847f8eSopenharmony_ci    /**
246061847f8eSopenharmony_ci     * Set the mtu size of a BLE peripheral device.
246161847f8eSopenharmony_ci     *
246261847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
246361847f8eSopenharmony_ci     * @param { number } mtu - The maximum transmission unit.
246461847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
246561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
246661847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
246761847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
246861847f8eSopenharmony_ci     * @throws { BusinessError } 2900001 - Service stopped.
246961847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
247061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
247161847f8eSopenharmony_ci     * @crossplatform
247261847f8eSopenharmony_ci     * @atomicservice
247361847f8eSopenharmony_ci     * @since 13
247461847f8eSopenharmony_ci     */
247561847f8eSopenharmony_ci    setBLEMtuSize(mtu: number): void;
247661847f8eSopenharmony_ci
247761847f8eSopenharmony_ci    /**
247861847f8eSopenharmony_ci     * Enables or disables notification of a characteristic when value changed.
247961847f8eSopenharmony_ci     *
248061847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
248161847f8eSopenharmony_ci     * @param { BLECharacteristic } characteristic - Indicates the characteristic to indicate.
248261847f8eSopenharmony_ci     * @param { boolean } enable - Specifies whether to enable indication of the characteristic. The value {@code true} indicates
248361847f8eSopenharmony_ci     * that notification is enabled, and the value {@code false} indicates that indication is disabled.
248461847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - the callback of setCharacteristicChangeNotification.
248561847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
248661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
248761847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
248861847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
248961847f8eSopenharmony_ci     * @throws { BusinessError } 2900001 - Service stopped.
249061847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
249161847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
249261847f8eSopenharmony_ci     * @since 10
249361847f8eSopenharmony_ci     */
249461847f8eSopenharmony_ci    /**
249561847f8eSopenharmony_ci     * Enables or disables notification of a characteristic when value changed.
249661847f8eSopenharmony_ci     *
249761847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
249861847f8eSopenharmony_ci     * @param { BLECharacteristic } characteristic - Indicates the characteristic to indicate.
249961847f8eSopenharmony_ci     * @param { boolean } enable - Specifies whether to enable indication of the characteristic. The value {@code true} indicates
250061847f8eSopenharmony_ci     * that notification is enabled, and the value {@code false} indicates that indication is disabled.
250161847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - the callback of setCharacteristicChangeNotification.
250261847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
250361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
250461847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
250561847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
250661847f8eSopenharmony_ci     * @throws { BusinessError } 2900001 - Service stopped.
250761847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
250861847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
250961847f8eSopenharmony_ci     * @atomicservice
251061847f8eSopenharmony_ci     * @since 12
251161847f8eSopenharmony_ci     */
251261847f8eSopenharmony_ci    setCharacteristicChangeNotification(
251361847f8eSopenharmony_ci      characteristic: BLECharacteristic,
251461847f8eSopenharmony_ci      enable: boolean,
251561847f8eSopenharmony_ci      callback: AsyncCallback<void>
251661847f8eSopenharmony_ci    ): void;
251761847f8eSopenharmony_ci
251861847f8eSopenharmony_ci    /**
251961847f8eSopenharmony_ci     * Enables or disables indication of a characteristic when value changed.
252061847f8eSopenharmony_ci     *
252161847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
252261847f8eSopenharmony_ci     * @param { BLECharacteristic } characteristic - Indicates the characteristic to indicate.
252361847f8eSopenharmony_ci     * @param { boolean } enable - Specifies whether to enable indication of the characteristic. The value {@code true} indicates
252461847f8eSopenharmony_ci     * that indication is enabled, and the value {@code false} indicates that indication is disabled.
252561847f8eSopenharmony_ci     * @returns { Promise<void> } Returns the promise object.
252661847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
252761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
252861847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
252961847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
253061847f8eSopenharmony_ci     * @throws { BusinessError } 2900001 - Service stopped.
253161847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
253261847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
253361847f8eSopenharmony_ci     * @since 10
253461847f8eSopenharmony_ci     */
253561847f8eSopenharmony_ci    /**
253661847f8eSopenharmony_ci     * Enables or disables indication of a characteristic when value changed.
253761847f8eSopenharmony_ci     *
253861847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
253961847f8eSopenharmony_ci     * @param { BLECharacteristic } characteristic - Indicates the characteristic to indicate.
254061847f8eSopenharmony_ci     * @param { boolean } enable - Specifies whether to enable indication of the characteristic. The value {@code true} indicates
254161847f8eSopenharmony_ci     * that indication is enabled, and the value {@code false} indicates that indication is disabled.
254261847f8eSopenharmony_ci     * @returns { Promise<void> } Returns the promise object.
254361847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
254461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
254561847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
254661847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
254761847f8eSopenharmony_ci     * @throws { BusinessError } 2900001 - Service stopped.
254861847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
254961847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
255061847f8eSopenharmony_ci     * @atomicservice
255161847f8eSopenharmony_ci     * @since 12
255261847f8eSopenharmony_ci     */
255361847f8eSopenharmony_ci    setCharacteristicChangeNotification(characteristic: BLECharacteristic, enable: boolean): Promise<void>;
255461847f8eSopenharmony_ci
255561847f8eSopenharmony_ci    /**
255661847f8eSopenharmony_ci     * Enables or disables indication of a characteristic when value changed.
255761847f8eSopenharmony_ci     *
255861847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
255961847f8eSopenharmony_ci     * @param { BLECharacteristic } characteristic - Indicates the characteristic to indicate.
256061847f8eSopenharmony_ci     * @param { boolean } enable - Specifies whether to enable indication of the characteristic. The value {@code true} indicates
256161847f8eSopenharmony_ci     * that indication is enabled, and the value {@code false} indicates that indication is disabled.
256261847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - the callback of setCharacteristicChangeIndication.
256361847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
256461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
256561847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
256661847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
256761847f8eSopenharmony_ci     * @throws { BusinessError } 2900001 - Service stopped.
256861847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
256961847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
257061847f8eSopenharmony_ci     * @since 10
257161847f8eSopenharmony_ci     */
257261847f8eSopenharmony_ci    /**
257361847f8eSopenharmony_ci     * Enables or disables indication of a characteristic when value changed.
257461847f8eSopenharmony_ci     *
257561847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
257661847f8eSopenharmony_ci     * @param { BLECharacteristic } characteristic - Indicates the characteristic to indicate.
257761847f8eSopenharmony_ci     * @param { boolean } enable - Specifies whether to enable indication of the characteristic. The value {@code true} indicates
257861847f8eSopenharmony_ci     * that indication is enabled, and the value {@code false} indicates that indication is disabled.
257961847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - the callback of setCharacteristicChangeIndication.
258061847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
258161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
258261847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
258361847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
258461847f8eSopenharmony_ci     * @throws { BusinessError } 2900001 - Service stopped.
258561847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
258661847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
258761847f8eSopenharmony_ci     * @atomicservice
258861847f8eSopenharmony_ci     * @since 12
258961847f8eSopenharmony_ci     */
259061847f8eSopenharmony_ci    setCharacteristicChangeIndication(
259161847f8eSopenharmony_ci      characteristic: BLECharacteristic,
259261847f8eSopenharmony_ci      enable: boolean,
259361847f8eSopenharmony_ci      callback: AsyncCallback<void>
259461847f8eSopenharmony_ci    ): void;
259561847f8eSopenharmony_ci
259661847f8eSopenharmony_ci    /**
259761847f8eSopenharmony_ci     * Enables or disables indication of a characteristic when value changed.
259861847f8eSopenharmony_ci     *
259961847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
260061847f8eSopenharmony_ci     * @param { BLECharacteristic } characteristic - Indicates the characteristic to indicate.
260161847f8eSopenharmony_ci     * @param { boolean } enable - Specifies whether to enable indication of the characteristic. The value {@code true} indicates
260261847f8eSopenharmony_ci     * that indication is enabled, and the value {@code false} indicates that indication is disabled.
260361847f8eSopenharmony_ci     * @returns { Promise<void> } Returns the promise object.
260461847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
260561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
260661847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
260761847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
260861847f8eSopenharmony_ci     * @throws { BusinessError } 2900001 - Service stopped.
260961847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
261061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
261161847f8eSopenharmony_ci     * @since 10
261261847f8eSopenharmony_ci     */
261361847f8eSopenharmony_ci    /**
261461847f8eSopenharmony_ci     * Enables or disables indication of a characteristic when value changed.
261561847f8eSopenharmony_ci     *
261661847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
261761847f8eSopenharmony_ci     * @param { BLECharacteristic } characteristic - Indicates the characteristic to indicate.
261861847f8eSopenharmony_ci     * @param { boolean } enable - Specifies whether to enable indication of the characteristic. The value {@code true} indicates
261961847f8eSopenharmony_ci     * that indication is enabled, and the value {@code false} indicates that indication is disabled.
262061847f8eSopenharmony_ci     * @returns { Promise<void> } Returns the promise object.
262161847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
262261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
262361847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
262461847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
262561847f8eSopenharmony_ci     * @throws { BusinessError } 2900001 - Service stopped.
262661847f8eSopenharmony_ci     * @throws { BusinessError } 2900099 - Operation failed.
262761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
262861847f8eSopenharmony_ci     * @atomicservice
262961847f8eSopenharmony_ci     * @since 12
263061847f8eSopenharmony_ci     */
263161847f8eSopenharmony_ci    setCharacteristicChangeIndication(characteristic: BLECharacteristic, enable: boolean): Promise<void>;
263261847f8eSopenharmony_ci
263361847f8eSopenharmony_ci    /**
263461847f8eSopenharmony_ci     * Subscribe characteristic value changed event.
263561847f8eSopenharmony_ci     *
263661847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
263761847f8eSopenharmony_ci     * @param { 'BLECharacteristicChange' } type - Type of the characteristic value changed event to listen for.
263861847f8eSopenharmony_ci     * @param { Callback<BLECharacteristic> } callback - Callback used to listen for the characteristic value changed event.
263961847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
264061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
264161847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
264261847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
264361847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
264461847f8eSopenharmony_ci     * @since 10
264561847f8eSopenharmony_ci     */
264661847f8eSopenharmony_ci    /**
264761847f8eSopenharmony_ci     * Subscribe characteristic value changed event.
264861847f8eSopenharmony_ci     *
264961847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
265061847f8eSopenharmony_ci     * @param { 'BLECharacteristicChange' } type - Type of the characteristic value changed event to listen for.
265161847f8eSopenharmony_ci     * @param { Callback<BLECharacteristic> } callback - Callback used to listen for the characteristic value changed event.
265261847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
265361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
265461847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
265561847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
265661847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
265761847f8eSopenharmony_ci     * @atomicservice
265861847f8eSopenharmony_ci     * @since 12
265961847f8eSopenharmony_ci     */
266061847f8eSopenharmony_ci    on(type: 'BLECharacteristicChange', callback: Callback<BLECharacteristic>): void;
266161847f8eSopenharmony_ci
266261847f8eSopenharmony_ci    /**
266361847f8eSopenharmony_ci     * Unsubscribe characteristic value changed event.
266461847f8eSopenharmony_ci     *
266561847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
266661847f8eSopenharmony_ci     * @param { 'BLECharacteristicChange' } type - Type of the characteristic value changed event to listen for.
266761847f8eSopenharmony_ci     * @param { Callback<BLECharacteristic> } callback - Callback used to listen for the characteristic value changed event.
266861847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
266961847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
267061847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
267161847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
267261847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
267361847f8eSopenharmony_ci     * @since 10
267461847f8eSopenharmony_ci     */
267561847f8eSopenharmony_ci    /**
267661847f8eSopenharmony_ci     * Unsubscribe characteristic value changed event.
267761847f8eSopenharmony_ci     *
267861847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
267961847f8eSopenharmony_ci     * @param { 'BLECharacteristicChange' } type - Type of the characteristic value changed event to listen for.
268061847f8eSopenharmony_ci     * @param { Callback<BLECharacteristic> } callback - Callback used to listen for the characteristic value changed event.
268161847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
268261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
268361847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
268461847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
268561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
268661847f8eSopenharmony_ci     * @atomicservice
268761847f8eSopenharmony_ci     * @since 12
268861847f8eSopenharmony_ci     */
268961847f8eSopenharmony_ci    off(type: 'BLECharacteristicChange', callback?: Callback<BLECharacteristic>): void;
269061847f8eSopenharmony_ci
269161847f8eSopenharmony_ci    /**
269261847f8eSopenharmony_ci     * Subscribe client connection state changed event.
269361847f8eSopenharmony_ci     *
269461847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
269561847f8eSopenharmony_ci     * @param { 'BLEConnectionStateChange' } type - Type of the connection state changed event to listen for.
269661847f8eSopenharmony_ci     * @param { Callback<BLEConnectionChangeState> } callback - Callback used to listen for the connection state changed event.
269761847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
269861847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
269961847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
270061847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
270161847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
270261847f8eSopenharmony_ci     * @since 10
270361847f8eSopenharmony_ci     */
270461847f8eSopenharmony_ci    /**
270561847f8eSopenharmony_ci     * Subscribe client connection state changed event.
270661847f8eSopenharmony_ci     *
270761847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
270861847f8eSopenharmony_ci     * @param { 'BLEConnectionStateChange' } type - Type of the connection state changed event to listen for.
270961847f8eSopenharmony_ci     * @param { Callback<BLEConnectionChangeState> } callback - Callback used to listen for the connection state changed event.
271061847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
271161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
271261847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
271361847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
271461847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
271561847f8eSopenharmony_ci     * @atomicservice
271661847f8eSopenharmony_ci     * @since 12
271761847f8eSopenharmony_ci     */
271861847f8eSopenharmony_ci    /**
271961847f8eSopenharmony_ci     * Subscribe client connection state changed event.
272061847f8eSopenharmony_ci     *
272161847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
272261847f8eSopenharmony_ci     * @param { 'BLEConnectionStateChange' } type - Type of the connection state changed event to listen for.
272361847f8eSopenharmony_ci     * @param { Callback<BLEConnectionChangeState> } callback - Callback used to listen for the connection state changed event.
272461847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
272561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
272661847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
272761847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
272861847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
272961847f8eSopenharmony_ci     * @crossplatform
273061847f8eSopenharmony_ci     * @atomicservice
273161847f8eSopenharmony_ci     * @since 13
273261847f8eSopenharmony_ci     */
273361847f8eSopenharmony_ci    on(type: 'BLEConnectionStateChange', callback: Callback<BLEConnectionChangeState>): void;
273461847f8eSopenharmony_ci
273561847f8eSopenharmony_ci    /**
273661847f8eSopenharmony_ci     * Unsubscribe client connection state changed event.
273761847f8eSopenharmony_ci     *
273861847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
273961847f8eSopenharmony_ci     * @param { 'BLEConnectionStateChange' } type - Type of the connection state changed event to listen for.
274061847f8eSopenharmony_ci     * @param { Callback<BLEConnectionChangeState> } callback - Callback used to listen for the connection state changed event.
274161847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
274261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
274361847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
274461847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
274561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
274661847f8eSopenharmony_ci     * @since 10
274761847f8eSopenharmony_ci     */
274861847f8eSopenharmony_ci    /**
274961847f8eSopenharmony_ci     * Unsubscribe client connection state changed event.
275061847f8eSopenharmony_ci     *
275161847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
275261847f8eSopenharmony_ci     * @param { 'BLEConnectionStateChange' } type - Type of the connection state changed event to listen for.
275361847f8eSopenharmony_ci     * @param { Callback<BLEConnectionChangeState> } callback - Callback used to listen for the connection state changed event.
275461847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
275561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
275661847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
275761847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
275861847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
275961847f8eSopenharmony_ci     * @atomicservice
276061847f8eSopenharmony_ci     * @since 12
276161847f8eSopenharmony_ci     */
276261847f8eSopenharmony_ci    /**
276361847f8eSopenharmony_ci     * Unsubscribe client connection state changed event.
276461847f8eSopenharmony_ci     *
276561847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
276661847f8eSopenharmony_ci     * @param { 'BLEConnectionStateChange' } type - Type of the connection state changed event to listen for.
276761847f8eSopenharmony_ci     * @param { Callback<BLEConnectionChangeState> } callback - Callback used to listen for the connection state changed event.
276861847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
276961847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
277061847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
277161847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
277261847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
277361847f8eSopenharmony_ci     * @crossplatform
277461847f8eSopenharmony_ci     * @atomicservice
277561847f8eSopenharmony_ci     * @since 13
277661847f8eSopenharmony_ci     */
277761847f8eSopenharmony_ci    off(type: 'BLEConnectionStateChange', callback?: Callback<BLEConnectionChangeState>): void;
277861847f8eSopenharmony_ci
277961847f8eSopenharmony_ci    /**
278061847f8eSopenharmony_ci     * Subscribe mtu changed event.
278161847f8eSopenharmony_ci     *
278261847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
278361847f8eSopenharmony_ci     * @param { 'BLEMtuChange' } type - Type of the mtu changed event to listen for.
278461847f8eSopenharmony_ci     * @param { Callback<number> } callback - Callback used to listen for the mtu changed event.
278561847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
278661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
278761847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
278861847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
278961847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
279061847f8eSopenharmony_ci     * @since 10
279161847f8eSopenharmony_ci     */
279261847f8eSopenharmony_ci    /**
279361847f8eSopenharmony_ci     * Subscribe mtu changed event.
279461847f8eSopenharmony_ci     *
279561847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
279661847f8eSopenharmony_ci     * @param { 'BLEMtuChange' } type - Type of the mtu changed event to listen for.
279761847f8eSopenharmony_ci     * @param { Callback<number> } callback - Callback used to listen for the mtu changed event.
279861847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
279961847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
280061847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
280161847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
280261847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
280361847f8eSopenharmony_ci     * @atomicservice
280461847f8eSopenharmony_ci     * @since 12
280561847f8eSopenharmony_ci     */
280661847f8eSopenharmony_ci    /**
280761847f8eSopenharmony_ci     * Subscribe mtu changed event.
280861847f8eSopenharmony_ci     *
280961847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
281061847f8eSopenharmony_ci     * @param { 'BLEMtuChange' } type - Type of the mtu changed event to listen for.
281161847f8eSopenharmony_ci     * @param { Callback<number> } callback - Callback used to listen for the mtu changed event.
281261847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
281361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
281461847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
281561847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
281661847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
281761847f8eSopenharmony_ci     * @crossplatform
281861847f8eSopenharmony_ci     * @atomicservice
281961847f8eSopenharmony_ci     * @since 13
282061847f8eSopenharmony_ci     */
282161847f8eSopenharmony_ci    on(type: 'BLEMtuChange', callback: Callback<number>): void;
282261847f8eSopenharmony_ci
282361847f8eSopenharmony_ci    /**
282461847f8eSopenharmony_ci     * Unsubscribe mtu changed event.
282561847f8eSopenharmony_ci     *
282661847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
282761847f8eSopenharmony_ci     * @param { 'BLEMtuChange' } type - Type of the mtu changed event to listen for.
282861847f8eSopenharmony_ci     * @param { Callback<number> } callback - Callback used to listen for the mtu changed event.
282961847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
283061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
283161847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
283261847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
283361847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
283461847f8eSopenharmony_ci     * @since 10
283561847f8eSopenharmony_ci     */
283661847f8eSopenharmony_ci    /**
283761847f8eSopenharmony_ci     * Unsubscribe mtu changed event.
283861847f8eSopenharmony_ci     *
283961847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
284061847f8eSopenharmony_ci     * @param { 'BLEMtuChange' } type - Type of the mtu changed event to listen for.
284161847f8eSopenharmony_ci     * @param { Callback<number> } callback - Callback used to listen for the mtu changed event.
284261847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
284361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
284461847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
284561847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
284661847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
284761847f8eSopenharmony_ci     * @atomicservice
284861847f8eSopenharmony_ci     * @since 12
284961847f8eSopenharmony_ci     */
285061847f8eSopenharmony_ci    /**
285161847f8eSopenharmony_ci     * Unsubscribe mtu changed event.
285261847f8eSopenharmony_ci     *
285361847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_BLUETOOTH
285461847f8eSopenharmony_ci     * @param { 'BLEMtuChange' } type - Type of the mtu changed event to listen for.
285561847f8eSopenharmony_ci     * @param { Callback<number> } callback - Callback used to listen for the mtu changed event.
285661847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
285761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
285861847f8eSopenharmony_ci     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
285961847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
286061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
286161847f8eSopenharmony_ci     * @crossplatform
286261847f8eSopenharmony_ci     * @atomicservice
286361847f8eSopenharmony_ci     * @since 13
286461847f8eSopenharmony_ci     */
286561847f8eSopenharmony_ci    off(type: 'BLEMtuChange', callback?: Callback<number>): void;
286661847f8eSopenharmony_ci  }
286761847f8eSopenharmony_ci
286861847f8eSopenharmony_ci  /**
286961847f8eSopenharmony_ci   * Describes the Gatt service.
287061847f8eSopenharmony_ci   *
287161847f8eSopenharmony_ci   * @typedef GattService
287261847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
287361847f8eSopenharmony_ci   * @since 10
287461847f8eSopenharmony_ci   */
287561847f8eSopenharmony_ci  /**
287661847f8eSopenharmony_ci   * Describes the Gatt service.
287761847f8eSopenharmony_ci   *
287861847f8eSopenharmony_ci   * @typedef GattService
287961847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
288061847f8eSopenharmony_ci   * @atomicservice
288161847f8eSopenharmony_ci   * @since 12
288261847f8eSopenharmony_ci   */
288361847f8eSopenharmony_ci  /**
288461847f8eSopenharmony_ci   * Describes the Gatt service.
288561847f8eSopenharmony_ci   *
288661847f8eSopenharmony_ci   * @typedef GattService
288761847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
288861847f8eSopenharmony_ci   * @crossplatform
288961847f8eSopenharmony_ci   * @atomicservice
289061847f8eSopenharmony_ci   * @since 13
289161847f8eSopenharmony_ci   */
289261847f8eSopenharmony_ci  interface GattService {
289361847f8eSopenharmony_ci    /**
289461847f8eSopenharmony_ci     * The UUID of a GattService instance
289561847f8eSopenharmony_ci     *
289661847f8eSopenharmony_ci     * @type { string }
289761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
289861847f8eSopenharmony_ci     * @since 10
289961847f8eSopenharmony_ci     */
290061847f8eSopenharmony_ci    /**
290161847f8eSopenharmony_ci     * The UUID of a GattService instance
290261847f8eSopenharmony_ci     *
290361847f8eSopenharmony_ci     * @type { string }
290461847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
290561847f8eSopenharmony_ci     * @atomicservice
290661847f8eSopenharmony_ci     * @since 12
290761847f8eSopenharmony_ci     */
290861847f8eSopenharmony_ci    /**
290961847f8eSopenharmony_ci     * The UUID of a GattService instance
291061847f8eSopenharmony_ci     *
291161847f8eSopenharmony_ci     * @type { string }
291261847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
291361847f8eSopenharmony_ci     * @crossplatform
291461847f8eSopenharmony_ci     * @atomicservice
291561847f8eSopenharmony_ci     * @since 13
291661847f8eSopenharmony_ci     */
291761847f8eSopenharmony_ci    serviceUuid: string;
291861847f8eSopenharmony_ci    /**
291961847f8eSopenharmony_ci     * Indicates whether the GattService instance is primary or secondary.
292061847f8eSopenharmony_ci     *
292161847f8eSopenharmony_ci     * @type { boolean }
292261847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
292361847f8eSopenharmony_ci     * @since 10
292461847f8eSopenharmony_ci     */
292561847f8eSopenharmony_ci    /**
292661847f8eSopenharmony_ci     * Indicates whether the GattService instance is primary or secondary.
292761847f8eSopenharmony_ci     *
292861847f8eSopenharmony_ci     * @type { boolean }
292961847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
293061847f8eSopenharmony_ci     * @atomicservice
293161847f8eSopenharmony_ci     * @since 12
293261847f8eSopenharmony_ci     */
293361847f8eSopenharmony_ci    /**
293461847f8eSopenharmony_ci     * Indicates whether the GattService instance is primary or secondary.
293561847f8eSopenharmony_ci     *
293661847f8eSopenharmony_ci     * @type { boolean }
293761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
293861847f8eSopenharmony_ci     * @crossplatform
293961847f8eSopenharmony_ci     * @atomicservice
294061847f8eSopenharmony_ci     * @since 13
294161847f8eSopenharmony_ci     */
294261847f8eSopenharmony_ci    isPrimary: boolean;
294361847f8eSopenharmony_ci    /**
294461847f8eSopenharmony_ci     * The {@link BLECharacteristic} list belongs to this GattService instance
294561847f8eSopenharmony_ci     *
294661847f8eSopenharmony_ci     * @type { Array<BLECharacteristic> }
294761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
294861847f8eSopenharmony_ci     * @since 10
294961847f8eSopenharmony_ci     */
295061847f8eSopenharmony_ci    /**
295161847f8eSopenharmony_ci     * The {@link BLECharacteristic} list belongs to this GattService instance
295261847f8eSopenharmony_ci     *
295361847f8eSopenharmony_ci     * @type { Array<BLECharacteristic> }
295461847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
295561847f8eSopenharmony_ci     * @atomicservice
295661847f8eSopenharmony_ci     * @since 12
295761847f8eSopenharmony_ci     */
295861847f8eSopenharmony_ci    /**
295961847f8eSopenharmony_ci     * The {@link BLECharacteristic} list belongs to this GattService instance
296061847f8eSopenharmony_ci     *
296161847f8eSopenharmony_ci     * @type { Array<BLECharacteristic> }
296261847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
296361847f8eSopenharmony_ci     * @crossplatform
296461847f8eSopenharmony_ci     * @atomicservice
296561847f8eSopenharmony_ci     * @since 13
296661847f8eSopenharmony_ci     */
296761847f8eSopenharmony_ci    characteristics: Array<BLECharacteristic>;
296861847f8eSopenharmony_ci    /**
296961847f8eSopenharmony_ci     * The list of GATT services contained in the service
297061847f8eSopenharmony_ci     *
297161847f8eSopenharmony_ci     * @type { ?Array<GattService> }
297261847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
297361847f8eSopenharmony_ci     * @since 10
297461847f8eSopenharmony_ci     */
297561847f8eSopenharmony_ci    /**
297661847f8eSopenharmony_ci     * The list of GATT services contained in the service
297761847f8eSopenharmony_ci     *
297861847f8eSopenharmony_ci     * @type { ?Array<GattService> }
297961847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
298061847f8eSopenharmony_ci     * @atomicservice
298161847f8eSopenharmony_ci     * @since 12
298261847f8eSopenharmony_ci     */
298361847f8eSopenharmony_ci    includeServices?: Array<GattService>;
298461847f8eSopenharmony_ci  }
298561847f8eSopenharmony_ci
298661847f8eSopenharmony_ci  /**
298761847f8eSopenharmony_ci   * Describes the Gatt characteristic.
298861847f8eSopenharmony_ci   *
298961847f8eSopenharmony_ci   * @typedef BLECharacteristic
299061847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
299161847f8eSopenharmony_ci   * @since 10
299261847f8eSopenharmony_ci   */
299361847f8eSopenharmony_ci  /**
299461847f8eSopenharmony_ci   * Describes the Gatt characteristic.
299561847f8eSopenharmony_ci   *
299661847f8eSopenharmony_ci   * @typedef BLECharacteristic
299761847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
299861847f8eSopenharmony_ci   * @atomicservice
299961847f8eSopenharmony_ci   * @since 12
300061847f8eSopenharmony_ci   */
300161847f8eSopenharmony_ci  /**
300261847f8eSopenharmony_ci   * Describes the Gatt characteristic.
300361847f8eSopenharmony_ci   *
300461847f8eSopenharmony_ci   * @typedef BLECharacteristic
300561847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
300661847f8eSopenharmony_ci   * @crossplatform
300761847f8eSopenharmony_ci   * @atomicservice
300861847f8eSopenharmony_ci   * @since 13
300961847f8eSopenharmony_ci   */
301061847f8eSopenharmony_ci  interface BLECharacteristic {
301161847f8eSopenharmony_ci    /**
301261847f8eSopenharmony_ci     * The UUID of the {@link GattService} instance to which the characteristic belongs
301361847f8eSopenharmony_ci     *
301461847f8eSopenharmony_ci     * @type { string }
301561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
301661847f8eSopenharmony_ci     * @since 10
301761847f8eSopenharmony_ci     */
301861847f8eSopenharmony_ci    /**
301961847f8eSopenharmony_ci     * The UUID of the {@link GattService} instance to which the characteristic belongs
302061847f8eSopenharmony_ci     *
302161847f8eSopenharmony_ci     * @type { string }
302261847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
302361847f8eSopenharmony_ci     * @atomicservice
302461847f8eSopenharmony_ci     * @since 12
302561847f8eSopenharmony_ci     */
302661847f8eSopenharmony_ci    /**
302761847f8eSopenharmony_ci     * The UUID of the {@link GattService} instance to which the characteristic belongs
302861847f8eSopenharmony_ci     *
302961847f8eSopenharmony_ci     * @type { string }
303061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
303161847f8eSopenharmony_ci     * @crossplatform
303261847f8eSopenharmony_ci     * @atomicservice
303361847f8eSopenharmony_ci     * @since 13
303461847f8eSopenharmony_ci     */
303561847f8eSopenharmony_ci    serviceUuid: string;
303661847f8eSopenharmony_ci    /**
303761847f8eSopenharmony_ci     * The UUID of a BLECharacteristic instance
303861847f8eSopenharmony_ci     *
303961847f8eSopenharmony_ci     * @type { string }
304061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
304161847f8eSopenharmony_ci     * @since 10
304261847f8eSopenharmony_ci     */
304361847f8eSopenharmony_ci    /**
304461847f8eSopenharmony_ci     * The UUID of a BLECharacteristic instance
304561847f8eSopenharmony_ci     *
304661847f8eSopenharmony_ci     * @type { string }
304761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
304861847f8eSopenharmony_ci     * @atomicservice
304961847f8eSopenharmony_ci     * @since 12
305061847f8eSopenharmony_ci     */
305161847f8eSopenharmony_ci    /**
305261847f8eSopenharmony_ci     * The UUID of a BLECharacteristic instance
305361847f8eSopenharmony_ci     *
305461847f8eSopenharmony_ci     * @type { string }
305561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
305661847f8eSopenharmony_ci     * @crossplatform
305761847f8eSopenharmony_ci     * @atomicservice
305861847f8eSopenharmony_ci     * @since 13
305961847f8eSopenharmony_ci     */
306061847f8eSopenharmony_ci    characteristicUuid: string;
306161847f8eSopenharmony_ci    /**
306261847f8eSopenharmony_ci     * The value of a BLECharacteristic instance
306361847f8eSopenharmony_ci     *
306461847f8eSopenharmony_ci     * @type { ArrayBuffer }
306561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
306661847f8eSopenharmony_ci     * @since 10
306761847f8eSopenharmony_ci     */
306861847f8eSopenharmony_ci    /**
306961847f8eSopenharmony_ci     * The value of a BLECharacteristic instance
307061847f8eSopenharmony_ci     *
307161847f8eSopenharmony_ci     * @type { ArrayBuffer }
307261847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
307361847f8eSopenharmony_ci     * @atomicservice
307461847f8eSopenharmony_ci     * @since 12
307561847f8eSopenharmony_ci     */
307661847f8eSopenharmony_ci    /**
307761847f8eSopenharmony_ci     * The value of a BLECharacteristic instance
307861847f8eSopenharmony_ci     *
307961847f8eSopenharmony_ci     * @type { ArrayBuffer }
308061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
308161847f8eSopenharmony_ci     * @crossplatform
308261847f8eSopenharmony_ci     * @atomicservice
308361847f8eSopenharmony_ci     * @since 13
308461847f8eSopenharmony_ci     */
308561847f8eSopenharmony_ci    characteristicValue: ArrayBuffer;
308661847f8eSopenharmony_ci    /**
308761847f8eSopenharmony_ci     * The list of {@link BLEDescriptor} contained in the characteristic
308861847f8eSopenharmony_ci     *
308961847f8eSopenharmony_ci     * @type { Array<BLEDescriptor> }
309061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
309161847f8eSopenharmony_ci     * @since 10
309261847f8eSopenharmony_ci     */
309361847f8eSopenharmony_ci    /**
309461847f8eSopenharmony_ci     * The list of {@link BLEDescriptor} contained in the characteristic
309561847f8eSopenharmony_ci     *
309661847f8eSopenharmony_ci     * @type { Array<BLEDescriptor> }
309761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
309861847f8eSopenharmony_ci     * @atomicservice
309961847f8eSopenharmony_ci     * @since 12
310061847f8eSopenharmony_ci     */
310161847f8eSopenharmony_ci    /**
310261847f8eSopenharmony_ci     * The list of {@link BLEDescriptor} contained in the characteristic
310361847f8eSopenharmony_ci     *
310461847f8eSopenharmony_ci     * @type { Array<BLEDescriptor> }
310561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
310661847f8eSopenharmony_ci     * @crossplatform
310761847f8eSopenharmony_ci     * @atomicservice
310861847f8eSopenharmony_ci     * @since 13
310961847f8eSopenharmony_ci     */
311061847f8eSopenharmony_ci    descriptors: Array<BLEDescriptor>;
311161847f8eSopenharmony_ci    /**
311261847f8eSopenharmony_ci     * The properties of a BLECharacteristic instance
311361847f8eSopenharmony_ci     *
311461847f8eSopenharmony_ci     * @type { ?GattProperties }
311561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
311661847f8eSopenharmony_ci     * @since 10
311761847f8eSopenharmony_ci     */
311861847f8eSopenharmony_ci    /**
311961847f8eSopenharmony_ci     * The properties of a BLECharacteristic instance
312061847f8eSopenharmony_ci     *
312161847f8eSopenharmony_ci     * @type { ?GattProperties }
312261847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
312361847f8eSopenharmony_ci     * @atomicservice
312461847f8eSopenharmony_ci     * @since 12
312561847f8eSopenharmony_ci     */
312661847f8eSopenharmony_ci    /**
312761847f8eSopenharmony_ci     * The properties of a BLECharacteristic instance
312861847f8eSopenharmony_ci     *
312961847f8eSopenharmony_ci     * @type { ?GattProperties }
313061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
313161847f8eSopenharmony_ci     * @crossplatform
313261847f8eSopenharmony_ci     * @atomicservice
313361847f8eSopenharmony_ci     * @since 13
313461847f8eSopenharmony_ci     */
313561847f8eSopenharmony_ci    properties?: GattProperties;
313661847f8eSopenharmony_ci  }
313761847f8eSopenharmony_ci
313861847f8eSopenharmony_ci  /**
313961847f8eSopenharmony_ci   * Describes the Gatt descriptor.
314061847f8eSopenharmony_ci   *
314161847f8eSopenharmony_ci   * @typedef BLEDescriptor
314261847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
314361847f8eSopenharmony_ci   * @since 10
314461847f8eSopenharmony_ci   */
314561847f8eSopenharmony_ci  /**
314661847f8eSopenharmony_ci   * Describes the Gatt descriptor.
314761847f8eSopenharmony_ci   *
314861847f8eSopenharmony_ci   * @typedef BLEDescriptor
314961847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
315061847f8eSopenharmony_ci   * @atomicservice
315161847f8eSopenharmony_ci   * @since 12
315261847f8eSopenharmony_ci   */
315361847f8eSopenharmony_ci  /**
315461847f8eSopenharmony_ci   * Describes the Gatt descriptor.
315561847f8eSopenharmony_ci   *
315661847f8eSopenharmony_ci   * @typedef BLEDescriptor
315761847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
315861847f8eSopenharmony_ci   * @crossplatform
315961847f8eSopenharmony_ci   * @atomicservice
316061847f8eSopenharmony_ci   * @since 13
316161847f8eSopenharmony_ci   */
316261847f8eSopenharmony_ci  interface BLEDescriptor {
316361847f8eSopenharmony_ci    /**
316461847f8eSopenharmony_ci     * The UUID of the {@link GattService} instance to which the descriptor belongs
316561847f8eSopenharmony_ci     *
316661847f8eSopenharmony_ci     * @type { string }
316761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
316861847f8eSopenharmony_ci     * @since 10
316961847f8eSopenharmony_ci     */
317061847f8eSopenharmony_ci    /**
317161847f8eSopenharmony_ci     * The UUID of the {@link GattService} instance to which the descriptor belongs
317261847f8eSopenharmony_ci     *
317361847f8eSopenharmony_ci     * @type { string }
317461847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
317561847f8eSopenharmony_ci     * @atomicservice
317661847f8eSopenharmony_ci     * @since 12
317761847f8eSopenharmony_ci     */
317861847f8eSopenharmony_ci    /**
317961847f8eSopenharmony_ci     * The UUID of the {@link GattService} instance to which the descriptor belongs
318061847f8eSopenharmony_ci     *
318161847f8eSopenharmony_ci     * @type { string }
318261847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
318361847f8eSopenharmony_ci     * @crossplatform
318461847f8eSopenharmony_ci     * @atomicservice
318561847f8eSopenharmony_ci     * @since 13
318661847f8eSopenharmony_ci     */
318761847f8eSopenharmony_ci    serviceUuid: string;
318861847f8eSopenharmony_ci    /**
318961847f8eSopenharmony_ci     * The UUID of the {@link BLECharacteristic} instance to which the descriptor belongs
319061847f8eSopenharmony_ci     *
319161847f8eSopenharmony_ci     * @type { string }
319261847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
319361847f8eSopenharmony_ci     * @since 10
319461847f8eSopenharmony_ci     */
319561847f8eSopenharmony_ci    /**
319661847f8eSopenharmony_ci     * The UUID of the {@link BLECharacteristic} instance to which the descriptor belongs
319761847f8eSopenharmony_ci     *
319861847f8eSopenharmony_ci     * @type { string }
319961847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
320061847f8eSopenharmony_ci     * @atomicservice
320161847f8eSopenharmony_ci     * @since 12
320261847f8eSopenharmony_ci     */
320361847f8eSopenharmony_ci    /**
320461847f8eSopenharmony_ci     * The UUID of the {@link BLECharacteristic} instance to which the descriptor belongs
320561847f8eSopenharmony_ci     *
320661847f8eSopenharmony_ci     * @type { string }
320761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
320861847f8eSopenharmony_ci     * @crossplatform
320961847f8eSopenharmony_ci     * @atomicservice
321061847f8eSopenharmony_ci     * @since 13
321161847f8eSopenharmony_ci     */
321261847f8eSopenharmony_ci    characteristicUuid: string;
321361847f8eSopenharmony_ci    /**
321461847f8eSopenharmony_ci     * The UUID of the BLEDescriptor instance
321561847f8eSopenharmony_ci     *
321661847f8eSopenharmony_ci     * @type { string }
321761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
321861847f8eSopenharmony_ci     * @since 10
321961847f8eSopenharmony_ci     */
322061847f8eSopenharmony_ci    /**
322161847f8eSopenharmony_ci     * The UUID of the BLEDescriptor instance
322261847f8eSopenharmony_ci     *
322361847f8eSopenharmony_ci     * @type { string }
322461847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
322561847f8eSopenharmony_ci     * @atomicservice
322661847f8eSopenharmony_ci     * @since 12
322761847f8eSopenharmony_ci     */
322861847f8eSopenharmony_ci    /**
322961847f8eSopenharmony_ci     * The UUID of the BLEDescriptor instance
323061847f8eSopenharmony_ci     *
323161847f8eSopenharmony_ci     * @type { string }
323261847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
323361847f8eSopenharmony_ci     * @crossplatform
323461847f8eSopenharmony_ci     * @atomicservice
323561847f8eSopenharmony_ci     * @since 13
323661847f8eSopenharmony_ci     */
323761847f8eSopenharmony_ci    descriptorUuid: string;
323861847f8eSopenharmony_ci    /**
323961847f8eSopenharmony_ci     * The value of the BLEDescriptor instance
324061847f8eSopenharmony_ci     *
324161847f8eSopenharmony_ci     * @type { ArrayBuffer }
324261847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
324361847f8eSopenharmony_ci     * @since 10
324461847f8eSopenharmony_ci     */
324561847f8eSopenharmony_ci    /**
324661847f8eSopenharmony_ci     * The value of the BLEDescriptor instance
324761847f8eSopenharmony_ci     *
324861847f8eSopenharmony_ci     * @type { ArrayBuffer }
324961847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
325061847f8eSopenharmony_ci     * @atomicservice
325161847f8eSopenharmony_ci     * @since 12
325261847f8eSopenharmony_ci     */
325361847f8eSopenharmony_ci    /**
325461847f8eSopenharmony_ci     * The value of the BLEDescriptor instance
325561847f8eSopenharmony_ci     *
325661847f8eSopenharmony_ci     * @type { ArrayBuffer }
325761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
325861847f8eSopenharmony_ci     * @crossplatform
325961847f8eSopenharmony_ci     * @atomicservice
326061847f8eSopenharmony_ci     * @since 13
326161847f8eSopenharmony_ci     */
326261847f8eSopenharmony_ci    descriptorValue: ArrayBuffer;
326361847f8eSopenharmony_ci  }
326461847f8eSopenharmony_ci
326561847f8eSopenharmony_ci  /**
326661847f8eSopenharmony_ci   * Describes the value of the indication or notification sent by the Gatt server.
326761847f8eSopenharmony_ci   *
326861847f8eSopenharmony_ci   * @typedef NotifyCharacteristic
326961847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
327061847f8eSopenharmony_ci   * @since 10
327161847f8eSopenharmony_ci   */
327261847f8eSopenharmony_ci  /**
327361847f8eSopenharmony_ci   * Describes the value of the indication or notification sent by the Gatt server.
327461847f8eSopenharmony_ci   *
327561847f8eSopenharmony_ci   * @typedef NotifyCharacteristic
327661847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
327761847f8eSopenharmony_ci   * @atomicservice
327861847f8eSopenharmony_ci   * @since 12
327961847f8eSopenharmony_ci   */
328061847f8eSopenharmony_ci  /**
328161847f8eSopenharmony_ci   * Describes the value of the indication or notification sent by the Gatt server.
328261847f8eSopenharmony_ci   *
328361847f8eSopenharmony_ci   * @typedef NotifyCharacteristic
328461847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
328561847f8eSopenharmony_ci   * @crossplatform
328661847f8eSopenharmony_ci   * @atomicservice
328761847f8eSopenharmony_ci   * @since 13
328861847f8eSopenharmony_ci   */
328961847f8eSopenharmony_ci  interface NotifyCharacteristic {
329061847f8eSopenharmony_ci    /**
329161847f8eSopenharmony_ci     * The UUID of the {@link GattService} instance to which the characteristic belongs
329261847f8eSopenharmony_ci     *
329361847f8eSopenharmony_ci     * @type { string }
329461847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
329561847f8eSopenharmony_ci     * @since 10
329661847f8eSopenharmony_ci     */
329761847f8eSopenharmony_ci    /**
329861847f8eSopenharmony_ci     * The UUID of the {@link GattService} instance to which the characteristic belongs
329961847f8eSopenharmony_ci     *
330061847f8eSopenharmony_ci     * @type { string }
330161847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
330261847f8eSopenharmony_ci     * @atomicservice
330361847f8eSopenharmony_ci     * @since 12
330461847f8eSopenharmony_ci     */
330561847f8eSopenharmony_ci    /**
330661847f8eSopenharmony_ci     * The UUID of the {@link GattService} instance to which the characteristic belongs
330761847f8eSopenharmony_ci     *
330861847f8eSopenharmony_ci     * @type { string }
330961847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
331061847f8eSopenharmony_ci     * @crossplatform
331161847f8eSopenharmony_ci     * @atomicservice
331261847f8eSopenharmony_ci     * @since 13
331361847f8eSopenharmony_ci     */
331461847f8eSopenharmony_ci    serviceUuid: string;
331561847f8eSopenharmony_ci    /**
331661847f8eSopenharmony_ci     * The UUID of a NotifyCharacteristic instance
331761847f8eSopenharmony_ci     *
331861847f8eSopenharmony_ci     * @type { string }
331961847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
332061847f8eSopenharmony_ci     * @since 10
332161847f8eSopenharmony_ci     */
332261847f8eSopenharmony_ci    /**
332361847f8eSopenharmony_ci     * The UUID of a NotifyCharacteristic instance
332461847f8eSopenharmony_ci     *
332561847f8eSopenharmony_ci     * @type { string }
332661847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
332761847f8eSopenharmony_ci     * @atomicservice
332861847f8eSopenharmony_ci     * @since 12
332961847f8eSopenharmony_ci     */
333061847f8eSopenharmony_ci    /**
333161847f8eSopenharmony_ci     * The UUID of a NotifyCharacteristic instance
333261847f8eSopenharmony_ci     *
333361847f8eSopenharmony_ci     * @type { string }
333461847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
333561847f8eSopenharmony_ci     * @crossplatform
333661847f8eSopenharmony_ci     * @atomicservice
333761847f8eSopenharmony_ci     * @since 13
333861847f8eSopenharmony_ci     */
333961847f8eSopenharmony_ci    characteristicUuid: string;
334061847f8eSopenharmony_ci    /**
334161847f8eSopenharmony_ci     * The value of a NotifyCharacteristic instance
334261847f8eSopenharmony_ci     *
334361847f8eSopenharmony_ci     * @type { ArrayBuffer }
334461847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
334561847f8eSopenharmony_ci     * @since 10
334661847f8eSopenharmony_ci     */
334761847f8eSopenharmony_ci    /**
334861847f8eSopenharmony_ci     * The value of a NotifyCharacteristic instance
334961847f8eSopenharmony_ci     *
335061847f8eSopenharmony_ci     * @type { ArrayBuffer }
335161847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
335261847f8eSopenharmony_ci     * @atomicservice
335361847f8eSopenharmony_ci     * @since 12
335461847f8eSopenharmony_ci     */
335561847f8eSopenharmony_ci    /**
335661847f8eSopenharmony_ci     * The value of a NotifyCharacteristic instance
335761847f8eSopenharmony_ci     *
335861847f8eSopenharmony_ci     * @type { ArrayBuffer }
335961847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
336061847f8eSopenharmony_ci     * @crossplatform
336161847f8eSopenharmony_ci     * @atomicservice
336261847f8eSopenharmony_ci     * @since 13
336361847f8eSopenharmony_ci     */
336461847f8eSopenharmony_ci    characteristicValue: ArrayBuffer;
336561847f8eSopenharmony_ci    /**
336661847f8eSopenharmony_ci     * Specifies whether to request confirmation from the BLE peripheral device (indication) or
336761847f8eSopenharmony_ci     * send a notification. Value {@code true} indicates the former and {@code false} indicates the latter.
336861847f8eSopenharmony_ci     *
336961847f8eSopenharmony_ci     * @type { boolean }
337061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
337161847f8eSopenharmony_ci     * @since 10
337261847f8eSopenharmony_ci     */
337361847f8eSopenharmony_ci    /**
337461847f8eSopenharmony_ci     * Specifies whether to request confirmation from the BLE peripheral device (indication) or
337561847f8eSopenharmony_ci     * send a notification. Value {@code true} indicates the former and {@code false} indicates the latter.
337661847f8eSopenharmony_ci     *
337761847f8eSopenharmony_ci     * @type { boolean }
337861847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
337961847f8eSopenharmony_ci     * @atomicservice
338061847f8eSopenharmony_ci     * @since 12
338161847f8eSopenharmony_ci     */
338261847f8eSopenharmony_ci    confirm: boolean;
338361847f8eSopenharmony_ci  }
338461847f8eSopenharmony_ci
338561847f8eSopenharmony_ci  /**
338661847f8eSopenharmony_ci   * Describes the parameters of the Gatt client's characteristic read request.
338761847f8eSopenharmony_ci   *
338861847f8eSopenharmony_ci   * @typedef CharacteristicReadRequest
338961847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
339061847f8eSopenharmony_ci   * @since 10
339161847f8eSopenharmony_ci   */
339261847f8eSopenharmony_ci  /**
339361847f8eSopenharmony_ci   * Describes the parameters of the Gatt client's characteristic read request.
339461847f8eSopenharmony_ci   *
339561847f8eSopenharmony_ci   * @typedef CharacteristicReadRequest
339661847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
339761847f8eSopenharmony_ci   * @atomicservice
339861847f8eSopenharmony_ci   * @since 12
339961847f8eSopenharmony_ci   */
340061847f8eSopenharmony_ci  /**
340161847f8eSopenharmony_ci   * Describes the parameters of the Gatt client's characteristic read request.
340261847f8eSopenharmony_ci   *
340361847f8eSopenharmony_ci   * @typedef CharacteristicReadRequest
340461847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
340561847f8eSopenharmony_ci   * @crossplatform
340661847f8eSopenharmony_ci   * @atomicservice
340761847f8eSopenharmony_ci   * @since 13
340861847f8eSopenharmony_ci   */
340961847f8eSopenharmony_ci  interface CharacteristicReadRequest {
341061847f8eSopenharmony_ci    /**
341161847f8eSopenharmony_ci     * Indicates the address of the client that initiates the read request
341261847f8eSopenharmony_ci     *
341361847f8eSopenharmony_ci     * @type { string }
341461847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
341561847f8eSopenharmony_ci     * @since 10
341661847f8eSopenharmony_ci     */
341761847f8eSopenharmony_ci    /**
341861847f8eSopenharmony_ci     * Indicates the address of the client that initiates the read request
341961847f8eSopenharmony_ci     *
342061847f8eSopenharmony_ci     * @type { string }
342161847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
342261847f8eSopenharmony_ci     * @atomicservice
342361847f8eSopenharmony_ci     * @since 12
342461847f8eSopenharmony_ci     */
342561847f8eSopenharmony_ci    /**
342661847f8eSopenharmony_ci     * Indicates the address of the client that initiates the read request
342761847f8eSopenharmony_ci     *
342861847f8eSopenharmony_ci     * @type { string }
342961847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
343061847f8eSopenharmony_ci     * @crossplatform
343161847f8eSopenharmony_ci     * @atomicservice
343261847f8eSopenharmony_ci     * @since 13
343361847f8eSopenharmony_ci     */
343461847f8eSopenharmony_ci    deviceId: string;
343561847f8eSopenharmony_ci    /**
343661847f8eSopenharmony_ci     * The Id of the read request
343761847f8eSopenharmony_ci     *
343861847f8eSopenharmony_ci     * @type { number }
343961847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
344061847f8eSopenharmony_ci     * @since 10
344161847f8eSopenharmony_ci     */
344261847f8eSopenharmony_ci    /**
344361847f8eSopenharmony_ci     * The Id of the read request
344461847f8eSopenharmony_ci     *
344561847f8eSopenharmony_ci     * @type { number }
344661847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
344761847f8eSopenharmony_ci     * @atomicservice
344861847f8eSopenharmony_ci     * @since 12
344961847f8eSopenharmony_ci     */
345061847f8eSopenharmony_ci    /**
345161847f8eSopenharmony_ci     * The Id of the read request
345261847f8eSopenharmony_ci     *
345361847f8eSopenharmony_ci     * @type { number }
345461847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
345561847f8eSopenharmony_ci     * @crossplatform
345661847f8eSopenharmony_ci     * @atomicservice
345761847f8eSopenharmony_ci     * @since 13
345861847f8eSopenharmony_ci     */
345961847f8eSopenharmony_ci    transId: number;
346061847f8eSopenharmony_ci    /**
346161847f8eSopenharmony_ci     * Indicates the byte offset of the start position for reading characteristic value
346261847f8eSopenharmony_ci     *
346361847f8eSopenharmony_ci     * @type { number }
346461847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
346561847f8eSopenharmony_ci     * @since 10
346661847f8eSopenharmony_ci     */
346761847f8eSopenharmony_ci    /**
346861847f8eSopenharmony_ci     * Indicates the byte offset of the start position for reading characteristic value
346961847f8eSopenharmony_ci     *
347061847f8eSopenharmony_ci     * @type { number }
347161847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
347261847f8eSopenharmony_ci     * @atomicservice
347361847f8eSopenharmony_ci     * @since 12
347461847f8eSopenharmony_ci     */
347561847f8eSopenharmony_ci    offset: number;
347661847f8eSopenharmony_ci    /**
347761847f8eSopenharmony_ci     * The UUID of a CharacteristicReadRequest instance
347861847f8eSopenharmony_ci     *
347961847f8eSopenharmony_ci     * @type { string }
348061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
348161847f8eSopenharmony_ci     * @since 10
348261847f8eSopenharmony_ci     */
348361847f8eSopenharmony_ci    /**
348461847f8eSopenharmony_ci     * The UUID of a CharacteristicReadRequest instance
348561847f8eSopenharmony_ci     *
348661847f8eSopenharmony_ci     * @type { string }
348761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
348861847f8eSopenharmony_ci     * @atomicservice
348961847f8eSopenharmony_ci     * @since 12
349061847f8eSopenharmony_ci     */
349161847f8eSopenharmony_ci    /**
349261847f8eSopenharmony_ci     * The UUID of a CharacteristicReadRequest instance
349361847f8eSopenharmony_ci     *
349461847f8eSopenharmony_ci     * @type { string }
349561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
349661847f8eSopenharmony_ci     * @crossplatform
349761847f8eSopenharmony_ci     * @atomicservice
349861847f8eSopenharmony_ci     * @since 13
349961847f8eSopenharmony_ci     */
350061847f8eSopenharmony_ci    characteristicUuid: string;
350161847f8eSopenharmony_ci    /**
350261847f8eSopenharmony_ci     * The UUID of the service to which the characteristic belongs
350361847f8eSopenharmony_ci     *
350461847f8eSopenharmony_ci     * @type { string }
350561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
350661847f8eSopenharmony_ci     * @since 10
350761847f8eSopenharmony_ci     */
350861847f8eSopenharmony_ci    /**
350961847f8eSopenharmony_ci     * The UUID of the service to which the characteristic belongs
351061847f8eSopenharmony_ci     *
351161847f8eSopenharmony_ci     * @type { string }
351261847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
351361847f8eSopenharmony_ci     * @atomicservice
351461847f8eSopenharmony_ci     * @since 12
351561847f8eSopenharmony_ci     */
351661847f8eSopenharmony_ci    /**
351761847f8eSopenharmony_ci     * The UUID of the service to which the characteristic belongs
351861847f8eSopenharmony_ci     *
351961847f8eSopenharmony_ci     * @type { string }
352061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
352161847f8eSopenharmony_ci     * @crossplatform
352261847f8eSopenharmony_ci     * @atomicservice
352361847f8eSopenharmony_ci     * @since 13
352461847f8eSopenharmony_ci     */
352561847f8eSopenharmony_ci    serviceUuid: string;
352661847f8eSopenharmony_ci  }
352761847f8eSopenharmony_ci
352861847f8eSopenharmony_ci  /**
352961847f8eSopenharmony_ci   * Describes the parameters of the of the Gatt client's characteristic write request.
353061847f8eSopenharmony_ci   *
353161847f8eSopenharmony_ci   * @typedef CharacteristicWriteRequest
353261847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
353361847f8eSopenharmony_ci   * @since 10
353461847f8eSopenharmony_ci   */
353561847f8eSopenharmony_ci  /**
353661847f8eSopenharmony_ci   * Describes the parameters of the of the Gatt client's characteristic write request.
353761847f8eSopenharmony_ci   *
353861847f8eSopenharmony_ci   * @typedef CharacteristicWriteRequest
353961847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
354061847f8eSopenharmony_ci   * @atomicservice
354161847f8eSopenharmony_ci   * @since 12
354261847f8eSopenharmony_ci   */
354361847f8eSopenharmony_ci  /**
354461847f8eSopenharmony_ci   * Describes the parameters of the of the Gatt client's characteristic write request.
354561847f8eSopenharmony_ci   *
354661847f8eSopenharmony_ci   * @typedef CharacteristicWriteRequest
354761847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
354861847f8eSopenharmony_ci   * @crossplatform
354961847f8eSopenharmony_ci   * @atomicservice
355061847f8eSopenharmony_ci   * @since 13
355161847f8eSopenharmony_ci   */
355261847f8eSopenharmony_ci  interface CharacteristicWriteRequest {
355361847f8eSopenharmony_ci    /**
355461847f8eSopenharmony_ci     * Indicates the address of the client that initiates the write request
355561847f8eSopenharmony_ci     *
355661847f8eSopenharmony_ci     * @type { string }
355761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
355861847f8eSopenharmony_ci     * @since 10
355961847f8eSopenharmony_ci     */
356061847f8eSopenharmony_ci    /**
356161847f8eSopenharmony_ci     * Indicates the address of the client that initiates the write request
356261847f8eSopenharmony_ci     *
356361847f8eSopenharmony_ci     * @type { string }
356461847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
356561847f8eSopenharmony_ci     * @atomicservice
356661847f8eSopenharmony_ci     * @since 12
356761847f8eSopenharmony_ci     */
356861847f8eSopenharmony_ci    /**
356961847f8eSopenharmony_ci     * Indicates the address of the client that initiates the write request
357061847f8eSopenharmony_ci     *
357161847f8eSopenharmony_ci     * @type { string }
357261847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
357361847f8eSopenharmony_ci     * @crossplatform
357461847f8eSopenharmony_ci     * @atomicservice
357561847f8eSopenharmony_ci     * @since 13
357661847f8eSopenharmony_ci     */
357761847f8eSopenharmony_ci    deviceId: string;
357861847f8eSopenharmony_ci    /**
357961847f8eSopenharmony_ci     * The Id of the write request
358061847f8eSopenharmony_ci     *
358161847f8eSopenharmony_ci     * @type { number }
358261847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
358361847f8eSopenharmony_ci     * @since 10
358461847f8eSopenharmony_ci     */
358561847f8eSopenharmony_ci    /**
358661847f8eSopenharmony_ci     * The Id of the write request
358761847f8eSopenharmony_ci     *
358861847f8eSopenharmony_ci     * @type { number }
358961847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
359061847f8eSopenharmony_ci     * @atomicservice
359161847f8eSopenharmony_ci     * @since 12
359261847f8eSopenharmony_ci     */
359361847f8eSopenharmony_ci    /**
359461847f8eSopenharmony_ci     * The Id of the write request
359561847f8eSopenharmony_ci     *
359661847f8eSopenharmony_ci     * @type { number }
359761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
359861847f8eSopenharmony_ci     * @crossplatform
359961847f8eSopenharmony_ci     * @atomicservice
360061847f8eSopenharmony_ci     * @since 13
360161847f8eSopenharmony_ci     */
360261847f8eSopenharmony_ci    transId: number;
360361847f8eSopenharmony_ci    /**
360461847f8eSopenharmony_ci     * Indicates the byte offset of the start position for writing characteristic value
360561847f8eSopenharmony_ci     *
360661847f8eSopenharmony_ci     * @type { number }
360761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
360861847f8eSopenharmony_ci     * @since 10
360961847f8eSopenharmony_ci     */
361061847f8eSopenharmony_ci    /**
361161847f8eSopenharmony_ci     * Indicates the byte offset of the start position for writing characteristic value
361261847f8eSopenharmony_ci     *
361361847f8eSopenharmony_ci     * @type { number }
361461847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
361561847f8eSopenharmony_ci     * @atomicservice
361661847f8eSopenharmony_ci     * @since 12
361761847f8eSopenharmony_ci     */
361861847f8eSopenharmony_ci    offset: number;
361961847f8eSopenharmony_ci    /**
362061847f8eSopenharmony_ci     * Whether this request should be pending for later operation
362161847f8eSopenharmony_ci     *
362261847f8eSopenharmony_ci     * @type { boolean }
362361847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
362461847f8eSopenharmony_ci     * @since 10
362561847f8eSopenharmony_ci     */
362661847f8eSopenharmony_ci    /**
362761847f8eSopenharmony_ci     * Whether this request should be pending for later operation
362861847f8eSopenharmony_ci     *
362961847f8eSopenharmony_ci     * @type { boolean }
363061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
363161847f8eSopenharmony_ci     * @atomicservice
363261847f8eSopenharmony_ci     * @since 12
363361847f8eSopenharmony_ci     */
363461847f8eSopenharmony_ci    isPrepared: boolean;
363561847f8eSopenharmony_ci    /**
363661847f8eSopenharmony_ci     * Whether the remote client need a response
363761847f8eSopenharmony_ci     *
363861847f8eSopenharmony_ci     * @type { boolean }
363961847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
364061847f8eSopenharmony_ci     * @since 10
364161847f8eSopenharmony_ci     */
364261847f8eSopenharmony_ci    /**
364361847f8eSopenharmony_ci     * Whether the remote client need a response
364461847f8eSopenharmony_ci     *
364561847f8eSopenharmony_ci     * @type { boolean }
364661847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
364761847f8eSopenharmony_ci     * @atomicservice
364861847f8eSopenharmony_ci     * @since 12
364961847f8eSopenharmony_ci     */
365061847f8eSopenharmony_ci    needRsp: boolean;
365161847f8eSopenharmony_ci    /**
365261847f8eSopenharmony_ci     * Indicates the value to be written
365361847f8eSopenharmony_ci     *
365461847f8eSopenharmony_ci     * @type { ArrayBuffer }
365561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
365661847f8eSopenharmony_ci     * @since 10
365761847f8eSopenharmony_ci     */
365861847f8eSopenharmony_ci    /**
365961847f8eSopenharmony_ci     * Indicates the value to be written
366061847f8eSopenharmony_ci     *
366161847f8eSopenharmony_ci     * @type { ArrayBuffer }
366261847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
366361847f8eSopenharmony_ci     * @atomicservice
366461847f8eSopenharmony_ci     * @since 12
366561847f8eSopenharmony_ci     */
366661847f8eSopenharmony_ci    /**
366761847f8eSopenharmony_ci     * Indicates the value to be written
366861847f8eSopenharmony_ci     *
366961847f8eSopenharmony_ci     * @type { ArrayBuffer }
367061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
367161847f8eSopenharmony_ci     * @crossplatform
367261847f8eSopenharmony_ci     * @atomicservice
367361847f8eSopenharmony_ci     * @since 13
367461847f8eSopenharmony_ci     */
367561847f8eSopenharmony_ci    value: ArrayBuffer;
367661847f8eSopenharmony_ci    /**
367761847f8eSopenharmony_ci     * The UUID of a CharacteristicWriteRequest instance
367861847f8eSopenharmony_ci     *
367961847f8eSopenharmony_ci     * @type { string }
368061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
368161847f8eSopenharmony_ci     * @since 10
368261847f8eSopenharmony_ci     */
368361847f8eSopenharmony_ci    /**
368461847f8eSopenharmony_ci     * The UUID of a CharacteristicWriteRequest instance
368561847f8eSopenharmony_ci     *
368661847f8eSopenharmony_ci     * @type { string }
368761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
368861847f8eSopenharmony_ci     * @atomicservice
368961847f8eSopenharmony_ci     * @since 12
369061847f8eSopenharmony_ci     */
369161847f8eSopenharmony_ci    /**
369261847f8eSopenharmony_ci     * The UUID of a CharacteristicWriteRequest instance
369361847f8eSopenharmony_ci     *
369461847f8eSopenharmony_ci     * @type { string }
369561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
369661847f8eSopenharmony_ci     * @crossplatform
369761847f8eSopenharmony_ci     * @atomicservice
369861847f8eSopenharmony_ci     * @since 13
369961847f8eSopenharmony_ci     */
370061847f8eSopenharmony_ci    characteristicUuid: string;
370161847f8eSopenharmony_ci    /**
370261847f8eSopenharmony_ci     * The UUID of the service to which the characteristic belongs
370361847f8eSopenharmony_ci     *
370461847f8eSopenharmony_ci     * @type { string }
370561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
370661847f8eSopenharmony_ci     * @since 10
370761847f8eSopenharmony_ci     */
370861847f8eSopenharmony_ci    /**
370961847f8eSopenharmony_ci     * The UUID of the service to which the characteristic belongs
371061847f8eSopenharmony_ci     *
371161847f8eSopenharmony_ci     * @type { string }
371261847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
371361847f8eSopenharmony_ci     * @atomicservice
371461847f8eSopenharmony_ci     * @since 12
371561847f8eSopenharmony_ci     */
371661847f8eSopenharmony_ci    /**
371761847f8eSopenharmony_ci     * The UUID of the service to which the characteristic belongs
371861847f8eSopenharmony_ci     *
371961847f8eSopenharmony_ci     * @type { string }
372061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
372161847f8eSopenharmony_ci     * @crossplatform
372261847f8eSopenharmony_ci     * @atomicservice
372361847f8eSopenharmony_ci     * @since 13
372461847f8eSopenharmony_ci     */
372561847f8eSopenharmony_ci    serviceUuid: string;
372661847f8eSopenharmony_ci  }
372761847f8eSopenharmony_ci
372861847f8eSopenharmony_ci  /**
372961847f8eSopenharmony_ci   * Describes the parameters of the Gatt client's descriptor read request.
373061847f8eSopenharmony_ci   *
373161847f8eSopenharmony_ci   * @typedef DescriptorReadRequest
373261847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
373361847f8eSopenharmony_ci   * @since 10
373461847f8eSopenharmony_ci   */
373561847f8eSopenharmony_ci  /**
373661847f8eSopenharmony_ci   * Describes the parameters of the Gatt client's descriptor read request.
373761847f8eSopenharmony_ci   *
373861847f8eSopenharmony_ci   * @typedef DescriptorReadRequest
373961847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
374061847f8eSopenharmony_ci   * @atomicservice
374161847f8eSopenharmony_ci   * @since 12
374261847f8eSopenharmony_ci   */
374361847f8eSopenharmony_ci  /**
374461847f8eSopenharmony_ci   * Describes the parameters of the Gatt client's descriptor read request.
374561847f8eSopenharmony_ci   *
374661847f8eSopenharmony_ci   * @typedef DescriptorReadRequest
374761847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
374861847f8eSopenharmony_ci   * @crossplatform
374961847f8eSopenharmony_ci   * @atomicservice
375061847f8eSopenharmony_ci   * @since 13
375161847f8eSopenharmony_ci   */
375261847f8eSopenharmony_ci  interface DescriptorReadRequest {
375361847f8eSopenharmony_ci    /**
375461847f8eSopenharmony_ci     * Indicates the address of the client that initiates the read request
375561847f8eSopenharmony_ci     *
375661847f8eSopenharmony_ci     * @type { string }
375761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
375861847f8eSopenharmony_ci     * @since 10
375961847f8eSopenharmony_ci     */
376061847f8eSopenharmony_ci    /**
376161847f8eSopenharmony_ci     * Indicates the address of the client that initiates the read request
376261847f8eSopenharmony_ci     *
376361847f8eSopenharmony_ci     * @type { string }
376461847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
376561847f8eSopenharmony_ci     * @atomicservice
376661847f8eSopenharmony_ci     * @since 12
376761847f8eSopenharmony_ci     */
376861847f8eSopenharmony_ci    /**
376961847f8eSopenharmony_ci     * Indicates the address of the client that initiates the read request
377061847f8eSopenharmony_ci     *
377161847f8eSopenharmony_ci     * @type { string }
377261847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
377361847f8eSopenharmony_ci     * @crossplatform
377461847f8eSopenharmony_ci     * @atomicservice
377561847f8eSopenharmony_ci     * @since 13
377661847f8eSopenharmony_ci     */
377761847f8eSopenharmony_ci    deviceId: string;
377861847f8eSopenharmony_ci    /**
377961847f8eSopenharmony_ci     * The Id of the read request
378061847f8eSopenharmony_ci     *
378161847f8eSopenharmony_ci     * @type { number }
378261847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
378361847f8eSopenharmony_ci     * @since 10
378461847f8eSopenharmony_ci     */
378561847f8eSopenharmony_ci    /**
378661847f8eSopenharmony_ci     * The Id of the read request
378761847f8eSopenharmony_ci     *
378861847f8eSopenharmony_ci     * @type { number }
378961847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
379061847f8eSopenharmony_ci     * @atomicservice
379161847f8eSopenharmony_ci     * @since 12
379261847f8eSopenharmony_ci     */
379361847f8eSopenharmony_ci    /**
379461847f8eSopenharmony_ci     * The Id of the read request
379561847f8eSopenharmony_ci     *
379661847f8eSopenharmony_ci     * @type { number }
379761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
379861847f8eSopenharmony_ci     * @crossplatform
379961847f8eSopenharmony_ci     * @atomicservice
380061847f8eSopenharmony_ci     * @since 13
380161847f8eSopenharmony_ci     */
380261847f8eSopenharmony_ci    transId: number;
380361847f8eSopenharmony_ci    /**
380461847f8eSopenharmony_ci     * Indicates the byte offset of the start position for reading characteristic value
380561847f8eSopenharmony_ci     *
380661847f8eSopenharmony_ci     * @type { number }
380761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
380861847f8eSopenharmony_ci     * @since 10
380961847f8eSopenharmony_ci     */
381061847f8eSopenharmony_ci    /**
381161847f8eSopenharmony_ci     * Indicates the byte offset of the start position for reading characteristic value
381261847f8eSopenharmony_ci     *
381361847f8eSopenharmony_ci     * @type { number }
381461847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
381561847f8eSopenharmony_ci     * @atomicservice
381661847f8eSopenharmony_ci     * @since 12
381761847f8eSopenharmony_ci     */
381861847f8eSopenharmony_ci    offset: number;
381961847f8eSopenharmony_ci    /**
382061847f8eSopenharmony_ci     * The UUID of a DescriptorReadRequest instance
382161847f8eSopenharmony_ci     *
382261847f8eSopenharmony_ci     * @type { string }
382361847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
382461847f8eSopenharmony_ci     * @since 10
382561847f8eSopenharmony_ci     */
382661847f8eSopenharmony_ci    /**
382761847f8eSopenharmony_ci     * The UUID of a DescriptorReadRequest instance
382861847f8eSopenharmony_ci     *
382961847f8eSopenharmony_ci     * @type { string }
383061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
383161847f8eSopenharmony_ci     * @atomicservice
383261847f8eSopenharmony_ci     * @since 12
383361847f8eSopenharmony_ci     */
383461847f8eSopenharmony_ci    /**
383561847f8eSopenharmony_ci     * The UUID of a DescriptorReadRequest instance
383661847f8eSopenharmony_ci     *
383761847f8eSopenharmony_ci     * @type { string }
383861847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
383961847f8eSopenharmony_ci     * @crossplatform
384061847f8eSopenharmony_ci     * @atomicservice
384161847f8eSopenharmony_ci     * @since 13
384261847f8eSopenharmony_ci     */
384361847f8eSopenharmony_ci    descriptorUuid: string;
384461847f8eSopenharmony_ci    /**
384561847f8eSopenharmony_ci     * The UUID of the characteristic to which the descriptor belongs
384661847f8eSopenharmony_ci     *
384761847f8eSopenharmony_ci     * @type { string }
384861847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
384961847f8eSopenharmony_ci     * @since 10
385061847f8eSopenharmony_ci     */
385161847f8eSopenharmony_ci    /**
385261847f8eSopenharmony_ci     * The UUID of the characteristic to which the descriptor belongs
385361847f8eSopenharmony_ci     *
385461847f8eSopenharmony_ci     * @type { string }
385561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
385661847f8eSopenharmony_ci     * @atomicservice
385761847f8eSopenharmony_ci     * @since 12
385861847f8eSopenharmony_ci     */
385961847f8eSopenharmony_ci    /**
386061847f8eSopenharmony_ci     * The UUID of the characteristic to which the descriptor belongs
386161847f8eSopenharmony_ci     *
386261847f8eSopenharmony_ci     * @type { string }
386361847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
386461847f8eSopenharmony_ci     * @crossplatform
386561847f8eSopenharmony_ci     * @atomicservice
386661847f8eSopenharmony_ci     * @since 13
386761847f8eSopenharmony_ci     */
386861847f8eSopenharmony_ci    characteristicUuid: string;
386961847f8eSopenharmony_ci    /**
387061847f8eSopenharmony_ci     * The UUID of the service to which the descriptor belongs
387161847f8eSopenharmony_ci     *
387261847f8eSopenharmony_ci     * @type { string }
387361847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
387461847f8eSopenharmony_ci     * @since 10
387561847f8eSopenharmony_ci     */
387661847f8eSopenharmony_ci    /**
387761847f8eSopenharmony_ci     * The UUID of the service to which the descriptor belongs
387861847f8eSopenharmony_ci     *
387961847f8eSopenharmony_ci     * @type { string }
388061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
388161847f8eSopenharmony_ci     * @atomicservice
388261847f8eSopenharmony_ci     * @since 12
388361847f8eSopenharmony_ci     */
388461847f8eSopenharmony_ci    /**
388561847f8eSopenharmony_ci     * The UUID of the service to which the descriptor belongs
388661847f8eSopenharmony_ci     *
388761847f8eSopenharmony_ci     * @type { string }
388861847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
388961847f8eSopenharmony_ci     * @crossplatform
389061847f8eSopenharmony_ci     * @atomicservice
389161847f8eSopenharmony_ci     * @since 13
389261847f8eSopenharmony_ci     */
389361847f8eSopenharmony_ci    serviceUuid: string;
389461847f8eSopenharmony_ci  }
389561847f8eSopenharmony_ci
389661847f8eSopenharmony_ci  /**
389761847f8eSopenharmony_ci   * Describes the parameters of the Gatt client's characteristic write request.
389861847f8eSopenharmony_ci   *
389961847f8eSopenharmony_ci   * @typedef DescriptorWriteRequest
390061847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
390161847f8eSopenharmony_ci   * @since 10
390261847f8eSopenharmony_ci   */
390361847f8eSopenharmony_ci  /**
390461847f8eSopenharmony_ci   * Describes the parameters of the Gatt client's characteristic write request.
390561847f8eSopenharmony_ci   *
390661847f8eSopenharmony_ci   * @typedef DescriptorWriteRequest
390761847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
390861847f8eSopenharmony_ci   * @atomicservice
390961847f8eSopenharmony_ci   * @since 12
391061847f8eSopenharmony_ci   */
391161847f8eSopenharmony_ci  /**
391261847f8eSopenharmony_ci   * Describes the parameters of the Gatt client's characteristic write request.
391361847f8eSopenharmony_ci   *
391461847f8eSopenharmony_ci   * @typedef DescriptorWriteRequest
391561847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
391661847f8eSopenharmony_ci   * @crossplatform
391761847f8eSopenharmony_ci   * @atomicservice
391861847f8eSopenharmony_ci   * @since 13
391961847f8eSopenharmony_ci   */
392061847f8eSopenharmony_ci  interface DescriptorWriteRequest {
392161847f8eSopenharmony_ci    /**
392261847f8eSopenharmony_ci     * Indicates the address of the client that initiates the write request
392361847f8eSopenharmony_ci     *
392461847f8eSopenharmony_ci     * @type { string }
392561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
392661847f8eSopenharmony_ci     * @since 10
392761847f8eSopenharmony_ci     */
392861847f8eSopenharmony_ci    /**
392961847f8eSopenharmony_ci     * Indicates the address of the client that initiates the write request
393061847f8eSopenharmony_ci     *
393161847f8eSopenharmony_ci     * @type { string }
393261847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
393361847f8eSopenharmony_ci     * @atomicservice
393461847f8eSopenharmony_ci     * @since 12
393561847f8eSopenharmony_ci     */
393661847f8eSopenharmony_ci    /**
393761847f8eSopenharmony_ci     * Indicates the address of the client that initiates the write request
393861847f8eSopenharmony_ci     *
393961847f8eSopenharmony_ci     * @type { string }
394061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
394161847f8eSopenharmony_ci     * @crossplatform
394261847f8eSopenharmony_ci     * @atomicservice
394361847f8eSopenharmony_ci     * @since 13
394461847f8eSopenharmony_ci     */
394561847f8eSopenharmony_ci    deviceId: string;
394661847f8eSopenharmony_ci    /**
394761847f8eSopenharmony_ci     * The Id of the write request
394861847f8eSopenharmony_ci     *
394961847f8eSopenharmony_ci     * @type { number }
395061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
395161847f8eSopenharmony_ci     * @since 10
395261847f8eSopenharmony_ci     */
395361847f8eSopenharmony_ci    /**
395461847f8eSopenharmony_ci     * The Id of the write request
395561847f8eSopenharmony_ci     *
395661847f8eSopenharmony_ci     * @type { number }
395761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
395861847f8eSopenharmony_ci     * @atomicservice
395961847f8eSopenharmony_ci     * @since 12
396061847f8eSopenharmony_ci     */
396161847f8eSopenharmony_ci    /**
396261847f8eSopenharmony_ci     * The Id of the write request
396361847f8eSopenharmony_ci     *
396461847f8eSopenharmony_ci     * @type { number }
396561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
396661847f8eSopenharmony_ci     * @crossplatform
396761847f8eSopenharmony_ci     * @atomicservice
396861847f8eSopenharmony_ci     * @since 13
396961847f8eSopenharmony_ci     */
397061847f8eSopenharmony_ci    transId: number;
397161847f8eSopenharmony_ci    /**
397261847f8eSopenharmony_ci     * Indicates the byte offset of the start position for writing characteristic value
397361847f8eSopenharmony_ci     *
397461847f8eSopenharmony_ci     * @type { number }
397561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
397661847f8eSopenharmony_ci     * @since 10
397761847f8eSopenharmony_ci     */
397861847f8eSopenharmony_ci    /**
397961847f8eSopenharmony_ci     * Indicates the byte offset of the start position for writing characteristic value
398061847f8eSopenharmony_ci     *
398161847f8eSopenharmony_ci     * @type { number }
398261847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
398361847f8eSopenharmony_ci     * @atomicservice
398461847f8eSopenharmony_ci     * @since 12
398561847f8eSopenharmony_ci     */
398661847f8eSopenharmony_ci    offset: number;
398761847f8eSopenharmony_ci    /**
398861847f8eSopenharmony_ci     * Whether this request should be pending for later operation
398961847f8eSopenharmony_ci     *
399061847f8eSopenharmony_ci     * @type { boolean }
399161847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
399261847f8eSopenharmony_ci     * @since 10
399361847f8eSopenharmony_ci     */
399461847f8eSopenharmony_ci    /**
399561847f8eSopenharmony_ci     * Whether this request should be pending for later operation
399661847f8eSopenharmony_ci     *
399761847f8eSopenharmony_ci     * @type { boolean }
399861847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
399961847f8eSopenharmony_ci     * @atomicservice
400061847f8eSopenharmony_ci     * @since 12
400161847f8eSopenharmony_ci     */
400261847f8eSopenharmony_ci    isPrepared: boolean;
400361847f8eSopenharmony_ci    /**
400461847f8eSopenharmony_ci     * Whether the remote client need a response
400561847f8eSopenharmony_ci     *
400661847f8eSopenharmony_ci     * @type { boolean }
400761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
400861847f8eSopenharmony_ci     * @since 10
400961847f8eSopenharmony_ci     */
401061847f8eSopenharmony_ci    /**
401161847f8eSopenharmony_ci     * Whether the remote client need a response
401261847f8eSopenharmony_ci     *
401361847f8eSopenharmony_ci     * @type { boolean }
401461847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
401561847f8eSopenharmony_ci     * @atomicservice
401661847f8eSopenharmony_ci     * @since 12
401761847f8eSopenharmony_ci     */
401861847f8eSopenharmony_ci    needRsp: boolean;
401961847f8eSopenharmony_ci    /**
402061847f8eSopenharmony_ci     * Indicates the value to be written
402161847f8eSopenharmony_ci     *
402261847f8eSopenharmony_ci     * @type { ArrayBuffer }
402361847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
402461847f8eSopenharmony_ci     * @since 10
402561847f8eSopenharmony_ci     */
402661847f8eSopenharmony_ci    /**
402761847f8eSopenharmony_ci     * Indicates the value to be written
402861847f8eSopenharmony_ci     *
402961847f8eSopenharmony_ci     * @type { ArrayBuffer }
403061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
403161847f8eSopenharmony_ci     * @atomicservice
403261847f8eSopenharmony_ci     * @since 12
403361847f8eSopenharmony_ci     */
403461847f8eSopenharmony_ci    /**
403561847f8eSopenharmony_ci     * Indicates the value to be written
403661847f8eSopenharmony_ci     *
403761847f8eSopenharmony_ci     * @type { ArrayBuffer }
403861847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
403961847f8eSopenharmony_ci     * @crossplatform
404061847f8eSopenharmony_ci     * @atomicservice
404161847f8eSopenharmony_ci     * @since 13
404261847f8eSopenharmony_ci     */
404361847f8eSopenharmony_ci    value: ArrayBuffer;
404461847f8eSopenharmony_ci    /**
404561847f8eSopenharmony_ci     * The UUID of a DescriptorWriteRequest instance
404661847f8eSopenharmony_ci     *
404761847f8eSopenharmony_ci     * @type { string }
404861847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
404961847f8eSopenharmony_ci     * @since 10
405061847f8eSopenharmony_ci     */
405161847f8eSopenharmony_ci    /**
405261847f8eSopenharmony_ci     * The UUID of a DescriptorWriteRequest instance
405361847f8eSopenharmony_ci     *
405461847f8eSopenharmony_ci     * @type { string }
405561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
405661847f8eSopenharmony_ci     * @atomicservice
405761847f8eSopenharmony_ci     * @since 12
405861847f8eSopenharmony_ci     */
405961847f8eSopenharmony_ci    /**
406061847f8eSopenharmony_ci     * The UUID of a DescriptorWriteRequest instance
406161847f8eSopenharmony_ci     *
406261847f8eSopenharmony_ci     * @type { string }
406361847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
406461847f8eSopenharmony_ci     * @crossplatform
406561847f8eSopenharmony_ci     * @atomicservice
406661847f8eSopenharmony_ci     * @since 13
406761847f8eSopenharmony_ci     */
406861847f8eSopenharmony_ci    descriptorUuid: string;
406961847f8eSopenharmony_ci    /**
407061847f8eSopenharmony_ci     * The UUID of the characteristic to which the descriptor belongs
407161847f8eSopenharmony_ci     *
407261847f8eSopenharmony_ci     * @type { string }
407361847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
407461847f8eSopenharmony_ci     * @since 10
407561847f8eSopenharmony_ci     */
407661847f8eSopenharmony_ci    /**
407761847f8eSopenharmony_ci     * The UUID of the characteristic to which the descriptor belongs
407861847f8eSopenharmony_ci     *
407961847f8eSopenharmony_ci     * @type { string }
408061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
408161847f8eSopenharmony_ci     * @atomicservice
408261847f8eSopenharmony_ci     * @since 12
408361847f8eSopenharmony_ci     */
408461847f8eSopenharmony_ci    /**
408561847f8eSopenharmony_ci     * The UUID of the characteristic to which the descriptor belongs
408661847f8eSopenharmony_ci     *
408761847f8eSopenharmony_ci     * @type { string }
408861847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
408961847f8eSopenharmony_ci     * @crossplatform
409061847f8eSopenharmony_ci     * @atomicservice
409161847f8eSopenharmony_ci     * @since 13
409261847f8eSopenharmony_ci     */
409361847f8eSopenharmony_ci    characteristicUuid: string;
409461847f8eSopenharmony_ci    /**
409561847f8eSopenharmony_ci     * The UUID of the service to which the descriptor belongs
409661847f8eSopenharmony_ci     *
409761847f8eSopenharmony_ci     * @type { string }
409861847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
409961847f8eSopenharmony_ci     * @since 10
410061847f8eSopenharmony_ci     */
410161847f8eSopenharmony_ci    /**
410261847f8eSopenharmony_ci     * The UUID of the service to which the descriptor belongs
410361847f8eSopenharmony_ci     *
410461847f8eSopenharmony_ci     * @type { string }
410561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
410661847f8eSopenharmony_ci     * @atomicservice
410761847f8eSopenharmony_ci     * @since 12
410861847f8eSopenharmony_ci     */
410961847f8eSopenharmony_ci    /**
411061847f8eSopenharmony_ci     * The UUID of the service to which the descriptor belongs
411161847f8eSopenharmony_ci     *
411261847f8eSopenharmony_ci     * @type { string }
411361847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
411461847f8eSopenharmony_ci     * @crossplatform
411561847f8eSopenharmony_ci     * @atomicservice
411661847f8eSopenharmony_ci     * @since 13
411761847f8eSopenharmony_ci     */
411861847f8eSopenharmony_ci    serviceUuid: string;
411961847f8eSopenharmony_ci  }
412061847f8eSopenharmony_ci
412161847f8eSopenharmony_ci  /**
412261847f8eSopenharmony_ci   * Describes the parameters of a response send by the server to a specified read or write request.
412361847f8eSopenharmony_ci   *
412461847f8eSopenharmony_ci   * @typedef ServerResponse
412561847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
412661847f8eSopenharmony_ci   * @since 10
412761847f8eSopenharmony_ci   */
412861847f8eSopenharmony_ci  /**
412961847f8eSopenharmony_ci   * Describes the parameters of a response send by the server to a specified read or write request.
413061847f8eSopenharmony_ci   *
413161847f8eSopenharmony_ci   * @typedef ServerResponse
413261847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
413361847f8eSopenharmony_ci   * @atomicservice
413461847f8eSopenharmony_ci   * @since 12
413561847f8eSopenharmony_ci   */
413661847f8eSopenharmony_ci  /**
413761847f8eSopenharmony_ci   * Describes the parameters of a response send by the server to a specified read or write request.
413861847f8eSopenharmony_ci   *
413961847f8eSopenharmony_ci   * @typedef ServerResponse
414061847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
414161847f8eSopenharmony_ci   * @crossplatform
414261847f8eSopenharmony_ci   * @atomicservice
414361847f8eSopenharmony_ci   * @since 13
414461847f8eSopenharmony_ci   */
414561847f8eSopenharmony_ci  interface ServerResponse {
414661847f8eSopenharmony_ci    /**
414761847f8eSopenharmony_ci     * Indicates the address of the client to which to send the response
414861847f8eSopenharmony_ci     *
414961847f8eSopenharmony_ci     * @type { string }
415061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
415161847f8eSopenharmony_ci     * @since 10
415261847f8eSopenharmony_ci     */
415361847f8eSopenharmony_ci    /**
415461847f8eSopenharmony_ci     * Indicates the address of the client to which to send the response
415561847f8eSopenharmony_ci     *
415661847f8eSopenharmony_ci     * @type { string }
415761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
415861847f8eSopenharmony_ci     * @atomicservice
415961847f8eSopenharmony_ci     * @since 12
416061847f8eSopenharmony_ci     */
416161847f8eSopenharmony_ci    /**
416261847f8eSopenharmony_ci     * Indicates the address of the client to which to send the response
416361847f8eSopenharmony_ci     *
416461847f8eSopenharmony_ci     * @type { string }
416561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
416661847f8eSopenharmony_ci     * @crossplatform
416761847f8eSopenharmony_ci     * @atomicservice
416861847f8eSopenharmony_ci     * @since 13
416961847f8eSopenharmony_ci     */
417061847f8eSopenharmony_ci    deviceId: string;
417161847f8eSopenharmony_ci    /**
417261847f8eSopenharmony_ci     * The Id of the write request
417361847f8eSopenharmony_ci     *
417461847f8eSopenharmony_ci     * @type { number }
417561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
417661847f8eSopenharmony_ci     * @since 10
417761847f8eSopenharmony_ci     */
417861847f8eSopenharmony_ci    /**
417961847f8eSopenharmony_ci     * The Id of the write request
418061847f8eSopenharmony_ci     *
418161847f8eSopenharmony_ci     * @type { number }
418261847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
418361847f8eSopenharmony_ci     * @atomicservice
418461847f8eSopenharmony_ci     * @since 12
418561847f8eSopenharmony_ci     */
418661847f8eSopenharmony_ci    /**
418761847f8eSopenharmony_ci     * The Id of the write request
418861847f8eSopenharmony_ci     *
418961847f8eSopenharmony_ci     * @type { number }
419061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
419161847f8eSopenharmony_ci     * @crossplatform
419261847f8eSopenharmony_ci     * @atomicservice
419361847f8eSopenharmony_ci     * @since 13
419461847f8eSopenharmony_ci     */
419561847f8eSopenharmony_ci    transId: number;
419661847f8eSopenharmony_ci    /**
419761847f8eSopenharmony_ci     * Indicates the status of the read or write request, set this parameter to '0' in normal cases
419861847f8eSopenharmony_ci     *
419961847f8eSopenharmony_ci     * @type { number }
420061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
420161847f8eSopenharmony_ci     * @since 10
420261847f8eSopenharmony_ci     */
420361847f8eSopenharmony_ci    /**
420461847f8eSopenharmony_ci     * Indicates the status of the read or write request, set this parameter to '0' in normal cases
420561847f8eSopenharmony_ci     *
420661847f8eSopenharmony_ci     * @type { number }
420761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
420861847f8eSopenharmony_ci     * @atomicservice
420961847f8eSopenharmony_ci     * @since 12
421061847f8eSopenharmony_ci     */
421161847f8eSopenharmony_ci    /**
421261847f8eSopenharmony_ci     * Indicates the status of the read or write request, set this parameter to '0' in normal cases
421361847f8eSopenharmony_ci     *
421461847f8eSopenharmony_ci     * @type { number }
421561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
421661847f8eSopenharmony_ci     * @crossplatform
421761847f8eSopenharmony_ci     * @atomicservice
421861847f8eSopenharmony_ci     * @since 13
421961847f8eSopenharmony_ci     */
422061847f8eSopenharmony_ci    status: number;
422161847f8eSopenharmony_ci    /**
422261847f8eSopenharmony_ci     * Indicates the byte offset of the start position for reading or writing operation
422361847f8eSopenharmony_ci     *
422461847f8eSopenharmony_ci     * @type { number }
422561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
422661847f8eSopenharmony_ci     * @since 10
422761847f8eSopenharmony_ci     */
422861847f8eSopenharmony_ci    /**
422961847f8eSopenharmony_ci     * Indicates the byte offset of the start position for reading or writing operation
423061847f8eSopenharmony_ci     *
423161847f8eSopenharmony_ci     * @type { number }
423261847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
423361847f8eSopenharmony_ci     * @atomicservice
423461847f8eSopenharmony_ci     * @since 12
423561847f8eSopenharmony_ci     */
423661847f8eSopenharmony_ci    offset: number;
423761847f8eSopenharmony_ci    /**
423861847f8eSopenharmony_ci     * Indicates the value to be sent
423961847f8eSopenharmony_ci     *
424061847f8eSopenharmony_ci     * @type { ArrayBuffer }
424161847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
424261847f8eSopenharmony_ci     * @since 10
424361847f8eSopenharmony_ci     */
424461847f8eSopenharmony_ci    /**
424561847f8eSopenharmony_ci     * Indicates the value to be sent
424661847f8eSopenharmony_ci     *
424761847f8eSopenharmony_ci     * @type { ArrayBuffer }
424861847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
424961847f8eSopenharmony_ci     * @atomicservice
425061847f8eSopenharmony_ci     * @since 12
425161847f8eSopenharmony_ci     */
425261847f8eSopenharmony_ci    /**
425361847f8eSopenharmony_ci     * Indicates the value to be sent
425461847f8eSopenharmony_ci     *
425561847f8eSopenharmony_ci     * @type { ArrayBuffer }
425661847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
425761847f8eSopenharmony_ci     * @crossplatform
425861847f8eSopenharmony_ci     * @atomicservice
425961847f8eSopenharmony_ci     * @since 13
426061847f8eSopenharmony_ci     */
426161847f8eSopenharmony_ci    value: ArrayBuffer;
426261847f8eSopenharmony_ci  }
426361847f8eSopenharmony_ci
426461847f8eSopenharmony_ci  /**
426561847f8eSopenharmony_ci   * Describes the Gatt profile connection state.
426661847f8eSopenharmony_ci   *
426761847f8eSopenharmony_ci   * @typedef BLEConnectionChangeState
426861847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
426961847f8eSopenharmony_ci   * @since 10
427061847f8eSopenharmony_ci   */
427161847f8eSopenharmony_ci  /**
427261847f8eSopenharmony_ci   * Describes the Gatt profile connection state.
427361847f8eSopenharmony_ci   *
427461847f8eSopenharmony_ci   * @typedef BLEConnectionChangeState
427561847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
427661847f8eSopenharmony_ci   * @atomicservice
427761847f8eSopenharmony_ci   * @since 12
427861847f8eSopenharmony_ci   */
427961847f8eSopenharmony_ci  /**
428061847f8eSopenharmony_ci   * Describes the Gatt profile connection state.
428161847f8eSopenharmony_ci   *
428261847f8eSopenharmony_ci   * @typedef BLEConnectionChangeState
428361847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
428461847f8eSopenharmony_ci   * @crossplatform
428561847f8eSopenharmony_ci   * @atomicservice
428661847f8eSopenharmony_ci   * @since 13
428761847f8eSopenharmony_ci   */
428861847f8eSopenharmony_ci  interface BLEConnectionChangeState {
428961847f8eSopenharmony_ci    /**
429061847f8eSopenharmony_ci     * Indicates the peer device address
429161847f8eSopenharmony_ci     *
429261847f8eSopenharmony_ci     * @type { string }
429361847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
429461847f8eSopenharmony_ci     * @since 10
429561847f8eSopenharmony_ci     */
429661847f8eSopenharmony_ci    /**
429761847f8eSopenharmony_ci     * Indicates the peer device address
429861847f8eSopenharmony_ci     *
429961847f8eSopenharmony_ci     * @type { string }
430061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
430161847f8eSopenharmony_ci     * @atomicservice
430261847f8eSopenharmony_ci     * @since 12
430361847f8eSopenharmony_ci     */
430461847f8eSopenharmony_ci    /**
430561847f8eSopenharmony_ci     * Indicates the peer device address
430661847f8eSopenharmony_ci     *
430761847f8eSopenharmony_ci     * @type { string }
430861847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
430961847f8eSopenharmony_ci     * @crossplatform
431061847f8eSopenharmony_ci     * @atomicservice
431161847f8eSopenharmony_ci     * @since 13
431261847f8eSopenharmony_ci     */
431361847f8eSopenharmony_ci    deviceId: string;
431461847f8eSopenharmony_ci    /**
431561847f8eSopenharmony_ci     * Connection state of the Gatt profile
431661847f8eSopenharmony_ci     *
431761847f8eSopenharmony_ci     * @type { ProfileConnectionState }
431861847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
431961847f8eSopenharmony_ci     * @since 10
432061847f8eSopenharmony_ci     */
432161847f8eSopenharmony_ci    /**
432261847f8eSopenharmony_ci     * Connection state of the Gatt profile
432361847f8eSopenharmony_ci     *
432461847f8eSopenharmony_ci     * @type { ProfileConnectionState }
432561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
432661847f8eSopenharmony_ci     * @atomicservice
432761847f8eSopenharmony_ci     * @since 12
432861847f8eSopenharmony_ci     */
432961847f8eSopenharmony_ci    /**
433061847f8eSopenharmony_ci     * Connection state of the Gatt profile
433161847f8eSopenharmony_ci     *
433261847f8eSopenharmony_ci     * @type { ProfileConnectionState }
433361847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
433461847f8eSopenharmony_ci     * @crossplatform
433561847f8eSopenharmony_ci     * @atomicservice
433661847f8eSopenharmony_ci     * @since 13
433761847f8eSopenharmony_ci     */
433861847f8eSopenharmony_ci    state: ProfileConnectionState;
433961847f8eSopenharmony_ci  }
434061847f8eSopenharmony_ci
434161847f8eSopenharmony_ci  /**
434261847f8eSopenharmony_ci   * Describes the contents of the scan results.
434361847f8eSopenharmony_ci   *
434461847f8eSopenharmony_ci   * @typedef ScanResult
434561847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
434661847f8eSopenharmony_ci   * @since 10
434761847f8eSopenharmony_ci   */
434861847f8eSopenharmony_ci  /**
434961847f8eSopenharmony_ci   * Describes the contents of the scan results.
435061847f8eSopenharmony_ci   *
435161847f8eSopenharmony_ci   * @typedef ScanResult
435261847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
435361847f8eSopenharmony_ci   * @atomicservice
435461847f8eSopenharmony_ci   * @since 12
435561847f8eSopenharmony_ci   */
435661847f8eSopenharmony_ci  /**
435761847f8eSopenharmony_ci   * Describes the contents of the scan results.
435861847f8eSopenharmony_ci   *
435961847f8eSopenharmony_ci   * @typedef ScanResult
436061847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
436161847f8eSopenharmony_ci   * @crossplatform
436261847f8eSopenharmony_ci   * @atomicservice
436361847f8eSopenharmony_ci   * @since 13
436461847f8eSopenharmony_ci   */
436561847f8eSopenharmony_ci  interface ScanResult {
436661847f8eSopenharmony_ci    /**
436761847f8eSopenharmony_ci     * Address of the scanned device
436861847f8eSopenharmony_ci     *
436961847f8eSopenharmony_ci     * @type { string }
437061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
437161847f8eSopenharmony_ci     * @since 10
437261847f8eSopenharmony_ci     */
437361847f8eSopenharmony_ci    /**
437461847f8eSopenharmony_ci     * Address of the scanned device
437561847f8eSopenharmony_ci     *
437661847f8eSopenharmony_ci     * @type { string }
437761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
437861847f8eSopenharmony_ci     * @atomicservice
437961847f8eSopenharmony_ci     * @since 12
438061847f8eSopenharmony_ci     */
438161847f8eSopenharmony_ci    /**
438261847f8eSopenharmony_ci     * Address of the scanned device
438361847f8eSopenharmony_ci     *
438461847f8eSopenharmony_ci     * @type { string }
438561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
438661847f8eSopenharmony_ci     * @crossplatform
438761847f8eSopenharmony_ci     * @atomicservice
438861847f8eSopenharmony_ci     * @since 13
438961847f8eSopenharmony_ci     */
439061847f8eSopenharmony_ci    deviceId: string;
439161847f8eSopenharmony_ci    /**
439261847f8eSopenharmony_ci     * RSSI of the remote device
439361847f8eSopenharmony_ci     *
439461847f8eSopenharmony_ci     * @type { number }
439561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
439661847f8eSopenharmony_ci     * @since 10
439761847f8eSopenharmony_ci     */
439861847f8eSopenharmony_ci    /**
439961847f8eSopenharmony_ci     * RSSI of the remote device
440061847f8eSopenharmony_ci     *
440161847f8eSopenharmony_ci     * @type { number }
440261847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
440361847f8eSopenharmony_ci     * @atomicservice
440461847f8eSopenharmony_ci     * @since 12
440561847f8eSopenharmony_ci     */
440661847f8eSopenharmony_ci    /**
440761847f8eSopenharmony_ci     * RSSI of the remote device
440861847f8eSopenharmony_ci     *
440961847f8eSopenharmony_ci     * @type { number }
441061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
441161847f8eSopenharmony_ci     * @crossplatform
441261847f8eSopenharmony_ci     * @atomicservice
441361847f8eSopenharmony_ci     * @since 13
441461847f8eSopenharmony_ci     */
441561847f8eSopenharmony_ci    rssi: number;
441661847f8eSopenharmony_ci    /**
441761847f8eSopenharmony_ci     * The raw data of broadcast packet
441861847f8eSopenharmony_ci     *
441961847f8eSopenharmony_ci     * @type { ArrayBuffer }
442061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
442161847f8eSopenharmony_ci     * @since 10
442261847f8eSopenharmony_ci     */
442361847f8eSopenharmony_ci    /**
442461847f8eSopenharmony_ci     * The raw data of broadcast packet
442561847f8eSopenharmony_ci     *
442661847f8eSopenharmony_ci     * @type { ArrayBuffer }
442761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
442861847f8eSopenharmony_ci     * @atomicservice
442961847f8eSopenharmony_ci     * @since 12
443061847f8eSopenharmony_ci     */
443161847f8eSopenharmony_ci    /**
443261847f8eSopenharmony_ci     * The raw data of broadcast packet
443361847f8eSopenharmony_ci     *
443461847f8eSopenharmony_ci     * @type { ArrayBuffer }
443561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
443661847f8eSopenharmony_ci     * @crossplatform
443761847f8eSopenharmony_ci     * @atomicservice
443861847f8eSopenharmony_ci     * @since 13
443961847f8eSopenharmony_ci     */
444061847f8eSopenharmony_ci    data: ArrayBuffer;
444161847f8eSopenharmony_ci    /**
444261847f8eSopenharmony_ci     * The local name of the BLE device
444361847f8eSopenharmony_ci     *
444461847f8eSopenharmony_ci     * @type { string }
444561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
444661847f8eSopenharmony_ci     * @since 10
444761847f8eSopenharmony_ci     */
444861847f8eSopenharmony_ci    /**
444961847f8eSopenharmony_ci     * The local name of the BLE device
445061847f8eSopenharmony_ci     *
445161847f8eSopenharmony_ci     * @type { string }
445261847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
445361847f8eSopenharmony_ci     * @atomicservice
445461847f8eSopenharmony_ci     * @since 12
445561847f8eSopenharmony_ci     */
445661847f8eSopenharmony_ci    /**
445761847f8eSopenharmony_ci     * The local name of the BLE device
445861847f8eSopenharmony_ci     *
445961847f8eSopenharmony_ci     * @type { string }
446061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
446161847f8eSopenharmony_ci     * @crossplatform
446261847f8eSopenharmony_ci     * @atomicservice
446361847f8eSopenharmony_ci     * @since 13
446461847f8eSopenharmony_ci     */
446561847f8eSopenharmony_ci    deviceName: string;
446661847f8eSopenharmony_ci    /**
446761847f8eSopenharmony_ci     * Connectable of the remote device
446861847f8eSopenharmony_ci     *
446961847f8eSopenharmony_ci     * @type { boolean }
447061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
447161847f8eSopenharmony_ci     * @since 10
447261847f8eSopenharmony_ci     */
447361847f8eSopenharmony_ci    /**
447461847f8eSopenharmony_ci     * Connectable of the remote device
447561847f8eSopenharmony_ci     *
447661847f8eSopenharmony_ci     * @type { boolean }
447761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
447861847f8eSopenharmony_ci     * @atomicservice
447961847f8eSopenharmony_ci     * @since 12
448061847f8eSopenharmony_ci     */
448161847f8eSopenharmony_ci    /**
448261847f8eSopenharmony_ci     * Connectable of the remote device
448361847f8eSopenharmony_ci     *
448461847f8eSopenharmony_ci     * @type { boolean }
448561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
448661847f8eSopenharmony_ci     * @crossplatform
448761847f8eSopenharmony_ci     * @atomicservice
448861847f8eSopenharmony_ci     * @since 13
448961847f8eSopenharmony_ci     */
449061847f8eSopenharmony_ci    connectable: boolean;
449161847f8eSopenharmony_ci  }
449261847f8eSopenharmony_ci
449361847f8eSopenharmony_ci  /**
449461847f8eSopenharmony_ci   * Describes the settings for BLE advertising.
449561847f8eSopenharmony_ci   *
449661847f8eSopenharmony_ci   * @typedef AdvertiseSetting
449761847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
449861847f8eSopenharmony_ci   * @since 10
449961847f8eSopenharmony_ci   */
450061847f8eSopenharmony_ci  /**
450161847f8eSopenharmony_ci   * Describes the settings for BLE advertising.
450261847f8eSopenharmony_ci   *
450361847f8eSopenharmony_ci   * @typedef AdvertiseSetting
450461847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
450561847f8eSopenharmony_ci   * @atomicservice
450661847f8eSopenharmony_ci   * @since 12
450761847f8eSopenharmony_ci   */
450861847f8eSopenharmony_ci  /**
450961847f8eSopenharmony_ci   * Describes the settings for BLE advertising.
451061847f8eSopenharmony_ci   *
451161847f8eSopenharmony_ci   * @typedef AdvertiseSetting
451261847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
451361847f8eSopenharmony_ci   * @crossplatform
451461847f8eSopenharmony_ci   * @atomicservice
451561847f8eSopenharmony_ci   * @since 13
451661847f8eSopenharmony_ci   */
451761847f8eSopenharmony_ci  interface AdvertiseSetting {
451861847f8eSopenharmony_ci    /**
451961847f8eSopenharmony_ci     * Minimum slot value for the advertising interval, which is {@code 32} (20 ms)
452061847f8eSopenharmony_ci     * Maximum slot value for the advertising interval, which is {@code 16777215} (10485.759375s)
452161847f8eSopenharmony_ci     * Default slot value for the advertising interval, which is {@code 1600} (1s)
452261847f8eSopenharmony_ci     *
452361847f8eSopenharmony_ci     * @type { ?number }
452461847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
452561847f8eSopenharmony_ci     * @since 10
452661847f8eSopenharmony_ci     */
452761847f8eSopenharmony_ci    /**
452861847f8eSopenharmony_ci     * Minimum slot value for the advertising interval, which is {@code 32} (20 ms)
452961847f8eSopenharmony_ci     * Maximum slot value for the advertising interval, which is {@code 16777215} (10485.759375s)
453061847f8eSopenharmony_ci     * Default slot value for the advertising interval, which is {@code 1600} (1s)
453161847f8eSopenharmony_ci     *
453261847f8eSopenharmony_ci     * @type { ?number }
453361847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
453461847f8eSopenharmony_ci     * @atomicservice
453561847f8eSopenharmony_ci     * @since 12
453661847f8eSopenharmony_ci     */
453761847f8eSopenharmony_ci    interval?: number;
453861847f8eSopenharmony_ci    /**
453961847f8eSopenharmony_ci     * Minimum transmission power level for advertising, which is {@code -127}
454061847f8eSopenharmony_ci     * Maximum transmission power level for advertising, which is {@code 1}
454161847f8eSopenharmony_ci     * Default transmission power level for advertising, which is {@code -7}
454261847f8eSopenharmony_ci     *
454361847f8eSopenharmony_ci     * @type { ?number }
454461847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
454561847f8eSopenharmony_ci     * @since 10
454661847f8eSopenharmony_ci     */
454761847f8eSopenharmony_ci    /**
454861847f8eSopenharmony_ci     * Minimum transmission power level for advertising, which is {@code -127}
454961847f8eSopenharmony_ci     * Maximum transmission power level for advertising, which is {@code 1}
455061847f8eSopenharmony_ci     * Default transmission power level for advertising, which is {@code -7}
455161847f8eSopenharmony_ci     *
455261847f8eSopenharmony_ci     * @type { ?number }
455361847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
455461847f8eSopenharmony_ci     * @atomicservice
455561847f8eSopenharmony_ci     * @since 12
455661847f8eSopenharmony_ci     */
455761847f8eSopenharmony_ci    txPower?: number;
455861847f8eSopenharmony_ci    /**
455961847f8eSopenharmony_ci     * Indicates whether the BLE is connectable, default is {@code true}
456061847f8eSopenharmony_ci     *
456161847f8eSopenharmony_ci     * @type { ?boolean }
456261847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
456361847f8eSopenharmony_ci     * @since 10
456461847f8eSopenharmony_ci     */
456561847f8eSopenharmony_ci    /**
456661847f8eSopenharmony_ci     * Indicates whether the BLE is connectable, default is {@code true}
456761847f8eSopenharmony_ci     *
456861847f8eSopenharmony_ci     * @type { ?boolean }
456961847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
457061847f8eSopenharmony_ci     * @atomicservice
457161847f8eSopenharmony_ci     * @since 12
457261847f8eSopenharmony_ci     */
457361847f8eSopenharmony_ci    /**
457461847f8eSopenharmony_ci     * Indicates whether the BLE is connectable, default is {@code true}
457561847f8eSopenharmony_ci     *
457661847f8eSopenharmony_ci     * @type { ?boolean }
457761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
457861847f8eSopenharmony_ci     * @crossplatform
457961847f8eSopenharmony_ci     * @atomicservice
458061847f8eSopenharmony_ci     * @since 13
458161847f8eSopenharmony_ci     */
458261847f8eSopenharmony_ci    connectable?: boolean;
458361847f8eSopenharmony_ci  }
458461847f8eSopenharmony_ci
458561847f8eSopenharmony_ci  /**
458661847f8eSopenharmony_ci   * Describes the advertising data.
458761847f8eSopenharmony_ci   *
458861847f8eSopenharmony_ci   * @typedef AdvertiseData
458961847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
459061847f8eSopenharmony_ci   * @since 10
459161847f8eSopenharmony_ci   */
459261847f8eSopenharmony_ci  /**
459361847f8eSopenharmony_ci   * Describes the advertising data.
459461847f8eSopenharmony_ci   *
459561847f8eSopenharmony_ci   * @typedef AdvertiseData
459661847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
459761847f8eSopenharmony_ci   * @atomicservice
459861847f8eSopenharmony_ci   * @since 12
459961847f8eSopenharmony_ci   */
460061847f8eSopenharmony_ci  /**
460161847f8eSopenharmony_ci   * Describes the advertising data.
460261847f8eSopenharmony_ci   *
460361847f8eSopenharmony_ci   * @typedef AdvertiseData
460461847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
460561847f8eSopenharmony_ci   * @crossplatform
460661847f8eSopenharmony_ci   * @atomicservice
460761847f8eSopenharmony_ci   * @since 13
460861847f8eSopenharmony_ci   */
460961847f8eSopenharmony_ci  interface AdvertiseData {
461061847f8eSopenharmony_ci    /**
461161847f8eSopenharmony_ci     * The specified service UUID list to this advertisement
461261847f8eSopenharmony_ci     *
461361847f8eSopenharmony_ci     * @type { Array<string> }
461461847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
461561847f8eSopenharmony_ci     * @since 10
461661847f8eSopenharmony_ci     */
461761847f8eSopenharmony_ci    /**
461861847f8eSopenharmony_ci     * The specified service UUID list to this advertisement
461961847f8eSopenharmony_ci     *
462061847f8eSopenharmony_ci     * @type { Array<string> }
462161847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
462261847f8eSopenharmony_ci     * @atomicservice
462361847f8eSopenharmony_ci     * @since 12
462461847f8eSopenharmony_ci     */
462561847f8eSopenharmony_ci    /**
462661847f8eSopenharmony_ci     * The specified service UUID list to this advertisement
462761847f8eSopenharmony_ci     *
462861847f8eSopenharmony_ci     * @type { Array<string> }
462961847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
463061847f8eSopenharmony_ci     * @crossplatform
463161847f8eSopenharmony_ci     * @atomicservice
463261847f8eSopenharmony_ci     * @since 13
463361847f8eSopenharmony_ci     */
463461847f8eSopenharmony_ci    serviceUuids: Array<string>;
463561847f8eSopenharmony_ci    /**
463661847f8eSopenharmony_ci     * The specified manufacturer data list to this advertisement
463761847f8eSopenharmony_ci     *
463861847f8eSopenharmony_ci     * @type { Array<ManufactureData> }
463961847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
464061847f8eSopenharmony_ci     * @since 10
464161847f8eSopenharmony_ci     */
464261847f8eSopenharmony_ci    /**
464361847f8eSopenharmony_ci     * The specified manufacturer data list to this advertisement
464461847f8eSopenharmony_ci     *
464561847f8eSopenharmony_ci     * @type { Array<ManufactureData> }
464661847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
464761847f8eSopenharmony_ci     * @atomicservice
464861847f8eSopenharmony_ci     * @since 12
464961847f8eSopenharmony_ci     */
465061847f8eSopenharmony_ci    /**
465161847f8eSopenharmony_ci     * The specified manufacturer data list to this advertisement
465261847f8eSopenharmony_ci     *
465361847f8eSopenharmony_ci     * @type { Array<ManufactureData> }
465461847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
465561847f8eSopenharmony_ci     * @crossplatform
465661847f8eSopenharmony_ci     * @atomicservice
465761847f8eSopenharmony_ci     * @since 13
465861847f8eSopenharmony_ci     */
465961847f8eSopenharmony_ci    manufactureData: Array<ManufactureData>;
466061847f8eSopenharmony_ci    /**
466161847f8eSopenharmony_ci     * The specified service data list to this advertisement
466261847f8eSopenharmony_ci     *
466361847f8eSopenharmony_ci     * @type { Array<ServiceData> }
466461847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
466561847f8eSopenharmony_ci     * @since 10
466661847f8eSopenharmony_ci     */
466761847f8eSopenharmony_ci    /**
466861847f8eSopenharmony_ci     * The specified service data list to this advertisement
466961847f8eSopenharmony_ci     *
467061847f8eSopenharmony_ci     * @type { Array<ServiceData> }
467161847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
467261847f8eSopenharmony_ci     * @atomicservice
467361847f8eSopenharmony_ci     * @since 12
467461847f8eSopenharmony_ci     */
467561847f8eSopenharmony_ci    /**
467661847f8eSopenharmony_ci     * The specified service data list to this advertisement
467761847f8eSopenharmony_ci     *
467861847f8eSopenharmony_ci     * @type { Array<ServiceData> }
467961847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
468061847f8eSopenharmony_ci     * @crossplatform
468161847f8eSopenharmony_ci     * @atomicservice
468261847f8eSopenharmony_ci     * @since 13
468361847f8eSopenharmony_ci     */
468461847f8eSopenharmony_ci    serviceData: Array<ServiceData>;
468561847f8eSopenharmony_ci    /**
468661847f8eSopenharmony_ci     * Indicates whether the device name will be included in the advertisement packet.
468761847f8eSopenharmony_ci     *
468861847f8eSopenharmony_ci     * @type { ?boolean }
468961847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
469061847f8eSopenharmony_ci     * @since 10
469161847f8eSopenharmony_ci     */
469261847f8eSopenharmony_ci    /**
469361847f8eSopenharmony_ci     * Indicates whether the device name will be included in the advertisement packet.
469461847f8eSopenharmony_ci     *
469561847f8eSopenharmony_ci     * @type { ?boolean }
469661847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
469761847f8eSopenharmony_ci     * @atomicservice
469861847f8eSopenharmony_ci     * @since 12
469961847f8eSopenharmony_ci     */
470061847f8eSopenharmony_ci    /**
470161847f8eSopenharmony_ci     * Indicates whether the device name will be included in the advertisement packet.
470261847f8eSopenharmony_ci     *
470361847f8eSopenharmony_ci     * @type { ?boolean }
470461847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
470561847f8eSopenharmony_ci     * @crossplatform
470661847f8eSopenharmony_ci     * @atomicservice
470761847f8eSopenharmony_ci     * @since 13
470861847f8eSopenharmony_ci     */
470961847f8eSopenharmony_ci    includeDeviceName?: boolean;
471061847f8eSopenharmony_ci  }
471161847f8eSopenharmony_ci
471261847f8eSopenharmony_ci  /**
471361847f8eSopenharmony_ci   * Describes the advertising parameters.
471461847f8eSopenharmony_ci   *
471561847f8eSopenharmony_ci   * @typedef AdvertisingParams
471661847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
471761847f8eSopenharmony_ci   * @since 11
471861847f8eSopenharmony_ci   */
471961847f8eSopenharmony_ci  /**
472061847f8eSopenharmony_ci   * Describes the advertising parameters.
472161847f8eSopenharmony_ci   *
472261847f8eSopenharmony_ci   * @typedef AdvertisingParams
472361847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
472461847f8eSopenharmony_ci   * @crossplatform
472561847f8eSopenharmony_ci   * @since 13
472661847f8eSopenharmony_ci   */
472761847f8eSopenharmony_ci  interface AdvertisingParams {
472861847f8eSopenharmony_ci    /**
472961847f8eSopenharmony_ci     * Indicates the advertising settings.
473061847f8eSopenharmony_ci     *
473161847f8eSopenharmony_ci     * @type { AdvertiseSetting }
473261847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
473361847f8eSopenharmony_ci     * @since 11
473461847f8eSopenharmony_ci     */
473561847f8eSopenharmony_ci    /**
473661847f8eSopenharmony_ci     * Indicates the advertising settings.
473761847f8eSopenharmony_ci     *
473861847f8eSopenharmony_ci     * @type { AdvertiseSetting }
473961847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
474061847f8eSopenharmony_ci     * @crossplatform
474161847f8eSopenharmony_ci     * @since 13
474261847f8eSopenharmony_ci     */
474361847f8eSopenharmony_ci    advertisingSettings: AdvertiseSetting;
474461847f8eSopenharmony_ci    /**
474561847f8eSopenharmony_ci     * Indicates the advertising data.
474661847f8eSopenharmony_ci     *
474761847f8eSopenharmony_ci     * @type { AdvertiseData }
474861847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
474961847f8eSopenharmony_ci     * @since 11
475061847f8eSopenharmony_ci     */
475161847f8eSopenharmony_ci    /**
475261847f8eSopenharmony_ci     * Indicates the advertising data.
475361847f8eSopenharmony_ci     *
475461847f8eSopenharmony_ci     * @type { AdvertiseData }
475561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
475661847f8eSopenharmony_ci     * @crossplatform
475761847f8eSopenharmony_ci     * @since 13
475861847f8eSopenharmony_ci     */
475961847f8eSopenharmony_ci    advertisingData: AdvertiseData;
476061847f8eSopenharmony_ci    /**
476161847f8eSopenharmony_ci     * Indicates the advertising response.
476261847f8eSopenharmony_ci     *
476361847f8eSopenharmony_ci     * @type { ?AdvertiseData }
476461847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
476561847f8eSopenharmony_ci     * @since 11
476661847f8eSopenharmony_ci     */
476761847f8eSopenharmony_ci    /**
476861847f8eSopenharmony_ci     * Indicates the advertising response.
476961847f8eSopenharmony_ci     *
477061847f8eSopenharmony_ci     * @type { ?AdvertiseData }
477161847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
477261847f8eSopenharmony_ci     * @crossplatform
477361847f8eSopenharmony_ci     * @since 13
477461847f8eSopenharmony_ci     */
477561847f8eSopenharmony_ci    advertisingResponse?: AdvertiseData;
477661847f8eSopenharmony_ci    /**
477761847f8eSopenharmony_ci     * Indicates the duration for advertising continuously.
477861847f8eSopenharmony_ci     * The duration, in 10ms unit. Valid range is from 1 (10ms) to 65535 (655,350 ms).
477961847f8eSopenharmony_ci     * If this parameter is not specified or is set to 0, advertisement is continuously sent.
478061847f8eSopenharmony_ci     *
478161847f8eSopenharmony_ci     * @type { ?number }
478261847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
478361847f8eSopenharmony_ci     * @since 11
478461847f8eSopenharmony_ci     */
478561847f8eSopenharmony_ci    duration?: number;
478661847f8eSopenharmony_ci  }
478761847f8eSopenharmony_ci
478861847f8eSopenharmony_ci  /**
478961847f8eSopenharmony_ci   * Parameter for dynamically enable advertising.
479061847f8eSopenharmony_ci   *
479161847f8eSopenharmony_ci   * @typedef AdvertisingEnableParams
479261847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
479361847f8eSopenharmony_ci   * @since 11
479461847f8eSopenharmony_ci   */
479561847f8eSopenharmony_ci  interface AdvertisingEnableParams {
479661847f8eSopenharmony_ci    /**
479761847f8eSopenharmony_ci     * Indicates the ID of current advertising.
479861847f8eSopenharmony_ci     *
479961847f8eSopenharmony_ci     * @type { number }
480061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
480161847f8eSopenharmony_ci     * @since 11
480261847f8eSopenharmony_ci     */
480361847f8eSopenharmony_ci    advertisingId: number;
480461847f8eSopenharmony_ci    /**
480561847f8eSopenharmony_ci     * Indicates the duration for advertising continuously.
480661847f8eSopenharmony_ci     * The duration, in 10ms unit. Valid range is from 1 (10ms) to 65535 (655,350 ms).
480761847f8eSopenharmony_ci     * If this parameter is not specified or is set to 0, advertise is continuously sent.
480861847f8eSopenharmony_ci     *
480961847f8eSopenharmony_ci     * @type { ?number }
481061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
481161847f8eSopenharmony_ci     * @since 11
481261847f8eSopenharmony_ci     */
481361847f8eSopenharmony_ci    duration?: number;
481461847f8eSopenharmony_ci  }
481561847f8eSopenharmony_ci
481661847f8eSopenharmony_ci  /**
481761847f8eSopenharmony_ci   * Parameter for dynamically disable advertising.
481861847f8eSopenharmony_ci   *
481961847f8eSopenharmony_ci   * @typedef AdvertisingDisableParams
482061847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
482161847f8eSopenharmony_ci   * @since 11
482261847f8eSopenharmony_ci   */
482361847f8eSopenharmony_ci  interface AdvertisingDisableParams {
482461847f8eSopenharmony_ci    /**
482561847f8eSopenharmony_ci     * Indicates the ID of current advertising.
482661847f8eSopenharmony_ci     *
482761847f8eSopenharmony_ci     * @type { number }
482861847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
482961847f8eSopenharmony_ci     * @since 11
483061847f8eSopenharmony_ci     */
483161847f8eSopenharmony_ci    advertisingId: number;
483261847f8eSopenharmony_ci  }
483361847f8eSopenharmony_ci
483461847f8eSopenharmony_ci  /**
483561847f8eSopenharmony_ci   * Advertising state change information.
483661847f8eSopenharmony_ci   *
483761847f8eSopenharmony_ci   * @typedef AdvertisingStateChangeInfo
483861847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
483961847f8eSopenharmony_ci   * @since 11
484061847f8eSopenharmony_ci   */
484161847f8eSopenharmony_ci  /**
484261847f8eSopenharmony_ci   * Advertising state change information.
484361847f8eSopenharmony_ci   *
484461847f8eSopenharmony_ci   * @typedef AdvertisingStateChangeInfo
484561847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
484661847f8eSopenharmony_ci   * @crossplatform
484761847f8eSopenharmony_ci   * @since 13
484861847f8eSopenharmony_ci   */
484961847f8eSopenharmony_ci  interface AdvertisingStateChangeInfo {
485061847f8eSopenharmony_ci    /**
485161847f8eSopenharmony_ci     * Indicates the ID of current advertising.
485261847f8eSopenharmony_ci     *
485361847f8eSopenharmony_ci     * @type { number }
485461847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
485561847f8eSopenharmony_ci     * @since 11
485661847f8eSopenharmony_ci     */
485761847f8eSopenharmony_ci    /**
485861847f8eSopenharmony_ci     * Indicates the ID of current advertising.
485961847f8eSopenharmony_ci     *
486061847f8eSopenharmony_ci     * @type { number }
486161847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
486261847f8eSopenharmony_ci     * @crossplatform
486361847f8eSopenharmony_ci     * @since 13
486461847f8eSopenharmony_ci     */
486561847f8eSopenharmony_ci    advertisingId: number;
486661847f8eSopenharmony_ci    /**
486761847f8eSopenharmony_ci     * Indicates the advertising state.
486861847f8eSopenharmony_ci     *
486961847f8eSopenharmony_ci     * @type { AdvertisingState }
487061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
487161847f8eSopenharmony_ci     * @since 11
487261847f8eSopenharmony_ci     */
487361847f8eSopenharmony_ci    /**
487461847f8eSopenharmony_ci     * Indicates the advertising state.
487561847f8eSopenharmony_ci     *
487661847f8eSopenharmony_ci     * @type { AdvertisingState }
487761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
487861847f8eSopenharmony_ci     * @crossplatform
487961847f8eSopenharmony_ci     * @since 13
488061847f8eSopenharmony_ci     */
488161847f8eSopenharmony_ci    state: AdvertisingState;
488261847f8eSopenharmony_ci  }
488361847f8eSopenharmony_ci
488461847f8eSopenharmony_ci  /**
488561847f8eSopenharmony_ci   * Describes the manufacturer data.
488661847f8eSopenharmony_ci   *
488761847f8eSopenharmony_ci   * @typedef ManufactureData
488861847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
488961847f8eSopenharmony_ci   * @since 10
489061847f8eSopenharmony_ci   */
489161847f8eSopenharmony_ci  /**
489261847f8eSopenharmony_ci   * Describes the manufacturer data.
489361847f8eSopenharmony_ci   *
489461847f8eSopenharmony_ci   * @typedef ManufactureData
489561847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
489661847f8eSopenharmony_ci   * @atomicservice
489761847f8eSopenharmony_ci   * @since 12
489861847f8eSopenharmony_ci   */
489961847f8eSopenharmony_ci  /**
490061847f8eSopenharmony_ci   * Describes the manufacturer data.
490161847f8eSopenharmony_ci   *
490261847f8eSopenharmony_ci   * @typedef ManufactureData
490361847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
490461847f8eSopenharmony_ci   * @crossplatform
490561847f8eSopenharmony_ci   * @atomicservice
490661847f8eSopenharmony_ci   * @since 13
490761847f8eSopenharmony_ci   */
490861847f8eSopenharmony_ci  interface ManufactureData {
490961847f8eSopenharmony_ci    /**
491061847f8eSopenharmony_ci     * Indicates the manufacturer ID assigned by Bluetooth SIG
491161847f8eSopenharmony_ci     *
491261847f8eSopenharmony_ci     * @type { number }
491361847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
491461847f8eSopenharmony_ci     * @since 10
491561847f8eSopenharmony_ci     */
491661847f8eSopenharmony_ci    /**
491761847f8eSopenharmony_ci     * Indicates the manufacturer ID assigned by Bluetooth SIG
491861847f8eSopenharmony_ci     *
491961847f8eSopenharmony_ci     * @type { number }
492061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
492161847f8eSopenharmony_ci     * @atomicservice
492261847f8eSopenharmony_ci     * @since 12
492361847f8eSopenharmony_ci     */
492461847f8eSopenharmony_ci    /**
492561847f8eSopenharmony_ci     * Indicates the manufacturer ID assigned by Bluetooth SIG
492661847f8eSopenharmony_ci     *
492761847f8eSopenharmony_ci     * @type { number }
492861847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
492961847f8eSopenharmony_ci     * @crossplatform
493061847f8eSopenharmony_ci     * @atomicservice
493161847f8eSopenharmony_ci     * @since 13
493261847f8eSopenharmony_ci     */
493361847f8eSopenharmony_ci    manufactureId: number;
493461847f8eSopenharmony_ci    /**
493561847f8eSopenharmony_ci     * Indicates the manufacturer data to add
493661847f8eSopenharmony_ci     *
493761847f8eSopenharmony_ci     * @type { ArrayBuffer }
493861847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
493961847f8eSopenharmony_ci     * @since 10
494061847f8eSopenharmony_ci     */
494161847f8eSopenharmony_ci    /**
494261847f8eSopenharmony_ci     * Indicates the manufacturer data to add
494361847f8eSopenharmony_ci     *
494461847f8eSopenharmony_ci     * @type { ArrayBuffer }
494561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
494661847f8eSopenharmony_ci     * @atomicservice
494761847f8eSopenharmony_ci     * @since 12
494861847f8eSopenharmony_ci     */
494961847f8eSopenharmony_ci    /**
495061847f8eSopenharmony_ci     * Indicates the manufacturer data to add
495161847f8eSopenharmony_ci     *
495261847f8eSopenharmony_ci     * @type { ArrayBuffer }
495361847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
495461847f8eSopenharmony_ci     * @crossplatform
495561847f8eSopenharmony_ci     * @atomicservice
495661847f8eSopenharmony_ci     * @since 13
495761847f8eSopenharmony_ci     */
495861847f8eSopenharmony_ci    manufactureValue: ArrayBuffer;
495961847f8eSopenharmony_ci  }
496061847f8eSopenharmony_ci
496161847f8eSopenharmony_ci  /**
496261847f8eSopenharmony_ci   * Describes the service data.
496361847f8eSopenharmony_ci   *
496461847f8eSopenharmony_ci   * @typedef ServiceData
496561847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
496661847f8eSopenharmony_ci   * @since 10
496761847f8eSopenharmony_ci   */
496861847f8eSopenharmony_ci  /**
496961847f8eSopenharmony_ci   * Describes the service data.
497061847f8eSopenharmony_ci   *
497161847f8eSopenharmony_ci   * @typedef ServiceData
497261847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
497361847f8eSopenharmony_ci   * @atomicservice
497461847f8eSopenharmony_ci   * @since 12
497561847f8eSopenharmony_ci   */
497661847f8eSopenharmony_ci  /**
497761847f8eSopenharmony_ci   * Describes the service data.
497861847f8eSopenharmony_ci   *
497961847f8eSopenharmony_ci   * @typedef ServiceData
498061847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
498161847f8eSopenharmony_ci   * @crossplatform
498261847f8eSopenharmony_ci   * @atomicservice
498361847f8eSopenharmony_ci   * @since 13
498461847f8eSopenharmony_ci   */
498561847f8eSopenharmony_ci  interface ServiceData {
498661847f8eSopenharmony_ci    /**
498761847f8eSopenharmony_ci     * Indicates the UUID of the service data to add
498861847f8eSopenharmony_ci     *
498961847f8eSopenharmony_ci     * @type { string }
499061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
499161847f8eSopenharmony_ci     * @since 10
499261847f8eSopenharmony_ci     */
499361847f8eSopenharmony_ci    /**
499461847f8eSopenharmony_ci     * Indicates the UUID of the service data to add
499561847f8eSopenharmony_ci     *
499661847f8eSopenharmony_ci     * @type { string }
499761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
499861847f8eSopenharmony_ci     * @atomicservice
499961847f8eSopenharmony_ci     * @since 12
500061847f8eSopenharmony_ci     */
500161847f8eSopenharmony_ci    /**
500261847f8eSopenharmony_ci     * Indicates the UUID of the service data to add
500361847f8eSopenharmony_ci     *
500461847f8eSopenharmony_ci     * @type { string }
500561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
500661847f8eSopenharmony_ci     * @crossplatform
500761847f8eSopenharmony_ci     * @atomicservice
500861847f8eSopenharmony_ci     * @since 13
500961847f8eSopenharmony_ci     */
501061847f8eSopenharmony_ci    serviceUuid: string;
501161847f8eSopenharmony_ci    /**
501261847f8eSopenharmony_ci     * Indicates the service data to add
501361847f8eSopenharmony_ci     *
501461847f8eSopenharmony_ci     * @type { ArrayBuffer }
501561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
501661847f8eSopenharmony_ci     * @since 10
501761847f8eSopenharmony_ci     */
501861847f8eSopenharmony_ci    /**
501961847f8eSopenharmony_ci     * Indicates the service data to add
502061847f8eSopenharmony_ci     *
502161847f8eSopenharmony_ci     * @type { ArrayBuffer }
502261847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
502361847f8eSopenharmony_ci     * @atomicservice
502461847f8eSopenharmony_ci     * @since 12
502561847f8eSopenharmony_ci     */
502661847f8eSopenharmony_ci    /**
502761847f8eSopenharmony_ci     * Indicates the service data to add
502861847f8eSopenharmony_ci     *
502961847f8eSopenharmony_ci     * @type { ArrayBuffer }
503061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
503161847f8eSopenharmony_ci     * @crossplatform
503261847f8eSopenharmony_ci     * @atomicservice
503361847f8eSopenharmony_ci     * @since 13
503461847f8eSopenharmony_ci     */
503561847f8eSopenharmony_ci    serviceValue: ArrayBuffer;
503661847f8eSopenharmony_ci  }
503761847f8eSopenharmony_ci
503861847f8eSopenharmony_ci  /**
503961847f8eSopenharmony_ci   * Describes the criteria for filtering scanning results can be set.
504061847f8eSopenharmony_ci   *
504161847f8eSopenharmony_ci   * @typedef ScanFilter
504261847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
504361847f8eSopenharmony_ci   * @since 10
504461847f8eSopenharmony_ci   */
504561847f8eSopenharmony_ci  /**
504661847f8eSopenharmony_ci   * Describes the criteria for filtering scanning results can be set.
504761847f8eSopenharmony_ci   *
504861847f8eSopenharmony_ci   * @typedef ScanFilter
504961847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
505061847f8eSopenharmony_ci   * @atomicservice
505161847f8eSopenharmony_ci   * @since 12
505261847f8eSopenharmony_ci   */
505361847f8eSopenharmony_ci  /**
505461847f8eSopenharmony_ci   * Describes the criteria for filtering scanning results can be set.
505561847f8eSopenharmony_ci   *
505661847f8eSopenharmony_ci   * @typedef ScanFilter
505761847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
505861847f8eSopenharmony_ci   * @crossplatform
505961847f8eSopenharmony_ci   * @atomicservice
506061847f8eSopenharmony_ci   * @since 13
506161847f8eSopenharmony_ci   */
506261847f8eSopenharmony_ci  interface ScanFilter {
506361847f8eSopenharmony_ci    /**
506461847f8eSopenharmony_ci     * The address of a BLE peripheral device
506561847f8eSopenharmony_ci     *
506661847f8eSopenharmony_ci     * @type { ?string }
506761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
506861847f8eSopenharmony_ci     * @since 10
506961847f8eSopenharmony_ci     */
507061847f8eSopenharmony_ci    /**
507161847f8eSopenharmony_ci     * The address of a BLE peripheral device
507261847f8eSopenharmony_ci     *
507361847f8eSopenharmony_ci     * @type { ?string }
507461847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
507561847f8eSopenharmony_ci     * @atomicservice
507661847f8eSopenharmony_ci     * @since 12
507761847f8eSopenharmony_ci     */
507861847f8eSopenharmony_ci    /**
507961847f8eSopenharmony_ci     * The address of a BLE peripheral device
508061847f8eSopenharmony_ci     *
508161847f8eSopenharmony_ci     * @type { ?string }
508261847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
508361847f8eSopenharmony_ci     * @crossplatform
508461847f8eSopenharmony_ci     * @atomicservice
508561847f8eSopenharmony_ci     * @since 13
508661847f8eSopenharmony_ci     */
508761847f8eSopenharmony_ci    deviceId?: string;
508861847f8eSopenharmony_ci
508961847f8eSopenharmony_ci    /**
509061847f8eSopenharmony_ci     * The name of a BLE peripheral device
509161847f8eSopenharmony_ci     *
509261847f8eSopenharmony_ci     * @type { ?string }
509361847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
509461847f8eSopenharmony_ci     * @since 10
509561847f8eSopenharmony_ci     */
509661847f8eSopenharmony_ci    /**
509761847f8eSopenharmony_ci     * The name of a BLE peripheral device
509861847f8eSopenharmony_ci     *
509961847f8eSopenharmony_ci     * @type { ?string }
510061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
510161847f8eSopenharmony_ci     * @atomicservice
510261847f8eSopenharmony_ci     * @since 12
510361847f8eSopenharmony_ci     */
510461847f8eSopenharmony_ci    /**
510561847f8eSopenharmony_ci     * The name of a BLE peripheral device
510661847f8eSopenharmony_ci     *
510761847f8eSopenharmony_ci     * @type { ?string }
510861847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
510961847f8eSopenharmony_ci     * @crossplatform
511061847f8eSopenharmony_ci     * @atomicservice
511161847f8eSopenharmony_ci     * @since 13
511261847f8eSopenharmony_ci     */
511361847f8eSopenharmony_ci    name?: string;
511461847f8eSopenharmony_ci
511561847f8eSopenharmony_ci    /**
511661847f8eSopenharmony_ci     * The service UUID of a BLE peripheral device
511761847f8eSopenharmony_ci     *
511861847f8eSopenharmony_ci     * @type { ?string }
511961847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
512061847f8eSopenharmony_ci     * @since 10
512161847f8eSopenharmony_ci     */
512261847f8eSopenharmony_ci    /**
512361847f8eSopenharmony_ci     * The service UUID of a BLE peripheral device
512461847f8eSopenharmony_ci     *
512561847f8eSopenharmony_ci     * @type { ?string }
512661847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
512761847f8eSopenharmony_ci     * @atomicservice
512861847f8eSopenharmony_ci     * @since 12
512961847f8eSopenharmony_ci     */
513061847f8eSopenharmony_ci    /**
513161847f8eSopenharmony_ci     * The service UUID of a BLE peripheral device
513261847f8eSopenharmony_ci     *
513361847f8eSopenharmony_ci     * @type { ?string }
513461847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
513561847f8eSopenharmony_ci     * @crossplatform
513661847f8eSopenharmony_ci     * @atomicservice
513761847f8eSopenharmony_ci     * @since 13
513861847f8eSopenharmony_ci     */
513961847f8eSopenharmony_ci    serviceUuid?: string;
514061847f8eSopenharmony_ci
514161847f8eSopenharmony_ci    /**
514261847f8eSopenharmony_ci     * Service UUID mask.
514361847f8eSopenharmony_ci     *
514461847f8eSopenharmony_ci     * @type { ?string }
514561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
514661847f8eSopenharmony_ci     * @since 10
514761847f8eSopenharmony_ci     */
514861847f8eSopenharmony_ci    /**
514961847f8eSopenharmony_ci     * Service UUID mask.
515061847f8eSopenharmony_ci     *
515161847f8eSopenharmony_ci     * @type { ?string }
515261847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
515361847f8eSopenharmony_ci     * @atomicservice
515461847f8eSopenharmony_ci     * @since 12
515561847f8eSopenharmony_ci     */
515661847f8eSopenharmony_ci    /**
515761847f8eSopenharmony_ci     * Service UUID mask.
515861847f8eSopenharmony_ci     *
515961847f8eSopenharmony_ci     * @type { ?string }
516061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
516161847f8eSopenharmony_ci     * @crossplatform
516261847f8eSopenharmony_ci     * @atomicservice
516361847f8eSopenharmony_ci     * @since 13
516461847f8eSopenharmony_ci     */
516561847f8eSopenharmony_ci    serviceUuidMask?: string;
516661847f8eSopenharmony_ci
516761847f8eSopenharmony_ci    /**
516861847f8eSopenharmony_ci     * Service solicitation UUID.
516961847f8eSopenharmony_ci     *
517061847f8eSopenharmony_ci     * @type { ?string }
517161847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
517261847f8eSopenharmony_ci     * @since 10
517361847f8eSopenharmony_ci     */
517461847f8eSopenharmony_ci    /**
517561847f8eSopenharmony_ci     * Service solicitation UUID.
517661847f8eSopenharmony_ci     *
517761847f8eSopenharmony_ci     * @type { ?string }
517861847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
517961847f8eSopenharmony_ci     * @atomicservice
518061847f8eSopenharmony_ci     * @since 12
518161847f8eSopenharmony_ci     */
518261847f8eSopenharmony_ci    /**
518361847f8eSopenharmony_ci     * Service solicitation UUID.
518461847f8eSopenharmony_ci     *
518561847f8eSopenharmony_ci     * @type { ?string }
518661847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
518761847f8eSopenharmony_ci     * @crossplatform
518861847f8eSopenharmony_ci     * @atomicservice
518961847f8eSopenharmony_ci     * @since 13
519061847f8eSopenharmony_ci     */
519161847f8eSopenharmony_ci    serviceSolicitationUuid?: string;
519261847f8eSopenharmony_ci
519361847f8eSopenharmony_ci    /**
519461847f8eSopenharmony_ci     * Service solicitation UUID mask.
519561847f8eSopenharmony_ci     *
519661847f8eSopenharmony_ci     * @type { ?string }
519761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
519861847f8eSopenharmony_ci     * @since 10
519961847f8eSopenharmony_ci     */
520061847f8eSopenharmony_ci    /**
520161847f8eSopenharmony_ci     * Service solicitation UUID mask.
520261847f8eSopenharmony_ci     *
520361847f8eSopenharmony_ci     * @type { ?string }
520461847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
520561847f8eSopenharmony_ci     * @atomicservice
520661847f8eSopenharmony_ci     * @since 12
520761847f8eSopenharmony_ci     */
520861847f8eSopenharmony_ci    /**
520961847f8eSopenharmony_ci     * Service solicitation UUID mask.
521061847f8eSopenharmony_ci     *
521161847f8eSopenharmony_ci     * @type { ?string }
521261847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
521361847f8eSopenharmony_ci     * @crossplatform
521461847f8eSopenharmony_ci     * @atomicservice
521561847f8eSopenharmony_ci     * @since 13
521661847f8eSopenharmony_ci     */
521761847f8eSopenharmony_ci    serviceSolicitationUuidMask?: string;
521861847f8eSopenharmony_ci
521961847f8eSopenharmony_ci    /**
522061847f8eSopenharmony_ci     * Service data.
522161847f8eSopenharmony_ci     *
522261847f8eSopenharmony_ci     * @type { ?ArrayBuffer }
522361847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
522461847f8eSopenharmony_ci     * @since 10
522561847f8eSopenharmony_ci     */
522661847f8eSopenharmony_ci    /**
522761847f8eSopenharmony_ci     * Service data.
522861847f8eSopenharmony_ci     *
522961847f8eSopenharmony_ci     * @type { ?ArrayBuffer }
523061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
523161847f8eSopenharmony_ci     * @atomicservice
523261847f8eSopenharmony_ci     * @since 12
523361847f8eSopenharmony_ci     */
523461847f8eSopenharmony_ci    /**
523561847f8eSopenharmony_ci     * Service data.
523661847f8eSopenharmony_ci     *
523761847f8eSopenharmony_ci     * @type { ?ArrayBuffer }
523861847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
523961847f8eSopenharmony_ci     * @crossplatform
524061847f8eSopenharmony_ci     * @atomicservice
524161847f8eSopenharmony_ci     * @since 13
524261847f8eSopenharmony_ci     */
524361847f8eSopenharmony_ci    serviceData?: ArrayBuffer;
524461847f8eSopenharmony_ci
524561847f8eSopenharmony_ci    /**
524661847f8eSopenharmony_ci     * Service data mask.
524761847f8eSopenharmony_ci     *
524861847f8eSopenharmony_ci     * @type { ?ArrayBuffer }
524961847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
525061847f8eSopenharmony_ci     * @since 10
525161847f8eSopenharmony_ci     */
525261847f8eSopenharmony_ci    /**
525361847f8eSopenharmony_ci     * Service data mask.
525461847f8eSopenharmony_ci     *
525561847f8eSopenharmony_ci     * @type { ?ArrayBuffer }
525661847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
525761847f8eSopenharmony_ci     * @atomicservice
525861847f8eSopenharmony_ci     * @since 12
525961847f8eSopenharmony_ci     */
526061847f8eSopenharmony_ci    /**
526161847f8eSopenharmony_ci     * Service data mask.
526261847f8eSopenharmony_ci     *
526361847f8eSopenharmony_ci     * @type { ?ArrayBuffer }
526461847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
526561847f8eSopenharmony_ci     * @crossplatform
526661847f8eSopenharmony_ci     * @atomicservice
526761847f8eSopenharmony_ci     * @since 13
526861847f8eSopenharmony_ci     */
526961847f8eSopenharmony_ci    serviceDataMask?: ArrayBuffer;
527061847f8eSopenharmony_ci
527161847f8eSopenharmony_ci    /**
527261847f8eSopenharmony_ci     * Manufacture id.
527361847f8eSopenharmony_ci     *
527461847f8eSopenharmony_ci     * @type { ?number }
527561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
527661847f8eSopenharmony_ci     * @since 10
527761847f8eSopenharmony_ci     */
527861847f8eSopenharmony_ci    /**
527961847f8eSopenharmony_ci     * Manufacture id.
528061847f8eSopenharmony_ci     *
528161847f8eSopenharmony_ci     * @type { ?number }
528261847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
528361847f8eSopenharmony_ci     * @atomicservice
528461847f8eSopenharmony_ci     * @since 12
528561847f8eSopenharmony_ci     */
528661847f8eSopenharmony_ci    /**
528761847f8eSopenharmony_ci     * Manufacture id.
528861847f8eSopenharmony_ci     *
528961847f8eSopenharmony_ci     * @type { ?number }
529061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
529161847f8eSopenharmony_ci     * @crossplatform
529261847f8eSopenharmony_ci     * @atomicservice
529361847f8eSopenharmony_ci     * @since 13
529461847f8eSopenharmony_ci     */
529561847f8eSopenharmony_ci    manufactureId?: number;
529661847f8eSopenharmony_ci
529761847f8eSopenharmony_ci    /**
529861847f8eSopenharmony_ci     * Manufacture data.
529961847f8eSopenharmony_ci     *
530061847f8eSopenharmony_ci     * @type { ?ArrayBuffer }
530161847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
530261847f8eSopenharmony_ci     * @since 10
530361847f8eSopenharmony_ci     */
530461847f8eSopenharmony_ci    /**
530561847f8eSopenharmony_ci     * Manufacture data.
530661847f8eSopenharmony_ci     *
530761847f8eSopenharmony_ci     * @type { ?ArrayBuffer }
530861847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
530961847f8eSopenharmony_ci     * @atomicservice
531061847f8eSopenharmony_ci     * @since 12
531161847f8eSopenharmony_ci     */
531261847f8eSopenharmony_ci    /**
531361847f8eSopenharmony_ci     * Manufacture data.
531461847f8eSopenharmony_ci     *
531561847f8eSopenharmony_ci     * @type { ?ArrayBuffer }
531661847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
531761847f8eSopenharmony_ci     * @crossplatform
531861847f8eSopenharmony_ci     * @atomicservice
531961847f8eSopenharmony_ci     * @since 13
532061847f8eSopenharmony_ci     */
532161847f8eSopenharmony_ci    manufactureData?: ArrayBuffer;
532261847f8eSopenharmony_ci
532361847f8eSopenharmony_ci    /**
532461847f8eSopenharmony_ci     * Manufacture data mask.
532561847f8eSopenharmony_ci     *
532661847f8eSopenharmony_ci     * @type { ?ArrayBuffer }
532761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
532861847f8eSopenharmony_ci     * @since 10
532961847f8eSopenharmony_ci     */
533061847f8eSopenharmony_ci    /**
533161847f8eSopenharmony_ci     * Manufacture data mask.
533261847f8eSopenharmony_ci     *
533361847f8eSopenharmony_ci     * @type { ?ArrayBuffer }
533461847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
533561847f8eSopenharmony_ci     * @atomicservice
533661847f8eSopenharmony_ci     * @since 12
533761847f8eSopenharmony_ci     */
533861847f8eSopenharmony_ci    /**
533961847f8eSopenharmony_ci     * Manufacture data mask.
534061847f8eSopenharmony_ci     *
534161847f8eSopenharmony_ci     * @type { ?ArrayBuffer }
534261847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
534361847f8eSopenharmony_ci     * @crossplatform
534461847f8eSopenharmony_ci     * @atomicservice
534561847f8eSopenharmony_ci     * @since 13
534661847f8eSopenharmony_ci     */
534761847f8eSopenharmony_ci    manufactureDataMask?: ArrayBuffer;
534861847f8eSopenharmony_ci  }
534961847f8eSopenharmony_ci
535061847f8eSopenharmony_ci  /**
535161847f8eSopenharmony_ci   * Describes the parameters for scan.
535261847f8eSopenharmony_ci   *
535361847f8eSopenharmony_ci   * @typedef ScanOptions
535461847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
535561847f8eSopenharmony_ci   * @since 10
535661847f8eSopenharmony_ci   */
535761847f8eSopenharmony_ci  /**
535861847f8eSopenharmony_ci   * Describes the parameters for scan.
535961847f8eSopenharmony_ci   *
536061847f8eSopenharmony_ci   * @typedef ScanOptions
536161847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
536261847f8eSopenharmony_ci   * @atomicservice
536361847f8eSopenharmony_ci   * @since 12
536461847f8eSopenharmony_ci   */
536561847f8eSopenharmony_ci  /**
536661847f8eSopenharmony_ci   * Describes the parameters for scan.
536761847f8eSopenharmony_ci   *
536861847f8eSopenharmony_ci   * @typedef ScanOptions
536961847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
537061847f8eSopenharmony_ci   * @crossplatform
537161847f8eSopenharmony_ci   * @atomicservice
537261847f8eSopenharmony_ci   * @since 13
537361847f8eSopenharmony_ci   */
537461847f8eSopenharmony_ci  interface ScanOptions {
537561847f8eSopenharmony_ci    /**
537661847f8eSopenharmony_ci     * Time of delay for reporting the scan result
537761847f8eSopenharmony_ci     *
537861847f8eSopenharmony_ci     * @type { ?number }
537961847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
538061847f8eSopenharmony_ci     * @since 10
538161847f8eSopenharmony_ci     */
538261847f8eSopenharmony_ci    /**
538361847f8eSopenharmony_ci     * Time of delay for reporting the scan result
538461847f8eSopenharmony_ci     *
538561847f8eSopenharmony_ci     * @type { ?number }
538661847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
538761847f8eSopenharmony_ci     * @atomicservice
538861847f8eSopenharmony_ci     * @since 12
538961847f8eSopenharmony_ci     */
539061847f8eSopenharmony_ci    /**
539161847f8eSopenharmony_ci     * Time of delay for reporting the scan result
539261847f8eSopenharmony_ci     *
539361847f8eSopenharmony_ci     * @type { ?number }
539461847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
539561847f8eSopenharmony_ci     * @crossplatform
539661847f8eSopenharmony_ci     * @atomicservice
539761847f8eSopenharmony_ci     * @since 13
539861847f8eSopenharmony_ci     */
539961847f8eSopenharmony_ci    interval?: number;
540061847f8eSopenharmony_ci    /**
540161847f8eSopenharmony_ci     * Bluetooth LE scan mode
540261847f8eSopenharmony_ci     *
540361847f8eSopenharmony_ci     * @type { ?ScanDuty }
540461847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
540561847f8eSopenharmony_ci     * @since 10
540661847f8eSopenharmony_ci     */
540761847f8eSopenharmony_ci    /**
540861847f8eSopenharmony_ci     * Bluetooth LE scan mode
540961847f8eSopenharmony_ci     *
541061847f8eSopenharmony_ci     * @type { ?ScanDuty }
541161847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
541261847f8eSopenharmony_ci     * @atomicservice
541361847f8eSopenharmony_ci     * @since 12
541461847f8eSopenharmony_ci     */
541561847f8eSopenharmony_ci    /**
541661847f8eSopenharmony_ci     * Bluetooth LE scan mode
541761847f8eSopenharmony_ci     *
541861847f8eSopenharmony_ci     * @type { ?ScanDuty }
541961847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
542061847f8eSopenharmony_ci     * @crossplatform
542161847f8eSopenharmony_ci     * @atomicservice
542261847f8eSopenharmony_ci     * @since 13
542361847f8eSopenharmony_ci     */
542461847f8eSopenharmony_ci    dutyMode?: ScanDuty;
542561847f8eSopenharmony_ci    /**
542661847f8eSopenharmony_ci     * Match mode for Bluetooth LE scan filters hardware match
542761847f8eSopenharmony_ci     *
542861847f8eSopenharmony_ci     * @type { ?MatchMode }
542961847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
543061847f8eSopenharmony_ci     * @since 10
543161847f8eSopenharmony_ci     */
543261847f8eSopenharmony_ci    /**
543361847f8eSopenharmony_ci     * Match mode for Bluetooth LE scan filters hardware match
543461847f8eSopenharmony_ci     *
543561847f8eSopenharmony_ci     * @type { ?MatchMode }
543661847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
543761847f8eSopenharmony_ci     * @atomicservice
543861847f8eSopenharmony_ci     * @since 12
543961847f8eSopenharmony_ci     */
544061847f8eSopenharmony_ci    matchMode?: MatchMode;
544161847f8eSopenharmony_ci    /**
544261847f8eSopenharmony_ci     * Physical Layer used during scan.
544361847f8eSopenharmony_ci     *
544461847f8eSopenharmony_ci     * @type { ?PhyType }
544561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
544661847f8eSopenharmony_ci     * @atomicservice
544761847f8eSopenharmony_ci     * @since 12
544861847f8eSopenharmony_ci     */
544961847f8eSopenharmony_ci    /**
545061847f8eSopenharmony_ci     * Physical Layer used during scan.
545161847f8eSopenharmony_ci     *
545261847f8eSopenharmony_ci     * @type { ?PhyType }
545361847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
545461847f8eSopenharmony_ci     * @crossplatform
545561847f8eSopenharmony_ci     * @atomicservice
545661847f8eSopenharmony_ci     * @since 13
545761847f8eSopenharmony_ci     */
545861847f8eSopenharmony_ci    phyType?: PhyType;
545961847f8eSopenharmony_ci  }
546061847f8eSopenharmony_ci
546161847f8eSopenharmony_ci  /**
546261847f8eSopenharmony_ci   * Describes the properties of a gatt characteristic.
546361847f8eSopenharmony_ci   *
546461847f8eSopenharmony_ci   * @typedef GattProperties
546561847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
546661847f8eSopenharmony_ci   * @since 10
546761847f8eSopenharmony_ci   */
546861847f8eSopenharmony_ci  /**
546961847f8eSopenharmony_ci   * Describes the properties of a gatt characteristic.
547061847f8eSopenharmony_ci   *
547161847f8eSopenharmony_ci   * @typedef GattProperties
547261847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
547361847f8eSopenharmony_ci   * @atomicservice
547461847f8eSopenharmony_ci   * @since 12
547561847f8eSopenharmony_ci   */
547661847f8eSopenharmony_ci  /**
547761847f8eSopenharmony_ci   * Describes the properties of a gatt characteristic.
547861847f8eSopenharmony_ci   *
547961847f8eSopenharmony_ci   * @typedef GattProperties
548061847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
548161847f8eSopenharmony_ci   * @crossplatform
548261847f8eSopenharmony_ci   * @atomicservice
548361847f8eSopenharmony_ci   * @since 13
548461847f8eSopenharmony_ci   */
548561847f8eSopenharmony_ci  interface GattProperties {
548661847f8eSopenharmony_ci    /**
548761847f8eSopenharmony_ci     * Support write property of the characteristic.
548861847f8eSopenharmony_ci     *
548961847f8eSopenharmony_ci     * @type { ?boolean }
549061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
549161847f8eSopenharmony_ci     * @since 10
549261847f8eSopenharmony_ci     */
549361847f8eSopenharmony_ci    /**
549461847f8eSopenharmony_ci     * Support write property of the characteristic.
549561847f8eSopenharmony_ci     *
549661847f8eSopenharmony_ci     * @type { ?boolean }
549761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
549861847f8eSopenharmony_ci     * @atomicservice
549961847f8eSopenharmony_ci     * @since 12
550061847f8eSopenharmony_ci     */
550161847f8eSopenharmony_ci    /**
550261847f8eSopenharmony_ci     * Support write property of the characteristic.
550361847f8eSopenharmony_ci     *
550461847f8eSopenharmony_ci     * @type { ?boolean }
550561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
550661847f8eSopenharmony_ci     * @crossplatform
550761847f8eSopenharmony_ci     * @atomicservice
550861847f8eSopenharmony_ci     * @since 13
550961847f8eSopenharmony_ci     */
551061847f8eSopenharmony_ci    write?: boolean;
551161847f8eSopenharmony_ci    /**
551261847f8eSopenharmony_ci     * Support write no response property of the characteristic.
551361847f8eSopenharmony_ci     *
551461847f8eSopenharmony_ci     * @type { ?boolean }
551561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
551661847f8eSopenharmony_ci     * @since 10
551761847f8eSopenharmony_ci     */
551861847f8eSopenharmony_ci    /**
551961847f8eSopenharmony_ci     * Support write no response property of the characteristic.
552061847f8eSopenharmony_ci     *
552161847f8eSopenharmony_ci     * @type { ?boolean }
552261847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
552361847f8eSopenharmony_ci     * @atomicservice
552461847f8eSopenharmony_ci     * @since 12
552561847f8eSopenharmony_ci     */
552661847f8eSopenharmony_ci    /**
552761847f8eSopenharmony_ci     * Support write no response property of the characteristic.
552861847f8eSopenharmony_ci     *
552961847f8eSopenharmony_ci     * @type { ?boolean }
553061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
553161847f8eSopenharmony_ci     * @crossplatform
553261847f8eSopenharmony_ci     * @atomicservice
553361847f8eSopenharmony_ci     * @since 13
553461847f8eSopenharmony_ci     */
553561847f8eSopenharmony_ci    writeNoResponse?: boolean;
553661847f8eSopenharmony_ci    /**
553761847f8eSopenharmony_ci     * Support read property of the characteristic.
553861847f8eSopenharmony_ci     *
553961847f8eSopenharmony_ci     * @type { ?boolean }
554061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
554161847f8eSopenharmony_ci     * @since 10
554261847f8eSopenharmony_ci     */
554361847f8eSopenharmony_ci    /**
554461847f8eSopenharmony_ci     * Support read property of the characteristic.
554561847f8eSopenharmony_ci     *
554661847f8eSopenharmony_ci     * @type { ?boolean }
554761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
554861847f8eSopenharmony_ci     * @atomicservice
554961847f8eSopenharmony_ci     * @since 12
555061847f8eSopenharmony_ci     */
555161847f8eSopenharmony_ci    /**
555261847f8eSopenharmony_ci     * Support read property of the characteristic.
555361847f8eSopenharmony_ci     *
555461847f8eSopenharmony_ci     * @type { ?boolean }
555561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
555661847f8eSopenharmony_ci     * @crossplatform
555761847f8eSopenharmony_ci     * @atomicservice
555861847f8eSopenharmony_ci     * @since 13
555961847f8eSopenharmony_ci     */
556061847f8eSopenharmony_ci    read?: boolean;
556161847f8eSopenharmony_ci    /**
556261847f8eSopenharmony_ci     * Support notify property of the characteristic.
556361847f8eSopenharmony_ci     *
556461847f8eSopenharmony_ci     * @type { ?boolean }
556561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
556661847f8eSopenharmony_ci     * @since 10
556761847f8eSopenharmony_ci     */
556861847f8eSopenharmony_ci    /**
556961847f8eSopenharmony_ci     * Support notify property of the characteristic.
557061847f8eSopenharmony_ci     *
557161847f8eSopenharmony_ci     * @type { ?boolean }
557261847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
557361847f8eSopenharmony_ci     * @atomicservice
557461847f8eSopenharmony_ci     * @since 12
557561847f8eSopenharmony_ci     */
557661847f8eSopenharmony_ci    /**
557761847f8eSopenharmony_ci     * Support notify property of the characteristic.
557861847f8eSopenharmony_ci     *
557961847f8eSopenharmony_ci     * @type { ?boolean }
558061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
558161847f8eSopenharmony_ci     * @crossplatform
558261847f8eSopenharmony_ci     * @atomicservice
558361847f8eSopenharmony_ci     * @since 13
558461847f8eSopenharmony_ci     */
558561847f8eSopenharmony_ci    notify?: boolean;
558661847f8eSopenharmony_ci    /**
558761847f8eSopenharmony_ci     * Support indicate property of the characteristic.
558861847f8eSopenharmony_ci     *
558961847f8eSopenharmony_ci     * @type { ?boolean }
559061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
559161847f8eSopenharmony_ci     * @since 10
559261847f8eSopenharmony_ci     */
559361847f8eSopenharmony_ci    /**
559461847f8eSopenharmony_ci     * Support indicate property of the characteristic.
559561847f8eSopenharmony_ci     *
559661847f8eSopenharmony_ci     * @type { ?boolean }
559761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
559861847f8eSopenharmony_ci     * @atomicservice
559961847f8eSopenharmony_ci     * @since 12
560061847f8eSopenharmony_ci     */
560161847f8eSopenharmony_ci    indicate?: boolean;
560261847f8eSopenharmony_ci  }
560361847f8eSopenharmony_ci
560461847f8eSopenharmony_ci  /**
560561847f8eSopenharmony_ci   * The enum of gatt characteristic write type
560661847f8eSopenharmony_ci   *
560761847f8eSopenharmony_ci   * @enum { number }
560861847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
560961847f8eSopenharmony_ci   * @since 10
561061847f8eSopenharmony_ci   */
561161847f8eSopenharmony_ci  /**
561261847f8eSopenharmony_ci   * The enum of gatt characteristic write type
561361847f8eSopenharmony_ci   *
561461847f8eSopenharmony_ci   * @enum { number }
561561847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
561661847f8eSopenharmony_ci   * @atomicservice
561761847f8eSopenharmony_ci   * @since 12
561861847f8eSopenharmony_ci   */
561961847f8eSopenharmony_ci  /**
562061847f8eSopenharmony_ci   * The enum of gatt characteristic write type
562161847f8eSopenharmony_ci   *
562261847f8eSopenharmony_ci   * @enum { number }
562361847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
562461847f8eSopenharmony_ci   * @crossplatform
562561847f8eSopenharmony_ci   * @atomicservice
562661847f8eSopenharmony_ci   * @since 13
562761847f8eSopenharmony_ci   */
562861847f8eSopenharmony_ci  enum GattWriteType {
562961847f8eSopenharmony_ci    /**
563061847f8eSopenharmony_ci     * Write characteristic with response.
563161847f8eSopenharmony_ci     *
563261847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
563361847f8eSopenharmony_ci     * @since 10
563461847f8eSopenharmony_ci     */
563561847f8eSopenharmony_ci    /**
563661847f8eSopenharmony_ci     * Write characteristic with response.
563761847f8eSopenharmony_ci     *
563861847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
563961847f8eSopenharmony_ci     * @atomicservice
564061847f8eSopenharmony_ci     * @since 12
564161847f8eSopenharmony_ci     */
564261847f8eSopenharmony_ci    /**
564361847f8eSopenharmony_ci     * Write characteristic with response.
564461847f8eSopenharmony_ci     *
564561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
564661847f8eSopenharmony_ci     * @crossplatform
564761847f8eSopenharmony_ci     * @atomicservice
564861847f8eSopenharmony_ci     * @since 13
564961847f8eSopenharmony_ci     */
565061847f8eSopenharmony_ci    WRITE = 1,
565161847f8eSopenharmony_ci    /**
565261847f8eSopenharmony_ci     * Write characteristic without response.
565361847f8eSopenharmony_ci     *
565461847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
565561847f8eSopenharmony_ci     * @since 10
565661847f8eSopenharmony_ci     */
565761847f8eSopenharmony_ci    /**
565861847f8eSopenharmony_ci     * Write characteristic without response.
565961847f8eSopenharmony_ci     *
566061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
566161847f8eSopenharmony_ci     * @atomicservice
566261847f8eSopenharmony_ci     * @since 12
566361847f8eSopenharmony_ci     */
566461847f8eSopenharmony_ci    /**
566561847f8eSopenharmony_ci     * Write characteristic without response.
566661847f8eSopenharmony_ci     *
566761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
566861847f8eSopenharmony_ci     * @crossplatform
566961847f8eSopenharmony_ci     * @atomicservice
567061847f8eSopenharmony_ci     * @since 13
567161847f8eSopenharmony_ci     */
567261847f8eSopenharmony_ci    WRITE_NO_RESPONSE = 2
567361847f8eSopenharmony_ci  }
567461847f8eSopenharmony_ci
567561847f8eSopenharmony_ci  /**
567661847f8eSopenharmony_ci   * The enum of scan duty.
567761847f8eSopenharmony_ci   *
567861847f8eSopenharmony_ci   * @enum { number }
567961847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
568061847f8eSopenharmony_ci   * @since 10
568161847f8eSopenharmony_ci   */
568261847f8eSopenharmony_ci  /**
568361847f8eSopenharmony_ci   * The enum of scan duty.
568461847f8eSopenharmony_ci   *
568561847f8eSopenharmony_ci   * @enum { number }
568661847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
568761847f8eSopenharmony_ci   * @atomicservice
568861847f8eSopenharmony_ci   * @since 12
568961847f8eSopenharmony_ci   */
569061847f8eSopenharmony_ci  /**
569161847f8eSopenharmony_ci   * The enum of scan duty.
569261847f8eSopenharmony_ci   *
569361847f8eSopenharmony_ci   * @enum { number }
569461847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
569561847f8eSopenharmony_ci   * @crossplatform
569661847f8eSopenharmony_ci   * @atomicservice
569761847f8eSopenharmony_ci   * @since 13
569861847f8eSopenharmony_ci   */
569961847f8eSopenharmony_ci  enum ScanDuty {
570061847f8eSopenharmony_ci    /**
570161847f8eSopenharmony_ci     * low power mode
570261847f8eSopenharmony_ci     *
570361847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
570461847f8eSopenharmony_ci     * @since 10
570561847f8eSopenharmony_ci     */
570661847f8eSopenharmony_ci    /**
570761847f8eSopenharmony_ci     * low power mode
570861847f8eSopenharmony_ci     *
570961847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
571061847f8eSopenharmony_ci     * @atomicservice
571161847f8eSopenharmony_ci     * @since 12
571261847f8eSopenharmony_ci     */
571361847f8eSopenharmony_ci    /**
571461847f8eSopenharmony_ci     * low power mode
571561847f8eSopenharmony_ci     *
571661847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
571761847f8eSopenharmony_ci     * @crossplatform
571861847f8eSopenharmony_ci     * @atomicservice
571961847f8eSopenharmony_ci     * @since 13
572061847f8eSopenharmony_ci     */
572161847f8eSopenharmony_ci    SCAN_MODE_LOW_POWER = 0,
572261847f8eSopenharmony_ci    /**
572361847f8eSopenharmony_ci     * balanced power mode
572461847f8eSopenharmony_ci     *
572561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
572661847f8eSopenharmony_ci     * @since 10
572761847f8eSopenharmony_ci     */
572861847f8eSopenharmony_ci    /**
572961847f8eSopenharmony_ci     * balanced power mode
573061847f8eSopenharmony_ci     *
573161847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
573261847f8eSopenharmony_ci     * @atomicservice
573361847f8eSopenharmony_ci     * @since 12
573461847f8eSopenharmony_ci     */
573561847f8eSopenharmony_ci    /**
573661847f8eSopenharmony_ci     * balanced power mode
573761847f8eSopenharmony_ci     *
573861847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
573961847f8eSopenharmony_ci     * @crossplatform
574061847f8eSopenharmony_ci     * @atomicservice
574161847f8eSopenharmony_ci     * @since 13
574261847f8eSopenharmony_ci     */
574361847f8eSopenharmony_ci    SCAN_MODE_BALANCED = 1,
574461847f8eSopenharmony_ci    /**
574561847f8eSopenharmony_ci     * Scan using highest duty cycle
574661847f8eSopenharmony_ci     *
574761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
574861847f8eSopenharmony_ci     * @since 10
574961847f8eSopenharmony_ci     */
575061847f8eSopenharmony_ci    /**
575161847f8eSopenharmony_ci     * Scan using highest duty cycle
575261847f8eSopenharmony_ci     *
575361847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
575461847f8eSopenharmony_ci     * @atomicservice
575561847f8eSopenharmony_ci     * @since 12
575661847f8eSopenharmony_ci     */
575761847f8eSopenharmony_ci    /**
575861847f8eSopenharmony_ci     * Scan using highest duty cycle
575961847f8eSopenharmony_ci     *
576061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
576161847f8eSopenharmony_ci     * @crossplatform
576261847f8eSopenharmony_ci     * @atomicservice
576361847f8eSopenharmony_ci     * @since 13
576461847f8eSopenharmony_ci     */
576561847f8eSopenharmony_ci    SCAN_MODE_LOW_LATENCY = 2
576661847f8eSopenharmony_ci  }
576761847f8eSopenharmony_ci
576861847f8eSopenharmony_ci  /**
576961847f8eSopenharmony_ci   * The enum of BLE match mode.
577061847f8eSopenharmony_ci   *
577161847f8eSopenharmony_ci   * @enum { number }
577261847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
577361847f8eSopenharmony_ci   * @since 10
577461847f8eSopenharmony_ci   */
577561847f8eSopenharmony_ci  /**
577661847f8eSopenharmony_ci   * The enum of BLE match mode.
577761847f8eSopenharmony_ci   *
577861847f8eSopenharmony_ci   * @enum { number }
577961847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
578061847f8eSopenharmony_ci   * @atomicservice
578161847f8eSopenharmony_ci   * @since 12
578261847f8eSopenharmony_ci   */
578361847f8eSopenharmony_ci  enum MatchMode {
578461847f8eSopenharmony_ci    /**
578561847f8eSopenharmony_ci     * aggressive mode
578661847f8eSopenharmony_ci     *
578761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
578861847f8eSopenharmony_ci     * @since 10
578961847f8eSopenharmony_ci     */
579061847f8eSopenharmony_ci    /**
579161847f8eSopenharmony_ci     * aggressive mode
579261847f8eSopenharmony_ci     *
579361847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
579461847f8eSopenharmony_ci     * @atomicservice
579561847f8eSopenharmony_ci     * @since 12
579661847f8eSopenharmony_ci     */
579761847f8eSopenharmony_ci    MATCH_MODE_AGGRESSIVE = 1,
579861847f8eSopenharmony_ci    /**
579961847f8eSopenharmony_ci     * sticky mode
580061847f8eSopenharmony_ci     *
580161847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
580261847f8eSopenharmony_ci     * @since 10
580361847f8eSopenharmony_ci     */
580461847f8eSopenharmony_ci    /**
580561847f8eSopenharmony_ci     * sticky mode
580661847f8eSopenharmony_ci     *
580761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
580861847f8eSopenharmony_ci     * @atomicservice
580961847f8eSopenharmony_ci     * @since 12
581061847f8eSopenharmony_ci     */
581161847f8eSopenharmony_ci    MATCH_MODE_STICKY = 2
581261847f8eSopenharmony_ci  }
581361847f8eSopenharmony_ci
581461847f8eSopenharmony_ci  /**
581561847f8eSopenharmony_ci   * The enum of BLE advertising state.
581661847f8eSopenharmony_ci   *
581761847f8eSopenharmony_ci   * @enum { number }
581861847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
581961847f8eSopenharmony_ci   * @since 11
582061847f8eSopenharmony_ci   */
582161847f8eSopenharmony_ci  /**
582261847f8eSopenharmony_ci   * The enum of BLE advertising state.
582361847f8eSopenharmony_ci   *
582461847f8eSopenharmony_ci   * @enum { number }
582561847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
582661847f8eSopenharmony_ci   * @crossplatform
582761847f8eSopenharmony_ci   * @since 13
582861847f8eSopenharmony_ci   */
582961847f8eSopenharmony_ci  enum AdvertisingState {
583061847f8eSopenharmony_ci    /**
583161847f8eSopenharmony_ci     * advertising started.
583261847f8eSopenharmony_ci     *
583361847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
583461847f8eSopenharmony_ci     * @since 11
583561847f8eSopenharmony_ci     */
583661847f8eSopenharmony_ci    /**
583761847f8eSopenharmony_ci     * advertising started.
583861847f8eSopenharmony_ci     *
583961847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
584061847f8eSopenharmony_ci     * @crossplatform
584161847f8eSopenharmony_ci     * @since 13
584261847f8eSopenharmony_ci     */
584361847f8eSopenharmony_ci    STARTED = 1,
584461847f8eSopenharmony_ci    /**
584561847f8eSopenharmony_ci     * advertising temporarily enabled.
584661847f8eSopenharmony_ci     *
584761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
584861847f8eSopenharmony_ci     * @since 11
584961847f8eSopenharmony_ci     */
585061847f8eSopenharmony_ci    ENABLED = 2,
585161847f8eSopenharmony_ci    /**
585261847f8eSopenharmony_ci     * advertising temporarily disabled.
585361847f8eSopenharmony_ci     *
585461847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
585561847f8eSopenharmony_ci     * @since 11
585661847f8eSopenharmony_ci     */
585761847f8eSopenharmony_ci    DISABLED = 3,
585861847f8eSopenharmony_ci    /**
585961847f8eSopenharmony_ci     * advertising stopped.
586061847f8eSopenharmony_ci     *
586161847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
586261847f8eSopenharmony_ci     * @since 11
586361847f8eSopenharmony_ci     */
586461847f8eSopenharmony_ci    /**
586561847f8eSopenharmony_ci     * advertising stopped.
586661847f8eSopenharmony_ci     *
586761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
586861847f8eSopenharmony_ci     * @crossplatform
586961847f8eSopenharmony_ci     * @since 13
587061847f8eSopenharmony_ci     */
587161847f8eSopenharmony_ci    STOPPED = 4
587261847f8eSopenharmony_ci  }
587361847f8eSopenharmony_ci
587461847f8eSopenharmony_ci  /**
587561847f8eSopenharmony_ci   * Phy type used during scan.
587661847f8eSopenharmony_ci   *
587761847f8eSopenharmony_ci   * @enum { number }
587861847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
587961847f8eSopenharmony_ci   * @atomicservice
588061847f8eSopenharmony_ci   * @since 12
588161847f8eSopenharmony_ci   */
588261847f8eSopenharmony_ci  /**
588361847f8eSopenharmony_ci   * Phy type used during scan.
588461847f8eSopenharmony_ci   *
588561847f8eSopenharmony_ci   * @enum { number }
588661847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
588761847f8eSopenharmony_ci   * @crossplatform
588861847f8eSopenharmony_ci   * @atomicservice
588961847f8eSopenharmony_ci   * @since 13
589061847f8eSopenharmony_ci   */
589161847f8eSopenharmony_ci  enum PhyType {
589261847f8eSopenharmony_ci    /**
589361847f8eSopenharmony_ci     * Use 1M phy for scanning.
589461847f8eSopenharmony_ci     *
589561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
589661847f8eSopenharmony_ci     * @atomicservice
589761847f8eSopenharmony_ci     * @since 12
589861847f8eSopenharmony_ci     */
589961847f8eSopenharmony_ci    /**
590061847f8eSopenharmony_ci     * Use 1M phy for scanning.
590161847f8eSopenharmony_ci     *
590261847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
590361847f8eSopenharmony_ci     * @crossplatform
590461847f8eSopenharmony_ci     * @atomicservice
590561847f8eSopenharmony_ci     * @since 13
590661847f8eSopenharmony_ci     */
590761847f8eSopenharmony_ci    PHY_LE_1M = 1,
590861847f8eSopenharmony_ci    /**
590961847f8eSopenharmony_ci     * Use all supported Phys for scanning.
591061847f8eSopenharmony_ci     *
591161847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
591261847f8eSopenharmony_ci     * @atomicservice
591361847f8eSopenharmony_ci     * @since 12
591461847f8eSopenharmony_ci     */
591561847f8eSopenharmony_ci    /**
591661847f8eSopenharmony_ci     * Use all supported Phys for scanning.
591761847f8eSopenharmony_ci     *
591861847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
591961847f8eSopenharmony_ci     * @crossplatform
592061847f8eSopenharmony_ci     * @atomicservice
592161847f8eSopenharmony_ci     * @since 13
592261847f8eSopenharmony_ci     */
592361847f8eSopenharmony_ci    PHY_LE_ALL_SUPPORTED = 255
592461847f8eSopenharmony_ci  }
592561847f8eSopenharmony_ci}
592661847f8eSopenharmony_ci
592761847f8eSopenharmony_ciexport default ble;