add datashare enableSilentProxy interface

Signed-off-by: zuojiangjiang <zuojiangjiang@huawei.com>
This commit is contained in:
zuojiangjiang 2023-12-04 11:57:00 +08:00
parent 88253a1be2
commit 98f36e93bd

View File

@ -120,6 +120,36 @@ declare namespace dataShare {
options?: DataShareHelperOptions options?: DataShareHelperOptions
): Promise<DataShareHelper>; ): Promise<DataShareHelper>;
/**
* Enables silent access dynamically.
*
* @param { Context } context - Indicates the application context.
* @param { string } uri - Indicates the path of the file to open.
* @returns { Promise<void> } 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<void>;
/**
* Disables silent access dynamically.
*
* @param { Context } context - Indicates the application context.
* @param { string } uri - Indicates the path of the file to close.
* @returns { Promise<void> } 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<void>;
/** /**
* Specifies the {@link Template} id structure. * 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}. * A template is marked by the template id. Note that the template id is auto generated in {@link DataShareHelper#addTemplate}.