From 014a4a7547615b560e330cb1294e6ce67d0b657d Mon Sep 17 00:00:00 2001 From: z-hf Date: Mon, 31 Jul 2023 11:52:35 +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: Ic381bb845dd49fc7ed1caaa2c21067d5ab746648 --- .../apis/js-apis-devicestatus-cooperate.md | 18 +++++++++--------- ...-devicestatus.md => errorcode-cooperate.md} | 0 2 files changed, 9 insertions(+), 9 deletions(-) rename zh-cn/application-dev/reference/errorcodes/{errorcode-devicestatus.md => errorcode-cooperate.md} (100%) diff --git a/zh-cn/application-dev/reference/apis/js-apis-devicestatus-cooperate.md b/zh-cn/application-dev/reference/apis/js-apis-devicestatus-cooperate.md index 980c45ab910..6be8099f044 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-devicestatus-cooperate.md +++ b/zh-cn/application-dev/reference/apis/js-apis-devicestatus-cooperate.md @@ -152,7 +152,7 @@ activate(targetNetworkId: string, inputDeviceId: number, callback: AsyncCallback **错误码:** -以下错误码的详细介绍请参见[ohos.devicestatus错误码](../errorcodes/errorcode-devicestatus.md)。 +以下错误码的详细介绍请参见[ohos.devicestatus错误码](../errorcodes/errorcode-cooperate.md)。 | 错误码ID | 错误信息 | | -------- | ---------------------------------------- | @@ -201,7 +201,7 @@ activate(targetNetworkId: string, inputDeviceId: number): Promise<void>; **错误码:** -以下错误码的详细介绍请参见[ohos.devicestatus错误码](../errorcodes/errorcode-devicestatus.md)。 +以下错误码的详细介绍请参见[ohos.devicestatus错误码](../errorcodes/errorcode-cooperate.md)。 | 错误码ID | 错误信息 | | -------- | ---------------------------------------- | @@ -367,7 +367,7 @@ try { ## on('cooperate') -on(type: 'cooperate', callback: Callback<{ networkId: string, msg: CooperateMsg }>): void; +on(type: 'cooperate', callback: Callback<{ networkId: string, message: CooperateMessage }>): void; 注册监听键鼠穿越状态。 @@ -378,7 +378,7 @@ on(type: 'cooperate', callback: Callback<{ networkId: string, msg: CooperateM | 参数名 | 类型 | 必填 | 说明 | | -------- | ---------------------------- | ---- | ---------------------------- | | type | string | 是 | 监听类型,取值为”cooperate“ | -| callback | Callback<{ networkId: string, msg: [CooperateMsg](#cooperatemsg) }> | 是 | 回调函数,异步返回键鼠穿越状态消息 | +| callback | Callback<{ networkId: string, message: [CooperateMessage](#cooperatemessage) }> | 是 | 回调函数,异步返回键鼠穿越状态消息 | @@ -396,7 +396,7 @@ try { ## off('cooperate') -off(type: 'cooperate', callback?: Callback<void>): void; +off(type: 'cooperate', callback?: Callback<{ networkId: string, message: CooperateMessage }>): void; 取消监听键鼠穿越状态。 @@ -407,7 +407,7 @@ off(type: 'cooperate', callback?: Callback<void>): void; | 参数名 | 类型 | 必填 | 说明 | | -------- | ---------------------------- | ---- | ---------------------------- | | type | string | 是 | 监听类型,取值为“cooperate” | -| callback | AsyncCallback<void> | 否 | 需要取消注册的回调函数,若无此参数,则取消当前应用注册的所有回调函数。 | +| callback | Callback<{ networkId: string, message: [CooperateMessage](#cooperatemessage) }> | 否 | 需要取消注册的回调函数,若无此参数,则取消当前应用注册的所有回调函数。 | @@ -440,7 +440,7 @@ try { } ``` -## CooperateMsg +## CooperateMessage 键鼠穿越的消息通知。 @@ -452,7 +452,7 @@ try { | COOPERATE_UNPREPARE | 1 | 表示取消键鼠穿越准备。 | | COOPERATE_ACTIVATE | 2 | 表示启动键鼠穿越。 | | COOPERATE_ACTIVATE_SUCCESS | 3 | 表示键鼠穿越启动成功。 | -| COOPERATE_ACTIVATE_FAIL | 4 | 表示键鼠穿越启动失败。 | +| COOPERATE_ACTIVATE_FAILURE | 4 | 表示键鼠穿越启动失败。 | | COOPERATE_DEACTIVATE_SUCCESS | 5 | 表示键鼠穿越停止成功。 | -| COOPERATE_DEACTIVATE_FAIL | 6 | 表示键鼠穿越停止失败。 | +| COOPERATE_DEACTIVATE_FAILURE | 6 | 表示键鼠穿越停止失败。 | | COOPERATE_SESSION_DISCONNECTED | 7 | 表示键鼠穿越会话断开 | diff --git a/zh-cn/application-dev/reference/errorcodes/errorcode-devicestatus.md b/zh-cn/application-dev/reference/errorcodes/errorcode-cooperate.md similarity index 100% rename from zh-cn/application-dev/reference/errorcodes/errorcode-devicestatus.md rename to zh-cn/application-dev/reference/errorcodes/errorcode-cooperate.md -- Gitee