From 002df434702e6a1fd651ad652ef9bca79b25acf2 Mon Sep 17 00:00:00 2001 From: wuqi0105 Date: Wed, 14 Sep 2022 15:12:54 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E6=B7=BB=E5=8A=A0devicemanager=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wuqi0105 --- ...hos.distributedHardware.deviceManager.d.ts | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/api/@ohos.distributedHardware.deviceManager.d.ts b/api/@ohos.distributedHardware.deviceManager.d.ts index 698c80295c..b80e7b2d2e 100644 --- a/api/@ohos.distributedHardware.deviceManager.d.ts +++ b/api/@ohos.distributedHardware.deviceManager.d.ts @@ -328,6 +328,38 @@ declare namespace deviceManager { extraInfo: {[key:string] : any}; } + /** + * User Operation Action from devicemanager Fa. + * + * @systemapi this method can be used only by system applications. + */ + enum UserOperationAction { + /** + * allow authentication + */ + ACTION_ALLOW_AUTH = 0, + + /** + * cancel authentication + */ + ACTION_CANCEL_AUTH = 1, + + /** + * user operation timeout for authentication confirm + */ + ACTION_AUTH_CONFIRM_TIMEOUT = 2, + + /** + * cancel pincode display + */ + ACTION_CANCEL_PINCODE_DISPLAY = 3, + + /** + * cancel pincode input + */ + ACTION_CANCEL_PINCODE_INPUT = 4, + } + /** * Creates a {@code DeviceManager} instance. * @@ -477,6 +509,14 @@ declare namespace deviceManager { */ verifyAuthInfo(authInfo: AuthInfo, callback: AsyncCallback<{deviceId: string, level: number}>): void; + /** + * Set user Operation from devicemanager Fa, this interface can only used by devicemanager Fa. + * + * @param operateAction User Operation Actions. + * @systemapi this method can be used only by system applications. + */ + setUserOperation(operateAction: UserOperationAction): void; + /** * Register a device state callback so that the application can be notified upon device state changes based on * the application bundle name. -- Gitee From 6089ce6d7cf4194d9b7612fb21e86f611b74f00a Mon Sep 17 00:00:00 2001 From: wuqi0105 Date: Sat, 24 Sep 2022 15:19:02 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E6=B7=BB=E5=8A=A0devicemanager=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wuqi0105 --- ...hos.distributedHardware.deviceManager.d.ts | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/api/@ohos.distributedHardware.deviceManager.d.ts b/api/@ohos.distributedHardware.deviceManager.d.ts index b80e7b2d2e..b0ed704ede 100644 --- a/api/@ohos.distributedHardware.deviceManager.d.ts +++ b/api/@ohos.distributedHardware.deviceManager.d.ts @@ -358,6 +358,11 @@ declare namespace deviceManager { * cancel pincode input */ ACTION_CANCEL_PINCODE_INPUT = 4, + + /** + * done pincode input + */ + ACTION_DONE_PINCODE_INPUT = 5 } /** @@ -517,6 +522,23 @@ declare namespace deviceManager { */ setUserOperation(operateAction: UserOperationAction): void; + /** + * Register a callback from deviceManager service so that the devicemanager Fa can be notified when some events happen. + * this interface can only used by devicemanager Fa. + * + * @param callback for devicemanager Fa to register. + * @systemapi this method can be used only by system applications. + */ + on(type: 'dmSeaCallback', callback: Callback<{ param: string}>): void; + + /** + * UnRegister dmFaCallback, this interface can only used by devicemanager Fa. + * + * @param callback for devicemanager Fa to register. + * @systemapi this method can be used only by system applications. + */ + off(type: 'dmSeaCallback', callback?: Callback<{ param: string}>): void; + /** * Register a device state callback so that the application can be notified upon device state changes based on * the application bundle name. -- Gitee From 2796a42a30be4717a695a3ef2834b711a8c61a5f Mon Sep 17 00:00:00 2001 From: wuqi0105 Date: Tue, 27 Sep 2022 11:34:18 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E6=B7=BB=E5=8A=A0devicemanager=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wuqi0105 --- ...hos.distributedHardware.deviceManager.d.ts | 25 ++++++++++++------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/api/@ohos.distributedHardware.deviceManager.d.ts b/api/@ohos.distributedHardware.deviceManager.d.ts index b0ed704ede..17e8bea3fe 100644 --- a/api/@ohos.distributedHardware.deviceManager.d.ts +++ b/api/@ohos.distributedHardware.deviceManager.d.ts @@ -100,6 +100,13 @@ declare namespace deviceManager { TV = 0x9C } + interface SeaParamInfo { + /** + * SeaParamInfo is listen callback info + */ + verifyFailed: boolean; + } + /** * Device state change event definition * @@ -515,29 +522,29 @@ declare namespace deviceManager { verifyAuthInfo(authInfo: AuthInfo, callback: AsyncCallback<{deviceId: string, level: number}>): void; /** - * Set user Operation from devicemanager Fa, this interface can only used by devicemanager Fa. + * Set user Operation from devicemanager Sea, this interface can only used by devicemanager Sea. * * @param operateAction User Operation Actions. * @systemapi this method can be used only by system applications. */ - setUserOperation(operateAction: UserOperationAction): void; + setUserOperation(operateAction: number, params: string): void; /** - * Register a callback from deviceManager service so that the devicemanager Fa can be notified when some events happen. - * this interface can only used by devicemanager Fa. + * Register a callback from deviceManager service so that the devicemanager Sea can be notified when some events happen. + * this interface can only used by devicemanager Sea. * - * @param callback for devicemanager Fa to register. + * @param callback for devicemanager Sea to register. * @systemapi this method can be used only by system applications. */ - on(type: 'dmSeaCallback', callback: Callback<{ param: string}>): void; + on(type: 'seaStatueChange', callback: Callback<{ param: SeaParamInfo}>): void; /** - * UnRegister dmFaCallback, this interface can only used by devicemanager Fa. + * UnRegister dmSeaCallback, this interface can only used by devicemanager Sea. * - * @param callback for devicemanager Fa to register. + * @param callback for devicemanager Sea to register. * @systemapi this method can be used only by system applications. */ - off(type: 'dmSeaCallback', callback?: Callback<{ param: string}>): void; + off(type: 'seaStatueChange', callback?: Callback<{ param: SeaParamInfo}>): void; /** * Register a device state callback so that the application can be notified upon device state changes based on -- Gitee From 262b06c56c166803a34849d85f3dfe57eccd8515 Mon Sep 17 00:00:00 2001 From: wuqi0105 Date: Wed, 28 Sep 2022 11:10:48 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E6=B7=BB=E5=8A=A0devicemanager=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wuqi0105 --- api/@ohos.distributedHardware.deviceManager.d.ts | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/api/@ohos.distributedHardware.deviceManager.d.ts b/api/@ohos.distributedHardware.deviceManager.d.ts index 17e8bea3fe..365ebdb401 100644 --- a/api/@ohos.distributedHardware.deviceManager.d.ts +++ b/api/@ohos.distributedHardware.deviceManager.d.ts @@ -100,13 +100,6 @@ declare namespace deviceManager { TV = 0x9C } - interface SeaParamInfo { - /** - * SeaParamInfo is listen callback info - */ - verifyFailed: boolean; - } - /** * Device state change event definition * @@ -536,7 +529,7 @@ declare namespace deviceManager { * @param callback for devicemanager Sea to register. * @systemapi this method can be used only by system applications. */ - on(type: 'seaStatueChange', callback: Callback<{ param: SeaParamInfo}>): void; + on(type: 'seaStatueChange', callback: Callback<{ param: string}>): void; /** * UnRegister dmSeaCallback, this interface can only used by devicemanager Sea. @@ -544,7 +537,7 @@ declare namespace deviceManager { * @param callback for devicemanager Sea to register. * @systemapi this method can be used only by system applications. */ - off(type: 'seaStatueChange', callback?: Callback<{ param: SeaParamInfo}>): void; + off(type: 'seaStatueChange', callback?: Callback<{ param: string}>): void; /** * Register a device state callback so that the application can be notified upon device state changes based on -- Gitee From 98c7f74ffe0f515dd9f7ab67133b211130d7884e Mon Sep 17 00:00:00 2001 From: wuqi0105 Date: Wed, 28 Sep 2022 11:13:25 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E6=B7=BB=E5=8A=A0devicemanager=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wuqi0105 --- ...hos.distributedHardware.deviceManager.d.ts | 37 ------------------- 1 file changed, 37 deletions(-) diff --git a/api/@ohos.distributedHardware.deviceManager.d.ts b/api/@ohos.distributedHardware.deviceManager.d.ts index 365ebdb401..de700f570f 100644 --- a/api/@ohos.distributedHardware.deviceManager.d.ts +++ b/api/@ohos.distributedHardware.deviceManager.d.ts @@ -328,43 +328,6 @@ declare namespace deviceManager { extraInfo: {[key:string] : any}; } - /** - * User Operation Action from devicemanager Fa. - * - * @systemapi this method can be used only by system applications. - */ - enum UserOperationAction { - /** - * allow authentication - */ - ACTION_ALLOW_AUTH = 0, - - /** - * cancel authentication - */ - ACTION_CANCEL_AUTH = 1, - - /** - * user operation timeout for authentication confirm - */ - ACTION_AUTH_CONFIRM_TIMEOUT = 2, - - /** - * cancel pincode display - */ - ACTION_CANCEL_PINCODE_DISPLAY = 3, - - /** - * cancel pincode input - */ - ACTION_CANCEL_PINCODE_INPUT = 4, - - /** - * done pincode input - */ - ACTION_DONE_PINCODE_INPUT = 5 - } - /** * Creates a {@code DeviceManager} instance. * -- Gitee