From 498ae57cfec53c79515e12d1e0afdbb20156e19f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A9=AC=E5=A3=AB=E8=BE=B0?= Date: Mon, 7 Jul 2025 12:11:23 +0800 Subject: [PATCH] git device transport api MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 马士辰 --- api/@ohos.bluetooth.connection.d.ts | 33 ++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/api/@ohos.bluetooth.connection.d.ts b/api/@ohos.bluetooth.connection.d.ts index 4436723f19..aae902bf9e 100644 --- a/api/@ohos.bluetooth.connection.d.ts +++ b/api/@ohos.bluetooth.connection.d.ts @@ -535,6 +535,21 @@ declare namespace connection { */ function getRemoteDeviceClass(deviceId: string): DeviceClass; + /** + * Get the transport of the bluetooth device. + * + * @param { string } deviceId - Indicates device ID. For example, "11:22:33:AA:BB:FF". + * @returns { BluetoothTransport } The transport of bluetooth device. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 2900001 - Service stopped. + * @throws { BusinessError } 2900003 - Bluetooth disabled. + * @throws { BusinessError } 2900099 - Get transport failed. + * @syscap SystemCapability.Communication.Bluetooth.Core + * @since 20 + * @arkts 1.1&1.2 + */ + function getRemoteDeviceTransport(deviceId: string): BluetoothTransport; + /** * Obtains the Bluetooth local name of a device. * @@ -1774,7 +1789,23 @@ declare namespace connection { * @syscap SystemCapability.Communication.Bluetooth.Core * @since 10 */ - TRANSPORT_LE = 1 + TRANSPORT_LE = 1, + /** + * The value of bluetooth transport DUAL. + * + * @syscap SystemCapability.Communication.Bluetooth.Core + * @since 20 + * @arkts 1.1&1.2 + */ + TRANSPORT_DUAL = 2, + /** + * The unknown bluetooth transport. + * + * @syscap SystemCapability.Communication.Bluetooth.Core + * @since 20 + * @arkts 1.1&1.2 + */ + TRANSPORT_UNKNOWN = 3 } /** -- Gitee