From 98f36e93bd58f45abb373425bb832085fbf8fefb Mon Sep 17 00:00:00 2001 From: zuojiangjiang Date: Mon, 4 Dec 2023 11:57:00 +0800 Subject: [PATCH] add datashare enableSilentProxy interface Signed-off-by: zuojiangjiang --- api/@ohos.data.dataShare.d.ts | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/api/@ohos.data.dataShare.d.ts b/api/@ohos.data.dataShare.d.ts index a23fcabb5..366189bba 100644 --- a/api/@ohos.data.dataShare.d.ts +++ b/api/@ohos.data.dataShare.d.ts @@ -120,6 +120,36 @@ declare namespace dataShare { options?: DataShareHelperOptions ): Promise; + /** + * Enables silent access dynamically. + * + * @param { Context } context - Indicates the application context. + * @param { string } uri - Indicates the path of the file to open. + * @returns { Promise } Promise used to return. + * @throws { BusinessError } 401 - Parameter error. + * @throws { BusinessError } 15700011 - The uri is not exist. + * @syscap SystemCapability.DistributedDataManager.DataShare.Consumer + * @systemapi + * @StageModelOnly + * @since 11 + */ + function enableSilentProxy(context: Context, uri?: string): Promise; + + /** + * Disables silent access dynamically. + * + * @param { Context } context - Indicates the application context. + * @param { string } uri - Indicates the path of the file to close. + * @returns { Promise } Promise used to return. + * @throws { BusinessError } 401 - Parameter error. + * @throws { BusinessError } 15700011 - The uri is not exist. + * @syscap SystemCapability.DistributedDataManager.DataShare.Consumer + * @systemapi + * @StageModelOnly + * @since 11 + */ + function disableSilentProxy(context: Context, uri?: string): Promise; + /** * Specifies the {@link Template} id structure. * A template is marked by the template id. Note that the template id is auto generated in {@link DataShareHelper#addTemplate}.