• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (C) 2022-2023 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16/**
17 * @file
18 * @kit ConnectivityKit
19 */
20
21import type { AsyncCallback, Callback } from './@ohos.base';
22
23/**
24 * Provides methods to operate or manage Bluetooth.
25 *
26 * @namespace bluetoothManager
27 * @syscap SystemCapability.Communication.Bluetooth.Core
28 * @since 9
29 * @deprecated since 10
30 */
31declare namespace bluetoothManager {
32  /**
33   * Obtains the Bluetooth status of a device.
34   *
35   * @permission ohos.permission.USE_BLUETOOTH
36   * @returns { BluetoothState } Returns the Bluetooth status, which can be {@link BluetoothState#STATE_OFF},
37   * {@link BluetoothState#STATE_TURNING_ON}, {@link BluetoothState#STATE_ON}, {@link BluetoothState#STATE_TURNING_OFF},
38   * {@link BluetoothState#STATE_BLE_TURNING_ON}, {@link BluetoothState#STATE_BLE_ON},
39   * or {@link BluetoothState#STATE_BLE_TURNING_OFF}.
40   * @throws { BusinessError } 201 - Permission denied.
41   * @throws { BusinessError } 801 - Capability not supported.
42   * @throws { BusinessError } 2900001 - Service stopped.
43   * @throws { BusinessError } 2900099 - Operation failed.
44   * @syscap SystemCapability.Communication.Bluetooth.Core
45   * @since 9
46   * @deprecated since 10
47   * @useinstead ohos.bluetooth.access/access#getState
48   */
49  /**
50   * Obtains the Bluetooth status of a device.
51   * The permission required by this interface is changed from USE_BLUETOOTH to ACCESS_BLUETOOTH.
52   *
53   * @permission ohos.permission.ACCESS_BLUETOOTH
54   * @returns { BluetoothState } Returns the Bluetooth status, which can be {@link BluetoothState#STATE_OFF},
55   * {@link BluetoothState#STATE_TURNING_ON}, {@link BluetoothState#STATE_ON}, {@link BluetoothState#STATE_TURNING_OFF},
56   * {@link BluetoothState#STATE_BLE_TURNING_ON}, {@link BluetoothState#STATE_BLE_ON},
57   * or {@link BluetoothState#STATE_BLE_TURNING_OFF}.
58   * @throws { BusinessError } 201 - Permission denied.
59   * @throws { BusinessError } 801 - Capability not supported.
60   * @throws { BusinessError } 2900001 - Service stopped.
61   * @throws { BusinessError } 2900099 - Operation failed.
62   * @syscap SystemCapability.Communication.Bluetooth.Core
63   * @since 10
64   * @deprecated since 10
65   * @useinstead ohos.bluetooth.access/access#getState
66   */
67  function getState(): BluetoothState;
68
69  /**
70   * Get the local device connection state to any profile of any remote device.
71   *
72   * @permission ohos.permission.USE_BLUETOOTH
73   * @returns { ProfileConnectionState } One of {@link ProfileConnectionState#STATE_DISCONNECTED},
74   * {@link ProfileConnectionState#STATE_CONNECTING}, {@link ProfileConnectionState#STATE_CONNECTED},
75   * {@link ProfileConnectionState#STATE_DISCONNECTING}.
76   * @throws { BusinessError } 201 - Permission denied.
77   * @throws { BusinessError } 801 - Capability not supported.
78   * @throws { BusinessError } 2900001 - Service stopped.
79   * @throws { BusinessError } 2900003 - Bluetooth disabled.
80   * @throws { BusinessError } 2900099 - Operation failed.
81   * @syscap SystemCapability.Communication.Bluetooth.Core
82   * @since 9
83   * @deprecated since 10
84   * @useinstead ohos.bluetooth.connection/connection#getProfileConnectionState
85   */
86  /**
87   * Get the local device connection state to any profile of any remote device.
88   * The permission required by this interface is changed from USE_BLUETOOTH to ACCESS_BLUETOOTH.
89   *
90   * @permission ohos.permission.ACCESS_BLUETOOTH
91   * @returns { ProfileConnectionState } One of {@link ProfileConnectionState#STATE_DISCONNECTED},
92   * {@link ProfileConnectionState#STATE_CONNECTING}, {@link ProfileConnectionState#STATE_CONNECTED},
93   * {@link ProfileConnectionState#STATE_DISCONNECTING}.
94   * @throws { BusinessError } 201 - Permission denied.
95   * @throws { BusinessError } 801 - Capability not supported.
96   * @throws { BusinessError } 2900001 - Service stopped.
97   * @throws { BusinessError } 2900003 - Bluetooth disabled.
98   * @throws { BusinessError } 2900099 - Operation failed.
99   * @syscap SystemCapability.Communication.Bluetooth.Core
100   * @since 10
101   * @deprecated since 10
102   * @useinstead ohos.bluetooth.connection/connection#getProfileConnectionState
103   */
104  function getBtConnectionState(): ProfileConnectionState;
105
106  /**
107   * Starts pairing with a remote Bluetooth device.
108   *
109   * @permission ohos.permission.DISCOVER_BLUETOOTH
110   * @param { string } deviceId - The address of the remote device to pair.
111   * @throws { BusinessError } 201 - Permission denied.
112   * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
113   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
114   * @throws { BusinessError } 801 - Capability not supported.
115   * @throws { BusinessError } 2900001 - Service stopped.
116   * @throws { BusinessError } 2900003 - Bluetooth disabled.
117   * @throws { BusinessError } 2900099 - Operation failed.
118   * @syscap SystemCapability.Communication.Bluetooth.Core
119   * @since 9
120   * @deprecated since 10
121   * @useinstead ohos.bluetooth.connection/connection#pairDevice
122   */
123  /**
124   * Starts pairing with a remote Bluetooth device.
125   * The permission required by this interface is changed from DISCOVER_BLUETOOTH to ACCESS_BLUETOOTH.
126   *
127   * @permission ohos.permission.ACCESS_BLUETOOTH
128   * @param { string } deviceId - The address of the remote device to pair.
129   * @throws { BusinessError } 201 - Permission denied.
130   * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
131   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
132   * @throws { BusinessError } 801 - Capability not supported.
133   * @throws { BusinessError } 2900001 - Service stopped.
134   * @throws { BusinessError } 2900003 - Bluetooth disabled.
135   * @throws { BusinessError } 2900099 - Operation failed.
136   * @syscap SystemCapability.Communication.Bluetooth.Core
137   * @since 10
138   * @deprecated since 10
139   * @useinstead ohos.bluetooth.connection/connection#pairDevice
140   */
141  function pairDevice(deviceId: string): void;
142
143  /**
144   * Remove a paired remote device.
145   *
146   * @permission ohos.permission.DISCOVER_BLUETOOTH
147   * @param { string } deviceId - The address of the remote device to be removed.
148   * @throws { BusinessError } 201 - Permission denied.
149   * @throws { BusinessError } 202 - Non-system applications are not allowed to use system APIs.
150   * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
151   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
152   * @throws { BusinessError } 801 - Capability not supported.
153   * @throws { BusinessError } 2900001 - Service stopped.
154   * @throws { BusinessError } 2900003 - Bluetooth disabled.
155   * @throws { BusinessError } 2900099 - Operation failed.
156   * @syscap SystemCapability.Communication.Bluetooth.Core
157   * @systemapi Hide this for inner system use.
158   * @since 9
159   * @deprecated since 10
160   * @useinstead ohos.bluetooth.connection/connection#cancelPairedDevice
161   */
162  /**
163   * Remove a paired remote device.
164   * The permission required by this interface is changed from DISCOVER_BLUETOOTH to ACCESS_BLUETOOTH.
165   *
166   * @permission ohos.permission.ACCESS_BLUETOOTH
167   * @param { string } deviceId - The address of the remote device to be removed.
168   * @throws { BusinessError } 201 - Permission denied.
169   * @throws { BusinessError } 202 - Non-system applications are not allowed to use system APIs.
170   * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
171   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
172   * @throws { BusinessError } 801 - Capability not supported.
173   * @throws { BusinessError } 2900001 - Service stopped.
174   * @throws { BusinessError } 2900003 - Bluetooth disabled.
175   * @throws { BusinessError } 2900099 - Operation failed.
176   * @syscap SystemCapability.Communication.Bluetooth.Core
177   * @systemapi Hide this for inner system use.
178   * @since 10
179   * @deprecated since 10
180   * @useinstead ohos.bluetooth.connection/connection#cancelPairedDevice
181   */
182  function cancelPairedDevice(deviceId: string): void;
183
184  /**
185   * Obtains the name of a peer Bluetooth device.
186   *
187   * @permission ohos.permission.USE_BLUETOOTH
188   * @param { string } deviceId - The address of the remote device.
189   * @returns { string } Returns the device name in character string format.
190   * @throws { BusinessError } 201 - Permission denied.
191   * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
192   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
193   * @throws { BusinessError } 801 - Capability not supported.
194   * @throws { BusinessError } 2900001 - Service stopped.
195   * @throws { BusinessError } 2900003 - Bluetooth disabled.
196   * @throws { BusinessError } 2900099 - Operation failed.
197   * @syscap SystemCapability.Communication.Bluetooth.Core
198   * @since 9
199   * @deprecated since 10
200   * @useinstead ohos.bluetooth.connection/connection#getRemoteDeviceName
201   */
202  /**
203   * Obtains the name of a peer Bluetooth device.
204   * The permission required by this interface is changed from USE_BLUETOOTH to ACCESS_BLUETOOTH.
205   *
206   * @permission ohos.permission.ACCESS_BLUETOOTH
207   * @param { string } deviceId - The address of the remote device.
208   * @returns { string } Returns the device name in character string format.
209   * @throws { BusinessError } 201 - Permission denied.
210   * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
211   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
212   * @throws { BusinessError } 801 - Capability not supported.
213   * @throws { BusinessError } 2900001 - Service stopped.
214   * @throws { BusinessError } 2900003 - Bluetooth disabled.
215   * @throws { BusinessError } 2900099 - Operation failed.
216   * @syscap SystemCapability.Communication.Bluetooth.Core
217   * @since 10
218   * @deprecated since 10
219   * @useinstead ohos.bluetooth.connection/connection#getRemoteDeviceName
220   */
221  function getRemoteDeviceName(deviceId: string): string;
222
223  /**
224   * Obtains the class of a peer Bluetooth device.
225   *
226   * @permission ohos.permission.USE_BLUETOOTH
227   * @param { string } deviceId - The address of the remote device.
228   * @returns { DeviceClass } The class of the remote device, {@link DeviceClass}.
229   * @throws { BusinessError } 201 - Permission denied.
230   * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
231   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
232   * @throws { BusinessError } 801 - Capability not supported.
233   * @throws { BusinessError } 2900001 - Service stopped.
234   * @throws { BusinessError } 2900003 - Bluetooth disabled.
235   * @throws { BusinessError } 2900099 - Operation failed.
236   * @syscap SystemCapability.Communication.Bluetooth.Core
237   * @since 9
238   * @deprecated since 10
239   * @useinstead ohos.bluetooth.connection/connection#getRemoteDeviceClass
240   */
241  /**
242   * Obtains the class of a peer Bluetooth device.
243   * The permission required by this interface is changed from USE_BLUETOOTH to ACCESS_BLUETOOTH.
244   *
245   * @permission ohos.permission.ACCESS_BLUETOOTH
246   * @param { string } deviceId - The address of the remote device.
247   * @returns { DeviceClass } The class of the remote device, {@link DeviceClass}.
248   * @throws { BusinessError } 201 - Permission denied.
249   * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
250   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
251   * @throws { BusinessError } 801 - Capability not supported.
252   * @throws { BusinessError } 2900001 - Service stopped.
253   * @throws { BusinessError } 2900003 - Bluetooth disabled.
254   * @throws { BusinessError } 2900099 - Operation failed.
255   * @syscap SystemCapability.Communication.Bluetooth.Core
256   * @since 10
257   * @deprecated since 10
258   * @useinstead ohos.bluetooth.connection/connection#getRemoteDeviceClass
259   */
260  function getRemoteDeviceClass(deviceId: string): DeviceClass;
261
262  /**
263   * Enables Bluetooth on a device.
264   *
265   * @permission ohos.permission.DISCOVER_BLUETOOTH
266   * @throws { BusinessError } 201 - Permission denied.
267   * @throws { BusinessError } 801 - Capability not supported.
268   * @throws { BusinessError } 2900001 - Service stopped.
269   * @throws { BusinessError } 2900099 - Operation failed.
270   * @syscap SystemCapability.Communication.Bluetooth.Core
271   * @since 9
272   * @deprecated since 10
273   * @useinstead ohos.bluetooth.access/access#enableBluetooth
274   */
275  /**
276   * Enables Bluetooth on a device.
277   * The permission required by this interface is changed from DISCOVER_BLUETOOTH to ACCESS_BLUETOOTH.
278   *
279   * @permission ohos.permission.ACCESS_BLUETOOTH
280   * @throws { BusinessError } 201 - Permission denied.
281   * @throws { BusinessError } 801 - Capability not supported.
282   * @throws { BusinessError } 2900001 - Service stopped.
283   * @throws { BusinessError } 2900099 - Operation failed.
284   * @syscap SystemCapability.Communication.Bluetooth.Core
285   * @since 10
286   * @deprecated since 10
287   * @useinstead ohos.bluetooth.access/access#enableBluetooth
288   */
289  function enableBluetooth(): void;
290
291  /**
292   * Disables Bluetooth on a device.
293   *
294   * @permission ohos.permission.DISCOVER_BLUETOOTH
295   * @throws { BusinessError } 201 - Permission denied.
296   * @throws { BusinessError } 801 - Capability not supported.
297   * @throws { BusinessError } 2900001 - Service stopped.
298   * @throws { BusinessError } 2900099 - Operation failed.
299   * @syscap SystemCapability.Communication.Bluetooth.Core
300   * @since 9
301   * @deprecated since 10
302   * @useinstead ohos.bluetooth.access/access#disableBluetooth
303   */
304  /**
305   * Disables Bluetooth on a device.
306   * The permission required by this interface is changed from DISCOVER_BLUETOOTH to ACCESS_BLUETOOTH.
307   *
308   * @permission ohos.permission.ACCESS_BLUETOOTH
309   * @throws { BusinessError } 201 - Permission denied.
310   * @throws { BusinessError } 801 - Capability not supported.
311   * @throws { BusinessError } 2900001 - Service stopped.
312   * @throws { BusinessError } 2900099 - Operation failed.
313   * @syscap SystemCapability.Communication.Bluetooth.Core
314   * @since 10
315   * @deprecated since 10
316   * @useinstead ohos.bluetooth.access/access#disableBluetooth
317   */
318  function disableBluetooth(): void;
319
320  /**
321   * Obtains the Bluetooth local name of a device.
322   *
323   * @permission ohos.permission.USE_BLUETOOTH
324   * @returns { string } Returns the name the device.
325   * @throws { BusinessError } 201 - Permission denied.
326   * @throws { BusinessError } 801 - Capability not supported.
327   * @throws { BusinessError } 2900001 - Service stopped.
328   * @throws { BusinessError } 2900099 - Operation failed.
329   * @syscap SystemCapability.Communication.Bluetooth.Core
330   * @since 9
331   * @deprecated since 10
332   * @useinstead ohos.bluetooth.connection/connection#getLocalName
333   */
334  /**
335   * Obtains the Bluetooth local name of a device.
336   * The permission required by this interface is changed from USE_BLUETOOTH to ACCESS_BLUETOOTH.
337   *
338   * @permission ohos.permission.ACCESS_BLUETOOTH
339   * @returns { string } Returns the name the device.
340   * @throws { BusinessError } 201 - Permission denied.
341   * @throws { BusinessError } 801 - Capability not supported.
342   * @throws { BusinessError } 2900001 - Service stopped.
343   * @throws { BusinessError } 2900099 - Operation failed.
344   * @syscap SystemCapability.Communication.Bluetooth.Core
345   * @since 10
346   * @deprecated since 10
347   * @useinstead ohos.bluetooth.connection/connection#getLocalName
348   */
349  function getLocalName(): string;
350
351  /**
352   * Obtains the list of Bluetooth devices that have been paired with the current device.
353   *
354   * @permission ohos.permission.USE_BLUETOOTH
355   * @returns { Array<string> } Returns a list of paired Bluetooth devices's address.
356   * @throws { BusinessError } 201 - Permission denied.
357   * @throws { BusinessError } 801 - Capability not supported.
358   * @throws { BusinessError } 2900001 - Service stopped.
359   * @throws { BusinessError } 2900003 - Bluetooth disabled.
360   * @throws { BusinessError } 2900099 - Operation failed.
361   * @syscap SystemCapability.Communication.Bluetooth.Core
362   * @since 9
363   * @deprecated since 10
364   * @useinstead ohos.bluetooth.connection/connection#getPairedDevices
365   */
366  /**
367   * Obtains the list of Bluetooth devices that have been paired with the current device.
368   * The permission required by this interface is changed from USE_BLUETOOTH to ACCESS_BLUETOOTH.
369   *
370   * @permission ohos.permission.ACCESS_BLUETOOTH
371   * @returns { Array<string> } Returns a list of paired Bluetooth devices's address.
372   * @throws { BusinessError } 201 - Permission denied.
373   * @throws { BusinessError } 801 - Capability not supported.
374   * @throws { BusinessError } 2900001 - Service stopped.
375   * @throws { BusinessError } 2900003 - Bluetooth disabled.
376   * @throws { BusinessError } 2900099 - Operation failed.
377   * @syscap SystemCapability.Communication.Bluetooth.Core
378   * @since 10
379   * @deprecated since 10
380   * @useinstead ohos.bluetooth.connection/connection#getPairedDevices
381   */
382  function getPairedDevices(): Array<string>;
383
384  /**
385   * Obtains the connection state of profile.
386   *
387   * @permission ohos.permission.USE_BLUETOOTH
388   * @param { ProfileId } profileId - The profile id.
389   * @returns { ProfileConnectionState } Returns the connection state.
390   * @throws { BusinessError } 201 - Permission denied.
391   * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
392   * <br>2. Incorrect parameter types.
393   * @throws { BusinessError } 801 - Capability not supported.
394   * @throws { BusinessError } 2900001 - Service stopped.
395   * @throws { BusinessError } 2900003 - Bluetooth disabled.
396   * @throws { BusinessError } 2900004 - Profile not supported.
397   * @throws { BusinessError } 2900099 - Operation failed.
398   * @syscap SystemCapability.Communication.Bluetooth.Core
399   * @since 9
400   * @deprecated since 10
401   * @useinstead ohos.bluetooth.connection/connection#getProfileConnectionState
402   */
403  /**
404   * Obtains the connection state of profile.
405   * The permission required by this interface is changed from USE_BLUETOOTH to ACCESS_BLUETOOTH.
406   *
407   * @permission ohos.permission.ACCESS_BLUETOOTH
408   * @param { ProfileId } profileId - The profile id.
409   * @returns { ProfileConnectionState } Returns the connection state.
410   * @throws { BusinessError } 201 - Permission denied.
411   * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
412   * <br>2. Incorrect parameter types.
413   * @throws { BusinessError } 801 - Capability not supported.
414   * @throws { BusinessError } 2900001 - Service stopped.
415   * @throws { BusinessError } 2900003 - Bluetooth disabled.
416   * @throws { BusinessError } 2900004 - Profile not supported.
417   * @throws { BusinessError } 2900099 - Operation failed.
418   * @syscap SystemCapability.Communication.Bluetooth.Core
419   * @since 10
420   * @deprecated since 10
421   * @useinstead ohos.bluetooth.connection/connection#getProfileConnectionState
422   */
423  function getProfileConnectionState(profileId: ProfileId): ProfileConnectionState;
424
425  /**
426   * Sets the confirmation of pairing with a certain device.
427   *
428   * @permission ohos.permission.MANAGE_BLUETOOTH
429   * @param { string } device - The address of the remote device.
430   * @param { boolean } accept - Indicates whether to accept the pairing request, {@code true} indicates accept or {@code false} otherwise.
431   * @throws { BusinessError } 201 - Permission denied.
432   * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
433   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
434   * @throws { BusinessError } 801 - Capability not supported.
435   * @throws { BusinessError } 2900001 - Service stopped.
436   * @throws { BusinessError } 2900003 - Bluetooth disabled.
437   * @throws { BusinessError } 2900099 - Operation failed.
438   * @syscap SystemCapability.Communication.Bluetooth.Core
439   * @since 9
440   * @deprecated since 10
441   * @useinstead ohos.bluetooth.connection/connection#setDevicePairingConfirmation
442   */
443  /**
444   * Sets the confirmation of pairing with a certain device.
445   * The permission required by this interface is changed from MANAGE_BLUETOOTH to ACCESS_BLUETOOTH and MANAGE_BLUETOOTH.
446   *
447   * @permission ohos.permission.ACCESS_BLUETOOTH and ohos.permission.MANAGE_BLUETOOTH
448   * @param { string } device - The address of the remote device.
449   * @param { boolean } accept - Indicates whether to accept the pairing request, {@code true} indicates accept or {@code false} otherwise.
450   * @throws { BusinessError } 201 - Permission denied.
451   * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
452   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
453   * @throws { BusinessError } 801 - Capability not supported.
454   * @throws { BusinessError } 2900001 - Service stopped.
455   * @throws { BusinessError } 2900003 - Bluetooth disabled.
456   * @throws { BusinessError } 2900099 - Operation failed.
457   * @syscap SystemCapability.Communication.Bluetooth.Core
458   * @since 10
459   * @deprecated since 10
460   * @useinstead ohos.bluetooth.connection/connection#setDevicePairingConfirmation
461   */
462  function setDevicePairingConfirmation(device: string, accept: boolean): void;
463
464  /**
465   * Sets the Bluetooth friendly name of a device.
466   *
467   * @permission ohos.permission.DISCOVER_BLUETOOTH
468   * @param { string } name - Indicates a valid Bluetooth name.
469   * @throws { BusinessError } 201 - Permission denied.
470   * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
471   * <br>2. Incorrect parameter types.
472   * @throws { BusinessError } 801 - Capability not supported.
473   * @throws { BusinessError } 2900001 - Service stopped.
474   * @throws { BusinessError } 2900003 - Bluetooth disabled.
475   * @throws { BusinessError } 2900099 - Operation failed.
476   * @syscap SystemCapability.Communication.Bluetooth.Core
477   * @since 9
478   * @deprecated since 10
479   * @useinstead ohos.bluetooth.connection/connection#setLocalName
480   */
481  /**
482   * Sets the Bluetooth friendly name of a device.
483   * The permission required by this interface is changed from DISCOVER_BLUETOOTH to ACCESS_BLUETOOTH.
484   *
485   * @permission ohos.permission.ACCESS_BLUETOOTH
486   * @param { string } name - Indicates a valid Bluetooth name.
487   * @throws { BusinessError } 201 - Permission denied.
488   * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
489   * <br>2. Incorrect parameter types.
490   * @throws { BusinessError } 801 - Capability not supported.
491   * @throws { BusinessError } 2900001 - Service stopped.
492   * @throws { BusinessError } 2900003 - Bluetooth disabled.
493   * @throws { BusinessError } 2900099 - Operation failed.
494   * @syscap SystemCapability.Communication.Bluetooth.Core
495   * @since 10
496   * @deprecated since 10
497   * @useinstead ohos.bluetooth.connection/connection#setLocalName
498   */
499  function setLocalName(name: string): void;
500
501  /**
502   * Sets the Bluetooth scan mode for a device.
503   *
504   * @permission ohos.permission.USE_BLUETOOTH
505   * @param { ScanMode } mode - Indicates the Bluetooth scan mode to set, {@link ScanMode}.
506   * @param { number } duration - Indicates the duration in seconds, in which the host is discoverable.
507   * @throws { BusinessError } 201 - Permission denied.
508   * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
509   * <br>2. Incorrect parameter types.
510   * @throws { BusinessError } 801 - Capability not supported.
511   * @throws { BusinessError } 2900001 - Service stopped.
512   * @throws { BusinessError } 2900003 - Bluetooth disabled.
513   * @throws { BusinessError } 2900099 - Operation failed.
514   * @syscap SystemCapability.Communication.Bluetooth.Core
515   * @since 9
516   * @deprecated since 10
517   * @useinstead ohos.bluetooth.connection/connection#setBluetoothScanMode
518   */
519  /**
520   * Sets the Bluetooth scan mode for a device.
521   * The permission required by this interface is changed from USE_BLUETOOTH to ACCESS_BLUETOOTH.
522   *
523   * @permission ohos.permission.ACCESS_BLUETOOTH
524   * @param { ScanMode } mode - Indicates the Bluetooth scan mode to set, {@link ScanMode}.
525   * @param { number } duration - Indicates the duration in seconds, in which the host is discoverable.
526   * @throws { BusinessError } 201 - Permission denied.
527   * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
528   * <br>2. Incorrect parameter types.
529   * @throws { BusinessError } 801 - Capability not supported.
530   * @throws { BusinessError } 2900001 - Service stopped.
531   * @throws { BusinessError } 2900003 - Bluetooth disabled.
532   * @throws { BusinessError } 2900099 - Operation failed.
533   * @syscap SystemCapability.Communication.Bluetooth.Core
534   * @since 10
535   * @deprecated since 10
536   * @useinstead ohos.bluetooth.connection/connection#setBluetoothScanMode
537   */
538  function setBluetoothScanMode(mode: ScanMode, duration: number): void;
539
540  /**
541   * Obtains the Bluetooth scanning mode of a device.
542   *
543   * @permission ohos.permission.USE_BLUETOOTH
544   * @returns { ScanMode } Returns the Bluetooth scanning mode, {@link ScanMode}.
545   * @throws { BusinessError } 201 - Permission denied.
546   * @throws { BusinessError } 801 - Capability not supported.
547   * @throws { BusinessError } 2900001 - Service stopped.
548   * @throws { BusinessError } 2900003 - Bluetooth disabled.
549   * @throws { BusinessError } 2900099 - Operation failed.
550   * @syscap SystemCapability.Communication.Bluetooth.Core
551   * @since 9
552   * @deprecated since 10
553   * @useinstead ohos.bluetooth.connection/connection#getBluetoothScanMode
554   */
555  /**
556   * Obtains the Bluetooth scanning mode of a device.
557   * The permission required by this interface is changed from USE_BLUETOOTH to ACCESS_BLUETOOTH.
558   *
559   * @permission ohos.permission.ACCESS_BLUETOOTH
560   * @returns { ScanMode } Returns the Bluetooth scanning mode, {@link ScanMode}.
561   * @throws { BusinessError } 201 - Permission denied.
562   * @throws { BusinessError } 801 - Capability not supported.
563   * @throws { BusinessError } 2900001 - Service stopped.
564   * @throws { BusinessError } 2900003 - Bluetooth disabled.
565   * @throws { BusinessError } 2900099 - Operation failed.
566   * @syscap SystemCapability.Communication.Bluetooth.Core
567   * @since 10
568   * @deprecated since 10
569   * @useinstead ohos.bluetooth.connection/connection#getBluetoothScanMode
570   */
571  function getBluetoothScanMode(): ScanMode;
572
573  /**
574   * Starts scanning Bluetooth devices.
575   *
576   * @permission ohos.permission.DISCOVER_BLUETOOTH and ohos.permission.LOCATION
577   *     and ohos.permission.APPROXIMATELY_LOCATION
578   * @throws { BusinessError } 201 - Permission denied.
579   * @throws { BusinessError } 801 - Capability not supported.
580   * @throws { BusinessError } 2900001 - Service stopped.
581   * @throws { BusinessError } 2900003 - Bluetooth disabled.
582   * @throws { BusinessError } 2900099 - Operation failed.
583   * @syscap SystemCapability.Communication.Bluetooth.Core
584   * @since 9
585   * @deprecated since 10
586   * @useinstead ohos.bluetooth.connection/connection#startBluetoothDiscovery
587   */
588  /**
589   * Starts scanning Bluetooth devices.
590   * The permission required by this interface is changed from DISCOVER_BLUETOOTH and LOCATION and APPROXIMATELY_LOCATION to ACCESS_BLUETOOTH.
591   *
592   * @permission ohos.permission.ACCESS_BLUETOOTH
593   * @throws { BusinessError } 201 - Permission denied.
594   * @throws { BusinessError } 801 - Capability not supported.
595   * @throws { BusinessError } 2900001 - Service stopped.
596   * @throws { BusinessError } 2900003 - Bluetooth disabled.
597   * @throws { BusinessError } 2900099 - Operation failed.
598   * @syscap SystemCapability.Communication.Bluetooth.Core
599   * @since 10
600   * @deprecated since 10
601   * @useinstead ohos.bluetooth.connection/connection#startBluetoothDiscovery
602   */
603  function startBluetoothDiscovery(): void;
604
605  /**
606   * Stops Bluetooth device scanning.
607   *
608   * @permission ohos.permission.DISCOVER_BLUETOOTH
609   * @throws { BusinessError } 201 - Permission denied.
610   * @throws { BusinessError } 801 - Capability not supported.
611   * @throws { BusinessError } 2900001 - Service stopped.
612   * @throws { BusinessError } 2900003 - Bluetooth disabled.
613   * @throws { BusinessError } 2900099 - Operation failed.
614   * @syscap SystemCapability.Communication.Bluetooth.Core
615   * @since 9
616   * @deprecated since 10
617   * @useinstead ohos.bluetooth.connection/connection#stopBluetoothDiscovery
618   */
619  /**
620   * Stops Bluetooth device scanning.
621   * The permission required by this interface is changed from DISCOVER_BLUETOOTH to ACCESS_BLUETOOTH.
622   *
623   * @permission ohos.permission.ACCESS_BLUETOOTH
624   * @throws { BusinessError } 201 - Permission denied.
625   * @throws { BusinessError } 801 - Capability not supported.
626   * @throws { BusinessError } 2900001 - Service stopped.
627   * @throws { BusinessError } 2900003 - Bluetooth disabled.
628   * @throws { BusinessError } 2900099 - Operation failed.
629   * @syscap SystemCapability.Communication.Bluetooth.Core
630   * @since 10
631   * @deprecated since 10
632   * @useinstead ohos.bluetooth.connection/connection#stopBluetoothDiscovery
633   */
634  function stopBluetoothDiscovery(): void;
635
636  /**
637   * Subscribe the event reported when a remote Bluetooth device is discovered.
638   *
639   * @permission ohos.permission.USE_BLUETOOTH
640   * @param { 'bluetoothDeviceFind' } type - Type of the discovering event to listen for.
641   * @param { Callback<Array<string>> } callback - Callback used to listen for the discovering event.
642   * @throws { BusinessError } 201 - Permission denied.
643   * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
644   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
645   * @throws { BusinessError } 801 - Capability not supported.
646   * @throws { BusinessError } 2900099 - Operation failed.
647   * @syscap SystemCapability.Communication.Bluetooth.Core
648   * @since 9
649   * @deprecated since 10
650   * @useinstead ohos.bluetooth.connection/connection.on#event:bluetoothDeviceFind
651   */
652  /**
653   * Subscribe the event reported when a remote Bluetooth device is discovered.
654   * The permission required by this interface is changed from USE_BLUETOOTH to ACCESS_BLUETOOTH.
655   *
656   * @permission ohos.permission.ACCESS_BLUETOOTH
657   * @param { 'bluetoothDeviceFind' } type - Type of the discovering event to listen for.
658   * @param { Callback<Array<string>> } callback - Callback used to listen for the discovering event.
659   * @throws { BusinessError } 201 - Permission denied.
660   * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
661   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
662   * @throws { BusinessError } 801 - Capability not supported.
663   * @throws { BusinessError } 2900099 - Operation failed.
664   * @syscap SystemCapability.Communication.Bluetooth.Core
665   * @since 10
666   * @deprecated since 10
667   * @useinstead ohos.bluetooth.connection/connection.on#event:bluetoothDeviceFind
668   */
669  function on(type: 'bluetoothDeviceFind', callback: Callback<Array<string>>): void;
670
671  /**
672   * Unsubscribe the event reported when a remote Bluetooth device is discovered.
673   *
674   * @permission ohos.permission.USE_BLUETOOTH
675   * @param { 'bluetoothDeviceFind' } type - Type of the discovering event to listen for.
676   * @param { Callback<Array<string>> } callback - Callback used to listen for the discovering event.
677   * @throws { BusinessError } 201 - Permission denied.
678   * @throws { BusinessError } 801 - Capability not supported.
679   * @throws { BusinessError } 2900099 - Operation failed.
680   * @syscap SystemCapability.Communication.Bluetooth.Core
681   * @since 9
682   * @deprecated since 10
683   * @useinstead ohos.bluetooth.connection/connection.off#event:bluetoothDeviceFind
684   */
685  /**
686   * Unsubscribe the event reported when a remote Bluetooth device is discovered.
687   * The permission required by this interface is changed from USE_BLUETOOTH to ACCESS_BLUETOOTH.
688   *
689   * @permission ohos.permission.ACCESS_BLUETOOTH
690   * @param { 'bluetoothDeviceFind' } type - Type of the discovering event to listen for.
691   * @param { Callback<Array<string>> } callback - Callback used to listen for the discovering event.
692   * @throws { BusinessError } 201 - Permission denied.
693   * @throws { BusinessError } 801 - Capability not supported.
694   * @throws { BusinessError } 2900099 - Operation failed.
695   * @syscap SystemCapability.Communication.Bluetooth.Core
696   * @since 10
697   * @deprecated since 10
698   * @useinstead ohos.bluetooth.connection/connection.off#event:bluetoothDeviceFind
699   */
700  function off(type: 'bluetoothDeviceFind', callback?: Callback<Array<string>>): void;
701
702  /**
703   * Subscribe the event reported when a remote Bluetooth device is bonded.
704   *
705   * @permission ohos.permission.USE_BLUETOOTH
706   * @param { 'bondStateChange' } type - Type of the bond state event to listen for.
707   * @param { Callback<BondStateParam> } callback - Callback used to listen for the bond state event, {@link BondStateParam}.
708   * @throws { BusinessError } 201 - Permission denied.
709   * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
710   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
711   * @throws { BusinessError } 801 - Capability not supported.
712   * @throws { BusinessError } 2900099 - Operation failed.
713   * @syscap SystemCapability.Communication.Bluetooth.Core
714   * @since 9
715   * @deprecated since 10
716   * @useinstead ohos.bluetooth.connection/connection.on#event:bondStateChange
717   */
718  /**
719   * Subscribe the event reported when a remote Bluetooth device is bonded.
720   * The permission required by this interface is changed from USE_BLUETOOTH to ACCESS_BLUETOOTH.
721   *
722   * @permission ohos.permission.ACCESS_BLUETOOTH
723   * @param { 'bondStateChange' } type - Type of the bond state event to listen for.
724   * @param { Callback<BondStateParam> } callback - Callback used to listen for the bond state event, {@link BondStateParam}.
725   * @throws { BusinessError } 201 - Permission denied.
726   * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
727   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
728   * @throws { BusinessError } 801 - Capability not supported.
729   * @throws { BusinessError } 2900099 - Operation failed.
730   * @syscap SystemCapability.Communication.Bluetooth.Core
731   * @since 10
732   * @deprecated since 10
733   * @useinstead ohos.bluetooth.connection/connection.on#event:bondStateChange
734   */
735  function on(type: 'bondStateChange', callback: Callback<BondStateParam>): void;
736
737  /**
738   * Unsubscribe the event reported when a remote Bluetooth device is bonded.
739   *
740   * @permission ohos.permission.USE_BLUETOOTH
741   * @param { 'bondStateChange' } type - Type of the bond state event to listen for.
742   * @param { Callback<BondStateParam> } callback - Callback used to listen for the bond state event.
743   * @throws { BusinessError } 201 - Permission denied.
744   * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
745   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
746   * @throws { BusinessError } 801 - Capability not supported.
747   * @throws { BusinessError } 2900099 - Operation failed.
748   * @syscap SystemCapability.Communication.Bluetooth.Core
749   * @since 9
750   * @deprecated since 10
751   * @useinstead ohos.bluetooth.connection/connection.off#event:bondStateChange
752   */
753  /**
754   * Unsubscribe the event reported when a remote Bluetooth device is bonded.
755   * The permission required by this interface is changed from USE_BLUETOOTH to ACCESS_BLUETOOTH.
756   *
757   * @permission ohos.permission.ACCESS_BLUETOOTH
758   * @param { 'bondStateChange' } type - Type of the bond state event to listen for.
759   * @param { Callback<BondStateParam> } callback - Callback used to listen for the bond state event.
760   * @throws { BusinessError } 201 - Permission denied.
761   * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
762   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
763   * @throws { BusinessError } 801 - Capability not supported.
764   * @throws { BusinessError } 2900099 - Operation failed.
765   * @syscap SystemCapability.Communication.Bluetooth.Core
766   * @since 10
767   * @deprecated since 10
768   * @useinstead ohos.bluetooth.connection/connection.off#event:bondStateChange
769   */
770  function off(type: 'bondStateChange', callback?: Callback<BondStateParam>): void;
771
772  /**
773   * Subscribe the event of a pairing request from a remote Bluetooth device.
774   *
775   * @permission ohos.permission.DISCOVER_BLUETOOTH
776   * @param { 'pinRequired' } type - Type of the pairing request event to listen for.
777   * @param { Callback<PinRequiredParam> } callback - Callback used to listen for the pairing request event.
778   * @throws { BusinessError } 201 - Permission denied.
779   * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
780   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
781   * @throws { BusinessError } 801 - Capability not supported.
782   * @throws { BusinessError } 2900099 - Operation failed.
783   * @syscap SystemCapability.Communication.Bluetooth.Core
784   * @since 9
785   * @deprecated since 10
786   * @useinstead ohos.bluetooth.connection/connection.on#event:pinRequired
787   */
788  /**
789   * Subscribe the event of a pairing request from a remote Bluetooth device.
790   * The permission required by this interface is changed from DISCOVER_BLUETOOTH to ACCESS_BLUETOOTH.
791   *
792   * @permission ohos.permission.ACCESS_BLUETOOTH
793   * @param { 'pinRequired' } type - Type of the pairing request event to listen for.
794   * @param { Callback<PinRequiredParam> } callback - Callback used to listen for the pairing request event.
795   * @throws { BusinessError } 201 - Permission denied.
796   * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
797   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
798   * @throws { BusinessError } 801 - Capability not supported.
799   * @throws { BusinessError } 2900099 - Operation failed.
800   * @syscap SystemCapability.Communication.Bluetooth.Core
801   * @since 10
802   * @deprecated since 10
803   * @useinstead ohos.bluetooth.connection/connection.on#event:pinRequired
804   */
805  function on(type: 'pinRequired', callback: Callback<PinRequiredParam>): void;
806
807  /**
808   * Unsubscribe the event of a pairing request from a remote Bluetooth device.
809   *
810   * @permission ohos.permission.DISCOVER_BLUETOOTH
811   * @param { 'pinRequired' } type - Type of the pairing request event to listen for.
812   * @param { Callback<PinRequiredParam> } callback - Callback used to listen for the pairing request event.
813   * @throws { BusinessError } 201 - Permission denied.
814   * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
815   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
816   * @throws { BusinessError } 801 - Capability not supported.
817   * @throws { BusinessError } 2900099 - Operation failed.
818   * @syscap SystemCapability.Communication.Bluetooth.Core
819   * @since 9
820   * @deprecated since 10
821   * @useinstead ohos.bluetooth.connection/connection.off#event:pinRequired
822   */
823  /**
824   * Unsubscribe the event of a pairing request from a remote Bluetooth device.
825   * The permission required by this interface is changed from DISCOVER_BLUETOOTH to ACCESS_BLUETOOTH.
826   *
827   * @permission ohos.permission.ACCESS_BLUETOOTH
828   * @param { 'pinRequired' } type - Type of the pairing request event to listen for.
829   * @param { Callback<PinRequiredParam> } callback - Callback used to listen for the pairing request event.
830   * @throws { BusinessError } 201 - Permission denied.
831   * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
832   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
833   * @throws { BusinessError } 801 - Capability not supported.
834   * @throws { BusinessError } 2900099 - Operation failed.
835   * @syscap SystemCapability.Communication.Bluetooth.Core
836   * @since 10
837   * @deprecated since 10
838   * @useinstead ohos.bluetooth.connection/connection.off#event:pinRequired
839   */
840  function off(type: 'pinRequired', callback?: Callback<PinRequiredParam>): void;
841
842  /**
843   * Subscribe the event reported when the Bluetooth state changes.
844   *
845   * @permission ohos.permission.USE_BLUETOOTH
846   * @param { 'stateChange' } type - Type of the Bluetooth state changes event to listen for.
847   * @param { Callback<BluetoothState> } callback - Callback used to listen for the Bluetooth state event.
848   * @throws { BusinessError } 201 - Permission denied.
849   * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
850   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
851   * @throws { BusinessError } 801 - Capability not supported.
852   * @throws { BusinessError } 2900099 - Operation failed.
853   * @syscap SystemCapability.Communication.Bluetooth.Core
854   * @since 9
855   * @deprecated since 10
856   * @useinstead ohos.bluetooth.access/access.on#event:stateChange
857   */
858  /**
859   * Subscribe the event reported when the Bluetooth state changes.
860   * The permission required by this interface is changed from USE_BLUETOOTH to ACCESS_BLUETOOTH.
861   *
862   * @permission ohos.permission.ACCESS_BLUETOOTH
863   * @param { 'stateChange' } type - Type of the Bluetooth state changes event to listen for.
864   * @param { Callback<BluetoothState> } callback - Callback used to listen for the Bluetooth state event.
865   * @throws { BusinessError } 201 - Permission denied.
866   * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
867   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
868   * @throws { BusinessError } 801 - Capability not supported.
869   * @throws { BusinessError } 2900099 - Operation failed.
870   * @syscap SystemCapability.Communication.Bluetooth.Core
871   * @since 10
872   * @deprecated since 10
873   * @useinstead ohos.bluetooth.access/access.on#event:stateChange
874   */
875  function on(type: 'stateChange', callback: Callback<BluetoothState>): void;
876
877  /**
878   * Unsubscribe the event reported when the Bluetooth state changes.
879   *
880   * @permission ohos.permission.USE_BLUETOOTH
881   * @param { 'stateChange' } type - Type of the Bluetooth state changes event to listen for.
882   * @param { Callback<BluetoothState> } callback - Callback used to listen for the Bluetooth state event.
883   * @throws { BusinessError } 201 - Permission denied.
884   * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
885   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
886   * @throws { BusinessError } 801 - Capability not supported.
887   * @throws { BusinessError } 2900099 - Operation failed.
888   * @syscap SystemCapability.Communication.Bluetooth.Core
889   * @since 9
890   * @deprecated since 10
891   * @useinstead ohos.bluetooth.access/access.off#event:stateChange
892   */
893  /**
894   * Unsubscribe the event reported when the Bluetooth state changes.
895   * The permission required by this interface is changed from USE_BLUETOOTH to ACCESS_BLUETOOTH.
896   *
897   * @permission ohos.permission.ACCESS_BLUETOOTH
898   * @param { 'stateChange' } type - Type of the Bluetooth state changes event to listen for.
899   * @param { Callback<BluetoothState> } callback - Callback used to listen for the Bluetooth state event.
900   * @throws { BusinessError } 201 - Permission denied.
901   * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
902   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
903   * @throws { BusinessError } 801 - Capability not supported.
904   * @throws { BusinessError } 2900099 - Operation failed.
905   * @syscap SystemCapability.Communication.Bluetooth.Core
906   * @since 10
907   * @deprecated since 10
908   * @useinstead ohos.bluetooth.access/access.off#event:stateChange
909   */
910  function off(type: 'stateChange', callback?: Callback<BluetoothState>): void;
911
912  /**
913   * Creates a Bluetooth server listening socket.
914   *
915   * @permission ohos.permission.USE_BLUETOOTH
916   * @param { string } name - Indicates the service name.
917   * @param { SppOption } option - Indicates the listen parameters {@link SppOption}.
918   * @param { AsyncCallback<number> } callback - Callback used to return a server socket ID.
919   * @throws { BusinessError } 201 - Permission denied.
920   * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
921   * <br>2. Incorrect parameter types.
922   * @throws { BusinessError } 801 - Capability not supported.
923   * @throws { BusinessError } 2900001 - Service stopped.
924   * @throws { BusinessError } 2900003 - Bluetooth disabled.
925   * @throws { BusinessError } 2900004 - Profile not supported.
926   * @throws { BusinessError } 2900099 - Operation failed.
927   * @syscap SystemCapability.Communication.Bluetooth.Core
928   * @since 9
929   * @deprecated since 10
930   * @useinstead ohos.bluetooth.socket/socket#sppListen
931   */
932  /**
933   * Creates a Bluetooth server listening socket.
934   * The permission required by this interface is changed from USE_BLUETOOTH to ACCESS_BLUETOOTH.
935   *
936   * @permission ohos.permission.ACCESS_BLUETOOTH
937   * @param { string } name - Indicates the service name.
938   * @param { SppOption } option - Indicates the listen parameters {@link SppOption}.
939   * @param { AsyncCallback<number> } callback - Callback used to return a server socket ID.
940   * @throws { BusinessError } 201 - Permission denied.
941   * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
942   * <br>2. Incorrect parameter types.
943   * @throws { BusinessError } 801 - Capability not supported.
944   * @throws { BusinessError } 2900001 - Service stopped.
945   * @throws { BusinessError } 2900003 - Bluetooth disabled.
946   * @throws { BusinessError } 2900004 - Profile not supported.
947   * @throws { BusinessError } 2900099 - Operation failed.
948   * @syscap SystemCapability.Communication.Bluetooth.Core
949   * @since 10
950   * @deprecated since 10
951   * @useinstead ohos.bluetooth.socket/socket#sppListen
952   */
953  function sppListen(name: string, option: SppOption, callback: AsyncCallback<number>): void;
954
955  /**
956   * Waits for a remote device to connect.
957   *
958   * @param { number } serverSocket - Indicates the server socket ID, returned by {@link sppListen}.
959   * @param { AsyncCallback<number> } callback - Callback used to return a client socket ID.
960   * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
961   * <br>2. Incorrect parameter types.
962   * @throws { BusinessError } 801 - Capability not supported.
963   * @throws { BusinessError } 2900001 - Service stopped.
964   * @throws { BusinessError } 2900003 - Bluetooth disabled.
965   * @throws { BusinessError } 2900004 - Profile not supported.
966   * @throws { BusinessError } 2900099 - Operation failed.
967   * @syscap SystemCapability.Communication.Bluetooth.Core
968   * @since 9
969   * @deprecated since 10
970   * @useinstead ohos.bluetooth.socket/socket#sppAccept
971   */
972  function sppAccept(serverSocket: number, callback: AsyncCallback<number>): void;
973
974  /**
975   * Connects to a remote device over the socket.
976   *
977   * @permission ohos.permission.USE_BLUETOOTH
978   * @param { string } device - The address of the remote device to connect.
979   * @param { SppOption } option - Indicates the connect parameters {@link SppOption}.
980   * @param { AsyncCallback<number> } callback - Callback used to return a client socket ID.
981   * @throws { BusinessError } 201 - Permission denied.
982   * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
983   * <br>2. Incorrect parameter types.
984   * @throws { BusinessError } 801 - Capability not supported.
985   * @throws { BusinessError } 2900001 - Service stopped.
986   * @throws { BusinessError } 2900003 - Bluetooth disabled.
987   * @throws { BusinessError } 2900004 - Profile not supported.
988   * @throws { BusinessError } 2900099 - Operation failed.
989   * @syscap SystemCapability.Communication.Bluetooth.Core
990   * @since 9
991   * @deprecated since 10
992   * @useinstead ohos.bluetooth.socket/socket#sppConnect
993   */
994  /**
995   * Connects to a remote device over the socket.
996   * The permission required by this interface is changed from USE_BLUETOOTH to ACCESS_BLUETOOTH.
997   *
998   * @permission ohos.permission.ACCESS_BLUETOOTH
999   * @param { string } device - The address of the remote device to connect.
1000   * @param { SppOption } option - Indicates the connect parameters {@link SppOption}.
1001   * @param { AsyncCallback<number> } callback - Callback used to return a client socket ID.
1002   * @throws { BusinessError } 201 - Permission denied.
1003   * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
1004   * <br>2. Incorrect parameter types.
1005   * @throws { BusinessError } 801 - Capability not supported.
1006   * @throws { BusinessError } 2900001 - Service stopped.
1007   * @throws { BusinessError } 2900003 - Bluetooth disabled.
1008   * @throws { BusinessError } 2900004 - Profile not supported.
1009   * @throws { BusinessError } 2900099 - Operation failed.
1010   * @syscap SystemCapability.Communication.Bluetooth.Core
1011   * @since 10
1012   * @deprecated since 10
1013   * @useinstead ohos.bluetooth.socket/socket#sppConnect
1014   */
1015  function sppConnect(device: string, option: SppOption, callback: AsyncCallback<number>): void;
1016
1017  /**
1018   * Disables an spp server socket and releases related resources.
1019   *
1020   * @param { number } socket - Indicates the server socket ID, returned by {@link sppListen}.
1021   * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
1022   * <br>2. Incorrect parameter types.
1023   * @throws { BusinessError } 801 - Capability not supported.
1024   * @throws { BusinessError } 2900001 - Service stopped.
1025   * @throws { BusinessError } 2900099 - Operation failed.
1026   * @syscap SystemCapability.Communication.Bluetooth.Core
1027   * @since 9
1028   * @deprecated since 10
1029   * @useinstead ohos.bluetooth.socket/socket#sppCloseServerSocket
1030   */
1031  function sppCloseServerSocket(socket: number): void;
1032
1033  /**
1034   * Disables an spp client socket and releases related resources.
1035   *
1036   * @param { number } socket - Indicates the client socket ID, returned by {@link sppAccept} or {@link sppConnect}.
1037   * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
1038   * <br>2. Incorrect parameter types.
1039   * @throws { BusinessError } 801 - Capability not supported.
1040   * @throws { BusinessError } 2900001 - Service stopped.
1041   * @throws { BusinessError } 2900099 - Operation failed.
1042   * @syscap SystemCapability.Communication.Bluetooth.Core
1043   * @since 9
1044   * @deprecated since 10
1045   * @useinstead ohos.bluetooth.socket/socket#sppCloseClientSocket
1046   */
1047  function sppCloseClientSocket(socket: number): void;
1048
1049  /**
1050   * Write data through the socket.
1051   *
1052   * @param { number } clientSocket - Indicates the client socket ID, returned by {@link sppAccept} or {@link sppConnect}.
1053   * @param { ArrayBuffer } data - Indicates the data to write.
1054   * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
1055   * <br>2. Incorrect parameter types.
1056   * @throws { BusinessError } 801 - Capability not supported.
1057   * @throws { BusinessError } 2901054 - IO error.
1058   * @throws { BusinessError } 2900099 - Operation failed.
1059   * @syscap SystemCapability.Communication.Bluetooth.Core
1060   * @since 9
1061   * @deprecated since 10
1062   * @useinstead ohos.bluetooth.socket/socket#sppWrite
1063   */
1064  function sppWrite(clientSocket: number, data: ArrayBuffer): void;
1065
1066  /**
1067   * Subscribe the event reported when data is read from the socket.
1068   *
1069   * @param { 'sppRead' } type - Type of the spp read event to listen for.
1070   * @param { number } clientSocket - Client socket ID, which is obtained by sppAccept or sppConnect.
1071   * @param { Callback<ArrayBuffer> } callback - Callback used to listen for the spp read event.
1072   * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
1073   * <br>2. Incorrect parameter types.
1074   * @throws { BusinessError } 801 - Capability not supported.
1075   * @throws { BusinessError } 2901054 - IO error.
1076   * @throws { BusinessError } 2900099 - Operation failed.
1077   * @syscap SystemCapability.Communication.Bluetooth.Core
1078   * @since 9
1079   * @deprecated since 10
1080   * @useinstead ohos.bluetooth.socket/socket.on#event:sppRead
1081   */
1082  function on(type: 'sppRead', clientSocket: number, callback: Callback<ArrayBuffer>): void;
1083
1084  /**
1085   * Unsubscribe the event reported when data is read from the socket.
1086   *
1087   * @param { 'sppRead' } type - Type of the spp read event to listen for.
1088   * @param { number } clientSocket - Client socket ID, which is obtained by sppAccept or sppConnect.
1089   * @param { Callback<ArrayBuffer> } callback - Callback used to listen for the spp read event.
1090   * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
1091   * <br>2. Incorrect parameter types.
1092   * @throws { BusinessError } 801 - Capability not supported.
1093   * @syscap SystemCapability.Communication.Bluetooth.Core
1094   * @since 9
1095   * @deprecated since 10
1096   * @useinstead ohos.bluetooth.socket/socket.off#event:sppRead
1097   */
1098  function off(type: 'sppRead', clientSocket: number, callback?: Callback<ArrayBuffer>): void;
1099
1100  /**
1101   * Obtains the instance of profile.
1102   *
1103   * @param { ProfileId } profileId - The profile id..
1104   * @returns { A2dpSourceProfile | HandsFreeAudioGatewayProfile | HidHostProfile | PanProfile } Returns the instance of profile.
1105   * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
1106   * <br>2. Incorrect parameter types.
1107   * @throws { BusinessError } 801 - Capability not supported.
1108   * @syscap SystemCapability.Communication.Bluetooth.Core
1109   * @since 9
1110   * @deprecated since 10
1111   */
1112  function getProfileInstance(
1113    profileId: ProfileId
1114  ): A2dpSourceProfile | HandsFreeAudioGatewayProfile | HidHostProfile | PanProfile;
1115
1116  /**
1117   * Base interface of profile.
1118   *
1119   * @typedef BaseProfile
1120   * @syscap SystemCapability.Communication.Bluetooth.Core
1121   * @since 9
1122   * @deprecated since 10
1123   * @useinstead ohos.bluetooth.baseProfile/baseProfile.BaseProfile
1124   */
1125  interface BaseProfile {
1126    /**
1127     * Obtains the connected devices list of profile.
1128     *
1129     * @permission ohos.permission.USE_BLUETOOTH
1130     * @returns { Array<string> } Returns the address of connected devices list.
1131     * @throws { BusinessError } 201 - Permission denied.
1132     * @throws { BusinessError } 801 - Capability not supported.
1133     * @throws { BusinessError } 2900001 - Service stopped.
1134     * @throws { BusinessError } 2900003 - Bluetooth disabled.
1135     * @throws { BusinessError } 2900004 - Profile not supported.
1136     * @throws { BusinessError } 2900099 - Operation failed.
1137     * @syscap SystemCapability.Communication.Bluetooth.Core
1138     * @since 9
1139     * @deprecated since 10
1140     * @useinstead ohos.bluetooth.baseProfile/baseProfile#getConnectedDevices
1141     */
1142    /**
1143     * Obtains the connected devices list of profile.
1144     * The permission required by this interface is changed from USE_BLUETOOTH to ACCESS_BLUETOOTH.
1145     *
1146     * @permission ohos.permission.ACCESS_BLUETOOTH
1147     * @returns { Array<string> } Returns the address of connected devices list.
1148     * @throws { BusinessError } 201 - Permission denied.
1149     * @throws { BusinessError } 801 - Capability not supported.
1150     * @throws { BusinessError } 2900001 - Service stopped.
1151     * @throws { BusinessError } 2900003 - Bluetooth disabled.
1152     * @throws { BusinessError } 2900004 - Profile not supported.
1153     * @throws { BusinessError } 2900099 - Operation failed.
1154     * @syscap SystemCapability.Communication.Bluetooth.Core
1155     * @since 10
1156     * @deprecated since 10
1157     * @useinstead ohos.bluetooth.baseProfile/baseProfile#getConnectedDevices
1158     */
1159    getConnectionDevices(): Array<string>;
1160
1161    /**
1162     * Obtains the profile state of device.
1163     *
1164     * @permission ohos.permission.USE_BLUETOOTH
1165     * @param { string } device - The address of bluetooth device.
1166     * @returns { ProfileConnectionState } Returns {@link ProfileConnectionState} of device.
1167     * @throws { BusinessError } 201 - Permission denied.
1168     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
1169     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1170     * @throws { BusinessError } 801 - Capability not supported.
1171     * @throws { BusinessError } 2900001 - Service stopped.
1172     * @throws { BusinessError } 2900003 - Bluetooth disabled.
1173     * @throws { BusinessError } 2900004 - Profile not supported.
1174     * @throws { BusinessError } 2900099 - Operation failed.
1175     * @syscap SystemCapability.Communication.Bluetooth.Core
1176     * @since 9
1177     * @deprecated since 10
1178     * @useinstead ohos.bluetooth.baseProfile/baseProfile#getConnectionState
1179     */
1180    /**
1181     * Obtains the profile state of device.
1182     * The permission required by this interface is changed from USE_BLUETOOTH to ACCESS_BLUETOOTH.
1183     *
1184     * @permission ohos.permission.ACCESS_BLUETOOTH
1185     * @param { string } device - The address of bluetooth device.
1186     * @returns { ProfileConnectionState } Returns {@link ProfileConnectionState} of device.
1187     * @throws { BusinessError } 201 - Permission denied.
1188     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
1189     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1190     * @throws { BusinessError } 801 - Capability not supported.
1191     * @throws { BusinessError } 2900001 - Service stopped.
1192     * @throws { BusinessError } 2900003 - Bluetooth disabled.
1193     * @throws { BusinessError } 2900004 - Profile not supported.
1194     * @throws { BusinessError } 2900099 - Operation failed.
1195     * @syscap SystemCapability.Communication.Bluetooth.Core
1196     * @since 10
1197     * @deprecated since 10
1198     * @useinstead ohos.bluetooth.baseProfile/baseProfile#getConnectionState
1199     */
1200    getDeviceState(device: string): ProfileConnectionState;
1201  }
1202
1203  /**
1204   * Manager a2dp source profile.
1205   *
1206   * @typedef A2dpSourceProfile
1207   * @syscap SystemCapability.Communication.Bluetooth.Core
1208   * @since 9
1209   * @deprecated since 10
1210   * @useinstead ohos.bluetooth.a2dp/a2dp.A2dpSourceProfile
1211   */
1212  interface A2dpSourceProfile extends BaseProfile {
1213    /**
1214     * Connect to device with a2dp.
1215     *
1216     * @permission ohos.permission.DISCOVER_BLUETOOTH
1217     * @param { string } device - The address of the remote device to connect.
1218     * @throws { BusinessError } 201 - Permission denied.
1219     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
1220     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1221     * @throws { BusinessError } 801 - Capability not supported.
1222     * @throws { BusinessError } 2900001 - Service stopped.
1223     * @throws { BusinessError } 2900003 - Bluetooth disabled.
1224     * @throws { BusinessError } 2900004 - Profile not supported.
1225     * @throws { BusinessError } 2900099 - Operation failed.
1226     * @syscap SystemCapability.Communication.Bluetooth.Core
1227     * @since 9
1228     * @deprecated since 10
1229     * @useinstead ohos.bluetooth.a2dp/a2dp.A2dpSourceProfile#connect
1230     */
1231    /**
1232     * Connect to device with a2dp.
1233     * The permission required by this interface is changed from DISCOVER_BLUETOOTH to ACCESS_BLUETOOTH.
1234     *
1235     * @permission ohos.permission.ACCESS_BLUETOOTH
1236     * @param { string } device - The address of the remote device to connect.
1237     * @throws { BusinessError } 201 - Permission denied.
1238     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
1239     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1240     * @throws { BusinessError } 801 - Capability not supported.
1241     * @throws { BusinessError } 2900001 - Service stopped.
1242     * @throws { BusinessError } 2900003 - Bluetooth disabled.
1243     * @throws { BusinessError } 2900004 - Profile not supported.
1244     * @throws { BusinessError } 2900099 - Operation failed.
1245     * @syscap SystemCapability.Communication.Bluetooth.Core
1246     * @since 10
1247     * @deprecated since 10
1248     * @useinstead ohos.bluetooth.a2dp/a2dp.A2dpSourceProfile#connect
1249     */
1250    connect(device: string): void;
1251
1252    /**
1253     * Disconnect to device with a2dp.
1254     *
1255     * @permission ohos.permission.DISCOVER_BLUETOOTH
1256     * @param { string } device - The address of the remote device to disconnect.
1257     * @throws { BusinessError } 201 - Permission denied.
1258     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
1259     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1260     * @throws { BusinessError } 801 - Capability not supported.
1261     * @throws { BusinessError } 2900001 - Service stopped.
1262     * @throws { BusinessError } 2900003 - Bluetooth disabled.
1263     * @throws { BusinessError } 2900004 - Profile not supported.
1264     * @throws { BusinessError } 2900099 - Operation failed.
1265     * @syscap SystemCapability.Communication.Bluetooth.Core
1266     * @since 9
1267     * @deprecated since 10
1268     * @useinstead ohos.bluetooth.a2dp/a2dp.A2dpSourceProfile#disconnect
1269     */
1270    /**
1271     * Disconnect to device with a2dp.
1272     * The permission required by this interface is changed from DISCOVER_BLUETOOTH to ACCESS_BLUETOOTH.
1273     *
1274     * @permission ohos.permission.ACCESS_BLUETOOTH
1275     * @param { string } device - The address of the remote device to disconnect.
1276     * @throws { BusinessError } 201 - Permission denied.
1277     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
1278     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1279     * @throws { BusinessError } 801 - Capability not supported.
1280     * @throws { BusinessError } 2900001 - Service stopped.
1281     * @throws { BusinessError } 2900003 - Bluetooth disabled.
1282     * @throws { BusinessError } 2900004 - Profile not supported.
1283     * @throws { BusinessError } 2900099 - Operation failed.
1284     * @syscap SystemCapability.Communication.Bluetooth.Core
1285     * @since 10
1286     * @deprecated since 10
1287     * @useinstead ohos.bluetooth.a2dp/a2dp.A2dpSourceProfile#disconnect
1288     */
1289    disconnect(device: string): void;
1290
1291    /**
1292     * Subscribe the event reported when the profile connection state changes .
1293     *
1294     * @param { 'connectionStateChange' } type - Type of the profile connection state changes event to listen for .
1295     * @param { Callback<StateChangeParam> } callback - Callback used to listen for event.
1296     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
1297     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1298     * @throws { BusinessError } 801 - Capability not supported.
1299     * @syscap SystemCapability.Communication.Bluetooth.Core
1300     * @since 9
1301     * @deprecated since 10
1302     * @useinstead ohos.bluetooth.a2dp/a2dp.A2dpSourceProfile.on#event:connectionStateChange
1303     */
1304    /**
1305     * Subscribe the event reported when the profile connection state changes.
1306     * The permission required by this interface is changed to ACCESS_BLUETOOTH.
1307     *
1308     * @permission ohos.permission.ACCESS_BLUETOOTH
1309     * @param { 'connectionStateChange' } type - Type of the profile connection state changes event to listen for .
1310     * @param { Callback<StateChangeParam> } callback - Callback used to listen for event.
1311     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
1312     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1313     * @throws { BusinessError } 801 - Capability not supported.
1314     * @syscap SystemCapability.Communication.Bluetooth.Core
1315     * @since 10
1316     * @deprecated since 10
1317     * @useinstead ohos.bluetooth.a2dp/a2dp.A2dpSourceProfile.on#event:connectionStateChange
1318     */
1319    on(type: 'connectionStateChange', callback: Callback<StateChangeParam>): void;
1320
1321    /**
1322     * Unsubscribe the event reported when the profile connection state changes .
1323     *
1324     * @param { 'connectionStateChange' } type - Type of the profile connection state changes event to listen for .
1325     * @param { Callback<StateChangeParam> } callback - Callback used to listen for event.
1326     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
1327     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1328     * @throws { BusinessError } 801 - Capability not supported.
1329     * @syscap SystemCapability.Communication.Bluetooth.Core
1330     * @since 9
1331     * @deprecated since 10
1332     * @useinstead ohos.bluetooth.a2dp/a2dp.A2dpSourceProfile.off#event:connectionStateChange
1333     */
1334    /**
1335     * Unsubscribe the event reported when the profile connection state changes.
1336     * The permission required by this interface is changed to ACCESS_BLUETOOTH.
1337     *
1338     * @permission ohos.permission.ACCESS_BLUETOOTH
1339     * @param { 'connectionStateChange' } type - Type of the profile connection state changes event to listen for .
1340     * @param { Callback<StateChangeParam> } callback - Callback used to listen for event.
1341     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
1342     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1343     * @throws { BusinessError } 801 - Capability not supported.
1344     * @syscap SystemCapability.Communication.Bluetooth.Core
1345     * @since 10
1346     * @deprecated since 10
1347     * @useinstead ohos.bluetooth.a2dp/a2dp.A2dpSourceProfile.off#event:connectionStateChange
1348     */
1349    off(type: 'connectionStateChange', callback?: Callback<StateChangeParam>): void;
1350
1351    /**
1352     * Obtains the playing state of device.
1353     *
1354     * @param { string } device - The address of the remote device.
1355     * @returns { PlayingState } Returns {@link PlayingState} of the remote device.
1356     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
1357     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1358     * @throws { BusinessError } 801 - Capability not supported.
1359     * @throws { BusinessError } 2900001 - Service stopped.
1360     * @throws { BusinessError } 2900003 - Bluetooth disabled.
1361     * @throws { BusinessError } 2900004 - Profile not supported.
1362     * @throws { BusinessError } 2900099 - Operation failed.
1363     * @syscap SystemCapability.Communication.Bluetooth.Core
1364     * @since 9
1365     * @deprecated since 10
1366     * @useinstead ohos.bluetooth.a2dp/a2dp.A2dpSourceProfile#getPlayingState
1367     */
1368    /**
1369     * Obtains the playing state of device.
1370     * The permission required by this interface is changed to ACCESS_BLUETOOTH.
1371     *
1372     * @permission ohos.permission.ACCESS_BLUETOOTH
1373     * @param { string } device - The address of the remote device.
1374     * @returns { PlayingState } Returns {@link PlayingState} of the remote device.
1375     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
1376     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1377     * @throws { BusinessError } 801 - Capability not supported.
1378     * @throws { BusinessError } 2900001 - Service stopped.
1379     * @throws { BusinessError } 2900003 - Bluetooth disabled.
1380     * @throws { BusinessError } 2900004 - Profile not supported.
1381     * @throws { BusinessError } 2900099 - Operation failed.
1382     * @syscap SystemCapability.Communication.Bluetooth.Core
1383     * @since 10
1384     * @deprecated since 10
1385     * @useinstead ohos.bluetooth.a2dp/a2dp.A2dpSourceProfile#getPlayingState
1386     */
1387    getPlayingState(device: string): PlayingState;
1388  }
1389
1390  /**
1391   * Manager handsfree AG profile.
1392   *
1393   * @typedef HandsFreeAudioGatewayProfile
1394   * @syscap SystemCapability.Communication.Bluetooth.Core
1395   * @since 9
1396   * @deprecated since 10
1397   * @useinstead ohos.bluetooth.hfp/hfp.HandsFreeAudioGatewayProfile
1398   */
1399  interface HandsFreeAudioGatewayProfile extends BaseProfile {
1400    /**
1401     * Connect to device with hfp.
1402     *
1403     * @permission ohos.permission.DISCOVER_BLUETOOTH
1404     * @param { string } device - The address of the remote device to connect.
1405     * @throws { BusinessError } 201 - Permission denied.
1406     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
1407     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1408     * @throws { BusinessError } 801 - Capability not supported.
1409     * @throws { BusinessError } 2900001 - Service stopped.
1410     * @throws { BusinessError } 2900003 - Bluetooth disabled.
1411     * @throws { BusinessError } 2900004 - Profile not supported.
1412     * @throws { BusinessError } 2900099 - Operation failed.
1413     * @syscap SystemCapability.Communication.Bluetooth.Core
1414     * @since 9
1415     * @deprecated since 10
1416     * @useinstead ohos.bluetooth.hfp/hfp.HandsFreeAudioGatewayProfile#connect
1417     */
1418    /**
1419     * Connect to device with hfp.
1420     * The permission required by this interface is changed from DISCOVER_BLUETOOTH to ACCESS_BLUETOOTH.
1421     *
1422     * @permission ohos.permission.ACCESS_BLUETOOTH
1423     * @param { string } device - The address of the remote device to connect.
1424     * @throws { BusinessError } 201 - Permission denied.
1425     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
1426     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1427     * @throws { BusinessError } 801 - Capability not supported.
1428     * @throws { BusinessError } 2900001 - Service stopped.
1429     * @throws { BusinessError } 2900003 - Bluetooth disabled.
1430     * @throws { BusinessError } 2900004 - Profile not supported.
1431     * @throws { BusinessError } 2900099 - Operation failed.
1432     * @syscap SystemCapability.Communication.Bluetooth.Core
1433     * @since 10
1434     * @deprecated since 10
1435     * @useinstead ohos.bluetooth.hfp/hfp.HandsFreeAudioGatewayProfile#connect
1436     */
1437    connect(device: string): void;
1438
1439    /**
1440     * Disconnect to device with hfp.
1441     *
1442     * @permission ohos.permission.DISCOVER_BLUETOOTH
1443     * @param { string } device - The address of the remote device to disconnect.
1444     * @throws { BusinessError } 201 - Permission denied.
1445     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
1446     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1447     * @throws { BusinessError } 801 - Capability not supported.
1448     * @throws { BusinessError } 2900001 - Service stopped.
1449     * @throws { BusinessError } 2900003 - Bluetooth disabled.
1450     * @throws { BusinessError } 2900004 - Profile not supported.
1451     * @throws { BusinessError } 2900099 - Operation failed.
1452     * @syscap SystemCapability.Communication.Bluetooth.Core
1453     * @since 9
1454     * @deprecated since 10
1455     * @useinstead ohos.bluetooth.hfp/hfp.HandsFreeAudioGatewayProfile#disconnect
1456     */
1457    /**
1458     * Disconnect to device with hfp.
1459     * The permission required by this interface is changed from DISCOVER_BLUETOOTH to ACCESS_BLUETOOTH.
1460     *
1461     * @permission ohos.permission.ACCESS_BLUETOOTH
1462     * @param { string } device - The address of the remote device to disconnect.
1463     * @throws { BusinessError } 201 - Permission denied.
1464     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
1465     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1466     * @throws { BusinessError } 801 - Capability not supported.
1467     * @throws { BusinessError } 2900001 - Service stopped.
1468     * @throws { BusinessError } 2900003 - Bluetooth disabled.
1469     * @throws { BusinessError } 2900004 - Profile not supported.
1470     * @throws { BusinessError } 2900099 - Operation failed.
1471     * @syscap SystemCapability.Communication.Bluetooth.Core
1472     * @since 10
1473     * @deprecated since 10
1474     * @useinstead ohos.bluetooth.hfp/hfp.HandsFreeAudioGatewayProfile#disconnect
1475     */
1476    disconnect(device: string): void;
1477
1478    /**
1479     * Subscribe the event reported when the profile connection state changes .
1480     *
1481     * @param { 'connectionStateChange' } type - Type of the profile connection state changes event to listen for .
1482     * @param { Callback<StateChangeParam> } callback - Callback used to listen for event.
1483     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
1484     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1485     * @throws { BusinessError } 801 - Capability not supported.
1486     * @syscap SystemCapability.Communication.Bluetooth.Core
1487     * @since 9
1488     * @deprecated since 10
1489     * @useinstead ohos.bluetooth.hfp/hfp.HandsFreeAudioGatewayProfile.on#event:connectionStateChange
1490     */
1491    /**
1492     * Subscribe the event reported when the profile connection state changes.
1493     * The permission required by this interface is changed to ACCESS_BLUETOOTH.
1494     *
1495     * @permission ohos.permission.ACCESS_BLUETOOTH
1496     * @param { 'connectionStateChange' } type - Type of the profile connection state changes event to listen for .
1497     * @param { Callback<StateChangeParam> } callback - Callback used to listen for event.
1498     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
1499     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1500     * @throws { BusinessError } 801 - Capability not supported.
1501     * @syscap SystemCapability.Communication.Bluetooth.Core
1502     * @since 10
1503     * @deprecated since 10
1504     * @useinstead ohos.bluetooth.hfp/hfp.HandsFreeAudioGatewayProfile.on#event:connectionStateChange
1505     */
1506    on(type: 'connectionStateChange', callback: Callback<StateChangeParam>): void;
1507
1508    /**
1509     * Unsubscribe the event reported when the profile connection state changes .
1510     *
1511     * @param { 'connectionStateChange' } type - Type of the profile connection state changes event to listen for .
1512     * @param { Callback<StateChangeParam> } callback - Callback used to listen for event.
1513     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
1514     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1515     * @throws { BusinessError } 801 - Capability not supported.
1516     * @syscap SystemCapability.Communication.Bluetooth.Core
1517     * @since 9
1518     * @deprecated since 10
1519     * @useinstead ohos.bluetooth.hfp/hfp.HandsFreeAudioGatewayProfile.off#event:connectionStateChange
1520     */
1521    /**
1522     * Unsubscribe the event reported when the profile connection state changes.
1523     * The permission required by this interface is changed to ACCESS_BLUETOOTH.
1524     *
1525     * @permission ohos.permission.ACCESS_BLUETOOTH
1526     * @param { 'connectionStateChange' } type - Type of the profile connection state changes event to listen for .
1527     * @param { Callback<StateChangeParam> } callback - Callback used to listen for event.
1528     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
1529     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1530     * @throws { BusinessError } 801 - Capability not supported.
1531     * @syscap SystemCapability.Communication.Bluetooth.Core
1532     * @since 10
1533     * @deprecated since 10
1534     * @useinstead ohos.bluetooth.hfp/hfp.HandsFreeAudioGatewayProfile.off#event:connectionStateChange
1535     */
1536    off(type: 'connectionStateChange', callback?: Callback<StateChangeParam>): void;
1537  }
1538
1539  /**
1540   * Manager hid host profile.
1541   *
1542   * @typedef HidHostProfile
1543   * @syscap SystemCapability.Communication.Bluetooth.Core
1544   * @since 9
1545   * @deprecated since 10
1546   * @useinstead ohos.bluetooth.hid/hid.HidHostProfile
1547   */
1548  interface HidHostProfile extends BaseProfile {
1549    /**
1550     * Connect to device with hid host.
1551     *
1552     * @permission ohos.permission.DISCOVER_BLUETOOTH
1553     * @param { string } device - The address of the remote device to connect.
1554     * @throws { BusinessError } 201 - Permission denied.
1555     * @throws { BusinessError } 202 - Non-system applications are not allowed to use system APIs.
1556     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
1557     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1558     * @throws { BusinessError } 801 - Capability not supported.
1559     * @throws { BusinessError } 2900001 - Service stopped.
1560     * @throws { BusinessError } 2900003 - Bluetooth disabled.
1561     * @throws { BusinessError } 2900004 - Profile not supported.
1562     * @throws { BusinessError } 2900099 - Operation failed.
1563     * @syscap SystemCapability.Communication.Bluetooth.Core
1564     * @systemapi Hide this for inner system use.
1565     * @since 9
1566     * @deprecated since 10
1567     * @useinstead ohos.bluetooth.hid/hid.HidHostProfile#connect
1568     */
1569    /**
1570     * Connect to device with hid host.
1571     * The permission required by this interface is changed from DISCOVER_BLUETOOTH to ACCESS_BLUETOOTH and MANAGE_BLUETOOTH.
1572     *
1573     * @permission ohos.permission.ACCESS_BLUETOOTH and ohos.permission.MANAGE_BLUETOOTH
1574     * @param { string } device - The address of the remote device to connect.
1575     * @throws { BusinessError } 201 - Permission denied.
1576     * @throws { BusinessError } 202 - Non-system applications are not allowed to use system APIs.
1577     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
1578     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1579     * @throws { BusinessError } 801 - Capability not supported.
1580     * @throws { BusinessError } 2900001 - Service stopped.
1581     * @throws { BusinessError } 2900003 - Bluetooth disabled.
1582     * @throws { BusinessError } 2900004 - Profile not supported.
1583     * @throws { BusinessError } 2900099 - Operation failed.
1584     * @syscap SystemCapability.Communication.Bluetooth.Core
1585     * @systemapi Hide this for inner system use.
1586     * @since 10
1587     * @deprecated since 10
1588     * @useinstead ohos.bluetooth.hid/hid.HidHostProfile#connect
1589     */
1590    connect(device: string): void;
1591
1592    /**
1593     * Disconnect to device with hid host.
1594     *
1595     * @permission ohos.permission.DISCOVER_BLUETOOTH
1596     * @param { string } device - The address of the remote device to disconnect.
1597     * @throws { BusinessError } 201 - Permission denied.
1598     * @throws { BusinessError } 202 - Non-system applications are not allowed to use system APIs.
1599     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
1600     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1601     * @throws { BusinessError } 801 - Capability not supported.
1602     * @throws { BusinessError } 2900001 - Service stopped.
1603     * @throws { BusinessError } 2900003 - Bluetooth disabled.
1604     * @throws { BusinessError } 2900004 - Profile not supported.
1605     * @throws { BusinessError } 2900099 - Operation failed.
1606     * @syscap SystemCapability.Communication.Bluetooth.Core
1607     * @systemapi Hide this for inner system use.
1608     * @since 9
1609     * @deprecated since 10
1610     * @useinstead ohos.bluetooth.hid/hid.HidHostProfile#disconnect
1611     */
1612    /**
1613     * Disconnect to device with hid host.
1614     * The permission required by this interface is changed from DISCOVER_BLUETOOTH to ACCESS_BLUETOOTH and MANAGE_BLUETOOTH.
1615     *
1616     * @permission ohos.permission.ACCESS_BLUETOOTH and ohos.permission.MANAGE_BLUETOOTH
1617     * @param { string } device - The address of the remote device to disconnect.
1618     * @throws { BusinessError } 201 - Permission denied.
1619     * @throws { BusinessError } 202 - Non-system applications are not allowed to use system APIs.
1620     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
1621     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1622     * @throws { BusinessError } 801 - Capability not supported.
1623     * @throws { BusinessError } 2900001 - Service stopped.
1624     * @throws { BusinessError } 2900003 - Bluetooth disabled.
1625     * @throws { BusinessError } 2900004 - Profile not supported.
1626     * @throws { BusinessError } 2900099 - Operation failed.
1627     * @syscap SystemCapability.Communication.Bluetooth.Core
1628     * @systemapi Hide this for inner system use.
1629     * @since 10
1630     * @deprecated since 10
1631     * @useinstead ohos.bluetooth.hid/hid.HidHostProfile#disconnect
1632     */
1633    disconnect(device: string): void;
1634
1635    /**
1636     * Subscribe the event reported when the profile connection state changes .
1637     *
1638     * @param { 'connectionStateChange' } type - Type of the profile connection state changes event to listen for .
1639     * @param { Callback<StateChangeParam> } callback - Callback used to listen for event.
1640     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
1641     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1642     * @throws { BusinessError } 801 - Capability not supported.
1643     * @syscap SystemCapability.Communication.Bluetooth.Core
1644     * @since 9
1645     * @deprecated since 10
1646     * @useinstead ohos.bluetooth.hid/hid.HidHostProfile.on#event:connectionStateChange
1647     */
1648    /**
1649     * Subscribe the event reported when the profile connection state changes.
1650     * The permission required by this interface is changed to ACCESS_BLUETOOTH.
1651     *
1652     * @permission ohos.permission.ACCESS_BLUETOOTH
1653     * @param { 'connectionStateChange' } type - Type of the profile connection state changes event to listen for .
1654     * @param { Callback<StateChangeParam> } callback - Callback used to listen for event.
1655     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
1656     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1657     * @throws { BusinessError } 801 - Capability not supported.
1658     * @syscap SystemCapability.Communication.Bluetooth.Core
1659     * @since 10
1660     * @deprecated since 10
1661     * @useinstead ohos.bluetooth.hid/hid.HidHostProfile.on#event:connectionStateChange
1662     */
1663    on(type: 'connectionStateChange', callback: Callback<StateChangeParam>): void;
1664
1665    /**
1666     * Unsubscribe the event reported when the profile connection state changes.
1667     *
1668     * @param { 'connectionStateChange' } type - Type of the profile connection state changes event to listen for.
1669     * @param { Callback<StateChangeParam> } callback - Callback used to listen for event.
1670     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
1671     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1672     * @throws { BusinessError } 801 - Capability not supported.
1673     * @syscap SystemCapability.Communication.Bluetooth.Core
1674     * @since 9
1675     * @deprecated since 10
1676     * @useinstead ohos.bluetooth.hid/hid.HidHostProfile.off#event:connectionStateChange
1677     */
1678    /**
1679     * Unsubscribe the event reported when the profile connection state changes.
1680     * The permission required by this interface is changed to ACCESS_BLUETOOTH.
1681     *
1682     * @permission ohos.permission.ACCESS_BLUETOOTH
1683     * @param { 'connectionStateChange' } type - Type of the profile connection state changes event to listen for.
1684     * @param { Callback<StateChangeParam> } callback - Callback used to listen for event.
1685     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
1686     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1687     * @throws { BusinessError } 801 - Capability not supported.
1688     * @syscap SystemCapability.Communication.Bluetooth.Core
1689     * @since 10
1690     * @deprecated since 10
1691     * @useinstead ohos.bluetooth.hid/hid.HidHostProfile.off#event:connectionStateChange
1692     */
1693    off(type: 'connectionStateChange', callback?: Callback<StateChangeParam>): void;
1694  }
1695
1696  /**
1697   * Manager pan profile.
1698   *
1699   * @typedef PanProfile
1700   * @syscap SystemCapability.Communication.Bluetooth.Core
1701   * @since 9
1702   * @deprecated since 10
1703   * @useinstead ohos.bluetooth.pan/pan.PanProfile
1704   */
1705  interface PanProfile extends BaseProfile {
1706    /**
1707     * Disconnect to device with pan.
1708     *
1709     * @permission ohos.permission.USE_BLUETOOTH
1710     * @param { string } device - The address of the remote device to disconnect.
1711     * @throws { BusinessError } 201 - Permission denied.
1712     * @throws { BusinessError } 202 - Non-system applications are not allowed to use system APIs.
1713     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
1714     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1715     * @throws { BusinessError } 801 - Capability not supported.
1716     * @throws { BusinessError } 2900001 - Service stopped.
1717     * @throws { BusinessError } 2900003 - Bluetooth disabled.
1718     * @throws { BusinessError } 2900004 - Profile not supported.
1719     * @throws { BusinessError } 2900099 - Operation failed.
1720     * @syscap SystemCapability.Communication.Bluetooth.Core
1721     * @systemapi Hide this for inner system use.
1722     * @since 9
1723     * @deprecated since 10
1724     * @useinstead ohos.bluetooth.pan/pan.PanProfile#disconnect
1725     */
1726    /**
1727     * Disconnect to device with pan.
1728     * The permission required by this interface is changed from USE_BLUETOOTH to ACCESS_BLUETOOTH.
1729     *
1730     * @permission ohos.permission.ACCESS_BLUETOOTH
1731     * @param { string } device - The address of the remote device to disconnect.
1732     * @throws { BusinessError } 201 - Permission denied.
1733     * @throws { BusinessError } 202 - Non-system applications are not allowed to use system APIs.
1734     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
1735     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1736     * @throws { BusinessError } 801 - Capability not supported.
1737     * @throws { BusinessError } 2900001 - Service stopped.
1738     * @throws { BusinessError } 2900003 - Bluetooth disabled.
1739     * @throws { BusinessError } 2900004 - Profile not supported.
1740     * @throws { BusinessError } 2900099 - Operation failed.
1741     * @syscap SystemCapability.Communication.Bluetooth.Core
1742     * @systemapi Hide this for inner system use.
1743     * @since 10
1744     * @deprecated since 10
1745     * @useinstead ohos.bluetooth.pan/pan.PanProfile#disconnect
1746     */
1747    disconnect(device: string): void;
1748
1749    /**
1750     * Subscribe the event reported when the profile connection state changes .
1751     *
1752     * @param { 'connectionStateChange' } type - Type of the profile connection state changes event to listen for .
1753     * @param { Callback<StateChangeParam> } callback - Callback used to listen for event.
1754     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
1755     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1756     * @throws { BusinessError } 801 - Capability not supported.
1757     * @syscap SystemCapability.Communication.Bluetooth.Core
1758     * @since 9
1759     * @deprecated since 10
1760     * @useinstead ohos.bluetooth.pan/pan.PanProfile.on#event:connectionStateChange
1761     */
1762    /**
1763     * Subscribe the event reported when the profile connection state changes.
1764     * The permission required by this interface is changed to ACCESS_BLUETOOTH.
1765     *
1766     * @permission ohos.permission.ACCESS_BLUETOOTH
1767     * @param { 'connectionStateChange' } type - Type of the profile connection state changes event to listen for .
1768     * @param { Callback<StateChangeParam> } callback - Callback used to listen for event.
1769     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
1770     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1771     * @throws { BusinessError } 801 - Capability not supported.
1772     * @syscap SystemCapability.Communication.Bluetooth.Core
1773     * @since 10
1774     * @deprecated since 10
1775     * @useinstead ohos.bluetooth.pan/pan.PanProfile.on#event:connectionStateChange
1776     */
1777    on(type: 'connectionStateChange', callback: Callback<StateChangeParam>): void;
1778
1779    /**
1780     * Unsubscribe the event reported when the profile connection state changes.
1781     *
1782     * @param { 'connectionStateChange' } type - Type of the profile connection state changes event to listen for.
1783     * @param { Callback<StateChangeParam> } callback - Callback used to listen for event.
1784     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
1785     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1786     * @throws { BusinessError } 801 - Capability not supported.
1787     * @syscap SystemCapability.Communication.Bluetooth.Core
1788     * @since 9
1789     * @deprecated since 10
1790     * @useinstead ohos.bluetooth.pan/pan.PanProfile.off#event:connectionStateChange
1791     */
1792    /**
1793     * Unsubscribe the event reported when the profile connection state changes.
1794     * The permission required by this interface is changed to ACCESS_BLUETOOTH.
1795     *
1796     * @permission ohos.permission.ACCESS_BLUETOOTH
1797     * @param { 'connectionStateChange' } type - Type of the profile connection state changes event to listen for.
1798     * @param { Callback<StateChangeParam> } callback - Callback used to listen for event.
1799     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
1800     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1801     * @throws { BusinessError } 801 - Capability not supported.
1802     * @syscap SystemCapability.Communication.Bluetooth.Core
1803     * @since 10
1804     * @deprecated since 10
1805     * @useinstead ohos.bluetooth.pan/pan.PanProfile.off#event:connectionStateChange
1806     */
1807    off(type: 'connectionStateChange', callback?: Callback<StateChangeParam>): void;
1808
1809    /**
1810     * Enable bluetooth tethering.
1811     *
1812     * @permission ohos.permission.DISCOVER_BLUETOOTH
1813     * @param { boolean } enable - Specifies whether to enable tethering. The value {@code true} indicates
1814     * that tethering is enabled, and the value {@code false} indicates that tethering is disabled.
1815     * @throws { BusinessError } 201 - Permission denied.
1816     * @throws { BusinessError } 202 - Non-system applications are not allowed to use system APIs.
1817     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
1818     * <br>2. Incorrect parameter types.
1819     * @throws { BusinessError } 801 - Capability not supported.
1820     * @throws { BusinessError } 2900001 - Service stopped.
1821     * @throws { BusinessError } 2900003 - Bluetooth disabled.
1822     * @throws { BusinessError } 2900004 - Profile not supported.
1823     * @throws { BusinessError } 2900099 - Operation failed.
1824     * @syscap SystemCapability.Communication.Bluetooth.Core
1825     * @systemapi Hide this for inner system use.
1826     * @since 9
1827     * @deprecated since 10
1828     * @useinstead ohos.bluetooth.pan/pan.PanProfile#setTethering
1829     */
1830    /**
1831     * Enable bluetooth tethering.
1832     * The permission required by this interface is changed from DISCOVER_BLUETOOTH to ACCESS_BLUETOOTH and MANAGE_BLUETOOTH.
1833     *
1834     * @permission ohos.permission.ACCESS_BLUETOOTH and ohos.permission.MANAGE_BLUETOOTH
1835     * @param { boolean } enable - Specifies whether to enable tethering. The value {@code true} indicates
1836     * that tethering is enabled, and the value {@code false} indicates that tethering is disabled.
1837     * @throws { BusinessError } 201 - Permission denied.
1838     * @throws { BusinessError } 202 - Non-system applications are not allowed to use system APIs.
1839     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
1840     * <br>2. Incorrect parameter types.
1841     * @throws { BusinessError } 801 - Capability not supported.
1842     * @throws { BusinessError } 2900001 - Service stopped.
1843     * @throws { BusinessError } 2900003 - Bluetooth disabled.
1844     * @throws { BusinessError } 2900004 - Profile not supported.
1845     * @throws { BusinessError } 2900099 - Operation failed.
1846     * @syscap SystemCapability.Communication.Bluetooth.Core
1847     * @systemapi Hide this for inner system use.
1848     * @since 10
1849     * @deprecated since 10
1850     * @useinstead ohos.bluetooth.pan/pan.PanProfile#setTethering
1851     */
1852    setTethering(enable: boolean): void;
1853
1854    /**
1855     * Obtains the tethering enable or disable.
1856     *
1857     * @returns { boolean } Returns the value {@code true} is tethering is on, returns {@code false} otherwise.
1858     * @throws { BusinessError } 202 - Non-system applications are not allowed to use system APIs.
1859     * @throws { BusinessError } 801 - Capability not supported.
1860     * @syscap SystemCapability.Communication.Bluetooth.Core
1861     * @systemapi Hide this for inner system use.
1862     * @since 9
1863     * @deprecated since 10
1864     * @useinstead ohos.bluetooth.pan/pan.PanProfile#isTetheringOn
1865     */
1866    /**
1867     * Obtains the tethering enable or disable.
1868     * The permission required by this interface is changed to ACCESS_BLUETOOTH.
1869     *
1870     * @permission ohos.permission.ACCESS_BLUETOOTH
1871     * @returns { boolean } Returns the value {@code true} is tethering is on, returns {@code false} otherwise.
1872     * @throws { BusinessError } 202 - Non-system applications are not allowed to use system APIs.
1873     * @throws { BusinessError } 801 - Capability not supported.
1874     * @syscap SystemCapability.Communication.Bluetooth.Core
1875     * @systemapi Hide this for inner system use.
1876     * @since 10
1877     * @deprecated since 10
1878     * @useinstead ohos.bluetooth.pan/pan.PanProfile#isTetheringOn
1879     */
1880    isTetheringOn(): boolean;
1881  }
1882
1883  /**
1884   * Provides methods to operate or manage Bluetooth.
1885   *
1886   * @namespace BLE
1887   * @syscap SystemCapability.Communication.Bluetooth.Core
1888   * @since 9
1889   * @deprecated since 10
1890   * @useinstead ohos.bluetooth.ble/ble
1891   */
1892  namespace BLE {
1893    /**
1894     * create a JavaScript Gatt server instance.
1895     *
1896     * @returns { GattServer } Returns a JavaScript Gatt server instance {@code GattServer}.
1897     * @syscap SystemCapability.Communication.Bluetooth.Core
1898     * @since 9
1899     * @deprecated since 10
1900     * @useinstead ohos.bluetooth.ble/ble#createGattServer
1901     */
1902    function createGattServer(): GattServer;
1903
1904    /**
1905     * create a JavaScript Gatt client device instance.
1906     *
1907     * @param { string } deviceId - The address of the remote device.
1908     * @returns { GattClientDevice } Returns a JavaScript Gatt client device instance {@code GattClientDevice}.
1909     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
1910     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1911     * @throws { BusinessError } 801 - Capability not supported.
1912     * @syscap SystemCapability.Communication.Bluetooth.Core
1913     * @since 9
1914     * @deprecated since 10
1915     * @useinstead ohos.bluetooth.ble/ble#createGattClientDevice
1916     */
1917    function createGattClientDevice(deviceId: string): GattClientDevice;
1918
1919    /**
1920     * Obtains the list of devices in the connected status.
1921     *
1922     * @permission ohos.permission.USE_BLUETOOTH
1923     * @returns { Array<string> } Returns the list of device address.
1924     * @throws { BusinessError } 201 - Permission denied.
1925     * @throws { BusinessError } 801 - Capability not supported.
1926     * @throws { BusinessError } 2900001 - Service stopped.
1927     * @throws { BusinessError } 2900003 - Bluetooth disabled.
1928     * @throws { BusinessError } 2900099 - Operation failed.
1929     * @syscap SystemCapability.Communication.Bluetooth.Core
1930     * @since 9
1931     * @deprecated since 10
1932     * @useinstead ohos.bluetooth.ble/ble#getConnectedBLEDevices
1933     */
1934    /**
1935     * Obtains the list of devices in the connected status.
1936     * The permission required by this interface is changed from USE_BLUETOOTH to ACCESS_BLUETOOTH.
1937     *
1938     * @permission ohos.permission.ACCESS_BLUETOOTH
1939     * @returns { Array<string> } Returns the list of device address.
1940     * @throws { BusinessError } 201 - Permission denied.
1941     * @throws { BusinessError } 801 - Capability not supported.
1942     * @throws { BusinessError } 2900001 - Service stopped.
1943     * @throws { BusinessError } 2900003 - Bluetooth disabled.
1944     * @throws { BusinessError } 2900099 - Operation failed.
1945     * @syscap SystemCapability.Communication.Bluetooth.Core
1946     * @since 10
1947     * @deprecated since 10
1948     * @useinstead ohos.bluetooth.ble/ble#getConnectedBLEDevices
1949     */
1950    function getConnectedBLEDevices(): Array<string>;
1951
1952    /**
1953     * Starts scanning for specified BLE devices with filters.
1954     *
1955     * @permission ohos.permission.DISCOVER_BLUETOOTH and ohos.permission.MANAGE_BLUETOOTH and ohos.permission.LOCATION
1956     *     and ohos.permission.APPROXIMATELY_LOCATION
1957     * @param { Array<ScanFilter> } filters - Indicates the list of filters used to filter out specified devices.
1958     * If you do not want to use filter, set this parameter to {@code null}.
1959     * @param { ScanOptions } options - Indicates the parameters for scanning and if the user does not assign a value, the default value will be used.
1960     * {@link ScanOptions#interval} set to 0, {@link ScanOptions#dutyMode} set to {@link SCAN_MODE_LOW_POWER}
1961     * and {@link ScanOptions#matchMode} set to {@link MATCH_MODE_AGGRESSIVE}.
1962     * @throws { BusinessError } 201 - Permission denied.
1963     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
1964     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1965     * @throws { BusinessError } 801 - Capability not supported.
1966     * @throws { BusinessError } 2900001 - Service stopped.
1967     * @throws { BusinessError } 2900003 - Bluetooth disabled.
1968     * @throws { BusinessError } 2900099 - Operation failed.
1969     * @syscap SystemCapability.Communication.Bluetooth.Core
1970     * @since 9
1971     * @deprecated since 10
1972     * @useinstead ohos.bluetooth.ble/ble#startBLEScan
1973     */
1974    /**
1975     * Starts scanning for specified BLE devices with filters.
1976     * The permission required by this interface is changed from DISCOVER_BLUETOOTH and MANAGE_BLUETOOTH and LOCATION to ACCESS_BLUETOOTH.
1977     *
1978     * @permission ohos.permission.ACCESS_BLUETOOTH
1979     * @param { Array<ScanFilter> } filters - Indicates the list of filters used to filter out specified devices.
1980     * If you do not want to use filter, set this parameter to {@code null}.
1981     * @param { ScanOptions } options - Indicates the parameters for scanning and if the user does not assign a value, the default value will be used.
1982     * {@link ScanOptions#interval} set to 0, {@link ScanOptions#dutyMode} set to {@link SCAN_MODE_LOW_POWER}
1983     * and {@link ScanOptions#matchMode} set to {@link MATCH_MODE_AGGRESSIVE}.
1984     * @throws { BusinessError } 201 - Permission denied.
1985     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
1986     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1987     * @throws { BusinessError } 801 - Capability not supported.
1988     * @throws { BusinessError } 2900001 - Service stopped.
1989     * @throws { BusinessError } 2900003 - Bluetooth disabled.
1990     * @throws { BusinessError } 2900099 - Operation failed.
1991     * @syscap SystemCapability.Communication.Bluetooth.Core
1992     * @since 10
1993     * @deprecated since 10
1994     * @useinstead ohos.bluetooth.ble/ble#startBLEScan
1995     */
1996    function startBLEScan(filters: Array<ScanFilter>, options?: ScanOptions): void;
1997
1998    /**
1999     * Stops BLE scanning.
2000     *
2001     * @permission ohos.permission.DISCOVER_BLUETOOTH
2002     * @throws { BusinessError } 201 - Permission denied.
2003     * @throws { BusinessError } 801 - Capability not supported.
2004     * @throws { BusinessError } 2900001 - Service stopped.
2005     * @throws { BusinessError } 2900003 - Bluetooth disabled.
2006     * @throws { BusinessError } 2900099 - Operation failed.
2007     * @syscap SystemCapability.Communication.Bluetooth.Core
2008     * @since 9
2009     * @deprecated since 10
2010     * @useinstead ohos.bluetooth.ble/ble#stopBLEScan
2011     */
2012    /**
2013     * Stops BLE scanning.
2014     * The permission required by this interface is changed from DISCOVER_BLUETOOTH to ACCESS_BLUETOOTH.
2015     *
2016     * @permission ohos.permission.ACCESS_BLUETOOTH
2017     * @throws { BusinessError } 201 - Permission denied.
2018     * @throws { BusinessError } 801 - Capability not supported.
2019     * @throws { BusinessError } 2900001 - Service stopped.
2020     * @throws { BusinessError } 2900003 - Bluetooth disabled.
2021     * @throws { BusinessError } 2900099 - Operation failed.
2022     * @syscap SystemCapability.Communication.Bluetooth.Core
2023     * @since 10
2024     * @deprecated since 10
2025     * @useinstead ohos.bluetooth.ble/ble#stopBLEScan
2026     */
2027    function stopBLEScan(): void;
2028
2029    /**
2030     * Subscribe BLE scan result.
2031     *
2032     * @permission ohos.permission.USE_BLUETOOTH
2033     * @param { 'BLEDeviceFind' } type - Type of the scan result event to listen for.
2034     * @param { Callback<Array<ScanResult>> } callback - Callback used to listen for the scan result event.
2035     * @throws { BusinessError } 201 - Permission denied.
2036     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
2037     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2038     * @throws { BusinessError } 801 - Capability not supported.
2039     * @throws { BusinessError } 2900099 - Operation failed.
2040     * @syscap SystemCapability.Communication.Bluetooth.Core
2041     * @since 9
2042     * @deprecated since 10
2043     * @useinstead ohos.bluetooth.ble/ble.on#event:BLEDeviceFind
2044     */
2045    /**
2046     * Subscribe BLE scan result.
2047     * The permission required by this interface is changed from USE_BLUETOOTH to ACCESS_BLUETOOTH.
2048     *
2049     * @permission ohos.permission.ACCESS_BLUETOOTH
2050     * @param { 'BLEDeviceFind' } type - Type of the scan result event to listen for.
2051     * @param { Callback<Array<ScanResult>> } callback - Callback used to listen for the scan result event.
2052     * @throws { BusinessError } 201 - Permission denied.
2053     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
2054     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2055     * @throws { BusinessError } 801 - Capability not supported.
2056     * @throws { BusinessError } 2900099 - Operation failed.
2057     * @syscap SystemCapability.Communication.Bluetooth.Core
2058     * @since 10
2059     * @deprecated since 10
2060     * @useinstead ohos.bluetooth.ble/ble.on#event:BLEDeviceFind
2061     */
2062    function on(type: 'BLEDeviceFind', callback: Callback<Array<ScanResult>>): void;
2063
2064    /**
2065     * Unsubscribe BLE scan result.
2066     *
2067     * @permission ohos.permission.USE_BLUETOOTH
2068     * @param { 'BLEDeviceFind' } type - Type of the scan result event to listen for.
2069     * @param { Callback<Array<ScanResult>> } callback - Callback used to listen for the scan result event.
2070     * @throws { BusinessError } 201 - Permission denied.
2071     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
2072     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2073     * @throws { BusinessError } 801 - Capability not supported.
2074     * @throws { BusinessError } 2900099 - Operation failed.
2075     * @syscap SystemCapability.Communication.Bluetooth.Core
2076     * @since 9
2077     * @deprecated since 10
2078     * @useinstead ohos.bluetooth.ble/ble.off#event:BLEDeviceFind
2079     */
2080    /**
2081     * Unsubscribe BLE scan result.
2082     * The permission required by this interface is changed from USE_BLUETOOTH to ACCESS_BLUETOOTH.
2083     *
2084     * @permission ohos.permission.ACCESS_BLUETOOTH
2085     * @param { 'BLEDeviceFind' } type - Type of the scan result event to listen for.
2086     * @param { Callback<Array<ScanResult>> } callback - Callback used to listen for the scan result event.
2087     * @throws { BusinessError } 201 - Permission denied.
2088     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
2089     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2090     * @throws { BusinessError } 801 - Capability not supported.
2091     * @throws { BusinessError } 2900099 - Operation failed.
2092     * @syscap SystemCapability.Communication.Bluetooth.Core
2093     * @since 10
2094     * @deprecated since 10
2095     * @useinstead ohos.bluetooth.ble/ble.off#event:BLEDeviceFind
2096     */
2097    function off(type: 'BLEDeviceFind', callback?: Callback<Array<ScanResult>>): void;
2098  }
2099
2100  /**
2101   * Manages GATT server. Before calling an Gatt server method, you must use {@link createGattServer} to create an GattServer instance.
2102   *
2103   * @typedef GattServer
2104   * @syscap SystemCapability.Communication.Bluetooth.Core
2105   * @since 9
2106   * @deprecated since 10
2107   * @useinstead ohos.bluetooth.ble/ble.GattServer
2108   */
2109  interface GattServer {
2110    /**
2111     * Starts BLE advertising.
2112     *
2113     * @permission ohos.permission.DISCOVER_BLUETOOTH
2114     * @param { AdvertiseSetting } setting - Indicates the settings for BLE advertising.
2115     * If you need to use the default value, set this parameter to {@code null}.
2116     * @param { AdvertiseData } advData - Indicates the advertising data.
2117     * @param { AdvertiseData } advResponse - Indicates the scan response associated with the advertising data.
2118     * @throws { BusinessError } 201 - Permission denied.
2119     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
2120     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2121     * @throws { BusinessError } 801 - Capability not supported.
2122     * @throws { BusinessError } 2900001 - Service stopped.
2123     * @throws { BusinessError } 2900003 - Bluetooth disabled.
2124     * @throws { BusinessError } 2900099 - Operation failed.
2125     * @syscap SystemCapability.Communication.Bluetooth.Core
2126     * @since 9
2127     * @deprecated since 10
2128     * @useinstead ohos.bluetooth.ble/ble#startAdvertising
2129     */
2130    /**
2131     * Starts BLE advertising.
2132     * The permission required by this interface is changed from DISCOVER_BLUETOOTH to ACCESS_BLUETOOTH.
2133     *
2134     * @permission ohos.permission.ACCESS_BLUETOOTH
2135     * @param { AdvertiseSetting } setting - Indicates the settings for BLE advertising.
2136     * If you need to use the default value, set this parameter to {@code null}.
2137     * @param { AdvertiseData } advData - Indicates the advertising data.
2138     * @param { AdvertiseData } advResponse - Indicates the scan response associated with the advertising data.
2139     * @throws { BusinessError } 201 - Permission denied.
2140     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
2141     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2142     * @throws { BusinessError } 801 - Capability not supported.
2143     * @throws { BusinessError } 2900001 - Service stopped.
2144     * @throws { BusinessError } 2900003 - Bluetooth disabled.
2145     * @throws { BusinessError } 2900099 - Operation failed.
2146     * @syscap SystemCapability.Communication.Bluetooth.Core
2147     * @since 10
2148     * @deprecated since 10
2149     * @useinstead ohos.bluetooth.ble/ble#startAdvertising
2150     */
2151    startAdvertising(setting: AdvertiseSetting, advData: AdvertiseData, advResponse?: AdvertiseData): void;
2152
2153    /**
2154     * Stops BLE advertising.
2155     *
2156     * @permission ohos.permission.DISCOVER_BLUETOOTH
2157     * @throws { BusinessError } 201 - Permission denied.
2158     * @throws { BusinessError } 801 - Capability not supported.
2159     * @throws { BusinessError } 2900001 - Service stopped.
2160     * @throws { BusinessError } 2900003 - Bluetooth disabled.
2161     * @throws { BusinessError } 2900099 - Operation failed.
2162     * @syscap SystemCapability.Communication.Bluetooth.Core
2163     * @since 9
2164     * @deprecated since 10
2165     * @useinstead ohos.bluetooth.ble/ble#stopAdvertising
2166     */
2167    /**
2168     * Stops BLE advertising.
2169     * The permission required by this interface is changed from DISCOVER_BLUETOOTH to ACCESS_BLUETOOTH.
2170     *
2171     * @permission ohos.permission.ACCESS_BLUETOOTH
2172     * @throws { BusinessError } 201 - Permission denied.
2173     * @throws { BusinessError } 801 - Capability not supported.
2174     * @throws { BusinessError } 2900001 - Service stopped.
2175     * @throws { BusinessError } 2900003 - Bluetooth disabled.
2176     * @throws { BusinessError } 2900099 - Operation failed.
2177     * @syscap SystemCapability.Communication.Bluetooth.Core
2178     * @since 10
2179     * @deprecated since 10
2180     * @useinstead ohos.bluetooth.ble/ble#stopAdvertising
2181     */
2182    stopAdvertising(): void;
2183
2184    /**
2185     * Adds a specified service to be hosted.
2186     * <p>The added service and its characteristics are provided by the local device.
2187     *
2188     * @permission ohos.permission.USE_BLUETOOTH
2189     * @param { GattService } service - Indicates the service to add.
2190     * @throws { BusinessError } 201 - Permission denied.
2191     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
2192     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2193     * @throws { BusinessError } 801 - Capability not supported.
2194     * @throws { BusinessError } 2900001 - Service stopped.
2195     * @throws { BusinessError } 2900003 - Bluetooth disabled.
2196     * @throws { BusinessError } 2900099 - Operation failed.
2197     * @syscap SystemCapability.Communication.Bluetooth.Core
2198     * @since 9
2199     * @deprecated since 10
2200     * @useinstead ohos.bluetooth.ble/ble.GattServer#addService
2201     */
2202    /**
2203     * Adds a specified service to be hosted.
2204     * <p>The added service and its characteristics are provided by the local device.
2205     * The permission required by this interface is changed from USE_BLUETOOTH to ACCESS_BLUETOOTH.
2206     *
2207     * @permission ohos.permission.ACCESS_BLUETOOTH
2208     * @param { GattService } service - Indicates the service to add.
2209     * @throws { BusinessError } 201 - Permission denied.
2210     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
2211     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2212     * @throws { BusinessError } 801 - Capability not supported.
2213     * @throws { BusinessError } 2900001 - Service stopped.
2214     * @throws { BusinessError } 2900003 - Bluetooth disabled.
2215     * @throws { BusinessError } 2900099 - Operation failed.
2216     * @syscap SystemCapability.Communication.Bluetooth.Core
2217     * @since 10
2218     * @deprecated since 10
2219     * @useinstead ohos.bluetooth.ble/ble.GattServer#addService
2220     */
2221    addService(service: GattService): void;
2222
2223    /**
2224     * Removes a specified service from the list of GATT services provided by this device.
2225     *
2226     * @permission ohos.permission.USE_BLUETOOTH
2227     * @param { string } serviceUuid - Indicates the UUID of the service to remove.
2228     * @throws { BusinessError } 201 - Permission denied.
2229     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
2230     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2231     * @throws { BusinessError } 801 - Capability not supported.
2232     * @throws { BusinessError } 2900001 - Service stopped.
2233     * @throws { BusinessError } 2900003 - Bluetooth disabled.
2234     * @throws { BusinessError } 2900004 - Profile not supported.
2235     * @throws { BusinessError } 2900099 - Operation failed.
2236     * @syscap SystemCapability.Communication.Bluetooth.Core
2237     * @since 9
2238     * @deprecated since 10
2239     * @useinstead ohos.bluetooth.ble/ble.GattServer#removeService
2240     */
2241    /**
2242     * Removes a specified service from the list of GATT services provided by this device.
2243     * The permission required by this interface is changed from USE_BLUETOOTH to ACCESS_BLUETOOTH.
2244     *
2245     * @permission ohos.permission.ACCESS_BLUETOOTH
2246     * @param { string } serviceUuid - Indicates the UUID of the service to remove.
2247     * @throws { BusinessError } 201 - Permission denied.
2248     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
2249     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2250     * @throws { BusinessError } 801 - Capability not supported.
2251     * @throws { BusinessError } 2900001 - Service stopped.
2252     * @throws { BusinessError } 2900003 - Bluetooth disabled.
2253     * @throws { BusinessError } 2900004 - Profile not supported.
2254     * @throws { BusinessError } 2900099 - Operation failed.
2255     * @syscap SystemCapability.Communication.Bluetooth.Core
2256     * @since 10
2257     * @deprecated since 10
2258     * @useinstead ohos.bluetooth.ble/ble.GattServer#removeService
2259     */
2260    removeService(serviceUuid: string): void;
2261
2262    /**
2263     * Closes this {@code GattServer} object and unregisters its callbacks.
2264     *
2265     * @permission ohos.permission.USE_BLUETOOTH
2266     * @throws { BusinessError } 201 - Permission denied.
2267     * @throws { BusinessError } 801 - Capability not supported.
2268     * @throws { BusinessError } 2900001 - Service stopped.
2269     * @throws { BusinessError } 2900003 - Bluetooth disabled.
2270     * @throws { BusinessError } 2900099 - Operation failed.
2271     * @syscap SystemCapability.Communication.Bluetooth.Core
2272     * @since 9
2273     * @deprecated since 10
2274     * @useinstead ohos.bluetooth.ble/ble.GattServer#close
2275     */
2276    /**
2277     * Closes this {@code GattServer} object and unregisters its callbacks.
2278     * The permission required by this interface is changed from USE_BLUETOOTH to ACCESS_BLUETOOTH.
2279     *
2280     * @permission ohos.permission.ACCESS_BLUETOOTH
2281     * @throws { BusinessError } 201 - Permission denied.
2282     * @throws { BusinessError } 801 - Capability not supported.
2283     * @throws { BusinessError } 2900001 - Service stopped.
2284     * @throws { BusinessError } 2900003 - Bluetooth disabled.
2285     * @throws { BusinessError } 2900099 - Operation failed.
2286     * @syscap SystemCapability.Communication.Bluetooth.Core
2287     * @since 10
2288     * @deprecated since 10
2289     * @useinstead ohos.bluetooth.ble/ble.GattServer#close
2290     */
2291    close(): void;
2292
2293    /**
2294     * Sends a notification of a change in a specified local characteristic.
2295     * <p>This method should be called for every BLE peripheral device that has requested notifications.
2296     *
2297     * @permission ohos.permission.USE_BLUETOOTH
2298     * @param { string } deviceId - Indicates the address of the BLE peripheral device to receive the notification.
2299     * @param { NotifyCharacteristic } notifyCharacteristic - Indicates the local characteristic that has changed.
2300     * @throws { BusinessError } 201 - Permission denied.
2301     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
2302     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2303     * @throws { BusinessError } 801 - Capability not supported.
2304     * @throws { BusinessError } 2900001 - Service stopped.
2305     * @throws { BusinessError } 2900003 - Bluetooth disabled.
2306     * @throws { BusinessError } 2900099 - Operation failed.
2307     * @syscap SystemCapability.Communication.Bluetooth.Core
2308     * @since 9
2309     * @deprecated since 10
2310     * @useinstead ohos.bluetooth.ble/ble.GattServer#notifyCharacteristicChanged
2311     */
2312    /**
2313     * Sends a notification of a change in a specified local characteristic.
2314     * <p>This method should be called for every BLE peripheral device that has requested notifications.
2315     * The permission required by this interface is changed from USE_BLUETOOTH to ACCESS_BLUETOOTH.
2316     *
2317     * @permission ohos.permission.ACCESS_BLUETOOTH
2318     * @param { string } deviceId - Indicates the address of the BLE peripheral device to receive the notification.
2319     * @param { NotifyCharacteristic } notifyCharacteristic - Indicates the local characteristic that has changed.
2320     * @throws { BusinessError } 201 - Permission denied.
2321     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
2322     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2323     * @throws { BusinessError } 801 - Capability not supported.
2324     * @throws { BusinessError } 2900001 - Service stopped.
2325     * @throws { BusinessError } 2900003 - Bluetooth disabled.
2326     * @throws { BusinessError } 2900099 - Operation failed.
2327     * @syscap SystemCapability.Communication.Bluetooth.Core
2328     * @since 10
2329     * @deprecated since 10
2330     * @useinstead ohos.bluetooth.ble/ble.GattServer#notifyCharacteristicChanged
2331     */
2332    notifyCharacteristicChanged(deviceId: string, notifyCharacteristic: NotifyCharacteristic): void;
2333
2334    /**
2335     * Sends a response to a specified read or write request to a given BLE peripheral device.
2336     *
2337     * @permission ohos.permission.USE_BLUETOOTH
2338     * @param { ServerResponse } serverResponse - Indicates the response parameters {@link ServerResponse}.
2339     * @throws { BusinessError } 201 - Permission denied.
2340     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
2341     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2342     * @throws { BusinessError } 801 - Capability not supported.
2343     * @throws { BusinessError } 2900001 - Service stopped.
2344     * @throws { BusinessError } 2900003 - Bluetooth disabled.
2345     * @throws { BusinessError } 2900099 - Operation failed.
2346     * @syscap SystemCapability.Communication.Bluetooth.Core
2347     * @since 9
2348     * @deprecated since 10
2349     * @useinstead ohos.bluetooth.ble/ble.GattServer#sendResponse
2350     */
2351    /**
2352     * Sends a response to a specified read or write request to a given BLE peripheral device.
2353     * The permission required by this interface is changed from USE_BLUETOOTH to ACCESS_BLUETOOTH.
2354     *
2355     * @permission ohos.permission.ACCESS_BLUETOOTH
2356     * @param { ServerResponse } serverResponse - Indicates the response parameters {@link ServerResponse}.
2357     * @throws { BusinessError } 201 - Permission denied.
2358     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
2359     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2360     * @throws { BusinessError } 801 - Capability not supported.
2361     * @throws { BusinessError } 2900001 - Service stopped.
2362     * @throws { BusinessError } 2900003 - Bluetooth disabled.
2363     * @throws { BusinessError } 2900099 - Operation failed.
2364     * @syscap SystemCapability.Communication.Bluetooth.Core
2365     * @since 10
2366     * @deprecated since 10
2367     * @useinstead ohos.bluetooth.ble/ble.GattServer#sendResponse
2368     */
2369    sendResponse(serverResponse: ServerResponse): void;
2370
2371    /**
2372     * Subscribe characteristic read event.
2373     *
2374     * @permission ohos.permission.USE_BLUETOOTH
2375     * @param { 'characteristicRead' } type - Type of the characteristic read event to listen for.
2376     * @param { Callback<CharacteristicReadRequest> } callback - Callback used to listen for the characteristic read event.
2377     * @throws { BusinessError } 201 - Permission denied.
2378     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
2379     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2380     * @throws { BusinessError } 801 - Capability not supported.
2381     * @syscap SystemCapability.Communication.Bluetooth.Core
2382     * @since 9
2383     * @deprecated since 10
2384     * @useinstead ohos.bluetooth.ble/ble.GattServer.on#event:characteristicRead
2385     */
2386    /**
2387     * Subscribe characteristic read event.
2388     * The permission required by this interface is changed from USE_BLUETOOTH to ACCESS_BLUETOOTH.
2389     *
2390     * @permission ohos.permission.ACCESS_BLUETOOTH
2391     * @param { 'characteristicRead' } type - Type of the characteristic read event to listen for.
2392     * @param { Callback<CharacteristicReadRequest> } callback - Callback used to listen for the characteristic read event.
2393     * @throws { BusinessError } 201 - Permission denied.
2394     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
2395     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2396     * @throws { BusinessError } 801 - Capability not supported.
2397     * @syscap SystemCapability.Communication.Bluetooth.Core
2398     * @since 10
2399     * @deprecated since 10
2400     * @useinstead ohos.bluetooth.ble/ble.GattServer.on#event:characteristicRead
2401     */
2402    on(type: 'characteristicRead', callback: Callback<CharacteristicReadRequest>): void;
2403
2404    /**
2405     * Unsubscribe characteristic read event.
2406     *
2407     * @permission ohos.permission.USE_BLUETOOTH
2408     * @param { 'characteristicRead' } type - Type of the characteristic read event to listen for.
2409     * @param { Callback<CharacteristicReadRequest> } callback - Callback used to listen for the characteristic read event.
2410     * @throws { BusinessError } 201 - Permission denied.
2411     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
2412     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2413     * @throws { BusinessError } 801 - Capability not supported.
2414     * @syscap SystemCapability.Communication.Bluetooth.Core
2415     * @since 9
2416     * @deprecated since 10
2417     * @useinstead ohos.bluetooth.ble/ble.GattServer.off#event:characteristicRead
2418     */
2419    /**
2420     * Unsubscribe characteristic read event.
2421     * The permission required by this interface is changed from USE_BLUETOOTH to ACCESS_BLUETOOTH.
2422     *
2423     * @permission ohos.permission.ACCESS_BLUETOOTH
2424     * @param { 'characteristicRead' } type - Type of the characteristic read event to listen for.
2425     * @param { Callback<CharacteristicReadRequest> } callback - Callback used to listen for the characteristic read event.
2426     * @throws { BusinessError } 201 - Permission denied.
2427     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
2428     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2429     * @throws { BusinessError } 801 - Capability not supported.
2430     * @syscap SystemCapability.Communication.Bluetooth.Core
2431     * @since 10
2432     * @deprecated since 10
2433     * @useinstead ohos.bluetooth.ble/ble.GattServer.off#event:characteristicRead
2434     */
2435    off(type: 'characteristicRead', callback?: Callback<CharacteristicReadRequest>): void;
2436
2437    /**
2438     * Subscribe characteristic write event.
2439     *
2440     * @permission ohos.permission.USE_BLUETOOTH
2441     * @param { 'characteristicWrite' } type - Type of the characteristic write event to listen for.
2442     * @param { Callback<CharacteristicWriteRequest> } callback - Callback used to listen for the characteristic write event.
2443     * @throws { BusinessError } 201 - Permission denied.
2444     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
2445     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2446     * @throws { BusinessError } 801 - Capability not supported.
2447     * @syscap SystemCapability.Communication.Bluetooth.Core
2448     * @since 9
2449     * @deprecated since 10
2450     * @useinstead ohos.bluetooth.ble/ble.GattServer.on#event:characteristicWrite
2451     */
2452    /**
2453     * Subscribe characteristic write event.
2454     * The permission required by this interface is changed from USE_BLUETOOTH to ACCESS_BLUETOOTH.
2455     *
2456     * @permission ohos.permission.ACCESS_BLUETOOTH
2457     * @param { 'characteristicWrite' } type - Type of the characteristic write event to listen for.
2458     * @param { Callback<CharacteristicWriteRequest> } callback - Callback used to listen for the characteristic write event.
2459     * @throws { BusinessError } 201 - Permission denied.
2460     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
2461     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2462     * @throws { BusinessError } 801 - Capability not supported.
2463     * @syscap SystemCapability.Communication.Bluetooth.Core
2464     * @since 10
2465     * @deprecated since 10
2466     * @useinstead ohos.bluetooth.ble/ble.GattServer.on#event:characteristicWrite
2467     */
2468    on(type: 'characteristicWrite', callback: Callback<CharacteristicWriteRequest>): void;
2469
2470    /**
2471     * Unsubscribe characteristic write event.
2472     *
2473     * @permission ohos.permission.USE_BLUETOOTH
2474     * @param { 'characteristicWrite' } type - Type of the characteristic write event to listen for.
2475     * @param { Callback<CharacteristicWriteRequest> } callback - Callback used to listen for the characteristic write event.
2476     * @throws { BusinessError } 201 - Permission denied.
2477     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
2478     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2479     * @throws { BusinessError } 801 - Capability not supported.
2480     * @syscap SystemCapability.Communication.Bluetooth.Core
2481     * @since 9
2482     * @deprecated since 10
2483     * @useinstead ohos.bluetooth.ble/ble.GattServer.off#event:characteristicWrite
2484     */
2485    /**
2486     * Unsubscribe characteristic write event.
2487     * The permission required by this interface is changed from USE_BLUETOOTH to ACCESS_BLUETOOTH.
2488     *
2489     * @permission ohos.permission.ACCESS_BLUETOOTH
2490     * @param { 'characteristicWrite' } type - Type of the characteristic write event to listen for.
2491     * @param { Callback<CharacteristicWriteRequest> } callback - Callback used to listen for the characteristic write event.
2492     * @throws { BusinessError } 201 - Permission denied.
2493     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
2494     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2495     * @throws { BusinessError } 801 - Capability not supported.
2496     * @syscap SystemCapability.Communication.Bluetooth.Core
2497     * @since 10
2498     * @deprecated since 10
2499     * @useinstead ohos.bluetooth.ble/ble.GattServer.off#event:characteristicWrite
2500     */
2501    off(type: 'characteristicWrite', callback?: Callback<CharacteristicWriteRequest>): void;
2502
2503    /**
2504     * Subscribe descriptor read event.
2505     *
2506     * @permission ohos.permission.USE_BLUETOOTH
2507     * @param { 'descriptorRead' } type - Type of the descriptor read event to listen for.
2508     * @param { Callback<DescriptorReadRequest> } callback - Callback used to listen for the descriptor read event.
2509     * @throws { BusinessError } 201 - Permission denied.
2510     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
2511     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2512     * @throws { BusinessError } 801 - Capability not supported.
2513     * @syscap SystemCapability.Communication.Bluetooth.Core
2514     * @since 9
2515     * @deprecated since 10
2516     * @useinstead ohos.bluetooth.ble/ble.GattServer.on#event:descriptorRead
2517     */
2518    /**
2519     * Subscribe descriptor read event.
2520     * The permission required by this interface is changed from USE_BLUETOOTH to ACCESS_BLUETOOTH.
2521     *
2522     * @permission ohos.permission.ACCESS_BLUETOOTH
2523     * @param { 'descriptorRead' } type - Type of the descriptor read event to listen for.
2524     * @param { Callback<DescriptorReadRequest> } callback - Callback used to listen for the descriptor read event.
2525     * @throws { BusinessError } 201 - Permission denied.
2526     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
2527     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2528     * @throws { BusinessError } 801 - Capability not supported.
2529     * @syscap SystemCapability.Communication.Bluetooth.Core
2530     * @since 10
2531     * @deprecated since 10
2532     * @useinstead ohos.bluetooth.ble/ble.GattServer.on#event:descriptorRead
2533     */
2534    on(type: 'descriptorRead', callback: Callback<DescriptorReadRequest>): void;
2535
2536    /**
2537     * Unsubscribe descriptor read event.
2538     *
2539     * @permission ohos.permission.USE_BLUETOOTH
2540     * @param { 'descriptorRead' } type - Type of the descriptor read event to listen for.
2541     * @param { Callback<DescriptorReadRequest> } callback - Callback used to listen for the descriptor read event.
2542     * @throws { BusinessError } 201 - Permission denied.
2543     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
2544     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2545     * @throws { BusinessError } 801 - Capability not supported.
2546     * @syscap SystemCapability.Communication.Bluetooth.Core
2547     * @since 9
2548     * @deprecated since 10
2549     * @useinstead ohos.bluetooth.ble/ble.GattServer.off#event:descriptorRead
2550     */
2551    /**
2552     * Unsubscribe descriptor read event.
2553     * The permission required by this interface is changed from USE_BLUETOOTH to ACCESS_BLUETOOTH.
2554     *
2555     * @permission ohos.permission.ACCESS_BLUETOOTH
2556     * @param { 'descriptorRead' } type - Type of the descriptor read event to listen for.
2557     * @param { Callback<DescriptorReadRequest> } callback - Callback used to listen for the descriptor read event.
2558     * @throws { BusinessError } 201 - Permission denied.
2559     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
2560     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2561     * @throws { BusinessError } 801 - Capability not supported.
2562     * @syscap SystemCapability.Communication.Bluetooth.Core
2563     * @since 10
2564     * @deprecated since 10
2565     * @useinstead ohos.bluetooth.ble/ble.GattServer.off#event:descriptorRead
2566     */
2567    off(type: 'descriptorRead', callback?: Callback<DescriptorReadRequest>): void;
2568
2569    /**
2570     * Subscribe descriptor write event.
2571     *
2572     * @permission ohos.permission.USE_BLUETOOTH
2573     * @param { 'descriptorWrite' } type - Type of the descriptor write event to listen for.
2574     * @param { Callback<DescriptorWriteRequest> } callback - Callback used to listen for the descriptor write event.
2575     * @throws { BusinessError } 201 - Permission denied.
2576     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
2577     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2578     * @throws { BusinessError } 801 - Capability not supported.
2579     * @syscap SystemCapability.Communication.Bluetooth.Core
2580     * @since 9
2581     * @deprecated since 10
2582     * @useinstead ohos.bluetooth.ble/ble.GattServer.on#event:descriptorWrite
2583     */
2584    /**
2585     * Subscribe descriptor write event.
2586     * The permission required by this interface is changed from USE_BLUETOOTH to ACCESS_BLUETOOTH.
2587     *
2588     * @permission ohos.permission.ACCESS_BLUETOOTH
2589     * @param { 'descriptorWrite' } type - Type of the descriptor write event to listen for.
2590     * @param { Callback<DescriptorWriteRequest> } callback - Callback used to listen for the descriptor write event.
2591     * @throws { BusinessError } 201 - Permission denied.
2592     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
2593     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2594     * @throws { BusinessError } 801 - Capability not supported.
2595     * @syscap SystemCapability.Communication.Bluetooth.Core
2596     * @since 10
2597     * @deprecated since 10
2598     * @useinstead ohos.bluetooth.ble/ble.GattServer.on#event:descriptorWrite
2599     */
2600    on(type: 'descriptorWrite', callback: Callback<DescriptorWriteRequest>): void;
2601
2602    /**
2603     * Unsubscribe descriptor write event.
2604     *
2605     * @permission ohos.permission.USE_BLUETOOTH
2606     * @param { 'descriptorWrite' } type - Type of the descriptor write event to listen for.
2607     * @param { Callback<DescriptorWriteRequest> } callback - Callback used to listen for the descriptor write event.
2608     * @throws { BusinessError } 201 - Permission denied.
2609     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
2610     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2611     * @throws { BusinessError } 801 - Capability not supported.
2612     * @syscap SystemCapability.Communication.Bluetooth.Core
2613     * @since 9
2614     * @deprecated since 10
2615     * @useinstead ohos.bluetooth.ble/ble.GattServer.off#event:descriptorWrite
2616     */
2617    /**
2618     * Unsubscribe descriptor write event.
2619     * The permission required by this interface is changed from USE_BLUETOOTH to ACCESS_BLUETOOTH.
2620     *
2621     * @permission ohos.permission.ACCESS_BLUETOOTH
2622     * @param { 'descriptorWrite' } type - Type of the descriptor write event to listen for.
2623     * @param { Callback<DescriptorWriteRequest> } callback - Callback used to listen for the descriptor write event.
2624     * @throws { BusinessError } 201 - Permission denied.
2625     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
2626     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2627     * @throws { BusinessError } 801 - Capability not supported.
2628     * @syscap SystemCapability.Communication.Bluetooth.Core
2629     * @since 10
2630     * @deprecated since 10
2631     * @useinstead ohos.bluetooth.ble/ble.GattServer.off#event:descriptorWrite
2632     */
2633    off(type: 'descriptorWrite', callback?: Callback<DescriptorWriteRequest>): void;
2634
2635    /**
2636     * Subscribe server connection state changed event.
2637     *
2638     * @permission ohos.permission.USE_BLUETOOTH
2639     * @param { 'connectStateChange' } type - Type of the connection state changed event to listen for.
2640     * @param { Callback<BLEConnectChangedState> } callback - Callback used to listen for the connection state changed event.
2641     * @throws { BusinessError } 201 - Permission denied.
2642     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
2643     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2644     * @throws { BusinessError } 801 - Capability not supported.
2645     * @syscap SystemCapability.Communication.Bluetooth.Core
2646     * @since 9
2647     * @deprecated since 10
2648     * @useinstead ohos.bluetooth.ble/ble.GattServer.on#event:connectionStateChange
2649     */
2650    /**
2651     * Subscribe server connection state changed event.
2652     * The permission required by this interface is changed from USE_BLUETOOTH to ACCESS_BLUETOOTH.
2653     *
2654     * @permission ohos.permission.ACCESS_BLUETOOTH
2655     * @param { 'connectStateChange' } type - Type of the connection state changed event to listen for.
2656     * @param { Callback<BLEConnectChangedState> } callback - Callback used to listen for the connection state changed event.
2657     * @throws { BusinessError } 201 - Permission denied.
2658     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
2659     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2660     * @throws { BusinessError } 801 - Capability not supported.
2661     * @syscap SystemCapability.Communication.Bluetooth.Core
2662     * @since 10
2663     * @deprecated since 10
2664     * @useinstead ohos.bluetooth.ble/ble.GattServer.on#event:connectionStateChange
2665     */
2666    on(type: 'connectStateChange', callback: Callback<BLEConnectChangedState>): void;
2667
2668    /**
2669     * Unsubscribe server connection state changed event.
2670     *
2671     * @permission ohos.permission.USE_BLUETOOTH
2672     * @param { 'connectStateChange' } type - Type of the connection state changed event to listen for.
2673     * @param { Callback<BLEConnectChangedState> } callback - Callback used to listen for the connection state changed event.
2674     * @throws { BusinessError } 201 - Permission denied.
2675     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
2676     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2677     * @throws { BusinessError } 801 - Capability not supported.
2678     * @syscap SystemCapability.Communication.Bluetooth.Core
2679     * @since 9
2680     * @deprecated since 10
2681     * @useinstead ohos.bluetooth.ble/ble.GattServer.off#event:connectionStateChange
2682     */
2683    /**
2684     * Unsubscribe server connection state changed event.
2685     * The permission required by this interface is changed from USE_BLUETOOTH to ACCESS_BLUETOOTH.
2686     *
2687     * @permission ohos.permission.ACCESS_BLUETOOTH
2688     * @param { 'connectStateChange' } type - Type of the connection state changed event to listen for.
2689     * @param { Callback<BLEConnectChangedState> } callback - Callback used to listen for the connection state changed event.
2690     * @throws { BusinessError } 201 - Permission denied.
2691     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
2692     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2693     * @throws { BusinessError } 801 - Capability not supported.
2694     * @syscap SystemCapability.Communication.Bluetooth.Core
2695     * @since 10
2696     * @deprecated since 10
2697     * @useinstead ohos.bluetooth.ble/ble.GattServer.off#event:connectionStateChange
2698     */
2699    off(type: 'connectStateChange', callback?: Callback<BLEConnectChangedState>): void;
2700  }
2701
2702  /**
2703   * Manages GATT client. Before calling an Gatt client method, you must use {@link createGattClientDevice} to create an GattClientDevice instance.
2704   *
2705   * @typedef GattClientDevice
2706   * @syscap SystemCapability.Communication.Bluetooth.Core
2707   * @since 9
2708   * @deprecated since 10
2709   * @useinstead ohos.bluetooth.ble/ble.GattClientDevice
2710   */
2711  interface GattClientDevice {
2712    /**
2713     * Connects to a BLE peripheral device.
2714     * <p>The 'BLEConnectionStateChange' event is subscribed to return the connection state.
2715     *
2716     * @permission ohos.permission.USE_BLUETOOTH
2717     * @throws { BusinessError } 201 - Permission denied.
2718     * @throws { BusinessError } 801 - Capability not supported.
2719     * @throws { BusinessError } 2900001 - Service stopped.
2720     * @throws { BusinessError } 2900003 - Bluetooth disabled.
2721     * @throws { BusinessError } 2900099 - Operation failed.
2722     * @syscap SystemCapability.Communication.Bluetooth.Core
2723     * @since 9
2724     * @deprecated since 10
2725     * @useinstead ohos.bluetooth.ble/ble.GattClientDevice#connect
2726     */
2727    /**
2728     * Connects to a BLE peripheral device.
2729     * <p>The 'BLEConnectionStateChange' event is subscribed to return the connection state.
2730     * The permission required by this interface is changed from USE_BLUETOOTH to ACCESS_BLUETOOTH.
2731     *
2732     * @permission ohos.permission.ACCESS_BLUETOOTH
2733     * @throws { BusinessError } 201 - Permission denied.
2734     * @throws { BusinessError } 801 - Capability not supported.
2735     * @throws { BusinessError } 2900001 - Service stopped.
2736     * @throws { BusinessError } 2900003 - Bluetooth disabled.
2737     * @throws { BusinessError } 2900099 - Operation failed.
2738     * @syscap SystemCapability.Communication.Bluetooth.Core
2739     * @since 10
2740     * @deprecated since 10
2741     * @useinstead ohos.bluetooth.ble/ble.GattClientDevice#connect
2742     */
2743    connect(): void;
2744
2745    /**
2746     * Disconnects from or stops an ongoing connection to a BLE peripheral device.
2747     *
2748     * @permission ohos.permission.USE_BLUETOOTH
2749     * @throws { BusinessError } 201 - Permission denied.
2750     * @throws { BusinessError } 801 - Capability not supported.
2751     * @throws { BusinessError } 2900001 - Service stopped.
2752     * @throws { BusinessError } 2900003 - Bluetooth disabled.
2753     * @throws { BusinessError } 2900099 - Operation failed.
2754     * @syscap SystemCapability.Communication.Bluetooth.Core
2755     * @since 9
2756     * @deprecated since 10
2757     * @useinstead ohos.bluetooth.ble/ble.GattClientDevice#disconnect
2758     */
2759    /**
2760     * Disconnects from or stops an ongoing connection to a BLE peripheral device.
2761     * The permission required by this interface is changed from USE_BLUETOOTH to ACCESS_BLUETOOTH.
2762     *
2763     * @permission ohos.permission.ACCESS_BLUETOOTH
2764     * @throws { BusinessError } 201 - Permission denied.
2765     * @throws { BusinessError } 801 - Capability not supported.
2766     * @throws { BusinessError } 2900001 - Service stopped.
2767     * @throws { BusinessError } 2900003 - Bluetooth disabled.
2768     * @throws { BusinessError } 2900099 - Operation failed.
2769     * @syscap SystemCapability.Communication.Bluetooth.Core
2770     * @since 10
2771     * @deprecated since 10
2772     * @useinstead ohos.bluetooth.ble/ble.GattClientDevice#disconnect
2773     */
2774    disconnect(): void;
2775
2776    /**
2777     * Disables a BLE peripheral device.
2778     * <p> This method unregisters the device and clears the registered callbacks and handles.
2779     *
2780     * @permission ohos.permission.USE_BLUETOOTH
2781     * @throws { BusinessError } 201 - Permission denied.
2782     * @throws { BusinessError } 801 - Capability not supported.
2783     * @throws { BusinessError } 2900001 - Service stopped.
2784     * @throws { BusinessError } 2900003 - Bluetooth disabled.
2785     * @throws { BusinessError } 2900099 - Operation failed.
2786     * @syscap SystemCapability.Communication.Bluetooth.Core
2787     * @since 9
2788     * @deprecated since 10
2789     * @useinstead ohos.bluetooth.ble/ble.GattClientDevice#close
2790     */
2791    /**
2792     * Disables a BLE peripheral device.
2793     * <p> This method unregisters the device and clears the registered callbacks and handles.
2794     * The permission required by this interface is changed from USE_BLUETOOTH to ACCESS_BLUETOOTH.
2795     *
2796     * @permission ohos.permission.ACCESS_BLUETOOTH
2797     * @throws { BusinessError } 201 - Permission denied.
2798     * @throws { BusinessError } 801 - Capability not supported.
2799     * @throws { BusinessError } 2900001 - Service stopped.
2800     * @throws { BusinessError } 2900003 - Bluetooth disabled.
2801     * @throws { BusinessError } 2900099 - Operation failed.
2802     * @syscap SystemCapability.Communication.Bluetooth.Core
2803     * @since 10
2804     * @deprecated since 10
2805     * @useinstead ohos.bluetooth.ble/ble.GattClientDevice#close
2806     */
2807    close(): void;
2808
2809    /**
2810     * Obtains the name of BLE peripheral device.
2811     *
2812     * @permission ohos.permission.USE_BLUETOOTH
2813     * @param { AsyncCallback<string> } callback - Callback used to obtain the device name.
2814     * @throws { BusinessError } 201 - Permission denied.
2815     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
2816     * <br>2. Incorrect parameter types.
2817     * @throws { BusinessError } 801 - Capability not supported.
2818     * @throws { BusinessError } 2900001 - Service stopped.
2819     * @throws { BusinessError } 2900099 - Operation failed.
2820     * @syscap SystemCapability.Communication.Bluetooth.Core
2821     * @since 9
2822     * @deprecated since 10
2823     * @useinstead ohos.bluetooth.ble/ble.GattClientDevice#getDeviceName
2824     */
2825    /**
2826     * Obtains the name of BLE peripheral device.
2827     * The permission required by this interface is changed from USE_BLUETOOTH to ACCESS_BLUETOOTH.
2828     *
2829     * @permission ohos.permission.ACCESS_BLUETOOTH
2830     * @param { AsyncCallback<string> } callback - Callback used to obtain the device name.
2831     * @throws { BusinessError } 201 - Permission denied.
2832     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
2833     * <br>2. Incorrect parameter types.
2834     * @throws { BusinessError } 801 - Capability not supported.
2835     * @throws { BusinessError } 2900001 - Service stopped.
2836     * @throws { BusinessError } 2900099 - Operation failed.
2837     * @syscap SystemCapability.Communication.Bluetooth.Core
2838     * @since 10
2839     * @deprecated since 10
2840     * @useinstead ohos.bluetooth.ble/ble.GattClientDevice#getDeviceName
2841     */
2842    getDeviceName(callback: AsyncCallback<string>): void;
2843
2844    /**
2845     * Obtains the name of BLE peripheral device.
2846     *
2847     * @permission ohos.permission.USE_BLUETOOTH
2848     * @returns { Promise<string> } Returns a string representation of the name if obtained;
2849     * returns {@code null} if the name fails to be obtained or the name does not exist.
2850     * @throws { BusinessError } 201 - Permission denied.
2851     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
2852     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2853     * @throws { BusinessError } 801 - Capability not supported.
2854     * @throws { BusinessError } 2900001 - Service stopped.
2855     * @throws { BusinessError } 2900099 - Operation failed.
2856     * @syscap SystemCapability.Communication.Bluetooth.Core
2857     * @since 9
2858     * @deprecated since 10
2859     * @useinstead ohos.bluetooth.ble/ble.GattClientDevice#getDeviceName
2860     */
2861    /**
2862     * Obtains the name of BLE peripheral device.
2863     * The permission required by this interface is changed from USE_BLUETOOTH to ACCESS_BLUETOOTH.
2864     *
2865     * @permission ohos.permission.ACCESS_BLUETOOTH
2866     * @returns { Promise<string> } Returns a string representation of the name if obtained;
2867     * returns {@code null} if the name fails to be obtained or the name does not exist.
2868     * @throws { BusinessError } 201 - Permission denied.
2869     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
2870     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2871     * @throws { BusinessError } 801 - Capability not supported.
2872     * @throws { BusinessError } 2900001 - Service stopped.
2873     * @throws { BusinessError } 2900099 - Operation failed.
2874     * @syscap SystemCapability.Communication.Bluetooth.Core
2875     * @since 10
2876     * @deprecated since 10
2877     * @useinstead ohos.bluetooth.ble/ble.GattClientDevice#getDeviceName
2878     */
2879    getDeviceName(): Promise<string>;
2880
2881    /**
2882     * Starts discovering services.
2883     *
2884     * @permission ohos.permission.USE_BLUETOOTH
2885     * @param { AsyncCallback<Array<GattService>> } callback - Callback used to catch the services.
2886     * @throws { BusinessError } 201 - Permission denied.
2887     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
2888     * <br>2. Incorrect parameter types.
2889     * @throws { BusinessError } 801 - Capability not supported.
2890     * @throws { BusinessError } 2900001 - Service stopped.
2891     * @throws { BusinessError } 2900099 - Operation failed.
2892     * @syscap SystemCapability.Communication.Bluetooth.Core
2893     * @since 9
2894     * @deprecated since 10
2895     * @useinstead ohos.bluetooth.ble/ble.GattClientDevice#getServices
2896     */
2897    /**
2898     * Starts discovering services.
2899     * The permission required by this interface is changed from USE_BLUETOOTH to ACCESS_BLUETOOTH.
2900     *
2901     * @permission ohos.permission.ACCESS_BLUETOOTH
2902     * @param { AsyncCallback<Array<GattService>> } callback - Callback used to catch the services.
2903     * @throws { BusinessError } 201 - Permission denied.
2904     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
2905     * <br>2. Incorrect parameter types.
2906     * @throws { BusinessError } 801 - Capability not supported.
2907     * @throws { BusinessError } 2900001 - Service stopped.
2908     * @throws { BusinessError } 2900099 - Operation failed.
2909     * @syscap SystemCapability.Communication.Bluetooth.Core
2910     * @since 10
2911     * @deprecated since 10
2912     * @useinstead ohos.bluetooth.ble/ble.GattClientDevice#getServices
2913     */
2914    getServices(callback: AsyncCallback<Array<GattService>>): void;
2915
2916    /**
2917     * Starts discovering services.
2918     *
2919     * @permission ohos.permission.USE_BLUETOOTH
2920     * @returns { Promise<Array<GattService>> } Returns the list of services {@link GattService} of the BLE peripheral device.
2921     * @throws { BusinessError } 201 - Permission denied.
2922     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
2923     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2924     * @throws { BusinessError } 801 - Capability not supported.
2925     * @throws { BusinessError } 2900001 - Service stopped.
2926     * @throws { BusinessError } 2900099 - Operation failed.
2927     * @syscap SystemCapability.Communication.Bluetooth.Core
2928     * @since 9
2929     * @deprecated since 10
2930     * @useinstead ohos.bluetooth.ble/ble.GattClientDevice#getServices
2931     */
2932    /**
2933     * Starts discovering services.
2934     * The permission required by this interface is changed from USE_BLUETOOTH to ACCESS_BLUETOOTH.
2935     *
2936     * @permission ohos.permission.ACCESS_BLUETOOTH
2937     * @returns { Promise<Array<GattService>> } Returns the list of services {@link GattService} of the BLE peripheral device.
2938     * @throws { BusinessError } 201 - Permission denied.
2939     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
2940     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2941     * @throws { BusinessError } 801 - Capability not supported.
2942     * @throws { BusinessError } 2900001 - Service stopped.
2943     * @throws { BusinessError } 2900099 - Operation failed.
2944     * @syscap SystemCapability.Communication.Bluetooth.Core
2945     * @since 10
2946     * @deprecated since 10
2947     * @useinstead ohos.bluetooth.ble/ble.GattClientDevice#getServices
2948     */
2949    getServices(): Promise<Array<GattService>>;
2950
2951    /**
2952     * Reads the characteristic of a BLE peripheral device.
2953     *
2954     * @permission ohos.permission.USE_BLUETOOTH
2955     * @param { BLECharacteristic } characteristic - Indicates the characteristic to read.
2956     * @param { AsyncCallback<BLECharacteristic> } callback - Callback invoked to return the characteristic value read.
2957     * @throws { BusinessError } 201 - Permission denied.
2958     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
2959     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2960     * @throws { BusinessError } 801 - Capability not supported.
2961     * @throws { BusinessError } 2900001 - Service stopped.
2962     * @throws { BusinessError } 2901000 - Read forbidden.
2963     * @throws { BusinessError } 2900099 - Operation failed.
2964     * @syscap SystemCapability.Communication.Bluetooth.Core
2965     * @since 9
2966     * @deprecated since 10
2967     * @useinstead ohos.bluetooth.ble/ble.GattClientDevice#readCharacteristicValue
2968     */
2969    /**
2970     * Reads the characteristic of a BLE peripheral device.
2971     * The permission required by this interface is changed from USE_BLUETOOTH to ACCESS_BLUETOOTH.
2972     *
2973     * @permission ohos.permission.ACCESS_BLUETOOTH
2974     * @param { BLECharacteristic } characteristic - Indicates the characteristic to read.
2975     * @param { AsyncCallback<BLECharacteristic> } callback - Callback invoked to return the characteristic value read.
2976     * @throws { BusinessError } 201 - Permission denied.
2977     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
2978     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2979     * @throws { BusinessError } 801 - Capability not supported.
2980     * @throws { BusinessError } 2900001 - Service stopped.
2981     * @throws { BusinessError } 2901000 - Read forbidden.
2982     * @throws { BusinessError } 2900099 - Operation failed.
2983     * @syscap SystemCapability.Communication.Bluetooth.Core
2984     * @since 10
2985     * @deprecated since 10
2986     * @useinstead ohos.bluetooth.ble/ble.GattClientDevice#readCharacteristicValue
2987     */
2988    readCharacteristicValue(characteristic: BLECharacteristic, callback: AsyncCallback<BLECharacteristic>): void;
2989
2990    /**
2991     * Reads the characteristic of a BLE peripheral device.
2992     *
2993     * @permission ohos.permission.USE_BLUETOOTH
2994     * @param { BLECharacteristic } characteristic - Indicates the characteristic to read.
2995     * @returns { Promise<BLECharacteristic> } - Promise used to return the characteristic value read.
2996     * @throws { BusinessError } 201 - Permission denied.
2997     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
2998     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2999     * @throws { BusinessError } 801 - Capability not supported.
3000     * @throws { BusinessError } 2900001 - Service stopped.
3001     * @throws { BusinessError } 2901000 - Read forbidden.
3002     * @throws { BusinessError } 2900099 - Operation failed.
3003     * @syscap SystemCapability.Communication.Bluetooth.Core
3004     * @since 9
3005     * @deprecated since 10
3006     * @useinstead ohos.bluetooth.ble/ble.GattClientDevice#readCharacteristicValue
3007     */
3008    /**
3009     * Reads the characteristic of a BLE peripheral device.
3010     * The permission required by this interface is changed from USE_BLUETOOTH to ACCESS_BLUETOOTH.
3011     *
3012     * @permission ohos.permission.ACCESS_BLUETOOTH
3013     * @param { BLECharacteristic } characteristic - Indicates the characteristic to read.
3014     * @returns { Promise<BLECharacteristic> } - Promise used to return the characteristic value read.
3015     * @throws { BusinessError } 201 - Permission denied.
3016     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
3017     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
3018     * @throws { BusinessError } 801 - Capability not supported.
3019     * @throws { BusinessError } 2900001 - Service stopped.
3020     * @throws { BusinessError } 2901000 - Read forbidden.
3021     * @throws { BusinessError } 2900099 - Operation failed.
3022     * @syscap SystemCapability.Communication.Bluetooth.Core
3023     * @since 10
3024     * @deprecated since 10
3025     * @useinstead ohos.bluetooth.ble/ble.GattClientDevice#readCharacteristicValue
3026     */
3027    readCharacteristicValue(characteristic: BLECharacteristic): Promise<BLECharacteristic>;
3028
3029    /**
3030     * Reads the descriptor of a BLE peripheral device.
3031     *
3032     * @permission ohos.permission.USE_BLUETOOTH
3033     * @param { BLEDescriptor } descriptor - Indicates the descriptor to read.
3034     * @param { AsyncCallback<BLEDescriptor> } callback - Callback invoked to return the descriptor read.
3035     * @throws { BusinessError } 201 - Permission denied.
3036     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
3037     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
3038     * @throws { BusinessError } 801 - Capability not supported.
3039     * @throws { BusinessError } 2900001 - Service stopped.
3040     * @throws { BusinessError } 2901000 - Read forbidden.
3041     * @throws { BusinessError } 2900099 - Operation failed.
3042     * @syscap SystemCapability.Communication.Bluetooth.Core
3043     * @since 9
3044     * @deprecated since 10
3045     * @useinstead ohos.bluetooth.ble/ble.GattClientDevice#readDescriptorValue
3046     */
3047    /**
3048     * Reads the descriptor of a BLE peripheral device.
3049     * The permission required by this interface is changed from USE_BLUETOOTH to ACCESS_BLUETOOTH.
3050     *
3051     * @permission ohos.permission.ACCESS_BLUETOOTH
3052     * @param { BLEDescriptor } descriptor - Indicates the descriptor to read.
3053     * @param { AsyncCallback<BLEDescriptor> } callback - Callback invoked to return the descriptor read.
3054     * @throws { BusinessError } 201 - Permission denied.
3055     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
3056     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
3057     * @throws { BusinessError } 801 - Capability not supported.
3058     * @throws { BusinessError } 2900001 - Service stopped.
3059     * @throws { BusinessError } 2901000 - Read forbidden.
3060     * @throws { BusinessError } 2900099 - Operation failed.
3061     * @syscap SystemCapability.Communication.Bluetooth.Core
3062     * @since 10
3063     * @deprecated since 10
3064     * @useinstead ohos.bluetooth.ble/ble.GattClientDevice#readDescriptorValue
3065     */
3066    readDescriptorValue(descriptor: BLEDescriptor, callback: AsyncCallback<BLEDescriptor>): void;
3067
3068    /**
3069     * Reads the descriptor of a BLE peripheral device.
3070     *
3071     * @permission ohos.permission.USE_BLUETOOTH
3072     * @param { BLEDescriptor } descriptor - Indicates the descriptor to read.
3073     * @returns { Promise<BLEDescriptor> } - Promise used to return the descriptor read.
3074     * @throws { BusinessError } 201 - Permission denied.
3075     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
3076     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
3077     * @throws { BusinessError } 801 - Capability not supported.
3078     * @throws { BusinessError } 2900001 - Service stopped.
3079     * @throws { BusinessError } 2901000 - Read forbidden.
3080     * @throws { BusinessError } 2900099 - Operation failed.
3081     * @syscap SystemCapability.Communication.Bluetooth.Core
3082     * @since 9
3083     * @deprecated since 10
3084     * @useinstead ohos.bluetooth.ble/ble.GattClientDevice#readDescriptorValue
3085     */
3086    /**
3087     * Reads the descriptor of a BLE peripheral device.
3088     * The permission required by this interface is changed from USE_BLUETOOTH to ACCESS_BLUETOOTH.
3089     *
3090     * @permission ohos.permission.ACCESS_BLUETOOTH
3091     * @param { BLEDescriptor } descriptor - Indicates the descriptor to read.
3092     * @returns { Promise<BLEDescriptor> } - Promise used to return the descriptor read.
3093     * @throws { BusinessError } 201 - Permission denied.
3094     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
3095     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
3096     * @throws { BusinessError } 801 - Capability not supported.
3097     * @throws { BusinessError } 2900001 - Service stopped.
3098     * @throws { BusinessError } 2901000 - Read forbidden.
3099     * @throws { BusinessError } 2900099 - Operation failed.
3100     * @syscap SystemCapability.Communication.Bluetooth.Core
3101     * @since 10
3102     * @deprecated since 10
3103     * @useinstead ohos.bluetooth.ble/ble.GattClientDevice#readDescriptorValue
3104     */
3105    readDescriptorValue(descriptor: BLEDescriptor): Promise<BLEDescriptor>;
3106
3107    /**
3108     * Writes the characteristic of a BLE peripheral device.
3109     *
3110     * @permission ohos.permission.USE_BLUETOOTH
3111     * @param { BLECharacteristic } characteristic - Indicates the characteristic to write.
3112     * @throws { BusinessError } 201 - Permission denied.
3113     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
3114     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
3115     * @throws { BusinessError } 801 - Capability not supported.
3116     * @throws { BusinessError } 2900001 - Service stopped.
3117     * @throws { BusinessError } 2901001 - Write forbidden.
3118     * @throws { BusinessError } 2900099 - Operation failed.
3119     * @syscap SystemCapability.Communication.Bluetooth.Core
3120     * @since 9
3121     * @deprecated since 10
3122     * @useinstead ohos.bluetooth.ble/ble.GattClientDevice#writeCharacteristicValue
3123     */
3124    /**
3125     * Writes the characteristic of a BLE peripheral device.
3126     * The permission required by this interface is changed from USE_BLUETOOTH to ACCESS_BLUETOOTH.
3127     *
3128     * @permission ohos.permission.ACCESS_BLUETOOTH
3129     * @param { BLECharacteristic } characteristic - Indicates the characteristic to write.
3130     * @throws { BusinessError } 201 - Permission denied.
3131     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
3132     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
3133     * @throws { BusinessError } 801 - Capability not supported.
3134     * @throws { BusinessError } 2900001 - Service stopped.
3135     * @throws { BusinessError } 2901001 - Write forbidden.
3136     * @throws { BusinessError } 2900099 - Operation failed.
3137     * @syscap SystemCapability.Communication.Bluetooth.Core
3138     * @since 10
3139     * @deprecated since 10
3140     * @useinstead ohos.bluetooth.ble/ble.GattClientDevice#writeCharacteristicValue
3141     */
3142    writeCharacteristicValue(characteristic: BLECharacteristic): void;
3143
3144    /**
3145     * Writes the descriptor of a BLE peripheral device.
3146     *
3147     * @permission ohos.permission.USE_BLUETOOTH
3148     * @param { BLEDescriptor } descriptor - Indicates the descriptor to write.
3149     * @throws { BusinessError } 201 - Permission denied.
3150     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
3151     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
3152     * @throws { BusinessError } 801 - Capability not supported.
3153     * @throws { BusinessError } 2900001 - Service stopped.
3154     * @throws { BusinessError } 2901001 - Write forbidden.
3155     * @throws { BusinessError } 2900099 - Operation failed.
3156     * @syscap SystemCapability.Communication.Bluetooth.Core
3157     * @since 9
3158     * @deprecated since 10
3159     * @useinstead ohos.bluetooth.ble/ble.GattClientDevice#writeDescriptorValue
3160     */
3161    /**
3162     * Writes the descriptor of a BLE peripheral device.
3163     * The permission required by this interface is changed from USE_BLUETOOTH to ACCESS_BLUETOOTH.
3164     *
3165     * @permission ohos.permission.ACCESS_BLUETOOTH
3166     * @param { BLEDescriptor } descriptor - Indicates the descriptor to write.
3167     * @throws { BusinessError } 201 - Permission denied.
3168     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
3169     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
3170     * @throws { BusinessError } 801 - Capability not supported.
3171     * @throws { BusinessError } 2900001 - Service stopped.
3172     * @throws { BusinessError } 2901001 - Write forbidden.
3173     * @throws { BusinessError } 2900099 - Operation failed.
3174     * @syscap SystemCapability.Communication.Bluetooth.Core
3175     * @since 10
3176     * @deprecated since 10
3177     * @useinstead ohos.bluetooth.ble/ble.GattClientDevice#writeDescriptorValue
3178     */
3179    writeDescriptorValue(descriptor: BLEDescriptor): void;
3180
3181    /**
3182     * Get the RSSI value of this BLE peripheral device.
3183     *
3184     * @permission ohos.permission.USE_BLUETOOTH
3185     * @param { AsyncCallback<number> } callback - Callback invoked to return the RSSI, in dBm.
3186     * @throws { BusinessError } 201 - Permission denied.
3187     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
3188     * <br>2. Incorrect parameter types.
3189     * @throws { BusinessError } 801 - Capability not supported.
3190     * @throws { BusinessError } 2900099 - Operation failed.
3191     * @syscap SystemCapability.Communication.Bluetooth.Core
3192     * @since 9
3193     * @deprecated since 10
3194     * @useinstead ohos.bluetooth.ble/ble.GattClientDevice#getRssiValue
3195     */
3196    /**
3197     * Get the RSSI value of this BLE peripheral device.
3198     * The permission required by this interface is changed from USE_BLUETOOTH to ACCESS_BLUETOOTH.
3199     *
3200     * @permission ohos.permission.ACCESS_BLUETOOTH
3201     * @param { AsyncCallback<number> } callback - Callback invoked to return the RSSI, in dBm.
3202     * @throws { BusinessError } 201 - Permission denied.
3203     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
3204     * <br>2. Incorrect parameter types.
3205     * @throws { BusinessError } 801 - Capability not supported.
3206     * @throws { BusinessError } 2900099 - Operation failed.
3207     * @syscap SystemCapability.Communication.Bluetooth.Core
3208     * @since 10
3209     * @deprecated since 10
3210     * @useinstead ohos.bluetooth.ble/ble.GattClientDevice#getRssiValue
3211     */
3212    getRssiValue(callback: AsyncCallback<number>): void;
3213
3214    /**
3215     * Get the RSSI value of this BLE peripheral device.
3216     *
3217     * @permission ohos.permission.USE_BLUETOOTH
3218     * @returns { Promise<number> } Returns the RSSI value.
3219     * @throws { BusinessError } 201 - Permission denied.
3220     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
3221     * <br>2. Incorrect parameter types.
3222     * @throws { BusinessError } 801 - Capability not supported.
3223     * @throws { BusinessError } 2900099 - Operation failed.
3224     * @syscap SystemCapability.Communication.Bluetooth.Core
3225     * @since 9
3226     * @deprecated since 10
3227     * @useinstead ohos.bluetooth.ble/ble.GattClientDevice#getRssiValue
3228     */
3229    /**
3230     * Get the RSSI value of this BLE peripheral device.
3231     * The permission required by this interface is changed from USE_BLUETOOTH to ACCESS_BLUETOOTH.
3232     *
3233     * @permission ohos.permission.ACCESS_BLUETOOTH
3234     * @returns { Promise<number> } Returns the RSSI value.
3235     * @throws { BusinessError } 201 - Permission denied.
3236     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
3237     * <br>2. Incorrect parameter types.
3238     * @throws { BusinessError } 801 - Capability not supported.
3239     * @throws { BusinessError } 2900099 - Operation failed.
3240     * @syscap SystemCapability.Communication.Bluetooth.Core
3241     * @since 10
3242     * @deprecated since 10
3243     * @useinstead ohos.bluetooth.ble/ble.GattClientDevice#getRssiValue
3244     */
3245    getRssiValue(): Promise<number>;
3246
3247    /**
3248     * Set the mtu size of a BLE peripheral device.
3249     *
3250     * @permission ohos.permission.USE_BLUETOOTH
3251     * @param { number } mtu - The maximum transmission unit.
3252     * @throws { BusinessError } 201 - Permission denied.
3253     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
3254     * <br>2. Incorrect parameter types.
3255     * @throws { BusinessError } 801 - Capability not supported.
3256     * @throws { BusinessError } 2900001 - Service stopped.
3257     * @throws { BusinessError } 2900099 - Operation failed.
3258     * @syscap SystemCapability.Communication.Bluetooth.Core
3259     * @since 9
3260     * @deprecated since 10
3261     * @useinstead ohos.bluetooth.ble/ble.GattClientDevice#setBLEMtuSize
3262     */
3263    /**
3264     * Set the mtu size of a BLE peripheral device.
3265     * The permission required by this interface is changed from USE_BLUETOOTH to ACCESS_BLUETOOTH.
3266     *
3267     * @permission ohos.permission.ACCESS_BLUETOOTH
3268     * @param { number } mtu - The maximum transmission unit.
3269     * @throws { BusinessError } 201 - Permission denied.
3270     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
3271     * <br>2. Incorrect parameter types.
3272     * @throws { BusinessError } 801 - Capability not supported.
3273     * @throws { BusinessError } 2900001 - Service stopped.
3274     * @throws { BusinessError } 2900099 - Operation failed.
3275     * @syscap SystemCapability.Communication.Bluetooth.Core
3276     * @since 10
3277     * @deprecated since 10
3278     * @useinstead ohos.bluetooth.ble/ble.GattClientDevice#setBLEMtuSize
3279     */
3280    setBLEMtuSize(mtu: number): void;
3281
3282    /**
3283     * Enables or disables notification of a characteristic when value changed.
3284     *
3285     * @permission ohos.permission.USE_BLUETOOTH
3286     * @param { BLECharacteristic } characteristic - BLE characteristic to listen for.
3287     * @param { boolean } enable - Specifies whether to enable notification of the characteristic. The value {@code true} indicates
3288     * that notification is enabled, and the value {@code false} indicates that notification is disabled.
3289     * @throws { BusinessError } 201 - Permission denied.
3290     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
3291     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
3292     * @throws { BusinessError } 801 - Capability not supported.
3293     * @throws { BusinessError } 2900001 - Service stopped.
3294     * @throws { BusinessError } 2900099 - Operation failed.
3295     * @syscap SystemCapability.Communication.Bluetooth.Core
3296     * @since 9
3297     * @deprecated since 10
3298     * @useinstead ohos.bluetooth.ble/ble.GattClientDevice#setCharacteristicChangeNotification
3299     */
3300    /**
3301     * Enables or disables notification of a characteristic when value changed.
3302     * The permission required by this interface is changed from USE_BLUETOOTH to ACCESS_BLUETOOTH.
3303     *
3304     * @permission ohos.permission.ACCESS_BLUETOOTH
3305     * @param { BLECharacteristic } characteristic - BLE characteristic to listen for.
3306     * @param { boolean } enable - Specifies whether to enable notification of the characteristic. The value {@code true} indicates
3307     * that notification is enabled, and the value {@code false} indicates that notification is disabled.
3308     * @throws { BusinessError } 201 - Permission denied.
3309     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.
3310     * <br>2. Incorrect parameter types. 3. Parameter verification failed.
3311     * @throws { BusinessError } 801 - Capability not supported.
3312     * @throws { BusinessError } 2900001 - Service stopped.
3313     * @throws { BusinessError } 2900099 - Operation failed.
3314     * @syscap SystemCapability.Communication.Bluetooth.Core
3315     * @since 10
3316     * @deprecated since 10
3317     * @useinstead ohos.bluetooth.ble/ble.GattClientDevice#setCharacteristicChangeNotification
3318     */
3319    setNotifyCharacteristicChanged(characteristic: BLECharacteristic, enable: boolean): void;
3320
3321    /**
3322     * Subscribe characteristic value changed event.
3323     *
3324     * @permission ohos.permission.USE_BLUETOOTH
3325     * @param { 'BLECharacteristicChange' } type - Type of the characteristic value changed event to listen for.
3326     * @param { Callback<BLECharacteristic> } callback - Callback used to listen for the characteristic value changed event.
3327     * @throws { BusinessError } 201 - Permission denied.
3328     * @throws { BusinessError } 801 - Capability not supported.
3329     * @syscap SystemCapability.Communication.Bluetooth.Core
3330     * @since 9
3331     * @deprecated since 10
3332     * @useinstead ohos.bluetooth.ble/ble.GattClientDevice.on#event:BLECharacteristicChange
3333     */
3334    /**
3335     * Subscribe characteristic value changed event.
3336     * The permission required by this interface is changed from USE_BLUETOOTH to ACCESS_BLUETOOTH.
3337     *
3338     * @permission ohos.permission.ACCESS_BLUETOOTH
3339     * @param { 'BLECharacteristicChange' } type - Type of the characteristic value changed event to listen for.
3340     * @param { Callback<BLECharacteristic> } callback - Callback used to listen for the characteristic value changed event.
3341     * @throws { BusinessError } 201 - Permission denied.
3342     * @throws { BusinessError } 801 - Capability not supported.
3343     * @syscap SystemCapability.Communication.Bluetooth.Core
3344     * @since 10
3345     * @deprecated since 10
3346     * @useinstead ohos.bluetooth.ble/ble.GattClientDevice.on#event:BLECharacteristicChange
3347     */
3348    on(type: 'BLECharacteristicChange', callback: Callback<BLECharacteristic>): void;
3349
3350    /**
3351     * Unsubscribe characteristic value changed event.
3352     *
3353     * @permission ohos.permission.USE_BLUETOOTH
3354     * @param { 'BLECharacteristicChange' } type - Type of the characteristic value changed event to listen for.
3355     * @param { Callback<BLECharacteristic> } callback - Callback used to listen for the characteristic value changed event.
3356     * @throws { BusinessError } 201 - Permission denied.
3357     * @throws { BusinessError } 801 - Capability not supported.
3358     * @syscap SystemCapability.Communication.Bluetooth.Core
3359     * @since 9
3360     * @deprecated since 10
3361     * @useinstead ohos.bluetooth.ble/ble.GattClientDevice.off#event:BLECharacteristicChange
3362     */
3363    /**
3364     * Unsubscribe characteristic value changed event.
3365     * The permission required by this interface is changed from USE_BLUETOOTH to ACCESS_BLUETOOTH.
3366     *
3367     * @permission ohos.permission.ACCESS_BLUETOOTH
3368     * @param { 'BLECharacteristicChange' } type - Type of the characteristic value changed event to listen for.
3369     * @param { Callback<BLECharacteristic> } callback - Callback used to listen for the characteristic value changed event.
3370     * @throws { BusinessError } 201 - Permission denied.
3371     * @throws { BusinessError } 801 - Capability not supported.
3372     * @syscap SystemCapability.Communication.Bluetooth.Core
3373     * @since 10
3374     * @deprecated since 10
3375     * @useinstead ohos.bluetooth.ble/ble.GattClientDevice.off#event:BLECharacteristicChange
3376     */
3377    off(type: 'BLECharacteristicChange', callback?: Callback<BLECharacteristic>): void;
3378
3379    /**
3380     * Subscribe client connection state changed event.
3381     *
3382     * @permission ohos.permission.USE_BLUETOOTH
3383     * @param { 'BLEConnectionStateChange' } type - Type of the connection state changed event to listen for.
3384     * @param { Callback<BLEConnectChangedState> } callback - Callback used to listen for the connection state changed event.
3385     * @throws { BusinessError } 201 - Permission denied.
3386     * @throws { BusinessError } 801 - Capability not supported.
3387     * @syscap SystemCapability.Communication.Bluetooth.Core
3388     * @since 9
3389     * @deprecated since 10
3390     * @useinstead ohos.bluetooth.ble/ble.GattClientDevice.on#event:BLEConnectionStateChange
3391     */
3392    /**
3393     * Subscribe client connection state changed event.
3394     * The permission required by this interface is changed from USE_BLUETOOTH to ACCESS_BLUETOOTH.
3395     *
3396     * @permission ohos.permission.ACCESS_BLUETOOTH
3397     * @param { 'BLEConnectionStateChange' } type - Type of the connection state changed event to listen for.
3398     * @param { Callback<BLEConnectChangedState> } callback - Callback used to listen for the connection state changed event.
3399     * @throws { BusinessError } 201 - Permission denied.
3400     * @throws { BusinessError } 801 - Capability not supported.
3401     * @syscap SystemCapability.Communication.Bluetooth.Core
3402     * @since 10
3403     * @deprecated since 10
3404     * @useinstead ohos.bluetooth.ble/ble.GattClientDevice.on#event:BLEConnectionStateChange
3405     */
3406    on(type: 'BLEConnectionStateChange', callback: Callback<BLEConnectChangedState>): void;
3407
3408    /**
3409     * Unsubscribe client connection state changed event.
3410     *
3411     * @permission ohos.permission.USE_BLUETOOTH
3412     * @param { 'BLEConnectionStateChange' } type - Type of the connection state changed event to listen for.
3413     * @param { Callback<BLEConnectChangedState> } callback - Callback used to listen for the connection state changed event.
3414     * @throws { BusinessError } 201 - Permission denied.
3415     * @throws { BusinessError } 801 - Capability not supported.
3416     * @syscap SystemCapability.Communication.Bluetooth.Core
3417     * @since 9
3418     * @deprecated since 10
3419     * @useinstead ohos.bluetooth.ble/ble.GattClientDevice.off#event:BLEConnectionStateChange
3420     */
3421    /**
3422     * Unsubscribe client connection state changed event.
3423     * The permission required by this interface is changed from USE_BLUETOOTH to ACCESS_BLUETOOTH.
3424     *
3425     * @permission ohos.permission.ACCESS_BLUETOOTH
3426     * @param { 'BLEConnectionStateChange' } type - Type of the connection state changed event to listen for.
3427     * @param { Callback<BLEConnectChangedState> } callback - Callback used to listen for the connection state changed event.
3428     * @throws { BusinessError } 201 - Permission denied.
3429     * @throws { BusinessError } 801 - Capability not supported.
3430     * @syscap SystemCapability.Communication.Bluetooth.Core
3431     * @since 10
3432     * @deprecated since 10
3433     * @useinstead ohos.bluetooth.ble/ble.GattClientDevice.off#event:BLEConnectionStateChange
3434     */
3435    off(type: 'BLEConnectionStateChange', callback?: Callback<BLEConnectChangedState>): void;
3436  }
3437
3438  /**
3439   * Describes the Gatt service.
3440   *
3441   * @typedef GattService
3442   * @syscap SystemCapability.Communication.Bluetooth.Core
3443   * @since 9
3444   * @deprecated since 10
3445   * @useinstead ohos.bluetooth.ble/ble.GattService
3446   */
3447  interface GattService {
3448    /**
3449     * The UUID of a GattService instance
3450     *
3451     * @syscap SystemCapability.Communication.Bluetooth.Core
3452     * @since 9
3453     * @deprecated since 10
3454     * @useinstead ohos.bluetooth.ble/ble.GattService#serviceUuid
3455     */
3456    serviceUuid: string;
3457    /**
3458     * Indicates whether the GattService instance is primary or secondary.
3459     *
3460     * @syscap SystemCapability.Communication.Bluetooth.Core
3461     * @since 9
3462     * @deprecated since 10
3463     * @useinstead ohos.bluetooth.ble/ble.GattService#isPrimary
3464     */
3465    isPrimary: boolean;
3466    /**
3467     * The {@link BLECharacteristic} list belongs to this GattService instance
3468     *
3469     * @syscap SystemCapability.Communication.Bluetooth.Core
3470     * @since 9
3471     * @deprecated since 10
3472     * @useinstead ohos.bluetooth.ble/ble.GattService#characteristics
3473     */
3474    characteristics: Array<BLECharacteristic>;
3475    /**
3476     * The list of GATT services contained in the service
3477     *
3478     * @syscap SystemCapability.Communication.Bluetooth.Core
3479     * @since 9
3480     * @deprecated since 10
3481     * @useinstead ohos.bluetooth.ble/ble.GattService#includeServices
3482     */
3483    includeServices?: Array<GattService>;
3484  }
3485
3486  /**
3487   * Describes the Gatt characteristic.
3488   *
3489   * @typedef BLECharacteristic
3490   * @syscap SystemCapability.Communication.Bluetooth.Core
3491   * @since 9
3492   * @deprecated since 10
3493   * @useinstead ohos.bluetooth.ble/ble.BLECharacteristic
3494   */
3495  interface BLECharacteristic {
3496    /**
3497     * The UUID of the {@link GattService} instance to which the characteristic belongs
3498     *
3499     * @syscap SystemCapability.Communication.Bluetooth.Core
3500     * @since 9
3501     * @deprecated since 10
3502     * @useinstead ohos.bluetooth.ble/ble.BLECharacteristic#serviceUuid
3503     */
3504    serviceUuid: string;
3505    /**
3506     * The UUID of a BLECharacteristic instance
3507     *
3508     * @syscap SystemCapability.Communication.Bluetooth.Core
3509     * @since 9
3510     * @deprecated since 10
3511     * @useinstead ohos.bluetooth.ble/ble.BLECharacteristic#characteristicUuid
3512     */
3513    characteristicUuid: string;
3514    /**
3515     * The value of a BLECharacteristic instance
3516     *
3517     * @syscap SystemCapability.Communication.Bluetooth.Core
3518     * @since 9
3519     * @deprecated since 10
3520     * @useinstead ohos.bluetooth.ble/ble.BLECharacteristic#characteristicValue
3521     */
3522    characteristicValue: ArrayBuffer;
3523    /**
3524     * The list of {@link BLEDescriptor} contained in the characteristic
3525     *
3526     * @syscap SystemCapability.Communication.Bluetooth.Core
3527     * @since 9
3528     * @deprecated since 10
3529     * @useinstead ohos.bluetooth.ble/ble.BLECharacteristic#descriptors
3530     */
3531    descriptors: Array<BLEDescriptor>;
3532  }
3533
3534  /**
3535   * Describes the Gatt descriptor.
3536   *
3537   * @typedef BLEDescriptor
3538   * @syscap SystemCapability.Communication.Bluetooth.Core
3539   * @since 9
3540   * @deprecated since 10
3541   * @useinstead ohos.bluetooth.ble/ble.BLEDescriptor
3542   */
3543  interface BLEDescriptor {
3544    /**
3545     * The UUID of the {@link GattService} instance to which the descriptor belongs
3546     *
3547     * @syscap SystemCapability.Communication.Bluetooth.Core
3548     * @since 9
3549     * @deprecated since 10
3550     * @useinstead ohos.bluetooth.ble/ble.BLEDescriptor#serviceUuid
3551     */
3552    serviceUuid: string;
3553    /**
3554     * The UUID of the {@link BLECharacteristic} instance to which the descriptor belongs
3555     *
3556     * @syscap SystemCapability.Communication.Bluetooth.Core
3557     * @since 9
3558     * @deprecated since 10
3559     * @useinstead ohos.bluetooth.ble/ble.BLEDescriptor#characteristicUuid
3560     */
3561    characteristicUuid: string;
3562    /**
3563     * The UUID of the BLEDescriptor instance
3564     *
3565     * @syscap SystemCapability.Communication.Bluetooth.Core
3566     * @since 9
3567     * @deprecated since 10
3568     * @useinstead ohos.bluetooth.ble/ble.BLEDescriptor#descriptorUuid
3569     */
3570    descriptorUuid: string;
3571    /**
3572     * The value of the BLEDescriptor instance
3573     *
3574     * @syscap SystemCapability.Communication.Bluetooth.Core
3575     * @since 9
3576     * @deprecated since 10
3577     * @useinstead ohos.bluetooth.ble/ble.BLEDescriptor#descriptorValue
3578     */
3579    descriptorValue: ArrayBuffer;
3580  }
3581
3582  /**
3583   * Describes the value of the indication or notification sent by the Gatt server.
3584   *
3585   * @typedef NotifyCharacteristic
3586   * @syscap SystemCapability.Communication.Bluetooth.Core
3587   * @since 9
3588   * @deprecated since 10
3589   * @useinstead ohos.bluetooth.ble/ble.NotifyCharacteristic
3590   */
3591  interface NotifyCharacteristic {
3592    /**
3593     * The UUID of the {@link GattService} instance to which the characteristic belongs
3594     *
3595     * @syscap SystemCapability.Communication.Bluetooth.Core
3596     * @since 9
3597     * @deprecated since 10
3598     * @useinstead ohos.bluetooth.ble/ble.NotifyCharacteristic#serviceUuid
3599     */
3600    serviceUuid: string;
3601    /**
3602     * The UUID of a NotifyCharacteristic instance
3603     *
3604     * @syscap SystemCapability.Communication.Bluetooth.Core
3605     * @since 9
3606     * @deprecated since 10
3607     * @useinstead ohos.bluetooth.ble/ble.NotifyCharacteristic#characteristicUuid
3608     */
3609    characteristicUuid: string;
3610    /**
3611     * The value of a NotifyCharacteristic instance
3612     *
3613     * @syscap SystemCapability.Communication.Bluetooth.Core
3614     * @since 9
3615     * @deprecated since 10
3616     * @useinstead ohos.bluetooth.ble/ble.NotifyCharacteristic#characteristicValue
3617     */
3618    characteristicValue: ArrayBuffer;
3619    /**
3620     * Specifies whether to request confirmation from the BLE peripheral device (indication) or
3621     * send a notification. Value {@code true} indicates the former and {@code false} indicates the latter.
3622     *
3623     * @syscap SystemCapability.Communication.Bluetooth.Core
3624     * @since 9
3625     * @deprecated since 10
3626     * @useinstead ohos.bluetooth.ble/ble.NotifyCharacteristic#confirm
3627     */
3628    confirm: boolean;
3629  }
3630
3631  /**
3632   * Describes the parameters of the Gatt client's characteristic read request.
3633   *
3634   * @typedef CharacteristicReadRequest
3635   * @syscap SystemCapability.Communication.Bluetooth.Core
3636   * @since 9
3637   * @deprecated since 10
3638   * @useinstead ohos.bluetooth.ble/ble.CharacteristicReadRequest
3639   */
3640  interface CharacteristicReadRequest {
3641    /**
3642     * Indicates the address of the client that initiates the read request
3643     *
3644     * @syscap SystemCapability.Communication.Bluetooth.Core
3645     * @since 9
3646     * @deprecated since 10
3647     * @useinstead ohos.bluetooth.ble/ble.CharacteristicReadRequest#deviceId
3648     */
3649    deviceId: string;
3650    /**
3651     * The Id of the read request
3652     *
3653     * @syscap SystemCapability.Communication.Bluetooth.Core
3654     * @since 9
3655     * @deprecated since 10
3656     * @useinstead ohos.bluetooth.ble/ble.CharacteristicReadRequest#transId
3657     */
3658    transId: number;
3659    /**
3660     * Indicates the byte offset of the start position for reading characteristic value
3661     *
3662     * @syscap SystemCapability.Communication.Bluetooth.Core
3663     * @since 9
3664     * @deprecated since 10
3665     * @useinstead ohos.bluetooth.ble/ble.CharacteristicReadRequest#offset
3666     */
3667    offset: number;
3668    /**
3669     * The UUID of a CharacteristicReadRequest instance
3670     *
3671     * @syscap SystemCapability.Communication.Bluetooth.Core
3672     * @since 9
3673     * @deprecated since 10
3674     * @useinstead ohos.bluetooth.ble/ble.CharacteristicReadRequest#characteristicUuid
3675     */
3676    characteristicUuid: string;
3677    /**
3678     * The UUID of the service to which the characteristic belongs
3679     *
3680     * @syscap SystemCapability.Communication.Bluetooth.Core
3681     * @since 9
3682     * @deprecated since 10
3683     * @useinstead ohos.bluetooth.ble/ble.CharacteristicReadRequest#serviceUuid
3684     */
3685    serviceUuid: string;
3686  }
3687
3688  /**
3689   * Describes the parameters of the of the Gatt client's characteristic write request.
3690   *
3691   * @typedef CharacteristicWriteRequest
3692   * @syscap SystemCapability.Communication.Bluetooth.Core
3693   * @since 9
3694   * @deprecated since 10
3695   * @useinstead ohos.bluetooth.ble/ble.CharacteristicWriteRequest
3696   */
3697  interface CharacteristicWriteRequest {
3698    /**
3699     * Indicates the address of the client that initiates the write request
3700     *
3701     * @syscap SystemCapability.Communication.Bluetooth.Core
3702     * @since 9
3703     * @deprecated since 10
3704     * @useinstead ohos.bluetooth.ble/ble.CharacteristicWriteRequest#deviceId
3705     */
3706    deviceId: string;
3707    /**
3708     * The Id of the write request
3709     *
3710     * @syscap SystemCapability.Communication.Bluetooth.Core
3711     * @since 9
3712     * @deprecated since 10
3713     * @useinstead ohos.bluetooth.ble/ble.CharacteristicWriteRequest#transId
3714     */
3715    transId: number;
3716    /**
3717     * Indicates the byte offset of the start position for writing characteristic value
3718     *
3719     * @syscap SystemCapability.Communication.Bluetooth.Core
3720     * @since 9
3721     * @deprecated since 10
3722     * @useinstead ohos.bluetooth.ble/ble.CharacteristicWriteRequest#offset
3723     */
3724    offset: number;
3725    /**
3726     * Whether this request should be pending for later operation
3727     *
3728     * @syscap SystemCapability.Communication.Bluetooth.Core
3729     * @since 9
3730     * @deprecated since 10
3731     * @useinstead ohos.bluetooth.ble/ble.CharacteristicWriteRequest#isPrepared
3732     */
3733    isPrep: boolean;
3734    /**
3735     * Whether the remote client need a response
3736     *
3737     * @syscap SystemCapability.Communication.Bluetooth.Core
3738     * @since 9
3739     * @deprecated since 10
3740     * @useinstead ohos.bluetooth.ble/ble.CharacteristicWriteRequest#needRsp
3741     */
3742    needRsp: boolean;
3743    /**
3744     * Indicates the value to be written
3745     *
3746     * @syscap SystemCapability.Communication.Bluetooth.Core
3747     * @since 9
3748     * @deprecated since 10
3749     * @useinstead ohos.bluetooth.ble/ble.CharacteristicWriteRequest#value
3750     */
3751    value: ArrayBuffer;
3752    /**
3753     * The UUID of a CharacteristicWriteRequest instance
3754     *
3755     * @syscap SystemCapability.Communication.Bluetooth.Core
3756     * @since 9
3757     * @deprecated since 10
3758     * @useinstead ohos.bluetooth.ble/ble.CharacteristicWriteRequest#characteristicUuid
3759     */
3760    characteristicUuid: string;
3761    /**
3762     * The UUID of the service to which the characteristic belongs
3763     *
3764     * @syscap SystemCapability.Communication.Bluetooth.Core
3765     * @since 9
3766     * @deprecated since 10
3767     * @useinstead ohos.bluetooth.ble/ble.CharacteristicWriteRequest#serviceUuid
3768     */
3769    serviceUuid: string;
3770  }
3771
3772  /**
3773   * Describes the parameters of the Gatt client's descriptor read request.
3774   *
3775   * @typedef DescriptorReadRequest
3776   * @syscap SystemCapability.Communication.Bluetooth.Core
3777   * @since 9
3778   * @deprecated since 10
3779   * @useinstead ohos.bluetooth.ble/ble.DescriptorReadRequest
3780   */
3781  interface DescriptorReadRequest {
3782    /**
3783     * Indicates the address of the client that initiates the read request
3784     *
3785     * @syscap SystemCapability.Communication.Bluetooth.Core
3786     * @since 9
3787     * @deprecated since 10
3788     * @useinstead ohos.bluetooth.ble/ble.DescriptorReadRequest#deviceId
3789     */
3790    deviceId: string;
3791    /**
3792     * The Id of the read request
3793     *
3794     * @syscap SystemCapability.Communication.Bluetooth.Core
3795     * @since 9
3796     * @deprecated since 10
3797     * @useinstead ohos.bluetooth.ble/ble.DescriptorReadRequest#transId
3798     */
3799    transId: number;
3800    /**
3801     * Indicates the byte offset of the start position for reading characteristic value
3802     *
3803     * @syscap SystemCapability.Communication.Bluetooth.Core
3804     * @since 9
3805     * @deprecated since 10
3806     * @useinstead ohos.bluetooth.ble/ble.DescriptorReadRequest#offset
3807     */
3808    offset: number;
3809    /**
3810     * The UUID of a DescriptorReadRequest instance
3811     *
3812     * @syscap SystemCapability.Communication.Bluetooth.Core
3813     * @since 9
3814     * @deprecated since 10
3815     * @useinstead ohos.bluetooth.ble/ble.DescriptorReadRequest#descriptorUuid
3816     */
3817    descriptorUuid: string;
3818    /**
3819     * The UUID of the characteristic to which the descriptor belongs
3820     *
3821     * @syscap SystemCapability.Communication.Bluetooth.Core
3822     * @since 9
3823     * @deprecated since 10
3824     * @useinstead ohos.bluetooth.ble/ble.DescriptorReadRequest#characteristicUuid
3825     */
3826    characteristicUuid: string;
3827    /**
3828     * The UUID of the service to which the descriptor belongs
3829     *
3830     * @syscap SystemCapability.Communication.Bluetooth.Core
3831     * @since 9
3832     * @deprecated since 10
3833     * @useinstead ohos.bluetooth.ble/ble.DescriptorReadRequest#serviceUuid
3834     */
3835    serviceUuid: string;
3836  }
3837
3838  /**
3839   * Describes the parameters of the Gatt client's characteristic write request.
3840   *
3841   * @typedef DescriptorWriteRequest
3842   * @syscap SystemCapability.Communication.Bluetooth.Core
3843   * @since 9
3844   * @deprecated since 10
3845   * @useinstead ohos.bluetooth.ble/ble.DescriptorWriteRequest
3846   */
3847  interface DescriptorWriteRequest {
3848    /**
3849     * Indicates the address of the client that initiates the write request
3850     *
3851     * @syscap SystemCapability.Communication.Bluetooth.Core
3852     * @since 9
3853     * @deprecated since 10
3854     * @useinstead ohos.bluetooth.ble/ble.DescriptorWriteRequest#deviceId
3855     */
3856    deviceId: string;
3857    /**
3858     * The Id of the write request
3859     *
3860     * @syscap SystemCapability.Communication.Bluetooth.Core
3861     * @since 9
3862     * @deprecated since 10
3863     * @useinstead ohos.bluetooth.ble/ble.DescriptorWriteRequest#transId
3864     */
3865    transId: number;
3866    /**
3867     * Indicates the byte offset of the start position for writing characteristic value
3868     *
3869     * @syscap SystemCapability.Communication.Bluetooth.Core
3870     * @since 9
3871     * @deprecated since 10
3872     * @useinstead ohos.bluetooth.ble/ble.DescriptorWriteRequest#offset
3873     */
3874    offset: number;
3875    /**
3876     * Whether this request should be pending for later operation
3877     *
3878     * @syscap SystemCapability.Communication.Bluetooth.Core
3879     * @since 9
3880     * @deprecated since 10
3881     * @useinstead ohos.bluetooth.ble/ble.DescriptorWriteRequest#isPrepared
3882     */
3883    isPrep: boolean;
3884    /**
3885     * Whether the remote client need a response
3886     *
3887     * @syscap SystemCapability.Communication.Bluetooth.Core
3888     * @since 9
3889     * @deprecated since 10
3890     * @useinstead ohos.bluetooth.ble/ble.DescriptorWriteRequest#needRsp
3891     */
3892    needRsp: boolean;
3893    /**
3894     * Indicates the value to be written
3895     *
3896     * @syscap SystemCapability.Communication.Bluetooth.Core
3897     * @since 9
3898     * @deprecated since 10
3899     * @useinstead ohos.bluetooth.ble/ble.DescriptorWriteRequest#value
3900     */
3901    value: ArrayBuffer;
3902    /**
3903     * The UUID of a DescriptorWriteRequest instance
3904     *
3905     * @syscap SystemCapability.Communication.Bluetooth.Core
3906     * @since 9
3907     * @deprecated since 10
3908     * @useinstead ohos.bluetooth.ble/ble.DescriptorWriteRequest#descriptorUuid
3909     */
3910    descriptorUuid: string;
3911    /**
3912     * The UUID of the characteristic to which the descriptor belongs
3913     *
3914     * @syscap SystemCapability.Communication.Bluetooth.Core
3915     * @since 9
3916     * @deprecated since 10
3917     * @useinstead ohos.bluetooth.ble/ble.DescriptorWriteRequest#characteristicUuid
3918     */
3919    characteristicUuid: string;
3920    /**
3921     * The UUID of the service to which the descriptor belongs
3922     *
3923     * @syscap SystemCapability.Communication.Bluetooth.Core
3924     * @since 9
3925     * @deprecated since 10
3926     * @useinstead ohos.bluetooth.ble/ble.DescriptorWriteRequest#serviceUuid
3927     */
3928    serviceUuid: string;
3929  }
3930
3931  /**
3932   * Describes the parameters of a response send by the server to a specified read or write request.
3933   *
3934   * @typedef ServerResponse
3935   * @syscap SystemCapability.Communication.Bluetooth.Core
3936   * @since 9
3937   * @deprecated since 10
3938   * @useinstead ohos.bluetooth.ble/ble.ServerResponse
3939   */
3940  interface ServerResponse {
3941    /**
3942     * Indicates the address of the client to which to send the response
3943     *
3944     * @syscap SystemCapability.Communication.Bluetooth.Core
3945     * @since 9
3946     * @deprecated since 10
3947     * @useinstead ohos.bluetooth.ble/ble.ServerResponse#deviceId
3948     */
3949    deviceId: string;
3950    /**
3951     * The Id of the write request
3952     *
3953     * @syscap SystemCapability.Communication.Bluetooth.Core
3954     * @since 9
3955     * @deprecated since 10
3956     * @useinstead ohos.bluetooth.ble/ble.ServerResponse#transId
3957     */
3958    transId: number;
3959    /**
3960     * Indicates the status of the read or write request, set this parameter to '0' in normal cases
3961     *
3962     * @syscap SystemCapability.Communication.Bluetooth.Core
3963     * @since 9
3964     * @deprecated since 10
3965     * @useinstead ohos.bluetooth.ble/ble.ServerResponse#status
3966     */
3967    status: number;
3968    /**
3969     * Indicates the byte offset of the start position for reading or writing operation
3970     *
3971     * @syscap SystemCapability.Communication.Bluetooth.Core
3972     * @since 9
3973     * @deprecated since 10
3974     * @useinstead ohos.bluetooth.ble/ble.ServerResponse#offset
3975     */
3976    offset: number;
3977    /**
3978     * Indicates the value to be sent
3979     *
3980     * @syscap SystemCapability.Communication.Bluetooth.Core
3981     * @since 9
3982     * @deprecated since 10
3983     * @useinstead ohos.bluetooth.ble/ble.ServerResponse#value
3984     */
3985    value: ArrayBuffer;
3986  }
3987
3988  /**
3989   * Describes the Gatt profile connection state.
3990   *
3991   * @typedef BLEConnectChangedState
3992   * @syscap SystemCapability.Communication.Bluetooth.Core
3993   * @since 9
3994   * @deprecated since 10
3995   * @useinstead ohos.bluetooth.ble/ble.BLEConnectionChangeState
3996   */
3997  interface BLEConnectChangedState {
3998    /**
3999     * Indicates the peer device address
4000     *
4001     * @syscap SystemCapability.Communication.Bluetooth.Core
4002     * @since 9
4003     * @deprecated since 10
4004     * @useinstead ohos.bluetooth.ble/ble.BLEConnectionChangeState#deviceId
4005     */
4006    deviceId: string;
4007    /**
4008     * Connection state of the Gatt profile
4009     *
4010     * @syscap SystemCapability.Communication.Bluetooth.Core
4011     * @since 9
4012     * @deprecated since 10
4013     * @useinstead ohos.bluetooth.ble/ble.BLEConnectionChangeState#state
4014     */
4015    state: ProfileConnectionState;
4016  }
4017
4018  /**
4019   * Describes the contents of the scan results.
4020   *
4021   * @typedef ScanResult
4022   * @syscap SystemCapability.Communication.Bluetooth.Core
4023   * @since 9
4024   * @deprecated since 10
4025   * @useinstead ohos.bluetooth.ble/ble.ScanResult
4026   */
4027  interface ScanResult {
4028    /**
4029     * Address of the scanned device
4030     *
4031     * @syscap SystemCapability.Communication.Bluetooth.Core
4032     * @since 9
4033     * @deprecated since 10
4034     * @useinstead ohos.bluetooth.ble/ble.ScanResult#deviceId
4035     */
4036    deviceId: string;
4037    /**
4038     * RSSI of the remote device
4039     *
4040     * @syscap SystemCapability.Communication.Bluetooth.Core
4041     * @since 9
4042     * @deprecated since 10
4043     * @useinstead ohos.bluetooth.ble/ble.ScanResult#rssi
4044     */
4045    rssi: number;
4046    /**
4047     * The raw data of broadcast packet
4048     *
4049     * @syscap SystemCapability.Communication.Bluetooth.Core
4050     * @since 9
4051     * @deprecated since 10
4052     * @useinstead ohos.bluetooth.ble/ble.ScanResult#data
4053     */
4054    data: ArrayBuffer;
4055  }
4056
4057  /**
4058   * Describes the settings for BLE advertising.
4059   *
4060   * @typedef AdvertiseSetting
4061   * @syscap SystemCapability.Communication.Bluetooth.Core
4062   * @since 9
4063   * @deprecated since 10
4064   * @useinstead ohos.bluetooth.ble/ble.AdvertiseSetting
4065   */
4066  interface AdvertiseSetting {
4067    /**
4068     * Minimum slot value for the advertising interval, which is {@code 32} (20 ms)
4069     * Maximum slot value for the advertising interval, which is {@code 16777215} (10485.759375s)
4070     * Default slot value for the advertising interval, which is {@code 1600} (1s)
4071     *
4072     * @syscap SystemCapability.Communication.Bluetooth.Core
4073     * @since 9
4074     * @deprecated since 10
4075     * @useinstead ohos.bluetooth.ble/ble.AdvertiseSetting#interval
4076     */
4077    interval?: number;
4078    /**
4079     * Minimum transmission power level for advertising, which is {@code -127}
4080     * Maximum transmission power level for advertising, which is {@code 1}
4081     * Default transmission power level for advertising, which is {@code -7}
4082     *
4083     * @syscap SystemCapability.Communication.Bluetooth.Core
4084     * @since 9
4085     * @deprecated since 10
4086     * @useinstead ohos.bluetooth.ble/ble.AdvertiseSetting#txPower
4087     */
4088    txPower?: number;
4089    /**
4090     * Indicates whether the BLE is connectable, default is {@code true}
4091     *
4092     * @syscap SystemCapability.Communication.Bluetooth.Core
4093     * @since 9
4094     * @deprecated since 10
4095     * @useinstead ohos.bluetooth.ble/ble.AdvertiseSetting#connectable
4096     */
4097    connectable?: boolean;
4098  }
4099
4100  /**
4101   * Describes the advertising data.
4102   *
4103   * @typedef AdvertiseData
4104   * @syscap SystemCapability.Communication.Bluetooth.Core
4105   * @since 9
4106   * @deprecated since 10
4107   * @useinstead ohos.bluetooth.ble/ble.AdvertiseData
4108   */
4109  interface AdvertiseData {
4110    /**
4111     * The specified service UUID list to this advertisement
4112     *
4113     * @syscap SystemCapability.Communication.Bluetooth.Core
4114     * @since 9
4115     * @deprecated since 10
4116     * @useinstead ohos.bluetooth.ble/ble.AdvertiseData#serviceUuids
4117     */
4118    serviceUuids: Array<string>;
4119    /**
4120     * The specified manufacturer data list to this advertisement
4121     *
4122     * @syscap SystemCapability.Communication.Bluetooth.Core
4123     * @since 9
4124     * @deprecated since 10
4125     * @useinstead ohos.bluetooth.ble/ble.AdvertiseData#manufactureData
4126     */
4127    manufactureData: Array<ManufactureData>;
4128    /**
4129     * The specified service data list to this advertisement
4130     *
4131     * @syscap SystemCapability.Communication.Bluetooth.Core
4132     * @since 9
4133     * @deprecated since 10
4134     * @useinstead ohos.bluetooth.ble/ble.AdvertiseData#serviceData
4135     */
4136    serviceData: Array<ServiceData>;
4137  }
4138
4139  /**
4140   * Describes the manufacturer data.
4141   *
4142   * @typedef ManufactureData
4143   * @syscap SystemCapability.Communication.Bluetooth.Core
4144   * @since 9
4145   * @deprecated since 10
4146   * @useinstead ohos.bluetooth.ble/ble.ManufactureData
4147   */
4148  interface ManufactureData {
4149    /**
4150     * Indicates the manufacturer ID assigned by Bluetooth SIG
4151     *
4152     * @syscap SystemCapability.Communication.Bluetooth.Core
4153     * @since 9
4154     * @deprecated since 10
4155     * @useinstead ohos.bluetooth.ble/ble.ManufactureData#manufactureId
4156     */
4157    manufactureId: number;
4158    /**
4159     * Indicates the manufacturer data to add
4160     *
4161     * @syscap SystemCapability.Communication.Bluetooth.Core
4162     * @since 9
4163     * @deprecated since 10
4164     * @useinstead ohos.bluetooth.ble/ble.ManufactureData#manufactureValue
4165     */
4166    manufactureValue: ArrayBuffer;
4167  }
4168
4169  /**
4170   * Describes the service data.
4171   *
4172   * @typedef ServiceData
4173   * @syscap SystemCapability.Communication.Bluetooth.Core
4174   * @since 9
4175   * @deprecated since 10
4176   * @useinstead ohos.bluetooth.ble/ble.ServiceData
4177   */
4178  interface ServiceData {
4179    /**
4180     * Indicates the UUID of the service data to add
4181     *
4182     * @syscap SystemCapability.Communication.Bluetooth.Core
4183     * @since 9
4184     * @deprecated since 10
4185     * @useinstead ohos.bluetooth.ble/ble.ServiceData#serviceUuid
4186     */
4187    serviceUuid: string;
4188    /**
4189     * Indicates the service data to add
4190     *
4191     * @syscap SystemCapability.Communication.Bluetooth.Core
4192     * @since 9
4193     * @deprecated since 10
4194     * @useinstead ohos.bluetooth.ble/ble.ServiceData#serviceValue
4195     */
4196    serviceValue: ArrayBuffer;
4197  }
4198
4199  /**
4200   * Describes the criteria for filtering scanning results can be set.
4201   *
4202   * @typedef ScanFilter
4203   * @syscap SystemCapability.Communication.Bluetooth.Core
4204   * @since 9
4205   * @deprecated since 10
4206   * @useinstead ohos.bluetooth.ble/ble.ScanFilter
4207   */
4208  interface ScanFilter {
4209    /**
4210     * The address of a BLE peripheral device
4211     *
4212     * @syscap SystemCapability.Communication.Bluetooth.Core
4213     * @since 9
4214     * @deprecated since 10
4215     * @useinstead ohos.bluetooth.ble/ble.ScanFilter#deviceId
4216     */
4217    deviceId?: string;
4218
4219    /**
4220     * The name of a BLE peripheral device
4221     *
4222     * @syscap SystemCapability.Communication.Bluetooth.Core
4223     * @since 9
4224     * @deprecated since 10
4225     * @useinstead ohos.bluetooth.ble/ble.ScanFilter#name
4226     */
4227    name?: string;
4228
4229    /**
4230     * The service UUID of a BLE peripheral device
4231     *
4232     * @syscap SystemCapability.Communication.Bluetooth.Core
4233     * @since 9
4234     * @deprecated since 10
4235     * @useinstead ohos.bluetooth.ble/ble.ScanFilter#serviceUuid
4236     */
4237    serviceUuid?: string;
4238
4239    /**
4240     * Service UUID mask.
4241     *
4242     * @syscap SystemCapability.Communication.Bluetooth.Core
4243     * @since 9
4244     * @deprecated since 10
4245     * @useinstead ohos.bluetooth.ble/ble.ScanFilter#serviceUuidMask
4246     */
4247    serviceUuidMask?: string;
4248
4249    /**
4250     * Service solicitation UUID.
4251     *
4252     * @syscap SystemCapability.Communication.Bluetooth.Core
4253     * @since 9
4254     * @deprecated since 10
4255     * @useinstead ohos.bluetooth.ble/ble.ScanFilter#serviceSolicitationUuid
4256     */
4257    serviceSolicitationUuid?: string;
4258
4259    /**
4260     * Service solicitation UUID mask.
4261     *
4262     * @syscap SystemCapability.Communication.Bluetooth.Core
4263     * @since 9
4264     * @deprecated since 10
4265     * @useinstead ohos.bluetooth.ble/ble.ScanFilter#serviceSolicitationUuidMask
4266     */
4267    serviceSolicitationUuidMask?: string;
4268
4269    /**
4270     * Service data.
4271     *
4272     * @syscap SystemCapability.Communication.Bluetooth.Core
4273     * @since 9
4274     * @deprecated since 10
4275     * @useinstead ohos.bluetooth.ble/ble.ScanFilter#serviceData
4276     */
4277    serviceData?: ArrayBuffer;
4278
4279    /**
4280     * Service data mask.
4281     *
4282     * @syscap SystemCapability.Communication.Bluetooth.Core
4283     * @since 9
4284     * @deprecated since 10
4285     * @useinstead ohos.bluetooth.ble/ble.ScanFilter#serviceDataMask
4286     */
4287    serviceDataMask?: ArrayBuffer;
4288
4289    /**
4290     * Manufacture id.
4291     *
4292     * @syscap SystemCapability.Communication.Bluetooth.Core
4293     * @since 9
4294     * @deprecated since 10
4295     * @useinstead ohos.bluetooth.ble/ble.ScanFilter#manufactureId
4296     */
4297    manufactureId?: number;
4298
4299    /**
4300     * Manufacture data.
4301     *
4302     * @syscap SystemCapability.Communication.Bluetooth.Core
4303     * @since 9
4304     * @deprecated since 10
4305     * @useinstead ohos.bluetooth.ble/ble.ScanFilter#manufactureData
4306     */
4307    manufactureData?: ArrayBuffer;
4308
4309    /**
4310     * Manufacture data mask.
4311     *
4312     * @syscap SystemCapability.Communication.Bluetooth.Core
4313     * @since 9
4314     * @deprecated since 10
4315     * @useinstead ohos.bluetooth.ble/ble.ScanFilter#manufactureDataMask
4316     */
4317    manufactureDataMask?: ArrayBuffer;
4318  }
4319
4320  /**
4321   * Describes the parameters for scan.
4322   *
4323   * @typedef ScanOptions
4324   * @syscap SystemCapability.Communication.Bluetooth.Core
4325   * @since 9
4326   * @deprecated since 10
4327   * @useinstead ohos.bluetooth.ble/ble.ScanOptions
4328   */
4329  interface ScanOptions {
4330    /**
4331     * Time of delay for reporting the scan result
4332     *
4333     * @syscap SystemCapability.Communication.Bluetooth.Core
4334     * @since 9
4335     * @deprecated since 10
4336     * @useinstead ohos.bluetooth.ble/ble.ScanOptions#interval
4337     */
4338    interval?: number;
4339    /**
4340     * Bluetooth LE scan mode
4341     *
4342     * @syscap SystemCapability.Communication.Bluetooth.Core
4343     * @since 9
4344     * @deprecated since 10
4345     * @useinstead ohos.bluetooth.ble/ble.ScanOptions#dutyMode
4346     */
4347    dutyMode?: ScanDuty;
4348    /**
4349     * Match mode for Bluetooth LE scan filters hardware match
4350     *
4351     * @syscap SystemCapability.Communication.Bluetooth.Core
4352     * @since 9
4353     * @deprecated since 10
4354     * @useinstead ohos.bluetooth.ble/ble.ScanOptions#matchMode
4355     */
4356    matchMode?: MatchMode;
4357  }
4358
4359  /**
4360   * Describes the spp parameters.
4361   *
4362   * @typedef SppOption
4363   * @syscap SystemCapability.Communication.Bluetooth.Core
4364   * @since 9
4365   * @deprecated since 10
4366   * @useinstead ohos.bluetooth.socket/socket.SppOptions
4367   */
4368  interface SppOption {
4369    /**
4370     * Indicates the UUID in the SDP record.
4371     *
4372     * @syscap SystemCapability.Communication.Bluetooth.Core
4373     * @since 9
4374     * @deprecated since 10
4375     * @useinstead ohos.bluetooth.socket/socket.SppOptions#uuid
4376     */
4377    uuid: string;
4378    /**
4379     * Indicates secure channel or not
4380     *
4381     * @syscap SystemCapability.Communication.Bluetooth.Core
4382     * @since 9
4383     * @deprecated since 10
4384     * @useinstead ohos.bluetooth.socket/socket.SppOptions#secure
4385     */
4386    secure: boolean;
4387    /**
4388     * Spp link type {@link SppType}
4389     *
4390     * @syscap SystemCapability.Communication.Bluetooth.Core
4391     * @since 9
4392     * @deprecated since 10
4393     * @useinstead ohos.bluetooth.socket/socket.SppOptions#type
4394     */
4395    type: SppType;
4396  }
4397
4398  /**
4399   * Describes the bond key param.
4400   *
4401   * @typedef PinRequiredParam
4402   * @syscap SystemCapability.Communication.Bluetooth.Core
4403   * @since 9
4404   * @deprecated since 10
4405   * @useinstead ohos.bluetooth.connection/connection.PinRequiredParam
4406   */
4407  interface PinRequiredParam {
4408    /**
4409     * ID of the device to pair.
4410     *
4411     * @syscap SystemCapability.Communication.Bluetooth.Core
4412     * @since 9
4413     * @deprecated since 10
4414     * @useinstead ohos.bluetooth.connection/connection.PinRequiredParam#deviceId
4415     */
4416    deviceId: string;
4417    /**
4418     * Key for the device pairing.
4419     *
4420     * @syscap SystemCapability.Communication.Bluetooth.Core
4421     * @since 9
4422     * @deprecated since 10
4423     * @useinstead ohos.bluetooth.connection/connection.PinRequiredParam#pinCode
4424     */
4425    pinCode: string;
4426  }
4427
4428  /**
4429   * Describes the class of a bluetooth device.
4430   *
4431   * @typedef DeviceClass
4432   * @syscap SystemCapability.Communication.Bluetooth.Core
4433   * @since 9
4434   * @deprecated since 10
4435   * @useinstead ohos.bluetooth.connection/connection.DeviceClass
4436   */
4437  interface DeviceClass {
4438    /**
4439     * Major classes of Bluetooth devices.
4440     *
4441     * @syscap SystemCapability.Communication.Bluetooth.Core
4442     * @since 9
4443     * @deprecated since 10
4444     * @useinstead ohos.bluetooth.connection/connection.DeviceClass#majorClass
4445     */
4446    majorClass: MajorClass;
4447    /**
4448     * Major and minor classes of Bluetooth devices.
4449     *
4450     * @syscap SystemCapability.Communication.Bluetooth.Core
4451     * @since 9
4452     * @deprecated since 10
4453     * @useinstead ohos.bluetooth.connection/connection.DeviceClass#majorMinorClass
4454     */
4455    majorMinorClass: MajorMinorClass;
4456    /**
4457     * Class of the device.
4458     *
4459     * @syscap SystemCapability.Communication.Bluetooth.Core
4460     * @since 9
4461     * @deprecated since 10
4462     * @useinstead ohos.bluetooth.connection/connection.DeviceClass#classOfDevice
4463     */
4464    classOfDevice: number;
4465  }
4466
4467  /**
4468   * Describes the class of a bluetooth device.
4469   *
4470   * @typedef BondStateParam
4471   * @syscap SystemCapability.Communication.Bluetooth.Core
4472   * @since 9
4473   * @deprecated since 10
4474   * @useinstead ohos.bluetooth.connection/connection.BondStateParam
4475   */
4476  interface BondStateParam {
4477    /**
4478     * Address of a Bluetooth device.
4479     *
4480     * @syscap SystemCapability.Communication.Bluetooth.Core
4481     * @since 9
4482     * @deprecated since 10
4483     * @useinstead ohos.bluetooth.connection/connection.BondStateParam#deviceId
4484     */
4485    deviceId: string;
4486    /**
4487     * Profile connection state of the device.
4488     *
4489     * @syscap SystemCapability.Communication.Bluetooth.Core
4490     * @since 9
4491     * @deprecated since 10
4492     * @useinstead ohos.bluetooth.connection/connection.BondStateParam#state
4493     */
4494    state: BondState;
4495  }
4496
4497  /**
4498   * Profile state change parameters.
4499   *
4500   * @typedef StateChangeParam
4501   * @syscap SystemCapability.Communication.Bluetooth.Core
4502   * @since 9
4503   * @deprecated since 10
4504   * @useinstead ohos.bluetooth.baseProfile/baseProfile.StateChangeParam
4505   */
4506  interface StateChangeParam {
4507    /**
4508     * The address of device
4509     *
4510     * @syscap SystemCapability.Communication.Bluetooth.Core
4511     * @since 9
4512     * @deprecated since 10
4513     * @useinstead ohos.bluetooth.baseProfile/baseProfile.StateChangeParam#deviceId
4514     */
4515    deviceId: string;
4516
4517    /**
4518     * Profile state value
4519     *
4520     * @syscap SystemCapability.Communication.Bluetooth.Core
4521     * @since 9
4522     * @deprecated since 10
4523     * @useinstead ohos.bluetooth.baseProfile/baseProfile.StateChangeParam#state
4524     */
4525    state: ProfileConnectionState;
4526  }
4527
4528  /**
4529   * The enum of scan duty.
4530   *
4531   * @enum { number }
4532   * @syscap SystemCapability.Communication.Bluetooth.Core
4533   * @since 9
4534   * @deprecated since 10
4535   * @useinstead ohos.bluetooth.ble/ble.ScanDuty
4536   */
4537  enum ScanDuty {
4538    /**
4539     * low power mode
4540     *
4541     * @syscap SystemCapability.Communication.Bluetooth.Core
4542     * @since 9
4543     * @deprecated since 10
4544     * @useinstead ohos.bluetooth.ble/ble.ScanDuty#SCAN_MODE_LOW_POWER
4545     */
4546    SCAN_MODE_LOW_POWER = 0,
4547    /**
4548     * balanced power mode
4549     *
4550     * @syscap SystemCapability.Communication.Bluetooth.Core
4551     * @since 9
4552     * @deprecated since 10
4553     * @useinstead ohos.bluetooth.ble/ble.ScanDuty#SCAN_MODE_BALANCED
4554     */
4555    SCAN_MODE_BALANCED = 1,
4556    /**
4557     * Scan using highest duty cycle
4558     *
4559     * @syscap SystemCapability.Communication.Bluetooth.Core
4560     * @since 9
4561     * @deprecated since 10
4562     * @useinstead ohos.bluetooth.ble/ble.ScanDuty#SCAN_MODE_LOW_LATENCY
4563     */
4564    SCAN_MODE_LOW_LATENCY = 2
4565  }
4566
4567  /**
4568   * The enum of BLE match mode.
4569   *
4570   * @enum { number }
4571   * @syscap SystemCapability.Communication.Bluetooth.Core
4572   * @since 9
4573   * @deprecated since 10
4574   * @useinstead ohos.bluetooth.ble/ble.MatchMode
4575   */
4576  enum MatchMode {
4577    /**
4578     * aggressive mode
4579     *
4580     * @syscap SystemCapability.Communication.Bluetooth.Core
4581     * @since 9
4582     * @deprecated since 10
4583     * @useinstead ohos.bluetooth.ble/ble.MatchMode#MATCH_MODE_AGGRESSIVE
4584     */
4585    MATCH_MODE_AGGRESSIVE = 1,
4586    /**
4587     * sticky mode
4588     *
4589     * @syscap SystemCapability.Communication.Bluetooth.Core
4590     * @since 9
4591     * @deprecated since 10
4592     * @useinstead ohos.bluetooth.ble/ble.MatchMode#MATCH_MODE_STICKY
4593     */
4594    MATCH_MODE_STICKY = 2
4595  }
4596
4597  /**
4598   * The enum of profile connection state.
4599   *
4600   * @enum { number }
4601   * @syscap SystemCapability.Communication.Bluetooth.Core
4602   * @since 9
4603   * @deprecated since 10
4604   * @useinstead ohos.bluetooth.constant/constant.ProfileConnectionState
4605   */
4606  enum ProfileConnectionState {
4607    /**
4608     * the current profile is disconnected
4609     *
4610     * @syscap SystemCapability.Communication.Bluetooth.Core
4611     * @since 9
4612     * @deprecated since 10
4613     * @useinstead ohos.bluetooth.constant/constant.ProfileConnectionState#STATE_DISCONNECTED
4614     */
4615    STATE_DISCONNECTED = 0,
4616    /**
4617     * the current profile is being connected
4618     *
4619     * @syscap SystemCapability.Communication.Bluetooth.Core
4620     * @since 9
4621     * @deprecated since 10
4622     * @useinstead ohos.bluetooth.constant/constant.ProfileConnectionState#STATE_CONNECTING
4623     */
4624    STATE_CONNECTING = 1,
4625    /**
4626     * the current profile is connected
4627     *
4628     * @syscap SystemCapability.Communication.Bluetooth.Core
4629     * @since 9
4630     * @deprecated since 10
4631     * @useinstead ohos.bluetooth.constant/constant.ProfileConnectionState#STATE_CONNECTED
4632     */
4633    STATE_CONNECTED = 2,
4634    /**
4635     * the current profile is being disconnected
4636     *
4637     * @syscap SystemCapability.Communication.Bluetooth.Core
4638     * @since 9
4639     * @deprecated since 10
4640     * @useinstead ohos.bluetooth.constant/constant.ProfileConnectionState#STATE_DISCONNECTING
4641     */
4642    STATE_DISCONNECTING = 3
4643  }
4644
4645  /**
4646   * The enum of bluetooth state.
4647   *
4648   * @enum { number }
4649   * @syscap SystemCapability.Communication.Bluetooth.Core
4650   * @since 9
4651   * @deprecated since 10
4652   * @useinstead ohos.bluetooth.access/access.BluetoothState
4653   */
4654  enum BluetoothState {
4655    /**
4656     * Indicates the local Bluetooth is off
4657     *
4658     * @syscap SystemCapability.Communication.Bluetooth.Core
4659     * @since 9
4660     * @deprecated since 10
4661     * @useinstead ohos.bluetooth.access/access.BluetoothState#STATE_OFF
4662     */
4663    STATE_OFF = 0,
4664    /**
4665     * Indicates the local Bluetooth is turning on
4666     *
4667     * @syscap SystemCapability.Communication.Bluetooth.Core
4668     * @since 9
4669     * @deprecated since 10
4670     * @useinstead ohos.bluetooth.access/access.BluetoothState#STATE_TURNING_ON
4671     */
4672    STATE_TURNING_ON = 1,
4673    /**
4674     * Indicates the local Bluetooth is on, and ready for use
4675     *
4676     * @syscap SystemCapability.Communication.Bluetooth.Core
4677     * @since 9
4678     * @deprecated since 10
4679     * @useinstead ohos.bluetooth.access/access.BluetoothState#STATE_ON
4680     */
4681    STATE_ON = 2,
4682    /**
4683     * Indicates the local Bluetooth is turning off
4684     *
4685     * @syscap SystemCapability.Communication.Bluetooth.Core
4686     * @since 9
4687     * @deprecated since 10
4688     * @useinstead ohos.bluetooth.access/access.BluetoothState#STATE_TURNING_OFF
4689     */
4690    STATE_TURNING_OFF = 3,
4691    /**
4692     * Indicates the local Bluetooth is turning LE mode on
4693     *
4694     * @syscap SystemCapability.Communication.Bluetooth.Core
4695     * @since 9
4696     * @deprecated since 10
4697     * @useinstead ohos.bluetooth.access/access.BluetoothState#STATE_BLE_TURNING_ON
4698     */
4699    STATE_BLE_TURNING_ON = 4,
4700    /**
4701     * Indicates the local Bluetooth is in LE only mode
4702     *
4703     * @syscap SystemCapability.Communication.Bluetooth.Core
4704     * @since 9
4705     * @deprecated since 10
4706     * @useinstead ohos.bluetooth.access/access.BluetoothState#STATE_BLE_ON
4707     */
4708    STATE_BLE_ON = 5,
4709    /**
4710     * Indicates the local Bluetooth is turning off LE only mode
4711     *
4712     * @syscap SystemCapability.Communication.Bluetooth.Core
4713     * @since 9
4714     * @deprecated since 10
4715     * @useinstead ohos.bluetooth.access/access.BluetoothState#STATE_BLE_TURNING_OFF
4716     */
4717    STATE_BLE_TURNING_OFF = 6
4718  }
4719
4720  /**
4721   * The enum of SPP type.
4722   *
4723   * @enum { number }
4724   * @syscap SystemCapability.Communication.Bluetooth.Core
4725   * @since 9
4726   * @deprecated since 10
4727   * @useinstead ohos.bluetooth.socket/socket.SppType
4728   */
4729  enum SppType {
4730    /**
4731     * RFCOMM
4732     *
4733     * @syscap SystemCapability.Communication.Bluetooth.Core
4734     * @since 9
4735     * @deprecated since 10
4736     * @useinstead ohos.bluetooth.socket/socket.SppType#SPP_RFCOMM
4737     */
4738    SPP_RFCOMM
4739  }
4740
4741  /**
4742   * The enum of BR scan mode.
4743   *
4744   * @enum { number }
4745   * @syscap SystemCapability.Communication.Bluetooth.Core
4746   * @since 9
4747   * @deprecated since 10
4748   * @useinstead ohos.bluetooth.connection/connection.ScanMode
4749   */
4750  enum ScanMode {
4751    /**
4752     * Indicates the scan mode is none
4753     *
4754     * @syscap SystemCapability.Communication.Bluetooth.Core
4755     * @since 9
4756     * @deprecated since 10
4757     * @useinstead ohos.bluetooth.connection/connection.ScanMode#SCAN_MODE_NONE
4758     */
4759    SCAN_MODE_NONE = 0,
4760    /**
4761     * Indicates the scan mode is connectable
4762     *
4763     * @syscap SystemCapability.Communication.Bluetooth.Core
4764     * @since 9
4765     * @deprecated since 10
4766     * @useinstead ohos.bluetooth.connection/connection.ScanMode#SCAN_MODE_CONNECTABLE
4767     */
4768    SCAN_MODE_CONNECTABLE = 1,
4769    /**
4770     * Indicates the scan mode is general discoverable
4771     *
4772     * @syscap SystemCapability.Communication.Bluetooth.Core
4773     * @since 9
4774     * @deprecated since 10
4775     * @useinstead ohos.bluetooth.connection/connection.ScanMode#SCAN_MODE_GENERAL_DISCOVERABLE
4776     */
4777    SCAN_MODE_GENERAL_DISCOVERABLE = 2,
4778    /**
4779     * Indicates the scan mode is limited discoverable
4780     *
4781     * @syscap SystemCapability.Communication.Bluetooth.Core
4782     * @since 9
4783     * @deprecated since 10
4784     * @useinstead ohos.bluetooth.connection/connection.ScanMode#SCAN_MODE_LIMITED_DISCOVERABLE
4785     */
4786    SCAN_MODE_LIMITED_DISCOVERABLE = 3,
4787    /**
4788     * Indicates the scan mode is connectable and general discoverable
4789     *
4790     * @syscap SystemCapability.Communication.Bluetooth.Core
4791     * @since 9
4792     * @deprecated since 10
4793     * @useinstead ohos.bluetooth.connection/connection.ScanMode#SCAN_MODE_CONNECTABLE_GENERAL_DISCOVERABLE
4794     */
4795    SCAN_MODE_CONNECTABLE_GENERAL_DISCOVERABLE = 4,
4796    /**
4797     * Indicates the scan mode is connectable and limited discoverable
4798     *
4799     * @syscap SystemCapability.Communication.Bluetooth.Core
4800     * @since 9
4801     * @deprecated since 10
4802     * @useinstead ohos.bluetooth.connection/connection.ScanMode#SCAN_MODE_CONNECTABLE_LIMITED_DISCOVERABLE
4803     */
4804    SCAN_MODE_CONNECTABLE_LIMITED_DISCOVERABLE = 5
4805  }
4806
4807  /**
4808   * The enum of bond state.
4809   *
4810   * @enum { number }
4811   * @syscap SystemCapability.Communication.Bluetooth.Core
4812   * @since 9
4813   * @deprecated since 10
4814   * @useinstead ohos.bluetooth.connection/connection.BondState
4815   */
4816  enum BondState {
4817    /**
4818     * Indicate the bond state is invalid
4819     *
4820     * @syscap SystemCapability.Communication.Bluetooth.Core
4821     * @since 9
4822     * @deprecated since 10
4823     * @useinstead ohos.bluetooth.connection/connection.BondState#BOND_STATE_INVALID
4824     */
4825    BOND_STATE_INVALID = 0,
4826    /**
4827     * Indicate the bond state is bonding
4828     *
4829     * @syscap SystemCapability.Communication.Bluetooth.Core
4830     * @since 9
4831     * @deprecated since 10
4832     * @useinstead ohos.bluetooth.connection/connection.BondState#BOND_STATE_BONDING
4833     */
4834    BOND_STATE_BONDING = 1,
4835    /**
4836     * Indicate the bond state is bonded
4837     *
4838     * @syscap SystemCapability.Communication.Bluetooth.Core
4839     * @since 9
4840     * @deprecated since 10
4841     * @useinstead ohos.bluetooth.connection/connection.BondState#BOND_STATE_BONDED
4842     */
4843    BOND_STATE_BONDED = 2
4844  }
4845
4846  /**
4847   * The enum of major class of a bluetooth device.
4848   *
4849   * @enum { number }
4850   * @syscap SystemCapability.Communication.Bluetooth.Core
4851   * @since 9
4852   * @deprecated since 10
4853   * @useinstead ohos.bluetooth.constant/constant.MajorClass
4854   */
4855  enum MajorClass {
4856    /**
4857     * Miscellaneous device.
4858     *
4859     * @syscap SystemCapability.Communication.Bluetooth.Core
4860     * @since 9
4861     * @deprecated since 10
4862     * @useinstead ohos.bluetooth.constant/constant.MajorClass#MAJOR_MISC
4863     */
4864    MAJOR_MISC = 0x0000,
4865    /**
4866     * Computer.
4867     *
4868     * @syscap SystemCapability.Communication.Bluetooth.Core
4869     * @since 9
4870     * @deprecated since 10
4871     * @useinstead ohos.bluetooth.constant/constant.MajorClass#MAJOR_COMPUTER
4872     */
4873    MAJOR_COMPUTER = 0x0100,
4874    /**
4875     * Mobile phone.
4876     *
4877     * @syscap SystemCapability.Communication.Bluetooth.Core
4878     * @since 9
4879     * @deprecated since 10
4880     * @useinstead ohos.bluetooth.constant/constant.MajorClass#MAJOR_PHONE
4881     */
4882    MAJOR_PHONE = 0x0200,
4883    /**
4884     * Network device.
4885     *
4886     * @syscap SystemCapability.Communication.Bluetooth.Core
4887     * @since 9
4888     * @deprecated since 10
4889     * @useinstead ohos.bluetooth.constant/constant.MajorClass#MAJOR_NETWORKING
4890     */
4891    MAJOR_NETWORKING = 0x0300,
4892    /**
4893     * Audio or video device.
4894     *
4895     * @syscap SystemCapability.Communication.Bluetooth.Core
4896     * @since 9
4897     * @deprecated since 10
4898     * @useinstead ohos.bluetooth.constant/constant.MajorClass#MAJOR_AUDIO_VIDEO
4899     */
4900    MAJOR_AUDIO_VIDEO = 0x0400,
4901    /**
4902     * Peripheral device.
4903     *
4904     * @syscap SystemCapability.Communication.Bluetooth.Core
4905     * @since 9
4906     * @deprecated since 10
4907     * @useinstead ohos.bluetooth.constant/constant.MajorClass#MAJOR_PERIPHERAL
4908     */
4909    MAJOR_PERIPHERAL = 0x0500,
4910    /**
4911     * Imaging device.
4912     *
4913     * @syscap SystemCapability.Communication.Bluetooth.Core
4914     * @since 9
4915     * @deprecated since 10
4916     * @useinstead ohos.bluetooth.constant/constant.MajorClass#MAJOR_IMAGING
4917     */
4918    MAJOR_IMAGING = 0x0600,
4919    /**
4920     * Wearable device.
4921     *
4922     * @syscap SystemCapability.Communication.Bluetooth.Core
4923     * @since 9
4924     * @deprecated since 10
4925     * @useinstead ohos.bluetooth.constant/constant.MajorClass#MAJOR_WEARABLE
4926     */
4927    MAJOR_WEARABLE = 0x0700,
4928    /**
4929     * Toy.
4930     *
4931     * @syscap SystemCapability.Communication.Bluetooth.Core
4932     * @since 9
4933     * @deprecated since 10
4934     * @useinstead ohos.bluetooth.constant/constant.MajorClass#MAJOR_TOY
4935     */
4936    MAJOR_TOY = 0x0800,
4937    /**
4938     * Health device.
4939     *
4940     * @syscap SystemCapability.Communication.Bluetooth.Core
4941     * @since 9
4942     * @deprecated since 10
4943     * @useinstead ohos.bluetooth.constant/constant.MajorClass#MAJOR_HEALTH
4944     */
4945    MAJOR_HEALTH = 0x0900,
4946    /**
4947     * Unclassified device.
4948     *
4949     * @syscap SystemCapability.Communication.Bluetooth.Core
4950     * @since 9
4951     * @deprecated since 10
4952     * @useinstead ohos.bluetooth.constant/constant.MajorClass#MAJOR_UNCATEGORIZED
4953     */
4954    MAJOR_UNCATEGORIZED = 0x1F00
4955  }
4956
4957  /**
4958   * The enum of major minor class of a bluetooth device.
4959   *
4960   * @enum { number }
4961   * @syscap SystemCapability.Communication.Bluetooth.Core
4962   * @since 9
4963   * @deprecated since 10
4964   * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass
4965   */
4966  enum MajorMinorClass {
4967    /**
4968     * The Minor Device Class field
4969     * Computer Major Class
4970     *
4971     * @syscap SystemCapability.Communication.Bluetooth.Core
4972     * @since 9
4973     * @deprecated since 10
4974     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#COMPUTER_UNCATEGORIZED
4975     */
4976    COMPUTER_UNCATEGORIZED = 0x0100,
4977    /**
4978     * Desktop computer.
4979     *
4980     * @syscap SystemCapability.Communication.Bluetooth.Core
4981     * @since 9
4982     * @deprecated since 10
4983     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#COMPUTER_DESKTOP
4984     */
4985    COMPUTER_DESKTOP = 0x0104,
4986    /**
4987     * Server.
4988     *
4989     * @syscap SystemCapability.Communication.Bluetooth.Core
4990     * @since 9
4991     * @deprecated since 10
4992     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#COMPUTER_SERVER
4993     */
4994    COMPUTER_SERVER = 0x0108,
4995    /**
4996     * Laptop.
4997     *
4998     * @syscap SystemCapability.Communication.Bluetooth.Core
4999     * @since 9
5000     * @deprecated since 10
5001     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#COMPUTER_LAPTOP
5002     */
5003    COMPUTER_LAPTOP = 0x010C,
5004    /**
5005     * Hand-held computer.
5006     *
5007     * @syscap SystemCapability.Communication.Bluetooth.Core
5008     * @since 9
5009     * @deprecated since 10
5010     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#COMPUTER_HANDHELD_PC_PDA
5011     */
5012    COMPUTER_HANDHELD_PC_PDA = 0x0110,
5013    /**
5014     * Palmtop computer.
5015     *
5016     * @syscap SystemCapability.Communication.Bluetooth.Core
5017     * @since 9
5018     * @deprecated since 10
5019     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#COMPUTER_PALM_SIZE_PC_PDA
5020     */
5021    COMPUTER_PALM_SIZE_PC_PDA = 0x0114,
5022    /**
5023     * Wearable computer.
5024     *
5025     * @syscap SystemCapability.Communication.Bluetooth.Core
5026     * @since 9
5027     * @deprecated since 10
5028     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#COMPUTER_WEARABLE
5029     */
5030    COMPUTER_WEARABLE = 0x0118,
5031    /**
5032     * Tablet.
5033     *
5034     * @syscap SystemCapability.Communication.Bluetooth.Core
5035     * @since 9
5036     * @deprecated since 10
5037     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#COMPUTER_TABLET
5038     */
5039    COMPUTER_TABLET = 0x011C,
5040
5041    /**
5042     * Phone Major Class
5043     *
5044     * @syscap SystemCapability.Communication.Bluetooth.Core
5045     * @since 9
5046     * @deprecated since 10
5047     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#PHONE_UNCATEGORIZED
5048     */
5049    PHONE_UNCATEGORIZED = 0x0200,
5050    /**
5051     * Portable phone.
5052     *
5053     * @syscap SystemCapability.Communication.Bluetooth.Core
5054     * @since 9
5055     * @deprecated since 10
5056     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#PHONE_CELLULAR
5057     */
5058    PHONE_CELLULAR = 0x0204,
5059    /**
5060     * Cordless phone.
5061     *
5062     * @syscap SystemCapability.Communication.Bluetooth.Core
5063     * @since 9
5064     * @deprecated since 10
5065     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#PHONE_CORDLESS
5066     */
5067    PHONE_CORDLESS = 0x0208,
5068    /**
5069     * Smartphone.
5070     *
5071     * @syscap SystemCapability.Communication.Bluetooth.Core
5072     * @since 9
5073     * @deprecated since 10
5074     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#PHONE_SMART
5075     */
5076    PHONE_SMART = 0x020C,
5077    /**
5078     * Modem or gateway phone.
5079     *
5080     * @syscap SystemCapability.Communication.Bluetooth.Core
5081     * @since 9
5082     * @deprecated since 10
5083     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#PHONE_MODEM_OR_GATEWAY
5084     */
5085    PHONE_MODEM_OR_GATEWAY = 0x0210,
5086    /**
5087     * ISDN phone.
5088     *
5089     * @syscap SystemCapability.Communication.Bluetooth.Core
5090     * @since 9
5091     * @deprecated since 10
5092     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#PHONE_ISDN
5093     */
5094    PHONE_ISDN = 0x0214,
5095
5096    /**
5097     * LAN/Network Access Point Major Class
5098     *
5099     * @syscap SystemCapability.Communication.Bluetooth.Core
5100     * @since 9
5101     * @deprecated since 10
5102     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#NETWORK_FULLY_AVAILABLE
5103     */
5104    NETWORK_FULLY_AVAILABLE = 0x0300,
5105    /**
5106     * Device used on network 1 to 17.
5107     *
5108     * @syscap SystemCapability.Communication.Bluetooth.Core
5109     * @since 9
5110     * @deprecated since 10
5111     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#NETWORK_1_TO_17_UTILIZED
5112     */
5113    NETWORK_1_TO_17_UTILIZED = 0x0320,
5114    /**
5115     * Device used on network 17 to 33.
5116     *
5117     * @syscap SystemCapability.Communication.Bluetooth.Core
5118     * @since 9
5119     * @deprecated since 10
5120     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#NETWORK_17_TO_33_UTILIZED
5121     */
5122    NETWORK_17_TO_33_UTILIZED = 0x0340,
5123    /**
5124     * Device used on network 33 to 50.
5125     *
5126     * @syscap SystemCapability.Communication.Bluetooth.Core
5127     * @since 9
5128     * @deprecated since 10
5129     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#NETWORK_33_TO_50_UTILIZED
5130     */
5131    NETWORK_33_TO_50_UTILIZED = 0x0360,
5132    /**
5133     * Device used on network 60 to 67.
5134     *
5135     * @syscap SystemCapability.Communication.Bluetooth.Core
5136     * @since 9
5137     * @deprecated since 10
5138     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#NETWORK_60_TO_67_UTILIZED
5139     */
5140    NETWORK_60_TO_67_UTILIZED = 0x0380,
5141    /**
5142     * Device used on network 67 to 83.
5143     *
5144     * @syscap SystemCapability.Communication.Bluetooth.Core
5145     * @since 9
5146     * @deprecated since 10
5147     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#NETWORK_67_TO_83_UTILIZED
5148     */
5149    NETWORK_67_TO_83_UTILIZED = 0x03A0,
5150    /**
5151     * Device used on network 83 to 99.
5152     *
5153     * @syscap SystemCapability.Communication.Bluetooth.Core
5154     * @since 9
5155     * @deprecated since 10
5156     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#NETWORK_83_TO_99_UTILIZED
5157     */
5158    NETWORK_83_TO_99_UTILIZED = 0x03C0,
5159    /**
5160     * Device without network service.
5161     *
5162     * @syscap SystemCapability.Communication.Bluetooth.Core
5163     * @since 9
5164     * @deprecated since 10
5165     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#NETWORK_NO_SERVICE
5166     */
5167    NETWORK_NO_SERVICE = 0x03E0,
5168
5169    /**
5170     * Unclassified audio or video device.
5171     *
5172     * @syscap SystemCapability.Communication.Bluetooth.Core
5173     * @since 9
5174     * @deprecated since 10
5175     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#AUDIO_VIDEO_UNCATEGORIZED
5176     */
5177    AUDIO_VIDEO_UNCATEGORIZED = 0x0400,
5178    /**
5179     * Wearable audio or video headset.
5180     *
5181     * @syscap SystemCapability.Communication.Bluetooth.Core
5182     * @since 9
5183     * @deprecated since 10
5184     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#AUDIO_VIDEO_WEARABLE_HEADSET
5185     */
5186    AUDIO_VIDEO_WEARABLE_HEADSET = 0x0404,
5187    /**
5188     * Hands-free audio or video device.
5189     *
5190     * @syscap SystemCapability.Communication.Bluetooth.Core
5191     * @since 9
5192     * @deprecated since 10
5193     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#AUDIO_VIDEO_HANDSFREE
5194     */
5195    AUDIO_VIDEO_HANDSFREE = 0x0408,
5196    /**
5197     * Audio or video microphone.
5198     *
5199     * @syscap SystemCapability.Communication.Bluetooth.Core
5200     * @since 9
5201     * @deprecated since 10
5202     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#AUDIO_VIDEO_MICROPHONE
5203     */
5204    AUDIO_VIDEO_MICROPHONE = 0x0410,
5205    /**
5206     * Audio or video loudspeaker.
5207     *
5208     * @syscap SystemCapability.Communication.Bluetooth.Core
5209     * @since 9
5210     * @deprecated since 10
5211     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#AUDIO_VIDEO_LOUDSPEAKER
5212     */
5213    AUDIO_VIDEO_LOUDSPEAKER = 0x0414,
5214    /**
5215     * Audio or video headphones.
5216     *
5217     * @syscap SystemCapability.Communication.Bluetooth.Core
5218     * @since 9
5219     * @deprecated since 10
5220     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#AUDIO_VIDEO_HEADPHONES
5221     */
5222    AUDIO_VIDEO_HEADPHONES = 0x0418,
5223    /**
5224     * Portable audio or video device.
5225     *
5226     * @syscap SystemCapability.Communication.Bluetooth.Core
5227     * @since 9
5228     * @deprecated since 10
5229     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#AUDIO_VIDEO_PORTABLE_AUDIO
5230     */
5231    AUDIO_VIDEO_PORTABLE_AUDIO = 0x041C,
5232    /**
5233     * In-vehicle audio or video device.
5234     *
5235     * @syscap SystemCapability.Communication.Bluetooth.Core
5236     * @since 9
5237     * @deprecated since 10
5238     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#AUDIO_VIDEO_CAR_AUDIO
5239     */
5240    AUDIO_VIDEO_CAR_AUDIO = 0x0420,
5241    /**
5242     * Audio or video STB device.
5243     *
5244     * @syscap SystemCapability.Communication.Bluetooth.Core
5245     * @since 9
5246     * @deprecated since 10
5247     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#AUDIO_VIDEO_SET_TOP_BOX
5248     */
5249    AUDIO_VIDEO_SET_TOP_BOX = 0x0424,
5250    /**
5251     * High-fidelity speaker device.
5252     *
5253     * @syscap SystemCapability.Communication.Bluetooth.Core
5254     * @since 9
5255     * @deprecated since 10
5256     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#AUDIO_VIDEO_HIFI_AUDIO
5257     */
5258    AUDIO_VIDEO_HIFI_AUDIO = 0x0428,
5259    /**
5260     * Video cassette recording (VCR) device.
5261     *
5262     * @syscap SystemCapability.Communication.Bluetooth.Core
5263     * @since 9
5264     * @deprecated since 10
5265     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#AUDIO_VIDEO_VCR
5266     */
5267    AUDIO_VIDEO_VCR = 0x042C,
5268    /**
5269     * Camera.
5270     *
5271     * @syscap SystemCapability.Communication.Bluetooth.Core
5272     * @since 9
5273     * @deprecated since 10
5274     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#AUDIO_VIDEO_VIDEO_CAMERA
5275     */
5276    AUDIO_VIDEO_VIDEO_CAMERA = 0x0430,
5277    /**
5278     * Camcorder.
5279     *
5280     * @syscap SystemCapability.Communication.Bluetooth.Core
5281     * @since 9
5282     * @deprecated since 10
5283     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#AUDIO_VIDEO_CAMCORDER
5284     */
5285    AUDIO_VIDEO_CAMCORDER = 0x0434,
5286    /**
5287     * Audio or video monitor.
5288     *
5289     * @syscap SystemCapability.Communication.Bluetooth.Core
5290     * @since 9
5291     * @deprecated since 10
5292     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#AUDIO_VIDEO_VIDEO_MONITOR
5293     */
5294    AUDIO_VIDEO_VIDEO_MONITOR = 0x0438,
5295    /**
5296     * Video display or loudspeaker.
5297     *
5298     * @syscap SystemCapability.Communication.Bluetooth.Core
5299     * @since 9
5300     * @deprecated since 10
5301     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#AUDIO_VIDEO_VIDEO_DISPLAY_AND_LOUDSPEAKER
5302     */
5303    AUDIO_VIDEO_VIDEO_DISPLAY_AND_LOUDSPEAKER = 0x043C,
5304    /**
5305     * Video conferencing device.
5306     *
5307     * @syscap SystemCapability.Communication.Bluetooth.Core
5308     * @since 9
5309     * @deprecated since 10
5310     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#AUDIO_VIDEO_VIDEO_CONFERENCING
5311     */
5312    AUDIO_VIDEO_VIDEO_CONFERENCING = 0x0440,
5313    /**
5314     * Audio or video gaming toy.
5315     *
5316     * @syscap SystemCapability.Communication.Bluetooth.Core
5317     * @since 9
5318     * @deprecated since 10
5319     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#AUDIO_VIDEO_VIDEO_GAMING_TOY
5320     */
5321    AUDIO_VIDEO_VIDEO_GAMING_TOY = 0x0448,
5322
5323    /**
5324     * Peripheral Major Class
5325     *
5326     * @syscap SystemCapability.Communication.Bluetooth.Core
5327     * @since 9
5328     * @deprecated since 10
5329     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#PERIPHERAL_NON_KEYBOARD_NON_POINTING
5330     */
5331    PERIPHERAL_NON_KEYBOARD_NON_POINTING = 0x0500,
5332    /**
5333     * Keyboard device.
5334     *
5335     * @syscap SystemCapability.Communication.Bluetooth.Core
5336     * @since 9
5337     * @deprecated since 10
5338     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#PERIPHERAL_KEYBOARD
5339     */
5340    PERIPHERAL_KEYBOARD = 0x0540,
5341    /**
5342     * Pointing peripheral device.
5343     *
5344     * @syscap SystemCapability.Communication.Bluetooth.Core
5345     * @since 9
5346     * @deprecated since 10
5347     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#PERIPHERAL_POINTING_DEVICE
5348     */
5349    PERIPHERAL_POINTING_DEVICE = 0x0580,
5350    /**
5351     * Keyboard pointing device.
5352     *
5353     * @syscap SystemCapability.Communication.Bluetooth.Core
5354     * @since 9
5355     * @deprecated since 10
5356     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#PERIPHERAL_KEYBOARD_POINTING
5357     */
5358    PERIPHERAL_KEYBOARD_POINTING = 0x05C0,
5359    /**
5360     * Unclassified peripheral device.
5361     *
5362     * @syscap SystemCapability.Communication.Bluetooth.Core
5363     * @since 9
5364     * @deprecated since 10
5365     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#PERIPHERAL_UNCATEGORIZED
5366     */
5367    PERIPHERAL_UNCATEGORIZED = 0x0500,
5368    /**
5369     * Peripheral joystick.
5370     *
5371     * @syscap SystemCapability.Communication.Bluetooth.Core
5372     * @since 9
5373     * @deprecated since 10
5374     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#PERIPHERAL_JOYSTICK
5375     */
5376    PERIPHERAL_JOYSTICK = 0x0504,
5377    /**
5378     * Peripheral game pad.
5379     *
5380     * @syscap SystemCapability.Communication.Bluetooth.Core
5381     * @since 9
5382     * @deprecated since 10
5383     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#PERIPHERAL_GAMEPAD
5384     */
5385    PERIPHERAL_GAMEPAD = 0x0508,
5386    /**
5387     * Peripheral remote control device.
5388     *
5389     * @syscap SystemCapability.Communication.Bluetooth.Core
5390     * @since 9
5391     * @deprecated since 10
5392     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#PERIPHERAL_REMOTE_CONTROL
5393     */
5394    PERIPHERAL_REMOTE_CONTROL = 0x05C0,
5395    /**
5396     * Peripheral sensing device.
5397     *
5398     * @syscap SystemCapability.Communication.Bluetooth.Core
5399     * @since 9
5400     * @deprecated since 10
5401     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#PERIPHERAL_SENSING_DEVICE
5402     */
5403    PERIPHERAL_SENSING_DEVICE = 0x0510,
5404    /**
5405     * Peripheral digitizer tablet.
5406     *
5407     * @syscap SystemCapability.Communication.Bluetooth.Core
5408     * @since 9
5409     * @deprecated since 10
5410     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#PERIPHERAL_DIGITIZER_TABLET
5411     */
5412    PERIPHERAL_DIGITIZER_TABLET = 0x0514,
5413    /**
5414     * Peripheral card reader.
5415     *
5416     * @syscap SystemCapability.Communication.Bluetooth.Core
5417     * @since 9
5418     * @deprecated since 10
5419     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#PERIPHERAL_CARD_READER
5420     */
5421    PERIPHERAL_CARD_READER = 0x0518,
5422    /**
5423     * Peripheral digital pen.
5424     *
5425     * @syscap SystemCapability.Communication.Bluetooth.Core
5426     * @since 9
5427     * @deprecated since 10
5428     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#PERIPHERAL_DIGITAL_PEN
5429     */
5430    PERIPHERAL_DIGITAL_PEN = 0x051C,
5431    /**
5432     * Peripheral RFID scanner.
5433     *
5434     * @syscap SystemCapability.Communication.Bluetooth.Core
5435     * @since 9
5436     * @deprecated since 10
5437     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#PERIPHERAL_SCANNER_RFID
5438     */
5439    PERIPHERAL_SCANNER_RFID = 0x0520,
5440    /**
5441     * Gesture input device.
5442     *
5443     * @syscap SystemCapability.Communication.Bluetooth.Core
5444     * @since 9
5445     * @deprecated since 10
5446     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#PERIPHERAL_GESTURAL_INPUT
5447     */
5448    PERIPHERAL_GESTURAL_INPUT = 0x0522,
5449
5450    /**
5451     * Imaging Major Class
5452     *
5453     * @syscap SystemCapability.Communication.Bluetooth.Core
5454     * @since 9
5455     * @deprecated since 10
5456     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#IMAGING_UNCATEGORIZED
5457     */
5458    IMAGING_UNCATEGORIZED = 0x0600,
5459    /**
5460     * Imaging display device.
5461     *
5462     * @syscap SystemCapability.Communication.Bluetooth.Core
5463     * @since 9
5464     * @deprecated since 10
5465     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#IMAGING_DISPLAY
5466     */
5467    IMAGING_DISPLAY = 0x0610,
5468    /**
5469     * Imaging camera device.
5470     *
5471     * @syscap SystemCapability.Communication.Bluetooth.Core
5472     * @since 9
5473     * @deprecated since 10
5474     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#IMAGING_CAMERA
5475     */
5476    IMAGING_CAMERA = 0x0620,
5477    /**
5478     * Imaging scanner.
5479     *
5480     * @syscap SystemCapability.Communication.Bluetooth.Core
5481     * @since 9
5482     * @deprecated since 10
5483     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#IMAGING_SCANNER
5484     */
5485    IMAGING_SCANNER = 0x0640,
5486    /**
5487     * Imaging printer.
5488     *
5489     * @syscap SystemCapability.Communication.Bluetooth.Core
5490     * @since 9
5491     * @deprecated since 10
5492     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#IMAGING_PRINTER
5493     */
5494    IMAGING_PRINTER = 0x0680,
5495
5496    /**
5497     * Wearable Major Class
5498     *
5499     * @syscap SystemCapability.Communication.Bluetooth.Core
5500     * @since 9
5501     * @deprecated since 10
5502     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#WEARABLE_UNCATEGORIZED
5503     */
5504    WEARABLE_UNCATEGORIZED = 0x0700,
5505    /**
5506     * Smart watch.
5507     *
5508     * @syscap SystemCapability.Communication.Bluetooth.Core
5509     * @since 9
5510     * @deprecated since 10
5511     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#WEARABLE_WRIST_WATCH
5512     */
5513    WEARABLE_WRIST_WATCH = 0x0704,
5514    /**
5515     * Wearable pager.
5516     *
5517     * @syscap SystemCapability.Communication.Bluetooth.Core
5518     * @since 9
5519     * @deprecated since 10
5520     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#WEARABLE_PAGER
5521     */
5522    WEARABLE_PAGER = 0x0708,
5523    /**
5524     * Smart jacket.
5525     *
5526     * @syscap SystemCapability.Communication.Bluetooth.Core
5527     * @since 9
5528     * @deprecated since 10
5529     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#WEARABLE_JACKET
5530     */
5531    WEARABLE_JACKET = 0x070C,
5532    /**
5533     * Wearable helmet.
5534     *
5535     * @syscap SystemCapability.Communication.Bluetooth.Core
5536     * @since 9
5537     * @deprecated since 10
5538     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#WEARABLE_HELMET
5539     */
5540    WEARABLE_HELMET = 0x0710,
5541    /**
5542     * Wearable glasses.
5543     *
5544     * @syscap SystemCapability.Communication.Bluetooth.Core
5545     * @since 9
5546     * @deprecated since 10
5547     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#WEARABLE_GLASSES
5548     */
5549    WEARABLE_GLASSES = 0x0714,
5550
5551    /**
5552     * Minor Device Class field - Toy Major Class
5553     *
5554     * @syscap SystemCapability.Communication.Bluetooth.Core
5555     * @since 9
5556     * @deprecated since 10
5557     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#TOY_UNCATEGORIZED
5558     */
5559    TOY_UNCATEGORIZED = 0x0800,
5560    /**
5561     * Toy robot.
5562     *
5563     * @syscap SystemCapability.Communication.Bluetooth.Core
5564     * @since 9
5565     * @deprecated since 10
5566     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#TOY_ROBOT
5567     */
5568    TOY_ROBOT = 0x0804,
5569    /**
5570     * Toy vehicle.
5571     *
5572     * @syscap SystemCapability.Communication.Bluetooth.Core
5573     * @since 9
5574     * @deprecated since 10
5575     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#TOY_VEHICLE
5576     */
5577    TOY_VEHICLE = 0x0808,
5578    /**
5579     * Humanoid toy doll.
5580     *
5581     * @syscap SystemCapability.Communication.Bluetooth.Core
5582     * @since 9
5583     * @deprecated since 10
5584     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#TOY_DOLL_ACTION_FIGURE
5585     */
5586    TOY_DOLL_ACTION_FIGURE = 0x080C,
5587    /**
5588     * Toy controller.
5589     *
5590     * @syscap SystemCapability.Communication.Bluetooth.Core
5591     * @since 9
5592     * @deprecated since 10
5593     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#TOY_CONTROLLER
5594     */
5595    TOY_CONTROLLER = 0x0810,
5596    /**
5597     * Toy gaming device.
5598     *
5599     * @syscap SystemCapability.Communication.Bluetooth.Core
5600     * @since 9
5601     * @deprecated since 10
5602     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#TOY_GAME
5603     */
5604    TOY_GAME = 0x0814,
5605
5606    /**
5607     * Minor Device Class field - Health
5608     *
5609     * @syscap SystemCapability.Communication.Bluetooth.Core
5610     * @since 9
5611     * @deprecated since 10
5612     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#HEALTH_UNCATEGORIZED
5613     */
5614    HEALTH_UNCATEGORIZED = 0x0900,
5615    /**
5616     * Blood pressure device.
5617     *
5618     * @syscap SystemCapability.Communication.Bluetooth.Core
5619     * @since 9
5620     * @deprecated since 10
5621     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#HEALTH_BLOOD_PRESSURE
5622     */
5623    HEALTH_BLOOD_PRESSURE = 0x0904,
5624    /**
5625     * Thermometer.
5626     *
5627     * @syscap SystemCapability.Communication.Bluetooth.Core
5628     * @since 9
5629     * @deprecated since 10
5630     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#HEALTH_THERMOMETER
5631     */
5632    HEALTH_THERMOMETER = 0x0908,
5633    /**
5634     * Body scale.
5635     *
5636     * @syscap SystemCapability.Communication.Bluetooth.Core
5637     * @since 9
5638     * @deprecated since 10
5639     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#HEALTH_WEIGHING
5640     */
5641    HEALTH_WEIGHING = 0x090C,
5642    /**
5643     * Blood glucose monitor.
5644     *
5645     * @syscap SystemCapability.Communication.Bluetooth.Core
5646     * @since 9
5647     * @deprecated since 10
5648     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#HEALTH_GLUCOSE
5649     */
5650    HEALTH_GLUCOSE = 0x0910,
5651    /**
5652     * Pulse oximeter.
5653     *
5654     * @syscap SystemCapability.Communication.Bluetooth.Core
5655     * @since 9
5656     * @deprecated since 10
5657     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#HEALTH_PULSE_OXIMETER
5658     */
5659    HEALTH_PULSE_OXIMETER = 0x0914,
5660    /**
5661     * Heart rate monitor.
5662     *
5663     * @syscap SystemCapability.Communication.Bluetooth.Core
5664     * @since 9
5665     * @deprecated since 10
5666     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#HEALTH_PULSE_RATE
5667     */
5668    HEALTH_PULSE_RATE = 0x0918,
5669    /**
5670     * Health data display.
5671     *
5672     * @syscap SystemCapability.Communication.Bluetooth.Core
5673     * @since 9
5674     * @deprecated since 10
5675     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#HEALTH_DATA_DISPLAY
5676     */
5677    HEALTH_DATA_DISPLAY = 0x091C,
5678    /**
5679     * Step counter.
5680     *
5681     * @syscap SystemCapability.Communication.Bluetooth.Core
5682     * @since 9
5683     * @deprecated since 10
5684     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#HEALTH_STEP_COUNTER
5685     */
5686    HEALTH_STEP_COUNTER = 0x0920,
5687    /**
5688     * Body composition analyzer.
5689     *
5690     * @syscap SystemCapability.Communication.Bluetooth.Core
5691     * @since 9
5692     * @deprecated since 10
5693     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#HEALTH_BODY_COMPOSITION_ANALYZER
5694     */
5695    HEALTH_BODY_COMPOSITION_ANALYZER = 0x0924,
5696    /**
5697     * Hygrometer.
5698     *
5699     * @syscap SystemCapability.Communication.Bluetooth.Core
5700     * @since 9
5701     * @deprecated since 10
5702     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#HEALTH_PEAK_FLOW_MONITOR
5703     */
5704    HEALTH_PEAK_FLOW_MONITOR = 0x0928,
5705    /**
5706     * Medication monitor.
5707     *
5708     * @syscap SystemCapability.Communication.Bluetooth.Core
5709     * @since 9
5710     * @deprecated since 10
5711     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#HEALTH_MEDICATION_MONITOR
5712     */
5713    HEALTH_MEDICATION_MONITOR = 0x092C,
5714    /**
5715     * Prosthetic knee.
5716     *
5717     * @syscap SystemCapability.Communication.Bluetooth.Core
5718     * @since 9
5719     * @deprecated since 10
5720     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#HEALTH_KNEE_PROSTHESIS
5721     */
5722    HEALTH_KNEE_PROSTHESIS = 0x0930,
5723    /**
5724     * Prosthetic ankle.
5725     *
5726     * @syscap SystemCapability.Communication.Bluetooth.Core
5727     * @since 9
5728     * @deprecated since 10
5729     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#HEALTH_ANKLE_PROSTHESIS
5730     */
5731    HEALTH_ANKLE_PROSTHESIS = 0x0934,
5732    /**
5733     * Generic health management device.
5734     *
5735     * @syscap SystemCapability.Communication.Bluetooth.Core
5736     * @since 9
5737     * @deprecated since 10
5738     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#HEALTH_GENERIC_HEALTH_MANAGER
5739     */
5740    HEALTH_GENERIC_HEALTH_MANAGER = 0x0938,
5741    /**
5742     * Personal mobility device.
5743     *
5744     * @syscap SystemCapability.Communication.Bluetooth.Core
5745     * @since 9
5746     * @deprecated since 10
5747     * @useinstead ohos.bluetooth.constant/constant.MajorMinorClass#HEALTH_PERSONAL_MOBILITY_DEVICE
5748     */
5749    HEALTH_PERSONAL_MOBILITY_DEVICE = 0x093C
5750  }
5751
5752  /**
5753   * The enum of a2dp playing state.
5754   *
5755   * @enum { number }
5756   * @syscap SystemCapability.Communication.Bluetooth.Core
5757   * @since 9
5758   * @deprecated since 10
5759   * @useinstead ohos.bluetooth.a2dp/a2dp.PlayingState
5760   */
5761  enum PlayingState {
5762    /**
5763     * Not playing.
5764     *
5765     * @syscap SystemCapability.Communication.Bluetooth.Core
5766     * @since 9
5767     * @deprecated since 10
5768     * @useinstead ohos.bluetooth.a2dp/a2dp.PlayingState#STATE_NOT_PLAYING
5769     */
5770    STATE_NOT_PLAYING,
5771    /**
5772     * Playing.
5773     *
5774     * @syscap SystemCapability.Communication.Bluetooth.Core
5775     * @since 9
5776     * @deprecated since 10
5777     * @useinstead ohos.bluetooth.a2dp/a2dp.PlayingState#STATE_PLAYING
5778     */
5779    STATE_PLAYING
5780  }
5781
5782  /**
5783   * The enum of profile id.
5784   *
5785   * @enum { number }
5786   * @syscap SystemCapability.Communication.Bluetooth.Core
5787   * @since 9
5788   * @deprecated since 10
5789   * @useinstead ohos.bluetooth.constant/constant.ProfileId
5790   */
5791  enum ProfileId {
5792    /**
5793     * A2DP profile.
5794     *
5795     * @syscap SystemCapability.Communication.Bluetooth.Core
5796     * @since 9
5797     * @deprecated since 10
5798     * @useinstead ohos.bluetooth.constant/constant.ProfileId#PROFILE_A2DP_SOURCE
5799     */
5800    PROFILE_A2DP_SOURCE = 1,
5801
5802    /**
5803     * HFP profile.
5804     *
5805     * @syscap SystemCapability.Communication.Bluetooth.Core
5806     * @since 9
5807     * @deprecated since 10
5808     * @useinstead ohos.bluetooth.constant/constant.ProfileId#PROFILE_HANDSFREE_AUDIO_GATEWAY
5809     */
5810    PROFILE_HANDS_FREE_AUDIO_GATEWAY = 4,
5811
5812    /**
5813     * Human Interface Device (HID) profile.
5814     *
5815     * @syscap SystemCapability.Communication.Bluetooth.Core
5816     * @since 9
5817     * @deprecated since 10
5818     * @useinstead ohos.bluetooth.constant/constant.ProfileId#PROFILE_HID_HOST
5819     */
5820    PROFILE_HID_HOST = 6,
5821
5822    /**
5823     * PAN profile.
5824     *
5825     * @syscap SystemCapability.Communication.Bluetooth.Core
5826     * @since 9
5827     * @deprecated since 10
5828     * @useinstead ohos.bluetooth.constant/constant.ProfileId#PROFILE_PAN_NETWORK
5829     */
5830    PROFILE_PAN_NETWORK = 7
5831  }
5832}
5833
5834export default bluetoothManager;