• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (C) 2021-2022 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 bluetooth
27 * @syscap SystemCapability.Communication.Bluetooth.Core
28 * @since 7
29 * @deprecated since 9
30 * @useinstead ohos.bluetoothManager
31 */
32declare namespace bluetooth {
33  /**
34   * Obtains the Bluetooth status of a device.
35   *
36   * @permission ohos.permission.USE_BLUETOOTH
37   * @returns { BluetoothState } Returns the Bluetooth status, which can be {@link BluetoothState#STATE_OFF},
38   * {@link BluetoothState#STATE_TURNING_ON}, {@link BluetoothState#STATE_ON}, {@link BluetoothState#STATE_TURNING_OFF},
39   * {@link BluetoothState#STATE_BLE_TURNING_ON}, {@link BluetoothState#STATE_BLE_ON},
40   * or {@link BluetoothState#STATE_BLE_TURNING_OFF}.
41   * @syscap SystemCapability.Communication.Bluetooth.Core
42   * @since 7
43   * @deprecated since 9
44   * @useinstead ohos.bluetoothManager/bluetoothManager.getState
45   */
46  function getState(): BluetoothState;
47
48  /**
49   * Get the local device connection state to any profile of any remote device.
50   *
51   * @permission ohos.permission.USE_BLUETOOTH
52   * @returns { ProfileConnectionState } One of {@link ProfileConnectionState#STATE_DISCONNECTED},
53   * {@link ProfileConnectionState#STATE_CONNECTING}, {@link ProfileConnectionState#STATE_CONNECTED},
54   * {@link ProfileConnectionState#STATE_DISCONNECTING}.
55   * @syscap SystemCapability.Communication.Bluetooth.Core
56   * @since 7
57   * @deprecated since 9
58   * @useinstead ohos.bluetoothManager/bluetoothManager.getBtConnectionState
59   */
60  function getBtConnectionState(): ProfileConnectionState;
61
62  /**
63   * Starts pairing with a remote Bluetooth device.
64   *
65   * @permission ohos.permission.DISCOVER_BLUETOOTH
66   * @param { string } deviceId - The address of the remote device to pair.
67   * @returns { boolean } Returns {@code true} if the pairing process is started; returns {@code false} otherwise.
68   * @syscap SystemCapability.Communication.Bluetooth.Core
69   * @since 7
70   * @deprecated since 9
71   * @useinstead ohos.bluetoothManager/bluetoothManager.pairDevice
72   */
73  function pairDevice(deviceId: string): boolean;
74
75  /**
76   * Remove a paired remote device.
77   *
78   * @permission ohos.permission.DISCOVER_BLUETOOTH
79   * @param { string } deviceId - The address of the remote device to be removed.
80   * @returns { boolean } Returns {@code true} if the cancel process is started; returns {@code false} otherwise.
81   * @syscap SystemCapability.Communication.Bluetooth.Core
82   * @systemapi Hide this for inner system use
83   * @since 8
84   * @deprecated since 9
85   * @useinstead ohos.bluetoothManager/bluetoothManager.cancelPairedDevice
86   */
87  function cancelPairedDevice(deviceId: string): boolean;
88
89  /**
90   * Obtains the name of a peer Bluetooth device.
91   *
92   * @permission ohos.permission.USE_BLUETOOTH
93   * @param { string } deviceId - The address of the remote device.
94   * @returns { string } Returns the device name in character string format.
95   * @syscap SystemCapability.Communication.Bluetooth.Core
96   * @since 8
97   * @deprecated since 9
98   * @useinstead ohos.bluetoothManager/bluetoothManager.getRemoteDeviceName
99   */
100  function getRemoteDeviceName(deviceId: string): string;
101
102  /**
103   * Obtains the class of a peer Bluetooth device.
104   *
105   * @permission ohos.permission.USE_BLUETOOTH
106   * @param { string } deviceId - The address of the remote device.
107   * @returns { DeviceClass } The class of the remote device, {@link DeviceClass}.
108   * @syscap SystemCapability.Communication.Bluetooth.Core
109   * @since 8
110   * @deprecated since 9
111   * @useinstead ohos.bluetoothManager/bluetoothManager.getRemoteDeviceClass
112   */
113  function getRemoteDeviceClass(deviceId: string): DeviceClass;
114
115  /**
116   * Enables Bluetooth on a device.
117   *
118   * @permission ohos.permission.DISCOVER_BLUETOOTH
119   * @returns { boolean } Returns {@code true} if Bluetooth is being enabled; returns {@code false} if an error occurs.
120   * @syscap SystemCapability.Communication.Bluetooth.Core
121   * @since 8
122   * @deprecated since 9
123   * @useinstead ohos.bluetoothManager/bluetoothManager.enableBluetooth
124   */
125  function enableBluetooth(): boolean;
126
127  /**
128   * Disables Bluetooth on a device.
129   *
130   * @permission ohos.permission.DISCOVER_BLUETOOTH
131   * @returns { boolean } Returns {@code true} if Bluetooth is being disabled; returns {@code false} if an error occurs.
132   * @syscap SystemCapability.Communication.Bluetooth.Core
133   * @since 8
134   * @deprecated since 9
135   * @useinstead ohos.bluetoothManager/bluetoothManager.disableBluetooth
136   */
137  function disableBluetooth(): boolean;
138
139  /**
140   * Obtains the Bluetooth local name of a device.
141   *
142   * @permission ohos.permission.USE_BLUETOOTH
143   * @returns { string } Returns the name the device.
144   * @syscap SystemCapability.Communication.Bluetooth.Core
145   * @since 8
146   * @deprecated since 9
147   * @useinstead ohos.bluetoothManager/bluetoothManager.getLocalName
148   */
149  function getLocalName(): string;
150
151  /**
152   * Obtains the list of Bluetooth devices that have been paired with the current device.
153   *
154   * @permission ohos.permission.USE_BLUETOOTH
155   * @returns { Array<string> } Returns a list of paired Bluetooth devices's address.
156   * @syscap SystemCapability.Communication.Bluetooth.Core
157   * @since 8
158   * @deprecated since 9
159   * @useinstead ohos.bluetoothManager/bluetoothManager.getPairedDevices
160   */
161  function getPairedDevices(): Array<string>;
162
163  /**
164   * Obtains the connection state of profile.
165   *
166   * @permission ohos.permission.USE_BLUETOOTH
167   * @param { ProfileId } profileId - The profile id.
168   * @returns { ProfileConnectionState } Returns the connection state.
169   * @syscap SystemCapability.Communication.Bluetooth.Core
170   * @since 8
171   * @deprecated since 9
172   * @useinstead ohos.bluetoothManager/bluetoothManager.getProfileConnectionState
173   */
174  function getProfileConnState(profileId: ProfileId): ProfileConnectionState;
175
176  /**
177   * Sets the confirmation of pairing with a certain device.
178   *
179   * @permission ohos.permission.MANAGE_BLUETOOTH
180   * @param { string } device - The address of the remote device.
181   * @param { boolean } accept - Indicates whether to accept the pairing request, {@code true} indicates accept or {@code false} otherwise.
182   * @returns { boolean } Returns {@code true} if the pairing confirmation is set; returns {@code false} otherwise.
183   * @syscap SystemCapability.Communication.Bluetooth.Core
184   * @since 8
185   * @deprecated since 9
186   * @useinstead ohos.bluetoothManager/bluetoothManager.setDevicePairingConfirmation
187   */
188  function setDevicePairingConfirmation(device: string, accept: boolean): boolean;
189
190  /**
191   * Sets the Bluetooth friendly name of a device.
192   *
193   * @permission ohos.permission.DISCOVER_BLUETOOTH
194   * @param { string } name - Indicates a valid Bluetooth name.
195   * @returns { boolean } Returns {@code true} if the Bluetooth name is set successfully; returns {@code false} otherwise.
196   * @syscap SystemCapability.Communication.Bluetooth.Core
197   * @since 8
198   * @deprecated since 9
199   * @useinstead ohos.bluetoothManager/bluetoothManager.setLocalName
200   */
201  function setLocalName(name: string): boolean;
202
203  /**
204   * Sets the Bluetooth scan mode for a device.
205   *
206   * @permission ohos.permission.USE_BLUETOOTH
207   * @param { ScanMode } mode - Indicates the Bluetooth scan mode to set, {@link ScanMode}.
208   * @param { number } duration - Indicates the duration in seconds, in which the host is discoverable.
209   * @returns { boolean } Returns {@code true} if the Bluetooth scan mode is set; returns {@code false} otherwise.
210   * @syscap SystemCapability.Communication.Bluetooth.Core
211   * @since 8
212   * @deprecated since 9
213   * @useinstead ohos.bluetoothManager/bluetoothManager.setBluetoothScanMode
214   */
215  function setBluetoothScanMode(mode: ScanMode, duration: number): boolean;
216
217  /**
218   * Obtains the Bluetooth scanning mode of a device.
219   *
220   * @permission ohos.permission.USE_BLUETOOTH
221   * @returns { ScanMode } Returns the Bluetooth scanning mode, {@link ScanMode}.
222   * @syscap SystemCapability.Communication.Bluetooth.Core
223   * @since 8
224   * @deprecated since 9
225   * @useinstead ohos.bluetoothManager/bluetoothManager.getBluetoothScanMode
226   */
227  function getBluetoothScanMode(): ScanMode;
228
229  /**
230   * Starts scanning Bluetooth devices.
231   *
232   * @permission ohos.permission.DISCOVER_BLUETOOTH and ohos.permission.LOCATION
233   * @returns { boolean } Returns {@code true} if the scan is started successfully; returns {@code false} otherwise.
234   * @syscap SystemCapability.Communication.Bluetooth.Core
235   * @since 8
236   * @deprecated since 9
237   * @useinstead ohos.bluetoothManager/bluetoothManager.startBluetoothDiscovery
238   */
239  function startBluetoothDiscovery(): boolean;
240
241  /**
242   * Stops Bluetooth device scanning.
243   *
244   * @permission ohos.permission.DISCOVER_BLUETOOTH
245   * @returns { boolean } Returns {@code true} if scanning is stopped successfully; returns {@code false} otherwise.
246   * @syscap SystemCapability.Communication.Bluetooth.Core
247   * @since 8
248   * @deprecated since 9
249   * @useinstead ohos.bluetoothManager/bluetoothManager.stopBluetoothDiscovery
250   */
251  function stopBluetoothDiscovery(): boolean;
252
253  /**
254   * Subscribe the event reported when a remote Bluetooth device is discovered.
255   *
256   * @permission ohos.permission.USE_BLUETOOTH
257   * @param { 'bluetoothDeviceFind' } type - Type of the discovering event to listen for.
258   * @param { Callback<Array<string>> } callback - Callback used to listen for the discovering event.
259   * @syscap SystemCapability.Communication.Bluetooth.Core
260   * @since 8
261   * @deprecated since 9
262   * @useinstead ohos.bluetoothManager/bluetoothManager.on#event:bluetoothDeviceFind
263   */
264  function on(type: 'bluetoothDeviceFind', callback: Callback<Array<string>>): void;
265
266  /**
267   * Unsubscribe the event reported when a remote Bluetooth device is discovered.
268   *
269   * @permission ohos.permission.USE_BLUETOOTH
270   * @param { 'bluetoothDeviceFind' } type - Type of the discovering event to listen for.
271   * @param { Callback<Array<string>> } callback - Callback used to listen for the discovering event.
272   * @syscap SystemCapability.Communication.Bluetooth.Core
273   * @since 8
274   * @deprecated since 9
275   * @useinstead ohos.bluetoothManager/bluetoothManager.off#event:bluetoothDeviceFind
276   */
277  function off(type: 'bluetoothDeviceFind', callback?: Callback<Array<string>>): void;
278
279  /**
280   * Subscribe the event reported when a remote Bluetooth device is bonded.
281   *
282   * @permission ohos.permission.USE_BLUETOOTH
283   * @param { 'bondStateChange' } type - Type of the bond state event to listen for.
284   * @param { Callback<BondStateParam> } callback - Callback used to listen for the bond state event, {@link BondStateParam}.
285   * @syscap SystemCapability.Communication.Bluetooth.Core
286   * @since 8
287   * @deprecated since 9
288   * @useinstead ohos.bluetoothManager/bluetoothManager.on#event:bondStateChange
289   */
290  function on(type: 'bondStateChange', callback: Callback<BondStateParam>): void;
291
292  /**
293   * Unsubscribe the event reported when a remote Bluetooth device is bonded.
294   *
295   * @permission ohos.permission.USE_BLUETOOTH
296   * @param { 'bondStateChange' } type - Type of the bond state event to listen for.
297   * @param { Callback<BondStateParam> } callback - Callback used to listen for the bond state event.
298   * @syscap SystemCapability.Communication.Bluetooth.Core
299   * @since 8
300   * @deprecated since 9
301   * @useinstead ohos.bluetoothManager/bluetoothManager.off#event:bondStateChange
302   */
303  function off(type: 'bondStateChange', callback?: Callback<BondStateParam>): void;
304
305  /**
306   * Subscribe the event of a pairing request from a remote Bluetooth device.
307   *
308   * @permission ohos.permission.DISCOVER_BLUETOOTH
309   * @param { 'pinRequired' } type - Type of the pairing request event to listen for.
310   * @param { Callback<PinRequiredParam> } callback - Callback used to listen for the pairing request event.
311   * @syscap SystemCapability.Communication.Bluetooth.Core
312   * @since 8
313   * @deprecated since 9
314   * @useinstead ohos.bluetoothManager/bluetoothManager.on#event:pinRequired
315   */
316  function on(type: 'pinRequired', callback: Callback<PinRequiredParam>): void;
317
318  /**
319   * Unsubscribe the event of a pairing request from a remote Bluetooth device.
320   *
321   * @permission ohos.permission.DISCOVER_BLUETOOTH
322   * @param { 'pinRequired' } type - Type of the pairing request event to listen for.
323   * @param { Callback<PinRequiredParam> } callback - Callback used to listen for the pairing request event.
324   * @syscap SystemCapability.Communication.Bluetooth.Core
325   * @since 8
326   * @deprecated since 9
327   * @useinstead ohos.bluetoothManager/bluetoothManager.off#event:pinRequired
328   */
329  function off(type: 'pinRequired', callback?: Callback<PinRequiredParam>): void;
330
331  /**
332   * Subscribe the event reported when the Bluetooth state changes.
333   *
334   * @permission ohos.permission.USE_BLUETOOTH
335   * @param { 'stateChange' } type - Type of the Bluetooth state changes event to listen for.
336   * @param { Callback<BluetoothState> } callback - Callback used to listen for the Bluetooth state event.
337   * @syscap SystemCapability.Communication.Bluetooth.Core
338   * @since 8
339   * @deprecated since 9
340   * @useinstead ohos.bluetoothManager/bluetoothManager.on#event:stateChange
341   */
342  function on(type: 'stateChange', callback: Callback<BluetoothState>): void;
343
344  /**
345   * Unsubscribe the event reported when the Bluetooth state changes.
346   *
347   * @permission ohos.permission.USE_BLUETOOTH
348   * @param { 'stateChange' } type - Type of the Bluetooth state changes event to listen for.
349   * @param { Callback<BluetoothState> } callback - Callback used to listen for the Bluetooth state event.
350   * @syscap SystemCapability.Communication.Bluetooth.Core
351   * @since 8
352   * @deprecated since 9
353   * @useinstead ohos.bluetoothManager/bluetoothManager.off#event:stateChange
354   */
355  function off(type: 'stateChange', callback?: Callback<BluetoothState>): void;
356
357  /**
358   * Creates a Bluetooth server listening socket.
359   *
360   * @permission ohos.permission.USE_BLUETOOTH
361   * @param { string } name - Indicates the service name.
362   * @param { SppOption } option - Indicates the listen parameters {@link SppOption}.
363   * @param { AsyncCallback<number> } callback - Callback used to return a server socket ID.
364   * @syscap SystemCapability.Communication.Bluetooth.Core
365   * @since 8
366   * @deprecated since 9
367   * @useinstead ohos.bluetoothManager/bluetoothManager.sppListen
368   */
369  function sppListen(name: string, option: SppOption, callback: AsyncCallback<number>): void;
370
371  /**
372   * Waits for a remote device to connect.
373   *
374   * @param { number } serverSocket - Indicates the server socket ID, returned by {@link sppListen}.
375   * @param { AsyncCallback<number> } callback - Callback used to return a client socket ID.
376   * @syscap SystemCapability.Communication.Bluetooth.Core
377   * @since 8
378   * @deprecated since 9
379   * @useinstead ohos.bluetoothManager/bluetoothManager.sppAccept
380   */
381  function sppAccept(serverSocket: number, callback: AsyncCallback<number>): void;
382
383  /**
384   * Connects to a remote device over the socket.
385   *
386   * @permission ohos.permission.USE_BLUETOOTH
387   * @param { string } device - The address of the remote device to connect.
388   * @param { SppOption } option - Indicates the connect parameters {@link SppOption}.
389   * @param { AsyncCallback<number> } callback - Callback used to return a client socket ID.
390   * @syscap SystemCapability.Communication.Bluetooth.Core
391   * @since 8
392   * @deprecated since 9
393   * @useinstead ohos.bluetoothManager/bluetoothManager.sppConnect
394   */
395  function sppConnect(device: string, option: SppOption, callback: AsyncCallback<number>): void;
396
397  /**
398   * Disables an spp server socket and releases related resources.
399   *
400   * @param { number } socket - Indicates the server socket ID, returned by {@link sppListen}.
401   * @syscap SystemCapability.Communication.Bluetooth.Core
402   * @since 8
403   * @deprecated since 9
404   * @useinstead ohos.bluetoothManager/bluetoothManager.sppCloseServerSocket
405   */
406  function sppCloseServerSocket(socket: number): void;
407
408  /**
409   * Disables an spp client socket and releases related resources.
410   *
411   * @param { number } socket - Indicates the client socket ID, returned by {@link sppAccept} or {@link sppConnect}.
412   * @syscap SystemCapability.Communication.Bluetooth.Core
413   * @since 8
414   * @deprecated since 9
415   * @useinstead ohos.bluetoothManager/bluetoothManager.sppCloseClientSocket
416   */
417  function sppCloseClientSocket(socket: number): void;
418
419  /**
420   * Write data through the socket.
421   *
422   * @param { number } clientSocket - Indicates the client socket ID, returned by {@link sppAccept} or {@link sppConnect}.
423   * @param { ArrayBuffer } data - Indicates the data to write.
424   * @returns { boolean } Returns {@code true} if the data is write successfully; returns {@code false} otherwise.
425   * @syscap SystemCapability.Communication.Bluetooth.Core
426   * @since 8
427   * @deprecated since 9
428   * @useinstead ohos.bluetoothManager/bluetoothManager.sppWrite
429   */
430  function sppWrite(clientSocket: number, data: ArrayBuffer): boolean;
431
432  /**
433   * Subscribe the event reported when data is read from the socket.
434   *
435   * @param { 'sppRead' } type - Type of the spp read event to listen for.
436   * @param { number } clientSocket - Client socket ID, which is obtained by sppAccept or sppConnect.
437   * @param { Callback<ArrayBuffer> } callback - Callback used to listen for the spp read event.
438   * @syscap SystemCapability.Communication.Bluetooth.Core
439   * @since 8
440   * @deprecated since 9
441   * @useinstead ohos.bluetoothManager/bluetoothManager.on#event:sppRead
442   */
443  function on(type: 'sppRead', clientSocket: number, callback: Callback<ArrayBuffer>): void;
444
445  /**
446   * Unsubscribe the event reported when data is read from the socket.
447   *
448   * @param { 'sppRead' } type - Type of the spp read event to listen for.
449   * @param { number } clientSocket - Client socket ID, which is obtained by sppAccept or sppConnect.
450   * @param { Callback<ArrayBuffer> } callback - Callback used to listen for the spp read event.
451   * @syscap SystemCapability.Communication.Bluetooth.Core
452   * @since 8
453   * @deprecated since 9
454   * @useinstead ohos.bluetoothManager/bluetoothManager.off#event:sppRead
455   */
456  function off(type: 'sppRead', clientSocket: number, callback?: Callback<ArrayBuffer>): void;
457
458  /**
459   * Obtains the instance of profile.
460   *
461   * @param { ProfileId } profileId - The profile id..
462   * @returns { A2dpSourceProfile | HandsFreeAudioGatewayProfile } Returns instance of profile.
463   * @syscap SystemCapability.Communication.Bluetooth.Core
464   * @since 8
465   * @deprecated since 9
466   * @useinstead ohos.bluetoothManager/bluetoothManager.getProfileInstance
467   */
468  function getProfile(profileId: ProfileId): A2dpSourceProfile | HandsFreeAudioGatewayProfile;
469
470  /**
471   * Base interface of profile.
472   *
473   * @typedef BaseProfile
474   * @syscap SystemCapability.Communication.Bluetooth.Core
475   * @since 7
476   * @deprecated since 9
477   * @useinstead ohos.bluetoothManager/bluetoothManager.BaseProfile
478   */
479  interface BaseProfile {
480    /**
481     * Obtains the connected devices list of profile.
482     *
483     * @permission ohos.permission.USE_BLUETOOTH
484     * @returns { Array<string> } Returns the address of connected devices list.
485     * @syscap SystemCapability.Communication.Bluetooth.Core
486     * @since 8
487     * @deprecated since 9
488     * @useinstead ohos.bluetoothManager/bluetoothManager.BaseProfile#getConnectionDevices
489     */
490    getConnectionDevices(): Array<string>;
491
492    /**
493     * Obtains the profile state of device.
494     *
495     * @permission ohos.permission.USE_BLUETOOTH
496     * @param { string } device - The address of bluetooth device.
497     * @returns { ProfileConnectionState } Returns {@link ProfileConnectionState} of device.
498     * @syscap SystemCapability.Communication.Bluetooth.Core
499     * @since 8
500     * @deprecated since 9
501     * @useinstead ohos.bluetoothManager/bluetoothManager.BaseProfile#getDeviceState
502     */
503    getDeviceState(device: string): ProfileConnectionState;
504  }
505
506  /**
507   * Manager a2dp source profile.
508   *
509   * @typedef A2dpSourceProfile
510   * @syscap SystemCapability.Communication.Bluetooth.Core
511   * @since 7
512   * @deprecated since 9
513   * @useinstead ohos.bluetoothManager/bluetoothManager.A2dpSourceProfile
514   */
515  interface A2dpSourceProfile extends BaseProfile {
516    /**
517     * Connect to device with a2dp.
518     *
519     * @permission ohos.permission.DISCOVER_BLUETOOTH
520     * @param { string } device - The address of the remote device to connect.
521     * @returns { boolean } Returns {@code true} if the connect is in process; returns {@code false} otherwise.
522     * @syscap SystemCapability.Communication.Bluetooth.Core
523     * @since 8
524     * @deprecated since 9
525     * @useinstead ohos.bluetoothManager/bluetoothManager.A2dpSourceProfile#connect
526     */
527    connect(device: string): boolean;
528
529    /**
530     * Disconnect to device with a2dp.
531     *
532     * @permission ohos.permission.DISCOVER_BLUETOOTH
533     * @param { string } device - The address of the remote device to disconnect.
534     * @returns { boolean } Returns {@code true} if the disconnect is in process; returns {@code false} otherwise.
535     * @syscap SystemCapability.Communication.Bluetooth.Core
536     * @since 8
537     * @deprecated since 9
538     * @useinstead ohos.bluetoothManager/bluetoothManager.A2dpSourceProfile#disconnect
539     */
540    disconnect(device: string): boolean;
541
542    /**
543     * Subscribe the event reported when the profile connection state changes .
544     *
545     * @param { 'connectionStateChange' } type - Type of the profile connection state changes event to listen for .
546     * @param { Callback<StateChangeParam> } callback - Callback used to listen for event.
547     * @syscap SystemCapability.Communication.Bluetooth.Core
548     * @since 8
549     * @deprecated since 9
550     * @useinstead ohos.bluetoothManager/bluetoothManager.A2dpSourceProfile.on#event:connectionStateChange
551     */
552    on(type: 'connectionStateChange', callback: Callback<StateChangeParam>): void;
553
554    /**
555     * Unsubscribe the event reported when the profile connection state changes .
556     *
557     * @param { 'connectionStateChange' } type - Type of the profile connection state changes event to listen for .
558     * @param { Callback<StateChangeParam> } callback - Callback used to listen for event.
559     * @syscap SystemCapability.Communication.Bluetooth.Core
560     * @since 8
561     * @deprecated since 9
562     * @useinstead ohos.bluetoothManager/bluetoothManager.A2dpSourceProfile.off#event:connectionStateChange
563     */
564    off(type: 'connectionStateChange', callback?: Callback<StateChangeParam>): void;
565
566    /**
567     * Obtains the playing state of device.
568     *
569     * @param { string } device - The address of the remote device.
570     * @returns { PlayingState } Returns {@link PlayingState} of the remote device.
571     * @syscap SystemCapability.Communication.Bluetooth.Core
572     * @since 8
573     * @deprecated since 9
574     * @useinstead ohos.bluetoothManager/bluetoothManager.A2dpSourceProfile#getPlayingState
575     */
576    getPlayingState(device: string): PlayingState;
577  }
578
579  /**
580   * Manager handsfree AG profile.
581   *
582   * @typedef HandsFreeAudioGatewayProfile
583   * @syscap SystemCapability.Communication.Bluetooth.Core
584   * @since 7
585   * @deprecated since 9
586   * @useinstead ohos.bluetoothManager/bluetoothManager.HandsFreeAudioGatewayProfile
587   */
588  interface HandsFreeAudioGatewayProfile extends BaseProfile {
589    /**
590     * Connect to device with hfp.
591     *
592     * @permission ohos.permission.DISCOVER_BLUETOOTH
593     * @param { string } device - The address of the remote device to connect.
594     * @returns { boolean } Returns {@code true} if the connect is in process; returns {@code false} otherwise.
595     * @syscap SystemCapability.Communication.Bluetooth.Core
596     * @since 8
597     * @deprecated since 9
598     * @useinstead ohos.bluetoothManager/bluetoothManager.HandsFreeAudioGatewayProfile#connect
599     */
600    connect(device: string): boolean;
601
602    /**
603     * Disconnect to device with hfp.
604     *
605     * @permission ohos.permission.DISCOVER_BLUETOOTH
606     * @param { string } device - The address of the remote device to disconnect.
607     * @returns { boolean } Returns {@code true} if the disconnect is in process; returns {@code false} otherwise.
608     * @syscap SystemCapability.Communication.Bluetooth.Core
609     * @since 8
610     * @deprecated since 9
611     * @useinstead ohos.bluetoothManager/bluetoothManager.HandsFreeAudioGatewayProfile#disconnect
612     */
613    disconnect(device: string): boolean;
614
615    /**
616     * Subscribe the event reported when the profile connection state changes .
617     *
618     * @param { 'connectionStateChange' } type - Type of the profile connection state changes event to listen for .
619     * @param { Callback<StateChangeParam> } callback - Callback used to listen for event.
620     * @syscap SystemCapability.Communication.Bluetooth.Core
621     * @since 8
622     * @deprecated since 9
623     * @useinstead ohos.bluetoothManager/bluetoothManager.HandsFreeAudioGatewayProfile.on#event:connectionStateChange
624     */
625    on(type: 'connectionStateChange', callback: Callback<StateChangeParam>): void;
626
627    /**
628     * Unsubscribe the event reported when the profile connection state changes .
629     *
630     * @param { 'connectionStateChange' } type - Type of the profile connection state changes event to listen for .
631     * @param { Callback<StateChangeParam> } callback - Callback used to listen for event.
632     * @syscap SystemCapability.Communication.Bluetooth.Core
633     * @since 8
634     * @deprecated since 9
635     * @useinstead ohos.bluetoothManager/bluetoothManager.HandsFreeAudioGatewayProfile.off#event:connectionStateChange
636     */
637    off(type: 'connectionStateChange', callback?: Callback<StateChangeParam>): void;
638  }
639
640  /**
641   * Provides methods to operate or manage Bluetooth.
642   *
643   * @namespace BLE
644   * @syscap SystemCapability.Communication.Bluetooth.Core
645   * @since 7
646   * @deprecated since 9
647   * @useinstead ohos.bluetoothManager/bluetoothManager.BLE
648   */
649  namespace BLE {
650    /**
651     * create a JavaScript Gatt server instance.
652     *
653     * @returns { GattServer } Returns a JavaScript Gatt server instance {@code GattServer}.
654     * @syscap SystemCapability.Communication.Bluetooth.Core
655     * @since 7
656     * @deprecated since 9
657     * @useinstead ohos.bluetoothManager/bluetoothManager.BLE.createGattServer
658     */
659    function createGattServer(): GattServer;
660
661    /**
662     * create a JavaScript Gatt client device instance.
663     *
664     * @param { string } deviceId - The address of the remote device.
665     * @returns { GattClientDevice } Returns a JavaScript Gatt client device instance {@code GattClientDevice}.
666     * @syscap SystemCapability.Communication.Bluetooth.Core
667     * @since 7
668     * @deprecated since 9
669     * @useinstead ohos.bluetoothManager/bluetoothManager.BLE.createGattClientDevice
670     */
671    function createGattClientDevice(deviceId: string): GattClientDevice;
672
673    /**
674     * Obtains the list of devices in the connected status.
675     *
676     * @permission ohos.permission.USE_BLUETOOTH
677     * @returns { Array<string> } Returns the list of device address.
678     * @syscap SystemCapability.Communication.Bluetooth.Core
679     * @since 7
680     * @deprecated since 9
681     * @useinstead ohos.bluetoothManager/bluetoothManager.BLE.getConnectedBLEDevices
682     */
683    function getConnectedBLEDevices(): Array<string>;
684
685    /**
686     * Starts scanning for specified BLE devices with filters.
687     *
688     * @permission ohos.permission.DISCOVER_BLUETOOTH and ohos.permission.MANAGE_BLUETOOTH and ohos.permission.LOCATION
689     * @param { Array<ScanFilter> } filters - Indicates the list of filters used to filter out specified devices.
690     * If you do not want to use filter, set this parameter to {@code null}.
691     * @param { ScanOptions } options - Indicates the parameters for scanning and if the user does not assign a value, the default value will be used.
692     * {@link ScanOptions#interval} set to 0, {@link ScanOptions#dutyMode} set to {@link SCAN_MODE_LOW_POWER}
693     * and {@link ScanOptions#matchMode} set to {@link MATCH_MODE_AGGRESSIVE}.
694     * @syscap SystemCapability.Communication.Bluetooth.Core
695     * @since 7
696     * @deprecated since 9
697     * @useinstead ohos.bluetoothManager/bluetoothManager.BLE.startBLEScan
698     */
699    function startBLEScan(filters: Array<ScanFilter>, options?: ScanOptions): void;
700
701    /**
702     * Stops BLE scanning.
703     *
704     * @permission ohos.permission.DISCOVER_BLUETOOTH
705     * @syscap SystemCapability.Communication.Bluetooth.Core
706     * @since 7
707     * @deprecated since 9
708     * @useinstead ohos.bluetoothManager/bluetoothManager.BLE.stopBLEScan
709     */
710    function stopBLEScan(): void;
711
712    /**
713     * Subscribe BLE scan result.
714     *
715     * @permission ohos.permission.USE_BLUETOOTH
716     * @param { 'BLEDeviceFind' } type - Type of the scan result event to listen for.
717     * @param { Callback<Array<ScanResult>> } callback - Callback used to listen for the scan result event.
718     * @syscap SystemCapability.Communication.Bluetooth.Core
719     * @since 7
720     * @deprecated since 9
721     * @useinstead ohos.bluetoothManager/bluetoothManager.BLE.on#event:BLEDeviceFind
722     */
723    function on(type: 'BLEDeviceFind', callback: Callback<Array<ScanResult>>): void;
724
725    /**
726     * Unsubscribe BLE scan result.
727     *
728     * @permission ohos.permission.USE_BLUETOOTH
729     * @param { 'BLEDeviceFind' } type - Type of the scan result event to listen for.
730     * @param { Callback<Array<ScanResult>> } callback - Callback used to listen for the scan result event.
731     * @syscap SystemCapability.Communication.Bluetooth.Core
732     * @since 7
733     * @deprecated since 9
734     * @useinstead ohos.bluetoothManager/bluetoothManager.BLE.off#event:BLEDeviceFind
735     */
736    function off(type: 'BLEDeviceFind', callback?: Callback<Array<ScanResult>>): void;
737  }
738
739  /**
740   * Manages GATT server. Before calling an Gatt server method, you must use {@link createGattServer} to create an GattServer instance.
741   *
742   * @typedef GattServer
743   * @syscap SystemCapability.Communication.Bluetooth.Core
744   * @since 7
745   * @deprecated since 9
746   * @useinstead ohos.bluetoothManager/bluetoothManager.GattServer
747   */
748  interface GattServer {
749    /**
750     * Starts BLE advertising.
751     *
752     * @permission ohos.permission.DISCOVER_BLUETOOTH
753     * @param { AdvertiseSetting } setting - Indicates the settings for BLE advertising.
754     * If you need to use the default value, set this parameter to {@code null}.
755     * @param { AdvertiseData } advData - Indicates the advertising data.
756     * @param { AdvertiseData } advResponse - Indicates the scan response associated with the advertising data.
757     * @syscap SystemCapability.Communication.Bluetooth.Core
758     * @since 7
759     * @deprecated since 9
760     * @useinstead ohos.bluetoothManager/bluetoothManager.GattServer#startAdvertising
761     */
762    startAdvertising(setting: AdvertiseSetting, advData: AdvertiseData, advResponse?: AdvertiseData): void;
763
764    /**
765     * Stops BLE advertising.
766     *
767     * @permission ohos.permission.DISCOVER_BLUETOOTH
768     * @syscap SystemCapability.Communication.Bluetooth.Core
769     * @since 7
770     * @deprecated since 9
771     * @useinstead ohos.bluetoothManager/bluetoothManager.GattServer#stopAdvertising
772     */
773    stopAdvertising(): void;
774
775    /**
776     * Adds a specified service to be hosted.
777     * <p>The added service and its characteristics are provided by the local device.
778     *
779     * @permission ohos.permission.USE_BLUETOOTH
780     * @param { GattService } service - Indicates the service to add.
781     * @returns { boolean } Returns {@code true} if the service is added; returns {@code false} otherwise.
782     * @syscap SystemCapability.Communication.Bluetooth.Core
783     * @since 7
784     * @deprecated since 9
785     * @useinstead ohos.bluetoothManager/bluetoothManager.GattServer#addService
786     */
787    addService(service: GattService): boolean;
788
789    /**
790     * Removes a specified service from the list of GATT services provided by this device.
791     *
792     * @permission ohos.permission.USE_BLUETOOTH
793     * @param { string } serviceUuid - Indicates the UUID of the service to remove.
794     * @returns { boolean } Returns {@code true} if the service is removed; returns {@code false} otherwise.
795     * @syscap SystemCapability.Communication.Bluetooth.Core
796     * @since 7
797     * @deprecated since 9
798     * @useinstead ohos.bluetoothManager/bluetoothManager.GattServer#removeService
799     */
800    removeService(serviceUuid: string): boolean;
801
802    /**
803     * Closes this {@code GattServer} object and unregisters its callbacks.
804     *
805     * @permission ohos.permission.USE_BLUETOOTH
806     * @syscap SystemCapability.Communication.Bluetooth.Core
807     * @since 7
808     * @deprecated since 9
809     * @useinstead ohos.bluetoothManager/bluetoothManager.GattServer#close
810     */
811    close(): void;
812
813    /**
814     * Sends a notification of a change in a specified local characteristic.
815     * <p>This method should be called for every BLE peripheral device that has requested notifications.
816     *
817     * @permission ohos.permission.USE_BLUETOOTH
818     * @param { string } deviceId - Indicates the address of the BLE peripheral device to receive the notification.
819     * @param { NotifyCharacteristic } notifyCharacteristic - Indicates the local characteristic that has changed.
820     * @returns { boolean } Returns {@code true} if the notification is sent successfully; returns {@code false} otherwise.
821     * @syscap SystemCapability.Communication.Bluetooth.Core
822     * @since 7
823     * @deprecated since 9
824     * @useinstead ohos.bluetoothManager/bluetoothManager.GattServer#notifyCharacteristicChanged
825     */
826    notifyCharacteristicChanged(deviceId: string, notifyCharacteristic: NotifyCharacteristic): boolean;
827
828    /**
829     * Sends a response to a specified read or write request to a given BLE peripheral device.
830     *
831     * @permission ohos.permission.USE_BLUETOOTH
832     * @param { ServerResponse } serverResponse - Indicates the response parameters {@link ServerResponse}.
833     * @returns { boolean } Returns {@code true} if the response is sent successfully; returns {@code false} otherwise.
834     * @syscap SystemCapability.Communication.Bluetooth.Core
835     * @since 7
836     * @deprecated since 9
837     * @useinstead ohos.bluetoothManager/bluetoothManager.GattServer#sendResponse
838     */
839    sendResponse(serverResponse: ServerResponse): boolean;
840
841    /**
842     * Subscribe characteristic read event.
843     *
844     * @permission ohos.permission.USE_BLUETOOTH
845     * @param { 'characteristicRead' } type - Type of the characteristic read event to listen for.
846     * @param { Callback<CharacteristicReadReq> } callback - Callback used to listen for the characteristic read event.
847     * @syscap SystemCapability.Communication.Bluetooth.Core
848     * @since 7
849     * @deprecated since 9
850     * @useinstead ohos.bluetoothManager/bluetoothManager.GattServer.on#event:characteristicRead
851     */
852    on(type: 'characteristicRead', callback: Callback<CharacteristicReadReq>): void;
853
854    /**
855     * Unsubscribe characteristic read event.
856     *
857     * @permission ohos.permission.USE_BLUETOOTH
858     * @param { 'characteristicRead' } type - Type of the characteristic read event to listen for.
859     * @param { Callback<CharacteristicReadReq> } callback - Callback used to listen for the characteristic read event.
860     * @syscap SystemCapability.Communication.Bluetooth.Core
861     * @since 7
862     * @deprecated since 9
863     * @useinstead ohos.bluetoothManager/bluetoothManager.GattServer.off#event:characteristicRead
864     */
865    off(type: 'characteristicRead', callback?: Callback<CharacteristicReadReq>): void;
866
867    /**
868     * Subscribe characteristic write event.
869     *
870     * @permission ohos.permission.USE_BLUETOOTH
871     * @param { 'characteristicWrite' } type - Type of the characteristic write event to listen for.
872     * @param { Callback<CharacteristicWriteReq> } callback - Callback used to listen for the characteristic write event.
873     * @syscap SystemCapability.Communication.Bluetooth.Core
874     * @since 7
875     * @deprecated since 9
876     * @useinstead ohos.bluetoothManager/bluetoothManager.GattServer.on#event:characteristicWrite
877     */
878    on(type: 'characteristicWrite', callback: Callback<CharacteristicWriteReq>): void;
879
880    /**
881     * Unsubscribe characteristic write event.
882     *
883     * @permission ohos.permission.USE_BLUETOOTH
884     * @param { 'characteristicWrite' } type - Type of the characteristic write event to listen for.
885     * @param { Callback<CharacteristicWriteReq> } callback - Callback used to listen for the characteristic write event.
886     * @syscap SystemCapability.Communication.Bluetooth.Core
887     * @since 7
888     * @deprecated since 9
889     * @useinstead ohos.bluetoothManager/bluetoothManager.GattServer.off#event:characteristicWrite
890     */
891    off(type: 'characteristicWrite', callback?: Callback<CharacteristicWriteReq>): void;
892
893    /**
894     * Subscribe descriptor read event.
895     *
896     * @permission ohos.permission.USE_BLUETOOTH
897     * @param { 'descriptorRead' } type - Type of the descriptor read event to listen for.
898     * @param { Callback<DescriptorReadReq> } callback - Callback used to listen for the descriptor read event.
899     * @syscap SystemCapability.Communication.Bluetooth.Core
900     * @since 7
901     * @deprecated since 9
902     * @useinstead ohos.bluetoothManager/bluetoothManager.GattServer.on#event:descriptorRead
903     */
904    on(type: 'descriptorRead', callback: Callback<DescriptorReadReq>): void;
905
906    /**
907     * Unsubscribe descriptor read event.
908     *
909     * @permission ohos.permission.USE_BLUETOOTH
910     * @param { 'descriptorRead' } type - Type of the descriptor read event to listen for.
911     * @param { Callback<DescriptorReadReq> } callback - Callback used to listen for the descriptor read event.
912     * @syscap SystemCapability.Communication.Bluetooth.Core
913     * @since 7
914     * @deprecated since 9
915     * @useinstead ohos.bluetoothManager/bluetoothManager.GattServer.off#event:descriptorRead
916     */
917    off(type: 'descriptorRead', callback?: Callback<DescriptorReadReq>): void;
918
919    /**
920     * Subscribe descriptor write event.
921     *
922     * @permission ohos.permission.USE_BLUETOOTH
923     * @param { 'descriptorWrite' } type - Type of the descriptor write event to listen for.
924     * @param { Callback<DescriptorWriteReq> } callback - Callback used to listen for the descriptor write event.
925     * @syscap SystemCapability.Communication.Bluetooth.Core
926     * @since 7
927     * @deprecated since 9
928     * @useinstead ohos.bluetoothManager/bluetoothManager.GattServer.on#event:descriptorWrite
929     */
930    on(type: 'descriptorWrite', callback: Callback<DescriptorWriteReq>): void;
931
932    /**
933     * Unsubscribe descriptor write event.
934     *
935     * @permission ohos.permission.USE_BLUETOOTH
936     * @param { 'descriptorWrite' } type - Type of the descriptor write event to listen for.
937     * @param { Callback<DescriptorWriteReq> } callback - Callback used to listen for the descriptor write event.
938     * @syscap SystemCapability.Communication.Bluetooth.Core
939     * @since 7
940     * @deprecated since 9
941     * @useinstead ohos.bluetoothManager/bluetoothManager.GattServer.off#event:descriptorWrite
942     */
943    off(type: 'descriptorWrite', callback?: Callback<DescriptorWriteReq>): void;
944
945    /**
946     * Subscribe server connection state changed event.
947     *
948     * @permission ohos.permission.USE_BLUETOOTH
949     * @param { 'connectStateChange' } type - Type of the connection state changed event to listen for.
950     * @param { Callback<BLEConnectChangedState> } callback - Callback used to listen for the connection state changed event.
951     * @syscap SystemCapability.Communication.Bluetooth.Core
952     * @since 7
953     * @deprecated since 9
954     * @useinstead ohos.bluetoothManager/bluetoothManager.GattServer.on#event:connectStateChange
955     */
956    on(type: 'connectStateChange', callback: Callback<BLEConnectChangedState>): void;
957
958    /**
959     * Unsubscribe server connection state changed event.
960     *
961     * @permission ohos.permission.USE_BLUETOOTH
962     * @param { 'connectStateChange' } type - Type of the connection state changed event to listen for.
963     * @param { Callback<BLEConnectChangedState> } callback - Callback used to listen for the connection state changed event.
964     * @syscap SystemCapability.Communication.Bluetooth.Core
965     * @since 7
966     * @deprecated since 9
967     * @useinstead ohos.bluetoothManager/bluetoothManager.GattServer.off#event:connectStateChange
968     */
969    off(type: 'connectStateChange', callback?: Callback<BLEConnectChangedState>): void;
970  }
971
972  /**
973   * Manages GATT client. Before calling an Gatt client method, you must use {@link createGattClientDevice} to create an GattClientDevice instance.
974   *
975   * @typedef GattClientDevice
976   * @syscap SystemCapability.Communication.Bluetooth.Core
977   * @since 7
978   * @deprecated since 9
979   * @useinstead ohos.bluetoothManager/bluetoothManager.GattClientDevice
980   */
981  interface GattClientDevice {
982    /**
983     * Connects to a BLE peripheral device.
984     * <p>The 'BLEConnectionStateChange' event is subscribed to return the connection state.
985     *
986     * @permission ohos.permission.USE_BLUETOOTH
987     * @returns { boolean } Returns {@code true} if the connection process starts; returns {@code false} otherwise.
988     * @syscap SystemCapability.Communication.Bluetooth.Core
989     * @since 7
990     * @deprecated since 9
991     * @useinstead ohos.bluetoothManager/bluetoothManager.GattClientDevice#connect
992     */
993    connect(): boolean;
994
995    /**
996     * Disconnects from or stops an ongoing connection to a BLE peripheral device.
997     *
998     * @permission ohos.permission.USE_BLUETOOTH
999     * @returns { boolean } Returns {@code true} if the disconnection process starts; returns {@code false} otherwise.
1000     * @syscap SystemCapability.Communication.Bluetooth.Core
1001     * @since 7
1002     * @deprecated since 9
1003     * @useinstead ohos.bluetoothManager/bluetoothManager.GattClientDevice#disconnect
1004     */
1005    disconnect(): boolean;
1006
1007    /**
1008     * Disables a BLE peripheral device.
1009     * <p> This method unregisters the device and clears the registered callbacks and handles.
1010     *
1011     * @permission ohos.permission.USE_BLUETOOTH
1012     * @returns { boolean } Returns {@code true} if the the device is disabled; returns {@code false} otherwise.
1013     * @syscap SystemCapability.Communication.Bluetooth.Core
1014     * @since 7
1015     * @deprecated since 9
1016     * @useinstead ohos.bluetoothManager/bluetoothManager.GattClientDevice#close
1017     */
1018    close(): boolean;
1019
1020    /**
1021     * Obtains the name of BLE peripheral device.
1022     *
1023     * @permission ohos.permission.USE_BLUETOOTH
1024     * @param { AsyncCallback<string> } callback - Callback used to obtain the device name.
1025     * @syscap SystemCapability.Communication.Bluetooth.Core
1026     * @since 7
1027     * @deprecated since 9
1028     * @useinstead ohos.bluetoothManager/bluetoothManager.GattClientDevice#getDeviceName
1029     */
1030    getDeviceName(callback: AsyncCallback<string>): void;
1031
1032    /**
1033     * Obtains the name of BLE peripheral device.
1034     *
1035     * @permission ohos.permission.USE_BLUETOOTH
1036     * @returns { Promise<string> } Returns a string representation of the name if obtained;
1037     * returns {@code null} if the name fails to be obtained or the name does not exist.
1038     * @syscap SystemCapability.Communication.Bluetooth.Core
1039     * @since 7
1040     * @deprecated since 9
1041     * @useinstead ohos.bluetoothManager/bluetoothManager.GattClientDevice#getDeviceName
1042     */
1043    getDeviceName(): Promise<string>;
1044
1045    /**
1046     * Starts discovering services.
1047     *
1048     * @permission ohos.permission.USE_BLUETOOTH
1049     * @param { AsyncCallback<Array<GattService>> } callback - Callback used to catch the services.
1050     * @syscap SystemCapability.Communication.Bluetooth.Core
1051     * @since 7
1052     * @deprecated since 9
1053     * @useinstead ohos.bluetoothManager/bluetoothManager.GattClientDevice#getServices
1054     */
1055    getServices(callback: AsyncCallback<Array<GattService>>): void;
1056
1057    /**
1058     * Starts discovering services.
1059     *
1060     * @permission ohos.permission.USE_BLUETOOTH
1061     * @returns { Promise<Array<GattService>> } Returns the list of services {@link GattService} of the BLE peripheral device.
1062     * @syscap SystemCapability.Communication.Bluetooth.Core
1063     * @since 7
1064     * @deprecated since 9
1065     * @useinstead ohos.bluetoothManager/bluetoothManager.GattClientDevice#getServices
1066     */
1067    getServices(): Promise<Array<GattService>>;
1068
1069    /**
1070     * Reads the characteristic of a BLE peripheral device.
1071     *
1072     * @permission ohos.permission.USE_BLUETOOTH
1073     * @param { BLECharacteristic } characteristic - Indicates the characteristic to read.
1074     * @param { AsyncCallback<BLECharacteristic> } callback - Callback invoked to return the characteristic value read.
1075     * @syscap SystemCapability.Communication.Bluetooth.Core
1076     * @since 7
1077     * @deprecated since 9
1078     * @useinstead ohos.bluetoothManager/bluetoothManager.GattClientDevice#readCharacteristicValue
1079     */
1080    readCharacteristicValue(characteristic: BLECharacteristic, callback: AsyncCallback<BLECharacteristic>): void;
1081
1082    /**
1083     * Reads the characteristic of a BLE peripheral device.
1084     *
1085     * @permission ohos.permission.USE_BLUETOOTH
1086     * @param { BLECharacteristic } characteristic - Indicates the characteristic to read.
1087     * @returns { Promise<BLECharacteristic> } - Promise used to return the characteristic value read.
1088     * @syscap SystemCapability.Communication.Bluetooth.Core
1089     * @since 7
1090     * @deprecated since 9
1091     * @useinstead ohos.bluetoothManager/bluetoothManager.GattClientDevice#readCharacteristicValue
1092     */
1093    readCharacteristicValue(characteristic: BLECharacteristic): Promise<BLECharacteristic>;
1094
1095    /**
1096     * Reads the descriptor of a BLE peripheral device.
1097     *
1098     * @permission ohos.permission.USE_BLUETOOTH
1099     * @param { BLEDescriptor } descriptor - Indicates the descriptor to read.
1100     * @param { AsyncCallback<BLEDescriptor> } callback - Callback invoked to return the descriptor read.
1101     * @syscap SystemCapability.Communication.Bluetooth.Core
1102     * @since 7
1103     * @deprecated since 9
1104     * @useinstead ohos.bluetoothManager/bluetoothManager.GattClientDevice#readDescriptorValue
1105     */
1106    readDescriptorValue(descriptor: BLEDescriptor, callback: AsyncCallback<BLEDescriptor>): void;
1107
1108    /**
1109     * Reads the descriptor of a BLE peripheral device.
1110     *
1111     * @permission ohos.permission.USE_BLUETOOTH
1112     * @param { BLEDescriptor } descriptor - Indicates the descriptor to read.
1113     * @returns { Promise<BLEDescriptor> } - Promise used to return the descriptor read.
1114     * @syscap SystemCapability.Communication.Bluetooth.Core
1115     * @since 7
1116     * @deprecated since 9
1117     * @useinstead ohos.bluetoothManager/bluetoothManager.GattClientDevice#readDescriptorValue
1118     */
1119    readDescriptorValue(descriptor: BLEDescriptor): Promise<BLEDescriptor>;
1120
1121    /**
1122     * Writes the characteristic of a BLE peripheral device.
1123     *
1124     * @permission ohos.permission.USE_BLUETOOTH
1125     * @param { BLECharacteristic } characteristic - Indicates the characteristic to write.
1126     * @returns { boolean } Returns {@code true} if the characteristic is written successfully; returns {@code false} otherwise.
1127     * @syscap SystemCapability.Communication.Bluetooth.Core
1128     * @since 7
1129     * @deprecated since 9
1130     * @useinstead ohos.bluetoothManager/bluetoothManager.GattClientDevice#writeCharacteristicValue
1131     */
1132    writeCharacteristicValue(characteristic: BLECharacteristic): boolean;
1133
1134    /**
1135     * Writes the descriptor of a BLE peripheral device.
1136     *
1137     * @permission ohos.permission.USE_BLUETOOTH
1138     * @param { BLEDescriptor } descriptor - Indicates the descriptor to write.
1139     * @returns { boolean } Returns {@code true} if the descriptor is written successfully; returns {@code false} otherwise.
1140     * @syscap SystemCapability.Communication.Bluetooth.Core
1141     * @since 7
1142     * @deprecated since 9
1143     * @useinstead ohos.bluetoothManager/bluetoothManager.GattClientDevice#writeDescriptorValue
1144     */
1145    writeDescriptorValue(descriptor: BLEDescriptor): boolean;
1146
1147    /**
1148     * Get the RSSI value of this BLE peripheral device.
1149     *
1150     * @permission ohos.permission.USE_BLUETOOTH
1151     * @param { AsyncCallback<number> } callback - Callback invoked to return the RSSI, in dBm.
1152     * @syscap SystemCapability.Communication.Bluetooth.Core
1153     * @since 7
1154     * @deprecated since 9
1155     * @useinstead ohos.bluetoothManager/bluetoothManager.GattClientDevice#getRssiValue
1156     */
1157    getRssiValue(callback: AsyncCallback<number>): void;
1158
1159    /**
1160     * Get the RSSI value of this BLE peripheral device.
1161     *
1162     * @permission ohos.permission.USE_BLUETOOTH
1163     * @returns { Promise<number> } Returns the RSSI value.
1164     * @syscap SystemCapability.Communication.Bluetooth.Core
1165     * @since 7
1166     * @deprecated since 9
1167     * @useinstead ohos.bluetoothManager/bluetoothManager.GattClientDevice#getRssiValue
1168     */
1169    getRssiValue(): Promise<number>;
1170
1171    /**
1172     * Set the mtu size of a BLE peripheral device.
1173     *
1174     * @permission ohos.permission.USE_BLUETOOTH
1175     * @param { number } mtu - The maximum transmission unit.
1176     * @returns { boolean } Returns {@code true} if the set mtu is successfully; returns {@code false} otherwise.
1177     * @syscap SystemCapability.Communication.Bluetooth.Core
1178     * @since 7
1179     * @deprecated since 9
1180     * @useinstead ohos.bluetoothManager/bluetoothManager.GattClientDevice#setBLEMtuSize
1181     */
1182    setBLEMtuSize(mtu: number): boolean;
1183
1184    /**
1185     * Enables or disables notification of a characteristic when value changed.
1186     *
1187     * @permission ohos.permission.USE_BLUETOOTH
1188     * @param { BLECharacteristic } characteristic - BLE characteristic to listen for.
1189     * @param { boolean } enable - Specifies whether to enable notification of the characteristic. The value {@code true} indicates
1190     * that notification is enabled, and the value {@code false} indicates that notification is disabled.
1191     * @returns { boolean } Returns {@code true} if notification of the characteristic is enabled or disabled;
1192     * returns {@code false} otherwise.
1193     * @syscap SystemCapability.Communication.Bluetooth.Core
1194     * @since 7
1195     * @deprecated since 9
1196     * @useinstead ohos.bluetoothManager/bluetoothManager.GattClientDevice#setNotifyCharacteristicChanged
1197     */
1198    setNotifyCharacteristicChanged(characteristic: BLECharacteristic, enable: boolean): boolean;
1199
1200    /**
1201     * Subscribe characteristic value changed event.
1202     *
1203     * @permission ohos.permission.USE_BLUETOOTH
1204     * @param { 'BLECharacteristicChange' } type - Type of the characteristic value changed event to listen for.
1205     * @param { Callback<BLECharacteristic> } callback - Callback used to listen for the characteristic value changed event.
1206     * @syscap SystemCapability.Communication.Bluetooth.Core
1207     * @since 7
1208     * @deprecated since 9
1209     * @useinstead ohos.bluetoothManager/bluetoothManager.GattClientDevice.on#event:BLECharacteristicChange
1210     */
1211    on(type: 'BLECharacteristicChange', callback: Callback<BLECharacteristic>): void;
1212
1213    /**
1214     * Unsubscribe characteristic value changed event.
1215     *
1216     * @permission ohos.permission.USE_BLUETOOTH
1217     * @param { 'BLECharacteristicChange' } type - Type of the characteristic value changed event to listen for.
1218     * @param { Callback<BLECharacteristic> } callback - Callback used to listen for the characteristic value changed event.
1219     * @syscap SystemCapability.Communication.Bluetooth.Core
1220     * @since 7
1221     * @deprecated since 9
1222     * @useinstead ohos.bluetoothManager/bluetoothManager.GattClientDevice.off#event:BLECharacteristicChange
1223     */
1224    off(type: 'BLECharacteristicChange', callback?: Callback<BLECharacteristic>): void;
1225
1226    /**
1227     * Subscribe client connection state changed event.
1228     *
1229     * @permission ohos.permission.USE_BLUETOOTH
1230     * @param { 'BLEConnectionStateChange' } type - Type of the connection state changed event to listen for.
1231     * @param { Callback<BLEConnectChangedState> } callback - Callback used to listen for the connection state changed event.
1232     * @syscap SystemCapability.Communication.Bluetooth.Core
1233     * @since 7
1234     * @deprecated since 9
1235     * @useinstead ohos.bluetoothManager/bluetoothManager.GattClientDevice.on#event:BLEConnectionStateChange
1236     */
1237    on(type: 'BLEConnectionStateChange', callback: Callback<BLEConnectChangedState>): void;
1238
1239    /**
1240     * Unsubscribe client connection state changed event.
1241     *
1242     * @permission ohos.permission.USE_BLUETOOTH
1243     * @param { 'BLEConnectionStateChange' } type - Type of the connection state changed event to listen for.
1244     * @param { Callback<BLEConnectChangedState> } callback - Callback used to listen for the connection state changed event.
1245     * @syscap SystemCapability.Communication.Bluetooth.Core
1246     * @since 7
1247     * @deprecated since 9
1248     * @useinstead ohos.bluetoothManager/bluetoothManager.GattClientDevice.off#event:BLEConnectionStateChange
1249     */
1250    off(type: 'BLEConnectionStateChange', callback?: Callback<BLEConnectChangedState>): void;
1251  }
1252
1253  /**
1254   * Describes the Gatt service.
1255   *
1256   * @typedef GattService
1257   * @syscap SystemCapability.Communication.Bluetooth.Core
1258   * @since 7
1259   * @deprecated since 9
1260   * @useinstead ohos.bluetoothManager/bluetoothManager.GattService
1261   */
1262  interface GattService {
1263    /**
1264     * The UUID of a GattService instance
1265     *
1266     * @syscap SystemCapability.Communication.Bluetooth.Core
1267     * @since 7
1268     * @deprecated since 9
1269     */
1270    serviceUuid: string;
1271    /**
1272     * Indicates whether the GattService instance is primary or secondary.
1273     *
1274     * @syscap SystemCapability.Communication.Bluetooth.Core
1275     * @since 7
1276     * @deprecated since 9
1277     */
1278    isPrimary: boolean;
1279    /**
1280     * The {@link BLECharacteristic} list belongs to this GattService instance
1281     *
1282     * @syscap SystemCapability.Communication.Bluetooth.Core
1283     * @since 7
1284     * @deprecated since 9
1285     */
1286    characteristics: Array<BLECharacteristic>;
1287    /**
1288     * The list of GATT services contained in the service
1289     *
1290     * @syscap SystemCapability.Communication.Bluetooth.Core
1291     * @since 7
1292     * @deprecated since 9
1293     */
1294    includeServices?: Array<GattService>;
1295  }
1296
1297  /**
1298   * Describes the Gatt characteristic.
1299   *
1300   * @typedef BLECharacteristic
1301   * @syscap SystemCapability.Communication.Bluetooth.Core
1302   * @since 7
1303   * @deprecated since 9
1304   * @useinstead ohos.bluetoothManager/bluetoothManager.BLECharacteristic
1305   */
1306  interface BLECharacteristic {
1307    /**
1308     * The UUID of the {@link GattService} instance to which the characteristic belongs
1309     *
1310     * @syscap SystemCapability.Communication.Bluetooth.Core
1311     * @since 7
1312     * @deprecated since 9
1313     */
1314    serviceUuid: string;
1315    /**
1316     * The UUID of a BLECharacteristic instance
1317     *
1318     * @syscap SystemCapability.Communication.Bluetooth.Core
1319     * @since 7
1320     * @deprecated since 9
1321     */
1322    characteristicUuid: string;
1323    /**
1324     * The value of a BLECharacteristic instance
1325     *
1326     * @syscap SystemCapability.Communication.Bluetooth.Core
1327     * @since 7
1328     * @deprecated since 9
1329     */
1330    characteristicValue: ArrayBuffer;
1331    /**
1332     * The list of {@link BLEDescriptor} contained in the characteristic
1333     *
1334     * @syscap SystemCapability.Communication.Bluetooth.Core
1335     * @since 7
1336     * @deprecated since 9
1337     */
1338    descriptors: Array<BLEDescriptor>;
1339  }
1340
1341  /**
1342   * Describes the Gatt descriptor.
1343   *
1344   * @typedef BLEDescriptor
1345   * @syscap SystemCapability.Communication.Bluetooth.Core
1346   * @since 7
1347   * @deprecated since 9
1348   * @useinstead ohos.bluetoothManager/bluetoothManager.BLEDescriptor
1349   */
1350  interface BLEDescriptor {
1351    /**
1352     * The UUID of the {@link GattService} instance to which the descriptor belongs
1353     *
1354     * @syscap SystemCapability.Communication.Bluetooth.Core
1355     * @since 7
1356     * @deprecated since 9
1357     */
1358    serviceUuid: string;
1359    /**
1360     * The UUID of the {@link BLECharacteristic} instance to which the descriptor belongs
1361     *
1362     * @syscap SystemCapability.Communication.Bluetooth.Core
1363     * @since 7
1364     * @deprecated since 9
1365     */
1366    characteristicUuid: string;
1367    /**
1368     * The UUID of the BLEDescriptor instance
1369     *
1370     * @syscap SystemCapability.Communication.Bluetooth.Core
1371     * @since 7
1372     * @deprecated since 9
1373     */
1374    descriptorUuid: string;
1375    /**
1376     * The value of the BLEDescriptor instance
1377     *
1378     * @syscap SystemCapability.Communication.Bluetooth.Core
1379     * @since 7
1380     * @deprecated since 9
1381     */
1382    descriptorValue: ArrayBuffer;
1383  }
1384
1385  /**
1386   * Describes the value of the indication or notification sent by the Gatt server.
1387   *
1388   * @typedef NotifyCharacteristic
1389   * @syscap SystemCapability.Communication.Bluetooth.Core
1390   * @since 7
1391   * @deprecated since 9
1392   * @useinstead ohos.bluetoothManager/bluetoothManager.NotifyCharacteristic
1393   */
1394  interface NotifyCharacteristic {
1395    /**
1396     * The UUID of the {@link GattService} instance to which the characteristic belongs
1397     *
1398     * @syscap SystemCapability.Communication.Bluetooth.Core
1399     * @since 7
1400     * @deprecated since 9
1401     */
1402    serviceUuid: string;
1403    /**
1404     * The UUID of a NotifyCharacteristic instance
1405     *
1406     * @syscap SystemCapability.Communication.Bluetooth.Core
1407     * @since 7
1408     * @deprecated since 9
1409     */
1410    characteristicUuid: string;
1411    /**
1412     * The value of a NotifyCharacteristic instance
1413     *
1414     * @syscap SystemCapability.Communication.Bluetooth.Core
1415     * @since 7
1416     * @deprecated since 9
1417     */
1418    characteristicValue: ArrayBuffer;
1419    /**
1420     * Specifies whether to request confirmation from the BLE peripheral device (indication) or
1421     * send a notification. Value {@code true} indicates the former and {@code false} indicates the latter.
1422     *
1423     * @syscap SystemCapability.Communication.Bluetooth.Core
1424     * @since 7
1425     * @deprecated since 9
1426     */
1427    confirm: boolean;
1428  }
1429
1430  /**
1431   * Describes the parameters of the Gatt client's characteristic read request.
1432   *
1433   * @typedef CharacteristicReadReq
1434   * @syscap SystemCapability.Communication.Bluetooth.Core
1435   * @since 7
1436   * @deprecated since 9
1437   * @useinstead ohos.bluetoothManager/bluetoothManager.CharacteristicReadRequest
1438   */
1439  interface CharacteristicReadReq {
1440    /**
1441     * Indicates the address of the client that initiates the read request
1442     *
1443     * @syscap SystemCapability.Communication.Bluetooth.Core
1444     * @since 7
1445     * @deprecated since 9
1446     */
1447    deviceId: string;
1448    /**
1449     * The Id of the read request
1450     *
1451     * @syscap SystemCapability.Communication.Bluetooth.Core
1452     * @since 7
1453     * @deprecated since 9
1454     */
1455    transId: number;
1456    /**
1457     * Indicates the byte offset of the start position for reading characteristic value
1458     *
1459     * @syscap SystemCapability.Communication.Bluetooth.Core
1460     * @since 7
1461     * @deprecated since 9
1462     */
1463    offset: number;
1464    /**
1465     * The UUID of a CharacteristicReadReq instance
1466     *
1467     * @syscap SystemCapability.Communication.Bluetooth.Core
1468     * @since 7
1469     * @deprecated since 9
1470     */
1471    characteristicUuid: string;
1472    /**
1473     * The UUID of the service to which the characteristic belongs
1474     *
1475     * @syscap SystemCapability.Communication.Bluetooth.Core
1476     * @since 7
1477     * @deprecated since 9
1478     */
1479    serviceUuid: string;
1480  }
1481
1482  /**
1483   * Describes the parameters of the of the Gatt client's characteristic write request.
1484   *
1485   * @typedef CharacteristicWriteReq
1486   * @syscap SystemCapability.Communication.Bluetooth.Core
1487   * @since 7
1488   * @deprecated since 9
1489   * @useinstead ohos.bluetoothManager/bluetoothManager.CharacteristicWriteRequest
1490   */
1491  interface CharacteristicWriteReq {
1492    /**
1493     * Indicates the address of the client that initiates the write request
1494     *
1495     * @syscap SystemCapability.Communication.Bluetooth.Core
1496     * @since 7
1497     * @deprecated since 9
1498     */
1499    deviceId: string;
1500    /**
1501     * The Id of the write request
1502     *
1503     * @syscap SystemCapability.Communication.Bluetooth.Core
1504     * @since 7
1505     * @deprecated since 9
1506     */
1507    transId: number;
1508    /**
1509     * Indicates the byte offset of the start position for writing characteristic value
1510     *
1511     * @syscap SystemCapability.Communication.Bluetooth.Core
1512     * @since 7
1513     * @deprecated since 9
1514     */
1515    offset: number;
1516    /**
1517     * Whether this request should be pending for later operation
1518     *
1519     * @syscap SystemCapability.Communication.Bluetooth.Core
1520     * @since 7
1521     * @deprecated since 9
1522     */
1523    isPrep: boolean;
1524    /**
1525     * Whether the remote client need a response
1526     *
1527     * @syscap SystemCapability.Communication.Bluetooth.Core
1528     * @since 7
1529     * @deprecated since 9
1530     */
1531    needRsp: boolean;
1532    /**
1533     * Indicates the value to be written
1534     *
1535     * @syscap SystemCapability.Communication.Bluetooth.Core
1536     * @since 7
1537     * @deprecated since 9
1538     */
1539    value: ArrayBuffer;
1540    /**
1541     * The UUID of a CharacteristicWriteReq instance
1542     *
1543     * @syscap SystemCapability.Communication.Bluetooth.Core
1544     * @since 7
1545     * @deprecated since 9
1546     */
1547    characteristicUuid: string;
1548    /**
1549     * The UUID of the service to which the characteristic belongs
1550     *
1551     * @syscap SystemCapability.Communication.Bluetooth.Core
1552     * @since 7
1553     * @deprecated since 9
1554     */
1555    serviceUuid: string;
1556  }
1557
1558  /**
1559   * Describes the parameters of the Gatt client's descriptor read request.
1560   *
1561   * @typedef DescriptorReadReq
1562   * @syscap SystemCapability.Communication.Bluetooth.Core
1563   * @since 7
1564   * @deprecated since 9
1565   * @useinstead ohos.bluetoothManager/bluetoothManager.DescriptorReadRequest
1566   */
1567  interface DescriptorReadReq {
1568    /**
1569     * Indicates the address of the client that initiates the read request
1570     *
1571     * @syscap SystemCapability.Communication.Bluetooth.Core
1572     * @since 7
1573     * @deprecated since 9
1574     */
1575    deviceId: string;
1576    /**
1577     * The Id of the read request
1578     *
1579     * @syscap SystemCapability.Communication.Bluetooth.Core
1580     * @since 7
1581     * @deprecated since 9
1582     */
1583    transId: number;
1584    /**
1585     * Indicates the byte offset of the start position for reading characteristic value
1586     *
1587     * @syscap SystemCapability.Communication.Bluetooth.Core
1588     * @since 7
1589     * @deprecated since 9
1590     */
1591    offset: number;
1592    /**
1593     * The UUID of a DescriptorReadReq instance
1594     *
1595     * @syscap SystemCapability.Communication.Bluetooth.Core
1596     * @since 7
1597     * @deprecated since 9
1598     */
1599    descriptorUuid: string;
1600    /**
1601     * The UUID of the characteristic to which the descriptor belongs
1602     *
1603     * @syscap SystemCapability.Communication.Bluetooth.Core
1604     * @since 7
1605     * @deprecated since 9
1606     */
1607    characteristicUuid: string;
1608    /**
1609     * The UUID of the service to which the descriptor belongs
1610     *
1611     * @syscap SystemCapability.Communication.Bluetooth.Core
1612     * @since 7
1613     * @deprecated since 9
1614     */
1615    serviceUuid: string;
1616  }
1617
1618  /**
1619   * Describes the parameters of the Gatt client's characteristic write request.
1620   *
1621   * @typedef DescriptorWriteReq
1622   * @syscap SystemCapability.Communication.Bluetooth.Core
1623   * @since 7
1624   * @deprecated since 9
1625   * @useinstead ohos.bluetoothManager/bluetoothManager.DescriptorWriteRequest
1626   */
1627  interface DescriptorWriteReq {
1628    /**
1629     * Indicates the address of the client that initiates the write request
1630     *
1631     * @syscap SystemCapability.Communication.Bluetooth.Core
1632     * @since 7
1633     * @deprecated since 9
1634     */
1635    deviceId: string;
1636    /**
1637     * The Id of the write request
1638     *
1639     * @syscap SystemCapability.Communication.Bluetooth.Core
1640     * @since 7
1641     * @deprecated since 9
1642     */
1643    transId: number;
1644    /**
1645     * Indicates the byte offset of the start position for writing characteristic value
1646     *
1647     * @syscap SystemCapability.Communication.Bluetooth.Core
1648     * @since 7
1649     * @deprecated since 9
1650     */
1651    offset: number;
1652    /**
1653     * Whether this request should be pending for later operation
1654     *
1655     * @syscap SystemCapability.Communication.Bluetooth.Core
1656     * @since 7
1657     * @deprecated since 9
1658     */
1659    isPrep: boolean;
1660    /**
1661     * Whether the remote client need a response
1662     *
1663     * @syscap SystemCapability.Communication.Bluetooth.Core
1664     * @since 7
1665     * @deprecated since 9
1666     */
1667    needRsp: boolean;
1668    /**
1669     * Indicates the value to be written
1670     *
1671     * @syscap SystemCapability.Communication.Bluetooth.Core
1672     * @since 7
1673     * @deprecated since 9
1674     */
1675    value: ArrayBuffer;
1676    /**
1677     * The UUID of a DescriptorWriteReq instance
1678     *
1679     * @syscap SystemCapability.Communication.Bluetooth.Core
1680     * @since 7
1681     * @deprecated since 9
1682     */
1683    descriptorUuid: string;
1684    /**
1685     * The UUID of the characteristic to which the descriptor belongs
1686     *
1687     * @syscap SystemCapability.Communication.Bluetooth.Core
1688     * @since 7
1689     * @deprecated since 9
1690     */
1691    characteristicUuid: string;
1692    /**
1693     * The UUID of the service to which the descriptor belongs
1694     *
1695     * @syscap SystemCapability.Communication.Bluetooth.Core
1696     * @since 7
1697     * @deprecated since 9
1698     */
1699    serviceUuid: string;
1700  }
1701
1702  /**
1703   * Describes the parameters of a response send by the server to a specified read or write request.
1704   *
1705   * @typedef ServerResponse
1706   * @syscap SystemCapability.Communication.Bluetooth.Core
1707   * @since 7
1708   * @deprecated since 9
1709   * @useinstead ohos.bluetoothManager/bluetoothManager.ServerResponse
1710   */
1711  interface ServerResponse {
1712    /**
1713     * Indicates the address of the client to which to send the response
1714     *
1715     * @syscap SystemCapability.Communication.Bluetooth.Core
1716     * @since 7
1717     * @deprecated since 9
1718     */
1719    deviceId: string;
1720    /**
1721     * The Id of the write request
1722     *
1723     * @syscap SystemCapability.Communication.Bluetooth.Core
1724     * @since 7
1725     * @deprecated since 9
1726     */
1727    transId: number;
1728    /**
1729     * Indicates the status of the read or write request, set this parameter to '0' in normal cases
1730     *
1731     * @syscap SystemCapability.Communication.Bluetooth.Core
1732     * @since 7
1733     * @deprecated since 9
1734     */
1735    status: number;
1736    /**
1737     * Indicates the byte offset of the start position for reading or writing operation
1738     *
1739     * @syscap SystemCapability.Communication.Bluetooth.Core
1740     * @since 7
1741     * @deprecated since 9
1742     */
1743    offset: number;
1744    /**
1745     * Indicates the value to be sent
1746     *
1747     * @syscap SystemCapability.Communication.Bluetooth.Core
1748     * @since 7
1749     * @deprecated since 9
1750     */
1751    value: ArrayBuffer;
1752  }
1753
1754  /**
1755   * Describes the Gatt profile connection state.
1756   *
1757   * @typedef BLEConnectChangedState
1758   * @syscap SystemCapability.Communication.Bluetooth.Core
1759   * @since 7
1760   * @deprecated since 9
1761   * @useinstead ohos.bluetoothManager/bluetoothManager.BLEConnectChangedState
1762   */
1763  interface BLEConnectChangedState {
1764    /**
1765     * Indicates the peer device address
1766     *
1767     * @syscap SystemCapability.Communication.Bluetooth.Core
1768     * @since 7
1769     * @deprecated since 9
1770     */
1771    deviceId: string;
1772    /**
1773     * Connection state of the Gatt profile
1774     *
1775     * @syscap SystemCapability.Communication.Bluetooth.Core
1776     * @since 7
1777     * @deprecated since 9
1778     */
1779    state: ProfileConnectionState;
1780  }
1781
1782  /**
1783   * Describes the contents of the scan results.
1784   *
1785   * @typedef ScanResult
1786   * @syscap SystemCapability.Communication.Bluetooth.Core
1787   * @since 7
1788   * @deprecated since 9
1789   * @useinstead ohos.bluetoothManager/bluetoothManager.ScanResult
1790   */
1791  interface ScanResult {
1792    /**
1793     * Address of the scanned device
1794     *
1795     * @syscap SystemCapability.Communication.Bluetooth.Core
1796     * @since 7
1797     * @deprecated since 9
1798     */
1799    deviceId: string;
1800    /**
1801     * RSSI of the remote device
1802     *
1803     * @syscap SystemCapability.Communication.Bluetooth.Core
1804     * @since 7
1805     * @deprecated since 9
1806     */
1807    rssi: number;
1808    /**
1809     * The raw data of broadcast packet
1810     *
1811     * @syscap SystemCapability.Communication.Bluetooth.Core
1812     * @since 7
1813     * @deprecated since 9
1814     */
1815    data: ArrayBuffer;
1816  }
1817
1818  /**
1819   * Describes the settings for BLE advertising.
1820   *
1821   * @typedef AdvertiseSetting
1822   * @syscap SystemCapability.Communication.Bluetooth.Core
1823   * @since 7
1824   * @deprecated since 9
1825   * @useinstead ohos.bluetoothManager/bluetoothManager.AdvertiseSetting
1826   */
1827  interface AdvertiseSetting {
1828    /**
1829     * Minimum slot value for the advertising interval, which is {@code 32} (20 ms)
1830     * Maximum slot value for the advertising interval, which is {@code 16777215} (10485.759375s)
1831     * Default slot value for the advertising interval, which is {@code 1600} (1s)
1832     *
1833     * @syscap SystemCapability.Communication.Bluetooth.Core
1834     * @since 7
1835     * @deprecated since 9
1836     */
1837    interval?: number;
1838    /**
1839     * Minimum transmission power level for advertising, which is {@code -127}
1840     * Maximum transmission power level for advertising, which is {@code 1}
1841     * Default transmission power level for advertising, which is {@code -7}
1842     *
1843     * @syscap SystemCapability.Communication.Bluetooth.Core
1844     * @since 7
1845     * @deprecated since 9
1846     */
1847    txPower?: number;
1848    /**
1849     * Indicates whether the BLE is connectable, default is {@code true}
1850     *
1851     * @syscap SystemCapability.Communication.Bluetooth.Core
1852     * @since 7
1853     * @deprecated since 9
1854     */
1855    connectable?: boolean;
1856  }
1857
1858  /**
1859   * Describes the advertising data.
1860   *
1861   * @typedef AdvertiseData
1862   * @syscap SystemCapability.Communication.Bluetooth.Core
1863   * @since 7
1864   * @deprecated since 9
1865   * @useinstead ohos.bluetoothManager/bluetoothManager.AdvertiseData
1866   */
1867  interface AdvertiseData {
1868    /**
1869     * The specified service UUID list to this advertisement
1870     *
1871     * @syscap SystemCapability.Communication.Bluetooth.Core
1872     * @since 7
1873     * @deprecated since 9
1874     */
1875    serviceUuids: Array<string>;
1876    /**
1877     * The specified manufacturer data list to this advertisement
1878     *
1879     * @syscap SystemCapability.Communication.Bluetooth.Core
1880     * @since 7
1881     * @deprecated since 9
1882     */
1883    manufactureData: Array<ManufactureData>;
1884    /**
1885     * The specified service data list to this advertisement
1886     *
1887     * @syscap SystemCapability.Communication.Bluetooth.Core
1888     * @since 7
1889     * @deprecated since 9
1890     */
1891    serviceData: Array<ServiceData>;
1892  }
1893
1894  /**
1895   * Describes the manufacturer data.
1896   *
1897   * @typedef ManufactureData
1898   * @syscap SystemCapability.Communication.Bluetooth.Core
1899   * @since 7
1900   * @deprecated since 9
1901   * @useinstead ohos.bluetoothManager/bluetoothManager.ManufactureData
1902   */
1903  interface ManufactureData {
1904    /**
1905     * Indicates the manufacturer ID assigned by Bluetooth SIG
1906     *
1907     * @syscap SystemCapability.Communication.Bluetooth.Core
1908     * @since 7
1909     * @deprecated since 9
1910     */
1911    manufactureId: number;
1912    /**
1913     * Indicates the manufacturer data to add
1914     *
1915     * @syscap SystemCapability.Communication.Bluetooth.Core
1916     * @since 7
1917     * @deprecated since 9
1918     */
1919    manufactureValue: ArrayBuffer;
1920  }
1921
1922  /**
1923   * Describes the service data.
1924   *
1925   * @typedef ServiceData
1926   * @syscap SystemCapability.Communication.Bluetooth.Core
1927   * @since 7
1928   * @deprecated since 9
1929   * @useinstead ohos.bluetoothManager/bluetoothManager.ServiceData
1930   */
1931  interface ServiceData {
1932    /**
1933     * Indicates the UUID of the service data to add
1934     *
1935     * @syscap SystemCapability.Communication.Bluetooth.Core
1936     * @since 7
1937     * @deprecated since 9
1938     */
1939    serviceUuid: string;
1940    /**
1941     * Indicates the service data to add
1942     *
1943     * @syscap SystemCapability.Communication.Bluetooth.Core
1944     * @since 7
1945     * @deprecated since 9
1946     */
1947    serviceValue: ArrayBuffer;
1948  }
1949
1950  /**
1951   * Describes the criteria for filtering scanning results can be set.
1952   *
1953   * @typedef ScanFilter
1954   * @syscap SystemCapability.Communication.Bluetooth.Core
1955   * @since 7
1956   * @deprecated since 9
1957   * @useinstead ohos.bluetoothManager/bluetoothManager.ScanFilter
1958   */
1959  interface ScanFilter {
1960    /**
1961     * The address of a BLE peripheral device
1962     *
1963     * @syscap SystemCapability.Communication.Bluetooth.Core
1964     * @since 7
1965     * @deprecated since 9
1966     */
1967    deviceId?: string;
1968    /**
1969     * The name of a BLE peripheral device
1970     *
1971     * @syscap SystemCapability.Communication.Bluetooth.Core
1972     * @since 7
1973     * @deprecated since 9
1974     */
1975    name?: string;
1976    /**
1977     * The service UUID of a BLE peripheral device
1978     *
1979     * @syscap SystemCapability.Communication.Bluetooth.Core
1980     * @since 7
1981     * @deprecated since 9
1982     */
1983    serviceUuid?: string;
1984  }
1985
1986  /**
1987   * Describes the parameters for scan.
1988   *
1989   * @typedef ScanOptions
1990   * @syscap SystemCapability.Communication.Bluetooth.Core
1991   * @since 7
1992   * @deprecated since 9
1993   * @useinstead ohos.bluetoothManager/bluetoothManager.ScanOptions
1994   */
1995  interface ScanOptions {
1996    /**
1997     * Time of delay for reporting the scan result
1998     *
1999     * @syscap SystemCapability.Communication.Bluetooth.Core
2000     * @since 7
2001     * @deprecated since 9
2002     */
2003    interval?: number;
2004    /**
2005     * Bluetooth LE scan mode
2006     *
2007     * @syscap SystemCapability.Communication.Bluetooth.Core
2008     * @since 7
2009     * @deprecated since 9
2010     */
2011    dutyMode?: ScanDuty;
2012    /**
2013     * Match mode for Bluetooth LE scan filters hardware match
2014     *
2015     * @syscap SystemCapability.Communication.Bluetooth.Core
2016     * @since 7
2017     * @deprecated since 9
2018     */
2019    matchMode?: MatchMode;
2020  }
2021
2022  /**
2023   * Describes the spp parameters.
2024   *
2025   * @typedef SppOption
2026   * @syscap SystemCapability.Communication.Bluetooth.Core
2027   * @since 8
2028   * @deprecated since 9
2029   * @useinstead ohos.bluetoothManager/bluetoothManager.SppOption
2030   */
2031  interface SppOption {
2032    /**
2033     * Indicates the UUID in the SDP record.
2034     *
2035     * @syscap SystemCapability.Communication.Bluetooth.Core
2036     * @since 8
2037     * @deprecated since 9
2038     */
2039    uuid: string;
2040    /**
2041     * Indicates secure channel or not
2042     *
2043     * @syscap SystemCapability.Communication.Bluetooth.Core
2044     * @since 8
2045     * @deprecated since 9
2046     */
2047    secure: boolean;
2048    /**
2049     * Spp link type {@link SppType}
2050     *
2051     * @syscap SystemCapability.Communication.Bluetooth.Core
2052     * @since 8
2053     * @deprecated since 9
2054     */
2055    type: SppType;
2056  }
2057
2058  /**
2059   * Describes the bond key param.
2060   *
2061   * @typedef PinRequiredParam
2062   * @syscap SystemCapability.Communication.Bluetooth.Core
2063   * @since 8
2064   * @deprecated since 9
2065   * @useinstead ohos.bluetoothManager/bluetoothManager.PinRequiredParam
2066   */
2067  interface PinRequiredParam {
2068    /**
2069     * ID of the device to pair.
2070     *
2071     * @syscap SystemCapability.Communication.Bluetooth.Core
2072     * @since 8
2073     * @deprecated since 9
2074     */
2075    deviceId: string;
2076    /**
2077     * Key for the device pairing.
2078     *
2079     * @syscap SystemCapability.Communication.Bluetooth.Core
2080     * @since 8
2081     * @deprecated since 9
2082     */
2083    pinCode: string;
2084  }
2085
2086  /**
2087   * Describes the class of a bluetooth device.
2088   *
2089   * @typedef DeviceClass
2090   * @syscap SystemCapability.Communication.Bluetooth.Core
2091   * @since 8
2092   * @deprecated since 9
2093   * @useinstead ohos.bluetoothManager/bluetoothManager.DeviceClass
2094   */
2095  interface DeviceClass {
2096    /**
2097     * Major classes of Bluetooth devices.
2098     *
2099     * @syscap SystemCapability.Communication.Bluetooth.Core
2100     * @since 8
2101     * @deprecated since 9
2102     */
2103    majorClass: MajorClass;
2104    /**
2105     * Major and minor classes of Bluetooth devices.
2106     *
2107     * @syscap SystemCapability.Communication.Bluetooth.Core
2108     * @since 8
2109     * @deprecated since 9
2110     */
2111    majorMinorClass: MajorMinorClass;
2112    /**
2113     * Class of the device.
2114     *
2115     * @syscap SystemCapability.Communication.Bluetooth.Core
2116     * @since 8
2117     * @deprecated since 9
2118     */
2119    classOfDevice: number;
2120  }
2121
2122  /**
2123   * Describes the class of a bluetooth device.
2124   *
2125   * @typedef BondStateParam
2126   * @syscap SystemCapability.Communication.Bluetooth.Core
2127   * @since 8
2128   * @deprecated since 9
2129   * @useinstead ohos.bluetoothManager/bluetoothManager.BondStateParam
2130   */
2131  interface BondStateParam {
2132    /**
2133     * Address of a Bluetooth device.
2134     *
2135     * @syscap SystemCapability.Communication.Bluetooth.Core
2136     * @since 8
2137     * @deprecated since 9
2138     */
2139    deviceId: string;
2140    /**
2141     * Profile connection state of the device.
2142     *
2143     * @syscap SystemCapability.Communication.Bluetooth.Core
2144     * @since 8
2145     * @deprecated since 9
2146     */
2147    state: BondState;
2148  }
2149
2150  /**
2151   * The enum of scan duty.
2152   *
2153   * @enum { number }
2154   * @syscap SystemCapability.Communication.Bluetooth.Core
2155   * @since 7
2156   * @deprecated since 9
2157   * @useinstead ohos.bluetoothManager/bluetoothManager.ScanDuty
2158   */
2159  enum ScanDuty {
2160    /**
2161     * low power mode
2162     *
2163     * @syscap SystemCapability.Communication.Bluetooth.Core
2164     * @since 7
2165     * @deprecated since 9
2166     */
2167    SCAN_MODE_LOW_POWER = 0,
2168    /**
2169     * balanced power mode
2170     *
2171     * @syscap SystemCapability.Communication.Bluetooth.Core
2172     * @since 7
2173     * @deprecated since 9
2174     */
2175    SCAN_MODE_BALANCED = 1,
2176    /**
2177     * Scan using highest duty cycle
2178     *
2179     * @syscap SystemCapability.Communication.Bluetooth.Core
2180     * @since 7
2181     * @deprecated since 9
2182     */
2183    SCAN_MODE_LOW_LATENCY = 2
2184  }
2185
2186  /**
2187   * The enum of BLE match mode.
2188   *
2189   * @enum { number }
2190   * @syscap SystemCapability.Communication.Bluetooth.Core
2191   * @since 7
2192   * @deprecated since 9
2193   * @useinstead ohos.bluetoothManager/bluetoothManager.MatchMode
2194   */
2195  enum MatchMode {
2196    /**
2197     * aggressive mode
2198     *
2199     * @syscap SystemCapability.Communication.Bluetooth.Core
2200     * @since 7
2201     * @deprecated since 9
2202     */
2203    MATCH_MODE_AGGRESSIVE = 1,
2204    /**
2205     * sticky mode
2206     *
2207     * @syscap SystemCapability.Communication.Bluetooth.Core
2208     * @since 7
2209     * @deprecated since 9
2210     */
2211    MATCH_MODE_STICKY = 2
2212  }
2213
2214  /**
2215   * The enum of profile connection state.
2216   *
2217   * @enum { number }
2218   * @syscap SystemCapability.Communication.Bluetooth.Core
2219   * @since 7
2220   * @deprecated since 9
2221   * @useinstead ohos.bluetoothManager/bluetoothManager.ProfileConnectionState
2222   */
2223  enum ProfileConnectionState {
2224    /**
2225     * the current profile is disconnected
2226     *
2227     * @syscap SystemCapability.Communication.Bluetooth.Core
2228     * @since 7
2229     * @deprecated since 9
2230     */
2231    STATE_DISCONNECTED = 0,
2232    /**
2233     * the current profile is being connected
2234     *
2235     * @syscap SystemCapability.Communication.Bluetooth.Core
2236     * @since 7
2237     * @deprecated since 9
2238     */
2239    STATE_CONNECTING = 1,
2240    /**
2241     * the current profile is connected
2242     *
2243     * @syscap SystemCapability.Communication.Bluetooth.Core
2244     * @since 7
2245     * @deprecated since 9
2246     */
2247    STATE_CONNECTED = 2,
2248    /**
2249     * the current profile is being disconnected
2250     *
2251     * @syscap SystemCapability.Communication.Bluetooth.Core
2252     * @since 7
2253     * @deprecated since 9
2254     */
2255    STATE_DISCONNECTING = 3
2256  }
2257
2258  /**
2259   * The enum of bluetooth state.
2260   *
2261   * @enum { number }
2262   * @syscap SystemCapability.Communication.Bluetooth.Core
2263   * @since 7
2264   * @deprecated since 9
2265   * @useinstead ohos.bluetoothManager/bluetoothManager.BluetoothState
2266   */
2267  enum BluetoothState {
2268    /**
2269     * Indicates the local Bluetooth is off
2270     *
2271     * @syscap SystemCapability.Communication.Bluetooth.Core
2272     * @since 7
2273     * @deprecated since 9
2274     */
2275    STATE_OFF = 0,
2276    /**
2277     * Indicates the local Bluetooth is turning on
2278     *
2279     * @syscap SystemCapability.Communication.Bluetooth.Core
2280     * @since 7
2281     * @deprecated since 9
2282     */
2283    STATE_TURNING_ON = 1,
2284    /**
2285     * Indicates the local Bluetooth is on, and ready for use
2286     *
2287     * @syscap SystemCapability.Communication.Bluetooth.Core
2288     * @since 7
2289     * @deprecated since 9
2290     */
2291    STATE_ON = 2,
2292    /**
2293     * Indicates the local Bluetooth is turning off
2294     *
2295     * @syscap SystemCapability.Communication.Bluetooth.Core
2296     * @since 7
2297     * @deprecated since 9
2298     */
2299    STATE_TURNING_OFF = 3,
2300    /**
2301     * Indicates the local Bluetooth is turning LE mode on
2302     *
2303     * @syscap SystemCapability.Communication.Bluetooth.Core
2304     * @since 7
2305     * @deprecated since 9
2306     */
2307    STATE_BLE_TURNING_ON = 4,
2308    /**
2309     * Indicates the local Bluetooth is in LE only mode
2310     *
2311     * @syscap SystemCapability.Communication.Bluetooth.Core
2312     * @since 7
2313     * @deprecated since 9
2314     */
2315    STATE_BLE_ON = 5,
2316    /**
2317     * Indicates the local Bluetooth is turning off LE only mode
2318     *
2319     * @syscap SystemCapability.Communication.Bluetooth.Core
2320     * @since 7
2321     * @deprecated since 9
2322     */
2323    STATE_BLE_TURNING_OFF = 6
2324  }
2325
2326  /**
2327   * The enum of SPP type.
2328   *
2329   * @enum { number }
2330   * @syscap SystemCapability.Communication.Bluetooth.Core
2331   * @since 8
2332   * @deprecated since 9
2333   * @useinstead ohos.bluetoothManager/bluetoothManager.SppType
2334   */
2335  enum SppType {
2336    /**
2337     * RFCOMM
2338     *
2339     * @syscap SystemCapability.Communication.Bluetooth.Core
2340     * @since 8
2341     * @deprecated since 9
2342     */
2343    SPP_RFCOMM
2344  }
2345
2346  /**
2347   * The enum of BR scan mode.
2348   *
2349   * @enum { number }
2350   * @syscap SystemCapability.Communication.Bluetooth.Core
2351   * @since 8
2352   * @deprecated since 9
2353   * @useinstead ohos.bluetoothManager/bluetoothManager.ScanMode
2354   */
2355  enum ScanMode {
2356    /**
2357     * Indicates the scan mode is none
2358     *
2359     * @syscap SystemCapability.Communication.Bluetooth.Core
2360     * @since 8
2361     * @deprecated since 9
2362     */
2363    SCAN_MODE_NONE = 0,
2364    /**
2365     * Indicates the scan mode is connectable
2366     *
2367     * @syscap SystemCapability.Communication.Bluetooth.Core
2368     * @since 8
2369     * @deprecated since 9
2370     */
2371    SCAN_MODE_CONNECTABLE = 1,
2372    /**
2373     * Indicates the scan mode is general discoverable
2374     *
2375     * @syscap SystemCapability.Communication.Bluetooth.Core
2376     * @since 8
2377     * @deprecated since 9
2378     */
2379    SCAN_MODE_GENERAL_DISCOVERABLE = 2,
2380    /**
2381     * Indicates the scan mode is limited discoverable
2382     *
2383     * @syscap SystemCapability.Communication.Bluetooth.Core
2384     * @since 8
2385     * @deprecated since 9
2386     */
2387    SCAN_MODE_LIMITED_DISCOVERABLE = 3,
2388    /**
2389     * Indicates the scan mode is connectable and general discoverable
2390     *
2391     * @syscap SystemCapability.Communication.Bluetooth.Core
2392     * @since 8
2393     * @deprecated since 9
2394     */
2395    SCAN_MODE_CONNECTABLE_GENERAL_DISCOVERABLE = 4,
2396    /**
2397     * Indicates the scan mode is connectable and limited discoverable
2398     *
2399     * @syscap SystemCapability.Communication.Bluetooth.Core
2400     * @since 8
2401     * @deprecated since 9
2402     */
2403    SCAN_MODE_CONNECTABLE_LIMITED_DISCOVERABLE = 5
2404  }
2405
2406  /**
2407   * The enum of bond state.
2408   *
2409   * @enum { number }
2410   * @syscap SystemCapability.Communication.Bluetooth.Core
2411   * @since 8
2412   * @deprecated since 9
2413   * @useinstead ohos.bluetoothManager/bluetoothManager.BondState
2414   */
2415  enum BondState {
2416    /**
2417     * Indicate the bond state is invalid
2418     *
2419     * @syscap SystemCapability.Communication.Bluetooth.Core
2420     * @since 8
2421     * @deprecated since 9
2422     */
2423    BOND_STATE_INVALID = 0,
2424    /**
2425     * Indicate the bond state is bonding
2426     *
2427     * @syscap SystemCapability.Communication.Bluetooth.Core
2428     * @since 8
2429     * @deprecated since 9
2430     */
2431    BOND_STATE_BONDING = 1,
2432    /**
2433     * Indicate the bond state is bonded
2434     *
2435     * @syscap SystemCapability.Communication.Bluetooth.Core
2436     * @since 8
2437     * @deprecated since 9
2438     */
2439    BOND_STATE_BONDED = 2
2440  }
2441
2442  /**
2443   * The enum of major class of a bluetooth device.
2444   *
2445   * @enum { number }
2446   * @syscap SystemCapability.Communication.Bluetooth.Core
2447   * @since 8
2448   * @deprecated since 9
2449   * @useinstead ohos.bluetoothManager/bluetoothManager.MajorClass
2450   */
2451  enum MajorClass {
2452    /**
2453     * Miscellaneous device.
2454     *
2455     * @syscap SystemCapability.Communication.Bluetooth.Core
2456     * @since 8
2457     * @deprecated since 9
2458     */
2459    MAJOR_MISC = 0x0000,
2460    /**
2461     * Computer.
2462     *
2463     * @syscap SystemCapability.Communication.Bluetooth.Core
2464     * @since 8
2465     * @deprecated since 9
2466     */
2467    MAJOR_COMPUTER = 0x0100,
2468    /**
2469     * Mobile phone.
2470     *
2471     * @syscap SystemCapability.Communication.Bluetooth.Core
2472     * @since 8
2473     * @deprecated since 9
2474     */
2475    MAJOR_PHONE = 0x0200,
2476    /**
2477     * Network device.
2478     *
2479     * @syscap SystemCapability.Communication.Bluetooth.Core
2480     * @since 8
2481     * @deprecated since 9
2482     */
2483    MAJOR_NETWORKING = 0x0300,
2484    /**
2485     * Audio or video device.
2486     *
2487     * @syscap SystemCapability.Communication.Bluetooth.Core
2488     * @since 8
2489     * @deprecated since 9
2490     */
2491    MAJOR_AUDIO_VIDEO = 0x0400,
2492    /**
2493     * Peripheral device.
2494     *
2495     * @syscap SystemCapability.Communication.Bluetooth.Core
2496     * @since 8
2497     * @deprecated since 9
2498     */
2499    MAJOR_PERIPHERAL = 0x0500,
2500    /**
2501     * Imaging device.
2502     *
2503     * @syscap SystemCapability.Communication.Bluetooth.Core
2504     * @since 8
2505     * @deprecated since 9
2506     */
2507    MAJOR_IMAGING = 0x0600,
2508    /**
2509     * Wearable device.
2510     *
2511     * @syscap SystemCapability.Communication.Bluetooth.Core
2512     * @since 8
2513     * @deprecated since 9
2514     */
2515    MAJOR_WEARABLE = 0x0700,
2516    /**
2517     * Toy.
2518     *
2519     * @syscap SystemCapability.Communication.Bluetooth.Core
2520     * @since 8
2521     * @deprecated since 9
2522     */
2523    MAJOR_TOY = 0x0800,
2524    /**
2525     * Health device.
2526     *
2527     * @syscap SystemCapability.Communication.Bluetooth.Core
2528     * @since 8
2529     * @deprecated since 9
2530     */
2531    MAJOR_HEALTH = 0x0900,
2532    /**
2533     * Unclassified device.
2534     *
2535     * @syscap SystemCapability.Communication.Bluetooth.Core
2536     * @since 8
2537     * @deprecated since 9
2538     */
2539    MAJOR_UNCATEGORIZED = 0x1F00
2540  }
2541
2542  /**
2543   * The enum of major minor class of a bluetooth device.
2544   *
2545   * @enum { number }
2546   * @syscap SystemCapability.Communication.Bluetooth.Core
2547   * @since 8
2548   * @deprecated since 9
2549   * @useinstead ohos.bluetoothManager/bluetoothManager.MajorMinorClass
2550   */
2551  enum MajorMinorClass {
2552    /**
2553     * The Minor Device Class field
2554     * Computer Major Class
2555     *
2556     * @syscap SystemCapability.Communication.Bluetooth.Core
2557     * @since 8
2558     * @deprecated since 9
2559     */
2560    COMPUTER_UNCATEGORIZED = 0x0100,
2561    /**
2562     * Desktop computer.
2563     *
2564     * @syscap SystemCapability.Communication.Bluetooth.Core
2565     * @since 8
2566     * @deprecated since 9
2567     */
2568    COMPUTER_DESKTOP = 0x0104,
2569    /**
2570     * Server.
2571     *
2572     * @syscap SystemCapability.Communication.Bluetooth.Core
2573     * @since 8
2574     * @deprecated since 9
2575     */
2576    COMPUTER_SERVER = 0x0108,
2577    /**
2578     * Laptop.
2579     *
2580     * @syscap SystemCapability.Communication.Bluetooth.Core
2581     * @since 8
2582     * @deprecated since 9
2583     */
2584    COMPUTER_LAPTOP = 0x010C,
2585    /**
2586     * Hand-held computer.
2587     *
2588     * @syscap SystemCapability.Communication.Bluetooth.Core
2589     * @since 8
2590     * @deprecated since 9
2591     */
2592    COMPUTER_HANDHELD_PC_PDA = 0x0110,
2593    /**
2594     * Palmtop computer.
2595     *
2596     * @syscap SystemCapability.Communication.Bluetooth.Core
2597     * @since 8
2598     * @deprecated since 9
2599     */
2600    COMPUTER_PALM_SIZE_PC_PDA = 0x0114,
2601    /**
2602     * Wearable computer.
2603     *
2604     * @syscap SystemCapability.Communication.Bluetooth.Core
2605     * @since 8
2606     * @deprecated since 9
2607     */
2608    COMPUTER_WEARABLE = 0x0118,
2609    /**
2610     * Tablet.
2611     *
2612     * @syscap SystemCapability.Communication.Bluetooth.Core
2613     * @since 8
2614     * @deprecated since 9
2615     */
2616    COMPUTER_TABLET = 0x011C,
2617
2618    /**
2619     * Phone Major Class
2620     *
2621     * @syscap SystemCapability.Communication.Bluetooth.Core
2622     * @since 8
2623     * @deprecated since 9
2624     */
2625    PHONE_UNCATEGORIZED = 0x0200,
2626    /**
2627     * Portable phone.
2628     *
2629     * @syscap SystemCapability.Communication.Bluetooth.Core
2630     * @since 8
2631     * @deprecated since 9
2632     */
2633    PHONE_CELLULAR = 0x0204,
2634    /**
2635     * Cordless phone.
2636     *
2637     * @syscap SystemCapability.Communication.Bluetooth.Core
2638     * @since 8
2639     * @deprecated since 9
2640     */
2641    PHONE_CORDLESS = 0x0208,
2642    /**
2643     * Smartphone.
2644     *
2645     * @syscap SystemCapability.Communication.Bluetooth.Core
2646     * @since 8
2647     * @deprecated since 9
2648     */
2649    PHONE_SMART = 0x020C,
2650    /**
2651     * Modem or gateway phone.
2652     *
2653     * @syscap SystemCapability.Communication.Bluetooth.Core
2654     * @since 8
2655     * @deprecated since 9
2656     */
2657    PHONE_MODEM_OR_GATEWAY = 0x0210,
2658    /**
2659     * ISDN phone.
2660     *
2661     * @syscap SystemCapability.Communication.Bluetooth.Core
2662     * @since 8
2663     * @deprecated since 9
2664     */
2665    PHONE_ISDN = 0x0214,
2666
2667    /**
2668     * LAN/Network Access Point Major Class
2669     *
2670     * @syscap SystemCapability.Communication.Bluetooth.Core
2671     * @since 8
2672     * @deprecated since 9
2673     */
2674    NETWORK_FULLY_AVAILABLE = 0x0300,
2675    /**
2676     * Device used on network 1 to 17.
2677     *
2678     * @syscap SystemCapability.Communication.Bluetooth.Core
2679     * @since 8
2680     * @deprecated since 9
2681     */
2682    NETWORK_1_TO_17_UTILIZED = 0x0320,
2683    /**
2684     * Device used on network 17 to 33.
2685     *
2686     * @syscap SystemCapability.Communication.Bluetooth.Core
2687     * @since 8
2688     * @deprecated since 9
2689     */
2690    NETWORK_17_TO_33_UTILIZED = 0x0340,
2691    /**
2692     * Device used on network 33 to 50.
2693     *
2694     * @syscap SystemCapability.Communication.Bluetooth.Core
2695     * @since 8
2696     * @deprecated since 9
2697     */
2698    NETWORK_33_TO_50_UTILIZED = 0x0360,
2699    /**
2700     * Device used on network 60 to 67.
2701     *
2702     * @syscap SystemCapability.Communication.Bluetooth.Core
2703     * @since 8
2704     * @deprecated since 9
2705     */
2706    NETWORK_60_TO_67_UTILIZED = 0x0380,
2707    /**
2708     * Device used on network 67 to 83.
2709     *
2710     * @syscap SystemCapability.Communication.Bluetooth.Core
2711     * @since 8
2712     * @deprecated since 9
2713     */
2714    NETWORK_67_TO_83_UTILIZED = 0x03A0,
2715    /**
2716     * Device used on network 83 to 99.
2717     *
2718     * @syscap SystemCapability.Communication.Bluetooth.Core
2719     * @since 8
2720     * @deprecated since 9
2721     */
2722    NETWORK_83_TO_99_UTILIZED = 0x03C0,
2723    /**
2724     * Device without network service.
2725     *
2726     * @syscap SystemCapability.Communication.Bluetooth.Core
2727     * @since 8
2728     * @deprecated since 9
2729     */
2730    NETWORK_NO_SERVICE = 0x03E0,
2731
2732    /**
2733     * Unclassified audio or video device.
2734     *
2735     * @syscap SystemCapability.Communication.Bluetooth.Core
2736     * @since 8
2737     * @deprecated since 9
2738     */
2739    AUDIO_VIDEO_UNCATEGORIZED = 0x0400,
2740    /**
2741     * Wearable audio or video headset.
2742     *
2743     * @syscap SystemCapability.Communication.Bluetooth.Core
2744     * @since 8
2745     * @deprecated since 9
2746     */
2747    AUDIO_VIDEO_WEARABLE_HEADSET = 0x0404,
2748    /**
2749     * Hands-free audio or video device.
2750     *
2751     * @syscap SystemCapability.Communication.Bluetooth.Core
2752     * @since 8
2753     * @deprecated since 9
2754     */
2755    AUDIO_VIDEO_HANDSFREE = 0x0408,
2756    /**
2757     * Audio or video microphone.
2758     *
2759     * @syscap SystemCapability.Communication.Bluetooth.Core
2760     * @since 8
2761     * @deprecated since 9
2762     */
2763    AUDIO_VIDEO_MICROPHONE = 0x0410,
2764    /**
2765     * Audio or video loudspeaker.
2766     *
2767     * @syscap SystemCapability.Communication.Bluetooth.Core
2768     * @since 8
2769     * @deprecated since 9
2770     */
2771    AUDIO_VIDEO_LOUDSPEAKER = 0x0414,
2772    /**
2773     * Audio or video headphones.
2774     *
2775     * @syscap SystemCapability.Communication.Bluetooth.Core
2776     * @since 8
2777     * @deprecated since 9
2778     */
2779    AUDIO_VIDEO_HEADPHONES = 0x0418,
2780    /**
2781     * Portable audio or video device.
2782     *
2783     * @syscap SystemCapability.Communication.Bluetooth.Core
2784     * @since 8
2785     * @deprecated since 9
2786     */
2787    AUDIO_VIDEO_PORTABLE_AUDIO = 0x041C,
2788    /**
2789     * In-vehicle audio or video device.
2790     *
2791     * @syscap SystemCapability.Communication.Bluetooth.Core
2792     * @since 8
2793     * @deprecated since 9
2794     */
2795    AUDIO_VIDEO_CAR_AUDIO = 0x0420,
2796    /**
2797     * Audio or video STB device.
2798     *
2799     * @syscap SystemCapability.Communication.Bluetooth.Core
2800     * @since 8
2801     * @deprecated since 9
2802     */
2803    AUDIO_VIDEO_SET_TOP_BOX = 0x0424,
2804    /**
2805     * High-fidelity speaker device.
2806     *
2807     * @syscap SystemCapability.Communication.Bluetooth.Core
2808     * @since 8
2809     * @deprecated since 9
2810     */
2811    AUDIO_VIDEO_HIFI_AUDIO = 0x0428,
2812    /**
2813     * Video cassette recording (VCR) device.
2814     *
2815     * @syscap SystemCapability.Communication.Bluetooth.Core
2816     * @since 8
2817     * @deprecated since 9
2818     */
2819    AUDIO_VIDEO_VCR = 0x042C,
2820    /**
2821     * Camera.
2822     *
2823     * @syscap SystemCapability.Communication.Bluetooth.Core
2824     * @since 8
2825     * @deprecated since 9
2826     */
2827    AUDIO_VIDEO_VIDEO_CAMERA = 0x0430,
2828    /**
2829     * Camcorder.
2830     *
2831     * @syscap SystemCapability.Communication.Bluetooth.Core
2832     * @since 8
2833     * @deprecated since 9
2834     */
2835    AUDIO_VIDEO_CAMCORDER = 0x0434,
2836    /**
2837     * Audio or video monitor.
2838     *
2839     * @syscap SystemCapability.Communication.Bluetooth.Core
2840     * @since 8
2841     * @deprecated since 9
2842     */
2843    AUDIO_VIDEO_VIDEO_MONITOR = 0x0438,
2844    /**
2845     * Video display or loudspeaker.
2846     *
2847     * @syscap SystemCapability.Communication.Bluetooth.Core
2848     * @since 8
2849     * @deprecated since 9
2850     */
2851    AUDIO_VIDEO_VIDEO_DISPLAY_AND_LOUDSPEAKER = 0x043C,
2852    /**
2853     * Video conferencing device.
2854     *
2855     * @syscap SystemCapability.Communication.Bluetooth.Core
2856     * @since 8
2857     * @deprecated since 9
2858     */
2859    AUDIO_VIDEO_VIDEO_CONFERENCING = 0x0440,
2860    /**
2861     * Audio or video gaming toy.
2862     *
2863     * @syscap SystemCapability.Communication.Bluetooth.Core
2864     * @since 8
2865     * @deprecated since 9
2866     */
2867    AUDIO_VIDEO_VIDEO_GAMING_TOY = 0x0448,
2868
2869    /**
2870     * Peripheral Major Class
2871     *
2872     * @syscap SystemCapability.Communication.Bluetooth.Core
2873     * @since 8
2874     * @deprecated since 9
2875     */
2876    PERIPHERAL_NON_KEYBOARD_NON_POINTING = 0x0500,
2877    /**
2878     * Keyboard device.
2879     *
2880     * @syscap SystemCapability.Communication.Bluetooth.Core
2881     * @since 8
2882     * @deprecated since 9
2883     */
2884    PERIPHERAL_KEYBOARD = 0x0540,
2885    /**
2886     * Pointing peripheral device.
2887     *
2888     * @syscap SystemCapability.Communication.Bluetooth.Core
2889     * @since 8
2890     * @deprecated since 9
2891     */
2892    PERIPHERAL_POINTING_DEVICE = 0x0580,
2893    /**
2894     * Keyboard pointing device.
2895     *
2896     * @syscap SystemCapability.Communication.Bluetooth.Core
2897     * @since 8
2898     * @deprecated since 9
2899     */
2900    PERIPHERAL_KEYBOARD_POINTING = 0x05C0,
2901    /**
2902     * Unclassified peripheral device.
2903     *
2904     * @syscap SystemCapability.Communication.Bluetooth.Core
2905     * @since 8
2906     * @deprecated since 9
2907     */
2908    PERIPHERAL_UNCATEGORIZED = 0x0500,
2909    /**
2910     * Peripheral joystick.
2911     *
2912     * @syscap SystemCapability.Communication.Bluetooth.Core
2913     * @since 8
2914     * @deprecated since 9
2915     */
2916    PERIPHERAL_JOYSTICK = 0x0504,
2917    /**
2918     * Peripheral game pad.
2919     *
2920     * @syscap SystemCapability.Communication.Bluetooth.Core
2921     * @since 8
2922     * @deprecated since 9
2923     */
2924    PERIPHERAL_GAMEPAD = 0x0508,
2925    /**
2926     * Peripheral remote control device.
2927     *
2928     * @syscap SystemCapability.Communication.Bluetooth.Core
2929     * @since 8
2930     * @deprecated since 9
2931     */
2932    PERIPHERAL_REMOTE_CONTROL = 0x05C0,
2933    /**
2934     * Peripheral sensing device.
2935     *
2936     * @syscap SystemCapability.Communication.Bluetooth.Core
2937     * @since 8
2938     * @deprecated since 9
2939     */
2940    PERIPHERAL_SENSING_DEVICE = 0x0510,
2941    /**
2942     * Peripheral digitizer tablet.
2943     *
2944     * @syscap SystemCapability.Communication.Bluetooth.Core
2945     * @since 8
2946     * @deprecated since 9
2947     */
2948    PERIPHERAL_DIGITIZER_TABLET = 0x0514,
2949    /**
2950     * Peripheral card reader.
2951     *
2952     * @syscap SystemCapability.Communication.Bluetooth.Core
2953     * @since 8
2954     * @deprecated since 9
2955     */
2956    PERIPHERAL_CARD_READER = 0x0518,
2957    /**
2958     * Peripheral digital pen.
2959     *
2960     * @syscap SystemCapability.Communication.Bluetooth.Core
2961     * @since 8
2962     * @deprecated since 9
2963     */
2964    PERIPHERAL_DIGITAL_PEN = 0x051C,
2965    /**
2966     * Peripheral RFID scanner.
2967     *
2968     * @syscap SystemCapability.Communication.Bluetooth.Core
2969     * @since 8
2970     * @deprecated since 9
2971     */
2972    PERIPHERAL_SCANNER_RFID = 0x0520,
2973    /**
2974     * Gesture input device.
2975     *
2976     * @syscap SystemCapability.Communication.Bluetooth.Core
2977     * @since 8
2978     * @deprecated since 9
2979     */
2980    PERIPHERAL_GESTURAL_INPUT = 0x0522,
2981
2982    /**
2983     * Imaging Major Class
2984     *
2985     * @syscap SystemCapability.Communication.Bluetooth.Core
2986     * @since 8
2987     * @deprecated since 9
2988     */
2989    IMAGING_UNCATEGORIZED = 0x0600,
2990    /**
2991     * Imaging display device.
2992     *
2993     * @syscap SystemCapability.Communication.Bluetooth.Core
2994     * @since 8
2995     * @deprecated since 9
2996     */
2997    IMAGING_DISPLAY = 0x0610,
2998    /**
2999     * Imaging camera device.
3000     *
3001     * @syscap SystemCapability.Communication.Bluetooth.Core
3002     * @since 8
3003     * @deprecated since 9
3004     */
3005    IMAGING_CAMERA = 0x0620,
3006    /**
3007     * Imaging scanner.
3008     *
3009     * @syscap SystemCapability.Communication.Bluetooth.Core
3010     * @since 8
3011     * @deprecated since 9
3012     */
3013    IMAGING_SCANNER = 0x0640,
3014    /**
3015     * Imaging printer.
3016     *
3017     * @syscap SystemCapability.Communication.Bluetooth.Core
3018     * @since 8
3019     * @deprecated since 9
3020     */
3021    IMAGING_PRINTER = 0x0680,
3022
3023    /**
3024     * Wearable Major Class
3025     *
3026     * @syscap SystemCapability.Communication.Bluetooth.Core
3027     * @since 8
3028     * @deprecated since 9
3029     */
3030    WEARABLE_UNCATEGORIZED = 0x0700,
3031    /**
3032     * Smart watch.
3033     *
3034     * @syscap SystemCapability.Communication.Bluetooth.Core
3035     * @since 8
3036     * @deprecated since 9
3037     */
3038    WEARABLE_WRIST_WATCH = 0x0704,
3039    /**
3040     * Wearable pager.
3041     *
3042     * @syscap SystemCapability.Communication.Bluetooth.Core
3043     * @since 8
3044     * @deprecated since 9
3045     */
3046    WEARABLE_PAGER = 0x0708,
3047    /**
3048     * Smart jacket.
3049     *
3050     * @syscap SystemCapability.Communication.Bluetooth.Core
3051     * @since 8
3052     * @deprecated since 9
3053     */
3054    WEARABLE_JACKET = 0x070C,
3055    /**
3056     * Wearable helmet.
3057     *
3058     * @syscap SystemCapability.Communication.Bluetooth.Core
3059     * @since 8
3060     * @deprecated since 9
3061     */
3062    WEARABLE_HELMET = 0x0710,
3063    /**
3064     * Wearable glasses.
3065     *
3066     * @syscap SystemCapability.Communication.Bluetooth.Core
3067     * @since 8
3068     * @deprecated since 9
3069     */
3070    WEARABLE_GLASSES = 0x0714,
3071
3072    /**
3073     * Minor Device Class field - Toy Major Class
3074     *
3075     * @syscap SystemCapability.Communication.Bluetooth.Core
3076     * @since 8
3077     * @deprecated since 9
3078     */
3079    TOY_UNCATEGORIZED = 0x0800,
3080    /**
3081     * Toy robot.
3082     *
3083     * @syscap SystemCapability.Communication.Bluetooth.Core
3084     * @since 8
3085     * @deprecated since 9
3086     */
3087    TOY_ROBOT = 0x0804,
3088    /**
3089     * Toy vehicle.
3090     *
3091     * @syscap SystemCapability.Communication.Bluetooth.Core
3092     * @since 8
3093     * @deprecated since 9
3094     */
3095    TOY_VEHICLE = 0x0808,
3096    /**
3097     * Humanoid toy doll.
3098     *
3099     * @syscap SystemCapability.Communication.Bluetooth.Core
3100     * @since 8
3101     * @deprecated since 9
3102     */
3103    TOY_DOLL_ACTION_FIGURE = 0x080C,
3104    /**
3105     * Toy controller.
3106     *
3107     * @syscap SystemCapability.Communication.Bluetooth.Core
3108     * @since 8
3109     * @deprecated since 9
3110     */
3111    TOY_CONTROLLER = 0x0810,
3112    /**
3113     * Toy gaming device.
3114     *
3115     * @syscap SystemCapability.Communication.Bluetooth.Core
3116     * @since 8
3117     * @deprecated since 9
3118     */
3119    TOY_GAME = 0x0814,
3120
3121    /**
3122     * Minor Device Class field - Health
3123     *
3124     * @syscap SystemCapability.Communication.Bluetooth.Core
3125     * @since 8
3126     * @deprecated since 9
3127     */
3128    HEALTH_UNCATEGORIZED = 0x0900,
3129    /**
3130     * Blood pressure device.
3131     *
3132     * @syscap SystemCapability.Communication.Bluetooth.Core
3133     * @since 8
3134     * @deprecated since 9
3135     */
3136    HEALTH_BLOOD_PRESSURE = 0x0904,
3137    /**
3138     * Thermometer.
3139     *
3140     * @syscap SystemCapability.Communication.Bluetooth.Core
3141     * @since 8
3142     * @deprecated since 9
3143     */
3144    HEALTH_THERMOMETER = 0x0908,
3145    /**
3146     * Body scale.
3147     *
3148     * @syscap SystemCapability.Communication.Bluetooth.Core
3149     * @since 8
3150     * @deprecated since 9
3151     */
3152    HEALTH_WEIGHING = 0x090C,
3153    /**
3154     * Blood glucose monitor.
3155     *
3156     * @syscap SystemCapability.Communication.Bluetooth.Core
3157     * @since 8
3158     * @deprecated since 9
3159     */
3160    HEALTH_GLUCOSE = 0x0910,
3161    /**
3162     * Pulse oximeter.
3163     *
3164     * @syscap SystemCapability.Communication.Bluetooth.Core
3165     * @since 8
3166     * @deprecated since 9
3167     */
3168    HEALTH_PULSE_OXIMETER = 0x0914,
3169    /**
3170     * Heart rate monitor.
3171     *
3172     * @syscap SystemCapability.Communication.Bluetooth.Core
3173     * @since 8
3174     * @deprecated since 9
3175     */
3176    HEALTH_PULSE_RATE = 0x0918,
3177    /**
3178     * Health data display.
3179     *
3180     * @syscap SystemCapability.Communication.Bluetooth.Core
3181     * @since 8
3182     * @deprecated since 9
3183     */
3184    HEALTH_DATA_DISPLAY = 0x091C,
3185    /**
3186     * Step counter.
3187     *
3188     * @syscap SystemCapability.Communication.Bluetooth.Core
3189     * @since 8
3190     * @deprecated since 9
3191     */
3192    HEALTH_STEP_COUNTER = 0x0920,
3193    /**
3194     * Body composition analyzer.
3195     *
3196     * @syscap SystemCapability.Communication.Bluetooth.Core
3197     * @since 8
3198     * @deprecated since 9
3199     */
3200    HEALTH_BODY_COMPOSITION_ANALYZER = 0x0924,
3201    /**
3202     * Hygrometer.
3203     *
3204     * @syscap SystemCapability.Communication.Bluetooth.Core
3205     * @since 8
3206     * @deprecated since 9
3207     */
3208    HEALTH_PEAK_FLOW_MOITOR = 0x0928,
3209    /**
3210     * Medication monitor.
3211     *
3212     * @syscap SystemCapability.Communication.Bluetooth.Core
3213     * @since 8
3214     * @deprecated since 9
3215     */
3216    HEALTH_MEDICATION_MONITOR = 0x092C,
3217    /**
3218     * Prosthetic knee.
3219     *
3220     * @syscap SystemCapability.Communication.Bluetooth.Core
3221     * @since 8
3222     * @deprecated since 9
3223     */
3224    HEALTH_KNEE_PROSTHESIS = 0x0930,
3225    /**
3226     * Prosthetic ankle.
3227     *
3228     * @syscap SystemCapability.Communication.Bluetooth.Core
3229     * @since 8
3230     * @deprecated since 9
3231     */
3232    HEALTH_ANKLE_PROSTHESIS = 0x0934,
3233    /**
3234     * Generic health management device.
3235     *
3236     * @syscap SystemCapability.Communication.Bluetooth.Core
3237     * @since 8
3238     * @deprecated since 9
3239     */
3240    HEALTH_GENERIC_HEALTH_MANAGER = 0x0938,
3241    /**
3242     * Personal mobility device.
3243     *
3244     * @syscap SystemCapability.Communication.Bluetooth.Core
3245     * @since 8
3246     * @deprecated since 9
3247     */
3248    HEALTH_PERSONAL_MOBILITY_DEVICE = 0x093C
3249  }
3250
3251  /**
3252   * Profile state change parameters.
3253   *
3254   * @typedef StateChangeParam
3255   * @syscap SystemCapability.Communication.Bluetooth.Core
3256   * @since 8
3257   * @deprecated since 9
3258   * @useinstead ohos.bluetoothManager/bluetoothManager.StateChangeParam
3259   */
3260  interface StateChangeParam {
3261    /**
3262     * The address of device
3263     *
3264     * @syscap SystemCapability.Communication.Bluetooth.Core
3265     * @since 8
3266     * @deprecated since 9
3267     */
3268    deviceId: string;
3269
3270    /**
3271     * Profile state value
3272     *
3273     * @syscap SystemCapability.Communication.Bluetooth.Core
3274     * @since 8
3275     * @deprecated since 9
3276     */
3277    state: ProfileConnectionState;
3278  }
3279
3280  /**
3281   * The enum of a2dp playing state.
3282   *
3283   * @enum { number }
3284   * @syscap SystemCapability.Communication.Bluetooth.Core
3285   * @since 8
3286   * @deprecated since 9
3287   * @useinstead ohos.bluetoothManager/bluetoothManager.PlayingState
3288   */
3289  enum PlayingState {
3290    /**
3291     * Not playing.
3292     *
3293     * @syscap SystemCapability.Communication.Bluetooth.Core
3294     * @since 8
3295     * @deprecated since 9
3296     */
3297    STATE_NOT_PLAYING,
3298    /**
3299     * Playing.
3300     *
3301     * @syscap SystemCapability.Communication.Bluetooth.Core
3302     * @since 8
3303     * @deprecated since 9
3304     */
3305    STATE_PLAYING
3306  }
3307
3308  /**
3309   * The enum of profile id.
3310   *
3311   * @enum { number }
3312   * @syscap SystemCapability.Communication.Bluetooth.Core
3313   * @since 7
3314   * @deprecated since 9
3315   * @useinstead ohos.bluetoothManager/bluetoothManager.ProfileId
3316   */
3317  enum ProfileId {
3318    /**
3319     * A2DP profile.
3320     *
3321     * @syscap SystemCapability.Communication.Bluetooth.Core
3322     * @since 8
3323     * @deprecated since 9
3324     */
3325    PROFILE_A2DP_SOURCE = 1,
3326
3327    /**
3328     * HFP profile.
3329     *
3330     * @syscap SystemCapability.Communication.Bluetooth.Core
3331     * @since 8
3332     * @deprecated since 9
3333     */
3334    PROFILE_HANDS_FREE_AUDIO_GATEWAY = 4
3335  }
3336}
3337
3338export default bluetooth;
3339