From 387c9bd593dfcf4211e30e24458239c3feb7f012 Mon Sep 17 00:00:00 2001 From: z-hf Date: Thu, 27 Jul 2023 16:48:48 +0800 Subject: [PATCH] =?UTF-8?q?ts=E6=96=87=E4=BB=B6=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: z-hf Change-Id: I4383ad9312db3627ce1b037ed6f4814383483559 --- api/@ohos.cooperate.d.ts | 24 +++++++++++++++------ api/@ohos.deviceStatus.dragInteraction.d.ts | 8 ++++++- 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/api/@ohos.cooperate.d.ts b/api/@ohos.cooperate.d.ts index a55bf30e85..df1da243fd 100644 --- a/api/@ohos.cooperate.d.ts +++ b/api/@ohos.cooperate.d.ts @@ -31,7 +31,7 @@ declare namespace cooperate { * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate * @systemapi Hide this for inner system use. */ - enum CooperateMsg { + enum CooperateMessage { /** * Preparing for screen hopping. * @@ -70,7 +70,7 @@ declare namespace cooperate { * @since 10 * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate */ - COOPERATE_ACTIVATE_FAIL = 4, + COOPERATE_ACTIVATE_FAILURE = 4, /** * Success in stopping screen hopping. @@ -86,7 +86,7 @@ declare namespace cooperate { * @since 10 * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate */ - COOPERATE_DEACTIVATE_FAIL = 6, + COOPERATE_DEACTIVATE_FAILURE = 6, /** * Inter-device session disconnected. @@ -104,6 +104,7 @@ declare namespace cooperate { * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate * @systemapi Hide this for inner system use. * @param callback Asynchronous callback used to return the operation result. + * @throws { BusinessError } 202 - The application is not a system application. * @throws {BusinessError} 401 - Parameter error. */ function prepare(callback: AsyncCallback): void; @@ -114,6 +115,7 @@ declare namespace cooperate { * @since 10 * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate * @systemapi Hide this for inner system use. + * @throws { BusinessError } 202 - The application is not a system application. * @throws {BusinessError} 401 - Parameter error. */ function prepare(): Promise; @@ -125,6 +127,7 @@ declare namespace cooperate { * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate * @systemapi Hide this for inner system use. * @param callback Asynchronous callback used to return the operation result. + * @throws { BusinessError } 202 - The application is not a system application. * @throws {BusinessError} 401 - Parameter error. */ function unprepare(callback: AsyncCallback): void; @@ -135,6 +138,7 @@ declare namespace cooperate { * @since 10 * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate * @systemapi Hide this for inner system use. + * @throws { BusinessError } 202 - The application is not a system application. * @throws {BusinessError} 401 - Parameter error. */ function unprepare(): Promise; @@ -148,6 +152,7 @@ declare namespace cooperate { * @param targetNetworkId Descriptor of the target device for screen hopping. * @param inputDeviceId Identifier of the input device for screen hopping. * @param callback Asynchronous callback used to return the operation result. + * @throws { BusinessError } 202 - The application is not a system application. * @throws {BusinessError} 401 - Parameter error. * @throws {BusinessError} 20900001 - Operation failed. */ @@ -161,6 +166,7 @@ declare namespace cooperate { * @systemapi Hide this for inner system use. * @param targetNetworkId Descriptor of the target device for screen hopping. * @param inputDeviceId Identifier of the input device for screen hopping. + * @throws { BusinessError } 202 - The application is not a system application. * @throws {BusinessError} 401 - Parameter error. * @throws {BusinessError} 20900001 - Operation failed. */ @@ -174,6 +180,7 @@ declare namespace cooperate { * @systemapi Hide this for inner system use. * @param callback Asynchronous callback used to return the operation result. * @param isUnchained Whether the cross-device link is unchained. + * @throws { BusinessError } 202 - The application is not a system application. * @throws {BusinessError} 401 - Parameter error. */ function deactivate(isUnchained: boolean, callback: AsyncCallback): void; @@ -196,6 +203,7 @@ declare namespace cooperate { * @systemapi Hide this for inner system use. * @param networkId Descriptor of the target device for screen hopping. * @param callback Asynchronous callback used to return the screen hopping status. + * @throws { BusinessError } 202 - The application is not a system application. * @throws {BusinessError} 401 - Parameter error. */ function getCrossingSwitchState(networkId: string, callback: AsyncCallback): void; @@ -207,6 +215,7 @@ declare namespace cooperate { * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate * @systemapi Hide this for inner system use. * @param networkId Descriptor of the target device for screen hopping. + * @throws { BusinessError } 202 - The application is not a system application. * @throws {BusinessError} 401 - Parameter error. */ function getCrossingSwitchState(networkId: string): Promise; @@ -219,9 +228,10 @@ declare namespace cooperate { * @systemapi Hide this for inner system use. * @param type Change type. * @param callback Asynchronous callback used to return the screen hopping status change event. + * @throws { BusinessError } 202 - The application is not a system application. * @throws {BusinessError} 401 - Parameter error. */ - function on(type: 'cooperate', callback: Callback<{ networkId: string, msg: CooperateMsg }>): void; + function on(type: 'cooperate', callback: Callback<{ networkId: string, message: CooperateMessage }>): void; /** * Disables listening for screen hopping status change events. @@ -230,10 +240,12 @@ declare namespace cooperate { * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate * @systemapi Hide this for inner system use. * @param type Change type. - * @param callback Callback for which listening is disabled. If this parameter is not specified, listening will be disabled for all registered callbacks. + * @param callback Callback for which listening is disabled. If this parameter is not specified, + * listening will be disabled for all registered callbacks. + * @throws { BusinessError } 202 - The application is not a system application. * @throws {BusinessError} 401 - Parameter error. */ - function off(type: 'cooperate', callback?: Callback): void; + function off(type: 'cooperate', callback?: Callback<{ networkId: string, message: CooperateMessage }>): void; } export default cooperate; \ No newline at end of file diff --git a/api/@ohos.deviceStatus.dragInteraction.d.ts b/api/@ohos.deviceStatus.dragInteraction.d.ts index 4627b8494e..49b1aff54d 100644 --- a/api/@ohos.deviceStatus.dragInteraction.d.ts +++ b/api/@ohos.deviceStatus.dragInteraction.d.ts @@ -35,6 +35,7 @@ declare namespace dragInteraction { * Dragging starts. * * @since 10 + * @systemapi Hide this for inner system use. * @syscap SystemCapability.Msdp.DeviceStatus.Drag */ MSG_DRAG_STATE_START = 1, @@ -43,6 +44,7 @@ declare namespace dragInteraction { * Dragging ends. * * @since 10 + * @systemapi Hide this for inner system use. * @syscap SystemCapability.Msdp.DeviceStatus.Drag */ MSG_DRAG_STATE_STOP = 2, @@ -51,6 +53,7 @@ declare namespace dragInteraction { * Dragging is canceled. * * @since 10 + * @systemapi Hide this for inner system use. * @syscap SystemCapability.Msdp.DeviceStatus.Drag */ MSG_DRAG_STATE_CANCEL = 3, @@ -64,6 +67,7 @@ declare namespace dragInteraction { * @systemapi Hide this for inner system use. * @param type Indicates the event type. * @param callback Indicates the callback to receive the changed dragging state. + * @throws { BusinessError } 202 - The application is not a system application. * @throws {BusinessError} 401 - Parameter error. */ function on(type: 'drag', callback: Callback): void; @@ -75,7 +79,9 @@ declare namespace dragInteraction { * @syscap SystemCapability.Msdp.DeviceStatus.Drag * @systemapi Hide this for inner system use. * @param type Indicates the event type. - * @param callback Indicates the callback for which listening is disabled. If this parameter is not specified, listening will be disabled for all registered callbacks. + * @param callback Indicates the callback for which listening is disabled. If this parameter is not specified, + * listening will be disabled for all registered callbacks. + * @throws { BusinessError } 202 - The application is not a system application. * @throws {BusinessError} 401 - Parameter error. */ function off(type: 'drag', callback?: Callback): void; -- Gitee