161847f8eSopenharmony_ci/*
261847f8eSopenharmony_ci * Copyright (c) 2022-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 */
1961847f8eSopenharmony_ci
2061847f8eSopenharmony_ciimport { AsyncCallback } from './@ohos.base';
2161847f8eSopenharmony_ciimport { Callback } from './@ohos.base';
2261847f8eSopenharmony_ciimport Want from './@ohos.app.ability.Want';
2361847f8eSopenharmony_ciimport formInfo from './@ohos.app.form.formInfo';
2461847f8eSopenharmony_ci
2561847f8eSopenharmony_ci/**
2661847f8eSopenharmony_ci * interface of formHost.
2761847f8eSopenharmony_ci *
2861847f8eSopenharmony_ci * @namespace formHost
2961847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form
3061847f8eSopenharmony_ci * @systemapi
3161847f8eSopenharmony_ci * @since 8
3261847f8eSopenharmony_ci * @deprecated since 9
3361847f8eSopenharmony_ci * @useinstead ohos.app.form.formHost/formHost
3461847f8eSopenharmony_ci */
3561847f8eSopenharmony_cideclare namespace formHost {
3661847f8eSopenharmony_ci  /**
3761847f8eSopenharmony_ci   * Deletes an obtained form by its ID.
3861847f8eSopenharmony_ci   * <p>After this method is called, the form won't be available for use by the application and the Form Manager
3961847f8eSopenharmony_ci   * Service no longer keeps the cache information about the form.</p>
4061847f8eSopenharmony_ci   *
4161847f8eSopenharmony_ci   * @permission ohos.permission.REQUIRE_FORM
4261847f8eSopenharmony_ci   * @param { string } formId - Indicates the form ID
4361847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - Callback function, when the specified card is successfully deleted,
4461847f8eSopenharmony_ci   *                                           the error is undefined,otherwise it is an error object.
4561847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.Form
4661847f8eSopenharmony_ci   * @systemapi
4761847f8eSopenharmony_ci   * @since 8
4861847f8eSopenharmony_ci   * @deprecated since 9
4961847f8eSopenharmony_ci   * @useinstead ohos.app.form.formHost/formHost#deleteForm
5061847f8eSopenharmony_ci   */
5161847f8eSopenharmony_ci  function deleteForm(formId: string, callback: AsyncCallback<void>): void;
5261847f8eSopenharmony_ci
5361847f8eSopenharmony_ci  /**
5461847f8eSopenharmony_ci   * Deletes an obtained form by its ID.
5561847f8eSopenharmony_ci   * <p>After this method is called, the form won't be available for use by the application and the Form Manager
5661847f8eSopenharmony_ci   * Service no longer keeps the cache information about the form.</p>
5761847f8eSopenharmony_ci   *
5861847f8eSopenharmony_ci   * @permission ohos.permission.REQUIRE_FORM
5961847f8eSopenharmony_ci   * @param { string } formId - Indicates the form ID
6061847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
6161847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.Form
6261847f8eSopenharmony_ci   * @systemapi
6361847f8eSopenharmony_ci   * @since 8
6461847f8eSopenharmony_ci   * @deprecated since 9
6561847f8eSopenharmony_ci   * @useinstead ohos.app.form.formHost/formHost#deleteForm
6661847f8eSopenharmony_ci   */
6761847f8eSopenharmony_ci  function deleteForm(formId: string): Promise<void>;
6861847f8eSopenharmony_ci
6961847f8eSopenharmony_ci  /**
7061847f8eSopenharmony_ci   * Releases an obtained form by its ID.
7161847f8eSopenharmony_ci   * <p>After this method is called, the form won't be available for use by the application, but the Form Manager
7261847f8eSopenharmony_ci   * Service still keeps the cache information about the form, so that the application can quickly obtain it based on
7361847f8eSopenharmony_ci   * the {@code formId}.</p>
7461847f8eSopenharmony_ci   *
7561847f8eSopenharmony_ci   * @permission ohos.permission.REQUIRE_FORM
7661847f8eSopenharmony_ci   * @param { string } formId - Indicates the form ID
7761847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - Callback function, when the specified card is successfully released,
7861847f8eSopenharmony_ci   *                                           the error is undefined,otherwise it is an error object.
7961847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.Form
8061847f8eSopenharmony_ci   * @systemapi
8161847f8eSopenharmony_ci   * @since 8
8261847f8eSopenharmony_ci   * @deprecated since 9
8361847f8eSopenharmony_ci   * @useinstead ohos.app.form.formHost/formHost#releaseForm
8461847f8eSopenharmony_ci   */
8561847f8eSopenharmony_ci  function releaseForm(formId: string, callback: AsyncCallback<void>): void;
8661847f8eSopenharmony_ci
8761847f8eSopenharmony_ci  /**
8861847f8eSopenharmony_ci   * Releases an obtained form by its ID.
8961847f8eSopenharmony_ci   * <p>After this method is called, the form won't be available for use by the application, but the Form Manager
9061847f8eSopenharmony_ci   * Service still keeps the cache information about the form, so that the application can quickly obtain it based on
9161847f8eSopenharmony_ci   * the {@code formId}.</p>
9261847f8eSopenharmony_ci   *
9361847f8eSopenharmony_ci   * @permission ohos.permission.REQUIRE_FORM
9461847f8eSopenharmony_ci   * @param { string } formId - Indicates the form ID
9561847f8eSopenharmony_ci   * @param { boolean } isReleaseCache - Indicates whether or not release cache
9661847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - Callback function, when the specified card is successfully released,
9761847f8eSopenharmony_ci   *                                           the error is undefined,otherwise it is an error object.
9861847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.Form
9961847f8eSopenharmony_ci   * @systemapi
10061847f8eSopenharmony_ci   * @since 8
10161847f8eSopenharmony_ci   * @deprecated since 9
10261847f8eSopenharmony_ci   * @useinstead ohos.app.form.formHost/formHost#releaseForm
10361847f8eSopenharmony_ci   */
10461847f8eSopenharmony_ci  function releaseForm(formId: string, isReleaseCache: boolean, callback: AsyncCallback<void>): void;
10561847f8eSopenharmony_ci
10661847f8eSopenharmony_ci  /**
10761847f8eSopenharmony_ci   * Releases an obtained form by its ID.
10861847f8eSopenharmony_ci   * <p>After this method is called, the form won't be available for use by the application, but the Form Manager
10961847f8eSopenharmony_ci   * Service still keeps the cache information about the form, so that the application can quickly obtain it based on
11061847f8eSopenharmony_ci   * the {@code formId}.</p>
11161847f8eSopenharmony_ci   *
11261847f8eSopenharmony_ci   * @permission ohos.permission.REQUIRE_FORM
11361847f8eSopenharmony_ci   * @param { string } formId - Indicates the form ID
11461847f8eSopenharmony_ci   * @param { boolean } [isReleaseCache] - Indicates whether or not release cache
11561847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
11661847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.Form
11761847f8eSopenharmony_ci   * @systemapi
11861847f8eSopenharmony_ci   * @since 8
11961847f8eSopenharmony_ci   * @deprecated since 9
12061847f8eSopenharmony_ci   * @useinstead ohos.app.form.formHost/formHost#releaseForm
12161847f8eSopenharmony_ci   */
12261847f8eSopenharmony_ci  function releaseForm(formId: string, isReleaseCache?: boolean): Promise<void>;
12361847f8eSopenharmony_ci
12461847f8eSopenharmony_ci  /**
12561847f8eSopenharmony_ci   * Requests for form update.
12661847f8eSopenharmony_ci   * <p>This method must be called when the application has detected that a system setting item (such as the language,
12761847f8eSopenharmony_ci   * resolution, or screen orientation) being listened for has changed. Upon receiving the update request, the form
12861847f8eSopenharmony_ci   * provider automatically updates the form data (if there is any update) through the form framework, with the update
12961847f8eSopenharmony_ci   * process being unperceivable by the application.</p>
13061847f8eSopenharmony_ci   *
13161847f8eSopenharmony_ci   * @permission ohos.permission.REQUIRE_FORM
13261847f8eSopenharmony_ci   * @param { string } formId - Indicates the ID of the form to update.
13361847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - Callback function, when the specified card is successfully requested,
13461847f8eSopenharmony_ci   *                                           the error is undefined,otherwise it is an error object.
13561847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.Form
13661847f8eSopenharmony_ci   * @systemapi
13761847f8eSopenharmony_ci   * @since 8
13861847f8eSopenharmony_ci   * @deprecated since 9
13961847f8eSopenharmony_ci   * @useinstead ohos.app.form.formHost/formHost#requestForm
14061847f8eSopenharmony_ci   */
14161847f8eSopenharmony_ci  function requestForm(formId: string, callback: AsyncCallback<void>): void;
14261847f8eSopenharmony_ci
14361847f8eSopenharmony_ci  /**
14461847f8eSopenharmony_ci   * Requests for form update.
14561847f8eSopenharmony_ci   * <p>This method must be called when the application has detected that a system setting item (such as the language,
14661847f8eSopenharmony_ci   * resolution, or screen orientation) being listened for has changed. Upon receiving the update request, the form
14761847f8eSopenharmony_ci   * provider automatically updates the form data (if there is any update) through the form framework, with the update
14861847f8eSopenharmony_ci   * process being unperceivable by the application.</p>
14961847f8eSopenharmony_ci   *
15061847f8eSopenharmony_ci   * @permission ohos.permission.REQUIRE_FORM
15161847f8eSopenharmony_ci   * @param { string } formId - Indicates the ID of the form to update.
15261847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
15361847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.Form
15461847f8eSopenharmony_ci   * @systemapi
15561847f8eSopenharmony_ci   * @since 8
15661847f8eSopenharmony_ci   * @deprecated since 9
15761847f8eSopenharmony_ci   * @useinstead ohos.app.form.formHost/formHost#requestForm
15861847f8eSopenharmony_ci   */
15961847f8eSopenharmony_ci  function requestForm(formId: string): Promise<void>;
16061847f8eSopenharmony_ci
16161847f8eSopenharmony_ci  /**
16261847f8eSopenharmony_ci   * Converts a specified temporary form that has been obtained by the application into a normal form.
16361847f8eSopenharmony_ci   *
16461847f8eSopenharmony_ci   * @permission ohos.permission.REQUIRE_FORM
16561847f8eSopenharmony_ci   * @param { string } formId - Indicates the ID of the temporary form to convert.
16661847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - Callback function, when the specified temporary card is successfully
16761847f8eSopenharmony_ci   *                                           converted to a regular card, the error is undefined, otherwise it is
16861847f8eSopenharmony_ci   *                                           an error object.
16961847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.Form
17061847f8eSopenharmony_ci   * @systemapi
17161847f8eSopenharmony_ci   * @since 8
17261847f8eSopenharmony_ci   * @deprecated since 9
17361847f8eSopenharmony_ci   * @useinstead ohos.app.form.formHost/formHost#castTempForm
17461847f8eSopenharmony_ci   */
17561847f8eSopenharmony_ci  function castTempForm(formId: string, callback: AsyncCallback<void>): void;
17661847f8eSopenharmony_ci
17761847f8eSopenharmony_ci  /**
17861847f8eSopenharmony_ci   * Converts a specified temporary form that has been obtained by the application into a normal form.
17961847f8eSopenharmony_ci   *
18061847f8eSopenharmony_ci   * @permission ohos.permission.REQUIRE_FORM
18161847f8eSopenharmony_ci   * @param { string } formId - Indicates the ID of the temporary form to convert.
18261847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
18361847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.Form
18461847f8eSopenharmony_ci   * @systemapi
18561847f8eSopenharmony_ci   * @since 8
18661847f8eSopenharmony_ci   * @deprecated since 9
18761847f8eSopenharmony_ci   * @useinstead ohos.app.form.formHost/formHost#castTempForm
18861847f8eSopenharmony_ci   */
18961847f8eSopenharmony_ci  function castTempForm(formId: string): Promise<void>;
19061847f8eSopenharmony_ci
19161847f8eSopenharmony_ci  /**
19261847f8eSopenharmony_ci   * Sends a notification to the form framework to make the specified forms visible.
19361847f8eSopenharmony_ci   * <p>After this method is successfully called, onVisibilityChange will be called to notify the form provider of
19461847f8eSopenharmony_ci   * the form visibility change event.</p>
19561847f8eSopenharmony_ci   *
19661847f8eSopenharmony_ci   * @permission ohos.permission.REQUIRE_FORM
19761847f8eSopenharmony_ci   * @param { Array<string> } formIds - Indicates the IDs of the forms to be made visible.
19861847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - Callback function, when the specified temporary card is successfully
19961847f8eSopenharmony_ci   *                                           converted to a regular card, the error is undefined, otherwise it is
20061847f8eSopenharmony_ci   *                                           an error object.
20161847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.Form
20261847f8eSopenharmony_ci   * @systemapi
20361847f8eSopenharmony_ci   * @since 8
20461847f8eSopenharmony_ci   * @deprecated since 9
20561847f8eSopenharmony_ci   * @useinstead ohos.app.form.formHost/formHost#notifyVisibleForms
20661847f8eSopenharmony_ci   */
20761847f8eSopenharmony_ci  function notifyVisibleForms(formIds: Array<string>, callback: AsyncCallback<void>): void;
20861847f8eSopenharmony_ci
20961847f8eSopenharmony_ci  /**
21061847f8eSopenharmony_ci   * Sends a notification to the form framework to make the specified forms visible.
21161847f8eSopenharmony_ci   * <p>After this method is successfully called, onVisibilityChange will be called to notify the form provider of
21261847f8eSopenharmony_ci   * the form visibility change event.</p>
21361847f8eSopenharmony_ci   *
21461847f8eSopenharmony_ci   * @permission ohos.permission.REQUIRE_FORM
21561847f8eSopenharmony_ci   * @param { Array<string> } formIds - Indicates the IDs of the forms to be made visible.
21661847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
21761847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.Form
21861847f8eSopenharmony_ci   * @systemapi
21961847f8eSopenharmony_ci   * @since 8
22061847f8eSopenharmony_ci   * @deprecated since 9
22161847f8eSopenharmony_ci   * @useinstead ohos.app.form.formHost/formHost#notifyVisibleForms
22261847f8eSopenharmony_ci   */
22361847f8eSopenharmony_ci  function notifyVisibleForms(formIds: Array<string>): Promise<void>;
22461847f8eSopenharmony_ci
22561847f8eSopenharmony_ci  /**
22661847f8eSopenharmony_ci   * Sends a notification to the form framework to make the specified forms invisible.
22761847f8eSopenharmony_ci   * <p>After this method is successfully called, onVisibilityChange will be called to notify the form provider of
22861847f8eSopenharmony_ci   * the form visibility change event.</p>
22961847f8eSopenharmony_ci   *
23061847f8eSopenharmony_ci   * @permission ohos.permission.REQUIRE_FORM
23161847f8eSopenharmony_ci   * @param { Array<string> } formIds - Indicates the IDs of the forms to be made invisible.
23261847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - Callback function, when sending a notification to the card framework to
23361847f8eSopenharmony_ci   *                                           make the specified card invisible, the error is undefined, otherwise
23461847f8eSopenharmony_ci   *                                           it is an error object.
23561847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.Form
23661847f8eSopenharmony_ci   * @systemapi
23761847f8eSopenharmony_ci   * @since 8
23861847f8eSopenharmony_ci   * @deprecated since 9
23961847f8eSopenharmony_ci   * @useinstead ohos.app.form.formHost/formHost#notifyInvisibleForms
24061847f8eSopenharmony_ci   */
24161847f8eSopenharmony_ci  function notifyInvisibleForms(formIds: Array<string>, callback: AsyncCallback<void>): void;
24261847f8eSopenharmony_ci
24361847f8eSopenharmony_ci  /**
24461847f8eSopenharmony_ci   * Sends a notification to the form framework to make the specified forms invisible.
24561847f8eSopenharmony_ci   * <p>After this method is successfully called, onVisibilityChange will be called to notify the form provider of
24661847f8eSopenharmony_ci   * the form visibility change event.</p>
24761847f8eSopenharmony_ci   *
24861847f8eSopenharmony_ci   * @permission ohos.permission.REQUIRE_FORM
24961847f8eSopenharmony_ci   * @param { Array<string> } formIds - Indicates the IDs of the forms to be made invisible.
25061847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
25161847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.Form
25261847f8eSopenharmony_ci   * @systemapi
25361847f8eSopenharmony_ci   * @since 8
25461847f8eSopenharmony_ci   * @deprecated since 9
25561847f8eSopenharmony_ci   * @useinstead ohos.app.form.formHost/formHost#notifyInvisibleForms
25661847f8eSopenharmony_ci   */
25761847f8eSopenharmony_ci  function notifyInvisibleForms(formIds: Array<string>): Promise<void>;
25861847f8eSopenharmony_ci
25961847f8eSopenharmony_ci  /**
26061847f8eSopenharmony_ci   * Notify the form framework to make the specified forms updatable.
26161847f8eSopenharmony_ci   * <p>You can use this method to set form refresh state to true, the form can receive new
26261847f8eSopenharmony_ci   * update from service.</p>
26361847f8eSopenharmony_ci   *
26461847f8eSopenharmony_ci   * @permission ohos.permission.REQUIRE_FORM
26561847f8eSopenharmony_ci   * @param { Array<string> } formIds - Indicates the IDs of the forms to be made invisible.
26661847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - function, when sending a notification to the card framework so that the
26761847f8eSopenharmony_ci   *                                           specified card can be successfully updated, the error is undefined,
26861847f8eSopenharmony_ci   *                                           otherwise it is an error object.
26961847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.Form
27061847f8eSopenharmony_ci   * @systemapi
27161847f8eSopenharmony_ci   * @since 8
27261847f8eSopenharmony_ci   * @deprecated since 9
27361847f8eSopenharmony_ci   * @useinstead ohos.app.form.formHost/formHost#enableFormsUpdate
27461847f8eSopenharmony_ci   */
27561847f8eSopenharmony_ci  function enableFormsUpdate(formIds: Array<string>, callback: AsyncCallback<void>): void;
27661847f8eSopenharmony_ci
27761847f8eSopenharmony_ci  /**
27861847f8eSopenharmony_ci   * Notify the form framework to make the specified forms updatable.
27961847f8eSopenharmony_ci   * <p>You can use this method to set form refresh state to true, the form can receive new
28061847f8eSopenharmony_ci   * update from service.</p>
28161847f8eSopenharmony_ci   *
28261847f8eSopenharmony_ci   * @permission ohos.permission.REQUIRE_FORM
28361847f8eSopenharmony_ci   * @param { Array<string> } formIds - Indicates the IDs of the forms to be made invisible.
28461847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
28561847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.Form
28661847f8eSopenharmony_ci   * @systemapi
28761847f8eSopenharmony_ci   * @since 8
28861847f8eSopenharmony_ci   * @deprecated since 9
28961847f8eSopenharmony_ci   * @useinstead ohos.app.form.formHost/formHost#enableFormsUpdate
29061847f8eSopenharmony_ci   */
29161847f8eSopenharmony_ci  function enableFormsUpdate(formIds: Array<string>): Promise<void>;
29261847f8eSopenharmony_ci
29361847f8eSopenharmony_ci  /**
29461847f8eSopenharmony_ci   * Notify the form framework to make the specified forms non updatable.
29561847f8eSopenharmony_ci   * <p>You can use this method to set form refresh state to false, the form do not receive
29661847f8eSopenharmony_ci   * new update from service.</p>
29761847f8eSopenharmony_ci   *
29861847f8eSopenharmony_ci   * @permission ohos.permission.REQUIRE_FORM
29961847f8eSopenharmony_ci   * @param { Array<string> } formIds - Indicates the IDs of the forms to be made invisible.
30061847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - Callback function, when sending a notification to the card framework to
30161847f8eSopenharmony_ci   *                                           prevent the specified card from being successfully updated, the error
30261847f8eSopenharmony_ci   *                                           is undefined, otherwise it is error object.
30361847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.Form
30461847f8eSopenharmony_ci   * @systemapi
30561847f8eSopenharmony_ci   * @since 8
30661847f8eSopenharmony_ci   * @deprecated since 9
30761847f8eSopenharmony_ci   * @useinstead ohos.app.form.formHost/formHost#disableFormsUpdate
30861847f8eSopenharmony_ci   */
30961847f8eSopenharmony_ci  function disableFormsUpdate(formIds: Array<string>, callback: AsyncCallback<void>): void;
31061847f8eSopenharmony_ci
31161847f8eSopenharmony_ci  /**
31261847f8eSopenharmony_ci   * Notify the form framework to make the specified forms non updatable.
31361847f8eSopenharmony_ci   * <p>You can use this method to set form refresh state to false, the form do not receive
31461847f8eSopenharmony_ci   * new update from service.</p>
31561847f8eSopenharmony_ci   *
31661847f8eSopenharmony_ci   * @permission ohos.permission.REQUIRE_FORM
31761847f8eSopenharmony_ci   * @param { Array<string> } formIds - Indicates the IDs of the forms to be made invisible.
31861847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
31961847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.Form
32061847f8eSopenharmony_ci   * @systemapi
32161847f8eSopenharmony_ci   * @since 8
32261847f8eSopenharmony_ci   * @deprecated since 9
32361847f8eSopenharmony_ci   * @useinstead ohos.app.form.formHost/formHost#disableFormsUpdate
32461847f8eSopenharmony_ci   */
32561847f8eSopenharmony_ci  function disableFormsUpdate(formIds: Array<string>): Promise<void>;
32661847f8eSopenharmony_ci
32761847f8eSopenharmony_ci  /**
32861847f8eSopenharmony_ci   * Checks whether the system is ready.
32961847f8eSopenharmony_ci   * <p>You can use this method to obtain the system is ready.</p>
33061847f8eSopenharmony_ci   *
33161847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - Callback function, when checking whether the system is ready for success,
33261847f8eSopenharmony_ci   *                                           error is undefined,otherwise it is an error object.
33361847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.Form
33461847f8eSopenharmony_ci   * @systemapi
33561847f8eSopenharmony_ci   * @since 8
33661847f8eSopenharmony_ci   * @deprecated since 9
33761847f8eSopenharmony_ci   * @useinstead ohos.app.form.formHost/formHost#isSystemReady
33861847f8eSopenharmony_ci   */
33961847f8eSopenharmony_ci  function isSystemReady(callback: AsyncCallback<void>): void;
34061847f8eSopenharmony_ci
34161847f8eSopenharmony_ci  /**
34261847f8eSopenharmony_ci   * Checks whether the system is ready.
34361847f8eSopenharmony_ci   * <p>You can use this method to obtain the system is ready.</p>
34461847f8eSopenharmony_ci   *
34561847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
34661847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.Form
34761847f8eSopenharmony_ci   * @systemapi
34861847f8eSopenharmony_ci   * @since 8
34961847f8eSopenharmony_ci   * @deprecated since 9
35061847f8eSopenharmony_ci   * @useinstead ohos.app.form.formHost/formHost#isSystemReady
35161847f8eSopenharmony_ci   */
35261847f8eSopenharmony_ci  function isSystemReady(): Promise<void>;
35361847f8eSopenharmony_ci
35461847f8eSopenharmony_ci  /**
35561847f8eSopenharmony_ci   * Obtains the FormInfo objects provided by all applications on the device.
35661847f8eSopenharmony_ci   *
35761847f8eSopenharmony_ci   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
35861847f8eSopenharmony_ci   * @param { AsyncCallback<Array<formInfo.FormInfo>> } callback - Callback function, when obtaining card information
35961847f8eSopenharmony_ci   *                                                               provided by all applications on the device
36061847f8eSopenharmony_ci   *                                                               successfully, the error is undefined, otherwise it
36161847f8eSopenharmony_ci   *                                                               is an error object.
36261847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.Form
36361847f8eSopenharmony_ci   * @systemapi
36461847f8eSopenharmony_ci   * @since 8
36561847f8eSopenharmony_ci   * @deprecated since 9
36661847f8eSopenharmony_ci   * @useinstead ohos.app.form.formHost/formHost#getAllFormsInfo
36761847f8eSopenharmony_ci   */
36861847f8eSopenharmony_ci  function getAllFormsInfo(callback: AsyncCallback<Array<formInfo.FormInfo>>): void;
36961847f8eSopenharmony_ci
37061847f8eSopenharmony_ci  /**
37161847f8eSopenharmony_ci   * Obtains the FormInfo objects provided by all applications on the device.
37261847f8eSopenharmony_ci   *
37361847f8eSopenharmony_ci   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
37461847f8eSopenharmony_ci   * @returns { Promise<Array<formInfo.FormInfo>> } Returns the {@link FormInfo}
37561847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.Form
37661847f8eSopenharmony_ci   * @systemapi
37761847f8eSopenharmony_ci   * @since 8
37861847f8eSopenharmony_ci   * @deprecated since 9
37961847f8eSopenharmony_ci   * @useinstead ohos.app.form.formHost/formHost#getAllFormsInfo
38061847f8eSopenharmony_ci   */
38161847f8eSopenharmony_ci  function getAllFormsInfo(): Promise<Array<formInfo.FormInfo>>;
38261847f8eSopenharmony_ci
38361847f8eSopenharmony_ci  /**
38461847f8eSopenharmony_ci   * Obtains the FormInfo objects provided by a specified application on the device.
38561847f8eSopenharmony_ci   *
38661847f8eSopenharmony_ci   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
38761847f8eSopenharmony_ci   * @param { string } bundleName - Indicates the bundle name of the application.
38861847f8eSopenharmony_ci   * @param { AsyncCallback<Array<formInfo.FormInfo>> } callback - Callback function, when card information provided by
38961847f8eSopenharmony_ci   *                                                               specified application on the device is successfully
39061847f8eSopenharmony_ci   *                                                               obtained, error is undefined, otherwise it is
39161847f8eSopenharmony_ci   *                                                               error object.
39261847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.Form
39361847f8eSopenharmony_ci   * @systemapi
39461847f8eSopenharmony_ci   * @since 8
39561847f8eSopenharmony_ci   * @deprecated since 9
39661847f8eSopenharmony_ci   * @useinstead ohos.app.form.formHost/formHost#getFormsInfo
39761847f8eSopenharmony_ci   */
39861847f8eSopenharmony_ci  function getFormsInfo(bundleName: string, callback: AsyncCallback<Array<formInfo.FormInfo>>): void;
39961847f8eSopenharmony_ci
40061847f8eSopenharmony_ci  /**
40161847f8eSopenharmony_ci   * Obtains the FormInfo objects provided by a specified application on the device.
40261847f8eSopenharmony_ci   *
40361847f8eSopenharmony_ci   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
40461847f8eSopenharmony_ci   * @param { string } bundleName - Indicates the bundle name of the application.
40561847f8eSopenharmony_ci   * @param { string } moduleName - Indicates the module name of the application.
40661847f8eSopenharmony_ci   * @param { AsyncCallback<Array<formInfo.FormInfo>> } callback - Callback function, when the card information provided
40761847f8eSopenharmony_ci   *                                                               by the specified application on the device is
40861847f8eSopenharmony_ci   *                                                               successfully obtained, the error is undefined,
40961847f8eSopenharmony_ci   *                                                               otherwise it is an error object.
41061847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.Form
41161847f8eSopenharmony_ci   * @systemapi
41261847f8eSopenharmony_ci   * @since 8
41361847f8eSopenharmony_ci   * @deprecated since 9
41461847f8eSopenharmony_ci   * @useinstead ohos.app.form.formHost/formHost#getFormsInfo
41561847f8eSopenharmony_ci   */
41661847f8eSopenharmony_ci  function getFormsInfo(
41761847f8eSopenharmony_ci    bundleName: string,
41861847f8eSopenharmony_ci    moduleName: string,
41961847f8eSopenharmony_ci    callback: AsyncCallback<Array<formInfo.FormInfo>>
42061847f8eSopenharmony_ci  ): void;
42161847f8eSopenharmony_ci
42261847f8eSopenharmony_ci  /**
42361847f8eSopenharmony_ci   * Obtains the FormInfo objects provided by a specified application on the device.
42461847f8eSopenharmony_ci   *
42561847f8eSopenharmony_ci   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
42661847f8eSopenharmony_ci   * @param { string } bundleName - Indicates the bundle name of the application.
42761847f8eSopenharmony_ci   * @param { string } [moduleName] - Indicates the module name of the application.
42861847f8eSopenharmony_ci   * @returns { Promise<Array<formInfo.FormInfo>> } Returns the {@link FormInfo}
42961847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.Form
43061847f8eSopenharmony_ci   * @systemapi
43161847f8eSopenharmony_ci   * @since 8
43261847f8eSopenharmony_ci   * @deprecated since 9
43361847f8eSopenharmony_ci   * @useinstead ohos.app.form.formHost/formHost#getFormsInfo
43461847f8eSopenharmony_ci   */
43561847f8eSopenharmony_ci  function getFormsInfo(bundleName: string, moduleName?: string): Promise<Array<formInfo.FormInfo>>;
43661847f8eSopenharmony_ci
43761847f8eSopenharmony_ci  /**
43861847f8eSopenharmony_ci   * Deletes invalid forms of the application in the Form Manager Service based on the list of.
43961847f8eSopenharmony_ci   * <p>You can use this method to delete invalid forms of the application.</p>
44061847f8eSopenharmony_ci   *
44161847f8eSopenharmony_ci   * @permission ohos.permission.REQUIRE_FORM
44261847f8eSopenharmony_ci   * @param { Array<string> } formIds - Indicates the specify form id.
44361847f8eSopenharmony_ci   * @param { AsyncCallback<number> } callback - Callback function, when deleting invalid cards from the application
44461847f8eSopenharmony_ci   *                                             program based on the list is successful, error is undefined, and
44561847f8eSopenharmony_ci   *                                             data is the number of deleted cards; Otherwise,
44661847f8eSopenharmony_ci   *                                             it is the wrong object.
44761847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.Form
44861847f8eSopenharmony_ci   * @systemapi
44961847f8eSopenharmony_ci   * @since 8
45061847f8eSopenharmony_ci   * @deprecated since 9
45161847f8eSopenharmony_ci   * @useinstead ohos.app.form.formHost/formHost#deleteInvalidForms
45261847f8eSopenharmony_ci   */
45361847f8eSopenharmony_ci  function deleteInvalidForms(formIds: Array<string>, callback: AsyncCallback<number>): void;
45461847f8eSopenharmony_ci
45561847f8eSopenharmony_ci  /**
45661847f8eSopenharmony_ci   * Deletes invalid forms of the application in the Form Manager Service based on the list of.
45761847f8eSopenharmony_ci   * <p>You can use this method to delete invalid forms of the application.</p>
45861847f8eSopenharmony_ci   *
45961847f8eSopenharmony_ci   * @permission ohos.permission.REQUIRE_FORM
46061847f8eSopenharmony_ci   * @param { Array<string> } formIds - Indicates the specify form id.
46161847f8eSopenharmony_ci   * @returns { Promise<number> } Returns the number of invalid forms deleted by the Form Manager Service
46261847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.Form
46361847f8eSopenharmony_ci   * @systemapi
46461847f8eSopenharmony_ci   * @since 8
46561847f8eSopenharmony_ci   * @deprecated since 9
46661847f8eSopenharmony_ci   * @useinstead ohos.app.form.formHost/formHost#deleteInvalidForms
46761847f8eSopenharmony_ci   */
46861847f8eSopenharmony_ci  function deleteInvalidForms(formIds: Array<string>): Promise<number>;
46961847f8eSopenharmony_ci
47061847f8eSopenharmony_ci  /**
47161847f8eSopenharmony_ci   * Obtains the Form state.
47261847f8eSopenharmony_ci   * <p>You can use this method to obtains the form state.</p>
47361847f8eSopenharmony_ci   *
47461847f8eSopenharmony_ci   * @permission ohos.permission.REQUIRE_FORM and ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
47561847f8eSopenharmony_ci   * @param { Want } want - Indicates want of the form.
47661847f8eSopenharmony_ci   * @param { AsyncCallback<formInfo.FormStateInfo> } callback - Callback function, when deleting invalid cards from
47761847f8eSopenharmony_ci   *                                                             application program based on the list is successful,
47861847f8eSopenharmony_ci   *                                                             error is undefined, and data is the number of deleted
47961847f8eSopenharmony_ci   *                                                             cards;Otherwise, it is the wrong object.
48061847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.Form
48161847f8eSopenharmony_ci   * @systemapi
48261847f8eSopenharmony_ci   * @since 8
48361847f8eSopenharmony_ci   * @deprecated since 9
48461847f8eSopenharmony_ci   * @useinstead ohos.app.form.formHost/formHost#acquireFormState
48561847f8eSopenharmony_ci   */
48661847f8eSopenharmony_ci  function acquireFormState(want: Want, callback: AsyncCallback<formInfo.FormStateInfo>): void;
48761847f8eSopenharmony_ci
48861847f8eSopenharmony_ci  /**
48961847f8eSopenharmony_ci   * Obtains the Form state.
49061847f8eSopenharmony_ci   * <p>You can use this method to obtains the form state.</p>
49161847f8eSopenharmony_ci   *
49261847f8eSopenharmony_ci   * @permission ohos.permission.REQUIRE_FORM and ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
49361847f8eSopenharmony_ci   * @param { Want } want - Indicates want of the form.
49461847f8eSopenharmony_ci   * @returns { Promise<formInfo.FormStateInfo> } Returns form state {@link FormStateInfo}
49561847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.Form
49661847f8eSopenharmony_ci   * @systemapi
49761847f8eSopenharmony_ci   * @since 8
49861847f8eSopenharmony_ci   * @deprecated since 9
49961847f8eSopenharmony_ci   * @useinstead ohos.app.form.formHost/formHost#acquireFormState
50061847f8eSopenharmony_ci   */
50161847f8eSopenharmony_ci  function acquireFormState(want: Want): Promise<formInfo.FormStateInfo>;
50261847f8eSopenharmony_ci
50361847f8eSopenharmony_ci  /**
50461847f8eSopenharmony_ci   * Listens to the event of uninstall form.
50561847f8eSopenharmony_ci   * <p>You can use this method to listen to the event of uninstall form.</p>
50661847f8eSopenharmony_ci   *
50761847f8eSopenharmony_ci   * @param { 'formUninstall' } type - Indicates event type.
50861847f8eSopenharmony_ci   * @param { Callback<string> } callback - Callback function that returns the card identifier.
50961847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.Form
51061847f8eSopenharmony_ci   * @systemapi
51161847f8eSopenharmony_ci   * @since 8
51261847f8eSopenharmony_ci   * @deprecated since 9
51361847f8eSopenharmony_ci   * @useinstead ohos.app.form.formHost/formHost#on
51461847f8eSopenharmony_ci   */
51561847f8eSopenharmony_ci  function on(type: 'formUninstall', callback: Callback<string>): void;
51661847f8eSopenharmony_ci
51761847f8eSopenharmony_ci  /**
51861847f8eSopenharmony_ci   * Cancels listening to the event of uninstall form.
51961847f8eSopenharmony_ci   * <p>You can use this method to cancel listening to the event of uninstall form.</p>
52061847f8eSopenharmony_ci   *
52161847f8eSopenharmony_ci   * @param { 'formUninstall' } type - Indicates event type.
52261847f8eSopenharmony_ci   * @param { Callback<string> } [callback] - Callback function that returns the card identifier. By default, it
52361847f8eSopenharmony_ci   *                                           indicates the cancellation of all registered event callbacks, which
52461847f8eSopenharmony_ci   *                                           must be consistent with the corresponding
52561847f8eSopenharmony_ci   *                                           callback for on('formUninstall').
52661847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.Form
52761847f8eSopenharmony_ci   * @systemapi
52861847f8eSopenharmony_ci   * @since 8
52961847f8eSopenharmony_ci   * @deprecated since 9
53061847f8eSopenharmony_ci   * @useinstead ohos.app.form.formHost/formHost#off
53161847f8eSopenharmony_ci   */
53261847f8eSopenharmony_ci  function off(type: 'formUninstall', callback?: Callback<string>): void;
53361847f8eSopenharmony_ci
53461847f8eSopenharmony_ci  /**
53561847f8eSopenharmony_ci   * Notify form is Visible
53661847f8eSopenharmony_ci   * <p>You can use this method to notify form visible state.</p>
53761847f8eSopenharmony_ci   *
53861847f8eSopenharmony_ci   * @permission ohos.permission.REQUIRE_FORM
53961847f8eSopenharmony_ci   * @param { Array<string> } formIds - Indicates the specify form id.
54061847f8eSopenharmony_ci   * @param { boolean } isVisible - Indicates whether visible.
54161847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - Callback function, when the notification card is visible and successful,
54261847f8eSopenharmony_ci   *                                           the error is undefined,otherwise it is an error object.
54361847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.Form
54461847f8eSopenharmony_ci   * @systemapi
54561847f8eSopenharmony_ci   * @since 8
54661847f8eSopenharmony_ci   * @deprecated since 9
54761847f8eSopenharmony_ci   * @useinstead ohos.app.form.formHost/formHost#notifyFormsVisible
54861847f8eSopenharmony_ci   */
54961847f8eSopenharmony_ci  function notifyFormsVisible(formIds: Array<string>, isVisible: boolean, callback: AsyncCallback<void>): void;
55061847f8eSopenharmony_ci
55161847f8eSopenharmony_ci  /**
55261847f8eSopenharmony_ci   * Notify form is Visible
55361847f8eSopenharmony_ci   * <p>You can use this method to notify form visible state.</p>
55461847f8eSopenharmony_ci   *
55561847f8eSopenharmony_ci   * @permission ohos.permission.REQUIRE_FORM
55661847f8eSopenharmony_ci   * @param { Array<string> } formIds - Indicates the specify form id.
55761847f8eSopenharmony_ci   * @param { boolean } isVisible - Indicates whether visible.
55861847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
55961847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.Form
56061847f8eSopenharmony_ci   * @systemapi
56161847f8eSopenharmony_ci   * @since 8
56261847f8eSopenharmony_ci   * @deprecated since 9
56361847f8eSopenharmony_ci   * @useinstead ohos.app.form.formHost/formHost#notifyFormsVisible
56461847f8eSopenharmony_ci   */
56561847f8eSopenharmony_ci  function notifyFormsVisible(formIds: Array<string>, isVisible: boolean): Promise<void>;
56661847f8eSopenharmony_ci
56761847f8eSopenharmony_ci  /**
56861847f8eSopenharmony_ci   * Notify form enable update state.
56961847f8eSopenharmony_ci   * <p>You can use this method to notify form enable update state.</p>
57061847f8eSopenharmony_ci   *
57161847f8eSopenharmony_ci   * @permission ohos.permission.REQUIRE_FORM
57261847f8eSopenharmony_ci   * @param { Array<string> } formIds - Indicates the specify form id.
57361847f8eSopenharmony_ci   * @param { boolean } isEnableUpdate - Indicates whether enable update.
57461847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - Callback function, when the notification card is successfully enabled
57561847f8eSopenharmony_ci   *                                           for updating status, the error is undefined, otherwise is error object.
57661847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.Form
57761847f8eSopenharmony_ci   * @systemapi
57861847f8eSopenharmony_ci   * @since 8
57961847f8eSopenharmony_ci   * @deprecated since 9
58061847f8eSopenharmony_ci   * @useinstead ohos.app.form.formHost/formHost#notifyFormsEnableUpdate
58161847f8eSopenharmony_ci   */
58261847f8eSopenharmony_ci  function notifyFormsEnableUpdate(
58361847f8eSopenharmony_ci    formIds: Array<string>,
58461847f8eSopenharmony_ci    isEnableUpdate: boolean,
58561847f8eSopenharmony_ci    callback: AsyncCallback<void>
58661847f8eSopenharmony_ci  ): void;
58761847f8eSopenharmony_ci
58861847f8eSopenharmony_ci  /**
58961847f8eSopenharmony_ci   * Notify form enable update state.
59061847f8eSopenharmony_ci   * <p>You can use this method to notify form enable update state.</p>
59161847f8eSopenharmony_ci   *
59261847f8eSopenharmony_ci   * @permission ohos.permission.REQUIRE_FORM
59361847f8eSopenharmony_ci   * @param { Array<string> } formIds - Indicates the specify form id.
59461847f8eSopenharmony_ci   * @param { boolean } isEnableUpdate - Indicates whether enable update.
59561847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
59661847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.Form
59761847f8eSopenharmony_ci   * @systemapi
59861847f8eSopenharmony_ci   * @since 8
59961847f8eSopenharmony_ci   * @deprecated since 9
60061847f8eSopenharmony_ci   * @useinstead ohos.app.form.formHost/formHost#notifyFormsEnableUpdate
60161847f8eSopenharmony_ci   */
60261847f8eSopenharmony_ci  function notifyFormsEnableUpdate(formIds: Array<string>, isEnableUpdate: boolean): Promise<void>;
60361847f8eSopenharmony_ci}
60461847f8eSopenharmony_ciexport default formHost;
605