From 6d56f30891e230467158db6d73a6750470f3b051 Mon Sep 17 00:00:00 2001 From: hanlu Date: Sat, 22 Jan 2022 15:56:03 +0800 Subject: [PATCH 1/8] objectstore Signed-off-by: hanlu --- api/@ohos.data.distributedDataObject.d.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/api/@ohos.data.distributedDataObject.d.ts b/api/@ohos.data.distributedDataObject.d.ts index aa7f594fc7..051e475ce9 100644 --- a/api/@ohos.data.distributedDataObject.d.ts +++ b/api/@ohos.data.distributedDataObject.d.ts @@ -72,6 +72,22 @@ declare namespace distributedDataObject { * @since 8 */ off(type: 'change', callback?: Callback<{ sessionId: string, fields: Array }>): void; + /** + * On watch of status + * + * @param callback The callback of status, sessionId is the sessionId of changed object + * deviceId is the device that object changed, status is the status of object + * @since 8 + */ + on(type: 'status', callback: Callback<{ sessionId: string, deviceId: string, status: 'online'|'offline' }>): void; + + /** + * Off watch of status + * + * @param callback If not null, off the callback, if undefined, off all callbacks + * @since 8 + */ + off(type: 'status', callback?: Callback<{ sessionId: string, deviceId: string, status: 'online'|'offline' }>): void; } } -- Gitee From b72ca433ea63cebcc9b650e49f1af5bc03a65835 Mon Sep 17 00:00:00 2001 From: hanlu Date: Sat, 22 Jan 2022 16:00:49 +0800 Subject: [PATCH 2/8] objectstore Signed-off-by: hanlu --- api/@ohos.data.distributedDataObject.d.ts | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/api/@ohos.data.distributedDataObject.d.ts b/api/@ohos.data.distributedDataObject.d.ts index 051e475ce9..1544578588 100644 --- a/api/@ohos.data.distributedDataObject.d.ts +++ b/api/@ohos.data.distributedDataObject.d.ts @@ -72,14 +72,15 @@ declare namespace distributedDataObject { * @since 8 */ off(type: 'change', callback?: Callback<{ sessionId: string, fields: Array }>): void; - /** - * On watch of status - * - * @param callback The callback of status, sessionId is the sessionId of changed object - * deviceId is the device that object changed, status is the status of object - * @since 8 - */ - on(type: 'status', callback: Callback<{ sessionId: string, deviceId: string, status: 'online'|'offline' }>): void; + + /** + * On watch of status + * + * @param callback The callback of status, sessionId is the sessionId of changed object + * deviceId is the device that object changed, status is the status of object + * @since 8 + */ + on(type: 'status', callback: Callback<{ sessionId: string, deviceId: string, status: 'online' | 'offline' }>): void; /** * Off watch of status @@ -87,7 +88,7 @@ declare namespace distributedDataObject { * @param callback If not null, off the callback, if undefined, off all callbacks * @since 8 */ - off(type: 'status', callback?: Callback<{ sessionId: string, deviceId: string, status: 'online'|'offline' }>): void; + off(type: 'status', callback?: Callback<{ sessionId: string, deviceId: string, status: 'online' | 'offline' }>): void; } } -- Gitee From c089d36d61be139e471bd0608355a35d1515fb22 Mon Sep 17 00:00:00 2001 From: hanlu Date: Sat, 22 Jan 2022 16:07:52 +0800 Subject: [PATCH 3/8] o Signed-off-by: hanlu --- api/@ohos.data.distributedDataObject.d.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/api/@ohos.data.distributedDataObject.d.ts b/api/@ohos.data.distributedDataObject.d.ts index 1544578588..651c1b70f2 100644 --- a/api/@ohos.data.distributedDataObject.d.ts +++ b/api/@ohos.data.distributedDataObject.d.ts @@ -76,8 +76,7 @@ declare namespace distributedDataObject { /** * On watch of status * - * @param callback The callback of status, sessionId is the sessionId of changed object - * deviceId is the device that object changed, status is the status of object + * @param callback Indicates the observer of object status changed. * @since 8 */ on(type: 'status', callback: Callback<{ sessionId: string, deviceId: string, status: 'online' | 'offline' }>): void; -- Gitee From 3fcc3d37f1e3e76b137c66bc3681bb69125e0a28 Mon Sep 17 00:00:00 2001 From: hanlu Date: Wed, 26 Jan 2022 19:45:02 +0800 Subject: [PATCH 4/8] objectstore Signed-off-by: hanlu --- api/@ohos.data.distributedDataObject.d.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/api/@ohos.data.distributedDataObject.d.ts b/api/@ohos.data.distributedDataObject.d.ts index 651c1b70f2..db1f2264f6 100644 --- a/api/@ohos.data.distributedDataObject.d.ts +++ b/api/@ohos.data.distributedDataObject.d.ts @@ -77,6 +77,10 @@ declare namespace distributedDataObject { * On watch of status * * @param callback Indicates the observer of object status changed. + * sessionId: The sessionId of the changed object + deviceId: NetworkId of the changed device + status: 'online' The object became online on the device and data can be synced to the device + 'offline' The object became offline on the device and the object can not sync any data * @since 8 */ on(type: 'status', callback: Callback<{ sessionId: string, deviceId: string, status: 'online' | 'offline' }>): void; -- Gitee From f5cdc2f2630707368adc9e8d734231b73c41122c Mon Sep 17 00:00:00 2001 From: hanlu Date: Wed, 26 Jan 2022 19:46:27 +0800 Subject: [PATCH 5/8] object Signed-off-by: hanlu --- api/@ohos.data.distributedDataObject.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/@ohos.data.distributedDataObject.d.ts b/api/@ohos.data.distributedDataObject.d.ts index db1f2264f6..ef16bdb296 100644 --- a/api/@ohos.data.distributedDataObject.d.ts +++ b/api/@ohos.data.distributedDataObject.d.ts @@ -78,9 +78,9 @@ declare namespace distributedDataObject { * * @param callback Indicates the observer of object status changed. * sessionId: The sessionId of the changed object - deviceId: NetworkId of the changed device - status: 'online' The object became online on the device and data can be synced to the device - 'offline' The object became offline on the device and the object can not sync any data + * deviceId: NetworkId of the changed device + * status: 'online' The object became online on the device and data can be synced to the device + * 'offline' The object became offline on the device and the object can not sync any data * @since 8 */ on(type: 'status', callback: Callback<{ sessionId: string, deviceId: string, status: 'online' | 'offline' }>): void; -- Gitee From e6dab98d6ab983b6e89459c6a26065f23233c1c0 Mon Sep 17 00:00:00 2001 From: hanlu Date: Wed, 26 Jan 2022 19:47:28 +0800 Subject: [PATCH 6/8] object Signed-off-by: hanlu --- api/@ohos.data.distributedDataObject.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/@ohos.data.distributedDataObject.d.ts b/api/@ohos.data.distributedDataObject.d.ts index ef16bdb296..a906400825 100644 --- a/api/@ohos.data.distributedDataObject.d.ts +++ b/api/@ohos.data.distributedDataObject.d.ts @@ -77,10 +77,10 @@ declare namespace distributedDataObject { * On watch of status * * @param callback Indicates the observer of object status changed. - * sessionId: The sessionId of the changed object + * sessionId: The sessionId of the changed object * deviceId: NetworkId of the changed device * status: 'online' The object became online on the device and data can be synced to the device - * 'offline' The object became offline on the device and the object can not sync any data + * 'offline' The object became offline on the device and the object can not sync any data * @since 8 */ on(type: 'status', callback: Callback<{ sessionId: string, deviceId: string, status: 'online' | 'offline' }>): void; -- Gitee From 805737f9f49222d0e112a731fddaf1253a760c66 Mon Sep 17 00:00:00 2001 From: hanlu Date: Wed, 26 Jan 2022 19:48:05 +0800 Subject: [PATCH 7/8] object Signed-off-by: hanlu --- api/@ohos.data.distributedDataObject.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/@ohos.data.distributedDataObject.d.ts b/api/@ohos.data.distributedDataObject.d.ts index a906400825..a948eb7240 100644 --- a/api/@ohos.data.distributedDataObject.d.ts +++ b/api/@ohos.data.distributedDataObject.d.ts @@ -80,7 +80,7 @@ declare namespace distributedDataObject { * sessionId: The sessionId of the changed object * deviceId: NetworkId of the changed device * status: 'online' The object became online on the device and data can be synced to the device - * 'offline' The object became offline on the device and the object can not sync any data + * 'offline' The object became offline on the device and the object can not sync any data * @since 8 */ on(type: 'status', callback: Callback<{ sessionId: string, deviceId: string, status: 'online' | 'offline' }>): void; -- Gitee From c55300c9b9a13e94fa58193b951a4503cd06965d Mon Sep 17 00:00:00 2001 From: hanlu Date: Thu, 27 Jan 2022 10:41:29 +0800 Subject: [PATCH 8/8] objectstore Signed-off-by: hanlu --- api/@ohos.data.distributedDataObject.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/@ohos.data.distributedDataObject.d.ts b/api/@ohos.data.distributedDataObject.d.ts index a948eb7240..b1f2b24c1e 100644 --- a/api/@ohos.data.distributedDataObject.d.ts +++ b/api/@ohos.data.distributedDataObject.d.ts @@ -78,12 +78,12 @@ declare namespace distributedDataObject { * * @param callback Indicates the observer of object status changed. * sessionId: The sessionId of the changed object - * deviceId: NetworkId of the changed device + * networkId: NetworkId of the changed device * status: 'online' The object became online on the device and data can be synced to the device * 'offline' The object became offline on the device and the object can not sync any data * @since 8 */ - on(type: 'status', callback: Callback<{ sessionId: string, deviceId: string, status: 'online' | 'offline' }>): void; + on(type: 'status', callback: Callback<{ sessionId: string, networkId: string, status: 'online' | 'offline' }>): void; /** * Off watch of status -- Gitee