From 07c96eb507d8aade1e1b7a591e9025f05bd1e0bc Mon Sep 17 00:00:00 2001 From: KangPeng Date: Fri, 12 Sep 2025 16:13:57 +0800 Subject: [PATCH] =?UTF-8?q?coordination=20arkts1.2=E9=9D=99=E6=80=81?= =?UTF-8?q?=E5=8C=96=E6=8E=A5=E5=8F=A3=E9=80=82=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: KangPeng --- api/@ohos.cooperate.d.ts | 147 ++++++++++++++++++++++++--------------- 1 file changed, 92 insertions(+), 55 deletions(-) diff --git a/api/@ohos.cooperate.d.ts b/api/@ohos.cooperate.d.ts index 0e6f542820..fc776817ee 100644 --- a/api/@ohos.cooperate.d.ts +++ b/api/@ohos.cooperate.d.ts @@ -27,7 +27,8 @@ import { Callback } from './@ohos.base'; * @namespace cooperate * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate * @systemapi Hide this for inner system use. - * @since 10 dynamic + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace cooperate { /** @@ -136,7 +137,8 @@ declare namespace cooperate { * @enum { number } * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate * @systemapi Hide this for inner system use. - * @since 11 dynamic + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ enum CooperateState { /** @@ -144,7 +146,8 @@ declare namespace cooperate { * * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate * @systemapi Hide this for inner system use. - * @since 11 dynamic + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ COOPERATE_PREPARE = 0, @@ -153,7 +156,8 @@ declare namespace cooperate { * * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate * @systemapi Hide this for inner system use. - * @since 11 dynamic + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ COOPERATE_UNPREPARE = 1, @@ -162,7 +166,8 @@ declare namespace cooperate { * * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate * @systemapi Hide this for inner system use. - * @since 11 dynamic + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ COOPERATE_ACTIVATE = 2, @@ -171,7 +176,8 @@ declare namespace cooperate { * * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate * @systemapi Hide this for inner system use. - * @since 11 dynamic + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ COOPERATE_ACTIVATE_SUCCESS = 3, @@ -180,7 +186,8 @@ declare namespace cooperate { * * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate * @systemapi Hide this for inner system use. - * @since 11 dynamic + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ COOPERATE_ACTIVATE_FAILURE = 4, @@ -189,7 +196,8 @@ declare namespace cooperate { * * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate * @systemapi Hide this for inner system use. - * @since 11 dynamic + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ COOPERATE_DEACTIVATE_SUCCESS = 5, @@ -198,7 +206,8 @@ declare namespace cooperate { * * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate * @systemapi Hide this for inner system use. - * @since 11 dynamic + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ COOPERATE_DEACTIVATE_FAILURE = 6, @@ -207,7 +216,8 @@ declare namespace cooperate { * * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate * @systemapi Hide this for inner system use. - * @since 11 dynamic + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ COOPERATE_SESSION_DISCONNECTED = 7, } @@ -218,7 +228,8 @@ declare namespace cooperate { * @interface CooperateMessage * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate * @systemapi Hide this for inner system use. - * @since 11 dynamic + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface CooperateMessage { /** @@ -227,7 +238,8 @@ declare namespace cooperate { * @type { string } * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate * @systemapi Hide this for inner system use. - * @since 11 dynamic + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ networkId: string; @@ -237,7 +249,8 @@ declare namespace cooperate { * @type { CooperateState } * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate * @systemapi Hide this for inner system use. - * @since 11 dynamic + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ state: CooperateState; } @@ -248,48 +261,53 @@ declare namespace cooperate { * @typedef MouseLocation * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate * @systemapi Hide this for inner system use. - * @since 12 dynamic + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface MouseLocation { /** * The mouse pointer is located at the X coordinate on the screen. * - * @type { number } + * @type { int } * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate * @systemapi Hide this for inner system use. - * @since 12 dynamic + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - displayX: number; + displayX: int; /** * The mouse pointer is located at the Y coordinate on the screen. * - * @type { number } + * @type { int } * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate * @systemapi Hide this for inner system use. - * @since 12 dynamic + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - displayY: number; + displayY: int; /** * Screen width. * - * @type { number } + * @type { int } * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate * @systemapi Hide this for inner system use. - * @since 12 dynamic + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - displayWidth: number; + displayWidth: int; /** * Screen height. * - * @type { number } + * @type { int } * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate * @systemapi Hide this for inner system use. - * @since 12 dynamic + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - displayHeight: number; + displayHeight: int; } /** @@ -333,7 +351,8 @@ declare namespace cooperate { *
2.Incorrect parameter types.3.Parameter verification failed. * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate * @systemapi Hide this for inner system use. - * @since 11 dynamic + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ function prepareCooperate(callback: AsyncCallback): void; @@ -348,7 +367,8 @@ declare namespace cooperate { *
2.Incorrect parameter types.3.Parameter verification failed. * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate * @systemapi Hide this for inner system use. - * @since 11 dynamic + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ function prepareCooperate(): Promise; @@ -393,7 +413,8 @@ declare namespace cooperate { *
2.Incorrect parameter types.3.Parameter verification failed. * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate * @systemapi Hide this for inner system use. - * @since 11 dynamic + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ function unprepareCooperate(callback: AsyncCallback): void; @@ -406,7 +427,8 @@ declare namespace cooperate { * @throws {BusinessError} 202 - Permission verification failed. A non-system application calls a system API. * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate * @systemapi Hide this for inner system use. - * @since 11 dynamic + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ function unprepareCooperate(): Promise; @@ -453,7 +475,7 @@ declare namespace cooperate { * * @permission ohos.permission.COOPERATE_MANAGER * @param { string } targetNetworkId - Descriptor of the target device for screen hopping. - * @param { number } inputDeviceId - Identifier of the input device for screen hopping. + * @param { int } inputDeviceId - Identifier of the input device for screen hopping. * @param { AsyncCallback } callback - Asynchronous callback used to return the operation result. * @throws {BusinessError} 201 - Permission denied. * @throws {BusinessError} 202 - Permission verification failed. A non-system application calls a system API. @@ -463,16 +485,17 @@ declare namespace cooperate { *
container-related exception, or IPC exception. 2. N-API invocation exception or invalid N-API status. * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate * @systemapi Hide this for inner system use. - * @since 11 dynamic + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - function activateCooperate(targetNetworkId: string, inputDeviceId: number, callback: AsyncCallback): void; + function activateCooperate(targetNetworkId: string, inputDeviceId: int, callback: AsyncCallback): void; /** * Starts screen hopping. * * @permission ohos.permission.COOPERATE_MANAGER * @param { string } targetNetworkId - Descriptor of the target device for screen hopping. - * @param { number }inputDeviceId - Identifier of the input device for screen hopping. + * @param { int }inputDeviceId - Identifier of the input device for screen hopping. * @returns { Promise } the promise returned by the function. * @throws {BusinessError} 201 - Permission denied. * @throws {BusinessError} 202 - Permission verification failed. A non-system application calls a system API. @@ -482,9 +505,10 @@ declare namespace cooperate { *
container-related exception, or IPC exception. 2. N-API invocation exception or invalid N-API status. * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate * @systemapi Hide this for inner system use. - * @since 11 dynamic + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - function activateCooperate(targetNetworkId: string, inputDeviceId: number): Promise; + function activateCooperate(targetNetworkId: string, inputDeviceId: int): Promise; /** * Stops screen hopping. @@ -528,7 +552,8 @@ declare namespace cooperate { *
2.Incorrect parameter types.3.Parameter verification failed. * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate * @systemapi Hide this for inner system use. - * @since 11 dynamic + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ function deactivateCooperate(isUnchained: boolean, callback: AsyncCallback): void; @@ -542,7 +567,8 @@ declare namespace cooperate { * @throws {BusinessError} 202 - Permission verification failed. A non-system application calls a system API. * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate * @systemapi Hide this for inner system use. - * @since 11 dynamic + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ function deactivateCooperate(isUnchained: boolean): Promise; @@ -592,7 +618,8 @@ declare namespace cooperate { *
2.Incorrect parameter types.3.Parameter verification failed. * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate * @systemapi Hide this for inner system use. - * @since 11 dynamic + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ function getCooperateSwitchState(networkId: string, callback: AsyncCallback): void; @@ -609,7 +636,8 @@ declare namespace cooperate { *
2.Incorrect parameter types.3.Parameter verification failed. * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate * @systemapi Hide this for inner system use. - * @since 11 dynamic + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ function getCooperateSwitchState(networkId: string): Promise; @@ -660,7 +688,8 @@ declare namespace cooperate { *
2.Incorrect parameter types.3.Parameter verification failed. * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate * @systemapi Hide this for inner system use. - * @since 11 dynamic + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ function on(type: 'cooperateMessage', callback: Callback): void; @@ -677,7 +706,8 @@ declare namespace cooperate { *
verification failed. * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate * @systemapi Hide this for inner system use. - * @since 11 dynamic + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ function off(type: 'cooperateMessage', callback?: Callback): void; @@ -694,7 +724,8 @@ declare namespace cooperate { *
2.Incorrect parameter types.3.Parameter verification failed. * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate * @systemapi Hide this for inner system use. - * @since 12 dynamic + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function on(type: 'cooperateMouse', networkId: string, callback: Callback): void; @@ -712,7 +743,8 @@ declare namespace cooperate { *
2.Incorrect parameter types.3.Parameter verification failed. * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate * @systemapi Hide this for inner system use. - * @since 12 dynamic + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function off(type: 'cooperateMouse', networkId: string, callback?: Callback): void; @@ -731,7 +763,8 @@ declare namespace cooperate { * @throws {BusinessError} 20900001 - Operation failed. * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate * @systemapi Hide this for inner system use. - * @since 20 dynamic + * @since arkts {'1.1':'20','1.2':'20'} + * @arkts 1.1&1.2 */ function activateCooperateWithOptions(targetNetworkId: string, inputDeviceId: number, cooperateOptions?: CooperateOptions @@ -742,39 +775,43 @@ declare namespace cooperate { * @interface { CooperateOptions } * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate * @systemapi Hide this for inner system use. - * @since 20 dynamic + * @since arkts {'1.1':'20','1.2':'20'} + * @arkts 1.1&1.2 */ interface CooperateOptions { /** * The mouse pointer is located at the X coordinate on the screen. * - * @type { number } + * @type { int } * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate * @systemapi Hide this for inner system use. - * @since 20 dynamic + * @since arkts {'1.1':'20','1.2':'20'} + * @arkts 1.1&1.2 */ - displayX: number; + displayX: int; /** * Identifier of the peer device screen. * - * @type { number } + * @type { int } * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate * @systemapi Hide this for inner system use. - * @since 20 dynamic + * @since arkts {'1.1':'20','1.2':'20'} + * @arkts 1.1&1.2 */ - displayId: number; + displayId: int; /** * The mouse pointer is located at the Y coordinate on the screen. * - * @type { number } + * @type { int } * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate * @systemapi Hide this for inner system use. - * @since 20 dynamic + * @since arkts {'1.1':'20','1.2':'20'} + * @arkts 1.1&1.2 */ - displayY: number; + displayY: int; } } -- Gitee