From 0df1275423cea12f7baad912f4772d8a95f3fbb3 Mon Sep 17 00:00:00 2001 From: donglin Date: Wed, 28 Jun 2023 09:23:15 +0000 Subject: [PATCH] add new interface notifySaveAsResult Signed-off-by: donglin Change-Id: I62c8aca6a87c6b30898883403a4eb921f57e6264 --- api/@ohos.app.ability.abilityManager.d.ts | 31 +++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/api/@ohos.app.ability.abilityManager.d.ts b/api/@ohos.app.ability.abilityManager.d.ts index b8cc56ce0..ab5c06b3f 100644 --- a/api/@ohos.app.ability.abilityManager.d.ts +++ b/api/@ohos.app.ability.abilityManager.d.ts @@ -13,6 +13,7 @@ * limitations under the License. */ +import { AbilityResult } from './ability/abilityResult'; import { AsyncCallback } from './@ohos.base'; import { Configuration } from './@ohos.app.ability.Configuration'; import { AbilityRunningInfo as _AbilityRunningInfo } from './application/AbilityRunningInfo'; @@ -241,6 +242,36 @@ declare namespace abilityManager { */ function acquireShareData(missionId: number): Promise<{ [key: string]: Object }>; + /** + * Notify the result of save as to target ability. + * @param { AbilityResult } parameter - Indicates the result to return. + * @param { number } requestCode - Request code defined by the user. + * @param { AsyncCallback } callback - The callback of the function. + * @throws { BusinessError } 201 - Permission denied. + * @throws { BusinessError } 401 - If the input parameter is not valid parameter. + * @throws { BusinessError } 16000050 - Internal error. + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @systemapi + * @StageModelOnly + * @since 10 + */ + function notifySaveAsResult(parameter: AbilityResult, requestCode: number, callback: AsyncCallback): void; + + /** + * Notify the result of save as to target ability. + * @param { AbilityResult } parameter - Indicates the result to return. + * @param { number } requestCode - Request code defined by the user. + * @returns { Promise } The promise returned by the function. + * @throws { BusinessError } 201 - Permission denied. + * @throws { BusinessError } 401 - If the input parameter is not valid parameter. + * @throws { BusinessError } 16000050 - Internal error. + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @systemapi + * @StageModelOnly + * @since 10 + */ + function notifySaveAsResult(parameter: AbilityResult, requestCode: number): Promise; + /** * The class of an ability running information. *