diff --git a/api/@ohos.bluetooth.socket.d.ts b/api/@ohos.bluetooth.socket.d.ts index c44b7866c50850a33e3ba15ee5640f0d51e31c26..d7a27bc0a0a6a39dc711093fd551a80981ef773b 100644 --- a/api/@ohos.bluetooth.socket.d.ts +++ b/api/@ohos.bluetooth.socket.d.ts @@ -48,6 +48,16 @@ declare namespace socket { */ function sppListen(name: string, options: SppOptions, callback: AsyncCallback): void; + /** + * Get l2cap socket psm. + * + * @param { number } serverSocket - Indicates the server socket ID, returned by {@link sppListen}. + * @returns { number } Returns the l2cap socket psm + * @syscap SystemCapability.Communication.Bluetooth.Core + * @since 20 + * @arkts 1.1&1.2 + */ + function getL2capPsm(serverSocket: number): number; /** * Waits for a remote device to connect. * @@ -231,6 +241,15 @@ declare namespace socket { * @since 10 */ type: SppType; + /** + * l2cap protocol service multiplexer + * + * @type { ?number } + * @syscap SystemCapability.Communication.Bluetooth.Core + * @since 20 + * @arkts 1.1&1.2 + */ + psm?: number; } /** @@ -247,7 +266,23 @@ declare namespace socket { * @syscap SystemCapability.Communication.Bluetooth.Core * @since 10 */ - SPP_RFCOMM + SPP_RFCOMM = 0, + /** + * L2CAP of the BR type + * + * @syscap SystemCapability.Communication.Bluetooth.Core + * @since 20 + * @arkts 1.1&1.2 + */ + SPP_L2CAP = 1, + /** + * L2CAP of the BLE type + * + * @syscap SystemCapability.Communication.Bluetooth.Core + * @since 20 + * @arkts 1.1&1.2 + */ + SPP_L2CAP_BLE = 2 } }