161847f8eSopenharmony_ci/*
261847f8eSopenharmony_ci * Copyright (c) 2021-2023 Huawei Device Co., Ltd.
361847f8eSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
461847f8eSopenharmony_ci * you may not use this file except in compliance with the License.
561847f8eSopenharmony_ci * You may obtain a copy of the License at
661847f8eSopenharmony_ci *
761847f8eSopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
861847f8eSopenharmony_ci *
961847f8eSopenharmony_ci * Unless required by applicable law or agreed to in writing, software
1061847f8eSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
1161847f8eSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1261847f8eSopenharmony_ci * See the License for the specific language governing permissions and
1361847f8eSopenharmony_ci * limitations under the License.
1461847f8eSopenharmony_ci */
1561847f8eSopenharmony_ci
1661847f8eSopenharmony_ci/**
1761847f8eSopenharmony_ci * @file
1861847f8eSopenharmony_ci * @kit AbilityKit
1961847f8eSopenharmony_ci */
2061847f8eSopenharmony_ci
2161847f8eSopenharmony_ciimport { AsyncCallback } from '../@ohos.base';
2261847f8eSopenharmony_ciimport UIAbility from '../@ohos.app.ability.UIAbility';
2361847f8eSopenharmony_ciimport AbilityStage from '../@ohos.app.ability.AbilityStage';
2461847f8eSopenharmony_ciimport { AbilityMonitor } from './AbilityMonitor';
2561847f8eSopenharmony_ciimport { AbilityStageMonitor } from './AbilityStageMonitor';
2661847f8eSopenharmony_ciimport Context from './Context';
2761847f8eSopenharmony_ciimport Want from '../@ohos.app.ability.Want';
2861847f8eSopenharmony_ciimport { ShellCmdResult } from './shellCmdResult';
2961847f8eSopenharmony_ci
3061847f8eSopenharmony_ci/**
3161847f8eSopenharmony_ci * A global test utility interface used for adding AbilityMonitor objects and control lifecycle states of abilities.
3261847f8eSopenharmony_ci *
3361847f8eSopenharmony_ci * @interface AbilityDelegator
3461847f8eSopenharmony_ci * @syscap SystemCapability.Ability.AbilityRuntime.Core
3561847f8eSopenharmony_ci * @since 9
3661847f8eSopenharmony_ci */
3761847f8eSopenharmony_ci/**
3861847f8eSopenharmony_ci * A global test utility interface used for adding AbilityMonitor objects and control lifecycle states of abilities.
3961847f8eSopenharmony_ci *
4061847f8eSopenharmony_ci * @interface AbilityDelegator
4161847f8eSopenharmony_ci * @syscap SystemCapability.Ability.AbilityRuntime.Core
4261847f8eSopenharmony_ci * @crossplatform
4361847f8eSopenharmony_ci * @since 10
4461847f8eSopenharmony_ci */
4561847f8eSopenharmony_ci/**
4661847f8eSopenharmony_ci * A global test utility interface used for adding AbilityMonitor objects and control lifecycle states of abilities.
4761847f8eSopenharmony_ci *
4861847f8eSopenharmony_ci * @interface AbilityDelegator
4961847f8eSopenharmony_ci * @syscap SystemCapability.Ability.AbilityRuntime.Core
5061847f8eSopenharmony_ci * @crossplatform
5161847f8eSopenharmony_ci * @atomicservice
5261847f8eSopenharmony_ci * @since 11
5361847f8eSopenharmony_ci */
5461847f8eSopenharmony_ciexport interface AbilityDelegator {
5561847f8eSopenharmony_ci  /**
5661847f8eSopenharmony_ci   * Add an AbilityMonitor object for monitoring the lifecycle state changes of the specified ability in this process.
5761847f8eSopenharmony_ci   *
5861847f8eSopenharmony_ci   * @param { AbilityMonitor } monitor - AbilityMonitor object
5961847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback of addAbilityMonitor.
6061847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
6161847f8eSopenharmony_ci   * @throws { BusinessError } 16000100 - AddAbilityMonitor failed.
6261847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
6361847f8eSopenharmony_ci   * @since 9
6461847f8eSopenharmony_ci   */
6561847f8eSopenharmony_ci  /**
6661847f8eSopenharmony_ci   * Add an AbilityMonitor object for monitoring the lifecycle state changes of the specified ability in this process.
6761847f8eSopenharmony_ci   *
6861847f8eSopenharmony_ci   * @param { AbilityMonitor } monitor - AbilityMonitor object
6961847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback of addAbilityMonitor.
7061847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
7161847f8eSopenharmony_ci   * @throws { BusinessError } 16000100 - AddAbilityMonitor failed.
7261847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
7361847f8eSopenharmony_ci   * @crossplatform
7461847f8eSopenharmony_ci   * @since 10
7561847f8eSopenharmony_ci   */
7661847f8eSopenharmony_ci  /**
7761847f8eSopenharmony_ci   * Add an AbilityMonitor object for monitoring the lifecycle state changes of the specified ability in this process.
7861847f8eSopenharmony_ci   *
7961847f8eSopenharmony_ci   * @param { AbilityMonitor } monitor - AbilityMonitor object
8061847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback of addAbilityMonitor.
8161847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
8261847f8eSopenharmony_ci   * @throws { BusinessError } 16000100 - Calling AddAbilityMonitor failed.
8361847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
8461847f8eSopenharmony_ci   * @crossplatform
8561847f8eSopenharmony_ci   * @atomicservice
8661847f8eSopenharmony_ci   * @since 11
8761847f8eSopenharmony_ci   */
8861847f8eSopenharmony_ci  addAbilityMonitor(monitor: AbilityMonitor, callback: AsyncCallback<void>): void;
8961847f8eSopenharmony_ci
9061847f8eSopenharmony_ci  /**
9161847f8eSopenharmony_ci   * Add an AbilityMonitor object for monitoring the lifecycle state changes of the specified ability in this process.
9261847f8eSopenharmony_ci   *
9361847f8eSopenharmony_ci   * @param { AbilityMonitor } monitor - AbilityMonitor object
9461847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
9561847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
9661847f8eSopenharmony_ci   * @throws { BusinessError } 16000100 - AddAbilityMonitor failed.
9761847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
9861847f8eSopenharmony_ci   * @since 9
9961847f8eSopenharmony_ci   */
10061847f8eSopenharmony_ci  /**
10161847f8eSopenharmony_ci   * Add an AbilityMonitor object for monitoring the lifecycle state changes of the specified ability in this process.
10261847f8eSopenharmony_ci   *
10361847f8eSopenharmony_ci   * @param { AbilityMonitor } monitor - AbilityMonitor object
10461847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
10561847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
10661847f8eSopenharmony_ci   * @throws { BusinessError } 16000100 - AddAbilityMonitor failed.
10761847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
10861847f8eSopenharmony_ci   * @crossplatform
10961847f8eSopenharmony_ci   * @since 10
11061847f8eSopenharmony_ci   */
11161847f8eSopenharmony_ci  /**
11261847f8eSopenharmony_ci   * Add an AbilityMonitor object for monitoring the lifecycle state changes of the specified ability in this process.
11361847f8eSopenharmony_ci   *
11461847f8eSopenharmony_ci   * @param { AbilityMonitor } monitor - AbilityMonitor object
11561847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
11661847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
11761847f8eSopenharmony_ci   * @throws { BusinessError } 16000100 - Calling AddAbilityMonitor failed.
11861847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
11961847f8eSopenharmony_ci   * @crossplatform
12061847f8eSopenharmony_ci   * @atomicservice
12161847f8eSopenharmony_ci   * @since 11
12261847f8eSopenharmony_ci   */
12361847f8eSopenharmony_ci  addAbilityMonitor(monitor: AbilityMonitor): Promise<void>;
12461847f8eSopenharmony_ci
12561847f8eSopenharmony_ci  /**
12661847f8eSopenharmony_ci   * Add an AbilityMonitor object for monitoring the lifecycle state changes of the specified ability in this process.
12761847f8eSopenharmony_ci   *
12861847f8eSopenharmony_ci   * @param { AbilityMonitor } monitor - AbilityMonitor object.
12961847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
13061847f8eSopenharmony_ci   * @throws { BusinessError } 16000100 - AddAbilityMonitorSync failed.
13161847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
13261847f8eSopenharmony_ci   * @crossplatform
13361847f8eSopenharmony_ci   * @since 10
13461847f8eSopenharmony_ci   */
13561847f8eSopenharmony_ci  /**
13661847f8eSopenharmony_ci   * Add an AbilityMonitor object for monitoring the lifecycle state changes of the specified ability in this process.
13761847f8eSopenharmony_ci   *
13861847f8eSopenharmony_ci   * @param { AbilityMonitor } monitor - AbilityMonitor object.
13961847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
14061847f8eSopenharmony_ci   * @throws { BusinessError } 16000100 - Calling AddAbilityMonitorSync failed.
14161847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
14261847f8eSopenharmony_ci   * @crossplatform
14361847f8eSopenharmony_ci   * @atomicservice
14461847f8eSopenharmony_ci   * @since 11
14561847f8eSopenharmony_ci   */
14661847f8eSopenharmony_ci  addAbilityMonitorSync(monitor: AbilityMonitor): void;
14761847f8eSopenharmony_ci
14861847f8eSopenharmony_ci  /**
14961847f8eSopenharmony_ci   * Add an AbilityStageMonitor object for monitoring the lifecycle state changes of the specified abilityStage in this process.
15061847f8eSopenharmony_ci   *
15161847f8eSopenharmony_ci   * @param { AbilityStageMonitor } monitor - AbilityStageMonitor object.
15261847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback of addAbilityStageMonitor.
15361847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
15461847f8eSopenharmony_ci   * @throws { BusinessError } 16000100 - AddAbilityStageMonitor failed.
15561847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
15661847f8eSopenharmony_ci   * @since 9
15761847f8eSopenharmony_ci   */
15861847f8eSopenharmony_ci  /**
15961847f8eSopenharmony_ci   * Add an AbilityStageMonitor object for monitoring the lifecycle state changes of the specified abilityStage in this process.
16061847f8eSopenharmony_ci   *
16161847f8eSopenharmony_ci   * @param { AbilityStageMonitor } monitor - AbilityStageMonitor object.
16261847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback of addAbilityStageMonitor.
16361847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
16461847f8eSopenharmony_ci   * @throws { BusinessError } 16000100 - AddAbilityStageMonitor failed.
16561847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
16661847f8eSopenharmony_ci   * @crossplatform
16761847f8eSopenharmony_ci   * @since 10
16861847f8eSopenharmony_ci   */
16961847f8eSopenharmony_ci  /**
17061847f8eSopenharmony_ci   * Add an AbilityStageMonitor object for monitoring the lifecycle state changes of the specified abilityStage in this process.
17161847f8eSopenharmony_ci   *
17261847f8eSopenharmony_ci   * @param { AbilityStageMonitor } monitor - AbilityStageMonitor object.
17361847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback of addAbilityStageMonitor.
17461847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
17561847f8eSopenharmony_ci   * @throws { BusinessError } 16000100 - Calling AddAbilityStageMonitor failed.
17661847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
17761847f8eSopenharmony_ci   * @crossplatform
17861847f8eSopenharmony_ci   * @atomicservice
17961847f8eSopenharmony_ci   * @since 11
18061847f8eSopenharmony_ci   */
18161847f8eSopenharmony_ci  addAbilityStageMonitor(monitor: AbilityStageMonitor, callback: AsyncCallback<void>): void;
18261847f8eSopenharmony_ci
18361847f8eSopenharmony_ci  /**
18461847f8eSopenharmony_ci   * Add an AbilityStageMonitor object for monitoring the lifecycle state changes of the specified abilityStage in this process.
18561847f8eSopenharmony_ci   *
18661847f8eSopenharmony_ci   * @param { AbilityStageMonitor } monitor - AbilityStageMonitor object.
18761847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
18861847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
18961847f8eSopenharmony_ci   * @throws { BusinessError } 16000100 - AddAbilityStageMonitor failed.
19061847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
19161847f8eSopenharmony_ci   * @since 9
19261847f8eSopenharmony_ci   */
19361847f8eSopenharmony_ci  /**
19461847f8eSopenharmony_ci   * Add an AbilityStageMonitor object for monitoring the lifecycle state changes of the specified abilityStage in this process.
19561847f8eSopenharmony_ci   *
19661847f8eSopenharmony_ci   * @param { AbilityStageMonitor } monitor - AbilityStageMonitor object.
19761847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
19861847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
19961847f8eSopenharmony_ci   * @throws { BusinessError } 16000100 - AddAbilityStageMonitor failed.
20061847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
20161847f8eSopenharmony_ci   * @crossplatform
20261847f8eSopenharmony_ci   * @since 10
20361847f8eSopenharmony_ci   */
20461847f8eSopenharmony_ci  /**
20561847f8eSopenharmony_ci   * Add an AbilityStageMonitor object for monitoring the lifecycle state changes of the specified abilityStage in this process.
20661847f8eSopenharmony_ci   *
20761847f8eSopenharmony_ci   * @param { AbilityStageMonitor } monitor - AbilityStageMonitor object.
20861847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
20961847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
21061847f8eSopenharmony_ci   * @throws { BusinessError } 16000100 - Calling AddAbilityStageMonitor failed.
21161847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
21261847f8eSopenharmony_ci   * @crossplatform
21361847f8eSopenharmony_ci   * @atomicservice
21461847f8eSopenharmony_ci   * @since 11
21561847f8eSopenharmony_ci   */
21661847f8eSopenharmony_ci  addAbilityStageMonitor(monitor: AbilityStageMonitor): Promise<void>;
21761847f8eSopenharmony_ci
21861847f8eSopenharmony_ci  /**
21961847f8eSopenharmony_ci   * Add an AbilityStageMonitor object for monitoring the lifecycle state changes of the specified abilityStage in this process.
22061847f8eSopenharmony_ci   *
22161847f8eSopenharmony_ci   * @param { AbilityStageMonitor } monitor - AbilityStageMonitor object.
22261847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
22361847f8eSopenharmony_ci   * @throws { BusinessError } 16000100 - AddAbilityStageMonitorSync failed.
22461847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
22561847f8eSopenharmony_ci   * @crossplatform
22661847f8eSopenharmony_ci   * @since 10
22761847f8eSopenharmony_ci   */
22861847f8eSopenharmony_ci  /**
22961847f8eSopenharmony_ci   * Add an AbilityStageMonitor object for monitoring the lifecycle state changes of the specified abilityStage in this process.
23061847f8eSopenharmony_ci   *
23161847f8eSopenharmony_ci   * @param { AbilityStageMonitor } monitor - AbilityStageMonitor object.
23261847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
23361847f8eSopenharmony_ci   * @throws { BusinessError } 16000100 - Calling AddAbilityStageMonitorSync failed.
23461847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
23561847f8eSopenharmony_ci   * @crossplatform
23661847f8eSopenharmony_ci   * @atomicservice
23761847f8eSopenharmony_ci   * @since 11
23861847f8eSopenharmony_ci   */
23961847f8eSopenharmony_ci  addAbilityStageMonitorSync(monitor: AbilityStageMonitor): void;
24061847f8eSopenharmony_ci
24161847f8eSopenharmony_ci  /**
24261847f8eSopenharmony_ci   * Remove a specified AbilityMonitor object from the application memory.
24361847f8eSopenharmony_ci   *
24461847f8eSopenharmony_ci   * @param { AbilityMonitor } monitor - AbilityMonitor object.
24561847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback of removeAbilityMonitor.
24661847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
24761847f8eSopenharmony_ci   * @throws { BusinessError } 16000100 - RemoveAbilityMonitor failed.
24861847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
24961847f8eSopenharmony_ci   * @since 9
25061847f8eSopenharmony_ci   */
25161847f8eSopenharmony_ci  /**
25261847f8eSopenharmony_ci   * Remove a specified AbilityMonitor object from the application memory.
25361847f8eSopenharmony_ci   *
25461847f8eSopenharmony_ci   * @param { AbilityMonitor } monitor - AbilityMonitor object.
25561847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback of removeAbilityMonitor.
25661847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
25761847f8eSopenharmony_ci   * @throws { BusinessError } 16000100 - RemoveAbilityMonitor failed.
25861847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
25961847f8eSopenharmony_ci   * @crossplatform
26061847f8eSopenharmony_ci   * @since 10
26161847f8eSopenharmony_ci   */
26261847f8eSopenharmony_ci  /**
26361847f8eSopenharmony_ci   * Remove a specified AbilityMonitor object from the application memory.
26461847f8eSopenharmony_ci   *
26561847f8eSopenharmony_ci   * @param { AbilityMonitor } monitor - AbilityMonitor object.
26661847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback of removeAbilityMonitor.
26761847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
26861847f8eSopenharmony_ci   * @throws { BusinessError } 16000100 - Calling RemoveAbilityMonitor failed.
26961847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
27061847f8eSopenharmony_ci   * @crossplatform
27161847f8eSopenharmony_ci   * @atomicservice
27261847f8eSopenharmony_ci   * @since 11
27361847f8eSopenharmony_ci   */
27461847f8eSopenharmony_ci  removeAbilityMonitor(monitor: AbilityMonitor, callback: AsyncCallback<void>): void;
27561847f8eSopenharmony_ci
27661847f8eSopenharmony_ci  /**
27761847f8eSopenharmony_ci   * Remove a specified AbilityMonitor object from the application memory.
27861847f8eSopenharmony_ci   *
27961847f8eSopenharmony_ci   * @param { AbilityMonitor } monitor - AbilityMonitor object.
28061847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
28161847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
28261847f8eSopenharmony_ci   * @throws { BusinessError } 16000100 - RemoveAbilityMonitor failed.
28361847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
28461847f8eSopenharmony_ci   * @since 9
28561847f8eSopenharmony_ci   */
28661847f8eSopenharmony_ci  /**
28761847f8eSopenharmony_ci   * Remove a specified AbilityMonitor object from the application memory.
28861847f8eSopenharmony_ci   *
28961847f8eSopenharmony_ci   * @param { AbilityMonitor } monitor - AbilityMonitor object.
29061847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
29161847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
29261847f8eSopenharmony_ci   * @throws { BusinessError } 16000100 - RemoveAbilityMonitor failed.
29361847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
29461847f8eSopenharmony_ci   * @crossplatform
29561847f8eSopenharmony_ci   * @since 10
29661847f8eSopenharmony_ci   */
29761847f8eSopenharmony_ci  /**
29861847f8eSopenharmony_ci   * Remove a specified AbilityMonitor object from the application memory.
29961847f8eSopenharmony_ci   *
30061847f8eSopenharmony_ci   * @param { AbilityMonitor } monitor - AbilityMonitor object.
30161847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
30261847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
30361847f8eSopenharmony_ci   * @throws { BusinessError } 16000100 - Calling RemoveAbilityMonitor failed.
30461847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
30561847f8eSopenharmony_ci   * @crossplatform
30661847f8eSopenharmony_ci   * @atomicservice
30761847f8eSopenharmony_ci   * @since 11
30861847f8eSopenharmony_ci   */
30961847f8eSopenharmony_ci  removeAbilityMonitor(monitor: AbilityMonitor): Promise<void>;
31061847f8eSopenharmony_ci
31161847f8eSopenharmony_ci  /**
31261847f8eSopenharmony_ci   * Remove a specified AbilityMonitor object from the application memory.
31361847f8eSopenharmony_ci   *
31461847f8eSopenharmony_ci   * @param { AbilityMonitor } monitor - AbilityMonitor object.
31561847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
31661847f8eSopenharmony_ci   * @throws { BusinessError } 16000100 - RemoveAbilityMonitorSync failed.
31761847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
31861847f8eSopenharmony_ci   * @crossplatform
31961847f8eSopenharmony_ci   * @since 10
32061847f8eSopenharmony_ci   */
32161847f8eSopenharmony_ci  /**
32261847f8eSopenharmony_ci   * Remove a specified AbilityMonitor object from the application memory.
32361847f8eSopenharmony_ci   *
32461847f8eSopenharmony_ci   * @param { AbilityMonitor } monitor - AbilityMonitor object.
32561847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
32661847f8eSopenharmony_ci   * @throws { BusinessError } 16000100 - Calling RemoveAbilityMonitorSync failed.
32761847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
32861847f8eSopenharmony_ci   * @crossplatform
32961847f8eSopenharmony_ci   * @atomicservice
33061847f8eSopenharmony_ci   * @since 11
33161847f8eSopenharmony_ci   */
33261847f8eSopenharmony_ci  removeAbilityMonitorSync(monitor: AbilityMonitor): void;
33361847f8eSopenharmony_ci
33461847f8eSopenharmony_ci  /**
33561847f8eSopenharmony_ci   * Remove a specified AbilityStageMonitor object from the application memory.
33661847f8eSopenharmony_ci   *
33761847f8eSopenharmony_ci   * @param { AbilityStageMonitor } monitor - AbilityStageMonitor object.
33861847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback of removeAbilityStageMonitor.
33961847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
34061847f8eSopenharmony_ci   * @throws { BusinessError } 16000100 - RemoveAbilityStageMonitor failed.
34161847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
34261847f8eSopenharmony_ci   * @since 9
34361847f8eSopenharmony_ci   */
34461847f8eSopenharmony_ci  /**
34561847f8eSopenharmony_ci   * Remove a specified AbilityStageMonitor object from the application memory.
34661847f8eSopenharmony_ci   *
34761847f8eSopenharmony_ci   * @param { AbilityStageMonitor } monitor - AbilityStageMonitor object.
34861847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback of removeAbilityStageMonitor.
34961847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
35061847f8eSopenharmony_ci   * @throws { BusinessError } 16000100 - RemoveAbilityStageMonitor failed.
35161847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
35261847f8eSopenharmony_ci   * @crossplatform
35361847f8eSopenharmony_ci   * @since 10
35461847f8eSopenharmony_ci   */
35561847f8eSopenharmony_ci  /**
35661847f8eSopenharmony_ci   * Remove a specified AbilityStageMonitor object from the application memory.
35761847f8eSopenharmony_ci   *
35861847f8eSopenharmony_ci   * @param { AbilityStageMonitor } monitor - AbilityStageMonitor object.
35961847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback of removeAbilityStageMonitor.
36061847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
36161847f8eSopenharmony_ci   * @throws { BusinessError } 16000100 - Calling RemoveAbilityStageMonitor failed.
36261847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
36361847f8eSopenharmony_ci   * @crossplatform
36461847f8eSopenharmony_ci   * @atomicservice
36561847f8eSopenharmony_ci   * @since 11
36661847f8eSopenharmony_ci   */
36761847f8eSopenharmony_ci  removeAbilityStageMonitor(monitor: AbilityStageMonitor, callback: AsyncCallback<void>): void;
36861847f8eSopenharmony_ci
36961847f8eSopenharmony_ci  /**
37061847f8eSopenharmony_ci   * Remove a specified AbilityStageMonitor object from the application memory.
37161847f8eSopenharmony_ci   *
37261847f8eSopenharmony_ci   * @param { AbilityStageMonitor } monitor - AbilityStageMonitor object.
37361847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
37461847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
37561847f8eSopenharmony_ci   * @throws { BusinessError } 16000100 - RemoveAbilityStageMonitor failed.
37661847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
37761847f8eSopenharmony_ci   * @since 9
37861847f8eSopenharmony_ci   */
37961847f8eSopenharmony_ci  /**
38061847f8eSopenharmony_ci   * Remove a specified AbilityStageMonitor object from the application memory.
38161847f8eSopenharmony_ci   *
38261847f8eSopenharmony_ci   * @param { AbilityStageMonitor } monitor - AbilityStageMonitor object.
38361847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
38461847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
38561847f8eSopenharmony_ci   * @throws { BusinessError } 16000100 - RemoveAbilityStageMonitor failed.
38661847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
38761847f8eSopenharmony_ci   * @crossplatform
38861847f8eSopenharmony_ci   * @since 10
38961847f8eSopenharmony_ci   */
39061847f8eSopenharmony_ci  /**
39161847f8eSopenharmony_ci   * Remove a specified AbilityStageMonitor object from the application memory.
39261847f8eSopenharmony_ci   *
39361847f8eSopenharmony_ci   * @param { AbilityStageMonitor } monitor - AbilityStageMonitor object.
39461847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
39561847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
39661847f8eSopenharmony_ci   * @throws { BusinessError } 16000100 - Calling RemoveAbilityStageMonitor failed.
39761847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
39861847f8eSopenharmony_ci   * @crossplatform
39961847f8eSopenharmony_ci   * @atomicservice
40061847f8eSopenharmony_ci   * @since 11
40161847f8eSopenharmony_ci   */
40261847f8eSopenharmony_ci  removeAbilityStageMonitor(monitor: AbilityStageMonitor): Promise<void>;
40361847f8eSopenharmony_ci
40461847f8eSopenharmony_ci  /**
40561847f8eSopenharmony_ci   * Remove a specified AbilityStageMonitor object from the application memory.
40661847f8eSopenharmony_ci   *
40761847f8eSopenharmony_ci   * @param { AbilityStageMonitor } monitor - AbilityStageMonitor object.
40861847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
40961847f8eSopenharmony_ci   * @throws { BusinessError } 16000100 - RemoveAbilityStageMonitorSync failed.
41061847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
41161847f8eSopenharmony_ci   * @crossplatform
41261847f8eSopenharmony_ci   * @since 10
41361847f8eSopenharmony_ci   */
41461847f8eSopenharmony_ci  /**
41561847f8eSopenharmony_ci   * Remove a specified AbilityStageMonitor object from the application memory.
41661847f8eSopenharmony_ci   *
41761847f8eSopenharmony_ci   * @param { AbilityStageMonitor } monitor - AbilityStageMonitor object.
41861847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
41961847f8eSopenharmony_ci   * @throws { BusinessError } 16000100 - Calling RemoveAbilityStageMonitorSync failed.
42061847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
42161847f8eSopenharmony_ci   * @crossplatform
42261847f8eSopenharmony_ci   * @atomicservice
42361847f8eSopenharmony_ci   * @since 11
42461847f8eSopenharmony_ci   */
42561847f8eSopenharmony_ci  removeAbilityStageMonitorSync(monitor: AbilityStageMonitor): void;
42661847f8eSopenharmony_ci
42761847f8eSopenharmony_ci  /**
42861847f8eSopenharmony_ci   * Wait for and returns the Ability object that matches the conditions set in the given AbilityMonitor.
42961847f8eSopenharmony_ci   *
43061847f8eSopenharmony_ci   * @param { AbilityMonitor } monitor - AbilityMonitor object.
43161847f8eSopenharmony_ci   * @param { AsyncCallback<UIAbility> } callback - The callback is used to return the Ability object.
43261847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
43361847f8eSopenharmony_ci   * @throws { BusinessError } 16000100 - WaitAbilityMonitor failed.
43461847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
43561847f8eSopenharmony_ci   * @since 9
43661847f8eSopenharmony_ci   */
43761847f8eSopenharmony_ci  /**
43861847f8eSopenharmony_ci   * Wait for and returns the Ability object that matches the conditions set in the given AbilityMonitor.
43961847f8eSopenharmony_ci   *
44061847f8eSopenharmony_ci   * @param { AbilityMonitor } monitor - AbilityMonitor object.
44161847f8eSopenharmony_ci   * @param { AsyncCallback<UIAbility> } callback - The callback is used to return the Ability object.
44261847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
44361847f8eSopenharmony_ci   * @throws { BusinessError } 16000100 - WaitAbilityMonitor failed.
44461847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
44561847f8eSopenharmony_ci   * @crossplatform
44661847f8eSopenharmony_ci   * @since 10
44761847f8eSopenharmony_ci   */
44861847f8eSopenharmony_ci  /**
44961847f8eSopenharmony_ci   * Wait for and returns the Ability object that matches the conditions set in the given AbilityMonitor.
45061847f8eSopenharmony_ci   *
45161847f8eSopenharmony_ci   * @param { AbilityMonitor } monitor - AbilityMonitor object.
45261847f8eSopenharmony_ci   * @param { AsyncCallback<UIAbility> } callback - The callback is used to return the Ability object.
45361847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
45461847f8eSopenharmony_ci   * @throws { BusinessError } 16000100 - Calling WaitAbilityMonitor failed.
45561847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
45661847f8eSopenharmony_ci   * @crossplatform
45761847f8eSopenharmony_ci   * @atomicservice
45861847f8eSopenharmony_ci   * @since 11
45961847f8eSopenharmony_ci   */
46061847f8eSopenharmony_ci  waitAbilityMonitor(monitor: AbilityMonitor, callback: AsyncCallback<UIAbility>): void;
46161847f8eSopenharmony_ci
46261847f8eSopenharmony_ci  /**
46361847f8eSopenharmony_ci   * Wait for and returns the Ability object that matches the conditions set in the given AbilityMonitor.
46461847f8eSopenharmony_ci   *
46561847f8eSopenharmony_ci   * @param { AbilityMonitor } monitor - AbilityMonitor object.
46661847f8eSopenharmony_ci   * @param { number } timeout - Maximum wait time, in milliseconds.
46761847f8eSopenharmony_ci   * @param { AsyncCallback<UIAbility> } callback - The callback is used to return the Ability object.
46861847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
46961847f8eSopenharmony_ci   * @throws { BusinessError } 16000100 - WaitAbilityMonitor failed.
47061847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
47161847f8eSopenharmony_ci   * @since 9
47261847f8eSopenharmony_ci   */
47361847f8eSopenharmony_ci  /**
47461847f8eSopenharmony_ci   * Wait for and returns the Ability object that matches the conditions set in the given AbilityMonitor.
47561847f8eSopenharmony_ci   *
47661847f8eSopenharmony_ci   * @param { AbilityMonitor } monitor - AbilityMonitor object.
47761847f8eSopenharmony_ci   * @param { number } timeout - Maximum wait time, in milliseconds.
47861847f8eSopenharmony_ci   * @param { AsyncCallback<UIAbility> } callback - The callback is used to return the Ability object.
47961847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
48061847f8eSopenharmony_ci   * @throws { BusinessError } 16000100 - WaitAbilityMonitor failed.
48161847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
48261847f8eSopenharmony_ci   * @crossplatform
48361847f8eSopenharmony_ci   * @since 10
48461847f8eSopenharmony_ci   */
48561847f8eSopenharmony_ci  /**
48661847f8eSopenharmony_ci   * Wait for and returns the Ability object that matches the conditions set in the given AbilityMonitor.
48761847f8eSopenharmony_ci   *
48861847f8eSopenharmony_ci   * @param { AbilityMonitor } monitor - AbilityMonitor object.
48961847f8eSopenharmony_ci   * @param { number } timeout - Maximum wait time, in milliseconds.
49061847f8eSopenharmony_ci   * @param { AsyncCallback<UIAbility> } callback - The callback is used to return the Ability object.
49161847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
49261847f8eSopenharmony_ci   * @throws { BusinessError } 16000100 - Calling WaitAbilityMonitor failed.
49361847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
49461847f8eSopenharmony_ci   * @crossplatform
49561847f8eSopenharmony_ci   * @atomicservice
49661847f8eSopenharmony_ci   * @since 11
49761847f8eSopenharmony_ci   */
49861847f8eSopenharmony_ci  waitAbilityMonitor(monitor: AbilityMonitor, timeout: number, callback: AsyncCallback<UIAbility>): void;
49961847f8eSopenharmony_ci
50061847f8eSopenharmony_ci  /**
50161847f8eSopenharmony_ci   * Wait for and returns the Ability object that matches the conditions set in the given AbilityMonitor.
50261847f8eSopenharmony_ci   *
50361847f8eSopenharmony_ci   * @param { AbilityMonitor } monitor - AbilityMonitor object.
50461847f8eSopenharmony_ci   * @param { number } [timeout] - Maximum wait time, in milliseconds.
50561847f8eSopenharmony_ci   * @returns { Promise<UIAbility> } Returns the Ability object.
50661847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
50761847f8eSopenharmony_ci   * @throws { BusinessError } 16000100 - WaitAbilityMonitor failed.
50861847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
50961847f8eSopenharmony_ci   * @since 9
51061847f8eSopenharmony_ci   */
51161847f8eSopenharmony_ci  /**
51261847f8eSopenharmony_ci   * Wait for and returns the Ability object that matches the conditions set in the given AbilityMonitor.
51361847f8eSopenharmony_ci   *
51461847f8eSopenharmony_ci   * @param { AbilityMonitor } monitor - AbilityMonitor object.
51561847f8eSopenharmony_ci   * @param { number } [timeout] - Maximum wait time, in milliseconds.
51661847f8eSopenharmony_ci   * @returns { Promise<UIAbility> } Returns the Ability object.
51761847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
51861847f8eSopenharmony_ci   * @throws { BusinessError } 16000100 - WaitAbilityMonitor failed.
51961847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
52061847f8eSopenharmony_ci   * @crossplatform
52161847f8eSopenharmony_ci   * @since 10
52261847f8eSopenharmony_ci   */
52361847f8eSopenharmony_ci  /**
52461847f8eSopenharmony_ci   * Wait for and returns the Ability object that matches the conditions set in the given AbilityMonitor.
52561847f8eSopenharmony_ci   *
52661847f8eSopenharmony_ci   * @param { AbilityMonitor } monitor - AbilityMonitor object.
52761847f8eSopenharmony_ci   * @param { number } [timeout] - Maximum wait time, in milliseconds.
52861847f8eSopenharmony_ci   * @returns { Promise<UIAbility> } Returns the Ability object.
52961847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
53061847f8eSopenharmony_ci   * @throws { BusinessError } 16000100 - Calling WaitAbilityMonitor failed.
53161847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
53261847f8eSopenharmony_ci   * @crossplatform
53361847f8eSopenharmony_ci   * @atomicservice
53461847f8eSopenharmony_ci   * @since 11
53561847f8eSopenharmony_ci   */
53661847f8eSopenharmony_ci  waitAbilityMonitor(monitor: AbilityMonitor, timeout?: number): Promise<UIAbility>;
53761847f8eSopenharmony_ci
53861847f8eSopenharmony_ci  /**
53961847f8eSopenharmony_ci   * Wait for and returns the AbilityStage object that matches the conditions set in the given AbilityStageMonitor.
54061847f8eSopenharmony_ci   *
54161847f8eSopenharmony_ci   * @param { AbilityStageMonitor } monitor - AbilityStageMonitor object.
54261847f8eSopenharmony_ci   * @param { AsyncCallback<AbilityStage> } callback - The callback is used to return the AbilityStage object.
54361847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
54461847f8eSopenharmony_ci   * @throws { BusinessError } 16000100 - WaitAbilityStageMonitor failed.
54561847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
54661847f8eSopenharmony_ci   * @since 9
54761847f8eSopenharmony_ci   */
54861847f8eSopenharmony_ci  /**
54961847f8eSopenharmony_ci   * Wait for and returns the AbilityStage object that matches the conditions set in the given AbilityStageMonitor.
55061847f8eSopenharmony_ci   *
55161847f8eSopenharmony_ci   * @param { AbilityStageMonitor } monitor - AbilityStageMonitor object.
55261847f8eSopenharmony_ci   * @param { AsyncCallback<AbilityStage> } callback - The callback is used to return the AbilityStage object.
55361847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
55461847f8eSopenharmony_ci   * @throws { BusinessError } 16000100 - WaitAbilityStageMonitor failed.
55561847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
55661847f8eSopenharmony_ci   * @crossplatform
55761847f8eSopenharmony_ci   * @since 10
55861847f8eSopenharmony_ci   */
55961847f8eSopenharmony_ci  /**
56061847f8eSopenharmony_ci   * Wait for and returns the AbilityStage object that matches the conditions set in the given AbilityStageMonitor.
56161847f8eSopenharmony_ci   *
56261847f8eSopenharmony_ci   * @param { AbilityStageMonitor } monitor - AbilityStageMonitor object.
56361847f8eSopenharmony_ci   * @param { AsyncCallback<AbilityStage> } callback - The callback is used to return the AbilityStage object.
56461847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
56561847f8eSopenharmony_ci   * @throws { BusinessError } 16000100 - Calling WaitAbilityStageMonitor failed.
56661847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
56761847f8eSopenharmony_ci   * @crossplatform
56861847f8eSopenharmony_ci   * @atomicservice
56961847f8eSopenharmony_ci   * @since 11
57061847f8eSopenharmony_ci   */
57161847f8eSopenharmony_ci  waitAbilityStageMonitor(monitor: AbilityStageMonitor, callback: AsyncCallback<AbilityStage>): void;
57261847f8eSopenharmony_ci
57361847f8eSopenharmony_ci  /**
57461847f8eSopenharmony_ci   * Wait for and returns the AbilityStage object that matches the conditions set in the given AbilityStageMonitor.
57561847f8eSopenharmony_ci   *
57661847f8eSopenharmony_ci   * @param { AbilityStageMonitor } monitor - AbilityStageMonitor object.
57761847f8eSopenharmony_ci   * @param { number } timeout - Maximum wait time, in milliseconds.
57861847f8eSopenharmony_ci   * @param { AsyncCallback<AbilityStage> } callback - The callback is used to return the AbilityStage object.
57961847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
58061847f8eSopenharmony_ci   * @throws { BusinessError } 16000100 - WaitAbilityStageMonitor failed.
58161847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
58261847f8eSopenharmony_ci   * @since 9
58361847f8eSopenharmony_ci   */
58461847f8eSopenharmony_ci  /**
58561847f8eSopenharmony_ci   * Wait for and returns the AbilityStage object that matches the conditions set in the given AbilityStageMonitor.
58661847f8eSopenharmony_ci   *
58761847f8eSopenharmony_ci   * @param { AbilityStageMonitor } monitor - AbilityStageMonitor object.
58861847f8eSopenharmony_ci   * @param { number } timeout - Maximum wait time, in milliseconds.
58961847f8eSopenharmony_ci   * @param { AsyncCallback<AbilityStage> } callback - The callback is used to return the AbilityStage object.
59061847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
59161847f8eSopenharmony_ci   * @throws { BusinessError } 16000100 - WaitAbilityStageMonitor failed.
59261847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
59361847f8eSopenharmony_ci   * @crossplatform
59461847f8eSopenharmony_ci   * @since 10
59561847f8eSopenharmony_ci   */
59661847f8eSopenharmony_ci  /**
59761847f8eSopenharmony_ci   * Wait for and returns the AbilityStage object that matches the conditions set in the given AbilityStageMonitor.
59861847f8eSopenharmony_ci   *
59961847f8eSopenharmony_ci   * @param { AbilityStageMonitor } monitor - AbilityStageMonitor object.
60061847f8eSopenharmony_ci   * @param { number } timeout - Maximum wait time, in milliseconds.
60161847f8eSopenharmony_ci   * @param { AsyncCallback<AbilityStage> } callback - The callback is used to return the AbilityStage object.
60261847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
60361847f8eSopenharmony_ci   * @throws { BusinessError } 16000100 - Calling WaitAbilityStageMonitor failed.
60461847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
60561847f8eSopenharmony_ci   * @crossplatform
60661847f8eSopenharmony_ci   * @atomicservice
60761847f8eSopenharmony_ci   * @since 11
60861847f8eSopenharmony_ci   */
60961847f8eSopenharmony_ci  waitAbilityStageMonitor(monitor: AbilityStageMonitor, timeout: number, callback: AsyncCallback<AbilityStage>): void;
61061847f8eSopenharmony_ci
61161847f8eSopenharmony_ci  /**
61261847f8eSopenharmony_ci   * Wait for and returns the AbilityStage object that matches the conditions set in the given AbilityStageMonitor.
61361847f8eSopenharmony_ci   *
61461847f8eSopenharmony_ci   * @param { AbilityStageMonitor } monitor - AbilityStageMonitor object.
61561847f8eSopenharmony_ci   * @param { number } [timeout] - Maximum wait time, in milliseconds.
61661847f8eSopenharmony_ci   * @returns { Promise<AbilityStage> } Returns the AbilityStage object.
61761847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
61861847f8eSopenharmony_ci   * @throws { BusinessError } 16000100 - WaitAbilityStageMonitor failed.
61961847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
62061847f8eSopenharmony_ci   * @since 9
62161847f8eSopenharmony_ci   */
62261847f8eSopenharmony_ci  /**
62361847f8eSopenharmony_ci   * Wait for and returns the AbilityStage object that matches the conditions set in the given AbilityStageMonitor.
62461847f8eSopenharmony_ci   *
62561847f8eSopenharmony_ci   * @param { AbilityStageMonitor } monitor - AbilityStageMonitor object.
62661847f8eSopenharmony_ci   * @param { number } [timeout] - Maximum wait time, in milliseconds.
62761847f8eSopenharmony_ci   * @returns { Promise<AbilityStage> } Returns the AbilityStage object.
62861847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
62961847f8eSopenharmony_ci   * @throws { BusinessError } 16000100 - WaitAbilityStageMonitor failed.
63061847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
63161847f8eSopenharmony_ci   * @crossplatform
63261847f8eSopenharmony_ci   * @since 10
63361847f8eSopenharmony_ci   */
63461847f8eSopenharmony_ci  /**
63561847f8eSopenharmony_ci   * Wait for and returns the AbilityStage object that matches the conditions set in the given AbilityStageMonitor.
63661847f8eSopenharmony_ci   *
63761847f8eSopenharmony_ci   * @param { AbilityStageMonitor } monitor - AbilityStageMonitor object.
63861847f8eSopenharmony_ci   * @param { number } [timeout] - Maximum wait time, in milliseconds.
63961847f8eSopenharmony_ci   * @returns { Promise<AbilityStage> } Returns the AbilityStage object.
64061847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
64161847f8eSopenharmony_ci   * @throws { BusinessError } 16000100 - Calling WaitAbilityStageMonitor failed.
64261847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
64361847f8eSopenharmony_ci   * @crossplatform
64461847f8eSopenharmony_ci   * @atomicservice
64561847f8eSopenharmony_ci   * @since 11
64661847f8eSopenharmony_ci   */
64761847f8eSopenharmony_ci  waitAbilityStageMonitor(monitor: AbilityStageMonitor, timeout?: number): Promise<AbilityStage>;
64861847f8eSopenharmony_ci
64961847f8eSopenharmony_ci  /**
65061847f8eSopenharmony_ci   * Obtain the application context.
65161847f8eSopenharmony_ci   *
65261847f8eSopenharmony_ci   * @returns { Context } Returns the app Context.
65361847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
65461847f8eSopenharmony_ci   * @since 9
65561847f8eSopenharmony_ci   */
65661847f8eSopenharmony_ci  /**
65761847f8eSopenharmony_ci   * Obtain the application context.
65861847f8eSopenharmony_ci   *
65961847f8eSopenharmony_ci   * @returns { Context } Returns the app Context.
66061847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
66161847f8eSopenharmony_ci   * @crossplatform
66261847f8eSopenharmony_ci   * @since 10
66361847f8eSopenharmony_ci   */
66461847f8eSopenharmony_ci  /**
66561847f8eSopenharmony_ci   * Obtain the application context.
66661847f8eSopenharmony_ci   *
66761847f8eSopenharmony_ci   * @returns { Context } Returns the app Context.
66861847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
66961847f8eSopenharmony_ci   * @crossplatform
67061847f8eSopenharmony_ci   * @atomicservice
67161847f8eSopenharmony_ci   * @since 11
67261847f8eSopenharmony_ci   */
67361847f8eSopenharmony_ci  getAppContext(): Context;
67461847f8eSopenharmony_ci
67561847f8eSopenharmony_ci  /**
67661847f8eSopenharmony_ci   * Obtain the lifecycle state of a specified ability.
67761847f8eSopenharmony_ci   *
67861847f8eSopenharmony_ci   * @param { UIAbility } ability - The Ability object.
67961847f8eSopenharmony_ci   * @returns { number } Returns the state of the Ability object.
68061847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
68161847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
68261847f8eSopenharmony_ci   * @since 9
68361847f8eSopenharmony_ci   */
68461847f8eSopenharmony_ci  /**
68561847f8eSopenharmony_ci   * Obtain the lifecycle state of a specified ability.
68661847f8eSopenharmony_ci   *
68761847f8eSopenharmony_ci   * @param { UIAbility } ability - The Ability object.
68861847f8eSopenharmony_ci   * @returns { number } Returns the state of the Ability object.
68961847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
69061847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
69161847f8eSopenharmony_ci   * @crossplatform
69261847f8eSopenharmony_ci   * @since 10
69361847f8eSopenharmony_ci   */
69461847f8eSopenharmony_ci  /**
69561847f8eSopenharmony_ci   * Obtain the lifecycle state of a specified ability.
69661847f8eSopenharmony_ci   *
69761847f8eSopenharmony_ci   * @param { UIAbility } ability - The Ability object.
69861847f8eSopenharmony_ci   * @returns { number } Returns the state of the Ability object.
69961847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
70061847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
70161847f8eSopenharmony_ci   * @crossplatform
70261847f8eSopenharmony_ci   * @atomicservice
70361847f8eSopenharmony_ci   * @since 11
70461847f8eSopenharmony_ci   */
70561847f8eSopenharmony_ci  getAbilityState(ability: UIAbility): number;
70661847f8eSopenharmony_ci
70761847f8eSopenharmony_ci  /**
70861847f8eSopenharmony_ci   * Obtain the ability that is currently being displayed in this process.
70961847f8eSopenharmony_ci   *
71061847f8eSopenharmony_ci   * @param { AsyncCallback<UIAbility> } callback - The callback is used to return the Ability object.
71161847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
71261847f8eSopenharmony_ci   * @throws { BusinessError } 16000100 - GetCurrentTopAbility failed.
71361847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
71461847f8eSopenharmony_ci   * @since 9
71561847f8eSopenharmony_ci   */
71661847f8eSopenharmony_ci  /**
71761847f8eSopenharmony_ci   * Obtain the ability that is currently being displayed in this process.
71861847f8eSopenharmony_ci   *
71961847f8eSopenharmony_ci   * @param { AsyncCallback<UIAbility> } callback - The callback is used to return the Ability object.
72061847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
72161847f8eSopenharmony_ci   * @throws { BusinessError } 16000100 - GetCurrentTopAbility failed.
72261847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
72361847f8eSopenharmony_ci   * @crossplatform
72461847f8eSopenharmony_ci   * @since 10
72561847f8eSopenharmony_ci   */
72661847f8eSopenharmony_ci  /**
72761847f8eSopenharmony_ci   * Obtain the ability that is currently being displayed in this process.
72861847f8eSopenharmony_ci   *
72961847f8eSopenharmony_ci   * @param { AsyncCallback<UIAbility> } callback - The callback is used to return the Ability object.
73061847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
73161847f8eSopenharmony_ci   * @throws { BusinessError } 16000100 - Calling GetCurrentTopAbility failed.
73261847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
73361847f8eSopenharmony_ci   * @crossplatform
73461847f8eSopenharmony_ci   * @atomicservice
73561847f8eSopenharmony_ci   * @since 11
73661847f8eSopenharmony_ci   */
73761847f8eSopenharmony_ci  getCurrentTopAbility(callback: AsyncCallback<UIAbility>): void;
73861847f8eSopenharmony_ci
73961847f8eSopenharmony_ci  /**
74061847f8eSopenharmony_ci   * Obtain the ability that is currently being displayed in this process.
74161847f8eSopenharmony_ci   *
74261847f8eSopenharmony_ci   * @returns { Promise<UIAbility> } Returns the Ability object.
74361847f8eSopenharmony_ci   * @throws { BusinessError } 16000100 - GetCurrentTopAbility failed.
74461847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
74561847f8eSopenharmony_ci   * @since 9
74661847f8eSopenharmony_ci   */
74761847f8eSopenharmony_ci  /**
74861847f8eSopenharmony_ci   * Obtain the ability that is currently being displayed in this process.
74961847f8eSopenharmony_ci   *
75061847f8eSopenharmony_ci   * @returns { Promise<UIAbility> } Returns the Ability object.
75161847f8eSopenharmony_ci   * @throws { BusinessError } 16000100 - GetCurrentTopAbility failed.
75261847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
75361847f8eSopenharmony_ci   * @crossplatform
75461847f8eSopenharmony_ci   * @since 10
75561847f8eSopenharmony_ci   */
75661847f8eSopenharmony_ci  /**
75761847f8eSopenharmony_ci   * Obtain the ability that is currently being displayed in this process.
75861847f8eSopenharmony_ci   *
75961847f8eSopenharmony_ci   * @returns { Promise<UIAbility> } Returns the Ability object.
76061847f8eSopenharmony_ci   * @throws { BusinessError } 16000100 - Calling GetCurrentTopAbility failed.
76161847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
76261847f8eSopenharmony_ci   * @crossplatform
76361847f8eSopenharmony_ci   * @atomicservice
76461847f8eSopenharmony_ci   * @since 11
76561847f8eSopenharmony_ci   */
76661847f8eSopenharmony_ci  getCurrentTopAbility(): Promise<UIAbility>;
76761847f8eSopenharmony_ci
76861847f8eSopenharmony_ci  /**
76961847f8eSopenharmony_ci   * Start a new ability.
77061847f8eSopenharmony_ci   *
77161847f8eSopenharmony_ci   * @param { Want } want - Indicates the ability to start
77261847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback of startAbility.
77361847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
77461847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
77561847f8eSopenharmony_ci   * @throws { BusinessError } 16000002 - Incorrect ability type.
77661847f8eSopenharmony_ci   * @throws { BusinessError } 16000004 - Can not start invisible component.
77761847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
77861847f8eSopenharmony_ci   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
77961847f8eSopenharmony_ci   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
78061847f8eSopenharmony_ci   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
78161847f8eSopenharmony_ci   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
78261847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
78361847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
78461847f8eSopenharmony_ci   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
78561847f8eSopenharmony_ci   * @throws { BusinessError } 16000055 - Installation-free timed out.
78661847f8eSopenharmony_ci   * @throws { BusinessError } 16200001 - The caller has been released.
78761847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
78861847f8eSopenharmony_ci   * @since 9
78961847f8eSopenharmony_ci   */
79061847f8eSopenharmony_ci  /**
79161847f8eSopenharmony_ci   * Start a new ability.
79261847f8eSopenharmony_ci   *
79361847f8eSopenharmony_ci   * @param { Want } want - Indicates the ability to start
79461847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback of startAbility.
79561847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
79661847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
79761847f8eSopenharmony_ci   * @throws { BusinessError } 16000002 - Incorrect ability type.
79861847f8eSopenharmony_ci   * @throws { BusinessError } 16000004 - Can not start invisible component.
79961847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
80061847f8eSopenharmony_ci   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
80161847f8eSopenharmony_ci   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
80261847f8eSopenharmony_ci   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
80361847f8eSopenharmony_ci   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
80461847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
80561847f8eSopenharmony_ci   * @throws { BusinessError } 16000012 - The application is controlled.
80661847f8eSopenharmony_ci   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
80761847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
80861847f8eSopenharmony_ci   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
80961847f8eSopenharmony_ci   * @throws { BusinessError } 16000055 - Installation-free timed out.
81061847f8eSopenharmony_ci   * @throws { BusinessError } 16200001 - The caller has been released.
81161847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
81261847f8eSopenharmony_ci   * @crossplatform
81361847f8eSopenharmony_ci   * @since 10
81461847f8eSopenharmony_ci   */
81561847f8eSopenharmony_ci  /**
81661847f8eSopenharmony_ci   * Start a new ability.
81761847f8eSopenharmony_ci   *
81861847f8eSopenharmony_ci   * @param { Want } want - Indicates the ability to start
81961847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback of startAbility.
82061847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
82161847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
82261847f8eSopenharmony_ci   * @throws { BusinessError } 16000002 - Incorrect ability type.
82361847f8eSopenharmony_ci   * @throws { BusinessError } 16000004 - Failed to start the invisible ability.
82461847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
82561847f8eSopenharmony_ci   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
82661847f8eSopenharmony_ci   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
82761847f8eSopenharmony_ci   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
82861847f8eSopenharmony_ci   * @throws { BusinessError } 16000010 - The call with the continuation and prepare continuation flag is forbidden.
82961847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
83061847f8eSopenharmony_ci   * @throws { BusinessError } 16000012 - The application is controlled.
83161847f8eSopenharmony_ci   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
83261847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
83361847f8eSopenharmony_ci   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
83461847f8eSopenharmony_ci   * @throws { BusinessError } 16000055 - Installation-free timed out.
83561847f8eSopenharmony_ci   * @throws { BusinessError } 16200001 - The caller has been released.
83661847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
83761847f8eSopenharmony_ci   * @crossplatform
83861847f8eSopenharmony_ci   * @atomicservice
83961847f8eSopenharmony_ci   * @since 11
84061847f8eSopenharmony_ci   */
84161847f8eSopenharmony_ci  startAbility(want: Want, callback: AsyncCallback<void>): void;
84261847f8eSopenharmony_ci
84361847f8eSopenharmony_ci  /**
84461847f8eSopenharmony_ci   * Start a new ability.
84561847f8eSopenharmony_ci   *
84661847f8eSopenharmony_ci   * @param { Want } want - Indicates the ability to start
84761847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
84861847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
84961847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
85061847f8eSopenharmony_ci   * @throws { BusinessError } 16000002 - Incorrect ability type.
85161847f8eSopenharmony_ci   * @throws { BusinessError } 16000004 - Can not start invisible component.
85261847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
85361847f8eSopenharmony_ci   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
85461847f8eSopenharmony_ci   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
85561847f8eSopenharmony_ci   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
85661847f8eSopenharmony_ci   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
85761847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
85861847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
85961847f8eSopenharmony_ci   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
86061847f8eSopenharmony_ci   * @throws { BusinessError } 16000055 - Installation-free timed out.
86161847f8eSopenharmony_ci   * @throws { BusinessError } 16200001 - The caller has been released.
86261847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
86361847f8eSopenharmony_ci   * @since 9
86461847f8eSopenharmony_ci   */
86561847f8eSopenharmony_ci  /**
86661847f8eSopenharmony_ci   * Start a new ability.
86761847f8eSopenharmony_ci   *
86861847f8eSopenharmony_ci   * @param { Want } want - Indicates the ability to start
86961847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
87061847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
87161847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
87261847f8eSopenharmony_ci   * @throws { BusinessError } 16000002 - Incorrect ability type.
87361847f8eSopenharmony_ci   * @throws { BusinessError } 16000004 - Can not start invisible component.
87461847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
87561847f8eSopenharmony_ci   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
87661847f8eSopenharmony_ci   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
87761847f8eSopenharmony_ci   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
87861847f8eSopenharmony_ci   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
87961847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
88061847f8eSopenharmony_ci   * @throws { BusinessError } 16000012 - The application is controlled.
88161847f8eSopenharmony_ci   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
88261847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
88361847f8eSopenharmony_ci   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
88461847f8eSopenharmony_ci   * @throws { BusinessError } 16000055 - Installation-free timed out.
88561847f8eSopenharmony_ci   * @throws { BusinessError } 16200001 - The caller has been released.
88661847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
88761847f8eSopenharmony_ci   * @crossplatform
88861847f8eSopenharmony_ci   * @since 10
88961847f8eSopenharmony_ci   */
89061847f8eSopenharmony_ci  /**
89161847f8eSopenharmony_ci   * Start a new ability.
89261847f8eSopenharmony_ci   *
89361847f8eSopenharmony_ci   * @param { Want } want - Indicates the ability to start
89461847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
89561847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
89661847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
89761847f8eSopenharmony_ci   * @throws { BusinessError } 16000002 - Incorrect ability type.
89861847f8eSopenharmony_ci   * @throws { BusinessError } 16000004 - Failed to start the invisible ability.
89961847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
90061847f8eSopenharmony_ci   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
90161847f8eSopenharmony_ci   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
90261847f8eSopenharmony_ci   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
90361847f8eSopenharmony_ci   * @throws { BusinessError } 16000010 - The call with the continuation and prepare continuation flag is forbidden.
90461847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
90561847f8eSopenharmony_ci   * @throws { BusinessError } 16000012 - The application is controlled.
90661847f8eSopenharmony_ci   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
90761847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
90861847f8eSopenharmony_ci   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
90961847f8eSopenharmony_ci   * @throws { BusinessError } 16000055 - Installation-free timed out.
91061847f8eSopenharmony_ci   * @throws { BusinessError } 16200001 - The caller has been released.
91161847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
91261847f8eSopenharmony_ci   * @crossplatform
91361847f8eSopenharmony_ci   * @atomicservice
91461847f8eSopenharmony_ci   * @since 11
91561847f8eSopenharmony_ci   */
91661847f8eSopenharmony_ci  startAbility(want: Want): Promise<void>;
91761847f8eSopenharmony_ci
91861847f8eSopenharmony_ci  /**
91961847f8eSopenharmony_ci   * Invoke the Ability.onForeground() callback of a specified ability without changing its lifecycle state.
92061847f8eSopenharmony_ci   *
92161847f8eSopenharmony_ci   * @param { UIAbility } ability - The ability object.
92261847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback of doAbilityForeground.
92361847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
92461847f8eSopenharmony_ci   * @throws { BusinessError } 16000100 - DoAbilityForeground failed.
92561847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
92661847f8eSopenharmony_ci   * @since 9
92761847f8eSopenharmony_ci   */
92861847f8eSopenharmony_ci  /**
92961847f8eSopenharmony_ci   * Invoke the Ability.onForeground() callback of a specified ability without changing its lifecycle state.
93061847f8eSopenharmony_ci   *
93161847f8eSopenharmony_ci   * @param { UIAbility } ability - The ability object.
93261847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback of doAbilityForeground.
93361847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
93461847f8eSopenharmony_ci   * @throws { BusinessError } 16000100 - DoAbilityForeground failed.
93561847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
93661847f8eSopenharmony_ci   * @crossplatform
93761847f8eSopenharmony_ci   * @since 10
93861847f8eSopenharmony_ci   */
93961847f8eSopenharmony_ci  /**
94061847f8eSopenharmony_ci   * Invoke the Ability.onForeground() callback of a specified ability without changing its lifecycle state.
94161847f8eSopenharmony_ci   *
94261847f8eSopenharmony_ci   * @param { UIAbility } ability - The ability object.
94361847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback of doAbilityForeground.
94461847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
94561847f8eSopenharmony_ci   * @throws { BusinessError } 16000100 - Calling DoAbilityForeground failed.
94661847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
94761847f8eSopenharmony_ci   * @crossplatform
94861847f8eSopenharmony_ci   * @atomicservice
94961847f8eSopenharmony_ci   * @since 11
95061847f8eSopenharmony_ci   */
95161847f8eSopenharmony_ci  doAbilityForeground(ability: UIAbility, callback: AsyncCallback<void>): void;
95261847f8eSopenharmony_ci
95361847f8eSopenharmony_ci  /**
95461847f8eSopenharmony_ci   * Invoke the Ability.onForeground() callback of a specified ability without changing its lifecycle state.
95561847f8eSopenharmony_ci   *
95661847f8eSopenharmony_ci   * @param { UIAbility } ability - The ability object.
95761847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
95861847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
95961847f8eSopenharmony_ci   * @throws { BusinessError } 16000100 - DoAbilityForeground failed.
96061847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
96161847f8eSopenharmony_ci   * @since 9
96261847f8eSopenharmony_ci   */
96361847f8eSopenharmony_ci  /**
96461847f8eSopenharmony_ci   * Invoke the Ability.onForeground() callback of a specified ability without changing its lifecycle state.
96561847f8eSopenharmony_ci   *
96661847f8eSopenharmony_ci   * @param { UIAbility } ability - The ability object.
96761847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
96861847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
96961847f8eSopenharmony_ci   * @throws { BusinessError } 16000100 - DoAbilityForeground failed.
97061847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
97161847f8eSopenharmony_ci   * @crossplatform
97261847f8eSopenharmony_ci   * @since 10
97361847f8eSopenharmony_ci   */
97461847f8eSopenharmony_ci  /**
97561847f8eSopenharmony_ci   * Invoke the Ability.onForeground() callback of a specified ability without changing its lifecycle state.
97661847f8eSopenharmony_ci   *
97761847f8eSopenharmony_ci   * @param { UIAbility } ability - The ability object.
97861847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
97961847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
98061847f8eSopenharmony_ci   * @throws { BusinessError } 16000100 - Calling DoAbilityForeground failed.
98161847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
98261847f8eSopenharmony_ci   * @crossplatform
98361847f8eSopenharmony_ci   * @atomicservice
98461847f8eSopenharmony_ci   * @since 11
98561847f8eSopenharmony_ci   */
98661847f8eSopenharmony_ci  doAbilityForeground(ability: UIAbility): Promise<void>;
98761847f8eSopenharmony_ci
98861847f8eSopenharmony_ci  /**
98961847f8eSopenharmony_ci   * Invoke the Ability.onBackground() callback of a specified ability without changing its lifecycle state.
99061847f8eSopenharmony_ci   *
99161847f8eSopenharmony_ci   * @param { UIAbility } ability - The ability object.
99261847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback of doAbilityBackground.
99361847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
99461847f8eSopenharmony_ci   * @throws { BusinessError } 16000100 - DoAbilityBackground failed.
99561847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
99661847f8eSopenharmony_ci   * @since 9
99761847f8eSopenharmony_ci   */
99861847f8eSopenharmony_ci  /**
99961847f8eSopenharmony_ci   * Invoke the Ability.onBackground() callback of a specified ability without changing its lifecycle state.
100061847f8eSopenharmony_ci   *
100161847f8eSopenharmony_ci   * @param { UIAbility } ability - The ability object.
100261847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback of doAbilityBackground.
100361847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
100461847f8eSopenharmony_ci   * @throws { BusinessError } 16000100 - DoAbilityBackground failed.
100561847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
100661847f8eSopenharmony_ci   * @crossplatform
100761847f8eSopenharmony_ci   * @since 10
100861847f8eSopenharmony_ci   */
100961847f8eSopenharmony_ci  /**
101061847f8eSopenharmony_ci   * Invoke the Ability.onBackground() callback of a specified ability without changing its lifecycle state.
101161847f8eSopenharmony_ci   *
101261847f8eSopenharmony_ci   * @param { UIAbility } ability - The ability object.
101361847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback of doAbilityBackground.
101461847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
101561847f8eSopenharmony_ci   * @throws { BusinessError } 16000100 - Calling DoAbilityBackground failed.
101661847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
101761847f8eSopenharmony_ci   * @crossplatform
101861847f8eSopenharmony_ci   * @atomicservice
101961847f8eSopenharmony_ci   * @since 11
102061847f8eSopenharmony_ci   */
102161847f8eSopenharmony_ci  doAbilityBackground(ability: UIAbility, callback: AsyncCallback<void>): void;
102261847f8eSopenharmony_ci
102361847f8eSopenharmony_ci  /**
102461847f8eSopenharmony_ci   * Invoke the Ability.onBackground() callback of a specified ability without changing its lifecycle state.
102561847f8eSopenharmony_ci   *
102661847f8eSopenharmony_ci   * @param { UIAbility } ability - The ability object.
102761847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
102861847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
102961847f8eSopenharmony_ci   * @throws { BusinessError } 16000100 - DoAbilityBackground failed.
103061847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
103161847f8eSopenharmony_ci   * @since 9
103261847f8eSopenharmony_ci   */
103361847f8eSopenharmony_ci  /**
103461847f8eSopenharmony_ci   * Invoke the Ability.onBackground() callback of a specified ability without changing its lifecycle state.
103561847f8eSopenharmony_ci   *
103661847f8eSopenharmony_ci   * @param { UIAbility } ability - The ability object.
103761847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
103861847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
103961847f8eSopenharmony_ci   * @throws { BusinessError } 16000100 - DoAbilityBackground failed.
104061847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
104161847f8eSopenharmony_ci   * @crossplatform
104261847f8eSopenharmony_ci   * @since 10
104361847f8eSopenharmony_ci   */
104461847f8eSopenharmony_ci  /**
104561847f8eSopenharmony_ci   * Invoke the Ability.onBackground() callback of a specified ability without changing its lifecycle state.
104661847f8eSopenharmony_ci   *
104761847f8eSopenharmony_ci   * @param { UIAbility } ability - The ability object.
104861847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
104961847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
105061847f8eSopenharmony_ci   * @throws { BusinessError } 16000100 - Calling DoAbilityBackground failed.
105161847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
105261847f8eSopenharmony_ci   * @crossplatform
105361847f8eSopenharmony_ci   * @atomicservice
105461847f8eSopenharmony_ci   * @since 11
105561847f8eSopenharmony_ci   */
105661847f8eSopenharmony_ci  doAbilityBackground(ability: UIAbility): Promise<void>;
105761847f8eSopenharmony_ci
105861847f8eSopenharmony_ci  /**
105961847f8eSopenharmony_ci   * Prints log information to the unit testing console.
106061847f8eSopenharmony_ci   * The total length of the log information to be printed cannot exceed 1000 characters.
106161847f8eSopenharmony_ci   *
106261847f8eSopenharmony_ci   * @param { string } msg - Log information
106361847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback of print.
106461847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
106561847f8eSopenharmony_ci   * @since 8
106661847f8eSopenharmony_ci   */
106761847f8eSopenharmony_ci  /**
106861847f8eSopenharmony_ci   * Prints log information to the unit testing console.
106961847f8eSopenharmony_ci   * The total length of the log information to be printed cannot exceed 1000 characters.
107061847f8eSopenharmony_ci   *
107161847f8eSopenharmony_ci   * @param { string } msg - Log information
107261847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback of print.
107361847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
107461847f8eSopenharmony_ci   * @crossplatform
107561847f8eSopenharmony_ci   * @since 10
107661847f8eSopenharmony_ci   */
107761847f8eSopenharmony_ci  /**
107861847f8eSopenharmony_ci   * Prints log information to the unit testing console.
107961847f8eSopenharmony_ci   * The total length of the log information to be printed cannot exceed 1000 characters.
108061847f8eSopenharmony_ci   *
108161847f8eSopenharmony_ci   * @param { string } msg - Log information
108261847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback of print.
108361847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
108461847f8eSopenharmony_ci   * @crossplatform
108561847f8eSopenharmony_ci   * @atomicservice
108661847f8eSopenharmony_ci   * @since 11
108761847f8eSopenharmony_ci   */
108861847f8eSopenharmony_ci  print(msg: string, callback: AsyncCallback<void>): void;
108961847f8eSopenharmony_ci
109061847f8eSopenharmony_ci  /**
109161847f8eSopenharmony_ci   * Prints log information to the unit testing console.
109261847f8eSopenharmony_ci   * The total length of the log information to be printed cannot exceed 1000 characters.
109361847f8eSopenharmony_ci   *
109461847f8eSopenharmony_ci   * @param { string } msg - Log information
109561847f8eSopenharmony_ci   * @returns { Promise<void> } the promise returned by the function.
109661847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
109761847f8eSopenharmony_ci   * @since 8
109861847f8eSopenharmony_ci   */
109961847f8eSopenharmony_ci  /**
110061847f8eSopenharmony_ci   * Prints log information to the unit testing console.
110161847f8eSopenharmony_ci   * The total length of the log information to be printed cannot exceed 1000 characters.
110261847f8eSopenharmony_ci   *
110361847f8eSopenharmony_ci   * @param { string } msg - Log information
110461847f8eSopenharmony_ci   * @returns { Promise<void> } the promise returned by the function.
110561847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
110661847f8eSopenharmony_ci   * @crossplatform
110761847f8eSopenharmony_ci   * @since 10
110861847f8eSopenharmony_ci   */
110961847f8eSopenharmony_ci  /**
111061847f8eSopenharmony_ci   * Prints log information to the unit testing console.
111161847f8eSopenharmony_ci   * The total length of the log information to be printed cannot exceed 1000 characters.
111261847f8eSopenharmony_ci   *
111361847f8eSopenharmony_ci   * @param { string } msg - Log information
111461847f8eSopenharmony_ci   * @returns { Promise<void> } the promise returned by the function.
111561847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
111661847f8eSopenharmony_ci   * @crossplatform
111761847f8eSopenharmony_ci   * @atomicservice
111861847f8eSopenharmony_ci   * @since 11
111961847f8eSopenharmony_ci   */
112061847f8eSopenharmony_ci  print(msg: string): Promise<void>;
112161847f8eSopenharmony_ci
112261847f8eSopenharmony_ci  /**
112361847f8eSopenharmony_ci   * Prints log information to the unit testing console.
112461847f8eSopenharmony_ci   * The total length of the log information to be printed cannot exceed 1000 characters.
112561847f8eSopenharmony_ci   *
112661847f8eSopenharmony_ci   * @param { string } msg - Log information.
112761847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
112861847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
112961847f8eSopenharmony_ci   * @since 9
113061847f8eSopenharmony_ci   */
113161847f8eSopenharmony_ci  /**
113261847f8eSopenharmony_ci   * Prints log information to the unit testing console.
113361847f8eSopenharmony_ci   * The total length of the log information to be printed cannot exceed 1000 characters.
113461847f8eSopenharmony_ci   *
113561847f8eSopenharmony_ci   * @param { string } msg - Log information.
113661847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
113761847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
113861847f8eSopenharmony_ci   * @crossplatform
113961847f8eSopenharmony_ci   * @since 10
114061847f8eSopenharmony_ci   */
114161847f8eSopenharmony_ci  /**
114261847f8eSopenharmony_ci   * Prints log information to the unit testing console.
114361847f8eSopenharmony_ci   * The total length of the log information to be printed cannot exceed 1000 characters.
114461847f8eSopenharmony_ci   *
114561847f8eSopenharmony_ci   * @param { string } msg - Log information.
114661847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
114761847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
114861847f8eSopenharmony_ci   * @crossplatform
114961847f8eSopenharmony_ci   * @atomicservice
115061847f8eSopenharmony_ci   * @since 11
115161847f8eSopenharmony_ci   */
115261847f8eSopenharmony_ci  printSync(msg: string): void;
115361847f8eSopenharmony_ci
115461847f8eSopenharmony_ci  /**
115561847f8eSopenharmony_ci   * Execute the given command in the aa tools side.
115661847f8eSopenharmony_ci   *
115761847f8eSopenharmony_ci   * @param { string } cmd - Shell command
115861847f8eSopenharmony_ci   * @param { AsyncCallback<ShellCmdResult> } callback - The callback of executeShellCommand.
115961847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
116061847f8eSopenharmony_ci   * @since 8
116161847f8eSopenharmony_ci   */
116261847f8eSopenharmony_ci  /**
116361847f8eSopenharmony_ci   * Execute the given command in the aa tools side.
116461847f8eSopenharmony_ci   *
116561847f8eSopenharmony_ci   * @param { string } cmd - Shell command
116661847f8eSopenharmony_ci   * @param { AsyncCallback<ShellCmdResult> } callback - The callback of executeShellCommand.
116761847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
116861847f8eSopenharmony_ci   * @atomicservice
116961847f8eSopenharmony_ci   * @since 11
117061847f8eSopenharmony_ci   */
117161847f8eSopenharmony_ci  executeShellCommand(cmd: string, callback: AsyncCallback<ShellCmdResult>): void;
117261847f8eSopenharmony_ci
117361847f8eSopenharmony_ci  /**
117461847f8eSopenharmony_ci   * Execute the given command in the aa tools side.
117561847f8eSopenharmony_ci   *
117661847f8eSopenharmony_ci   * @param { string } cmd - Shell command
117761847f8eSopenharmony_ci   * @param { number } timeoutSecs - Timeout, in seconds
117861847f8eSopenharmony_ci   * @param { AsyncCallback<ShellCmdResult> } callback - The callback of executeShellCommand.
117961847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
118061847f8eSopenharmony_ci   * @since 8
118161847f8eSopenharmony_ci   */
118261847f8eSopenharmony_ci  /**
118361847f8eSopenharmony_ci   * Execute the given command in the aa tools side.
118461847f8eSopenharmony_ci   *
118561847f8eSopenharmony_ci   * @param { string } cmd - Shell command
118661847f8eSopenharmony_ci   * @param { number } timeoutSecs - Timeout, in seconds
118761847f8eSopenharmony_ci   * @param { AsyncCallback<ShellCmdResult> } callback - The callback of executeShellCommand.
118861847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
118961847f8eSopenharmony_ci   * @atomicservice
119061847f8eSopenharmony_ci   * @since 11
119161847f8eSopenharmony_ci   */
119261847f8eSopenharmony_ci  executeShellCommand(cmd: string, timeoutSecs: number, callback: AsyncCallback<ShellCmdResult>): void;
119361847f8eSopenharmony_ci
119461847f8eSopenharmony_ci  /**
119561847f8eSopenharmony_ci   * Execute the given command in the aa tools side.
119661847f8eSopenharmony_ci   *
119761847f8eSopenharmony_ci   * @param { string } cmd - Shell command
119861847f8eSopenharmony_ci   * @param { number } [timeoutSecs] - Timeout, in seconds
119961847f8eSopenharmony_ci   * @returns { Promise<ShellCmdResult> } the promise returned by the function.
120061847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
120161847f8eSopenharmony_ci   * @since 8
120261847f8eSopenharmony_ci   */
120361847f8eSopenharmony_ci  /**
120461847f8eSopenharmony_ci   * Execute the given command in the aa tools side.
120561847f8eSopenharmony_ci   *
120661847f8eSopenharmony_ci   * @param { string } cmd - Shell command
120761847f8eSopenharmony_ci   * @param { number } [timeoutSecs] - Timeout, in seconds
120861847f8eSopenharmony_ci   * @returns { Promise<ShellCmdResult> } the promise returned by the function.
120961847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
121061847f8eSopenharmony_ci   * @atomicservice
121161847f8eSopenharmony_ci   * @since 11
121261847f8eSopenharmony_ci   */
121361847f8eSopenharmony_ci  executeShellCommand(cmd: string, timeoutSecs?: number): Promise<ShellCmdResult>;
121461847f8eSopenharmony_ci
121561847f8eSopenharmony_ci  /**
121661847f8eSopenharmony_ci   * Finish the test and print log information to the unit testing console.
121761847f8eSopenharmony_ci   * The total length of the log information to be printed cannot exceed 1000 characters.
121861847f8eSopenharmony_ci   *
121961847f8eSopenharmony_ci   * @param { string } msg - Log information.
122061847f8eSopenharmony_ci   * @param { number } code - Result code.
122161847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback of finishTest.
122261847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
122361847f8eSopenharmony_ci   * @throws { BusinessError } 16000100 - FinishTest failed.
122461847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
122561847f8eSopenharmony_ci   * @since 9
122661847f8eSopenharmony_ci   */
122761847f8eSopenharmony_ci  /**
122861847f8eSopenharmony_ci   * Finish the test and print log information to the unit testing console.
122961847f8eSopenharmony_ci   * The total length of the log information to be printed cannot exceed 1000 characters.
123061847f8eSopenharmony_ci   *
123161847f8eSopenharmony_ci   * @param { string } msg - Log information.
123261847f8eSopenharmony_ci   * @param { number } code - Result code.
123361847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback of finishTest.
123461847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
123561847f8eSopenharmony_ci   * @throws { BusinessError } 16000100 - FinishTest failed.
123661847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
123761847f8eSopenharmony_ci   * @crossplatform
123861847f8eSopenharmony_ci   * @since 10
123961847f8eSopenharmony_ci   */
124061847f8eSopenharmony_ci  /**
124161847f8eSopenharmony_ci   * Finish the test and print log information to the unit testing console.
124261847f8eSopenharmony_ci   * The total length of the log information to be printed cannot exceed 1000 characters.
124361847f8eSopenharmony_ci   *
124461847f8eSopenharmony_ci   * @param { string } msg - Log information.
124561847f8eSopenharmony_ci   * @param { number } code - Result code.
124661847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback of finishTest.
124761847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
124861847f8eSopenharmony_ci   * @throws { BusinessError } 16000100 - Calling FinishTest failed.
124961847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
125061847f8eSopenharmony_ci   * @crossplatform
125161847f8eSopenharmony_ci   * @atomicservice
125261847f8eSopenharmony_ci   * @since 11
125361847f8eSopenharmony_ci   */
125461847f8eSopenharmony_ci  finishTest(msg: string, code: number, callback: AsyncCallback<void>): void;
125561847f8eSopenharmony_ci
125661847f8eSopenharmony_ci  /**
125761847f8eSopenharmony_ci   * Finish the test and print log information to the unit testing console.
125861847f8eSopenharmony_ci   * The total length of the log information to be printed cannot exceed 1000 characters.
125961847f8eSopenharmony_ci   *
126061847f8eSopenharmony_ci   * @param { string } msg - Log information.
126161847f8eSopenharmony_ci   * @param { number } code - Result code.
126261847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
126361847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
126461847f8eSopenharmony_ci   * @throws { BusinessError } 16000100 - FinishTest failed.
126561847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
126661847f8eSopenharmony_ci   * @since 9
126761847f8eSopenharmony_ci   */
126861847f8eSopenharmony_ci  /**
126961847f8eSopenharmony_ci   * Finish the test and print log information to the unit testing console.
127061847f8eSopenharmony_ci   * The total length of the log information to be printed cannot exceed 1000 characters.
127161847f8eSopenharmony_ci   *
127261847f8eSopenharmony_ci   * @param { string } msg - Log information.
127361847f8eSopenharmony_ci   * @param { number } code - Result code.
127461847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
127561847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
127661847f8eSopenharmony_ci   * @throws { BusinessError } 16000100 - FinishTest failed.
127761847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
127861847f8eSopenharmony_ci   * @crossplatform
127961847f8eSopenharmony_ci   * @since 10
128061847f8eSopenharmony_ci   */
128161847f8eSopenharmony_ci  /**
128261847f8eSopenharmony_ci   * Finish the test and print log information to the unit testing console.
128361847f8eSopenharmony_ci   * The total length of the log information to be printed cannot exceed 1000 characters.
128461847f8eSopenharmony_ci   *
128561847f8eSopenharmony_ci   * @param { string } msg - Log information.
128661847f8eSopenharmony_ci   * @param { number } code - Result code.
128761847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
128861847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
128961847f8eSopenharmony_ci   * @throws { BusinessError } 16000100 - Calling FinishTest failed.
129061847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
129161847f8eSopenharmony_ci   * @crossplatform
129261847f8eSopenharmony_ci   * @atomicservice
129361847f8eSopenharmony_ci   * @since 11
129461847f8eSopenharmony_ci   */
129561847f8eSopenharmony_ci  finishTest(msg: string, code: number): Promise<void>;
129661847f8eSopenharmony_ci
129761847f8eSopenharmony_ci  /**
129861847f8eSopenharmony_ci   * Used to set a list of mock data.
129961847f8eSopenharmony_ci   * @param { Record<string, string> } mockList - An object with string keys and string values. The keys represent the
130061847f8eSopenharmony_ci   *                                              target path to be replaced and the values represent the path of the
130161847f8eSopenharmony_ci   *                                              mock implementation to be used for the replacement.
130261847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
130361847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
130461847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
130561847f8eSopenharmony_ci   * @atomicservice
130661847f8eSopenharmony_ci   * @since 11
130761847f8eSopenharmony_ci   */
130861847f8eSopenharmony_ci  setMockList(mockList: Record<string, string>): void;
130961847f8eSopenharmony_ci}
131061847f8eSopenharmony_ci
131161847f8eSopenharmony_ciexport default AbilityDelegator;
1312