161847f8eSopenharmony_ci/*
261847f8eSopenharmony_ci * Copyright (C) 2021-2022 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_ci
2361847f8eSopenharmony_ci/**
2461847f8eSopenharmony_ci * Provides methods to operate or manage Bluetooth.
2561847f8eSopenharmony_ci *
2661847f8eSopenharmony_ci * @namespace bluetooth
2761847f8eSopenharmony_ci * @syscap SystemCapability.Communication.Bluetooth.Core
2861847f8eSopenharmony_ci * @since 7
2961847f8eSopenharmony_ci * @deprecated since 9
3061847f8eSopenharmony_ci * @useinstead ohos.bluetoothManager
3161847f8eSopenharmony_ci */
3261847f8eSopenharmony_cideclare namespace bluetooth {
3361847f8eSopenharmony_ci  /**
3461847f8eSopenharmony_ci   * Obtains the Bluetooth status of a device.
3561847f8eSopenharmony_ci   *
3661847f8eSopenharmony_ci   * @permission ohos.permission.USE_BLUETOOTH
3761847f8eSopenharmony_ci   * @returns { BluetoothState } Returns the Bluetooth status, which can be {@link BluetoothState#STATE_OFF},
3861847f8eSopenharmony_ci   * {@link BluetoothState#STATE_TURNING_ON}, {@link BluetoothState#STATE_ON}, {@link BluetoothState#STATE_TURNING_OFF},
3961847f8eSopenharmony_ci   * {@link BluetoothState#STATE_BLE_TURNING_ON}, {@link BluetoothState#STATE_BLE_ON},
4061847f8eSopenharmony_ci   * or {@link BluetoothState#STATE_BLE_TURNING_OFF}.
4161847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
4261847f8eSopenharmony_ci   * @since 7
4361847f8eSopenharmony_ci   * @deprecated since 9
4461847f8eSopenharmony_ci   * @useinstead ohos.bluetoothManager/bluetoothManager.getState
4561847f8eSopenharmony_ci   */
4661847f8eSopenharmony_ci  function getState(): BluetoothState;
4761847f8eSopenharmony_ci
4861847f8eSopenharmony_ci  /**
4961847f8eSopenharmony_ci   * Get the local device connection state to any profile of any remote device.
5061847f8eSopenharmony_ci   *
5161847f8eSopenharmony_ci   * @permission ohos.permission.USE_BLUETOOTH
5261847f8eSopenharmony_ci   * @returns { ProfileConnectionState } One of {@link ProfileConnectionState#STATE_DISCONNECTED},
5361847f8eSopenharmony_ci   * {@link ProfileConnectionState#STATE_CONNECTING}, {@link ProfileConnectionState#STATE_CONNECTED},
5461847f8eSopenharmony_ci   * {@link ProfileConnectionState#STATE_DISCONNECTING}.
5561847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
5661847f8eSopenharmony_ci   * @since 7
5761847f8eSopenharmony_ci   * @deprecated since 9
5861847f8eSopenharmony_ci   * @useinstead ohos.bluetoothManager/bluetoothManager.getBtConnectionState
5961847f8eSopenharmony_ci   */
6061847f8eSopenharmony_ci  function getBtConnectionState(): ProfileConnectionState;
6161847f8eSopenharmony_ci
6261847f8eSopenharmony_ci  /**
6361847f8eSopenharmony_ci   * Starts pairing with a remote Bluetooth device.
6461847f8eSopenharmony_ci   *
6561847f8eSopenharmony_ci   * @permission ohos.permission.DISCOVER_BLUETOOTH
6661847f8eSopenharmony_ci   * @param { string } deviceId - The address of the remote device to pair.
6761847f8eSopenharmony_ci   * @returns { boolean } Returns {@code true} if the pairing process is started; returns {@code false} otherwise.
6861847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
6961847f8eSopenharmony_ci   * @since 7
7061847f8eSopenharmony_ci   * @deprecated since 9
7161847f8eSopenharmony_ci   * @useinstead ohos.bluetoothManager/bluetoothManager.pairDevice
7261847f8eSopenharmony_ci   */
7361847f8eSopenharmony_ci  function pairDevice(deviceId: string): boolean;
7461847f8eSopenharmony_ci
7561847f8eSopenharmony_ci  /**
7661847f8eSopenharmony_ci   * Remove a paired remote device.
7761847f8eSopenharmony_ci   *
7861847f8eSopenharmony_ci   * @permission ohos.permission.DISCOVER_BLUETOOTH
7961847f8eSopenharmony_ci   * @param { string } deviceId - The address of the remote device to be removed.
8061847f8eSopenharmony_ci   * @returns { boolean } Returns {@code true} if the cancel process is started; returns {@code false} otherwise.
8161847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
8261847f8eSopenharmony_ci   * @systemapi Hide this for inner system use
8361847f8eSopenharmony_ci   * @since 8
8461847f8eSopenharmony_ci   * @deprecated since 9
8561847f8eSopenharmony_ci   * @useinstead ohos.bluetoothManager/bluetoothManager.cancelPairedDevice
8661847f8eSopenharmony_ci   */
8761847f8eSopenharmony_ci  function cancelPairedDevice(deviceId: string): boolean;
8861847f8eSopenharmony_ci
8961847f8eSopenharmony_ci  /**
9061847f8eSopenharmony_ci   * Obtains the name of a peer Bluetooth device.
9161847f8eSopenharmony_ci   *
9261847f8eSopenharmony_ci   * @permission ohos.permission.USE_BLUETOOTH
9361847f8eSopenharmony_ci   * @param { string } deviceId - The address of the remote device.
9461847f8eSopenharmony_ci   * @returns { string } Returns the device name in character string format.
9561847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
9661847f8eSopenharmony_ci   * @since 8
9761847f8eSopenharmony_ci   * @deprecated since 9
9861847f8eSopenharmony_ci   * @useinstead ohos.bluetoothManager/bluetoothManager.getRemoteDeviceName
9961847f8eSopenharmony_ci   */
10061847f8eSopenharmony_ci  function getRemoteDeviceName(deviceId: string): string;
10161847f8eSopenharmony_ci
10261847f8eSopenharmony_ci  /**
10361847f8eSopenharmony_ci   * Obtains the class of a peer Bluetooth device.
10461847f8eSopenharmony_ci   *
10561847f8eSopenharmony_ci   * @permission ohos.permission.USE_BLUETOOTH
10661847f8eSopenharmony_ci   * @param { string } deviceId - The address of the remote device.
10761847f8eSopenharmony_ci   * @returns { DeviceClass } The class of the remote device, {@link DeviceClass}.
10861847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
10961847f8eSopenharmony_ci   * @since 8
11061847f8eSopenharmony_ci   * @deprecated since 9
11161847f8eSopenharmony_ci   * @useinstead ohos.bluetoothManager/bluetoothManager.getRemoteDeviceClass
11261847f8eSopenharmony_ci   */
11361847f8eSopenharmony_ci  function getRemoteDeviceClass(deviceId: string): DeviceClass;
11461847f8eSopenharmony_ci
11561847f8eSopenharmony_ci  /**
11661847f8eSopenharmony_ci   * Enables Bluetooth on a device.
11761847f8eSopenharmony_ci   *
11861847f8eSopenharmony_ci   * @permission ohos.permission.DISCOVER_BLUETOOTH
11961847f8eSopenharmony_ci   * @returns { boolean } Returns {@code true} if Bluetooth is being enabled; returns {@code false} if an error occurs.
12061847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
12161847f8eSopenharmony_ci   * @since 8
12261847f8eSopenharmony_ci   * @deprecated since 9
12361847f8eSopenharmony_ci   * @useinstead ohos.bluetoothManager/bluetoothManager.enableBluetooth
12461847f8eSopenharmony_ci   */
12561847f8eSopenharmony_ci  function enableBluetooth(): boolean;
12661847f8eSopenharmony_ci
12761847f8eSopenharmony_ci  /**
12861847f8eSopenharmony_ci   * Disables Bluetooth on a device.
12961847f8eSopenharmony_ci   *
13061847f8eSopenharmony_ci   * @permission ohos.permission.DISCOVER_BLUETOOTH
13161847f8eSopenharmony_ci   * @returns { boolean } Returns {@code true} if Bluetooth is being disabled; returns {@code false} if an error occurs.
13261847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
13361847f8eSopenharmony_ci   * @since 8
13461847f8eSopenharmony_ci   * @deprecated since 9
13561847f8eSopenharmony_ci   * @useinstead ohos.bluetoothManager/bluetoothManager.disableBluetooth
13661847f8eSopenharmony_ci   */
13761847f8eSopenharmony_ci  function disableBluetooth(): boolean;
13861847f8eSopenharmony_ci
13961847f8eSopenharmony_ci  /**
14061847f8eSopenharmony_ci   * Obtains the Bluetooth local name of a device.
14161847f8eSopenharmony_ci   *
14261847f8eSopenharmony_ci   * @permission ohos.permission.USE_BLUETOOTH
14361847f8eSopenharmony_ci   * @returns { string } Returns the name the device.
14461847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
14561847f8eSopenharmony_ci   * @since 8
14661847f8eSopenharmony_ci   * @deprecated since 9
14761847f8eSopenharmony_ci   * @useinstead ohos.bluetoothManager/bluetoothManager.getLocalName
14861847f8eSopenharmony_ci   */
14961847f8eSopenharmony_ci  function getLocalName(): string;
15061847f8eSopenharmony_ci
15161847f8eSopenharmony_ci  /**
15261847f8eSopenharmony_ci   * Obtains the list of Bluetooth devices that have been paired with the current device.
15361847f8eSopenharmony_ci   *
15461847f8eSopenharmony_ci   * @permission ohos.permission.USE_BLUETOOTH
15561847f8eSopenharmony_ci   * @returns { Array<string> } Returns a list of paired Bluetooth devices's address.
15661847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
15761847f8eSopenharmony_ci   * @since 8
15861847f8eSopenharmony_ci   * @deprecated since 9
15961847f8eSopenharmony_ci   * @useinstead ohos.bluetoothManager/bluetoothManager.getPairedDevices
16061847f8eSopenharmony_ci   */
16161847f8eSopenharmony_ci  function getPairedDevices(): Array<string>;
16261847f8eSopenharmony_ci
16361847f8eSopenharmony_ci  /**
16461847f8eSopenharmony_ci   * Obtains the connection state of profile.
16561847f8eSopenharmony_ci   *
16661847f8eSopenharmony_ci   * @permission ohos.permission.USE_BLUETOOTH
16761847f8eSopenharmony_ci   * @param { ProfileId } profileId - The profile id.
16861847f8eSopenharmony_ci   * @returns { ProfileConnectionState } Returns the connection state.
16961847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
17061847f8eSopenharmony_ci   * @since 8
17161847f8eSopenharmony_ci   * @deprecated since 9
17261847f8eSopenharmony_ci   * @useinstead ohos.bluetoothManager/bluetoothManager.getProfileConnectionState
17361847f8eSopenharmony_ci   */
17461847f8eSopenharmony_ci  function getProfileConnState(profileId: ProfileId): ProfileConnectionState;
17561847f8eSopenharmony_ci
17661847f8eSopenharmony_ci  /**
17761847f8eSopenharmony_ci   * Sets the confirmation of pairing with a certain device.
17861847f8eSopenharmony_ci   *
17961847f8eSopenharmony_ci   * @permission ohos.permission.MANAGE_BLUETOOTH
18061847f8eSopenharmony_ci   * @param { string } device - The address of the remote device.
18161847f8eSopenharmony_ci   * @param { boolean } accept - Indicates whether to accept the pairing request, {@code true} indicates accept or {@code false} otherwise.
18261847f8eSopenharmony_ci   * @returns { boolean } Returns {@code true} if the pairing confirmation is set; returns {@code false} otherwise.
18361847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
18461847f8eSopenharmony_ci   * @since 8
18561847f8eSopenharmony_ci   * @deprecated since 9
18661847f8eSopenharmony_ci   * @useinstead ohos.bluetoothManager/bluetoothManager.setDevicePairingConfirmation
18761847f8eSopenharmony_ci   */
18861847f8eSopenharmony_ci  function setDevicePairingConfirmation(device: string, accept: boolean): boolean;
18961847f8eSopenharmony_ci
19061847f8eSopenharmony_ci  /**
19161847f8eSopenharmony_ci   * Sets the Bluetooth friendly name of a device.
19261847f8eSopenharmony_ci   *
19361847f8eSopenharmony_ci   * @permission ohos.permission.DISCOVER_BLUETOOTH
19461847f8eSopenharmony_ci   * @param { string } name - Indicates a valid Bluetooth name.
19561847f8eSopenharmony_ci   * @returns { boolean } Returns {@code true} if the Bluetooth name is set successfully; returns {@code false} otherwise.
19661847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
19761847f8eSopenharmony_ci   * @since 8
19861847f8eSopenharmony_ci   * @deprecated since 9
19961847f8eSopenharmony_ci   * @useinstead ohos.bluetoothManager/bluetoothManager.setLocalName
20061847f8eSopenharmony_ci   */
20161847f8eSopenharmony_ci  function setLocalName(name: string): boolean;
20261847f8eSopenharmony_ci
20361847f8eSopenharmony_ci  /**
20461847f8eSopenharmony_ci   * Sets the Bluetooth scan mode for a device.
20561847f8eSopenharmony_ci   *
20661847f8eSopenharmony_ci   * @permission ohos.permission.USE_BLUETOOTH
20761847f8eSopenharmony_ci   * @param { ScanMode } mode - Indicates the Bluetooth scan mode to set, {@link ScanMode}.
20861847f8eSopenharmony_ci   * @param { number } duration - Indicates the duration in seconds, in which the host is discoverable.
20961847f8eSopenharmony_ci   * @returns { boolean } Returns {@code true} if the Bluetooth scan mode is set; returns {@code false} otherwise.
21061847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
21161847f8eSopenharmony_ci   * @since 8
21261847f8eSopenharmony_ci   * @deprecated since 9
21361847f8eSopenharmony_ci   * @useinstead ohos.bluetoothManager/bluetoothManager.setBluetoothScanMode
21461847f8eSopenharmony_ci   */
21561847f8eSopenharmony_ci  function setBluetoothScanMode(mode: ScanMode, duration: number): boolean;
21661847f8eSopenharmony_ci
21761847f8eSopenharmony_ci  /**
21861847f8eSopenharmony_ci   * Obtains the Bluetooth scanning mode of a device.
21961847f8eSopenharmony_ci   *
22061847f8eSopenharmony_ci   * @permission ohos.permission.USE_BLUETOOTH
22161847f8eSopenharmony_ci   * @returns { ScanMode } Returns the Bluetooth scanning mode, {@link ScanMode}.
22261847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
22361847f8eSopenharmony_ci   * @since 8
22461847f8eSopenharmony_ci   * @deprecated since 9
22561847f8eSopenharmony_ci   * @useinstead ohos.bluetoothManager/bluetoothManager.getBluetoothScanMode
22661847f8eSopenharmony_ci   */
22761847f8eSopenharmony_ci  function getBluetoothScanMode(): ScanMode;
22861847f8eSopenharmony_ci
22961847f8eSopenharmony_ci  /**
23061847f8eSopenharmony_ci   * Starts scanning Bluetooth devices.
23161847f8eSopenharmony_ci   *
23261847f8eSopenharmony_ci   * @permission ohos.permission.DISCOVER_BLUETOOTH and ohos.permission.LOCATION
23361847f8eSopenharmony_ci   * @returns { boolean } Returns {@code true} if the scan is started successfully; returns {@code false} otherwise.
23461847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
23561847f8eSopenharmony_ci   * @since 8
23661847f8eSopenharmony_ci   * @deprecated since 9
23761847f8eSopenharmony_ci   * @useinstead ohos.bluetoothManager/bluetoothManager.startBluetoothDiscovery
23861847f8eSopenharmony_ci   */
23961847f8eSopenharmony_ci  function startBluetoothDiscovery(): boolean;
24061847f8eSopenharmony_ci
24161847f8eSopenharmony_ci  /**
24261847f8eSopenharmony_ci   * Stops Bluetooth device scanning.
24361847f8eSopenharmony_ci   *
24461847f8eSopenharmony_ci   * @permission ohos.permission.DISCOVER_BLUETOOTH
24561847f8eSopenharmony_ci   * @returns { boolean } Returns {@code true} if scanning is stopped successfully; returns {@code false} otherwise.
24661847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
24761847f8eSopenharmony_ci   * @since 8
24861847f8eSopenharmony_ci   * @deprecated since 9
24961847f8eSopenharmony_ci   * @useinstead ohos.bluetoothManager/bluetoothManager.stopBluetoothDiscovery
25061847f8eSopenharmony_ci   */
25161847f8eSopenharmony_ci  function stopBluetoothDiscovery(): boolean;
25261847f8eSopenharmony_ci
25361847f8eSopenharmony_ci  /**
25461847f8eSopenharmony_ci   * Subscribe the event reported when a remote Bluetooth device is discovered.
25561847f8eSopenharmony_ci   *
25661847f8eSopenharmony_ci   * @permission ohos.permission.USE_BLUETOOTH
25761847f8eSopenharmony_ci   * @param { 'bluetoothDeviceFind' } type - Type of the discovering event to listen for.
25861847f8eSopenharmony_ci   * @param { Callback<Array<string>> } callback - Callback used to listen for the discovering event.
25961847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
26061847f8eSopenharmony_ci   * @since 8
26161847f8eSopenharmony_ci   * @deprecated since 9
26261847f8eSopenharmony_ci   * @useinstead ohos.bluetoothManager/bluetoothManager.on#event:bluetoothDeviceFind
26361847f8eSopenharmony_ci   */
26461847f8eSopenharmony_ci  function on(type: 'bluetoothDeviceFind', callback: Callback<Array<string>>): void;
26561847f8eSopenharmony_ci
26661847f8eSopenharmony_ci  /**
26761847f8eSopenharmony_ci   * Unsubscribe the event reported when a remote Bluetooth device is discovered.
26861847f8eSopenharmony_ci   *
26961847f8eSopenharmony_ci   * @permission ohos.permission.USE_BLUETOOTH
27061847f8eSopenharmony_ci   * @param { 'bluetoothDeviceFind' } type - Type of the discovering event to listen for.
27161847f8eSopenharmony_ci   * @param { Callback<Array<string>> } callback - Callback used to listen for the discovering event.
27261847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
27361847f8eSopenharmony_ci   * @since 8
27461847f8eSopenharmony_ci   * @deprecated since 9
27561847f8eSopenharmony_ci   * @useinstead ohos.bluetoothManager/bluetoothManager.off#event:bluetoothDeviceFind
27661847f8eSopenharmony_ci   */
27761847f8eSopenharmony_ci  function off(type: 'bluetoothDeviceFind', callback?: Callback<Array<string>>): void;
27861847f8eSopenharmony_ci
27961847f8eSopenharmony_ci  /**
28061847f8eSopenharmony_ci   * Subscribe the event reported when a remote Bluetooth device is bonded.
28161847f8eSopenharmony_ci   *
28261847f8eSopenharmony_ci   * @permission ohos.permission.USE_BLUETOOTH
28361847f8eSopenharmony_ci   * @param { 'bondStateChange' } type - Type of the bond state event to listen for.
28461847f8eSopenharmony_ci   * @param { Callback<BondStateParam> } callback - Callback used to listen for the bond state event, {@link BondStateParam}.
28561847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
28661847f8eSopenharmony_ci   * @since 8
28761847f8eSopenharmony_ci   * @deprecated since 9
28861847f8eSopenharmony_ci   * @useinstead ohos.bluetoothManager/bluetoothManager.on#event:bondStateChange
28961847f8eSopenharmony_ci   */
29061847f8eSopenharmony_ci  function on(type: 'bondStateChange', callback: Callback<BondStateParam>): void;
29161847f8eSopenharmony_ci
29261847f8eSopenharmony_ci  /**
29361847f8eSopenharmony_ci   * Unsubscribe the event reported when a remote Bluetooth device is bonded.
29461847f8eSopenharmony_ci   *
29561847f8eSopenharmony_ci   * @permission ohos.permission.USE_BLUETOOTH
29661847f8eSopenharmony_ci   * @param { 'bondStateChange' } type - Type of the bond state event to listen for.
29761847f8eSopenharmony_ci   * @param { Callback<BondStateParam> } callback - Callback used to listen for the bond state event.
29861847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
29961847f8eSopenharmony_ci   * @since 8
30061847f8eSopenharmony_ci   * @deprecated since 9
30161847f8eSopenharmony_ci   * @useinstead ohos.bluetoothManager/bluetoothManager.off#event:bondStateChange
30261847f8eSopenharmony_ci   */
30361847f8eSopenharmony_ci  function off(type: 'bondStateChange', callback?: Callback<BondStateParam>): void;
30461847f8eSopenharmony_ci
30561847f8eSopenharmony_ci  /**
30661847f8eSopenharmony_ci   * Subscribe the event of a pairing request from a remote Bluetooth device.
30761847f8eSopenharmony_ci   *
30861847f8eSopenharmony_ci   * @permission ohos.permission.DISCOVER_BLUETOOTH
30961847f8eSopenharmony_ci   * @param { 'pinRequired' } type - Type of the pairing request event to listen for.
31061847f8eSopenharmony_ci   * @param { Callback<PinRequiredParam> } callback - Callback used to listen for the pairing request event.
31161847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
31261847f8eSopenharmony_ci   * @since 8
31361847f8eSopenharmony_ci   * @deprecated since 9
31461847f8eSopenharmony_ci   * @useinstead ohos.bluetoothManager/bluetoothManager.on#event:pinRequired
31561847f8eSopenharmony_ci   */
31661847f8eSopenharmony_ci  function on(type: 'pinRequired', callback: Callback<PinRequiredParam>): void;
31761847f8eSopenharmony_ci
31861847f8eSopenharmony_ci  /**
31961847f8eSopenharmony_ci   * Unsubscribe the event of a pairing request from a remote Bluetooth device.
32061847f8eSopenharmony_ci   *
32161847f8eSopenharmony_ci   * @permission ohos.permission.DISCOVER_BLUETOOTH
32261847f8eSopenharmony_ci   * @param { 'pinRequired' } type - Type of the pairing request event to listen for.
32361847f8eSopenharmony_ci   * @param { Callback<PinRequiredParam> } callback - Callback used to listen for the pairing request event.
32461847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
32561847f8eSopenharmony_ci   * @since 8
32661847f8eSopenharmony_ci   * @deprecated since 9
32761847f8eSopenharmony_ci   * @useinstead ohos.bluetoothManager/bluetoothManager.off#event:pinRequired
32861847f8eSopenharmony_ci   */
32961847f8eSopenharmony_ci  function off(type: 'pinRequired', callback?: Callback<PinRequiredParam>): void;
33061847f8eSopenharmony_ci
33161847f8eSopenharmony_ci  /**
33261847f8eSopenharmony_ci   * Subscribe the event reported when the Bluetooth state changes.
33361847f8eSopenharmony_ci   *
33461847f8eSopenharmony_ci   * @permission ohos.permission.USE_BLUETOOTH
33561847f8eSopenharmony_ci   * @param { 'stateChange' } type - Type of the Bluetooth state changes event to listen for.
33661847f8eSopenharmony_ci   * @param { Callback<BluetoothState> } callback - Callback used to listen for the Bluetooth state event.
33761847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
33861847f8eSopenharmony_ci   * @since 8
33961847f8eSopenharmony_ci   * @deprecated since 9
34061847f8eSopenharmony_ci   * @useinstead ohos.bluetoothManager/bluetoothManager.on#event:stateChange
34161847f8eSopenharmony_ci   */
34261847f8eSopenharmony_ci  function on(type: 'stateChange', callback: Callback<BluetoothState>): void;
34361847f8eSopenharmony_ci
34461847f8eSopenharmony_ci  /**
34561847f8eSopenharmony_ci   * Unsubscribe the event reported when the Bluetooth state changes.
34661847f8eSopenharmony_ci   *
34761847f8eSopenharmony_ci   * @permission ohos.permission.USE_BLUETOOTH
34861847f8eSopenharmony_ci   * @param { 'stateChange' } type - Type of the Bluetooth state changes event to listen for.
34961847f8eSopenharmony_ci   * @param { Callback<BluetoothState> } callback - Callback used to listen for the Bluetooth state event.
35061847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
35161847f8eSopenharmony_ci   * @since 8
35261847f8eSopenharmony_ci   * @deprecated since 9
35361847f8eSopenharmony_ci   * @useinstead ohos.bluetoothManager/bluetoothManager.off#event:stateChange
35461847f8eSopenharmony_ci   */
35561847f8eSopenharmony_ci  function off(type: 'stateChange', callback?: Callback<BluetoothState>): void;
35661847f8eSopenharmony_ci
35761847f8eSopenharmony_ci  /**
35861847f8eSopenharmony_ci   * Creates a Bluetooth server listening socket.
35961847f8eSopenharmony_ci   *
36061847f8eSopenharmony_ci   * @permission ohos.permission.USE_BLUETOOTH
36161847f8eSopenharmony_ci   * @param { string } name - Indicates the service name.
36261847f8eSopenharmony_ci   * @param { SppOption } option - Indicates the listen parameters {@link SppOption}.
36361847f8eSopenharmony_ci   * @param { AsyncCallback<number> } callback - Callback used to return a server socket ID.
36461847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
36561847f8eSopenharmony_ci   * @since 8
36661847f8eSopenharmony_ci   * @deprecated since 9
36761847f8eSopenharmony_ci   * @useinstead ohos.bluetoothManager/bluetoothManager.sppListen
36861847f8eSopenharmony_ci   */
36961847f8eSopenharmony_ci  function sppListen(name: string, option: SppOption, callback: AsyncCallback<number>): void;
37061847f8eSopenharmony_ci
37161847f8eSopenharmony_ci  /**
37261847f8eSopenharmony_ci   * Waits for a remote device to connect.
37361847f8eSopenharmony_ci   *
37461847f8eSopenharmony_ci   * @param { number } serverSocket - Indicates the server socket ID, returned by {@link sppListen}.
37561847f8eSopenharmony_ci   * @param { AsyncCallback<number> } callback - Callback used to return a client socket ID.
37661847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
37761847f8eSopenharmony_ci   * @since 8
37861847f8eSopenharmony_ci   * @deprecated since 9
37961847f8eSopenharmony_ci   * @useinstead ohos.bluetoothManager/bluetoothManager.sppAccept
38061847f8eSopenharmony_ci   */
38161847f8eSopenharmony_ci  function sppAccept(serverSocket: number, callback: AsyncCallback<number>): void;
38261847f8eSopenharmony_ci
38361847f8eSopenharmony_ci  /**
38461847f8eSopenharmony_ci   * Connects to a remote device over the socket.
38561847f8eSopenharmony_ci   *
38661847f8eSopenharmony_ci   * @permission ohos.permission.USE_BLUETOOTH
38761847f8eSopenharmony_ci   * @param { string } device - The address of the remote device to connect.
38861847f8eSopenharmony_ci   * @param { SppOption } option - Indicates the connect parameters {@link SppOption}.
38961847f8eSopenharmony_ci   * @param { AsyncCallback<number> } callback - Callback used to return a client socket ID.
39061847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
39161847f8eSopenharmony_ci   * @since 8
39261847f8eSopenharmony_ci   * @deprecated since 9
39361847f8eSopenharmony_ci   * @useinstead ohos.bluetoothManager/bluetoothManager.sppConnect
39461847f8eSopenharmony_ci   */
39561847f8eSopenharmony_ci  function sppConnect(device: string, option: SppOption, callback: AsyncCallback<number>): void;
39661847f8eSopenharmony_ci
39761847f8eSopenharmony_ci  /**
39861847f8eSopenharmony_ci   * Disables an spp server socket and releases related resources.
39961847f8eSopenharmony_ci   *
40061847f8eSopenharmony_ci   * @param { number } socket - Indicates the server socket ID, returned by {@link sppListen}.
40161847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
40261847f8eSopenharmony_ci   * @since 8
40361847f8eSopenharmony_ci   * @deprecated since 9
40461847f8eSopenharmony_ci   * @useinstead ohos.bluetoothManager/bluetoothManager.sppCloseServerSocket
40561847f8eSopenharmony_ci   */
40661847f8eSopenharmony_ci  function sppCloseServerSocket(socket: number): void;
40761847f8eSopenharmony_ci
40861847f8eSopenharmony_ci  /**
40961847f8eSopenharmony_ci   * Disables an spp client socket and releases related resources.
41061847f8eSopenharmony_ci   *
41161847f8eSopenharmony_ci   * @param { number } socket - Indicates the client socket ID, returned by {@link sppAccept} or {@link sppConnect}.
41261847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
41361847f8eSopenharmony_ci   * @since 8
41461847f8eSopenharmony_ci   * @deprecated since 9
41561847f8eSopenharmony_ci   * @useinstead ohos.bluetoothManager/bluetoothManager.sppCloseClientSocket
41661847f8eSopenharmony_ci   */
41761847f8eSopenharmony_ci  function sppCloseClientSocket(socket: number): void;
41861847f8eSopenharmony_ci
41961847f8eSopenharmony_ci  /**
42061847f8eSopenharmony_ci   * Write data through the socket.
42161847f8eSopenharmony_ci   *
42261847f8eSopenharmony_ci   * @param { number } clientSocket - Indicates the client socket ID, returned by {@link sppAccept} or {@link sppConnect}.
42361847f8eSopenharmony_ci   * @param { ArrayBuffer } data - Indicates the data to write.
42461847f8eSopenharmony_ci   * @returns { boolean } Returns {@code true} if the data is write successfully; returns {@code false} otherwise.
42561847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
42661847f8eSopenharmony_ci   * @since 8
42761847f8eSopenharmony_ci   * @deprecated since 9
42861847f8eSopenharmony_ci   * @useinstead ohos.bluetoothManager/bluetoothManager.sppWrite
42961847f8eSopenharmony_ci   */
43061847f8eSopenharmony_ci  function sppWrite(clientSocket: number, data: ArrayBuffer): boolean;
43161847f8eSopenharmony_ci
43261847f8eSopenharmony_ci  /**
43361847f8eSopenharmony_ci   * Subscribe the event reported when data is read from the socket.
43461847f8eSopenharmony_ci   *
43561847f8eSopenharmony_ci   * @param { 'sppRead' } type - Type of the spp read event to listen for.
43661847f8eSopenharmony_ci   * @param { number } clientSocket - Client socket ID, which is obtained by sppAccept or sppConnect.
43761847f8eSopenharmony_ci   * @param { Callback<ArrayBuffer> } callback - Callback used to listen for the spp read event.
43861847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
43961847f8eSopenharmony_ci   * @since 8
44061847f8eSopenharmony_ci   * @deprecated since 9
44161847f8eSopenharmony_ci   * @useinstead ohos.bluetoothManager/bluetoothManager.on#event:sppRead
44261847f8eSopenharmony_ci   */
44361847f8eSopenharmony_ci  function on(type: 'sppRead', clientSocket: number, callback: Callback<ArrayBuffer>): void;
44461847f8eSopenharmony_ci
44561847f8eSopenharmony_ci  /**
44661847f8eSopenharmony_ci   * Unsubscribe the event reported when data is read from the socket.
44761847f8eSopenharmony_ci   *
44861847f8eSopenharmony_ci   * @param { 'sppRead' } type - Type of the spp read event to listen for.
44961847f8eSopenharmony_ci   * @param { number } clientSocket - Client socket ID, which is obtained by sppAccept or sppConnect.
45061847f8eSopenharmony_ci   * @param { Callback<ArrayBuffer> } callback - Callback used to listen for the spp read event.
45161847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
45261847f8eSopenharmony_ci   * @since 8
45361847f8eSopenharmony_ci   * @deprecated since 9
45461847f8eSopenharmony_ci   * @useinstead ohos.bluetoothManager/bluetoothManager.off#event:sppRead
45561847f8eSopenharmony_ci   */
45661847f8eSopenharmony_ci  function off(type: 'sppRead', clientSocket: number, callback?: Callback<ArrayBuffer>): void;
45761847f8eSopenharmony_ci
45861847f8eSopenharmony_ci  /**
45961847f8eSopenharmony_ci   * Obtains the instance of profile.
46061847f8eSopenharmony_ci   *
46161847f8eSopenharmony_ci   * @param { ProfileId } profileId - The profile id..
46261847f8eSopenharmony_ci   * @returns { A2dpSourceProfile | HandsFreeAudioGatewayProfile } Returns instance of profile.
46361847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
46461847f8eSopenharmony_ci   * @since 8
46561847f8eSopenharmony_ci   * @deprecated since 9
46661847f8eSopenharmony_ci   * @useinstead ohos.bluetoothManager/bluetoothManager.getProfileInstance
46761847f8eSopenharmony_ci   */
46861847f8eSopenharmony_ci  function getProfile(profileId: ProfileId): A2dpSourceProfile | HandsFreeAudioGatewayProfile;
46961847f8eSopenharmony_ci
47061847f8eSopenharmony_ci  /**
47161847f8eSopenharmony_ci   * Base interface of profile.
47261847f8eSopenharmony_ci   *
47361847f8eSopenharmony_ci   * @typedef BaseProfile
47461847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
47561847f8eSopenharmony_ci   * @since 7
47661847f8eSopenharmony_ci   * @deprecated since 9
47761847f8eSopenharmony_ci   * @useinstead ohos.bluetoothManager/bluetoothManager.BaseProfile
47861847f8eSopenharmony_ci   */
47961847f8eSopenharmony_ci  interface BaseProfile {
48061847f8eSopenharmony_ci    /**
48161847f8eSopenharmony_ci     * Obtains the connected devices list of profile.
48261847f8eSopenharmony_ci     *
48361847f8eSopenharmony_ci     * @permission ohos.permission.USE_BLUETOOTH
48461847f8eSopenharmony_ci     * @returns { Array<string> } Returns the address of connected devices list.
48561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
48661847f8eSopenharmony_ci     * @since 8
48761847f8eSopenharmony_ci     * @deprecated since 9
48861847f8eSopenharmony_ci     * @useinstead ohos.bluetoothManager/bluetoothManager.BaseProfile#getConnectionDevices
48961847f8eSopenharmony_ci     */
49061847f8eSopenharmony_ci    getConnectionDevices(): Array<string>;
49161847f8eSopenharmony_ci
49261847f8eSopenharmony_ci    /**
49361847f8eSopenharmony_ci     * Obtains the profile state of device.
49461847f8eSopenharmony_ci     *
49561847f8eSopenharmony_ci     * @permission ohos.permission.USE_BLUETOOTH
49661847f8eSopenharmony_ci     * @param { string } device - The address of bluetooth device.
49761847f8eSopenharmony_ci     * @returns { ProfileConnectionState } Returns {@link ProfileConnectionState} of device.
49861847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
49961847f8eSopenharmony_ci     * @since 8
50061847f8eSopenharmony_ci     * @deprecated since 9
50161847f8eSopenharmony_ci     * @useinstead ohos.bluetoothManager/bluetoothManager.BaseProfile#getDeviceState
50261847f8eSopenharmony_ci     */
50361847f8eSopenharmony_ci    getDeviceState(device: string): ProfileConnectionState;
50461847f8eSopenharmony_ci  }
50561847f8eSopenharmony_ci
50661847f8eSopenharmony_ci  /**
50761847f8eSopenharmony_ci   * Manager a2dp source profile.
50861847f8eSopenharmony_ci   *
50961847f8eSopenharmony_ci   * @typedef A2dpSourceProfile
51061847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
51161847f8eSopenharmony_ci   * @since 7
51261847f8eSopenharmony_ci   * @deprecated since 9
51361847f8eSopenharmony_ci   * @useinstead ohos.bluetoothManager/bluetoothManager.A2dpSourceProfile
51461847f8eSopenharmony_ci   */
51561847f8eSopenharmony_ci  interface A2dpSourceProfile extends BaseProfile {
51661847f8eSopenharmony_ci    /**
51761847f8eSopenharmony_ci     * Connect to device with a2dp.
51861847f8eSopenharmony_ci     *
51961847f8eSopenharmony_ci     * @permission ohos.permission.DISCOVER_BLUETOOTH
52061847f8eSopenharmony_ci     * @param { string } device - The address of the remote device to connect.
52161847f8eSopenharmony_ci     * @returns { boolean } Returns {@code true} if the connect is in process; returns {@code false} otherwise.
52261847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
52361847f8eSopenharmony_ci     * @since 8
52461847f8eSopenharmony_ci     * @deprecated since 9
52561847f8eSopenharmony_ci     * @useinstead ohos.bluetoothManager/bluetoothManager.A2dpSourceProfile#connect
52661847f8eSopenharmony_ci     */
52761847f8eSopenharmony_ci    connect(device: string): boolean;
52861847f8eSopenharmony_ci
52961847f8eSopenharmony_ci    /**
53061847f8eSopenharmony_ci     * Disconnect to device with a2dp.
53161847f8eSopenharmony_ci     *
53261847f8eSopenharmony_ci     * @permission ohos.permission.DISCOVER_BLUETOOTH
53361847f8eSopenharmony_ci     * @param { string } device - The address of the remote device to disconnect.
53461847f8eSopenharmony_ci     * @returns { boolean } Returns {@code true} if the disconnect is in process; returns {@code false} otherwise.
53561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
53661847f8eSopenharmony_ci     * @since 8
53761847f8eSopenharmony_ci     * @deprecated since 9
53861847f8eSopenharmony_ci     * @useinstead ohos.bluetoothManager/bluetoothManager.A2dpSourceProfile#disconnect
53961847f8eSopenharmony_ci     */
54061847f8eSopenharmony_ci    disconnect(device: string): boolean;
54161847f8eSopenharmony_ci
54261847f8eSopenharmony_ci    /**
54361847f8eSopenharmony_ci     * Subscribe the event reported when the profile connection state changes .
54461847f8eSopenharmony_ci     *
54561847f8eSopenharmony_ci     * @param { 'connectionStateChange' } type - Type of the profile connection state changes event to listen for .
54661847f8eSopenharmony_ci     * @param { Callback<StateChangeParam> } callback - Callback used to listen for event.
54761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
54861847f8eSopenharmony_ci     * @since 8
54961847f8eSopenharmony_ci     * @deprecated since 9
55061847f8eSopenharmony_ci     * @useinstead ohos.bluetoothManager/bluetoothManager.A2dpSourceProfile.on#event:connectionStateChange
55161847f8eSopenharmony_ci     */
55261847f8eSopenharmony_ci    on(type: 'connectionStateChange', callback: Callback<StateChangeParam>): void;
55361847f8eSopenharmony_ci
55461847f8eSopenharmony_ci    /**
55561847f8eSopenharmony_ci     * Unsubscribe the event reported when the profile connection state changes .
55661847f8eSopenharmony_ci     *
55761847f8eSopenharmony_ci     * @param { 'connectionStateChange' } type - Type of the profile connection state changes event to listen for .
55861847f8eSopenharmony_ci     * @param { Callback<StateChangeParam> } callback - Callback used to listen for event.
55961847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
56061847f8eSopenharmony_ci     * @since 8
56161847f8eSopenharmony_ci     * @deprecated since 9
56261847f8eSopenharmony_ci     * @useinstead ohos.bluetoothManager/bluetoothManager.A2dpSourceProfile.off#event:connectionStateChange
56361847f8eSopenharmony_ci     */
56461847f8eSopenharmony_ci    off(type: 'connectionStateChange', callback?: Callback<StateChangeParam>): void;
56561847f8eSopenharmony_ci
56661847f8eSopenharmony_ci    /**
56761847f8eSopenharmony_ci     * Obtains the playing state of device.
56861847f8eSopenharmony_ci     *
56961847f8eSopenharmony_ci     * @param { string } device - The address of the remote device.
57061847f8eSopenharmony_ci     * @returns { PlayingState } Returns {@link PlayingState} of the remote device.
57161847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
57261847f8eSopenharmony_ci     * @since 8
57361847f8eSopenharmony_ci     * @deprecated since 9
57461847f8eSopenharmony_ci     * @useinstead ohos.bluetoothManager/bluetoothManager.A2dpSourceProfile#getPlayingState
57561847f8eSopenharmony_ci     */
57661847f8eSopenharmony_ci    getPlayingState(device: string): PlayingState;
57761847f8eSopenharmony_ci  }
57861847f8eSopenharmony_ci
57961847f8eSopenharmony_ci  /**
58061847f8eSopenharmony_ci   * Manager handsfree AG profile.
58161847f8eSopenharmony_ci   *
58261847f8eSopenharmony_ci   * @typedef HandsFreeAudioGatewayProfile
58361847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
58461847f8eSopenharmony_ci   * @since 7
58561847f8eSopenharmony_ci   * @deprecated since 9
58661847f8eSopenharmony_ci   * @useinstead ohos.bluetoothManager/bluetoothManager.HandsFreeAudioGatewayProfile
58761847f8eSopenharmony_ci   */
58861847f8eSopenharmony_ci  interface HandsFreeAudioGatewayProfile extends BaseProfile {
58961847f8eSopenharmony_ci    /**
59061847f8eSopenharmony_ci     * Connect to device with hfp.
59161847f8eSopenharmony_ci     *
59261847f8eSopenharmony_ci     * @permission ohos.permission.DISCOVER_BLUETOOTH
59361847f8eSopenharmony_ci     * @param { string } device - The address of the remote device to connect.
59461847f8eSopenharmony_ci     * @returns { boolean } Returns {@code true} if the connect is in process; returns {@code false} otherwise.
59561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
59661847f8eSopenharmony_ci     * @since 8
59761847f8eSopenharmony_ci     * @deprecated since 9
59861847f8eSopenharmony_ci     * @useinstead ohos.bluetoothManager/bluetoothManager.HandsFreeAudioGatewayProfile#connect
59961847f8eSopenharmony_ci     */
60061847f8eSopenharmony_ci    connect(device: string): boolean;
60161847f8eSopenharmony_ci
60261847f8eSopenharmony_ci    /**
60361847f8eSopenharmony_ci     * Disconnect to device with hfp.
60461847f8eSopenharmony_ci     *
60561847f8eSopenharmony_ci     * @permission ohos.permission.DISCOVER_BLUETOOTH
60661847f8eSopenharmony_ci     * @param { string } device - The address of the remote device to disconnect.
60761847f8eSopenharmony_ci     * @returns { boolean } Returns {@code true} if the disconnect is in process; returns {@code false} otherwise.
60861847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
60961847f8eSopenharmony_ci     * @since 8
61061847f8eSopenharmony_ci     * @deprecated since 9
61161847f8eSopenharmony_ci     * @useinstead ohos.bluetoothManager/bluetoothManager.HandsFreeAudioGatewayProfile#disconnect
61261847f8eSopenharmony_ci     */
61361847f8eSopenharmony_ci    disconnect(device: string): boolean;
61461847f8eSopenharmony_ci
61561847f8eSopenharmony_ci    /**
61661847f8eSopenharmony_ci     * Subscribe the event reported when the profile connection state changes .
61761847f8eSopenharmony_ci     *
61861847f8eSopenharmony_ci     * @param { 'connectionStateChange' } type - Type of the profile connection state changes event to listen for .
61961847f8eSopenharmony_ci     * @param { Callback<StateChangeParam> } callback - Callback used to listen for event.
62061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
62161847f8eSopenharmony_ci     * @since 8
62261847f8eSopenharmony_ci     * @deprecated since 9
62361847f8eSopenharmony_ci     * @useinstead ohos.bluetoothManager/bluetoothManager.HandsFreeAudioGatewayProfile.on#event:connectionStateChange
62461847f8eSopenharmony_ci     */
62561847f8eSopenharmony_ci    on(type: 'connectionStateChange', callback: Callback<StateChangeParam>): void;
62661847f8eSopenharmony_ci
62761847f8eSopenharmony_ci    /**
62861847f8eSopenharmony_ci     * Unsubscribe the event reported when the profile connection state changes .
62961847f8eSopenharmony_ci     *
63061847f8eSopenharmony_ci     * @param { 'connectionStateChange' } type - Type of the profile connection state changes event to listen for .
63161847f8eSopenharmony_ci     * @param { Callback<StateChangeParam> } callback - Callback used to listen for event.
63261847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
63361847f8eSopenharmony_ci     * @since 8
63461847f8eSopenharmony_ci     * @deprecated since 9
63561847f8eSopenharmony_ci     * @useinstead ohos.bluetoothManager/bluetoothManager.HandsFreeAudioGatewayProfile.off#event:connectionStateChange
63661847f8eSopenharmony_ci     */
63761847f8eSopenharmony_ci    off(type: 'connectionStateChange', callback?: Callback<StateChangeParam>): void;
63861847f8eSopenharmony_ci  }
63961847f8eSopenharmony_ci
64061847f8eSopenharmony_ci  /**
64161847f8eSopenharmony_ci   * Provides methods to operate or manage Bluetooth.
64261847f8eSopenharmony_ci   *
64361847f8eSopenharmony_ci   * @namespace BLE
64461847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
64561847f8eSopenharmony_ci   * @since 7
64661847f8eSopenharmony_ci   * @deprecated since 9
64761847f8eSopenharmony_ci   * @useinstead ohos.bluetoothManager/bluetoothManager.BLE
64861847f8eSopenharmony_ci   */
64961847f8eSopenharmony_ci  namespace BLE {
65061847f8eSopenharmony_ci    /**
65161847f8eSopenharmony_ci     * create a JavaScript Gatt server instance.
65261847f8eSopenharmony_ci     *
65361847f8eSopenharmony_ci     * @returns { GattServer } Returns a JavaScript Gatt server instance {@code GattServer}.
65461847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
65561847f8eSopenharmony_ci     * @since 7
65661847f8eSopenharmony_ci     * @deprecated since 9
65761847f8eSopenharmony_ci     * @useinstead ohos.bluetoothManager/bluetoothManager.BLE.createGattServer
65861847f8eSopenharmony_ci     */
65961847f8eSopenharmony_ci    function createGattServer(): GattServer;
66061847f8eSopenharmony_ci
66161847f8eSopenharmony_ci    /**
66261847f8eSopenharmony_ci     * create a JavaScript Gatt client device instance.
66361847f8eSopenharmony_ci     *
66461847f8eSopenharmony_ci     * @param { string } deviceId - The address of the remote device.
66561847f8eSopenharmony_ci     * @returns { GattClientDevice } Returns a JavaScript Gatt client device instance {@code GattClientDevice}.
66661847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
66761847f8eSopenharmony_ci     * @since 7
66861847f8eSopenharmony_ci     * @deprecated since 9
66961847f8eSopenharmony_ci     * @useinstead ohos.bluetoothManager/bluetoothManager.BLE.createGattClientDevice
67061847f8eSopenharmony_ci     */
67161847f8eSopenharmony_ci    function createGattClientDevice(deviceId: string): GattClientDevice;
67261847f8eSopenharmony_ci
67361847f8eSopenharmony_ci    /**
67461847f8eSopenharmony_ci     * Obtains the list of devices in the connected status.
67561847f8eSopenharmony_ci     *
67661847f8eSopenharmony_ci     * @permission ohos.permission.USE_BLUETOOTH
67761847f8eSopenharmony_ci     * @returns { Array<string> } Returns the list of device address.
67861847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
67961847f8eSopenharmony_ci     * @since 7
68061847f8eSopenharmony_ci     * @deprecated since 9
68161847f8eSopenharmony_ci     * @useinstead ohos.bluetoothManager/bluetoothManager.BLE.getConnectedBLEDevices
68261847f8eSopenharmony_ci     */
68361847f8eSopenharmony_ci    function getConnectedBLEDevices(): Array<string>;
68461847f8eSopenharmony_ci
68561847f8eSopenharmony_ci    /**
68661847f8eSopenharmony_ci     * Starts scanning for specified BLE devices with filters.
68761847f8eSopenharmony_ci     *
68861847f8eSopenharmony_ci     * @permission ohos.permission.DISCOVER_BLUETOOTH and ohos.permission.MANAGE_BLUETOOTH and ohos.permission.LOCATION
68961847f8eSopenharmony_ci     * @param { Array<ScanFilter> } filters - Indicates the list of filters used to filter out specified devices.
69061847f8eSopenharmony_ci     * If you do not want to use filter, set this parameter to {@code null}.
69161847f8eSopenharmony_ci     * @param { ScanOptions } options - Indicates the parameters for scanning and if the user does not assign a value, the default value will be used.
69261847f8eSopenharmony_ci     * {@link ScanOptions#interval} set to 0, {@link ScanOptions#dutyMode} set to {@link SCAN_MODE_LOW_POWER}
69361847f8eSopenharmony_ci     * and {@link ScanOptions#matchMode} set to {@link MATCH_MODE_AGGRESSIVE}.
69461847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
69561847f8eSopenharmony_ci     * @since 7
69661847f8eSopenharmony_ci     * @deprecated since 9
69761847f8eSopenharmony_ci     * @useinstead ohos.bluetoothManager/bluetoothManager.BLE.startBLEScan
69861847f8eSopenharmony_ci     */
69961847f8eSopenharmony_ci    function startBLEScan(filters: Array<ScanFilter>, options?: ScanOptions): void;
70061847f8eSopenharmony_ci
70161847f8eSopenharmony_ci    /**
70261847f8eSopenharmony_ci     * Stops BLE scanning.
70361847f8eSopenharmony_ci     *
70461847f8eSopenharmony_ci     * @permission ohos.permission.DISCOVER_BLUETOOTH
70561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
70661847f8eSopenharmony_ci     * @since 7
70761847f8eSopenharmony_ci     * @deprecated since 9
70861847f8eSopenharmony_ci     * @useinstead ohos.bluetoothManager/bluetoothManager.BLE.stopBLEScan
70961847f8eSopenharmony_ci     */
71061847f8eSopenharmony_ci    function stopBLEScan(): void;
71161847f8eSopenharmony_ci
71261847f8eSopenharmony_ci    /**
71361847f8eSopenharmony_ci     * Subscribe BLE scan result.
71461847f8eSopenharmony_ci     *
71561847f8eSopenharmony_ci     * @permission ohos.permission.USE_BLUETOOTH
71661847f8eSopenharmony_ci     * @param { 'BLEDeviceFind' } type - Type of the scan result event to listen for.
71761847f8eSopenharmony_ci     * @param { Callback<Array<ScanResult>> } callback - Callback used to listen for the scan result event.
71861847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
71961847f8eSopenharmony_ci     * @since 7
72061847f8eSopenharmony_ci     * @deprecated since 9
72161847f8eSopenharmony_ci     * @useinstead ohos.bluetoothManager/bluetoothManager.BLE.on#event:BLEDeviceFind
72261847f8eSopenharmony_ci     */
72361847f8eSopenharmony_ci    function on(type: 'BLEDeviceFind', callback: Callback<Array<ScanResult>>): void;
72461847f8eSopenharmony_ci
72561847f8eSopenharmony_ci    /**
72661847f8eSopenharmony_ci     * Unsubscribe BLE scan result.
72761847f8eSopenharmony_ci     *
72861847f8eSopenharmony_ci     * @permission ohos.permission.USE_BLUETOOTH
72961847f8eSopenharmony_ci     * @param { 'BLEDeviceFind' } type - Type of the scan result event to listen for.
73061847f8eSopenharmony_ci     * @param { Callback<Array<ScanResult>> } callback - Callback used to listen for the scan result event.
73161847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
73261847f8eSopenharmony_ci     * @since 7
73361847f8eSopenharmony_ci     * @deprecated since 9
73461847f8eSopenharmony_ci     * @useinstead ohos.bluetoothManager/bluetoothManager.BLE.off#event:BLEDeviceFind
73561847f8eSopenharmony_ci     */
73661847f8eSopenharmony_ci    function off(type: 'BLEDeviceFind', callback?: Callback<Array<ScanResult>>): void;
73761847f8eSopenharmony_ci  }
73861847f8eSopenharmony_ci
73961847f8eSopenharmony_ci  /**
74061847f8eSopenharmony_ci   * Manages GATT server. Before calling an Gatt server method, you must use {@link createGattServer} to create an GattServer instance.
74161847f8eSopenharmony_ci   *
74261847f8eSopenharmony_ci   * @typedef GattServer
74361847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
74461847f8eSopenharmony_ci   * @since 7
74561847f8eSopenharmony_ci   * @deprecated since 9
74661847f8eSopenharmony_ci   * @useinstead ohos.bluetoothManager/bluetoothManager.GattServer
74761847f8eSopenharmony_ci   */
74861847f8eSopenharmony_ci  interface GattServer {
74961847f8eSopenharmony_ci    /**
75061847f8eSopenharmony_ci     * Starts BLE advertising.
75161847f8eSopenharmony_ci     *
75261847f8eSopenharmony_ci     * @permission ohos.permission.DISCOVER_BLUETOOTH
75361847f8eSopenharmony_ci     * @param { AdvertiseSetting } setting - Indicates the settings for BLE advertising.
75461847f8eSopenharmony_ci     * If you need to use the default value, set this parameter to {@code null}.
75561847f8eSopenharmony_ci     * @param { AdvertiseData } advData - Indicates the advertising data.
75661847f8eSopenharmony_ci     * @param { AdvertiseData } advResponse - Indicates the scan response associated with the advertising data.
75761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
75861847f8eSopenharmony_ci     * @since 7
75961847f8eSopenharmony_ci     * @deprecated since 9
76061847f8eSopenharmony_ci     * @useinstead ohos.bluetoothManager/bluetoothManager.GattServer#startAdvertising
76161847f8eSopenharmony_ci     */
76261847f8eSopenharmony_ci    startAdvertising(setting: AdvertiseSetting, advData: AdvertiseData, advResponse?: AdvertiseData): void;
76361847f8eSopenharmony_ci
76461847f8eSopenharmony_ci    /**
76561847f8eSopenharmony_ci     * Stops BLE advertising.
76661847f8eSopenharmony_ci     *
76761847f8eSopenharmony_ci     * @permission ohos.permission.DISCOVER_BLUETOOTH
76861847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
76961847f8eSopenharmony_ci     * @since 7
77061847f8eSopenharmony_ci     * @deprecated since 9
77161847f8eSopenharmony_ci     * @useinstead ohos.bluetoothManager/bluetoothManager.GattServer#stopAdvertising
77261847f8eSopenharmony_ci     */
77361847f8eSopenharmony_ci    stopAdvertising(): void;
77461847f8eSopenharmony_ci
77561847f8eSopenharmony_ci    /**
77661847f8eSopenharmony_ci     * Adds a specified service to be hosted.
77761847f8eSopenharmony_ci     * <p>The added service and its characteristics are provided by the local device.
77861847f8eSopenharmony_ci     *
77961847f8eSopenharmony_ci     * @permission ohos.permission.USE_BLUETOOTH
78061847f8eSopenharmony_ci     * @param { GattService } service - Indicates the service to add.
78161847f8eSopenharmony_ci     * @returns { boolean } Returns {@code true} if the service is added; returns {@code false} otherwise.
78261847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
78361847f8eSopenharmony_ci     * @since 7
78461847f8eSopenharmony_ci     * @deprecated since 9
78561847f8eSopenharmony_ci     * @useinstead ohos.bluetoothManager/bluetoothManager.GattServer#addService
78661847f8eSopenharmony_ci     */
78761847f8eSopenharmony_ci    addService(service: GattService): boolean;
78861847f8eSopenharmony_ci
78961847f8eSopenharmony_ci    /**
79061847f8eSopenharmony_ci     * Removes a specified service from the list of GATT services provided by this device.
79161847f8eSopenharmony_ci     *
79261847f8eSopenharmony_ci     * @permission ohos.permission.USE_BLUETOOTH
79361847f8eSopenharmony_ci     * @param { string } serviceUuid - Indicates the UUID of the service to remove.
79461847f8eSopenharmony_ci     * @returns { boolean } Returns {@code true} if the service is removed; returns {@code false} otherwise.
79561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
79661847f8eSopenharmony_ci     * @since 7
79761847f8eSopenharmony_ci     * @deprecated since 9
79861847f8eSopenharmony_ci     * @useinstead ohos.bluetoothManager/bluetoothManager.GattServer#removeService
79961847f8eSopenharmony_ci     */
80061847f8eSopenharmony_ci    removeService(serviceUuid: string): boolean;
80161847f8eSopenharmony_ci
80261847f8eSopenharmony_ci    /**
80361847f8eSopenharmony_ci     * Closes this {@code GattServer} object and unregisters its callbacks.
80461847f8eSopenharmony_ci     *
80561847f8eSopenharmony_ci     * @permission ohos.permission.USE_BLUETOOTH
80661847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
80761847f8eSopenharmony_ci     * @since 7
80861847f8eSopenharmony_ci     * @deprecated since 9
80961847f8eSopenharmony_ci     * @useinstead ohos.bluetoothManager/bluetoothManager.GattServer#close
81061847f8eSopenharmony_ci     */
81161847f8eSopenharmony_ci    close(): void;
81261847f8eSopenharmony_ci
81361847f8eSopenharmony_ci    /**
81461847f8eSopenharmony_ci     * Sends a notification of a change in a specified local characteristic.
81561847f8eSopenharmony_ci     * <p>This method should be called for every BLE peripheral device that has requested notifications.
81661847f8eSopenharmony_ci     *
81761847f8eSopenharmony_ci     * @permission ohos.permission.USE_BLUETOOTH
81861847f8eSopenharmony_ci     * @param { string } deviceId - Indicates the address of the BLE peripheral device to receive the notification.
81961847f8eSopenharmony_ci     * @param { NotifyCharacteristic } notifyCharacteristic - Indicates the local characteristic that has changed.
82061847f8eSopenharmony_ci     * @returns { boolean } Returns {@code true} if the notification is sent successfully; returns {@code false} otherwise.
82161847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
82261847f8eSopenharmony_ci     * @since 7
82361847f8eSopenharmony_ci     * @deprecated since 9
82461847f8eSopenharmony_ci     * @useinstead ohos.bluetoothManager/bluetoothManager.GattServer#notifyCharacteristicChanged
82561847f8eSopenharmony_ci     */
82661847f8eSopenharmony_ci    notifyCharacteristicChanged(deviceId: string, notifyCharacteristic: NotifyCharacteristic): boolean;
82761847f8eSopenharmony_ci
82861847f8eSopenharmony_ci    /**
82961847f8eSopenharmony_ci     * Sends a response to a specified read or write request to a given BLE peripheral device.
83061847f8eSopenharmony_ci     *
83161847f8eSopenharmony_ci     * @permission ohos.permission.USE_BLUETOOTH
83261847f8eSopenharmony_ci     * @param { ServerResponse } serverResponse - Indicates the response parameters {@link ServerResponse}.
83361847f8eSopenharmony_ci     * @returns { boolean } Returns {@code true} if the response is sent successfully; returns {@code false} otherwise.
83461847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
83561847f8eSopenharmony_ci     * @since 7
83661847f8eSopenharmony_ci     * @deprecated since 9
83761847f8eSopenharmony_ci     * @useinstead ohos.bluetoothManager/bluetoothManager.GattServer#sendResponse
83861847f8eSopenharmony_ci     */
83961847f8eSopenharmony_ci    sendResponse(serverResponse: ServerResponse): boolean;
84061847f8eSopenharmony_ci
84161847f8eSopenharmony_ci    /**
84261847f8eSopenharmony_ci     * Subscribe characteristic read event.
84361847f8eSopenharmony_ci     *
84461847f8eSopenharmony_ci     * @permission ohos.permission.USE_BLUETOOTH
84561847f8eSopenharmony_ci     * @param { 'characteristicRead' } type - Type of the characteristic read event to listen for.
84661847f8eSopenharmony_ci     * @param { Callback<CharacteristicReadReq> } callback - Callback used to listen for the characteristic read event.
84761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
84861847f8eSopenharmony_ci     * @since 7
84961847f8eSopenharmony_ci     * @deprecated since 9
85061847f8eSopenharmony_ci     * @useinstead ohos.bluetoothManager/bluetoothManager.GattServer.on#event:characteristicRead
85161847f8eSopenharmony_ci     */
85261847f8eSopenharmony_ci    on(type: 'characteristicRead', callback: Callback<CharacteristicReadReq>): void;
85361847f8eSopenharmony_ci
85461847f8eSopenharmony_ci    /**
85561847f8eSopenharmony_ci     * Unsubscribe characteristic read event.
85661847f8eSopenharmony_ci     *
85761847f8eSopenharmony_ci     * @permission ohos.permission.USE_BLUETOOTH
85861847f8eSopenharmony_ci     * @param { 'characteristicRead' } type - Type of the characteristic read event to listen for.
85961847f8eSopenharmony_ci     * @param { Callback<CharacteristicReadReq> } callback - Callback used to listen for the characteristic read event.
86061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
86161847f8eSopenharmony_ci     * @since 7
86261847f8eSopenharmony_ci     * @deprecated since 9
86361847f8eSopenharmony_ci     * @useinstead ohos.bluetoothManager/bluetoothManager.GattServer.off#event:characteristicRead
86461847f8eSopenharmony_ci     */
86561847f8eSopenharmony_ci    off(type: 'characteristicRead', callback?: Callback<CharacteristicReadReq>): void;
86661847f8eSopenharmony_ci
86761847f8eSopenharmony_ci    /**
86861847f8eSopenharmony_ci     * Subscribe characteristic write event.
86961847f8eSopenharmony_ci     *
87061847f8eSopenharmony_ci     * @permission ohos.permission.USE_BLUETOOTH
87161847f8eSopenharmony_ci     * @param { 'characteristicWrite' } type - Type of the characteristic write event to listen for.
87261847f8eSopenharmony_ci     * @param { Callback<CharacteristicWriteReq> } callback - Callback used to listen for the characteristic write event.
87361847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
87461847f8eSopenharmony_ci     * @since 7
87561847f8eSopenharmony_ci     * @deprecated since 9
87661847f8eSopenharmony_ci     * @useinstead ohos.bluetoothManager/bluetoothManager.GattServer.on#event:characteristicWrite
87761847f8eSopenharmony_ci     */
87861847f8eSopenharmony_ci    on(type: 'characteristicWrite', callback: Callback<CharacteristicWriteReq>): void;
87961847f8eSopenharmony_ci
88061847f8eSopenharmony_ci    /**
88161847f8eSopenharmony_ci     * Unsubscribe characteristic write event.
88261847f8eSopenharmony_ci     *
88361847f8eSopenharmony_ci     * @permission ohos.permission.USE_BLUETOOTH
88461847f8eSopenharmony_ci     * @param { 'characteristicWrite' } type - Type of the characteristic write event to listen for.
88561847f8eSopenharmony_ci     * @param { Callback<CharacteristicWriteReq> } callback - Callback used to listen for the characteristic write event.
88661847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
88761847f8eSopenharmony_ci     * @since 7
88861847f8eSopenharmony_ci     * @deprecated since 9
88961847f8eSopenharmony_ci     * @useinstead ohos.bluetoothManager/bluetoothManager.GattServer.off#event:characteristicWrite
89061847f8eSopenharmony_ci     */
89161847f8eSopenharmony_ci    off(type: 'characteristicWrite', callback?: Callback<CharacteristicWriteReq>): void;
89261847f8eSopenharmony_ci
89361847f8eSopenharmony_ci    /**
89461847f8eSopenharmony_ci     * Subscribe descriptor read event.
89561847f8eSopenharmony_ci     *
89661847f8eSopenharmony_ci     * @permission ohos.permission.USE_BLUETOOTH
89761847f8eSopenharmony_ci     * @param { 'descriptorRead' } type - Type of the descriptor read event to listen for.
89861847f8eSopenharmony_ci     * @param { Callback<DescriptorReadReq> } callback - Callback used to listen for the descriptor read event.
89961847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
90061847f8eSopenharmony_ci     * @since 7
90161847f8eSopenharmony_ci     * @deprecated since 9
90261847f8eSopenharmony_ci     * @useinstead ohos.bluetoothManager/bluetoothManager.GattServer.on#event:descriptorRead
90361847f8eSopenharmony_ci     */
90461847f8eSopenharmony_ci    on(type: 'descriptorRead', callback: Callback<DescriptorReadReq>): void;
90561847f8eSopenharmony_ci
90661847f8eSopenharmony_ci    /**
90761847f8eSopenharmony_ci     * Unsubscribe descriptor read event.
90861847f8eSopenharmony_ci     *
90961847f8eSopenharmony_ci     * @permission ohos.permission.USE_BLUETOOTH
91061847f8eSopenharmony_ci     * @param { 'descriptorRead' } type - Type of the descriptor read event to listen for.
91161847f8eSopenharmony_ci     * @param { Callback<DescriptorReadReq> } callback - Callback used to listen for the descriptor read event.
91261847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
91361847f8eSopenharmony_ci     * @since 7
91461847f8eSopenharmony_ci     * @deprecated since 9
91561847f8eSopenharmony_ci     * @useinstead ohos.bluetoothManager/bluetoothManager.GattServer.off#event:descriptorRead
91661847f8eSopenharmony_ci     */
91761847f8eSopenharmony_ci    off(type: 'descriptorRead', callback?: Callback<DescriptorReadReq>): void;
91861847f8eSopenharmony_ci
91961847f8eSopenharmony_ci    /**
92061847f8eSopenharmony_ci     * Subscribe descriptor write event.
92161847f8eSopenharmony_ci     *
92261847f8eSopenharmony_ci     * @permission ohos.permission.USE_BLUETOOTH
92361847f8eSopenharmony_ci     * @param { 'descriptorWrite' } type - Type of the descriptor write event to listen for.
92461847f8eSopenharmony_ci     * @param { Callback<DescriptorWriteReq> } callback - Callback used to listen for the descriptor write event.
92561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
92661847f8eSopenharmony_ci     * @since 7
92761847f8eSopenharmony_ci     * @deprecated since 9
92861847f8eSopenharmony_ci     * @useinstead ohos.bluetoothManager/bluetoothManager.GattServer.on#event:descriptorWrite
92961847f8eSopenharmony_ci     */
93061847f8eSopenharmony_ci    on(type: 'descriptorWrite', callback: Callback<DescriptorWriteReq>): void;
93161847f8eSopenharmony_ci
93261847f8eSopenharmony_ci    /**
93361847f8eSopenharmony_ci     * Unsubscribe descriptor write event.
93461847f8eSopenharmony_ci     *
93561847f8eSopenharmony_ci     * @permission ohos.permission.USE_BLUETOOTH
93661847f8eSopenharmony_ci     * @param { 'descriptorWrite' } type - Type of the descriptor write event to listen for.
93761847f8eSopenharmony_ci     * @param { Callback<DescriptorWriteReq> } callback - Callback used to listen for the descriptor write event.
93861847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
93961847f8eSopenharmony_ci     * @since 7
94061847f8eSopenharmony_ci     * @deprecated since 9
94161847f8eSopenharmony_ci     * @useinstead ohos.bluetoothManager/bluetoothManager.GattServer.off#event:descriptorWrite
94261847f8eSopenharmony_ci     */
94361847f8eSopenharmony_ci    off(type: 'descriptorWrite', callback?: Callback<DescriptorWriteReq>): void;
94461847f8eSopenharmony_ci
94561847f8eSopenharmony_ci    /**
94661847f8eSopenharmony_ci     * Subscribe server connection state changed event.
94761847f8eSopenharmony_ci     *
94861847f8eSopenharmony_ci     * @permission ohos.permission.USE_BLUETOOTH
94961847f8eSopenharmony_ci     * @param { 'connectStateChange' } type - Type of the connection state changed event to listen for.
95061847f8eSopenharmony_ci     * @param { Callback<BLEConnectChangedState> } callback - Callback used to listen for the connection state changed event.
95161847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
95261847f8eSopenharmony_ci     * @since 7
95361847f8eSopenharmony_ci     * @deprecated since 9
95461847f8eSopenharmony_ci     * @useinstead ohos.bluetoothManager/bluetoothManager.GattServer.on#event:connectStateChange
95561847f8eSopenharmony_ci     */
95661847f8eSopenharmony_ci    on(type: 'connectStateChange', callback: Callback<BLEConnectChangedState>): void;
95761847f8eSopenharmony_ci
95861847f8eSopenharmony_ci    /**
95961847f8eSopenharmony_ci     * Unsubscribe server connection state changed event.
96061847f8eSopenharmony_ci     *
96161847f8eSopenharmony_ci     * @permission ohos.permission.USE_BLUETOOTH
96261847f8eSopenharmony_ci     * @param { 'connectStateChange' } type - Type of the connection state changed event to listen for.
96361847f8eSopenharmony_ci     * @param { Callback<BLEConnectChangedState> } callback - Callback used to listen for the connection state changed event.
96461847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
96561847f8eSopenharmony_ci     * @since 7
96661847f8eSopenharmony_ci     * @deprecated since 9
96761847f8eSopenharmony_ci     * @useinstead ohos.bluetoothManager/bluetoothManager.GattServer.off#event:connectStateChange
96861847f8eSopenharmony_ci     */
96961847f8eSopenharmony_ci    off(type: 'connectStateChange', callback?: Callback<BLEConnectChangedState>): void;
97061847f8eSopenharmony_ci  }
97161847f8eSopenharmony_ci
97261847f8eSopenharmony_ci  /**
97361847f8eSopenharmony_ci   * Manages GATT client. Before calling an Gatt client method, you must use {@link createGattClientDevice} to create an GattClientDevice instance.
97461847f8eSopenharmony_ci   *
97561847f8eSopenharmony_ci   * @typedef GattClientDevice
97661847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
97761847f8eSopenharmony_ci   * @since 7
97861847f8eSopenharmony_ci   * @deprecated since 9
97961847f8eSopenharmony_ci   * @useinstead ohos.bluetoothManager/bluetoothManager.GattClientDevice
98061847f8eSopenharmony_ci   */
98161847f8eSopenharmony_ci  interface GattClientDevice {
98261847f8eSopenharmony_ci    /**
98361847f8eSopenharmony_ci     * Connects to a BLE peripheral device.
98461847f8eSopenharmony_ci     * <p>The 'BLEConnectionStateChange' event is subscribed to return the connection state.
98561847f8eSopenharmony_ci     *
98661847f8eSopenharmony_ci     * @permission ohos.permission.USE_BLUETOOTH
98761847f8eSopenharmony_ci     * @returns { boolean } Returns {@code true} if the connection process starts; returns {@code false} otherwise.
98861847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
98961847f8eSopenharmony_ci     * @since 7
99061847f8eSopenharmony_ci     * @deprecated since 9
99161847f8eSopenharmony_ci     * @useinstead ohos.bluetoothManager/bluetoothManager.GattClientDevice#connect
99261847f8eSopenharmony_ci     */
99361847f8eSopenharmony_ci    connect(): boolean;
99461847f8eSopenharmony_ci
99561847f8eSopenharmony_ci    /**
99661847f8eSopenharmony_ci     * Disconnects from or stops an ongoing connection to a BLE peripheral device.
99761847f8eSopenharmony_ci     *
99861847f8eSopenharmony_ci     * @permission ohos.permission.USE_BLUETOOTH
99961847f8eSopenharmony_ci     * @returns { boolean } Returns {@code true} if the disconnection process starts; returns {@code false} otherwise.
100061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
100161847f8eSopenharmony_ci     * @since 7
100261847f8eSopenharmony_ci     * @deprecated since 9
100361847f8eSopenharmony_ci     * @useinstead ohos.bluetoothManager/bluetoothManager.GattClientDevice#disconnect
100461847f8eSopenharmony_ci     */
100561847f8eSopenharmony_ci    disconnect(): boolean;
100661847f8eSopenharmony_ci
100761847f8eSopenharmony_ci    /**
100861847f8eSopenharmony_ci     * Disables a BLE peripheral device.
100961847f8eSopenharmony_ci     * <p> This method unregisters the device and clears the registered callbacks and handles.
101061847f8eSopenharmony_ci     *
101161847f8eSopenharmony_ci     * @permission ohos.permission.USE_BLUETOOTH
101261847f8eSopenharmony_ci     * @returns { boolean } Returns {@code true} if the the device is disabled; returns {@code false} otherwise.
101361847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
101461847f8eSopenharmony_ci     * @since 7
101561847f8eSopenharmony_ci     * @deprecated since 9
101661847f8eSopenharmony_ci     * @useinstead ohos.bluetoothManager/bluetoothManager.GattClientDevice#close
101761847f8eSopenharmony_ci     */
101861847f8eSopenharmony_ci    close(): boolean;
101961847f8eSopenharmony_ci
102061847f8eSopenharmony_ci    /**
102161847f8eSopenharmony_ci     * Obtains the name of BLE peripheral device.
102261847f8eSopenharmony_ci     *
102361847f8eSopenharmony_ci     * @permission ohos.permission.USE_BLUETOOTH
102461847f8eSopenharmony_ci     * @param { AsyncCallback<string> } callback - Callback used to obtain the device name.
102561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
102661847f8eSopenharmony_ci     * @since 7
102761847f8eSopenharmony_ci     * @deprecated since 9
102861847f8eSopenharmony_ci     * @useinstead ohos.bluetoothManager/bluetoothManager.GattClientDevice#getDeviceName
102961847f8eSopenharmony_ci     */
103061847f8eSopenharmony_ci    getDeviceName(callback: AsyncCallback<string>): void;
103161847f8eSopenharmony_ci
103261847f8eSopenharmony_ci    /**
103361847f8eSopenharmony_ci     * Obtains the name of BLE peripheral device.
103461847f8eSopenharmony_ci     *
103561847f8eSopenharmony_ci     * @permission ohos.permission.USE_BLUETOOTH
103661847f8eSopenharmony_ci     * @returns { Promise<string> } Returns a string representation of the name if obtained;
103761847f8eSopenharmony_ci     * returns {@code null} if the name fails to be obtained or the name does not exist.
103861847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
103961847f8eSopenharmony_ci     * @since 7
104061847f8eSopenharmony_ci     * @deprecated since 9
104161847f8eSopenharmony_ci     * @useinstead ohos.bluetoothManager/bluetoothManager.GattClientDevice#getDeviceName
104261847f8eSopenharmony_ci     */
104361847f8eSopenharmony_ci    getDeviceName(): Promise<string>;
104461847f8eSopenharmony_ci
104561847f8eSopenharmony_ci    /**
104661847f8eSopenharmony_ci     * Starts discovering services.
104761847f8eSopenharmony_ci     *
104861847f8eSopenharmony_ci     * @permission ohos.permission.USE_BLUETOOTH
104961847f8eSopenharmony_ci     * @param { AsyncCallback<Array<GattService>> } callback - Callback used to catch the services.
105061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
105161847f8eSopenharmony_ci     * @since 7
105261847f8eSopenharmony_ci     * @deprecated since 9
105361847f8eSopenharmony_ci     * @useinstead ohos.bluetoothManager/bluetoothManager.GattClientDevice#getServices
105461847f8eSopenharmony_ci     */
105561847f8eSopenharmony_ci    getServices(callback: AsyncCallback<Array<GattService>>): void;
105661847f8eSopenharmony_ci
105761847f8eSopenharmony_ci    /**
105861847f8eSopenharmony_ci     * Starts discovering services.
105961847f8eSopenharmony_ci     *
106061847f8eSopenharmony_ci     * @permission ohos.permission.USE_BLUETOOTH
106161847f8eSopenharmony_ci     * @returns { Promise<Array<GattService>> } Returns the list of services {@link GattService} of the BLE peripheral device.
106261847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
106361847f8eSopenharmony_ci     * @since 7
106461847f8eSopenharmony_ci     * @deprecated since 9
106561847f8eSopenharmony_ci     * @useinstead ohos.bluetoothManager/bluetoothManager.GattClientDevice#getServices
106661847f8eSopenharmony_ci     */
106761847f8eSopenharmony_ci    getServices(): Promise<Array<GattService>>;
106861847f8eSopenharmony_ci
106961847f8eSopenharmony_ci    /**
107061847f8eSopenharmony_ci     * Reads the characteristic of a BLE peripheral device.
107161847f8eSopenharmony_ci     *
107261847f8eSopenharmony_ci     * @permission ohos.permission.USE_BLUETOOTH
107361847f8eSopenharmony_ci     * @param { BLECharacteristic } characteristic - Indicates the characteristic to read.
107461847f8eSopenharmony_ci     * @param { AsyncCallback<BLECharacteristic> } callback - Callback invoked to return the characteristic value read.
107561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
107661847f8eSopenharmony_ci     * @since 7
107761847f8eSopenharmony_ci     * @deprecated since 9
107861847f8eSopenharmony_ci     * @useinstead ohos.bluetoothManager/bluetoothManager.GattClientDevice#readCharacteristicValue
107961847f8eSopenharmony_ci     */
108061847f8eSopenharmony_ci    readCharacteristicValue(characteristic: BLECharacteristic, callback: AsyncCallback<BLECharacteristic>): void;
108161847f8eSopenharmony_ci
108261847f8eSopenharmony_ci    /**
108361847f8eSopenharmony_ci     * Reads the characteristic of a BLE peripheral device.
108461847f8eSopenharmony_ci     *
108561847f8eSopenharmony_ci     * @permission ohos.permission.USE_BLUETOOTH
108661847f8eSopenharmony_ci     * @param { BLECharacteristic } characteristic - Indicates the characteristic to read.
108761847f8eSopenharmony_ci     * @returns { Promise<BLECharacteristic> } - Promise used to return the characteristic value read.
108861847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
108961847f8eSopenharmony_ci     * @since 7
109061847f8eSopenharmony_ci     * @deprecated since 9
109161847f8eSopenharmony_ci     * @useinstead ohos.bluetoothManager/bluetoothManager.GattClientDevice#readCharacteristicValue
109261847f8eSopenharmony_ci     */
109361847f8eSopenharmony_ci    readCharacteristicValue(characteristic: BLECharacteristic): Promise<BLECharacteristic>;
109461847f8eSopenharmony_ci
109561847f8eSopenharmony_ci    /**
109661847f8eSopenharmony_ci     * Reads the descriptor of a BLE peripheral device.
109761847f8eSopenharmony_ci     *
109861847f8eSopenharmony_ci     * @permission ohos.permission.USE_BLUETOOTH
109961847f8eSopenharmony_ci     * @param { BLEDescriptor } descriptor - Indicates the descriptor to read.
110061847f8eSopenharmony_ci     * @param { AsyncCallback<BLEDescriptor> } callback - Callback invoked to return the descriptor read.
110161847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
110261847f8eSopenharmony_ci     * @since 7
110361847f8eSopenharmony_ci     * @deprecated since 9
110461847f8eSopenharmony_ci     * @useinstead ohos.bluetoothManager/bluetoothManager.GattClientDevice#readDescriptorValue
110561847f8eSopenharmony_ci     */
110661847f8eSopenharmony_ci    readDescriptorValue(descriptor: BLEDescriptor, callback: AsyncCallback<BLEDescriptor>): void;
110761847f8eSopenharmony_ci
110861847f8eSopenharmony_ci    /**
110961847f8eSopenharmony_ci     * Reads the descriptor of a BLE peripheral device.
111061847f8eSopenharmony_ci     *
111161847f8eSopenharmony_ci     * @permission ohos.permission.USE_BLUETOOTH
111261847f8eSopenharmony_ci     * @param { BLEDescriptor } descriptor - Indicates the descriptor to read.
111361847f8eSopenharmony_ci     * @returns { Promise<BLEDescriptor> } - Promise used to return the descriptor read.
111461847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
111561847f8eSopenharmony_ci     * @since 7
111661847f8eSopenharmony_ci     * @deprecated since 9
111761847f8eSopenharmony_ci     * @useinstead ohos.bluetoothManager/bluetoothManager.GattClientDevice#readDescriptorValue
111861847f8eSopenharmony_ci     */
111961847f8eSopenharmony_ci    readDescriptorValue(descriptor: BLEDescriptor): Promise<BLEDescriptor>;
112061847f8eSopenharmony_ci
112161847f8eSopenharmony_ci    /**
112261847f8eSopenharmony_ci     * Writes the characteristic of a BLE peripheral device.
112361847f8eSopenharmony_ci     *
112461847f8eSopenharmony_ci     * @permission ohos.permission.USE_BLUETOOTH
112561847f8eSopenharmony_ci     * @param { BLECharacteristic } characteristic - Indicates the characteristic to write.
112661847f8eSopenharmony_ci     * @returns { boolean } Returns {@code true} if the characteristic is written successfully; returns {@code false} otherwise.
112761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
112861847f8eSopenharmony_ci     * @since 7
112961847f8eSopenharmony_ci     * @deprecated since 9
113061847f8eSopenharmony_ci     * @useinstead ohos.bluetoothManager/bluetoothManager.GattClientDevice#writeCharacteristicValue
113161847f8eSopenharmony_ci     */
113261847f8eSopenharmony_ci    writeCharacteristicValue(characteristic: BLECharacteristic): boolean;
113361847f8eSopenharmony_ci
113461847f8eSopenharmony_ci    /**
113561847f8eSopenharmony_ci     * Writes the descriptor of a BLE peripheral device.
113661847f8eSopenharmony_ci     *
113761847f8eSopenharmony_ci     * @permission ohos.permission.USE_BLUETOOTH
113861847f8eSopenharmony_ci     * @param { BLEDescriptor } descriptor - Indicates the descriptor to write.
113961847f8eSopenharmony_ci     * @returns { boolean } Returns {@code true} if the descriptor is written successfully; returns {@code false} otherwise.
114061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
114161847f8eSopenharmony_ci     * @since 7
114261847f8eSopenharmony_ci     * @deprecated since 9
114361847f8eSopenharmony_ci     * @useinstead ohos.bluetoothManager/bluetoothManager.GattClientDevice#writeDescriptorValue
114461847f8eSopenharmony_ci     */
114561847f8eSopenharmony_ci    writeDescriptorValue(descriptor: BLEDescriptor): boolean;
114661847f8eSopenharmony_ci
114761847f8eSopenharmony_ci    /**
114861847f8eSopenharmony_ci     * Get the RSSI value of this BLE peripheral device.
114961847f8eSopenharmony_ci     *
115061847f8eSopenharmony_ci     * @permission ohos.permission.USE_BLUETOOTH
115161847f8eSopenharmony_ci     * @param { AsyncCallback<number> } callback - Callback invoked to return the RSSI, in dBm.
115261847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
115361847f8eSopenharmony_ci     * @since 7
115461847f8eSopenharmony_ci     * @deprecated since 9
115561847f8eSopenharmony_ci     * @useinstead ohos.bluetoothManager/bluetoothManager.GattClientDevice#getRssiValue
115661847f8eSopenharmony_ci     */
115761847f8eSopenharmony_ci    getRssiValue(callback: AsyncCallback<number>): void;
115861847f8eSopenharmony_ci
115961847f8eSopenharmony_ci    /**
116061847f8eSopenharmony_ci     * Get the RSSI value of this BLE peripheral device.
116161847f8eSopenharmony_ci     *
116261847f8eSopenharmony_ci     * @permission ohos.permission.USE_BLUETOOTH
116361847f8eSopenharmony_ci     * @returns { Promise<number> } Returns the RSSI value.
116461847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
116561847f8eSopenharmony_ci     * @since 7
116661847f8eSopenharmony_ci     * @deprecated since 9
116761847f8eSopenharmony_ci     * @useinstead ohos.bluetoothManager/bluetoothManager.GattClientDevice#getRssiValue
116861847f8eSopenharmony_ci     */
116961847f8eSopenharmony_ci    getRssiValue(): Promise<number>;
117061847f8eSopenharmony_ci
117161847f8eSopenharmony_ci    /**
117261847f8eSopenharmony_ci     * Set the mtu size of a BLE peripheral device.
117361847f8eSopenharmony_ci     *
117461847f8eSopenharmony_ci     * @permission ohos.permission.USE_BLUETOOTH
117561847f8eSopenharmony_ci     * @param { number } mtu - The maximum transmission unit.
117661847f8eSopenharmony_ci     * @returns { boolean } Returns {@code true} if the set mtu is successfully; returns {@code false} otherwise.
117761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
117861847f8eSopenharmony_ci     * @since 7
117961847f8eSopenharmony_ci     * @deprecated since 9
118061847f8eSopenharmony_ci     * @useinstead ohos.bluetoothManager/bluetoothManager.GattClientDevice#setBLEMtuSize
118161847f8eSopenharmony_ci     */
118261847f8eSopenharmony_ci    setBLEMtuSize(mtu: number): boolean;
118361847f8eSopenharmony_ci
118461847f8eSopenharmony_ci    /**
118561847f8eSopenharmony_ci     * Enables or disables notification of a characteristic when value changed.
118661847f8eSopenharmony_ci     *
118761847f8eSopenharmony_ci     * @permission ohos.permission.USE_BLUETOOTH
118861847f8eSopenharmony_ci     * @param { BLECharacteristic } characteristic - BLE characteristic to listen for.
118961847f8eSopenharmony_ci     * @param { boolean } enable - Specifies whether to enable notification of the characteristic. The value {@code true} indicates
119061847f8eSopenharmony_ci     * that notification is enabled, and the value {@code false} indicates that notification is disabled.
119161847f8eSopenharmony_ci     * @returns { boolean } Returns {@code true} if notification of the characteristic is enabled or disabled;
119261847f8eSopenharmony_ci     * returns {@code false} otherwise.
119361847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
119461847f8eSopenharmony_ci     * @since 7
119561847f8eSopenharmony_ci     * @deprecated since 9
119661847f8eSopenharmony_ci     * @useinstead ohos.bluetoothManager/bluetoothManager.GattClientDevice#setNotifyCharacteristicChanged
119761847f8eSopenharmony_ci     */
119861847f8eSopenharmony_ci    setNotifyCharacteristicChanged(characteristic: BLECharacteristic, enable: boolean): boolean;
119961847f8eSopenharmony_ci
120061847f8eSopenharmony_ci    /**
120161847f8eSopenharmony_ci     * Subscribe characteristic value changed event.
120261847f8eSopenharmony_ci     *
120361847f8eSopenharmony_ci     * @permission ohos.permission.USE_BLUETOOTH
120461847f8eSopenharmony_ci     * @param { 'BLECharacteristicChange' } type - Type of the characteristic value changed event to listen for.
120561847f8eSopenharmony_ci     * @param { Callback<BLECharacteristic> } callback - Callback used to listen for the characteristic value changed event.
120661847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
120761847f8eSopenharmony_ci     * @since 7
120861847f8eSopenharmony_ci     * @deprecated since 9
120961847f8eSopenharmony_ci     * @useinstead ohos.bluetoothManager/bluetoothManager.GattClientDevice.on#event:BLECharacteristicChange
121061847f8eSopenharmony_ci     */
121161847f8eSopenharmony_ci    on(type: 'BLECharacteristicChange', callback: Callback<BLECharacteristic>): void;
121261847f8eSopenharmony_ci
121361847f8eSopenharmony_ci    /**
121461847f8eSopenharmony_ci     * Unsubscribe characteristic value changed event.
121561847f8eSopenharmony_ci     *
121661847f8eSopenharmony_ci     * @permission ohos.permission.USE_BLUETOOTH
121761847f8eSopenharmony_ci     * @param { 'BLECharacteristicChange' } type - Type of the characteristic value changed event to listen for.
121861847f8eSopenharmony_ci     * @param { Callback<BLECharacteristic> } callback - Callback used to listen for the characteristic value changed event.
121961847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
122061847f8eSopenharmony_ci     * @since 7
122161847f8eSopenharmony_ci     * @deprecated since 9
122261847f8eSopenharmony_ci     * @useinstead ohos.bluetoothManager/bluetoothManager.GattClientDevice.off#event:BLECharacteristicChange
122361847f8eSopenharmony_ci     */
122461847f8eSopenharmony_ci    off(type: 'BLECharacteristicChange', callback?: Callback<BLECharacteristic>): void;
122561847f8eSopenharmony_ci
122661847f8eSopenharmony_ci    /**
122761847f8eSopenharmony_ci     * Subscribe client connection state changed event.
122861847f8eSopenharmony_ci     *
122961847f8eSopenharmony_ci     * @permission ohos.permission.USE_BLUETOOTH
123061847f8eSopenharmony_ci     * @param { 'BLEConnectionStateChange' } type - Type of the connection state changed event to listen for.
123161847f8eSopenharmony_ci     * @param { Callback<BLEConnectChangedState> } callback - Callback used to listen for the connection state changed event.
123261847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
123361847f8eSopenharmony_ci     * @since 7
123461847f8eSopenharmony_ci     * @deprecated since 9
123561847f8eSopenharmony_ci     * @useinstead ohos.bluetoothManager/bluetoothManager.GattClientDevice.on#event:BLEConnectionStateChange
123661847f8eSopenharmony_ci     */
123761847f8eSopenharmony_ci    on(type: 'BLEConnectionStateChange', callback: Callback<BLEConnectChangedState>): void;
123861847f8eSopenharmony_ci
123961847f8eSopenharmony_ci    /**
124061847f8eSopenharmony_ci     * Unsubscribe client connection state changed event.
124161847f8eSopenharmony_ci     *
124261847f8eSopenharmony_ci     * @permission ohos.permission.USE_BLUETOOTH
124361847f8eSopenharmony_ci     * @param { 'BLEConnectionStateChange' } type - Type of the connection state changed event to listen for.
124461847f8eSopenharmony_ci     * @param { Callback<BLEConnectChangedState> } callback - Callback used to listen for the connection state changed event.
124561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
124661847f8eSopenharmony_ci     * @since 7
124761847f8eSopenharmony_ci     * @deprecated since 9
124861847f8eSopenharmony_ci     * @useinstead ohos.bluetoothManager/bluetoothManager.GattClientDevice.off#event:BLEConnectionStateChange
124961847f8eSopenharmony_ci     */
125061847f8eSopenharmony_ci    off(type: 'BLEConnectionStateChange', callback?: Callback<BLEConnectChangedState>): void;
125161847f8eSopenharmony_ci  }
125261847f8eSopenharmony_ci
125361847f8eSopenharmony_ci  /**
125461847f8eSopenharmony_ci   * Describes the Gatt service.
125561847f8eSopenharmony_ci   *
125661847f8eSopenharmony_ci   * @typedef GattService
125761847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
125861847f8eSopenharmony_ci   * @since 7
125961847f8eSopenharmony_ci   * @deprecated since 9
126061847f8eSopenharmony_ci   * @useinstead ohos.bluetoothManager/bluetoothManager.GattService
126161847f8eSopenharmony_ci   */
126261847f8eSopenharmony_ci  interface GattService {
126361847f8eSopenharmony_ci    /**
126461847f8eSopenharmony_ci     * The UUID of a GattService instance
126561847f8eSopenharmony_ci     *
126661847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
126761847f8eSopenharmony_ci     * @since 7
126861847f8eSopenharmony_ci     * @deprecated since 9
126961847f8eSopenharmony_ci     */
127061847f8eSopenharmony_ci    serviceUuid: string;
127161847f8eSopenharmony_ci    /**
127261847f8eSopenharmony_ci     * Indicates whether the GattService instance is primary or secondary.
127361847f8eSopenharmony_ci     *
127461847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
127561847f8eSopenharmony_ci     * @since 7
127661847f8eSopenharmony_ci     * @deprecated since 9
127761847f8eSopenharmony_ci     */
127861847f8eSopenharmony_ci    isPrimary: boolean;
127961847f8eSopenharmony_ci    /**
128061847f8eSopenharmony_ci     * The {@link BLECharacteristic} list belongs to this GattService instance
128161847f8eSopenharmony_ci     *
128261847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
128361847f8eSopenharmony_ci     * @since 7
128461847f8eSopenharmony_ci     * @deprecated since 9
128561847f8eSopenharmony_ci     */
128661847f8eSopenharmony_ci    characteristics: Array<BLECharacteristic>;
128761847f8eSopenharmony_ci    /**
128861847f8eSopenharmony_ci     * The list of GATT services contained in the service
128961847f8eSopenharmony_ci     *
129061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
129161847f8eSopenharmony_ci     * @since 7
129261847f8eSopenharmony_ci     * @deprecated since 9
129361847f8eSopenharmony_ci     */
129461847f8eSopenharmony_ci    includeServices?: Array<GattService>;
129561847f8eSopenharmony_ci  }
129661847f8eSopenharmony_ci
129761847f8eSopenharmony_ci  /**
129861847f8eSopenharmony_ci   * Describes the Gatt characteristic.
129961847f8eSopenharmony_ci   *
130061847f8eSopenharmony_ci   * @typedef BLECharacteristic
130161847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
130261847f8eSopenharmony_ci   * @since 7
130361847f8eSopenharmony_ci   * @deprecated since 9
130461847f8eSopenharmony_ci   * @useinstead ohos.bluetoothManager/bluetoothManager.BLECharacteristic
130561847f8eSopenharmony_ci   */
130661847f8eSopenharmony_ci  interface BLECharacteristic {
130761847f8eSopenharmony_ci    /**
130861847f8eSopenharmony_ci     * The UUID of the {@link GattService} instance to which the characteristic belongs
130961847f8eSopenharmony_ci     *
131061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
131161847f8eSopenharmony_ci     * @since 7
131261847f8eSopenharmony_ci     * @deprecated since 9
131361847f8eSopenharmony_ci     */
131461847f8eSopenharmony_ci    serviceUuid: string;
131561847f8eSopenharmony_ci    /**
131661847f8eSopenharmony_ci     * The UUID of a BLECharacteristic instance
131761847f8eSopenharmony_ci     *
131861847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
131961847f8eSopenharmony_ci     * @since 7
132061847f8eSopenharmony_ci     * @deprecated since 9
132161847f8eSopenharmony_ci     */
132261847f8eSopenharmony_ci    characteristicUuid: string;
132361847f8eSopenharmony_ci    /**
132461847f8eSopenharmony_ci     * The value of a BLECharacteristic instance
132561847f8eSopenharmony_ci     *
132661847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
132761847f8eSopenharmony_ci     * @since 7
132861847f8eSopenharmony_ci     * @deprecated since 9
132961847f8eSopenharmony_ci     */
133061847f8eSopenharmony_ci    characteristicValue: ArrayBuffer;
133161847f8eSopenharmony_ci    /**
133261847f8eSopenharmony_ci     * The list of {@link BLEDescriptor} contained in the characteristic
133361847f8eSopenharmony_ci     *
133461847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
133561847f8eSopenharmony_ci     * @since 7
133661847f8eSopenharmony_ci     * @deprecated since 9
133761847f8eSopenharmony_ci     */
133861847f8eSopenharmony_ci    descriptors: Array<BLEDescriptor>;
133961847f8eSopenharmony_ci  }
134061847f8eSopenharmony_ci
134161847f8eSopenharmony_ci  /**
134261847f8eSopenharmony_ci   * Describes the Gatt descriptor.
134361847f8eSopenharmony_ci   *
134461847f8eSopenharmony_ci   * @typedef BLEDescriptor
134561847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
134661847f8eSopenharmony_ci   * @since 7
134761847f8eSopenharmony_ci   * @deprecated since 9
134861847f8eSopenharmony_ci   * @useinstead ohos.bluetoothManager/bluetoothManager.BLEDescriptor
134961847f8eSopenharmony_ci   */
135061847f8eSopenharmony_ci  interface BLEDescriptor {
135161847f8eSopenharmony_ci    /**
135261847f8eSopenharmony_ci     * The UUID of the {@link GattService} instance to which the descriptor belongs
135361847f8eSopenharmony_ci     *
135461847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
135561847f8eSopenharmony_ci     * @since 7
135661847f8eSopenharmony_ci     * @deprecated since 9
135761847f8eSopenharmony_ci     */
135861847f8eSopenharmony_ci    serviceUuid: string;
135961847f8eSopenharmony_ci    /**
136061847f8eSopenharmony_ci     * The UUID of the {@link BLECharacteristic} instance to which the descriptor belongs
136161847f8eSopenharmony_ci     *
136261847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
136361847f8eSopenharmony_ci     * @since 7
136461847f8eSopenharmony_ci     * @deprecated since 9
136561847f8eSopenharmony_ci     */
136661847f8eSopenharmony_ci    characteristicUuid: string;
136761847f8eSopenharmony_ci    /**
136861847f8eSopenharmony_ci     * The UUID of the BLEDescriptor instance
136961847f8eSopenharmony_ci     *
137061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
137161847f8eSopenharmony_ci     * @since 7
137261847f8eSopenharmony_ci     * @deprecated since 9
137361847f8eSopenharmony_ci     */
137461847f8eSopenharmony_ci    descriptorUuid: string;
137561847f8eSopenharmony_ci    /**
137661847f8eSopenharmony_ci     * The value of the BLEDescriptor instance
137761847f8eSopenharmony_ci     *
137861847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
137961847f8eSopenharmony_ci     * @since 7
138061847f8eSopenharmony_ci     * @deprecated since 9
138161847f8eSopenharmony_ci     */
138261847f8eSopenharmony_ci    descriptorValue: ArrayBuffer;
138361847f8eSopenharmony_ci  }
138461847f8eSopenharmony_ci
138561847f8eSopenharmony_ci  /**
138661847f8eSopenharmony_ci   * Describes the value of the indication or notification sent by the Gatt server.
138761847f8eSopenharmony_ci   *
138861847f8eSopenharmony_ci   * @typedef NotifyCharacteristic
138961847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
139061847f8eSopenharmony_ci   * @since 7
139161847f8eSopenharmony_ci   * @deprecated since 9
139261847f8eSopenharmony_ci   * @useinstead ohos.bluetoothManager/bluetoothManager.NotifyCharacteristic
139361847f8eSopenharmony_ci   */
139461847f8eSopenharmony_ci  interface NotifyCharacteristic {
139561847f8eSopenharmony_ci    /**
139661847f8eSopenharmony_ci     * The UUID of the {@link GattService} instance to which the characteristic belongs
139761847f8eSopenharmony_ci     *
139861847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
139961847f8eSopenharmony_ci     * @since 7
140061847f8eSopenharmony_ci     * @deprecated since 9
140161847f8eSopenharmony_ci     */
140261847f8eSopenharmony_ci    serviceUuid: string;
140361847f8eSopenharmony_ci    /**
140461847f8eSopenharmony_ci     * The UUID of a NotifyCharacteristic instance
140561847f8eSopenharmony_ci     *
140661847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
140761847f8eSopenharmony_ci     * @since 7
140861847f8eSopenharmony_ci     * @deprecated since 9
140961847f8eSopenharmony_ci     */
141061847f8eSopenharmony_ci    characteristicUuid: string;
141161847f8eSopenharmony_ci    /**
141261847f8eSopenharmony_ci     * The value of a NotifyCharacteristic instance
141361847f8eSopenharmony_ci     *
141461847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
141561847f8eSopenharmony_ci     * @since 7
141661847f8eSopenharmony_ci     * @deprecated since 9
141761847f8eSopenharmony_ci     */
141861847f8eSopenharmony_ci    characteristicValue: ArrayBuffer;
141961847f8eSopenharmony_ci    /**
142061847f8eSopenharmony_ci     * Specifies whether to request confirmation from the BLE peripheral device (indication) or
142161847f8eSopenharmony_ci     * send a notification. Value {@code true} indicates the former and {@code false} indicates the latter.
142261847f8eSopenharmony_ci     *
142361847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
142461847f8eSopenharmony_ci     * @since 7
142561847f8eSopenharmony_ci     * @deprecated since 9
142661847f8eSopenharmony_ci     */
142761847f8eSopenharmony_ci    confirm: boolean;
142861847f8eSopenharmony_ci  }
142961847f8eSopenharmony_ci
143061847f8eSopenharmony_ci  /**
143161847f8eSopenharmony_ci   * Describes the parameters of the Gatt client's characteristic read request.
143261847f8eSopenharmony_ci   *
143361847f8eSopenharmony_ci   * @typedef CharacteristicReadReq
143461847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
143561847f8eSopenharmony_ci   * @since 7
143661847f8eSopenharmony_ci   * @deprecated since 9
143761847f8eSopenharmony_ci   * @useinstead ohos.bluetoothManager/bluetoothManager.CharacteristicReadRequest
143861847f8eSopenharmony_ci   */
143961847f8eSopenharmony_ci  interface CharacteristicReadReq {
144061847f8eSopenharmony_ci    /**
144161847f8eSopenharmony_ci     * Indicates the address of the client that initiates the read request
144261847f8eSopenharmony_ci     *
144361847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
144461847f8eSopenharmony_ci     * @since 7
144561847f8eSopenharmony_ci     * @deprecated since 9
144661847f8eSopenharmony_ci     */
144761847f8eSopenharmony_ci    deviceId: string;
144861847f8eSopenharmony_ci    /**
144961847f8eSopenharmony_ci     * The Id of the read request
145061847f8eSopenharmony_ci     *
145161847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
145261847f8eSopenharmony_ci     * @since 7
145361847f8eSopenharmony_ci     * @deprecated since 9
145461847f8eSopenharmony_ci     */
145561847f8eSopenharmony_ci    transId: number;
145661847f8eSopenharmony_ci    /**
145761847f8eSopenharmony_ci     * Indicates the byte offset of the start position for reading characteristic value
145861847f8eSopenharmony_ci     *
145961847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
146061847f8eSopenharmony_ci     * @since 7
146161847f8eSopenharmony_ci     * @deprecated since 9
146261847f8eSopenharmony_ci     */
146361847f8eSopenharmony_ci    offset: number;
146461847f8eSopenharmony_ci    /**
146561847f8eSopenharmony_ci     * The UUID of a CharacteristicReadReq instance
146661847f8eSopenharmony_ci     *
146761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
146861847f8eSopenharmony_ci     * @since 7
146961847f8eSopenharmony_ci     * @deprecated since 9
147061847f8eSopenharmony_ci     */
147161847f8eSopenharmony_ci    characteristicUuid: string;
147261847f8eSopenharmony_ci    /**
147361847f8eSopenharmony_ci     * The UUID of the service to which the characteristic belongs
147461847f8eSopenharmony_ci     *
147561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
147661847f8eSopenharmony_ci     * @since 7
147761847f8eSopenharmony_ci     * @deprecated since 9
147861847f8eSopenharmony_ci     */
147961847f8eSopenharmony_ci    serviceUuid: string;
148061847f8eSopenharmony_ci  }
148161847f8eSopenharmony_ci
148261847f8eSopenharmony_ci  /**
148361847f8eSopenharmony_ci   * Describes the parameters of the of the Gatt client's characteristic write request.
148461847f8eSopenharmony_ci   *
148561847f8eSopenharmony_ci   * @typedef CharacteristicWriteReq
148661847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
148761847f8eSopenharmony_ci   * @since 7
148861847f8eSopenharmony_ci   * @deprecated since 9
148961847f8eSopenharmony_ci   * @useinstead ohos.bluetoothManager/bluetoothManager.CharacteristicWriteRequest
149061847f8eSopenharmony_ci   */
149161847f8eSopenharmony_ci  interface CharacteristicWriteReq {
149261847f8eSopenharmony_ci    /**
149361847f8eSopenharmony_ci     * Indicates the address of the client that initiates the write request
149461847f8eSopenharmony_ci     *
149561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
149661847f8eSopenharmony_ci     * @since 7
149761847f8eSopenharmony_ci     * @deprecated since 9
149861847f8eSopenharmony_ci     */
149961847f8eSopenharmony_ci    deviceId: string;
150061847f8eSopenharmony_ci    /**
150161847f8eSopenharmony_ci     * The Id of the write request
150261847f8eSopenharmony_ci     *
150361847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
150461847f8eSopenharmony_ci     * @since 7
150561847f8eSopenharmony_ci     * @deprecated since 9
150661847f8eSopenharmony_ci     */
150761847f8eSopenharmony_ci    transId: number;
150861847f8eSopenharmony_ci    /**
150961847f8eSopenharmony_ci     * Indicates the byte offset of the start position for writing characteristic value
151061847f8eSopenharmony_ci     *
151161847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
151261847f8eSopenharmony_ci     * @since 7
151361847f8eSopenharmony_ci     * @deprecated since 9
151461847f8eSopenharmony_ci     */
151561847f8eSopenharmony_ci    offset: number;
151661847f8eSopenharmony_ci    /**
151761847f8eSopenharmony_ci     * Whether this request should be pending for later operation
151861847f8eSopenharmony_ci     *
151961847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
152061847f8eSopenharmony_ci     * @since 7
152161847f8eSopenharmony_ci     * @deprecated since 9
152261847f8eSopenharmony_ci     */
152361847f8eSopenharmony_ci    isPrep: boolean;
152461847f8eSopenharmony_ci    /**
152561847f8eSopenharmony_ci     * Whether the remote client need a response
152661847f8eSopenharmony_ci     *
152761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
152861847f8eSopenharmony_ci     * @since 7
152961847f8eSopenharmony_ci     * @deprecated since 9
153061847f8eSopenharmony_ci     */
153161847f8eSopenharmony_ci    needRsp: boolean;
153261847f8eSopenharmony_ci    /**
153361847f8eSopenharmony_ci     * Indicates the value to be written
153461847f8eSopenharmony_ci     *
153561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
153661847f8eSopenharmony_ci     * @since 7
153761847f8eSopenharmony_ci     * @deprecated since 9
153861847f8eSopenharmony_ci     */
153961847f8eSopenharmony_ci    value: ArrayBuffer;
154061847f8eSopenharmony_ci    /**
154161847f8eSopenharmony_ci     * The UUID of a CharacteristicWriteReq instance
154261847f8eSopenharmony_ci     *
154361847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
154461847f8eSopenharmony_ci     * @since 7
154561847f8eSopenharmony_ci     * @deprecated since 9
154661847f8eSopenharmony_ci     */
154761847f8eSopenharmony_ci    characteristicUuid: string;
154861847f8eSopenharmony_ci    /**
154961847f8eSopenharmony_ci     * The UUID of the service to which the characteristic belongs
155061847f8eSopenharmony_ci     *
155161847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
155261847f8eSopenharmony_ci     * @since 7
155361847f8eSopenharmony_ci     * @deprecated since 9
155461847f8eSopenharmony_ci     */
155561847f8eSopenharmony_ci    serviceUuid: string;
155661847f8eSopenharmony_ci  }
155761847f8eSopenharmony_ci
155861847f8eSopenharmony_ci  /**
155961847f8eSopenharmony_ci   * Describes the parameters of the Gatt client's descriptor read request.
156061847f8eSopenharmony_ci   *
156161847f8eSopenharmony_ci   * @typedef DescriptorReadReq
156261847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
156361847f8eSopenharmony_ci   * @since 7
156461847f8eSopenharmony_ci   * @deprecated since 9
156561847f8eSopenharmony_ci   * @useinstead ohos.bluetoothManager/bluetoothManager.DescriptorReadRequest
156661847f8eSopenharmony_ci   */
156761847f8eSopenharmony_ci  interface DescriptorReadReq {
156861847f8eSopenharmony_ci    /**
156961847f8eSopenharmony_ci     * Indicates the address of the client that initiates the read request
157061847f8eSopenharmony_ci     *
157161847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
157261847f8eSopenharmony_ci     * @since 7
157361847f8eSopenharmony_ci     * @deprecated since 9
157461847f8eSopenharmony_ci     */
157561847f8eSopenharmony_ci    deviceId: string;
157661847f8eSopenharmony_ci    /**
157761847f8eSopenharmony_ci     * The Id of the read request
157861847f8eSopenharmony_ci     *
157961847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
158061847f8eSopenharmony_ci     * @since 7
158161847f8eSopenharmony_ci     * @deprecated since 9
158261847f8eSopenharmony_ci     */
158361847f8eSopenharmony_ci    transId: number;
158461847f8eSopenharmony_ci    /**
158561847f8eSopenharmony_ci     * Indicates the byte offset of the start position for reading characteristic value
158661847f8eSopenharmony_ci     *
158761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
158861847f8eSopenharmony_ci     * @since 7
158961847f8eSopenharmony_ci     * @deprecated since 9
159061847f8eSopenharmony_ci     */
159161847f8eSopenharmony_ci    offset: number;
159261847f8eSopenharmony_ci    /**
159361847f8eSopenharmony_ci     * The UUID of a DescriptorReadReq instance
159461847f8eSopenharmony_ci     *
159561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
159661847f8eSopenharmony_ci     * @since 7
159761847f8eSopenharmony_ci     * @deprecated since 9
159861847f8eSopenharmony_ci     */
159961847f8eSopenharmony_ci    descriptorUuid: string;
160061847f8eSopenharmony_ci    /**
160161847f8eSopenharmony_ci     * The UUID of the characteristic to which the descriptor belongs
160261847f8eSopenharmony_ci     *
160361847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
160461847f8eSopenharmony_ci     * @since 7
160561847f8eSopenharmony_ci     * @deprecated since 9
160661847f8eSopenharmony_ci     */
160761847f8eSopenharmony_ci    characteristicUuid: string;
160861847f8eSopenharmony_ci    /**
160961847f8eSopenharmony_ci     * The UUID of the service to which the descriptor belongs
161061847f8eSopenharmony_ci     *
161161847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
161261847f8eSopenharmony_ci     * @since 7
161361847f8eSopenharmony_ci     * @deprecated since 9
161461847f8eSopenharmony_ci     */
161561847f8eSopenharmony_ci    serviceUuid: string;
161661847f8eSopenharmony_ci  }
161761847f8eSopenharmony_ci
161861847f8eSopenharmony_ci  /**
161961847f8eSopenharmony_ci   * Describes the parameters of the Gatt client's characteristic write request.
162061847f8eSopenharmony_ci   *
162161847f8eSopenharmony_ci   * @typedef DescriptorWriteReq
162261847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
162361847f8eSopenharmony_ci   * @since 7
162461847f8eSopenharmony_ci   * @deprecated since 9
162561847f8eSopenharmony_ci   * @useinstead ohos.bluetoothManager/bluetoothManager.DescriptorWriteRequest
162661847f8eSopenharmony_ci   */
162761847f8eSopenharmony_ci  interface DescriptorWriteReq {
162861847f8eSopenharmony_ci    /**
162961847f8eSopenharmony_ci     * Indicates the address of the client that initiates the write request
163061847f8eSopenharmony_ci     *
163161847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
163261847f8eSopenharmony_ci     * @since 7
163361847f8eSopenharmony_ci     * @deprecated since 9
163461847f8eSopenharmony_ci     */
163561847f8eSopenharmony_ci    deviceId: string;
163661847f8eSopenharmony_ci    /**
163761847f8eSopenharmony_ci     * The Id of the write request
163861847f8eSopenharmony_ci     *
163961847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
164061847f8eSopenharmony_ci     * @since 7
164161847f8eSopenharmony_ci     * @deprecated since 9
164261847f8eSopenharmony_ci     */
164361847f8eSopenharmony_ci    transId: number;
164461847f8eSopenharmony_ci    /**
164561847f8eSopenharmony_ci     * Indicates the byte offset of the start position for writing characteristic value
164661847f8eSopenharmony_ci     *
164761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
164861847f8eSopenharmony_ci     * @since 7
164961847f8eSopenharmony_ci     * @deprecated since 9
165061847f8eSopenharmony_ci     */
165161847f8eSopenharmony_ci    offset: number;
165261847f8eSopenharmony_ci    /**
165361847f8eSopenharmony_ci     * Whether this request should be pending for later operation
165461847f8eSopenharmony_ci     *
165561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
165661847f8eSopenharmony_ci     * @since 7
165761847f8eSopenharmony_ci     * @deprecated since 9
165861847f8eSopenharmony_ci     */
165961847f8eSopenharmony_ci    isPrep: boolean;
166061847f8eSopenharmony_ci    /**
166161847f8eSopenharmony_ci     * Whether the remote client need a response
166261847f8eSopenharmony_ci     *
166361847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
166461847f8eSopenharmony_ci     * @since 7
166561847f8eSopenharmony_ci     * @deprecated since 9
166661847f8eSopenharmony_ci     */
166761847f8eSopenharmony_ci    needRsp: boolean;
166861847f8eSopenharmony_ci    /**
166961847f8eSopenharmony_ci     * Indicates the value to be written
167061847f8eSopenharmony_ci     *
167161847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
167261847f8eSopenharmony_ci     * @since 7
167361847f8eSopenharmony_ci     * @deprecated since 9
167461847f8eSopenharmony_ci     */
167561847f8eSopenharmony_ci    value: ArrayBuffer;
167661847f8eSopenharmony_ci    /**
167761847f8eSopenharmony_ci     * The UUID of a DescriptorWriteReq instance
167861847f8eSopenharmony_ci     *
167961847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
168061847f8eSopenharmony_ci     * @since 7
168161847f8eSopenharmony_ci     * @deprecated since 9
168261847f8eSopenharmony_ci     */
168361847f8eSopenharmony_ci    descriptorUuid: string;
168461847f8eSopenharmony_ci    /**
168561847f8eSopenharmony_ci     * The UUID of the characteristic to which the descriptor belongs
168661847f8eSopenharmony_ci     *
168761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
168861847f8eSopenharmony_ci     * @since 7
168961847f8eSopenharmony_ci     * @deprecated since 9
169061847f8eSopenharmony_ci     */
169161847f8eSopenharmony_ci    characteristicUuid: string;
169261847f8eSopenharmony_ci    /**
169361847f8eSopenharmony_ci     * The UUID of the service to which the descriptor belongs
169461847f8eSopenharmony_ci     *
169561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
169661847f8eSopenharmony_ci     * @since 7
169761847f8eSopenharmony_ci     * @deprecated since 9
169861847f8eSopenharmony_ci     */
169961847f8eSopenharmony_ci    serviceUuid: string;
170061847f8eSopenharmony_ci  }
170161847f8eSopenharmony_ci
170261847f8eSopenharmony_ci  /**
170361847f8eSopenharmony_ci   * Describes the parameters of a response send by the server to a specified read or write request.
170461847f8eSopenharmony_ci   *
170561847f8eSopenharmony_ci   * @typedef ServerResponse
170661847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
170761847f8eSopenharmony_ci   * @since 7
170861847f8eSopenharmony_ci   * @deprecated since 9
170961847f8eSopenharmony_ci   * @useinstead ohos.bluetoothManager/bluetoothManager.ServerResponse
171061847f8eSopenharmony_ci   */
171161847f8eSopenharmony_ci  interface ServerResponse {
171261847f8eSopenharmony_ci    /**
171361847f8eSopenharmony_ci     * Indicates the address of the client to which to send the response
171461847f8eSopenharmony_ci     *
171561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
171661847f8eSopenharmony_ci     * @since 7
171761847f8eSopenharmony_ci     * @deprecated since 9
171861847f8eSopenharmony_ci     */
171961847f8eSopenharmony_ci    deviceId: string;
172061847f8eSopenharmony_ci    /**
172161847f8eSopenharmony_ci     * The Id of the write request
172261847f8eSopenharmony_ci     *
172361847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
172461847f8eSopenharmony_ci     * @since 7
172561847f8eSopenharmony_ci     * @deprecated since 9
172661847f8eSopenharmony_ci     */
172761847f8eSopenharmony_ci    transId: number;
172861847f8eSopenharmony_ci    /**
172961847f8eSopenharmony_ci     * Indicates the status of the read or write request, set this parameter to '0' in normal cases
173061847f8eSopenharmony_ci     *
173161847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
173261847f8eSopenharmony_ci     * @since 7
173361847f8eSopenharmony_ci     * @deprecated since 9
173461847f8eSopenharmony_ci     */
173561847f8eSopenharmony_ci    status: number;
173661847f8eSopenharmony_ci    /**
173761847f8eSopenharmony_ci     * Indicates the byte offset of the start position for reading or writing operation
173861847f8eSopenharmony_ci     *
173961847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
174061847f8eSopenharmony_ci     * @since 7
174161847f8eSopenharmony_ci     * @deprecated since 9
174261847f8eSopenharmony_ci     */
174361847f8eSopenharmony_ci    offset: number;
174461847f8eSopenharmony_ci    /**
174561847f8eSopenharmony_ci     * Indicates the value to be sent
174661847f8eSopenharmony_ci     *
174761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
174861847f8eSopenharmony_ci     * @since 7
174961847f8eSopenharmony_ci     * @deprecated since 9
175061847f8eSopenharmony_ci     */
175161847f8eSopenharmony_ci    value: ArrayBuffer;
175261847f8eSopenharmony_ci  }
175361847f8eSopenharmony_ci
175461847f8eSopenharmony_ci  /**
175561847f8eSopenharmony_ci   * Describes the Gatt profile connection state.
175661847f8eSopenharmony_ci   *
175761847f8eSopenharmony_ci   * @typedef BLEConnectChangedState
175861847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
175961847f8eSopenharmony_ci   * @since 7
176061847f8eSopenharmony_ci   * @deprecated since 9
176161847f8eSopenharmony_ci   * @useinstead ohos.bluetoothManager/bluetoothManager.BLEConnectChangedState
176261847f8eSopenharmony_ci   */
176361847f8eSopenharmony_ci  interface BLEConnectChangedState {
176461847f8eSopenharmony_ci    /**
176561847f8eSopenharmony_ci     * Indicates the peer device address
176661847f8eSopenharmony_ci     *
176761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
176861847f8eSopenharmony_ci     * @since 7
176961847f8eSopenharmony_ci     * @deprecated since 9
177061847f8eSopenharmony_ci     */
177161847f8eSopenharmony_ci    deviceId: string;
177261847f8eSopenharmony_ci    /**
177361847f8eSopenharmony_ci     * Connection state of the Gatt profile
177461847f8eSopenharmony_ci     *
177561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
177661847f8eSopenharmony_ci     * @since 7
177761847f8eSopenharmony_ci     * @deprecated since 9
177861847f8eSopenharmony_ci     */
177961847f8eSopenharmony_ci    state: ProfileConnectionState;
178061847f8eSopenharmony_ci  }
178161847f8eSopenharmony_ci
178261847f8eSopenharmony_ci  /**
178361847f8eSopenharmony_ci   * Describes the contents of the scan results.
178461847f8eSopenharmony_ci   *
178561847f8eSopenharmony_ci   * @typedef ScanResult
178661847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
178761847f8eSopenharmony_ci   * @since 7
178861847f8eSopenharmony_ci   * @deprecated since 9
178961847f8eSopenharmony_ci   * @useinstead ohos.bluetoothManager/bluetoothManager.ScanResult
179061847f8eSopenharmony_ci   */
179161847f8eSopenharmony_ci  interface ScanResult {
179261847f8eSopenharmony_ci    /**
179361847f8eSopenharmony_ci     * Address of the scanned device
179461847f8eSopenharmony_ci     *
179561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
179661847f8eSopenharmony_ci     * @since 7
179761847f8eSopenharmony_ci     * @deprecated since 9
179861847f8eSopenharmony_ci     */
179961847f8eSopenharmony_ci    deviceId: string;
180061847f8eSopenharmony_ci    /**
180161847f8eSopenharmony_ci     * RSSI of the remote device
180261847f8eSopenharmony_ci     *
180361847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
180461847f8eSopenharmony_ci     * @since 7
180561847f8eSopenharmony_ci     * @deprecated since 9
180661847f8eSopenharmony_ci     */
180761847f8eSopenharmony_ci    rssi: number;
180861847f8eSopenharmony_ci    /**
180961847f8eSopenharmony_ci     * The raw data of broadcast packet
181061847f8eSopenharmony_ci     *
181161847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
181261847f8eSopenharmony_ci     * @since 7
181361847f8eSopenharmony_ci     * @deprecated since 9
181461847f8eSopenharmony_ci     */
181561847f8eSopenharmony_ci    data: ArrayBuffer;
181661847f8eSopenharmony_ci  }
181761847f8eSopenharmony_ci
181861847f8eSopenharmony_ci  /**
181961847f8eSopenharmony_ci   * Describes the settings for BLE advertising.
182061847f8eSopenharmony_ci   *
182161847f8eSopenharmony_ci   * @typedef AdvertiseSetting
182261847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
182361847f8eSopenharmony_ci   * @since 7
182461847f8eSopenharmony_ci   * @deprecated since 9
182561847f8eSopenharmony_ci   * @useinstead ohos.bluetoothManager/bluetoothManager.AdvertiseSetting
182661847f8eSopenharmony_ci   */
182761847f8eSopenharmony_ci  interface AdvertiseSetting {
182861847f8eSopenharmony_ci    /**
182961847f8eSopenharmony_ci     * Minimum slot value for the advertising interval, which is {@code 32} (20 ms)
183061847f8eSopenharmony_ci     * Maximum slot value for the advertising interval, which is {@code 16777215} (10485.759375s)
183161847f8eSopenharmony_ci     * Default slot value for the advertising interval, which is {@code 1600} (1s)
183261847f8eSopenharmony_ci     *
183361847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
183461847f8eSopenharmony_ci     * @since 7
183561847f8eSopenharmony_ci     * @deprecated since 9
183661847f8eSopenharmony_ci     */
183761847f8eSopenharmony_ci    interval?: number;
183861847f8eSopenharmony_ci    /**
183961847f8eSopenharmony_ci     * Minimum transmission power level for advertising, which is {@code -127}
184061847f8eSopenharmony_ci     * Maximum transmission power level for advertising, which is {@code 1}
184161847f8eSopenharmony_ci     * Default transmission power level for advertising, which is {@code -7}
184261847f8eSopenharmony_ci     *
184361847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
184461847f8eSopenharmony_ci     * @since 7
184561847f8eSopenharmony_ci     * @deprecated since 9
184661847f8eSopenharmony_ci     */
184761847f8eSopenharmony_ci    txPower?: number;
184861847f8eSopenharmony_ci    /**
184961847f8eSopenharmony_ci     * Indicates whether the BLE is connectable, default is {@code true}
185061847f8eSopenharmony_ci     *
185161847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
185261847f8eSopenharmony_ci     * @since 7
185361847f8eSopenharmony_ci     * @deprecated since 9
185461847f8eSopenharmony_ci     */
185561847f8eSopenharmony_ci    connectable?: boolean;
185661847f8eSopenharmony_ci  }
185761847f8eSopenharmony_ci
185861847f8eSopenharmony_ci  /**
185961847f8eSopenharmony_ci   * Describes the advertising data.
186061847f8eSopenharmony_ci   *
186161847f8eSopenharmony_ci   * @typedef AdvertiseData
186261847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
186361847f8eSopenharmony_ci   * @since 7
186461847f8eSopenharmony_ci   * @deprecated since 9
186561847f8eSopenharmony_ci   * @useinstead ohos.bluetoothManager/bluetoothManager.AdvertiseData
186661847f8eSopenharmony_ci   */
186761847f8eSopenharmony_ci  interface AdvertiseData {
186861847f8eSopenharmony_ci    /**
186961847f8eSopenharmony_ci     * The specified service UUID list to this advertisement
187061847f8eSopenharmony_ci     *
187161847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
187261847f8eSopenharmony_ci     * @since 7
187361847f8eSopenharmony_ci     * @deprecated since 9
187461847f8eSopenharmony_ci     */
187561847f8eSopenharmony_ci    serviceUuids: Array<string>;
187661847f8eSopenharmony_ci    /**
187761847f8eSopenharmony_ci     * The specified manufacturer data list to this advertisement
187861847f8eSopenharmony_ci     *
187961847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
188061847f8eSopenharmony_ci     * @since 7
188161847f8eSopenharmony_ci     * @deprecated since 9
188261847f8eSopenharmony_ci     */
188361847f8eSopenharmony_ci    manufactureData: Array<ManufactureData>;
188461847f8eSopenharmony_ci    /**
188561847f8eSopenharmony_ci     * The specified service data list to this advertisement
188661847f8eSopenharmony_ci     *
188761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
188861847f8eSopenharmony_ci     * @since 7
188961847f8eSopenharmony_ci     * @deprecated since 9
189061847f8eSopenharmony_ci     */
189161847f8eSopenharmony_ci    serviceData: Array<ServiceData>;
189261847f8eSopenharmony_ci  }
189361847f8eSopenharmony_ci
189461847f8eSopenharmony_ci  /**
189561847f8eSopenharmony_ci   * Describes the manufacturer data.
189661847f8eSopenharmony_ci   *
189761847f8eSopenharmony_ci   * @typedef ManufactureData
189861847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
189961847f8eSopenharmony_ci   * @since 7
190061847f8eSopenharmony_ci   * @deprecated since 9
190161847f8eSopenharmony_ci   * @useinstead ohos.bluetoothManager/bluetoothManager.ManufactureData
190261847f8eSopenharmony_ci   */
190361847f8eSopenharmony_ci  interface ManufactureData {
190461847f8eSopenharmony_ci    /**
190561847f8eSopenharmony_ci     * Indicates the manufacturer ID assigned by Bluetooth SIG
190661847f8eSopenharmony_ci     *
190761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
190861847f8eSopenharmony_ci     * @since 7
190961847f8eSopenharmony_ci     * @deprecated since 9
191061847f8eSopenharmony_ci     */
191161847f8eSopenharmony_ci    manufactureId: number;
191261847f8eSopenharmony_ci    /**
191361847f8eSopenharmony_ci     * Indicates the manufacturer data to add
191461847f8eSopenharmony_ci     *
191561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
191661847f8eSopenharmony_ci     * @since 7
191761847f8eSopenharmony_ci     * @deprecated since 9
191861847f8eSopenharmony_ci     */
191961847f8eSopenharmony_ci    manufactureValue: ArrayBuffer;
192061847f8eSopenharmony_ci  }
192161847f8eSopenharmony_ci
192261847f8eSopenharmony_ci  /**
192361847f8eSopenharmony_ci   * Describes the service data.
192461847f8eSopenharmony_ci   *
192561847f8eSopenharmony_ci   * @typedef ServiceData
192661847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
192761847f8eSopenharmony_ci   * @since 7
192861847f8eSopenharmony_ci   * @deprecated since 9
192961847f8eSopenharmony_ci   * @useinstead ohos.bluetoothManager/bluetoothManager.ServiceData
193061847f8eSopenharmony_ci   */
193161847f8eSopenharmony_ci  interface ServiceData {
193261847f8eSopenharmony_ci    /**
193361847f8eSopenharmony_ci     * Indicates the UUID of the service data to add
193461847f8eSopenharmony_ci     *
193561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
193661847f8eSopenharmony_ci     * @since 7
193761847f8eSopenharmony_ci     * @deprecated since 9
193861847f8eSopenharmony_ci     */
193961847f8eSopenharmony_ci    serviceUuid: string;
194061847f8eSopenharmony_ci    /**
194161847f8eSopenharmony_ci     * Indicates the service data to add
194261847f8eSopenharmony_ci     *
194361847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
194461847f8eSopenharmony_ci     * @since 7
194561847f8eSopenharmony_ci     * @deprecated since 9
194661847f8eSopenharmony_ci     */
194761847f8eSopenharmony_ci    serviceValue: ArrayBuffer;
194861847f8eSopenharmony_ci  }
194961847f8eSopenharmony_ci
195061847f8eSopenharmony_ci  /**
195161847f8eSopenharmony_ci   * Describes the criteria for filtering scanning results can be set.
195261847f8eSopenharmony_ci   *
195361847f8eSopenharmony_ci   * @typedef ScanFilter
195461847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
195561847f8eSopenharmony_ci   * @since 7
195661847f8eSopenharmony_ci   * @deprecated since 9
195761847f8eSopenharmony_ci   * @useinstead ohos.bluetoothManager/bluetoothManager.ScanFilter
195861847f8eSopenharmony_ci   */
195961847f8eSopenharmony_ci  interface ScanFilter {
196061847f8eSopenharmony_ci    /**
196161847f8eSopenharmony_ci     * The address of a BLE peripheral device
196261847f8eSopenharmony_ci     *
196361847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
196461847f8eSopenharmony_ci     * @since 7
196561847f8eSopenharmony_ci     * @deprecated since 9
196661847f8eSopenharmony_ci     */
196761847f8eSopenharmony_ci    deviceId?: string;
196861847f8eSopenharmony_ci    /**
196961847f8eSopenharmony_ci     * The name of a BLE peripheral device
197061847f8eSopenharmony_ci     *
197161847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
197261847f8eSopenharmony_ci     * @since 7
197361847f8eSopenharmony_ci     * @deprecated since 9
197461847f8eSopenharmony_ci     */
197561847f8eSopenharmony_ci    name?: string;
197661847f8eSopenharmony_ci    /**
197761847f8eSopenharmony_ci     * The service UUID of a BLE peripheral device
197861847f8eSopenharmony_ci     *
197961847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
198061847f8eSopenharmony_ci     * @since 7
198161847f8eSopenharmony_ci     * @deprecated since 9
198261847f8eSopenharmony_ci     */
198361847f8eSopenharmony_ci    serviceUuid?: string;
198461847f8eSopenharmony_ci  }
198561847f8eSopenharmony_ci
198661847f8eSopenharmony_ci  /**
198761847f8eSopenharmony_ci   * Describes the parameters for scan.
198861847f8eSopenharmony_ci   *
198961847f8eSopenharmony_ci   * @typedef ScanOptions
199061847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
199161847f8eSopenharmony_ci   * @since 7
199261847f8eSopenharmony_ci   * @deprecated since 9
199361847f8eSopenharmony_ci   * @useinstead ohos.bluetoothManager/bluetoothManager.ScanOptions
199461847f8eSopenharmony_ci   */
199561847f8eSopenharmony_ci  interface ScanOptions {
199661847f8eSopenharmony_ci    /**
199761847f8eSopenharmony_ci     * Time of delay for reporting the scan result
199861847f8eSopenharmony_ci     *
199961847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
200061847f8eSopenharmony_ci     * @since 7
200161847f8eSopenharmony_ci     * @deprecated since 9
200261847f8eSopenharmony_ci     */
200361847f8eSopenharmony_ci    interval?: number;
200461847f8eSopenharmony_ci    /**
200561847f8eSopenharmony_ci     * Bluetooth LE scan mode
200661847f8eSopenharmony_ci     *
200761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
200861847f8eSopenharmony_ci     * @since 7
200961847f8eSopenharmony_ci     * @deprecated since 9
201061847f8eSopenharmony_ci     */
201161847f8eSopenharmony_ci    dutyMode?: ScanDuty;
201261847f8eSopenharmony_ci    /**
201361847f8eSopenharmony_ci     * Match mode for Bluetooth LE scan filters hardware match
201461847f8eSopenharmony_ci     *
201561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
201661847f8eSopenharmony_ci     * @since 7
201761847f8eSopenharmony_ci     * @deprecated since 9
201861847f8eSopenharmony_ci     */
201961847f8eSopenharmony_ci    matchMode?: MatchMode;
202061847f8eSopenharmony_ci  }
202161847f8eSopenharmony_ci
202261847f8eSopenharmony_ci  /**
202361847f8eSopenharmony_ci   * Describes the spp parameters.
202461847f8eSopenharmony_ci   *
202561847f8eSopenharmony_ci   * @typedef SppOption
202661847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
202761847f8eSopenharmony_ci   * @since 8
202861847f8eSopenharmony_ci   * @deprecated since 9
202961847f8eSopenharmony_ci   * @useinstead ohos.bluetoothManager/bluetoothManager.SppOption
203061847f8eSopenharmony_ci   */
203161847f8eSopenharmony_ci  interface SppOption {
203261847f8eSopenharmony_ci    /**
203361847f8eSopenharmony_ci     * Indicates the UUID in the SDP record.
203461847f8eSopenharmony_ci     *
203561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
203661847f8eSopenharmony_ci     * @since 8
203761847f8eSopenharmony_ci     * @deprecated since 9
203861847f8eSopenharmony_ci     */
203961847f8eSopenharmony_ci    uuid: string;
204061847f8eSopenharmony_ci    /**
204161847f8eSopenharmony_ci     * Indicates secure channel or not
204261847f8eSopenharmony_ci     *
204361847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
204461847f8eSopenharmony_ci     * @since 8
204561847f8eSopenharmony_ci     * @deprecated since 9
204661847f8eSopenharmony_ci     */
204761847f8eSopenharmony_ci    secure: boolean;
204861847f8eSopenharmony_ci    /**
204961847f8eSopenharmony_ci     * Spp link type {@link SppType}
205061847f8eSopenharmony_ci     *
205161847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
205261847f8eSopenharmony_ci     * @since 8
205361847f8eSopenharmony_ci     * @deprecated since 9
205461847f8eSopenharmony_ci     */
205561847f8eSopenharmony_ci    type: SppType;
205661847f8eSopenharmony_ci  }
205761847f8eSopenharmony_ci
205861847f8eSopenharmony_ci  /**
205961847f8eSopenharmony_ci   * Describes the bond key param.
206061847f8eSopenharmony_ci   *
206161847f8eSopenharmony_ci   * @typedef PinRequiredParam
206261847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
206361847f8eSopenharmony_ci   * @since 8
206461847f8eSopenharmony_ci   * @deprecated since 9
206561847f8eSopenharmony_ci   * @useinstead ohos.bluetoothManager/bluetoothManager.PinRequiredParam
206661847f8eSopenharmony_ci   */
206761847f8eSopenharmony_ci  interface PinRequiredParam {
206861847f8eSopenharmony_ci    /**
206961847f8eSopenharmony_ci     * ID of the device to pair.
207061847f8eSopenharmony_ci     *
207161847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
207261847f8eSopenharmony_ci     * @since 8
207361847f8eSopenharmony_ci     * @deprecated since 9
207461847f8eSopenharmony_ci     */
207561847f8eSopenharmony_ci    deviceId: string;
207661847f8eSopenharmony_ci    /**
207761847f8eSopenharmony_ci     * Key for the device pairing.
207861847f8eSopenharmony_ci     *
207961847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
208061847f8eSopenharmony_ci     * @since 8
208161847f8eSopenharmony_ci     * @deprecated since 9
208261847f8eSopenharmony_ci     */
208361847f8eSopenharmony_ci    pinCode: string;
208461847f8eSopenharmony_ci  }
208561847f8eSopenharmony_ci
208661847f8eSopenharmony_ci  /**
208761847f8eSopenharmony_ci   * Describes the class of a bluetooth device.
208861847f8eSopenharmony_ci   *
208961847f8eSopenharmony_ci   * @typedef DeviceClass
209061847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
209161847f8eSopenharmony_ci   * @since 8
209261847f8eSopenharmony_ci   * @deprecated since 9
209361847f8eSopenharmony_ci   * @useinstead ohos.bluetoothManager/bluetoothManager.DeviceClass
209461847f8eSopenharmony_ci   */
209561847f8eSopenharmony_ci  interface DeviceClass {
209661847f8eSopenharmony_ci    /**
209761847f8eSopenharmony_ci     * Major classes of Bluetooth devices.
209861847f8eSopenharmony_ci     *
209961847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
210061847f8eSopenharmony_ci     * @since 8
210161847f8eSopenharmony_ci     * @deprecated since 9
210261847f8eSopenharmony_ci     */
210361847f8eSopenharmony_ci    majorClass: MajorClass;
210461847f8eSopenharmony_ci    /**
210561847f8eSopenharmony_ci     * Major and minor classes of Bluetooth devices.
210661847f8eSopenharmony_ci     *
210761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
210861847f8eSopenharmony_ci     * @since 8
210961847f8eSopenharmony_ci     * @deprecated since 9
211061847f8eSopenharmony_ci     */
211161847f8eSopenharmony_ci    majorMinorClass: MajorMinorClass;
211261847f8eSopenharmony_ci    /**
211361847f8eSopenharmony_ci     * Class of the device.
211461847f8eSopenharmony_ci     *
211561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
211661847f8eSopenharmony_ci     * @since 8
211761847f8eSopenharmony_ci     * @deprecated since 9
211861847f8eSopenharmony_ci     */
211961847f8eSopenharmony_ci    classOfDevice: number;
212061847f8eSopenharmony_ci  }
212161847f8eSopenharmony_ci
212261847f8eSopenharmony_ci  /**
212361847f8eSopenharmony_ci   * Describes the class of a bluetooth device.
212461847f8eSopenharmony_ci   *
212561847f8eSopenharmony_ci   * @typedef BondStateParam
212661847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
212761847f8eSopenharmony_ci   * @since 8
212861847f8eSopenharmony_ci   * @deprecated since 9
212961847f8eSopenharmony_ci   * @useinstead ohos.bluetoothManager/bluetoothManager.BondStateParam
213061847f8eSopenharmony_ci   */
213161847f8eSopenharmony_ci  interface BondStateParam {
213261847f8eSopenharmony_ci    /**
213361847f8eSopenharmony_ci     * Address of a Bluetooth device.
213461847f8eSopenharmony_ci     *
213561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
213661847f8eSopenharmony_ci     * @since 8
213761847f8eSopenharmony_ci     * @deprecated since 9
213861847f8eSopenharmony_ci     */
213961847f8eSopenharmony_ci    deviceId: string;
214061847f8eSopenharmony_ci    /**
214161847f8eSopenharmony_ci     * Profile connection state of the device.
214261847f8eSopenharmony_ci     *
214361847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
214461847f8eSopenharmony_ci     * @since 8
214561847f8eSopenharmony_ci     * @deprecated since 9
214661847f8eSopenharmony_ci     */
214761847f8eSopenharmony_ci    state: BondState;
214861847f8eSopenharmony_ci  }
214961847f8eSopenharmony_ci
215061847f8eSopenharmony_ci  /**
215161847f8eSopenharmony_ci   * The enum of scan duty.
215261847f8eSopenharmony_ci   *
215361847f8eSopenharmony_ci   * @enum { number }
215461847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
215561847f8eSopenharmony_ci   * @since 7
215661847f8eSopenharmony_ci   * @deprecated since 9
215761847f8eSopenharmony_ci   * @useinstead ohos.bluetoothManager/bluetoothManager.ScanDuty
215861847f8eSopenharmony_ci   */
215961847f8eSopenharmony_ci  enum ScanDuty {
216061847f8eSopenharmony_ci    /**
216161847f8eSopenharmony_ci     * low power mode
216261847f8eSopenharmony_ci     *
216361847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
216461847f8eSopenharmony_ci     * @since 7
216561847f8eSopenharmony_ci     * @deprecated since 9
216661847f8eSopenharmony_ci     */
216761847f8eSopenharmony_ci    SCAN_MODE_LOW_POWER = 0,
216861847f8eSopenharmony_ci    /**
216961847f8eSopenharmony_ci     * balanced power mode
217061847f8eSopenharmony_ci     *
217161847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
217261847f8eSopenharmony_ci     * @since 7
217361847f8eSopenharmony_ci     * @deprecated since 9
217461847f8eSopenharmony_ci     */
217561847f8eSopenharmony_ci    SCAN_MODE_BALANCED = 1,
217661847f8eSopenharmony_ci    /**
217761847f8eSopenharmony_ci     * Scan using highest duty cycle
217861847f8eSopenharmony_ci     *
217961847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
218061847f8eSopenharmony_ci     * @since 7
218161847f8eSopenharmony_ci     * @deprecated since 9
218261847f8eSopenharmony_ci     */
218361847f8eSopenharmony_ci    SCAN_MODE_LOW_LATENCY = 2
218461847f8eSopenharmony_ci  }
218561847f8eSopenharmony_ci
218661847f8eSopenharmony_ci  /**
218761847f8eSopenharmony_ci   * The enum of BLE match mode.
218861847f8eSopenharmony_ci   *
218961847f8eSopenharmony_ci   * @enum { number }
219061847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
219161847f8eSopenharmony_ci   * @since 7
219261847f8eSopenharmony_ci   * @deprecated since 9
219361847f8eSopenharmony_ci   * @useinstead ohos.bluetoothManager/bluetoothManager.MatchMode
219461847f8eSopenharmony_ci   */
219561847f8eSopenharmony_ci  enum MatchMode {
219661847f8eSopenharmony_ci    /**
219761847f8eSopenharmony_ci     * aggressive mode
219861847f8eSopenharmony_ci     *
219961847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
220061847f8eSopenharmony_ci     * @since 7
220161847f8eSopenharmony_ci     * @deprecated since 9
220261847f8eSopenharmony_ci     */
220361847f8eSopenharmony_ci    MATCH_MODE_AGGRESSIVE = 1,
220461847f8eSopenharmony_ci    /**
220561847f8eSopenharmony_ci     * sticky mode
220661847f8eSopenharmony_ci     *
220761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
220861847f8eSopenharmony_ci     * @since 7
220961847f8eSopenharmony_ci     * @deprecated since 9
221061847f8eSopenharmony_ci     */
221161847f8eSopenharmony_ci    MATCH_MODE_STICKY = 2
221261847f8eSopenharmony_ci  }
221361847f8eSopenharmony_ci
221461847f8eSopenharmony_ci  /**
221561847f8eSopenharmony_ci   * The enum of profile connection state.
221661847f8eSopenharmony_ci   *
221761847f8eSopenharmony_ci   * @enum { number }
221861847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
221961847f8eSopenharmony_ci   * @since 7
222061847f8eSopenharmony_ci   * @deprecated since 9
222161847f8eSopenharmony_ci   * @useinstead ohos.bluetoothManager/bluetoothManager.ProfileConnectionState
222261847f8eSopenharmony_ci   */
222361847f8eSopenharmony_ci  enum ProfileConnectionState {
222461847f8eSopenharmony_ci    /**
222561847f8eSopenharmony_ci     * the current profile is disconnected
222661847f8eSopenharmony_ci     *
222761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
222861847f8eSopenharmony_ci     * @since 7
222961847f8eSopenharmony_ci     * @deprecated since 9
223061847f8eSopenharmony_ci     */
223161847f8eSopenharmony_ci    STATE_DISCONNECTED = 0,
223261847f8eSopenharmony_ci    /**
223361847f8eSopenharmony_ci     * the current profile is being connected
223461847f8eSopenharmony_ci     *
223561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
223661847f8eSopenharmony_ci     * @since 7
223761847f8eSopenharmony_ci     * @deprecated since 9
223861847f8eSopenharmony_ci     */
223961847f8eSopenharmony_ci    STATE_CONNECTING = 1,
224061847f8eSopenharmony_ci    /**
224161847f8eSopenharmony_ci     * the current profile is connected
224261847f8eSopenharmony_ci     *
224361847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
224461847f8eSopenharmony_ci     * @since 7
224561847f8eSopenharmony_ci     * @deprecated since 9
224661847f8eSopenharmony_ci     */
224761847f8eSopenharmony_ci    STATE_CONNECTED = 2,
224861847f8eSopenharmony_ci    /**
224961847f8eSopenharmony_ci     * the current profile is being disconnected
225061847f8eSopenharmony_ci     *
225161847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
225261847f8eSopenharmony_ci     * @since 7
225361847f8eSopenharmony_ci     * @deprecated since 9
225461847f8eSopenharmony_ci     */
225561847f8eSopenharmony_ci    STATE_DISCONNECTING = 3
225661847f8eSopenharmony_ci  }
225761847f8eSopenharmony_ci
225861847f8eSopenharmony_ci  /**
225961847f8eSopenharmony_ci   * The enum of bluetooth state.
226061847f8eSopenharmony_ci   *
226161847f8eSopenharmony_ci   * @enum { number }
226261847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
226361847f8eSopenharmony_ci   * @since 7
226461847f8eSopenharmony_ci   * @deprecated since 9
226561847f8eSopenharmony_ci   * @useinstead ohos.bluetoothManager/bluetoothManager.BluetoothState
226661847f8eSopenharmony_ci   */
226761847f8eSopenharmony_ci  enum BluetoothState {
226861847f8eSopenharmony_ci    /**
226961847f8eSopenharmony_ci     * Indicates the local Bluetooth is off
227061847f8eSopenharmony_ci     *
227161847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
227261847f8eSopenharmony_ci     * @since 7
227361847f8eSopenharmony_ci     * @deprecated since 9
227461847f8eSopenharmony_ci     */
227561847f8eSopenharmony_ci    STATE_OFF = 0,
227661847f8eSopenharmony_ci    /**
227761847f8eSopenharmony_ci     * Indicates the local Bluetooth is turning on
227861847f8eSopenharmony_ci     *
227961847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
228061847f8eSopenharmony_ci     * @since 7
228161847f8eSopenharmony_ci     * @deprecated since 9
228261847f8eSopenharmony_ci     */
228361847f8eSopenharmony_ci    STATE_TURNING_ON = 1,
228461847f8eSopenharmony_ci    /**
228561847f8eSopenharmony_ci     * Indicates the local Bluetooth is on, and ready for use
228661847f8eSopenharmony_ci     *
228761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
228861847f8eSopenharmony_ci     * @since 7
228961847f8eSopenharmony_ci     * @deprecated since 9
229061847f8eSopenharmony_ci     */
229161847f8eSopenharmony_ci    STATE_ON = 2,
229261847f8eSopenharmony_ci    /**
229361847f8eSopenharmony_ci     * Indicates the local Bluetooth is turning off
229461847f8eSopenharmony_ci     *
229561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
229661847f8eSopenharmony_ci     * @since 7
229761847f8eSopenharmony_ci     * @deprecated since 9
229861847f8eSopenharmony_ci     */
229961847f8eSopenharmony_ci    STATE_TURNING_OFF = 3,
230061847f8eSopenharmony_ci    /**
230161847f8eSopenharmony_ci     * Indicates the local Bluetooth is turning LE mode on
230261847f8eSopenharmony_ci     *
230361847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
230461847f8eSopenharmony_ci     * @since 7
230561847f8eSopenharmony_ci     * @deprecated since 9
230661847f8eSopenharmony_ci     */
230761847f8eSopenharmony_ci    STATE_BLE_TURNING_ON = 4,
230861847f8eSopenharmony_ci    /**
230961847f8eSopenharmony_ci     * Indicates the local Bluetooth is in LE only mode
231061847f8eSopenharmony_ci     *
231161847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
231261847f8eSopenharmony_ci     * @since 7
231361847f8eSopenharmony_ci     * @deprecated since 9
231461847f8eSopenharmony_ci     */
231561847f8eSopenharmony_ci    STATE_BLE_ON = 5,
231661847f8eSopenharmony_ci    /**
231761847f8eSopenharmony_ci     * Indicates the local Bluetooth is turning off LE only mode
231861847f8eSopenharmony_ci     *
231961847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
232061847f8eSopenharmony_ci     * @since 7
232161847f8eSopenharmony_ci     * @deprecated since 9
232261847f8eSopenharmony_ci     */
232361847f8eSopenharmony_ci    STATE_BLE_TURNING_OFF = 6
232461847f8eSopenharmony_ci  }
232561847f8eSopenharmony_ci
232661847f8eSopenharmony_ci  /**
232761847f8eSopenharmony_ci   * The enum of SPP type.
232861847f8eSopenharmony_ci   *
232961847f8eSopenharmony_ci   * @enum { number }
233061847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
233161847f8eSopenharmony_ci   * @since 8
233261847f8eSopenharmony_ci   * @deprecated since 9
233361847f8eSopenharmony_ci   * @useinstead ohos.bluetoothManager/bluetoothManager.SppType
233461847f8eSopenharmony_ci   */
233561847f8eSopenharmony_ci  enum SppType {
233661847f8eSopenharmony_ci    /**
233761847f8eSopenharmony_ci     * RFCOMM
233861847f8eSopenharmony_ci     *
233961847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
234061847f8eSopenharmony_ci     * @since 8
234161847f8eSopenharmony_ci     * @deprecated since 9
234261847f8eSopenharmony_ci     */
234361847f8eSopenharmony_ci    SPP_RFCOMM
234461847f8eSopenharmony_ci  }
234561847f8eSopenharmony_ci
234661847f8eSopenharmony_ci  /**
234761847f8eSopenharmony_ci   * The enum of BR scan mode.
234861847f8eSopenharmony_ci   *
234961847f8eSopenharmony_ci   * @enum { number }
235061847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
235161847f8eSopenharmony_ci   * @since 8
235261847f8eSopenharmony_ci   * @deprecated since 9
235361847f8eSopenharmony_ci   * @useinstead ohos.bluetoothManager/bluetoothManager.ScanMode
235461847f8eSopenharmony_ci   */
235561847f8eSopenharmony_ci  enum ScanMode {
235661847f8eSopenharmony_ci    /**
235761847f8eSopenharmony_ci     * Indicates the scan mode is none
235861847f8eSopenharmony_ci     *
235961847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
236061847f8eSopenharmony_ci     * @since 8
236161847f8eSopenharmony_ci     * @deprecated since 9
236261847f8eSopenharmony_ci     */
236361847f8eSopenharmony_ci    SCAN_MODE_NONE = 0,
236461847f8eSopenharmony_ci    /**
236561847f8eSopenharmony_ci     * Indicates the scan mode is connectable
236661847f8eSopenharmony_ci     *
236761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
236861847f8eSopenharmony_ci     * @since 8
236961847f8eSopenharmony_ci     * @deprecated since 9
237061847f8eSopenharmony_ci     */
237161847f8eSopenharmony_ci    SCAN_MODE_CONNECTABLE = 1,
237261847f8eSopenharmony_ci    /**
237361847f8eSopenharmony_ci     * Indicates the scan mode is general discoverable
237461847f8eSopenharmony_ci     *
237561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
237661847f8eSopenharmony_ci     * @since 8
237761847f8eSopenharmony_ci     * @deprecated since 9
237861847f8eSopenharmony_ci     */
237961847f8eSopenharmony_ci    SCAN_MODE_GENERAL_DISCOVERABLE = 2,
238061847f8eSopenharmony_ci    /**
238161847f8eSopenharmony_ci     * Indicates the scan mode is limited discoverable
238261847f8eSopenharmony_ci     *
238361847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
238461847f8eSopenharmony_ci     * @since 8
238561847f8eSopenharmony_ci     * @deprecated since 9
238661847f8eSopenharmony_ci     */
238761847f8eSopenharmony_ci    SCAN_MODE_LIMITED_DISCOVERABLE = 3,
238861847f8eSopenharmony_ci    /**
238961847f8eSopenharmony_ci     * Indicates the scan mode is connectable and general discoverable
239061847f8eSopenharmony_ci     *
239161847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
239261847f8eSopenharmony_ci     * @since 8
239361847f8eSopenharmony_ci     * @deprecated since 9
239461847f8eSopenharmony_ci     */
239561847f8eSopenharmony_ci    SCAN_MODE_CONNECTABLE_GENERAL_DISCOVERABLE = 4,
239661847f8eSopenharmony_ci    /**
239761847f8eSopenharmony_ci     * Indicates the scan mode is connectable and limited discoverable
239861847f8eSopenharmony_ci     *
239961847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
240061847f8eSopenharmony_ci     * @since 8
240161847f8eSopenharmony_ci     * @deprecated since 9
240261847f8eSopenharmony_ci     */
240361847f8eSopenharmony_ci    SCAN_MODE_CONNECTABLE_LIMITED_DISCOVERABLE = 5
240461847f8eSopenharmony_ci  }
240561847f8eSopenharmony_ci
240661847f8eSopenharmony_ci  /**
240761847f8eSopenharmony_ci   * The enum of bond state.
240861847f8eSopenharmony_ci   *
240961847f8eSopenharmony_ci   * @enum { number }
241061847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
241161847f8eSopenharmony_ci   * @since 8
241261847f8eSopenharmony_ci   * @deprecated since 9
241361847f8eSopenharmony_ci   * @useinstead ohos.bluetoothManager/bluetoothManager.BondState
241461847f8eSopenharmony_ci   */
241561847f8eSopenharmony_ci  enum BondState {
241661847f8eSopenharmony_ci    /**
241761847f8eSopenharmony_ci     * Indicate the bond state is invalid
241861847f8eSopenharmony_ci     *
241961847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
242061847f8eSopenharmony_ci     * @since 8
242161847f8eSopenharmony_ci     * @deprecated since 9
242261847f8eSopenharmony_ci     */
242361847f8eSopenharmony_ci    BOND_STATE_INVALID = 0,
242461847f8eSopenharmony_ci    /**
242561847f8eSopenharmony_ci     * Indicate the bond state is bonding
242661847f8eSopenharmony_ci     *
242761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
242861847f8eSopenharmony_ci     * @since 8
242961847f8eSopenharmony_ci     * @deprecated since 9
243061847f8eSopenharmony_ci     */
243161847f8eSopenharmony_ci    BOND_STATE_BONDING = 1,
243261847f8eSopenharmony_ci    /**
243361847f8eSopenharmony_ci     * Indicate the bond state is bonded
243461847f8eSopenharmony_ci     *
243561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
243661847f8eSopenharmony_ci     * @since 8
243761847f8eSopenharmony_ci     * @deprecated since 9
243861847f8eSopenharmony_ci     */
243961847f8eSopenharmony_ci    BOND_STATE_BONDED = 2
244061847f8eSopenharmony_ci  }
244161847f8eSopenharmony_ci
244261847f8eSopenharmony_ci  /**
244361847f8eSopenharmony_ci   * The enum of major class of a bluetooth device.
244461847f8eSopenharmony_ci   *
244561847f8eSopenharmony_ci   * @enum { number }
244661847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
244761847f8eSopenharmony_ci   * @since 8
244861847f8eSopenharmony_ci   * @deprecated since 9
244961847f8eSopenharmony_ci   * @useinstead ohos.bluetoothManager/bluetoothManager.MajorClass
245061847f8eSopenharmony_ci   */
245161847f8eSopenharmony_ci  enum MajorClass {
245261847f8eSopenharmony_ci    /**
245361847f8eSopenharmony_ci     * Miscellaneous device.
245461847f8eSopenharmony_ci     *
245561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
245661847f8eSopenharmony_ci     * @since 8
245761847f8eSopenharmony_ci     * @deprecated since 9
245861847f8eSopenharmony_ci     */
245961847f8eSopenharmony_ci    MAJOR_MISC = 0x0000,
246061847f8eSopenharmony_ci    /**
246161847f8eSopenharmony_ci     * Computer.
246261847f8eSopenharmony_ci     *
246361847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
246461847f8eSopenharmony_ci     * @since 8
246561847f8eSopenharmony_ci     * @deprecated since 9
246661847f8eSopenharmony_ci     */
246761847f8eSopenharmony_ci    MAJOR_COMPUTER = 0x0100,
246861847f8eSopenharmony_ci    /**
246961847f8eSopenharmony_ci     * Mobile phone.
247061847f8eSopenharmony_ci     *
247161847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
247261847f8eSopenharmony_ci     * @since 8
247361847f8eSopenharmony_ci     * @deprecated since 9
247461847f8eSopenharmony_ci     */
247561847f8eSopenharmony_ci    MAJOR_PHONE = 0x0200,
247661847f8eSopenharmony_ci    /**
247761847f8eSopenharmony_ci     * Network device.
247861847f8eSopenharmony_ci     *
247961847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
248061847f8eSopenharmony_ci     * @since 8
248161847f8eSopenharmony_ci     * @deprecated since 9
248261847f8eSopenharmony_ci     */
248361847f8eSopenharmony_ci    MAJOR_NETWORKING = 0x0300,
248461847f8eSopenharmony_ci    /**
248561847f8eSopenharmony_ci     * Audio or video device.
248661847f8eSopenharmony_ci     *
248761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
248861847f8eSopenharmony_ci     * @since 8
248961847f8eSopenharmony_ci     * @deprecated since 9
249061847f8eSopenharmony_ci     */
249161847f8eSopenharmony_ci    MAJOR_AUDIO_VIDEO = 0x0400,
249261847f8eSopenharmony_ci    /**
249361847f8eSopenharmony_ci     * Peripheral device.
249461847f8eSopenharmony_ci     *
249561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
249661847f8eSopenharmony_ci     * @since 8
249761847f8eSopenharmony_ci     * @deprecated since 9
249861847f8eSopenharmony_ci     */
249961847f8eSopenharmony_ci    MAJOR_PERIPHERAL = 0x0500,
250061847f8eSopenharmony_ci    /**
250161847f8eSopenharmony_ci     * Imaging device.
250261847f8eSopenharmony_ci     *
250361847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
250461847f8eSopenharmony_ci     * @since 8
250561847f8eSopenharmony_ci     * @deprecated since 9
250661847f8eSopenharmony_ci     */
250761847f8eSopenharmony_ci    MAJOR_IMAGING = 0x0600,
250861847f8eSopenharmony_ci    /**
250961847f8eSopenharmony_ci     * Wearable device.
251061847f8eSopenharmony_ci     *
251161847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
251261847f8eSopenharmony_ci     * @since 8
251361847f8eSopenharmony_ci     * @deprecated since 9
251461847f8eSopenharmony_ci     */
251561847f8eSopenharmony_ci    MAJOR_WEARABLE = 0x0700,
251661847f8eSopenharmony_ci    /**
251761847f8eSopenharmony_ci     * Toy.
251861847f8eSopenharmony_ci     *
251961847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
252061847f8eSopenharmony_ci     * @since 8
252161847f8eSopenharmony_ci     * @deprecated since 9
252261847f8eSopenharmony_ci     */
252361847f8eSopenharmony_ci    MAJOR_TOY = 0x0800,
252461847f8eSopenharmony_ci    /**
252561847f8eSopenharmony_ci     * Health device.
252661847f8eSopenharmony_ci     *
252761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
252861847f8eSopenharmony_ci     * @since 8
252961847f8eSopenharmony_ci     * @deprecated since 9
253061847f8eSopenharmony_ci     */
253161847f8eSopenharmony_ci    MAJOR_HEALTH = 0x0900,
253261847f8eSopenharmony_ci    /**
253361847f8eSopenharmony_ci     * Unclassified device.
253461847f8eSopenharmony_ci     *
253561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
253661847f8eSopenharmony_ci     * @since 8
253761847f8eSopenharmony_ci     * @deprecated since 9
253861847f8eSopenharmony_ci     */
253961847f8eSopenharmony_ci    MAJOR_UNCATEGORIZED = 0x1F00
254061847f8eSopenharmony_ci  }
254161847f8eSopenharmony_ci
254261847f8eSopenharmony_ci  /**
254361847f8eSopenharmony_ci   * The enum of major minor class of a bluetooth device.
254461847f8eSopenharmony_ci   *
254561847f8eSopenharmony_ci   * @enum { number }
254661847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
254761847f8eSopenharmony_ci   * @since 8
254861847f8eSopenharmony_ci   * @deprecated since 9
254961847f8eSopenharmony_ci   * @useinstead ohos.bluetoothManager/bluetoothManager.MajorMinorClass
255061847f8eSopenharmony_ci   */
255161847f8eSopenharmony_ci  enum MajorMinorClass {
255261847f8eSopenharmony_ci    /**
255361847f8eSopenharmony_ci     * The Minor Device Class field
255461847f8eSopenharmony_ci     * Computer Major Class
255561847f8eSopenharmony_ci     *
255661847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
255761847f8eSopenharmony_ci     * @since 8
255861847f8eSopenharmony_ci     * @deprecated since 9
255961847f8eSopenharmony_ci     */
256061847f8eSopenharmony_ci    COMPUTER_UNCATEGORIZED = 0x0100,
256161847f8eSopenharmony_ci    /**
256261847f8eSopenharmony_ci     * Desktop computer.
256361847f8eSopenharmony_ci     *
256461847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
256561847f8eSopenharmony_ci     * @since 8
256661847f8eSopenharmony_ci     * @deprecated since 9
256761847f8eSopenharmony_ci     */
256861847f8eSopenharmony_ci    COMPUTER_DESKTOP = 0x0104,
256961847f8eSopenharmony_ci    /**
257061847f8eSopenharmony_ci     * Server.
257161847f8eSopenharmony_ci     *
257261847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
257361847f8eSopenharmony_ci     * @since 8
257461847f8eSopenharmony_ci     * @deprecated since 9
257561847f8eSopenharmony_ci     */
257661847f8eSopenharmony_ci    COMPUTER_SERVER = 0x0108,
257761847f8eSopenharmony_ci    /**
257861847f8eSopenharmony_ci     * Laptop.
257961847f8eSopenharmony_ci     *
258061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
258161847f8eSopenharmony_ci     * @since 8
258261847f8eSopenharmony_ci     * @deprecated since 9
258361847f8eSopenharmony_ci     */
258461847f8eSopenharmony_ci    COMPUTER_LAPTOP = 0x010C,
258561847f8eSopenharmony_ci    /**
258661847f8eSopenharmony_ci     * Hand-held computer.
258761847f8eSopenharmony_ci     *
258861847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
258961847f8eSopenharmony_ci     * @since 8
259061847f8eSopenharmony_ci     * @deprecated since 9
259161847f8eSopenharmony_ci     */
259261847f8eSopenharmony_ci    COMPUTER_HANDHELD_PC_PDA = 0x0110,
259361847f8eSopenharmony_ci    /**
259461847f8eSopenharmony_ci     * Palmtop computer.
259561847f8eSopenharmony_ci     *
259661847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
259761847f8eSopenharmony_ci     * @since 8
259861847f8eSopenharmony_ci     * @deprecated since 9
259961847f8eSopenharmony_ci     */
260061847f8eSopenharmony_ci    COMPUTER_PALM_SIZE_PC_PDA = 0x0114,
260161847f8eSopenharmony_ci    /**
260261847f8eSopenharmony_ci     * Wearable computer.
260361847f8eSopenharmony_ci     *
260461847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
260561847f8eSopenharmony_ci     * @since 8
260661847f8eSopenharmony_ci     * @deprecated since 9
260761847f8eSopenharmony_ci     */
260861847f8eSopenharmony_ci    COMPUTER_WEARABLE = 0x0118,
260961847f8eSopenharmony_ci    /**
261061847f8eSopenharmony_ci     * Tablet.
261161847f8eSopenharmony_ci     *
261261847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
261361847f8eSopenharmony_ci     * @since 8
261461847f8eSopenharmony_ci     * @deprecated since 9
261561847f8eSopenharmony_ci     */
261661847f8eSopenharmony_ci    COMPUTER_TABLET = 0x011C,
261761847f8eSopenharmony_ci
261861847f8eSopenharmony_ci    /**
261961847f8eSopenharmony_ci     * Phone Major Class
262061847f8eSopenharmony_ci     *
262161847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
262261847f8eSopenharmony_ci     * @since 8
262361847f8eSopenharmony_ci     * @deprecated since 9
262461847f8eSopenharmony_ci     */
262561847f8eSopenharmony_ci    PHONE_UNCATEGORIZED = 0x0200,
262661847f8eSopenharmony_ci    /**
262761847f8eSopenharmony_ci     * Portable phone.
262861847f8eSopenharmony_ci     *
262961847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
263061847f8eSopenharmony_ci     * @since 8
263161847f8eSopenharmony_ci     * @deprecated since 9
263261847f8eSopenharmony_ci     */
263361847f8eSopenharmony_ci    PHONE_CELLULAR = 0x0204,
263461847f8eSopenharmony_ci    /**
263561847f8eSopenharmony_ci     * Cordless phone.
263661847f8eSopenharmony_ci     *
263761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
263861847f8eSopenharmony_ci     * @since 8
263961847f8eSopenharmony_ci     * @deprecated since 9
264061847f8eSopenharmony_ci     */
264161847f8eSopenharmony_ci    PHONE_CORDLESS = 0x0208,
264261847f8eSopenharmony_ci    /**
264361847f8eSopenharmony_ci     * Smartphone.
264461847f8eSopenharmony_ci     *
264561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
264661847f8eSopenharmony_ci     * @since 8
264761847f8eSopenharmony_ci     * @deprecated since 9
264861847f8eSopenharmony_ci     */
264961847f8eSopenharmony_ci    PHONE_SMART = 0x020C,
265061847f8eSopenharmony_ci    /**
265161847f8eSopenharmony_ci     * Modem or gateway phone.
265261847f8eSopenharmony_ci     *
265361847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
265461847f8eSopenharmony_ci     * @since 8
265561847f8eSopenharmony_ci     * @deprecated since 9
265661847f8eSopenharmony_ci     */
265761847f8eSopenharmony_ci    PHONE_MODEM_OR_GATEWAY = 0x0210,
265861847f8eSopenharmony_ci    /**
265961847f8eSopenharmony_ci     * ISDN phone.
266061847f8eSopenharmony_ci     *
266161847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
266261847f8eSopenharmony_ci     * @since 8
266361847f8eSopenharmony_ci     * @deprecated since 9
266461847f8eSopenharmony_ci     */
266561847f8eSopenharmony_ci    PHONE_ISDN = 0x0214,
266661847f8eSopenharmony_ci
266761847f8eSopenharmony_ci    /**
266861847f8eSopenharmony_ci     * LAN/Network Access Point Major Class
266961847f8eSopenharmony_ci     *
267061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
267161847f8eSopenharmony_ci     * @since 8
267261847f8eSopenharmony_ci     * @deprecated since 9
267361847f8eSopenharmony_ci     */
267461847f8eSopenharmony_ci    NETWORK_FULLY_AVAILABLE = 0x0300,
267561847f8eSopenharmony_ci    /**
267661847f8eSopenharmony_ci     * Device used on network 1 to 17.
267761847f8eSopenharmony_ci     *
267861847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
267961847f8eSopenharmony_ci     * @since 8
268061847f8eSopenharmony_ci     * @deprecated since 9
268161847f8eSopenharmony_ci     */
268261847f8eSopenharmony_ci    NETWORK_1_TO_17_UTILIZED = 0x0320,
268361847f8eSopenharmony_ci    /**
268461847f8eSopenharmony_ci     * Device used on network 17 to 33.
268561847f8eSopenharmony_ci     *
268661847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
268761847f8eSopenharmony_ci     * @since 8
268861847f8eSopenharmony_ci     * @deprecated since 9
268961847f8eSopenharmony_ci     */
269061847f8eSopenharmony_ci    NETWORK_17_TO_33_UTILIZED = 0x0340,
269161847f8eSopenharmony_ci    /**
269261847f8eSopenharmony_ci     * Device used on network 33 to 50.
269361847f8eSopenharmony_ci     *
269461847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
269561847f8eSopenharmony_ci     * @since 8
269661847f8eSopenharmony_ci     * @deprecated since 9
269761847f8eSopenharmony_ci     */
269861847f8eSopenharmony_ci    NETWORK_33_TO_50_UTILIZED = 0x0360,
269961847f8eSopenharmony_ci    /**
270061847f8eSopenharmony_ci     * Device used on network 60 to 67.
270161847f8eSopenharmony_ci     *
270261847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
270361847f8eSopenharmony_ci     * @since 8
270461847f8eSopenharmony_ci     * @deprecated since 9
270561847f8eSopenharmony_ci     */
270661847f8eSopenharmony_ci    NETWORK_60_TO_67_UTILIZED = 0x0380,
270761847f8eSopenharmony_ci    /**
270861847f8eSopenharmony_ci     * Device used on network 67 to 83.
270961847f8eSopenharmony_ci     *
271061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
271161847f8eSopenharmony_ci     * @since 8
271261847f8eSopenharmony_ci     * @deprecated since 9
271361847f8eSopenharmony_ci     */
271461847f8eSopenharmony_ci    NETWORK_67_TO_83_UTILIZED = 0x03A0,
271561847f8eSopenharmony_ci    /**
271661847f8eSopenharmony_ci     * Device used on network 83 to 99.
271761847f8eSopenharmony_ci     *
271861847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
271961847f8eSopenharmony_ci     * @since 8
272061847f8eSopenharmony_ci     * @deprecated since 9
272161847f8eSopenharmony_ci     */
272261847f8eSopenharmony_ci    NETWORK_83_TO_99_UTILIZED = 0x03C0,
272361847f8eSopenharmony_ci    /**
272461847f8eSopenharmony_ci     * Device without network service.
272561847f8eSopenharmony_ci     *
272661847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
272761847f8eSopenharmony_ci     * @since 8
272861847f8eSopenharmony_ci     * @deprecated since 9
272961847f8eSopenharmony_ci     */
273061847f8eSopenharmony_ci    NETWORK_NO_SERVICE = 0x03E0,
273161847f8eSopenharmony_ci
273261847f8eSopenharmony_ci    /**
273361847f8eSopenharmony_ci     * Unclassified audio or video device.
273461847f8eSopenharmony_ci     *
273561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
273661847f8eSopenharmony_ci     * @since 8
273761847f8eSopenharmony_ci     * @deprecated since 9
273861847f8eSopenharmony_ci     */
273961847f8eSopenharmony_ci    AUDIO_VIDEO_UNCATEGORIZED = 0x0400,
274061847f8eSopenharmony_ci    /**
274161847f8eSopenharmony_ci     * Wearable audio or video headset.
274261847f8eSopenharmony_ci     *
274361847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
274461847f8eSopenharmony_ci     * @since 8
274561847f8eSopenharmony_ci     * @deprecated since 9
274661847f8eSopenharmony_ci     */
274761847f8eSopenharmony_ci    AUDIO_VIDEO_WEARABLE_HEADSET = 0x0404,
274861847f8eSopenharmony_ci    /**
274961847f8eSopenharmony_ci     * Hands-free audio or video device.
275061847f8eSopenharmony_ci     *
275161847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
275261847f8eSopenharmony_ci     * @since 8
275361847f8eSopenharmony_ci     * @deprecated since 9
275461847f8eSopenharmony_ci     */
275561847f8eSopenharmony_ci    AUDIO_VIDEO_HANDSFREE = 0x0408,
275661847f8eSopenharmony_ci    /**
275761847f8eSopenharmony_ci     * Audio or video microphone.
275861847f8eSopenharmony_ci     *
275961847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
276061847f8eSopenharmony_ci     * @since 8
276161847f8eSopenharmony_ci     * @deprecated since 9
276261847f8eSopenharmony_ci     */
276361847f8eSopenharmony_ci    AUDIO_VIDEO_MICROPHONE = 0x0410,
276461847f8eSopenharmony_ci    /**
276561847f8eSopenharmony_ci     * Audio or video loudspeaker.
276661847f8eSopenharmony_ci     *
276761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
276861847f8eSopenharmony_ci     * @since 8
276961847f8eSopenharmony_ci     * @deprecated since 9
277061847f8eSopenharmony_ci     */
277161847f8eSopenharmony_ci    AUDIO_VIDEO_LOUDSPEAKER = 0x0414,
277261847f8eSopenharmony_ci    /**
277361847f8eSopenharmony_ci     * Audio or video headphones.
277461847f8eSopenharmony_ci     *
277561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
277661847f8eSopenharmony_ci     * @since 8
277761847f8eSopenharmony_ci     * @deprecated since 9
277861847f8eSopenharmony_ci     */
277961847f8eSopenharmony_ci    AUDIO_VIDEO_HEADPHONES = 0x0418,
278061847f8eSopenharmony_ci    /**
278161847f8eSopenharmony_ci     * Portable audio or video device.
278261847f8eSopenharmony_ci     *
278361847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
278461847f8eSopenharmony_ci     * @since 8
278561847f8eSopenharmony_ci     * @deprecated since 9
278661847f8eSopenharmony_ci     */
278761847f8eSopenharmony_ci    AUDIO_VIDEO_PORTABLE_AUDIO = 0x041C,
278861847f8eSopenharmony_ci    /**
278961847f8eSopenharmony_ci     * In-vehicle audio or video device.
279061847f8eSopenharmony_ci     *
279161847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
279261847f8eSopenharmony_ci     * @since 8
279361847f8eSopenharmony_ci     * @deprecated since 9
279461847f8eSopenharmony_ci     */
279561847f8eSopenharmony_ci    AUDIO_VIDEO_CAR_AUDIO = 0x0420,
279661847f8eSopenharmony_ci    /**
279761847f8eSopenharmony_ci     * Audio or video STB device.
279861847f8eSopenharmony_ci     *
279961847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
280061847f8eSopenharmony_ci     * @since 8
280161847f8eSopenharmony_ci     * @deprecated since 9
280261847f8eSopenharmony_ci     */
280361847f8eSopenharmony_ci    AUDIO_VIDEO_SET_TOP_BOX = 0x0424,
280461847f8eSopenharmony_ci    /**
280561847f8eSopenharmony_ci     * High-fidelity speaker device.
280661847f8eSopenharmony_ci     *
280761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
280861847f8eSopenharmony_ci     * @since 8
280961847f8eSopenharmony_ci     * @deprecated since 9
281061847f8eSopenharmony_ci     */
281161847f8eSopenharmony_ci    AUDIO_VIDEO_HIFI_AUDIO = 0x0428,
281261847f8eSopenharmony_ci    /**
281361847f8eSopenharmony_ci     * Video cassette recording (VCR) device.
281461847f8eSopenharmony_ci     *
281561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
281661847f8eSopenharmony_ci     * @since 8
281761847f8eSopenharmony_ci     * @deprecated since 9
281861847f8eSopenharmony_ci     */
281961847f8eSopenharmony_ci    AUDIO_VIDEO_VCR = 0x042C,
282061847f8eSopenharmony_ci    /**
282161847f8eSopenharmony_ci     * Camera.
282261847f8eSopenharmony_ci     *
282361847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
282461847f8eSopenharmony_ci     * @since 8
282561847f8eSopenharmony_ci     * @deprecated since 9
282661847f8eSopenharmony_ci     */
282761847f8eSopenharmony_ci    AUDIO_VIDEO_VIDEO_CAMERA = 0x0430,
282861847f8eSopenharmony_ci    /**
282961847f8eSopenharmony_ci     * Camcorder.
283061847f8eSopenharmony_ci     *
283161847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
283261847f8eSopenharmony_ci     * @since 8
283361847f8eSopenharmony_ci     * @deprecated since 9
283461847f8eSopenharmony_ci     */
283561847f8eSopenharmony_ci    AUDIO_VIDEO_CAMCORDER = 0x0434,
283661847f8eSopenharmony_ci    /**
283761847f8eSopenharmony_ci     * Audio or video monitor.
283861847f8eSopenharmony_ci     *
283961847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
284061847f8eSopenharmony_ci     * @since 8
284161847f8eSopenharmony_ci     * @deprecated since 9
284261847f8eSopenharmony_ci     */
284361847f8eSopenharmony_ci    AUDIO_VIDEO_VIDEO_MONITOR = 0x0438,
284461847f8eSopenharmony_ci    /**
284561847f8eSopenharmony_ci     * Video display or loudspeaker.
284661847f8eSopenharmony_ci     *
284761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
284861847f8eSopenharmony_ci     * @since 8
284961847f8eSopenharmony_ci     * @deprecated since 9
285061847f8eSopenharmony_ci     */
285161847f8eSopenharmony_ci    AUDIO_VIDEO_VIDEO_DISPLAY_AND_LOUDSPEAKER = 0x043C,
285261847f8eSopenharmony_ci    /**
285361847f8eSopenharmony_ci     * Video conferencing device.
285461847f8eSopenharmony_ci     *
285561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
285661847f8eSopenharmony_ci     * @since 8
285761847f8eSopenharmony_ci     * @deprecated since 9
285861847f8eSopenharmony_ci     */
285961847f8eSopenharmony_ci    AUDIO_VIDEO_VIDEO_CONFERENCING = 0x0440,
286061847f8eSopenharmony_ci    /**
286161847f8eSopenharmony_ci     * Audio or video gaming toy.
286261847f8eSopenharmony_ci     *
286361847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
286461847f8eSopenharmony_ci     * @since 8
286561847f8eSopenharmony_ci     * @deprecated since 9
286661847f8eSopenharmony_ci     */
286761847f8eSopenharmony_ci    AUDIO_VIDEO_VIDEO_GAMING_TOY = 0x0448,
286861847f8eSopenharmony_ci
286961847f8eSopenharmony_ci    /**
287061847f8eSopenharmony_ci     * Peripheral Major Class
287161847f8eSopenharmony_ci     *
287261847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
287361847f8eSopenharmony_ci     * @since 8
287461847f8eSopenharmony_ci     * @deprecated since 9
287561847f8eSopenharmony_ci     */
287661847f8eSopenharmony_ci    PERIPHERAL_NON_KEYBOARD_NON_POINTING = 0x0500,
287761847f8eSopenharmony_ci    /**
287861847f8eSopenharmony_ci     * Keyboard device.
287961847f8eSopenharmony_ci     *
288061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
288161847f8eSopenharmony_ci     * @since 8
288261847f8eSopenharmony_ci     * @deprecated since 9
288361847f8eSopenharmony_ci     */
288461847f8eSopenharmony_ci    PERIPHERAL_KEYBOARD = 0x0540,
288561847f8eSopenharmony_ci    /**
288661847f8eSopenharmony_ci     * Pointing peripheral device.
288761847f8eSopenharmony_ci     *
288861847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
288961847f8eSopenharmony_ci     * @since 8
289061847f8eSopenharmony_ci     * @deprecated since 9
289161847f8eSopenharmony_ci     */
289261847f8eSopenharmony_ci    PERIPHERAL_POINTING_DEVICE = 0x0580,
289361847f8eSopenharmony_ci    /**
289461847f8eSopenharmony_ci     * Keyboard pointing device.
289561847f8eSopenharmony_ci     *
289661847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
289761847f8eSopenharmony_ci     * @since 8
289861847f8eSopenharmony_ci     * @deprecated since 9
289961847f8eSopenharmony_ci     */
290061847f8eSopenharmony_ci    PERIPHERAL_KEYBOARD_POINTING = 0x05C0,
290161847f8eSopenharmony_ci    /**
290261847f8eSopenharmony_ci     * Unclassified peripheral device.
290361847f8eSopenharmony_ci     *
290461847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
290561847f8eSopenharmony_ci     * @since 8
290661847f8eSopenharmony_ci     * @deprecated since 9
290761847f8eSopenharmony_ci     */
290861847f8eSopenharmony_ci    PERIPHERAL_UNCATEGORIZED = 0x0500,
290961847f8eSopenharmony_ci    /**
291061847f8eSopenharmony_ci     * Peripheral joystick.
291161847f8eSopenharmony_ci     *
291261847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
291361847f8eSopenharmony_ci     * @since 8
291461847f8eSopenharmony_ci     * @deprecated since 9
291561847f8eSopenharmony_ci     */
291661847f8eSopenharmony_ci    PERIPHERAL_JOYSTICK = 0x0504,
291761847f8eSopenharmony_ci    /**
291861847f8eSopenharmony_ci     * Peripheral game pad.
291961847f8eSopenharmony_ci     *
292061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
292161847f8eSopenharmony_ci     * @since 8
292261847f8eSopenharmony_ci     * @deprecated since 9
292361847f8eSopenharmony_ci     */
292461847f8eSopenharmony_ci    PERIPHERAL_GAMEPAD = 0x0508,
292561847f8eSopenharmony_ci    /**
292661847f8eSopenharmony_ci     * Peripheral remote control device.
292761847f8eSopenharmony_ci     *
292861847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
292961847f8eSopenharmony_ci     * @since 8
293061847f8eSopenharmony_ci     * @deprecated since 9
293161847f8eSopenharmony_ci     */
293261847f8eSopenharmony_ci    PERIPHERAL_REMOTE_CONTROL = 0x05C0,
293361847f8eSopenharmony_ci    /**
293461847f8eSopenharmony_ci     * Peripheral sensing device.
293561847f8eSopenharmony_ci     *
293661847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
293761847f8eSopenharmony_ci     * @since 8
293861847f8eSopenharmony_ci     * @deprecated since 9
293961847f8eSopenharmony_ci     */
294061847f8eSopenharmony_ci    PERIPHERAL_SENSING_DEVICE = 0x0510,
294161847f8eSopenharmony_ci    /**
294261847f8eSopenharmony_ci     * Peripheral digitizer tablet.
294361847f8eSopenharmony_ci     *
294461847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
294561847f8eSopenharmony_ci     * @since 8
294661847f8eSopenharmony_ci     * @deprecated since 9
294761847f8eSopenharmony_ci     */
294861847f8eSopenharmony_ci    PERIPHERAL_DIGITIZER_TABLET = 0x0514,
294961847f8eSopenharmony_ci    /**
295061847f8eSopenharmony_ci     * Peripheral card reader.
295161847f8eSopenharmony_ci     *
295261847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
295361847f8eSopenharmony_ci     * @since 8
295461847f8eSopenharmony_ci     * @deprecated since 9
295561847f8eSopenharmony_ci     */
295661847f8eSopenharmony_ci    PERIPHERAL_CARD_READER = 0x0518,
295761847f8eSopenharmony_ci    /**
295861847f8eSopenharmony_ci     * Peripheral digital pen.
295961847f8eSopenharmony_ci     *
296061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
296161847f8eSopenharmony_ci     * @since 8
296261847f8eSopenharmony_ci     * @deprecated since 9
296361847f8eSopenharmony_ci     */
296461847f8eSopenharmony_ci    PERIPHERAL_DIGITAL_PEN = 0x051C,
296561847f8eSopenharmony_ci    /**
296661847f8eSopenharmony_ci     * Peripheral RFID scanner.
296761847f8eSopenharmony_ci     *
296861847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
296961847f8eSopenharmony_ci     * @since 8
297061847f8eSopenharmony_ci     * @deprecated since 9
297161847f8eSopenharmony_ci     */
297261847f8eSopenharmony_ci    PERIPHERAL_SCANNER_RFID = 0x0520,
297361847f8eSopenharmony_ci    /**
297461847f8eSopenharmony_ci     * Gesture input device.
297561847f8eSopenharmony_ci     *
297661847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
297761847f8eSopenharmony_ci     * @since 8
297861847f8eSopenharmony_ci     * @deprecated since 9
297961847f8eSopenharmony_ci     */
298061847f8eSopenharmony_ci    PERIPHERAL_GESTURAL_INPUT = 0x0522,
298161847f8eSopenharmony_ci
298261847f8eSopenharmony_ci    /**
298361847f8eSopenharmony_ci     * Imaging Major Class
298461847f8eSopenharmony_ci     *
298561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
298661847f8eSopenharmony_ci     * @since 8
298761847f8eSopenharmony_ci     * @deprecated since 9
298861847f8eSopenharmony_ci     */
298961847f8eSopenharmony_ci    IMAGING_UNCATEGORIZED = 0x0600,
299061847f8eSopenharmony_ci    /**
299161847f8eSopenharmony_ci     * Imaging display device.
299261847f8eSopenharmony_ci     *
299361847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
299461847f8eSopenharmony_ci     * @since 8
299561847f8eSopenharmony_ci     * @deprecated since 9
299661847f8eSopenharmony_ci     */
299761847f8eSopenharmony_ci    IMAGING_DISPLAY = 0x0610,
299861847f8eSopenharmony_ci    /**
299961847f8eSopenharmony_ci     * Imaging camera device.
300061847f8eSopenharmony_ci     *
300161847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
300261847f8eSopenharmony_ci     * @since 8
300361847f8eSopenharmony_ci     * @deprecated since 9
300461847f8eSopenharmony_ci     */
300561847f8eSopenharmony_ci    IMAGING_CAMERA = 0x0620,
300661847f8eSopenharmony_ci    /**
300761847f8eSopenharmony_ci     * Imaging scanner.
300861847f8eSopenharmony_ci     *
300961847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
301061847f8eSopenharmony_ci     * @since 8
301161847f8eSopenharmony_ci     * @deprecated since 9
301261847f8eSopenharmony_ci     */
301361847f8eSopenharmony_ci    IMAGING_SCANNER = 0x0640,
301461847f8eSopenharmony_ci    /**
301561847f8eSopenharmony_ci     * Imaging printer.
301661847f8eSopenharmony_ci     *
301761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
301861847f8eSopenharmony_ci     * @since 8
301961847f8eSopenharmony_ci     * @deprecated since 9
302061847f8eSopenharmony_ci     */
302161847f8eSopenharmony_ci    IMAGING_PRINTER = 0x0680,
302261847f8eSopenharmony_ci
302361847f8eSopenharmony_ci    /**
302461847f8eSopenharmony_ci     * Wearable Major Class
302561847f8eSopenharmony_ci     *
302661847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
302761847f8eSopenharmony_ci     * @since 8
302861847f8eSopenharmony_ci     * @deprecated since 9
302961847f8eSopenharmony_ci     */
303061847f8eSopenharmony_ci    WEARABLE_UNCATEGORIZED = 0x0700,
303161847f8eSopenharmony_ci    /**
303261847f8eSopenharmony_ci     * Smart watch.
303361847f8eSopenharmony_ci     *
303461847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
303561847f8eSopenharmony_ci     * @since 8
303661847f8eSopenharmony_ci     * @deprecated since 9
303761847f8eSopenharmony_ci     */
303861847f8eSopenharmony_ci    WEARABLE_WRIST_WATCH = 0x0704,
303961847f8eSopenharmony_ci    /**
304061847f8eSopenharmony_ci     * Wearable pager.
304161847f8eSopenharmony_ci     *
304261847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
304361847f8eSopenharmony_ci     * @since 8
304461847f8eSopenharmony_ci     * @deprecated since 9
304561847f8eSopenharmony_ci     */
304661847f8eSopenharmony_ci    WEARABLE_PAGER = 0x0708,
304761847f8eSopenharmony_ci    /**
304861847f8eSopenharmony_ci     * Smart jacket.
304961847f8eSopenharmony_ci     *
305061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
305161847f8eSopenharmony_ci     * @since 8
305261847f8eSopenharmony_ci     * @deprecated since 9
305361847f8eSopenharmony_ci     */
305461847f8eSopenharmony_ci    WEARABLE_JACKET = 0x070C,
305561847f8eSopenharmony_ci    /**
305661847f8eSopenharmony_ci     * Wearable helmet.
305761847f8eSopenharmony_ci     *
305861847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
305961847f8eSopenharmony_ci     * @since 8
306061847f8eSopenharmony_ci     * @deprecated since 9
306161847f8eSopenharmony_ci     */
306261847f8eSopenharmony_ci    WEARABLE_HELMET = 0x0710,
306361847f8eSopenharmony_ci    /**
306461847f8eSopenharmony_ci     * Wearable glasses.
306561847f8eSopenharmony_ci     *
306661847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
306761847f8eSopenharmony_ci     * @since 8
306861847f8eSopenharmony_ci     * @deprecated since 9
306961847f8eSopenharmony_ci     */
307061847f8eSopenharmony_ci    WEARABLE_GLASSES = 0x0714,
307161847f8eSopenharmony_ci
307261847f8eSopenharmony_ci    /**
307361847f8eSopenharmony_ci     * Minor Device Class field - Toy Major Class
307461847f8eSopenharmony_ci     *
307561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
307661847f8eSopenharmony_ci     * @since 8
307761847f8eSopenharmony_ci     * @deprecated since 9
307861847f8eSopenharmony_ci     */
307961847f8eSopenharmony_ci    TOY_UNCATEGORIZED = 0x0800,
308061847f8eSopenharmony_ci    /**
308161847f8eSopenharmony_ci     * Toy robot.
308261847f8eSopenharmony_ci     *
308361847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
308461847f8eSopenharmony_ci     * @since 8
308561847f8eSopenharmony_ci     * @deprecated since 9
308661847f8eSopenharmony_ci     */
308761847f8eSopenharmony_ci    TOY_ROBOT = 0x0804,
308861847f8eSopenharmony_ci    /**
308961847f8eSopenharmony_ci     * Toy vehicle.
309061847f8eSopenharmony_ci     *
309161847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
309261847f8eSopenharmony_ci     * @since 8
309361847f8eSopenharmony_ci     * @deprecated since 9
309461847f8eSopenharmony_ci     */
309561847f8eSopenharmony_ci    TOY_VEHICLE = 0x0808,
309661847f8eSopenharmony_ci    /**
309761847f8eSopenharmony_ci     * Humanoid toy doll.
309861847f8eSopenharmony_ci     *
309961847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
310061847f8eSopenharmony_ci     * @since 8
310161847f8eSopenharmony_ci     * @deprecated since 9
310261847f8eSopenharmony_ci     */
310361847f8eSopenharmony_ci    TOY_DOLL_ACTION_FIGURE = 0x080C,
310461847f8eSopenharmony_ci    /**
310561847f8eSopenharmony_ci     * Toy controller.
310661847f8eSopenharmony_ci     *
310761847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
310861847f8eSopenharmony_ci     * @since 8
310961847f8eSopenharmony_ci     * @deprecated since 9
311061847f8eSopenharmony_ci     */
311161847f8eSopenharmony_ci    TOY_CONTROLLER = 0x0810,
311261847f8eSopenharmony_ci    /**
311361847f8eSopenharmony_ci     * Toy gaming device.
311461847f8eSopenharmony_ci     *
311561847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
311661847f8eSopenharmony_ci     * @since 8
311761847f8eSopenharmony_ci     * @deprecated since 9
311861847f8eSopenharmony_ci     */
311961847f8eSopenharmony_ci    TOY_GAME = 0x0814,
312061847f8eSopenharmony_ci
312161847f8eSopenharmony_ci    /**
312261847f8eSopenharmony_ci     * Minor Device Class field - Health
312361847f8eSopenharmony_ci     *
312461847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
312561847f8eSopenharmony_ci     * @since 8
312661847f8eSopenharmony_ci     * @deprecated since 9
312761847f8eSopenharmony_ci     */
312861847f8eSopenharmony_ci    HEALTH_UNCATEGORIZED = 0x0900,
312961847f8eSopenharmony_ci    /**
313061847f8eSopenharmony_ci     * Blood pressure device.
313161847f8eSopenharmony_ci     *
313261847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
313361847f8eSopenharmony_ci     * @since 8
313461847f8eSopenharmony_ci     * @deprecated since 9
313561847f8eSopenharmony_ci     */
313661847f8eSopenharmony_ci    HEALTH_BLOOD_PRESSURE = 0x0904,
313761847f8eSopenharmony_ci    /**
313861847f8eSopenharmony_ci     * Thermometer.
313961847f8eSopenharmony_ci     *
314061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
314161847f8eSopenharmony_ci     * @since 8
314261847f8eSopenharmony_ci     * @deprecated since 9
314361847f8eSopenharmony_ci     */
314461847f8eSopenharmony_ci    HEALTH_THERMOMETER = 0x0908,
314561847f8eSopenharmony_ci    /**
314661847f8eSopenharmony_ci     * Body scale.
314761847f8eSopenharmony_ci     *
314861847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
314961847f8eSopenharmony_ci     * @since 8
315061847f8eSopenharmony_ci     * @deprecated since 9
315161847f8eSopenharmony_ci     */
315261847f8eSopenharmony_ci    HEALTH_WEIGHING = 0x090C,
315361847f8eSopenharmony_ci    /**
315461847f8eSopenharmony_ci     * Blood glucose monitor.
315561847f8eSopenharmony_ci     *
315661847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
315761847f8eSopenharmony_ci     * @since 8
315861847f8eSopenharmony_ci     * @deprecated since 9
315961847f8eSopenharmony_ci     */
316061847f8eSopenharmony_ci    HEALTH_GLUCOSE = 0x0910,
316161847f8eSopenharmony_ci    /**
316261847f8eSopenharmony_ci     * Pulse oximeter.
316361847f8eSopenharmony_ci     *
316461847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
316561847f8eSopenharmony_ci     * @since 8
316661847f8eSopenharmony_ci     * @deprecated since 9
316761847f8eSopenharmony_ci     */
316861847f8eSopenharmony_ci    HEALTH_PULSE_OXIMETER = 0x0914,
316961847f8eSopenharmony_ci    /**
317061847f8eSopenharmony_ci     * Heart rate monitor.
317161847f8eSopenharmony_ci     *
317261847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
317361847f8eSopenharmony_ci     * @since 8
317461847f8eSopenharmony_ci     * @deprecated since 9
317561847f8eSopenharmony_ci     */
317661847f8eSopenharmony_ci    HEALTH_PULSE_RATE = 0x0918,
317761847f8eSopenharmony_ci    /**
317861847f8eSopenharmony_ci     * Health data display.
317961847f8eSopenharmony_ci     *
318061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
318161847f8eSopenharmony_ci     * @since 8
318261847f8eSopenharmony_ci     * @deprecated since 9
318361847f8eSopenharmony_ci     */
318461847f8eSopenharmony_ci    HEALTH_DATA_DISPLAY = 0x091C,
318561847f8eSopenharmony_ci    /**
318661847f8eSopenharmony_ci     * Step counter.
318761847f8eSopenharmony_ci     *
318861847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
318961847f8eSopenharmony_ci     * @since 8
319061847f8eSopenharmony_ci     * @deprecated since 9
319161847f8eSopenharmony_ci     */
319261847f8eSopenharmony_ci    HEALTH_STEP_COUNTER = 0x0920,
319361847f8eSopenharmony_ci    /**
319461847f8eSopenharmony_ci     * Body composition analyzer.
319561847f8eSopenharmony_ci     *
319661847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
319761847f8eSopenharmony_ci     * @since 8
319861847f8eSopenharmony_ci     * @deprecated since 9
319961847f8eSopenharmony_ci     */
320061847f8eSopenharmony_ci    HEALTH_BODY_COMPOSITION_ANALYZER = 0x0924,
320161847f8eSopenharmony_ci    /**
320261847f8eSopenharmony_ci     * Hygrometer.
320361847f8eSopenharmony_ci     *
320461847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
320561847f8eSopenharmony_ci     * @since 8
320661847f8eSopenharmony_ci     * @deprecated since 9
320761847f8eSopenharmony_ci     */
320861847f8eSopenharmony_ci    HEALTH_PEAK_FLOW_MOITOR = 0x0928,
320961847f8eSopenharmony_ci    /**
321061847f8eSopenharmony_ci     * Medication monitor.
321161847f8eSopenharmony_ci     *
321261847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
321361847f8eSopenharmony_ci     * @since 8
321461847f8eSopenharmony_ci     * @deprecated since 9
321561847f8eSopenharmony_ci     */
321661847f8eSopenharmony_ci    HEALTH_MEDICATION_MONITOR = 0x092C,
321761847f8eSopenharmony_ci    /**
321861847f8eSopenharmony_ci     * Prosthetic knee.
321961847f8eSopenharmony_ci     *
322061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
322161847f8eSopenharmony_ci     * @since 8
322261847f8eSopenharmony_ci     * @deprecated since 9
322361847f8eSopenharmony_ci     */
322461847f8eSopenharmony_ci    HEALTH_KNEE_PROSTHESIS = 0x0930,
322561847f8eSopenharmony_ci    /**
322661847f8eSopenharmony_ci     * Prosthetic ankle.
322761847f8eSopenharmony_ci     *
322861847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
322961847f8eSopenharmony_ci     * @since 8
323061847f8eSopenharmony_ci     * @deprecated since 9
323161847f8eSopenharmony_ci     */
323261847f8eSopenharmony_ci    HEALTH_ANKLE_PROSTHESIS = 0x0934,
323361847f8eSopenharmony_ci    /**
323461847f8eSopenharmony_ci     * Generic health management device.
323561847f8eSopenharmony_ci     *
323661847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
323761847f8eSopenharmony_ci     * @since 8
323861847f8eSopenharmony_ci     * @deprecated since 9
323961847f8eSopenharmony_ci     */
324061847f8eSopenharmony_ci    HEALTH_GENERIC_HEALTH_MANAGER = 0x0938,
324161847f8eSopenharmony_ci    /**
324261847f8eSopenharmony_ci     * Personal mobility device.
324361847f8eSopenharmony_ci     *
324461847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
324561847f8eSopenharmony_ci     * @since 8
324661847f8eSopenharmony_ci     * @deprecated since 9
324761847f8eSopenharmony_ci     */
324861847f8eSopenharmony_ci    HEALTH_PERSONAL_MOBILITY_DEVICE = 0x093C
324961847f8eSopenharmony_ci  }
325061847f8eSopenharmony_ci
325161847f8eSopenharmony_ci  /**
325261847f8eSopenharmony_ci   * Profile state change parameters.
325361847f8eSopenharmony_ci   *
325461847f8eSopenharmony_ci   * @typedef StateChangeParam
325561847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
325661847f8eSopenharmony_ci   * @since 8
325761847f8eSopenharmony_ci   * @deprecated since 9
325861847f8eSopenharmony_ci   * @useinstead ohos.bluetoothManager/bluetoothManager.StateChangeParam
325961847f8eSopenharmony_ci   */
326061847f8eSopenharmony_ci  interface StateChangeParam {
326161847f8eSopenharmony_ci    /**
326261847f8eSopenharmony_ci     * The address of device
326361847f8eSopenharmony_ci     *
326461847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
326561847f8eSopenharmony_ci     * @since 8
326661847f8eSopenharmony_ci     * @deprecated since 9
326761847f8eSopenharmony_ci     */
326861847f8eSopenharmony_ci    deviceId: string;
326961847f8eSopenharmony_ci
327061847f8eSopenharmony_ci    /**
327161847f8eSopenharmony_ci     * Profile state value
327261847f8eSopenharmony_ci     *
327361847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
327461847f8eSopenharmony_ci     * @since 8
327561847f8eSopenharmony_ci     * @deprecated since 9
327661847f8eSopenharmony_ci     */
327761847f8eSopenharmony_ci    state: ProfileConnectionState;
327861847f8eSopenharmony_ci  }
327961847f8eSopenharmony_ci
328061847f8eSopenharmony_ci  /**
328161847f8eSopenharmony_ci   * The enum of a2dp playing state.
328261847f8eSopenharmony_ci   *
328361847f8eSopenharmony_ci   * @enum { number }
328461847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
328561847f8eSopenharmony_ci   * @since 8
328661847f8eSopenharmony_ci   * @deprecated since 9
328761847f8eSopenharmony_ci   * @useinstead ohos.bluetoothManager/bluetoothManager.PlayingState
328861847f8eSopenharmony_ci   */
328961847f8eSopenharmony_ci  enum PlayingState {
329061847f8eSopenharmony_ci    /**
329161847f8eSopenharmony_ci     * Not playing.
329261847f8eSopenharmony_ci     *
329361847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
329461847f8eSopenharmony_ci     * @since 8
329561847f8eSopenharmony_ci     * @deprecated since 9
329661847f8eSopenharmony_ci     */
329761847f8eSopenharmony_ci    STATE_NOT_PLAYING,
329861847f8eSopenharmony_ci    /**
329961847f8eSopenharmony_ci     * Playing.
330061847f8eSopenharmony_ci     *
330161847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
330261847f8eSopenharmony_ci     * @since 8
330361847f8eSopenharmony_ci     * @deprecated since 9
330461847f8eSopenharmony_ci     */
330561847f8eSopenharmony_ci    STATE_PLAYING
330661847f8eSopenharmony_ci  }
330761847f8eSopenharmony_ci
330861847f8eSopenharmony_ci  /**
330961847f8eSopenharmony_ci   * The enum of profile id.
331061847f8eSopenharmony_ci   *
331161847f8eSopenharmony_ci   * @enum { number }
331261847f8eSopenharmony_ci   * @syscap SystemCapability.Communication.Bluetooth.Core
331361847f8eSopenharmony_ci   * @since 7
331461847f8eSopenharmony_ci   * @deprecated since 9
331561847f8eSopenharmony_ci   * @useinstead ohos.bluetoothManager/bluetoothManager.ProfileId
331661847f8eSopenharmony_ci   */
331761847f8eSopenharmony_ci  enum ProfileId {
331861847f8eSopenharmony_ci    /**
331961847f8eSopenharmony_ci     * A2DP profile.
332061847f8eSopenharmony_ci     *
332161847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
332261847f8eSopenharmony_ci     * @since 8
332361847f8eSopenharmony_ci     * @deprecated since 9
332461847f8eSopenharmony_ci     */
332561847f8eSopenharmony_ci    PROFILE_A2DP_SOURCE = 1,
332661847f8eSopenharmony_ci
332761847f8eSopenharmony_ci    /**
332861847f8eSopenharmony_ci     * HFP profile.
332961847f8eSopenharmony_ci     *
333061847f8eSopenharmony_ci     * @syscap SystemCapability.Communication.Bluetooth.Core
333161847f8eSopenharmony_ci     * @since 8
333261847f8eSopenharmony_ci     * @deprecated since 9
333361847f8eSopenharmony_ci     */
333461847f8eSopenharmony_ci    PROFILE_HANDS_FREE_AUDIO_GATEWAY = 4
333561847f8eSopenharmony_ci  }
333661847f8eSopenharmony_ci}
333761847f8eSopenharmony_ci
333861847f8eSopenharmony_ciexport default bluetooth;
3339