161847f8eSopenharmony_ci/*
261847f8eSopenharmony_ci * Copyright (c) 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 FormKit
1961847f8eSopenharmony_ci */
2061847f8eSopenharmony_ci
2161847f8eSopenharmony_ciimport { AsyncCallback } from './@ohos.base';
2261847f8eSopenharmony_ciimport { Callback } from './@ohos.base';
2361847f8eSopenharmony_ciimport formInfo from './@ohos.app.form.formInfo';
2461847f8eSopenharmony_ci
2561847f8eSopenharmony_ci/**
2661847f8eSopenharmony_ci * Interface of formObserver.
2761847f8eSopenharmony_ci *
2861847f8eSopenharmony_ci * @namespace formObserver
2961847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form
3061847f8eSopenharmony_ci * @systemapi
3161847f8eSopenharmony_ci * @since 10
3261847f8eSopenharmony_ci */
3361847f8eSopenharmony_cideclare namespace formObserver {
3461847f8eSopenharmony_ci  /**
3561847f8eSopenharmony_ci   * Listens to the event of add form.
3661847f8eSopenharmony_ci   * <p>You can use this method to listen to the event of add form.</p>
3761847f8eSopenharmony_ci   *
3861847f8eSopenharmony_ci   * @permission ohos.permission.OBSERVE_FORM_RUNNING
3961847f8eSopenharmony_ci   * @param { 'formAdd' } type - Indicates event type.
4061847f8eSopenharmony_ci   * @param { Callback<formInfo.RunningFormInfo> } observerCallback - The callback is used to return the running
4161847f8eSopenharmony_ci   *                                                                  form info.
4261847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not a system application.
4361847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
4461847f8eSopenharmony_ci   *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.
4561847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.Form
4661847f8eSopenharmony_ci   * @systemapi
4761847f8eSopenharmony_ci   * @since 10
4861847f8eSopenharmony_ci   */
4961847f8eSopenharmony_ci  function on(type: 'formAdd', observerCallback: Callback<formInfo.RunningFormInfo>): void;
5061847f8eSopenharmony_ci
5161847f8eSopenharmony_ci  /**
5261847f8eSopenharmony_ci   * Listens to the event of add form.
5361847f8eSopenharmony_ci   * <p>You can use this method to listen to the event of add form for a particular card host.</p>
5461847f8eSopenharmony_ci   *
5561847f8eSopenharmony_ci   * @permission ohos.permission.OBSERVE_FORM_RUNNING
5661847f8eSopenharmony_ci   * @param { 'formAdd' } type - Indicates event type.
5761847f8eSopenharmony_ci   * @param { string } hostBundleName - Indicates the bundle name of the form host application.
5861847f8eSopenharmony_ci   * @param { Callback<formInfo.RunningFormInfo> } observerCallback - The callback is used to return the running
5961847f8eSopenharmony_ci   *                                                                  form info.
6061847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not a system application.
6161847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
6261847f8eSopenharmony_ci   *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.
6361847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.Form
6461847f8eSopenharmony_ci   * @systemapi
6561847f8eSopenharmony_ci   * @since 10
6661847f8eSopenharmony_ci   */
6761847f8eSopenharmony_ci  function on(type: 'formAdd', hostBundleName: string, observerCallback: Callback<formInfo.RunningFormInfo>): void;
6861847f8eSopenharmony_ci
6961847f8eSopenharmony_ci  /**
7061847f8eSopenharmony_ci   * Cancels listening to the event of add form.
7161847f8eSopenharmony_ci   * <p>You can use this method to cancel listening to the event of add form.</p>
7261847f8eSopenharmony_ci   *
7361847f8eSopenharmony_ci   * @permission ohos.permission.OBSERVE_FORM_RUNNING
7461847f8eSopenharmony_ci   * @param { 'formAdd' } type - Indicates event type.
7561847f8eSopenharmony_ci   * @param { string } [hostBundleName] - Indicates the bundle name of the form host application.
7661847f8eSopenharmony_ci   * @param { Callback<formInfo.RunningFormInfo> } [observerCallback] - The callback is used to return the running
7761847f8eSopenharmony_ci   *                                                                    form info.
7861847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not a system application.
7961847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
8061847f8eSopenharmony_ci   *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.
8161847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.Form
8261847f8eSopenharmony_ci   * @systemapi
8361847f8eSopenharmony_ci   * @since 10
8461847f8eSopenharmony_ci   */
8561847f8eSopenharmony_ci  function off(type: 'formAdd', hostBundleName?: string, observerCallback?: Callback<formInfo.RunningFormInfo>): void;
8661847f8eSopenharmony_ci
8761847f8eSopenharmony_ci  /**
8861847f8eSopenharmony_ci   * Listens to the event of remove form.
8961847f8eSopenharmony_ci   * <p>You can use this method to listen to the event of remove form.</p>
9061847f8eSopenharmony_ci   *
9161847f8eSopenharmony_ci   * @permission ohos.permission.OBSERVE_FORM_RUNNING
9261847f8eSopenharmony_ci   * @param { 'formRemove' } type - Indicates event type.
9361847f8eSopenharmony_ci   * @param { Callback<formInfo.RunningFormInfo> } observerCallback - The callback is used to return the running
9461847f8eSopenharmony_ci   *                                                                  form info.
9561847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not a system application.
9661847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
9761847f8eSopenharmony_ci   *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.
9861847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.Form
9961847f8eSopenharmony_ci   * @systemapi
10061847f8eSopenharmony_ci   * @since 10
10161847f8eSopenharmony_ci   */
10261847f8eSopenharmony_ci  function on(type: 'formRemove', observerCallback: Callback<formInfo.RunningFormInfo>): void;
10361847f8eSopenharmony_ci
10461847f8eSopenharmony_ci  /**
10561847f8eSopenharmony_ci   * Listens to the event of remove form.
10661847f8eSopenharmony_ci   * <p>You can use this method to listen to the event of remove form for a particular card host.</p>
10761847f8eSopenharmony_ci   *
10861847f8eSopenharmony_ci   * @permission ohos.permission.OBSERVE_FORM_RUNNING
10961847f8eSopenharmony_ci   * @param { 'formRemove' } type - Indicates event type.
11061847f8eSopenharmony_ci   * @param { string } hostBundleName - Indicates the bundle name of the form host application.
11161847f8eSopenharmony_ci   * @param { Callback<formInfo.RunningFormInfo> } observerCallback - The callback is used to return the running
11261847f8eSopenharmony_ci   *                                                                  form info.
11361847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not a system application.
11461847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
11561847f8eSopenharmony_ci   *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.
11661847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.Form
11761847f8eSopenharmony_ci   * @systemapi
11861847f8eSopenharmony_ci   * @since 10
11961847f8eSopenharmony_ci   */
12061847f8eSopenharmony_ci  function on(type: 'formRemove', hostBundleName: string, observerCallback: Callback<formInfo.RunningFormInfo>): void;
12161847f8eSopenharmony_ci
12261847f8eSopenharmony_ci  /**
12361847f8eSopenharmony_ci   * Cancels listening to the event of remove form.
12461847f8eSopenharmony_ci   * <p>You can use this method to cancel listening to the event of remove form.</p>
12561847f8eSopenharmony_ci   *
12661847f8eSopenharmony_ci   * @permission ohos.permission.OBSERVE_FORM_RUNNING
12761847f8eSopenharmony_ci   * @param { 'formRemove' } type - Indicates event type.
12861847f8eSopenharmony_ci   * @param { string } [hostBundleName] - Indicates the bundle name of the form host application.
12961847f8eSopenharmony_ci   * @param { Callback<formInfo.RunningFormInfo> } [observerCallback] - The callback is used to return the running
13061847f8eSopenharmony_ci   *                                                                    form info.
13161847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not a system application.
13261847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
13361847f8eSopenharmony_ci   *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.
13461847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.Form
13561847f8eSopenharmony_ci   * @systemapi
13661847f8eSopenharmony_ci   * @since 10
13761847f8eSopenharmony_ci   */
13861847f8eSopenharmony_ci  function off(type: 'formRemove', hostBundleName?: string, observerCallback?: Callback<formInfo.RunningFormInfo>): void;
13961847f8eSopenharmony_ci
14061847f8eSopenharmony_ci  /**
14161847f8eSopenharmony_ci   * Listens to the event of notifyVisible type change.
14261847f8eSopenharmony_ci   * <p>You can use this method to listen to the event of notifyVisible type change.</p>
14361847f8eSopenharmony_ci   *
14461847f8eSopenharmony_ci   * @permission ohos.permission.OBSERVE_FORM_RUNNING
14561847f8eSopenharmony_ci   * @param { 'notifyVisible' } type - Indicates event type.
14661847f8eSopenharmony_ci   * @param { Callback<Array<formInfo.RunningFormInfo>> } observerCallback - The callback is used to return
14761847f8eSopenharmony_ci   *                                                                         the running form info.
14861847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not a system application.
14961847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
15061847f8eSopenharmony_ci   *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.
15161847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.Form
15261847f8eSopenharmony_ci   * @systemapi
15361847f8eSopenharmony_ci   * @since 10
15461847f8eSopenharmony_ci   */
15561847f8eSopenharmony_ci  function on(type: 'notifyVisible', observerCallback: Callback<Array<formInfo.RunningFormInfo>>): void;
15661847f8eSopenharmony_ci
15761847f8eSopenharmony_ci  /**
15861847f8eSopenharmony_ci   * Listens to the event of notifyVisible type change.
15961847f8eSopenharmony_ci   * <p>You can use this method to listen to the event of notifyVisible type change for a particular card host.</p>
16061847f8eSopenharmony_ci   *
16161847f8eSopenharmony_ci   * @permission ohos.permission.OBSERVE_FORM_RUNNING
16261847f8eSopenharmony_ci   * @param { 'notifyVisible' } type - Indicates event type.
16361847f8eSopenharmony_ci   * @param { string } hostBundleName - Indicates the bundle name of the form host application.
16461847f8eSopenharmony_ci   * @param { Callback<Array<formInfo.RunningFormInfo>> } observerCallback - The callback is used to return
16561847f8eSopenharmony_ci   *                                                                         the running form info.
16661847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not a system application.
16761847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
16861847f8eSopenharmony_ci   *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.
16961847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.Form
17061847f8eSopenharmony_ci   * @systemapi
17161847f8eSopenharmony_ci   * @since 10
17261847f8eSopenharmony_ci   */
17361847f8eSopenharmony_ci  function on(
17461847f8eSopenharmony_ci    type: 'notifyVisible',
17561847f8eSopenharmony_ci    hostBundleName: string,
17661847f8eSopenharmony_ci    observerCallback: Callback<Array<formInfo.RunningFormInfo>>
17761847f8eSopenharmony_ci  ): void;
17861847f8eSopenharmony_ci
17961847f8eSopenharmony_ci  /**
18061847f8eSopenharmony_ci   * Listens to the event of notifyInvisible type change.
18161847f8eSopenharmony_ci   * <p>You can use this method to listen to the event of notifyInvisible type change.</p>
18261847f8eSopenharmony_ci   *
18361847f8eSopenharmony_ci   * @permission ohos.permission.OBSERVE_FORM_RUNNING
18461847f8eSopenharmony_ci   * @param { 'notifyInvisible' } type - Indicates event type.
18561847f8eSopenharmony_ci   * @param { Callback<Array<formInfo.RunningFormInfo>> } observerCallback - The callback is used to return
18661847f8eSopenharmony_ci   *                                                                         the running form info.
18761847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not a system application.
18861847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
18961847f8eSopenharmony_ci   *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.
19061847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.Form
19161847f8eSopenharmony_ci   * @systemapi
19261847f8eSopenharmony_ci   * @since 10
19361847f8eSopenharmony_ci   */
19461847f8eSopenharmony_ci  function on(type: 'notifyInvisible', observerCallback: Callback<Array<formInfo.RunningFormInfo>>): void;
19561847f8eSopenharmony_ci
19661847f8eSopenharmony_ci  /**
19761847f8eSopenharmony_ci   * Listens to the event of notifyInvisible type change.
19861847f8eSopenharmony_ci   * <p>You can use this method to listen to the event of notifyInvisible type change for a particular card host.</p>
19961847f8eSopenharmony_ci   *
20061847f8eSopenharmony_ci   * @permission ohos.permission.OBSERVE_FORM_RUNNING
20161847f8eSopenharmony_ci   * @param { 'notifyInvisible' } type - Indicates event type.
20261847f8eSopenharmony_ci   * @param { string } hostBundleName - Indicates the bundle name of the form host application.
20361847f8eSopenharmony_ci   * @param { Callback<Array<formInfo.RunningFormInfo>> } observerCallback - The callback is used to return
20461847f8eSopenharmony_ci   *                                                                         the running form info.
20561847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not a system application.
20661847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
20761847f8eSopenharmony_ci   *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.
20861847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.Form
20961847f8eSopenharmony_ci   * @systemapi
21061847f8eSopenharmony_ci   * @since 10
21161847f8eSopenharmony_ci   */
21261847f8eSopenharmony_ci  function on(
21361847f8eSopenharmony_ci    type: 'notifyInvisible',
21461847f8eSopenharmony_ci    hostBundleName: string,
21561847f8eSopenharmony_ci    observerCallback: Callback<Array<formInfo.RunningFormInfo>>,
21661847f8eSopenharmony_ci  ): void;
21761847f8eSopenharmony_ci
21861847f8eSopenharmony_ci  /**
21961847f8eSopenharmony_ci   * Cancels listening to the event of notifyVisible type change.
22061847f8eSopenharmony_ci   * <p>You can use this method to cancel listening to the event of notifyVisible type change.</p>
22161847f8eSopenharmony_ci   *
22261847f8eSopenharmony_ci   * @permission ohos.permission.OBSERVE_FORM_RUNNING
22361847f8eSopenharmony_ci   * @param { 'notifyVisible' } type - Indicates event type.
22461847f8eSopenharmony_ci   * @param { string } [hostBundleName] - Indicates the bundle name of the form host application.
22561847f8eSopenharmony_ci   * @param { Callback<Array<formInfo.RunningFormInfo>> } [observerCallback] - The callback is used to return
22661847f8eSopenharmony_ci   *                                                                  the running form info.
22761847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not a system application.
22861847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
22961847f8eSopenharmony_ci   *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.
23061847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.Form
23161847f8eSopenharmony_ci   * @systemapi
23261847f8eSopenharmony_ci   * @since 10
23361847f8eSopenharmony_ci   */
23461847f8eSopenharmony_ci  function off(
23561847f8eSopenharmony_ci    type: 'notifyVisible',
23661847f8eSopenharmony_ci    hostBundleName?: string,
23761847f8eSopenharmony_ci    observerCallback?: Callback<Array<formInfo.RunningFormInfo>>
23861847f8eSopenharmony_ci  ): void;
23961847f8eSopenharmony_ci
24061847f8eSopenharmony_ci  /**
24161847f8eSopenharmony_ci   * Cancels listening to the event of notifyInvisible type change.
24261847f8eSopenharmony_ci   * <p>You can use this method to cancel listening to the event of notifyInvisible type change.</p>
24361847f8eSopenharmony_ci   *
24461847f8eSopenharmony_ci   * @permission ohos.permission.OBSERVE_FORM_RUNNING
24561847f8eSopenharmony_ci   * @param { 'notifyInvisible' } type - Indicates event type.
24661847f8eSopenharmony_ci   * @param { string } hostBundleName - Indicates the bundle name of the form host application.
24761847f8eSopenharmony_ci   * @param { Callback<Array<formInfo.RunningFormInfo>> } [observerCallback] - The callback is used to return
24861847f8eSopenharmony_ci   *                                                                         the running form info.
24961847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not a system application.
25061847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
25161847f8eSopenharmony_ci   *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.
25261847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.Form
25361847f8eSopenharmony_ci   * @systemapi
25461847f8eSopenharmony_ci   * @since 10
25561847f8eSopenharmony_ci   */
25661847f8eSopenharmony_ci  function off(
25761847f8eSopenharmony_ci    type: 'notifyInvisible',
25861847f8eSopenharmony_ci    hostBundleName?: string,
25961847f8eSopenharmony_ci    observerCallback?: Callback<Array<formInfo.RunningFormInfo>>
26061847f8eSopenharmony_ci  ): void;
26161847f8eSopenharmony_ci  
26261847f8eSopenharmony_ci  /**
26361847f8eSopenharmony_ci   * Obtains the RunningFormInfo objects provided by a specific card host application on the device.
26461847f8eSopenharmony_ci   *
26561847f8eSopenharmony_ci   * @permission ohos.permission.OBSERVE_FORM_RUNNING
26661847f8eSopenharmony_ci   * @param { AsyncCallback<Array<formInfo.RunningFormInfo>> } callback - The callback is used to return the
26761847f8eSopenharmony_ci   *                                                                      RunningFormInfo.
26861847f8eSopenharmony_ci   * @param { string } [hostBundleName] - Indicates the bundle name of the form host application.
26961847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permissions denied.
27061847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not a system application.
27161847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
27261847f8eSopenharmony_ci   *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.
27361847f8eSopenharmony_ci   * @throws { BusinessError } 16500050 - IPC connection error.
27461847f8eSopenharmony_ci   * @throws { BusinessError } 16500060 - Service connection error.
27561847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.Form
27661847f8eSopenharmony_ci   * @systemapi
27761847f8eSopenharmony_ci   * @since 10
27861847f8eSopenharmony_ci   */
27961847f8eSopenharmony_ci  function getRunningFormInfos(callback: AsyncCallback<Array<formInfo.RunningFormInfo>>, hostBundleName?: string): void;
28061847f8eSopenharmony_ci
28161847f8eSopenharmony_ci  /**
28261847f8eSopenharmony_ci   * Obtains the RunningFormInfo objects provided by a specific card host application on the device.
28361847f8eSopenharmony_ci   *
28461847f8eSopenharmony_ci   * @permission ohos.permission.OBSERVE_FORM_RUNNING
28561847f8eSopenharmony_ci   * @param { AsyncCallback<Array<formInfo.RunningFormInfo>> } callback - The callback is used to return the
28661847f8eSopenharmony_ci   *                                                                      RunningFormInfo.
28761847f8eSopenharmony_ci   * @param { boolean } isUnusedIncluded - Indicates whether to include unused form.
28861847f8eSopenharmony_ci   * @param { string } [hostBundleName] - Indicates the bundle name of the form host application.
28961847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permissions denied.
29061847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not a system application.
29161847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
29261847f8eSopenharmony_ci   *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.
29361847f8eSopenharmony_ci   * @throws { BusinessError } 16500050 - IPC connection error.
29461847f8eSopenharmony_ci   * @throws { BusinessError } 16500060 - Service connection error.
29561847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.Form
29661847f8eSopenharmony_ci   * @systemapi
29761847f8eSopenharmony_ci   * @since 11
29861847f8eSopenharmony_ci   */
29961847f8eSopenharmony_ci  function getRunningFormInfos(
30061847f8eSopenharmony_ci    callback: AsyncCallback<Array<formInfo.RunningFormInfo>>,
30161847f8eSopenharmony_ci    isUnusedIncluded: boolean,
30261847f8eSopenharmony_ci    hostBundleName?: string
30361847f8eSopenharmony_ci  ): void;
30461847f8eSopenharmony_ci
30561847f8eSopenharmony_ci  /**
30661847f8eSopenharmony_ci   * Obtains the RunningFormInfo objects provided by a specific card host application on the device.
30761847f8eSopenharmony_ci   *
30861847f8eSopenharmony_ci   * @permission ohos.permission.OBSERVE_FORM_RUNNING
30961847f8eSopenharmony_ci   * @param { string } [hostBundleName] - Indicates the bundle name of the form host application.
31061847f8eSopenharmony_ci   * @returns { Promise<Array<formInfo.RunningFormInfo>> } Returns the RunningFormInfo.
31161847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permissions denied.
31261847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not a system application.
31361847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
31461847f8eSopenharmony_ci   *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.
31561847f8eSopenharmony_ci   * @throws { BusinessError } 16500050 - IPC connection error.
31661847f8eSopenharmony_ci   * @throws { BusinessError } 16500060 - Service connection error.
31761847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.Form
31861847f8eSopenharmony_ci   * @systemapi
31961847f8eSopenharmony_ci   * @since 10
32061847f8eSopenharmony_ci   */
32161847f8eSopenharmony_ci  function getRunningFormInfos(hostBundleName?: string): Promise<Array<formInfo.RunningFormInfo>>;
32261847f8eSopenharmony_ci
32361847f8eSopenharmony_ci  /**
32461847f8eSopenharmony_ci   * Obtains the RunningFormInfo objects provided by a specific card host application on the device.
32561847f8eSopenharmony_ci   *
32661847f8eSopenharmony_ci   * @permission ohos.permission.OBSERVE_FORM_RUNNING
32761847f8eSopenharmony_ci   * @param { boolean } isUnusedIncluded - Indicates whether to include unused form.
32861847f8eSopenharmony_ci   * @param { string } [hostBundleName] - Indicates the bundle name of the form host application.
32961847f8eSopenharmony_ci   * @returns { Promise<Array<formInfo.RunningFormInfo>> } Returns the RunningFormInfo.
33061847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permissions denied.
33161847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not a system application.
33261847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
33361847f8eSopenharmony_ci   *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.
33461847f8eSopenharmony_ci   * @throws { BusinessError } 16500050 - IPC connection error.
33561847f8eSopenharmony_ci   * @throws { BusinessError } 16500060 - Service connection error.
33661847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.Form
33761847f8eSopenharmony_ci   * @systemapi
33861847f8eSopenharmony_ci   * @since 11
33961847f8eSopenharmony_ci   */
34061847f8eSopenharmony_ci  function getRunningFormInfos(
34161847f8eSopenharmony_ci    isUnusedIncluded: boolean,
34261847f8eSopenharmony_ci    hostBundleName?: string
34361847f8eSopenharmony_ci  ): Promise<Array<formInfo.RunningFormInfo>>;
34461847f8eSopenharmony_ci
34561847f8eSopenharmony_ci  /**
34661847f8eSopenharmony_ci   * Obtains the RunningFormInfo objects by FormProviderFilter.
34761847f8eSopenharmony_ci   *
34861847f8eSopenharmony_ci   * @permission ohos.permission.OBSERVE_FORM_RUNNING
34961847f8eSopenharmony_ci   * @param { formInfo.FormProviderFilter } formProviderFilter - Indicates the form provider app info.
35061847f8eSopenharmony_ci   * @returns { Promise<Array<formInfo.RunningFormInfo>> } The promise returned by the function.
35161847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permissions denied.
35261847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not a system application.
35361847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
35461847f8eSopenharmony_ci   *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.
35561847f8eSopenharmony_ci   * @throws { BusinessError } 16500050 - IPC connection error.
35661847f8eSopenharmony_ci   * @throws { BusinessError } 16500100 - Failed to obtain the configuration information.
35761847f8eSopenharmony_ci   * @throws { BusinessError } 16501000 - An internal functional error occurred.
35861847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.Form
35961847f8eSopenharmony_ci   * @systemapi
36061847f8eSopenharmony_ci   * @stagemodelonly
36161847f8eSopenharmony_ci   * @since 10
36261847f8eSopenharmony_ci   */
36361847f8eSopenharmony_ci  function getRunningFormInfosByFilter(
36461847f8eSopenharmony_ci    formProviderFilter: formInfo.FormProviderFilter
36561847f8eSopenharmony_ci  ): Promise<Array<formInfo.RunningFormInfo>>;
36661847f8eSopenharmony_ci
36761847f8eSopenharmony_ci  /**
36861847f8eSopenharmony_ci   * Obtains the RunningFormInfo objects by FormProviderFilter.
36961847f8eSopenharmony_ci   *
37061847f8eSopenharmony_ci   * @permission ohos.permission.OBSERVE_FORM_RUNNING
37161847f8eSopenharmony_ci   * @param { formInfo.FormProviderFilter } formProviderFilter - Indicates the form provider app info.
37261847f8eSopenharmony_ci   * @param { AsyncCallback<Array<formInfo.RunningFormInfo>> } callback - The callback of getFormInstancesByFilter.
37361847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permissions denied.
37461847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not a system application.
37561847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
37661847f8eSopenharmony_ci   *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.
37761847f8eSopenharmony_ci   * @throws { BusinessError } 16500050 - IPC connection error.
37861847f8eSopenharmony_ci   * @throws { BusinessError } 16500100 - Failed to obtain the configuration information.
37961847f8eSopenharmony_ci   * @throws { BusinessError } 16501000 - An internal functional error occurred.
38061847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.Form
38161847f8eSopenharmony_ci   * @systemapi
38261847f8eSopenharmony_ci   * @stagemodelonly
38361847f8eSopenharmony_ci   * @since 10
38461847f8eSopenharmony_ci   */
38561847f8eSopenharmony_ci  function getRunningFormInfosByFilter(
38661847f8eSopenharmony_ci    formProviderFilter: formInfo.FormProviderFilter,
38761847f8eSopenharmony_ci    callback: AsyncCallback<Array<formInfo.RunningFormInfo>>
38861847f8eSopenharmony_ci  ): void;
38961847f8eSopenharmony_ci
39061847f8eSopenharmony_ci  /**
39161847f8eSopenharmony_ci   * Obtains the RunningFormInfo object by formId.
39261847f8eSopenharmony_ci   *
39361847f8eSopenharmony_ci   * @permission ohos.permission.OBSERVE_FORM_RUNNING
39461847f8eSopenharmony_ci   * @param { string } formId - Indicates the form provider formId.
39561847f8eSopenharmony_ci   * @returns { Promise<formInfo.RunningFormInfo> } The promise returned by the function.
39661847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permissions denied.
39761847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not a system application.
39861847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
39961847f8eSopenharmony_ci   *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.
40061847f8eSopenharmony_ci   * @throws { BusinessError } 16500050 - IPC connection error.
40161847f8eSopenharmony_ci   * @throws { BusinessError } 16500100 - Failed to obtain the configuration information.
40261847f8eSopenharmony_ci   * @throws { BusinessError } 16501000 - An internal functional error occurred.
40361847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.Form
40461847f8eSopenharmony_ci   * @systemapi
40561847f8eSopenharmony_ci   * @stagemodelonly
40661847f8eSopenharmony_ci   * @since 10
40761847f8eSopenharmony_ci   */
40861847f8eSopenharmony_ci  function getRunningFormInfoById(formId: string): Promise<formInfo.RunningFormInfo>;
40961847f8eSopenharmony_ci
41061847f8eSopenharmony_ci  /**
41161847f8eSopenharmony_ci   * Obtains the RunningFormInfo object by formId.
41261847f8eSopenharmony_ci   *
41361847f8eSopenharmony_ci   * @permission ohos.permission.OBSERVE_FORM_RUNNING
41461847f8eSopenharmony_ci   * @param { string } formId - Indicates the form provider formId.
41561847f8eSopenharmony_ci   * @param { boolean } isUnusedIncluded - Indicates whether to include unused form.
41661847f8eSopenharmony_ci   * @returns { Promise<formInfo.RunningFormInfo> } The promise returned by the function.
41761847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permissions denied.
41861847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not a system application.
41961847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
42061847f8eSopenharmony_ci   *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.
42161847f8eSopenharmony_ci   * @throws { BusinessError } 16500050 - IPC connection error.
42261847f8eSopenharmony_ci   * @throws { BusinessError } 16500100 - Failed to obtain the configuration information.
42361847f8eSopenharmony_ci   * @throws { BusinessError } 16501000 - An internal functional error occurred.
42461847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.Form
42561847f8eSopenharmony_ci   * @systemapi
42661847f8eSopenharmony_ci   * @stagemodelonly
42761847f8eSopenharmony_ci   * @since 11
42861847f8eSopenharmony_ci   */
42961847f8eSopenharmony_ci  function getRunningFormInfoById(formId: string, isUnusedIncluded: boolean): Promise<formInfo.RunningFormInfo>;
43061847f8eSopenharmony_ci
43161847f8eSopenharmony_ci  /**
43261847f8eSopenharmony_ci   * Obtains the RunningFormInfo object by formId.
43361847f8eSopenharmony_ci   *
43461847f8eSopenharmony_ci   * @permission ohos.permission.OBSERVE_FORM_RUNNING
43561847f8eSopenharmony_ci   * @param { string } formId - Indicates the form provider formId.
43661847f8eSopenharmony_ci   * @param { AsyncCallback<formInfo.RunningFormInfo> } callback - The callback of getFormInstancesById.
43761847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permissions denied.
43861847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not a system application.
43961847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
44061847f8eSopenharmony_ci   *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.
44161847f8eSopenharmony_ci   * @throws { BusinessError } 16500050 - IPC connection error.
44261847f8eSopenharmony_ci   * @throws { BusinessError } 16500100 - Failed to obtain the configuration information.
44361847f8eSopenharmony_ci   * @throws { BusinessError } 16501000 - An internal functional error occurred.
44461847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.Form
44561847f8eSopenharmony_ci   * @systemapi
44661847f8eSopenharmony_ci   * @stagemodelonly
44761847f8eSopenharmony_ci   * @since 10
44861847f8eSopenharmony_ci   */
44961847f8eSopenharmony_ci  function getRunningFormInfoById(formId: string, callback: AsyncCallback<formInfo.RunningFormInfo>): void;
45061847f8eSopenharmony_ci
45161847f8eSopenharmony_ci  /**
45261847f8eSopenharmony_ci   * Obtains the RunningFormInfo object by formId.
45361847f8eSopenharmony_ci   *
45461847f8eSopenharmony_ci   * @permission ohos.permission.OBSERVE_FORM_RUNNING
45561847f8eSopenharmony_ci   * @param { string } formId - Indicates the form provider formId.
45661847f8eSopenharmony_ci   * @param { boolean } isUnusedIncluded - Indicates whether to include unused form.
45761847f8eSopenharmony_ci   * @param { AsyncCallback<formInfo.RunningFormInfo> } callback - The callback of getFormInstancesById.
45861847f8eSopenharmony_ci   * @throws { BusinessError } 201 - Permissions denied.
45961847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not a system application.
46061847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
46161847f8eSopenharmony_ci   *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.
46261847f8eSopenharmony_ci   * @throws { BusinessError } 16500050 - IPC connection error.
46361847f8eSopenharmony_ci   * @throws { BusinessError } 16500100 - Failed to obtain the configuration information.
46461847f8eSopenharmony_ci   * @throws { BusinessError } 16501000 - An internal functional error occurred.
46561847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.Form
46661847f8eSopenharmony_ci   * @systemapi
46761847f8eSopenharmony_ci   * @stagemodelonly
46861847f8eSopenharmony_ci   * @since 11
46961847f8eSopenharmony_ci   */
47061847f8eSopenharmony_ci  function getRunningFormInfoById(
47161847f8eSopenharmony_ci    formId: string,
47261847f8eSopenharmony_ci    isUnusedIncluded: boolean,
47361847f8eSopenharmony_ci    callback: AsyncCallback<formInfo.RunningFormInfo>
47461847f8eSopenharmony_ci  ): void;
47561847f8eSopenharmony_ci
47661847f8eSopenharmony_ci  /**
47761847f8eSopenharmony_ci   * Router event listening in registered form.
47861847f8eSopenharmony_ci   * <p>This interface requires permission to receive callback.</p>
47961847f8eSopenharmony_ci   *
48061847f8eSopenharmony_ci   * @permission ohos.permission.OBSERVE_FORM_RUNNING
48161847f8eSopenharmony_ci   * @param { 'router' } type - Indicates event type.
48261847f8eSopenharmony_ci   * @param { Callback<formInfo.RunningFormInfo> } observerCallback - The callback is used to return the running
48361847f8eSopenharmony_ci   *                                                                  form info.
48461847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not a system application.
48561847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
48661847f8eSopenharmony_ci   *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.
48761847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.Form
48861847f8eSopenharmony_ci   * @systemapi
48961847f8eSopenharmony_ci   * @since 11
49061847f8eSopenharmony_ci   */
49161847f8eSopenharmony_ci  function on(type: 'router', observerCallback: Callback<formInfo.RunningFormInfo>): void;
49261847f8eSopenharmony_ci
49361847f8eSopenharmony_ci  /**
49461847f8eSopenharmony_ci   * Router event listening in registered form.
49561847f8eSopenharmony_ci   * <p>This interface requires permission to receive callback.</p>
49661847f8eSopenharmony_ci   *
49761847f8eSopenharmony_ci   * @permission ohos.permission.OBSERVE_FORM_RUNNING
49861847f8eSopenharmony_ci   * @param { 'router' } type - Indicates event type.
49961847f8eSopenharmony_ci   * @param { string } hostBundleName - Indicates the bundle name of the form host application.
50061847f8eSopenharmony_ci   * @param { Callback<formInfo.RunningFormInfo> } observerCallback - The callback is used to return the running
50161847f8eSopenharmony_ci   *                                                                  form info.
50261847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not a system application.
50361847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
50461847f8eSopenharmony_ci   *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.
50561847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.Form
50661847f8eSopenharmony_ci   * @systemapi
50761847f8eSopenharmony_ci   * @since 11
50861847f8eSopenharmony_ci   */
50961847f8eSopenharmony_ci  function on(type: 'router', hostBundleName: string, observerCallback: Callback<formInfo.RunningFormInfo>): void;
51061847f8eSopenharmony_ci
51161847f8eSopenharmony_ci  /**
51261847f8eSopenharmony_ci   * Unregister form router event Listening.
51361847f8eSopenharmony_ci   *
51461847f8eSopenharmony_ci   * @permission ohos.permission.OBSERVE_FORM_RUNNING
51561847f8eSopenharmony_ci   * @param { 'router' } type - Indicates event type.
51661847f8eSopenharmony_ci   * @param { string } [hostBundleName] - Indicates the bundle name of the form host application.
51761847f8eSopenharmony_ci   * @param { Callback<formInfo.RunningFormInfo> } [observerCallback] - The callback is used to return the running
51861847f8eSopenharmony_ci   *                                                                    form info.
51961847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not a system application.
52061847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
52161847f8eSopenharmony_ci   *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.
52261847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.Form
52361847f8eSopenharmony_ci   * @systemapi
52461847f8eSopenharmony_ci   * @since 11
52561847f8eSopenharmony_ci   */
52661847f8eSopenharmony_ci  function off(type: 'router', hostBundleName?: string, observerCallback?: Callback<formInfo.RunningFormInfo>): void;
52761847f8eSopenharmony_ci
52861847f8eSopenharmony_ci  /**
52961847f8eSopenharmony_ci   * Message event listening in registered form.
53061847f8eSopenharmony_ci   * <p>This interface requires permission to receive callback.</p>
53161847f8eSopenharmony_ci   *
53261847f8eSopenharmony_ci   * @permission ohos.permission.OBSERVE_FORM_RUNNING
53361847f8eSopenharmony_ci   * @param { 'message' } type - Indicates event type.
53461847f8eSopenharmony_ci   * @param { Callback<formInfo.RunningFormInfo> } observerCallback - The callback is used to return the running
53561847f8eSopenharmony_ci   *                                                                  form info.
53661847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not a system application.
53761847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
53861847f8eSopenharmony_ci   *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.
53961847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.Form
54061847f8eSopenharmony_ci   * @systemapi
54161847f8eSopenharmony_ci   * @since 11
54261847f8eSopenharmony_ci   */
54361847f8eSopenharmony_ci  function on(type: 'message', observerCallback: Callback<formInfo.RunningFormInfo>): void;
54461847f8eSopenharmony_ci
54561847f8eSopenharmony_ci  /**
54661847f8eSopenharmony_ci   * Message event listening in registered form.
54761847f8eSopenharmony_ci   * <p>This interface requires permission to receive callback.</p>
54861847f8eSopenharmony_ci   *
54961847f8eSopenharmony_ci   * @permission ohos.permission.OBSERVE_FORM_RUNNING
55061847f8eSopenharmony_ci   * @param { 'message' } type - Indicates event type.
55161847f8eSopenharmony_ci   * @param { string } hostBundleName - Indicates the bundle name of the form host application.
55261847f8eSopenharmony_ci   * @param { Callback<formInfo.RunningFormInfo> } observerCallback - The callback is used to return the running
55361847f8eSopenharmony_ci   *                                                                  form info.
55461847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not a system application.
55561847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
55661847f8eSopenharmony_ci   *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.
55761847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.Form
55861847f8eSopenharmony_ci   * @systemapi
55961847f8eSopenharmony_ci   * @since 11
56061847f8eSopenharmony_ci   */
56161847f8eSopenharmony_ci  function on(type: 'message', hostBundleName: string, observerCallback: Callback<formInfo.RunningFormInfo>): void;
56261847f8eSopenharmony_ci
56361847f8eSopenharmony_ci  /**
56461847f8eSopenharmony_ci   * Unregister form message event Listening.
56561847f8eSopenharmony_ci   *
56661847f8eSopenharmony_ci   * @permission ohos.permission.OBSERVE_FORM_RUNNING
56761847f8eSopenharmony_ci   * @param { 'message' } type - Indicates event type.
56861847f8eSopenharmony_ci   * @param { string } [hostBundleName] - Indicates the bundle name of the form host application.
56961847f8eSopenharmony_ci   * @param { Callback<formInfo.RunningFormInfo> } [observerCallback] - The callback is used to return the running
57061847f8eSopenharmony_ci   *                                                                    form info.
57161847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not a system application.
57261847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
57361847f8eSopenharmony_ci   *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.
57461847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.Form
57561847f8eSopenharmony_ci   * @systemapi
57661847f8eSopenharmony_ci   * @since 11
57761847f8eSopenharmony_ci   */
57861847f8eSopenharmony_ci  function off(type: 'message', hostBundleName?: string, observerCallback?: Callback<formInfo.RunningFormInfo>): void;
57961847f8eSopenharmony_ci
58061847f8eSopenharmony_ci  /**
58161847f8eSopenharmony_ci   * Call event listening in registered form.
58261847f8eSopenharmony_ci   * <p>This interface requires permission to receive callback.</p>
58361847f8eSopenharmony_ci   *
58461847f8eSopenharmony_ci   * @permission ohos.permission.OBSERVE_FORM_RUNNING
58561847f8eSopenharmony_ci   * @param { 'call' } type - Indicates event type.
58661847f8eSopenharmony_ci   * @param { Callback<formInfo.RunningFormInfo> } observerCallback - The callback is used to return the running
58761847f8eSopenharmony_ci   *                                                                  form info.
58861847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not a system application.
58961847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
59061847f8eSopenharmony_ci   *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.
59161847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.Form
59261847f8eSopenharmony_ci   * @systemapi
59361847f8eSopenharmony_ci   * @since 11
59461847f8eSopenharmony_ci   */
59561847f8eSopenharmony_ci  function on(type: 'call', observerCallback: Callback<formInfo.RunningFormInfo>): void;
59661847f8eSopenharmony_ci
59761847f8eSopenharmony_ci  /**
59861847f8eSopenharmony_ci   * Call event listening in registered form.
59961847f8eSopenharmony_ci   * <p>This interface requires permission to receive callback.</p>
60061847f8eSopenharmony_ci   *
60161847f8eSopenharmony_ci   * @permission ohos.permission.OBSERVE_FORM_RUNNING
60261847f8eSopenharmony_ci   * @param { 'call' } type - Indicates event type.
60361847f8eSopenharmony_ci   * @param { string } hostBundleName - Indicates the bundle name of the form host application.
60461847f8eSopenharmony_ci   * @param { Callback<formInfo.RunningFormInfo> } observerCallback - The callback is used to return the running
60561847f8eSopenharmony_ci   *                                                                  form info.
60661847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not a system application.
60761847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
60861847f8eSopenharmony_ci   *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.
60961847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.Form
61061847f8eSopenharmony_ci   * @systemapi
61161847f8eSopenharmony_ci   * @since 11
61261847f8eSopenharmony_ci   */
61361847f8eSopenharmony_ci  function on(type: 'call', hostBundleName: string, observerCallback: Callback<formInfo.RunningFormInfo>): void;
61461847f8eSopenharmony_ci
61561847f8eSopenharmony_ci  /**
61661847f8eSopenharmony_ci   * Unregister form call event Listening.
61761847f8eSopenharmony_ci   *
61861847f8eSopenharmony_ci   * @permission ohos.permission.OBSERVE_FORM_RUNNING
61961847f8eSopenharmony_ci   * @param { 'call' } type - Indicates event type.
62061847f8eSopenharmony_ci   * @param { string } [hostBundleName] - Indicates the bundle name of the form host application.
62161847f8eSopenharmony_ci   * @param { Callback<formInfo.RunningFormInfo> } [observerCallback] - The callback is used to return the running
62261847f8eSopenharmony_ci   *                                                                    form info.
62361847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not a system application.
62461847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
62561847f8eSopenharmony_ci   *     1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.
62661847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.Form
62761847f8eSopenharmony_ci   * @systemapi
62861847f8eSopenharmony_ci   * @since 11
62961847f8eSopenharmony_ci   */
63061847f8eSopenharmony_ci  function off(type: 'call', hostBundleName?: string, observerCallback?: Callback<formInfo.RunningFormInfo>): void;
63161847f8eSopenharmony_ci}
63261847f8eSopenharmony_ciexport default formObserver;
633