From 2560c96e5893ca5f0181f9b17cade5ddcbaf9d28 Mon Sep 17 00:00:00 2001 From: wangxiyue Date: Mon, 25 Apr 2022 10:15:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0permission=E6=B3=A8=E9=87=8A?= =?UTF-8?q?=20Signed-off-by:=20wangxiyue=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/@ohos.data.rdb.d.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/api/@ohos.data.rdb.d.ts b/api/@ohos.data.rdb.d.ts index f49a6db5ce..6d149891b7 100644 --- a/api/@ohos.data.rdb.d.ts +++ b/api/@ohos.data.rdb.d.ts @@ -220,6 +220,7 @@ declare namespace rdb { * @since 8 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @param tables the tables name you want to set + * @permission ohos.permission.DISTRIBUTED_DATASYNC */ setDistributedTables(tables: Array, callback: AsyncCallback): void; setDistributedTables(tables: Array): Promise; @@ -234,7 +235,7 @@ declare namespace rdb { * @param device Indicates the remote device. * @param table Indicates the local table name. * @return the distributed table name. - + * @permission ohos.permission.DISTRIBUTED_DATASYNC */ obtainDistributedTableName(device: string, table: string, callback: AsyncCallback): void; obtainDistributedTableName(device: string, table: string): Promise; @@ -248,7 +249,7 @@ declare namespace rdb { * @param mode Indicates the synchronization mode. The value can be PUSH, PULL. * @param predicates Constraint synchronized data and devices. * @param callback Indicates the callback used to send the synchronization result to the caller. - + * @permission ohos.permission.DISTRIBUTED_DATASYNC */ sync(mode: SyncMode, predicates: RdbPredicates, callback: AsyncCallback>): void; sync(mode: SyncMode, predicates: RdbPredicates): Promise>; @@ -262,6 +263,7 @@ declare namespace rdb { * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @param type Indicates the subscription type, which is defined in {@code SubscribeType}. * @param observer Indicates the observer of data change events in the distributed database. + * @permission ohos.permission.DISTRIBUTED_DATASYNC */ on(event: 'dataChange', type: SubscribeType, observer: Callback>): void; @@ -273,6 +275,7 @@ declare namespace rdb { * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @param type Indicates the subscription type, which is defined in {@code SubscribeType}. * @param observer Indicates the data change observer already registered . + * @permission ohos.permission.DISTRIBUTED_DATASYNC */ off(event:'dataChange', type: SubscribeType, observer: Callback>): void; } -- Gitee