• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2022-2023 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16/**
17 * @file
18 * @kit FormKit
19 */
20
21import { AsyncCallback } from './@ohos.base';
22import { Callback } from './@ohos.base';
23import Want from './@ohos.app.ability.Want';
24import formInfo from './@ohos.app.form.formInfo';
25
26/**
27 * interface of formHost.
28 *
29 * @namespace formHost
30 * @syscap SystemCapability.Ability.Form
31 * @systemapi
32 * @since 8
33 * @deprecated since 9
34 * @useinstead ohos.app.form.formHost/formHost
35 */
36declare namespace formHost {
37  /**
38   * Deletes an obtained form by its ID.
39   * <p>After this method is called, the form won't be available for use by the application and the Form Manager
40   * Service no longer keeps the cache information about the form.</p>
41   *
42   * @permission ohos.permission.REQUIRE_FORM
43   * @param { string } formId - Indicates the form ID
44   * @param { AsyncCallback<void> } callback - Callback function, when the specified card is successfully deleted,
45   *                                           the error is undefined,otherwise it is an error object.
46   * @syscap SystemCapability.Ability.Form
47   * @systemapi
48   * @since 8
49   * @deprecated since 9
50   * @useinstead ohos.app.form.formHost/formHost#deleteForm
51   */
52  function deleteForm(formId: string, callback: AsyncCallback<void>): void;
53
54  /**
55   * Deletes an obtained form by its ID.
56   * <p>After this method is called, the form won't be available for use by the application and the Form Manager
57   * Service no longer keeps the cache information about the form.</p>
58   *
59   * @permission ohos.permission.REQUIRE_FORM
60   * @param { string } formId - Indicates the form ID
61   * @returns { Promise<void> } The promise returned by the function.
62   * @syscap SystemCapability.Ability.Form
63   * @systemapi
64   * @since 8
65   * @deprecated since 9
66   * @useinstead ohos.app.form.formHost/formHost#deleteForm
67   */
68  function deleteForm(formId: string): Promise<void>;
69
70  /**
71   * Releases an obtained form by its ID.
72   * <p>After this method is called, the form won't be available for use by the application, but the Form Manager
73   * Service still keeps the cache information about the form, so that the application can quickly obtain it based on
74   * the {@code formId}.</p>
75   *
76   * @permission ohos.permission.REQUIRE_FORM
77   * @param { string } formId - Indicates the form ID
78   * @param { AsyncCallback<void> } callback - Callback function, when the specified card is successfully released,
79   *                                           the error is undefined,otherwise it is an error object.
80   * @syscap SystemCapability.Ability.Form
81   * @systemapi
82   * @since 8
83   * @deprecated since 9
84   * @useinstead ohos.app.form.formHost/formHost#releaseForm
85   */
86  function releaseForm(formId: string, callback: AsyncCallback<void>): void;
87
88  /**
89   * Releases an obtained form by its ID.
90   * <p>After this method is called, the form won't be available for use by the application, but the Form Manager
91   * Service still keeps the cache information about the form, so that the application can quickly obtain it based on
92   * the {@code formId}.</p>
93   *
94   * @permission ohos.permission.REQUIRE_FORM
95   * @param { string } formId - Indicates the form ID
96   * @param { boolean } isReleaseCache - Indicates whether or not release cache
97   * @param { AsyncCallback<void> } callback - Callback function, when the specified card is successfully released,
98   *                                           the error is undefined,otherwise it is an error object.
99   * @syscap SystemCapability.Ability.Form
100   * @systemapi
101   * @since 8
102   * @deprecated since 9
103   * @useinstead ohos.app.form.formHost/formHost#releaseForm
104   */
105  function releaseForm(formId: string, isReleaseCache: boolean, callback: AsyncCallback<void>): void;
106
107  /**
108   * Releases an obtained form by its ID.
109   * <p>After this method is called, the form won't be available for use by the application, but the Form Manager
110   * Service still keeps the cache information about the form, so that the application can quickly obtain it based on
111   * the {@code formId}.</p>
112   *
113   * @permission ohos.permission.REQUIRE_FORM
114   * @param { string } formId - Indicates the form ID
115   * @param { boolean } [isReleaseCache] - Indicates whether or not release cache
116   * @returns { Promise<void> } The promise returned by the function.
117   * @syscap SystemCapability.Ability.Form
118   * @systemapi
119   * @since 8
120   * @deprecated since 9
121   * @useinstead ohos.app.form.formHost/formHost#releaseForm
122   */
123  function releaseForm(formId: string, isReleaseCache?: boolean): Promise<void>;
124
125  /**
126   * Requests for form update.
127   * <p>This method must be called when the application has detected that a system setting item (such as the language,
128   * resolution, or screen orientation) being listened for has changed. Upon receiving the update request, the form
129   * provider automatically updates the form data (if there is any update) through the form framework, with the update
130   * process being unperceivable by the application.</p>
131   *
132   * @permission ohos.permission.REQUIRE_FORM
133   * @param { string } formId - Indicates the ID of the form to update.
134   * @param { AsyncCallback<void> } callback - Callback function, when the specified card is successfully requested,
135   *                                           the error is undefined,otherwise it is an error object.
136   * @syscap SystemCapability.Ability.Form
137   * @systemapi
138   * @since 8
139   * @deprecated since 9
140   * @useinstead ohos.app.form.formHost/formHost#requestForm
141   */
142  function requestForm(formId: string, callback: AsyncCallback<void>): void;
143
144  /**
145   * Requests for form update.
146   * <p>This method must be called when the application has detected that a system setting item (such as the language,
147   * resolution, or screen orientation) being listened for has changed. Upon receiving the update request, the form
148   * provider automatically updates the form data (if there is any update) through the form framework, with the update
149   * process being unperceivable by the application.</p>
150   *
151   * @permission ohos.permission.REQUIRE_FORM
152   * @param { string } formId - Indicates the ID of the form to update.
153   * @returns { Promise<void> } The promise returned by the function.
154   * @syscap SystemCapability.Ability.Form
155   * @systemapi
156   * @since 8
157   * @deprecated since 9
158   * @useinstead ohos.app.form.formHost/formHost#requestForm
159   */
160  function requestForm(formId: string): Promise<void>;
161
162  /**
163   * Converts a specified temporary form that has been obtained by the application into a normal form.
164   *
165   * @permission ohos.permission.REQUIRE_FORM
166   * @param { string } formId - Indicates the ID of the temporary form to convert.
167   * @param { AsyncCallback<void> } callback - Callback function, when the specified temporary card is successfully
168   *                                           converted to a regular card, the error is undefined, otherwise it is
169   *                                           an error object.
170   * @syscap SystemCapability.Ability.Form
171   * @systemapi
172   * @since 8
173   * @deprecated since 9
174   * @useinstead ohos.app.form.formHost/formHost#castTempForm
175   */
176  function castTempForm(formId: string, callback: AsyncCallback<void>): void;
177
178  /**
179   * Converts a specified temporary form that has been obtained by the application into a normal form.
180   *
181   * @permission ohos.permission.REQUIRE_FORM
182   * @param { string } formId - Indicates the ID of the temporary form to convert.
183   * @returns { Promise<void> } The promise returned by the function.
184   * @syscap SystemCapability.Ability.Form
185   * @systemapi
186   * @since 8
187   * @deprecated since 9
188   * @useinstead ohos.app.form.formHost/formHost#castTempForm
189   */
190  function castTempForm(formId: string): Promise<void>;
191
192  /**
193   * Sends a notification to the form framework to make the specified forms visible.
194   * <p>After this method is successfully called, onVisibilityChange will be called to notify the form provider of
195   * the form visibility change event.</p>
196   *
197   * @permission ohos.permission.REQUIRE_FORM
198   * @param { Array<string> } formIds - Indicates the IDs of the forms to be made visible.
199   * @param { AsyncCallback<void> } callback - Callback function, when the specified temporary card is successfully
200   *                                           converted to a regular card, the error is undefined, otherwise it is
201   *                                           an error object.
202   * @syscap SystemCapability.Ability.Form
203   * @systemapi
204   * @since 8
205   * @deprecated since 9
206   * @useinstead ohos.app.form.formHost/formHost#notifyVisibleForms
207   */
208  function notifyVisibleForms(formIds: Array<string>, callback: AsyncCallback<void>): void;
209
210  /**
211   * Sends a notification to the form framework to make the specified forms visible.
212   * <p>After this method is successfully called, onVisibilityChange will be called to notify the form provider of
213   * the form visibility change event.</p>
214   *
215   * @permission ohos.permission.REQUIRE_FORM
216   * @param { Array<string> } formIds - Indicates the IDs of the forms to be made visible.
217   * @returns { Promise<void> } The promise returned by the function.
218   * @syscap SystemCapability.Ability.Form
219   * @systemapi
220   * @since 8
221   * @deprecated since 9
222   * @useinstead ohos.app.form.formHost/formHost#notifyVisibleForms
223   */
224  function notifyVisibleForms(formIds: Array<string>): Promise<void>;
225
226  /**
227   * Sends a notification to the form framework to make the specified forms invisible.
228   * <p>After this method is successfully called, onVisibilityChange will be called to notify the form provider of
229   * the form visibility change event.</p>
230   *
231   * @permission ohos.permission.REQUIRE_FORM
232   * @param { Array<string> } formIds - Indicates the IDs of the forms to be made invisible.
233   * @param { AsyncCallback<void> } callback - Callback function, when sending a notification to the card framework to
234   *                                           make the specified card invisible, the error is undefined, otherwise
235   *                                           it is an error object.
236   * @syscap SystemCapability.Ability.Form
237   * @systemapi
238   * @since 8
239   * @deprecated since 9
240   * @useinstead ohos.app.form.formHost/formHost#notifyInvisibleForms
241   */
242  function notifyInvisibleForms(formIds: Array<string>, callback: AsyncCallback<void>): void;
243
244  /**
245   * Sends a notification to the form framework to make the specified forms invisible.
246   * <p>After this method is successfully called, onVisibilityChange will be called to notify the form provider of
247   * the form visibility change event.</p>
248   *
249   * @permission ohos.permission.REQUIRE_FORM
250   * @param { Array<string> } formIds - Indicates the IDs of the forms to be made invisible.
251   * @returns { Promise<void> } The promise returned by the function.
252   * @syscap SystemCapability.Ability.Form
253   * @systemapi
254   * @since 8
255   * @deprecated since 9
256   * @useinstead ohos.app.form.formHost/formHost#notifyInvisibleForms
257   */
258  function notifyInvisibleForms(formIds: Array<string>): Promise<void>;
259
260  /**
261   * Notify the form framework to make the specified forms updatable.
262   * <p>You can use this method to set form refresh state to true, the form can receive new
263   * update from service.</p>
264   *
265   * @permission ohos.permission.REQUIRE_FORM
266   * @param { Array<string> } formIds - Indicates the IDs of the forms to be made invisible.
267   * @param { AsyncCallback<void> } callback - function, when sending a notification to the card framework so that the
268   *                                           specified card can be successfully updated, the error is undefined,
269   *                                           otherwise it is an error object.
270   * @syscap SystemCapability.Ability.Form
271   * @systemapi
272   * @since 8
273   * @deprecated since 9
274   * @useinstead ohos.app.form.formHost/formHost#enableFormsUpdate
275   */
276  function enableFormsUpdate(formIds: Array<string>, callback: AsyncCallback<void>): void;
277
278  /**
279   * Notify the form framework to make the specified forms updatable.
280   * <p>You can use this method to set form refresh state to true, the form can receive new
281   * update from service.</p>
282   *
283   * @permission ohos.permission.REQUIRE_FORM
284   * @param { Array<string> } formIds - Indicates the IDs of the forms to be made invisible.
285   * @returns { Promise<void> } The promise returned by the function.
286   * @syscap SystemCapability.Ability.Form
287   * @systemapi
288   * @since 8
289   * @deprecated since 9
290   * @useinstead ohos.app.form.formHost/formHost#enableFormsUpdate
291   */
292  function enableFormsUpdate(formIds: Array<string>): Promise<void>;
293
294  /**
295   * Notify the form framework to make the specified forms non updatable.
296   * <p>You can use this method to set form refresh state to false, the form do not receive
297   * new update from service.</p>
298   *
299   * @permission ohos.permission.REQUIRE_FORM
300   * @param { Array<string> } formIds - Indicates the IDs of the forms to be made invisible.
301   * @param { AsyncCallback<void> } callback - Callback function, when sending a notification to the card framework to
302   *                                           prevent the specified card from being successfully updated, the error
303   *                                           is undefined, otherwise it is error object.
304   * @syscap SystemCapability.Ability.Form
305   * @systemapi
306   * @since 8
307   * @deprecated since 9
308   * @useinstead ohos.app.form.formHost/formHost#disableFormsUpdate
309   */
310  function disableFormsUpdate(formIds: Array<string>, callback: AsyncCallback<void>): void;
311
312  /**
313   * Notify the form framework to make the specified forms non updatable.
314   * <p>You can use this method to set form refresh state to false, the form do not receive
315   * new update from service.</p>
316   *
317   * @permission ohos.permission.REQUIRE_FORM
318   * @param { Array<string> } formIds - Indicates the IDs of the forms to be made invisible.
319   * @returns { Promise<void> } The promise returned by the function.
320   * @syscap SystemCapability.Ability.Form
321   * @systemapi
322   * @since 8
323   * @deprecated since 9
324   * @useinstead ohos.app.form.formHost/formHost#disableFormsUpdate
325   */
326  function disableFormsUpdate(formIds: Array<string>): Promise<void>;
327
328  /**
329   * Checks whether the system is ready.
330   * <p>You can use this method to obtain the system is ready.</p>
331   *
332   * @param { AsyncCallback<void> } callback - Callback function, when checking whether the system is ready for success,
333   *                                           error is undefined,otherwise it is an error object.
334   * @syscap SystemCapability.Ability.Form
335   * @systemapi
336   * @since 8
337   * @deprecated since 9
338   * @useinstead ohos.app.form.formHost/formHost#isSystemReady
339   */
340  function isSystemReady(callback: AsyncCallback<void>): void;
341
342  /**
343   * Checks whether the system is ready.
344   * <p>You can use this method to obtain the system is ready.</p>
345   *
346   * @returns { Promise<void> } The promise returned by the function.
347   * @syscap SystemCapability.Ability.Form
348   * @systemapi
349   * @since 8
350   * @deprecated since 9
351   * @useinstead ohos.app.form.formHost/formHost#isSystemReady
352   */
353  function isSystemReady(): Promise<void>;
354
355  /**
356   * Obtains the FormInfo objects provided by all applications on the device.
357   *
358   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
359   * @param { AsyncCallback<Array<formInfo.FormInfo>> } callback - Callback function, when obtaining card information
360   *                                                               provided by all applications on the device
361   *                                                               successfully, the error is undefined, otherwise it
362   *                                                               is an error object.
363   * @syscap SystemCapability.Ability.Form
364   * @systemapi
365   * @since 8
366   * @deprecated since 9
367   * @useinstead ohos.app.form.formHost/formHost#getAllFormsInfo
368   */
369  function getAllFormsInfo(callback: AsyncCallback<Array<formInfo.FormInfo>>): void;
370
371  /**
372   * Obtains the FormInfo objects provided by all applications on the device.
373   *
374   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
375   * @returns { Promise<Array<formInfo.FormInfo>> } Returns the {@link FormInfo}
376   * @syscap SystemCapability.Ability.Form
377   * @systemapi
378   * @since 8
379   * @deprecated since 9
380   * @useinstead ohos.app.form.formHost/formHost#getAllFormsInfo
381   */
382  function getAllFormsInfo(): Promise<Array<formInfo.FormInfo>>;
383
384  /**
385   * Obtains the FormInfo objects provided by a specified application on the device.
386   *
387   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
388   * @param { string } bundleName - Indicates the bundle name of the application.
389   * @param { AsyncCallback<Array<formInfo.FormInfo>> } callback - Callback function, when card information provided by
390   *                                                               specified application on the device is successfully
391   *                                                               obtained, error is undefined, otherwise it is
392   *                                                               error object.
393   * @syscap SystemCapability.Ability.Form
394   * @systemapi
395   * @since 8
396   * @deprecated since 9
397   * @useinstead ohos.app.form.formHost/formHost#getFormsInfo
398   */
399  function getFormsInfo(bundleName: string, callback: AsyncCallback<Array<formInfo.FormInfo>>): void;
400
401  /**
402   * Obtains the FormInfo objects provided by a specified application on the device.
403   *
404   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
405   * @param { string } bundleName - Indicates the bundle name of the application.
406   * @param { string } moduleName - Indicates the module name of the application.
407   * @param { AsyncCallback<Array<formInfo.FormInfo>> } callback - Callback function, when the card information provided
408   *                                                               by the specified application on the device is
409   *                                                               successfully obtained, the error is undefined,
410   *                                                               otherwise it is an error object.
411   * @syscap SystemCapability.Ability.Form
412   * @systemapi
413   * @since 8
414   * @deprecated since 9
415   * @useinstead ohos.app.form.formHost/formHost#getFormsInfo
416   */
417  function getFormsInfo(
418    bundleName: string,
419    moduleName: string,
420    callback: AsyncCallback<Array<formInfo.FormInfo>>
421  ): void;
422
423  /**
424   * Obtains the FormInfo objects provided by a specified application on the device.
425   *
426   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
427   * @param { string } bundleName - Indicates the bundle name of the application.
428   * @param { string } [moduleName] - Indicates the module name of the application.
429   * @returns { Promise<Array<formInfo.FormInfo>> } Returns the {@link FormInfo}
430   * @syscap SystemCapability.Ability.Form
431   * @systemapi
432   * @since 8
433   * @deprecated since 9
434   * @useinstead ohos.app.form.formHost/formHost#getFormsInfo
435   */
436  function getFormsInfo(bundleName: string, moduleName?: string): Promise<Array<formInfo.FormInfo>>;
437
438  /**
439   * Deletes invalid forms of the application in the Form Manager Service based on the list of.
440   * <p>You can use this method to delete invalid forms of the application.</p>
441   *
442   * @permission ohos.permission.REQUIRE_FORM
443   * @param { Array<string> } formIds - Indicates the specify form id.
444   * @param { AsyncCallback<number> } callback - Callback function, when deleting invalid cards from the application
445   *                                             program based on the list is successful, error is undefined, and
446   *                                             data is the number of deleted cards; Otherwise,
447   *                                             it is the wrong object.
448   * @syscap SystemCapability.Ability.Form
449   * @systemapi
450   * @since 8
451   * @deprecated since 9
452   * @useinstead ohos.app.form.formHost/formHost#deleteInvalidForms
453   */
454  function deleteInvalidForms(formIds: Array<string>, callback: AsyncCallback<number>): void;
455
456  /**
457   * Deletes invalid forms of the application in the Form Manager Service based on the list of.
458   * <p>You can use this method to delete invalid forms of the application.</p>
459   *
460   * @permission ohos.permission.REQUIRE_FORM
461   * @param { Array<string> } formIds - Indicates the specify form id.
462   * @returns { Promise<number> } Returns the number of invalid forms deleted by the Form Manager Service
463   * @syscap SystemCapability.Ability.Form
464   * @systemapi
465   * @since 8
466   * @deprecated since 9
467   * @useinstead ohos.app.form.formHost/formHost#deleteInvalidForms
468   */
469  function deleteInvalidForms(formIds: Array<string>): Promise<number>;
470
471  /**
472   * Obtains the Form state.
473   * <p>You can use this method to obtains the form state.</p>
474   *
475   * @permission ohos.permission.REQUIRE_FORM and ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
476   * @param { Want } want - Indicates want of the form.
477   * @param { AsyncCallback<formInfo.FormStateInfo> } callback - Callback function, when deleting invalid cards from
478   *                                                             application program based on the list is successful,
479   *                                                             error is undefined, and data is the number of deleted
480   *                                                             cards;Otherwise, it is the wrong object.
481   * @syscap SystemCapability.Ability.Form
482   * @systemapi
483   * @since 8
484   * @deprecated since 9
485   * @useinstead ohos.app.form.formHost/formHost#acquireFormState
486   */
487  function acquireFormState(want: Want, callback: AsyncCallback<formInfo.FormStateInfo>): void;
488
489  /**
490   * Obtains the Form state.
491   * <p>You can use this method to obtains the form state.</p>
492   *
493   * @permission ohos.permission.REQUIRE_FORM and ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
494   * @param { Want } want - Indicates want of the form.
495   * @returns { Promise<formInfo.FormStateInfo> } Returns form state {@link FormStateInfo}
496   * @syscap SystemCapability.Ability.Form
497   * @systemapi
498   * @since 8
499   * @deprecated since 9
500   * @useinstead ohos.app.form.formHost/formHost#acquireFormState
501   */
502  function acquireFormState(want: Want): Promise<formInfo.FormStateInfo>;
503
504  /**
505   * Listens to the event of uninstall form.
506   * <p>You can use this method to listen to the event of uninstall form.</p>
507   *
508   * @param { 'formUninstall' } type - Indicates event type.
509   * @param { Callback<string> } callback - Callback function that returns the card identifier.
510   * @syscap SystemCapability.Ability.Form
511   * @systemapi
512   * @since 8
513   * @deprecated since 9
514   * @useinstead ohos.app.form.formHost/formHost#on
515   */
516  function on(type: 'formUninstall', callback: Callback<string>): void;
517
518  /**
519   * Cancels listening to the event of uninstall form.
520   * <p>You can use this method to cancel listening to the event of uninstall form.</p>
521   *
522   * @param { 'formUninstall' } type - Indicates event type.
523   * @param { Callback<string> } [callback] - Callback function that returns the card identifier. By default, it
524   *                                           indicates the cancellation of all registered event callbacks, which
525   *                                           must be consistent with the corresponding
526   *                                           callback for on('formUninstall').
527   * @syscap SystemCapability.Ability.Form
528   * @systemapi
529   * @since 8
530   * @deprecated since 9
531   * @useinstead ohos.app.form.formHost/formHost#off
532   */
533  function off(type: 'formUninstall', callback?: Callback<string>): void;
534
535  /**
536   * Notify form is Visible
537   * <p>You can use this method to notify form visible state.</p>
538   *
539   * @permission ohos.permission.REQUIRE_FORM
540   * @param { Array<string> } formIds - Indicates the specify form id.
541   * @param { boolean } isVisible - Indicates whether visible.
542   * @param { AsyncCallback<void> } callback - Callback function, when the notification card is visible and successful,
543   *                                           the error is undefined,otherwise it is an error object.
544   * @syscap SystemCapability.Ability.Form
545   * @systemapi
546   * @since 8
547   * @deprecated since 9
548   * @useinstead ohos.app.form.formHost/formHost#notifyFormsVisible
549   */
550  function notifyFormsVisible(formIds: Array<string>, isVisible: boolean, callback: AsyncCallback<void>): void;
551
552  /**
553   * Notify form is Visible
554   * <p>You can use this method to notify form visible state.</p>
555   *
556   * @permission ohos.permission.REQUIRE_FORM
557   * @param { Array<string> } formIds - Indicates the specify form id.
558   * @param { boolean } isVisible - Indicates whether visible.
559   * @returns { Promise<void> } The promise returned by the function.
560   * @syscap SystemCapability.Ability.Form
561   * @systemapi
562   * @since 8
563   * @deprecated since 9
564   * @useinstead ohos.app.form.formHost/formHost#notifyFormsVisible
565   */
566  function notifyFormsVisible(formIds: Array<string>, isVisible: boolean): Promise<void>;
567
568  /**
569   * Notify form enable update state.
570   * <p>You can use this method to notify form enable update state.</p>
571   *
572   * @permission ohos.permission.REQUIRE_FORM
573   * @param { Array<string> } formIds - Indicates the specify form id.
574   * @param { boolean } isEnableUpdate - Indicates whether enable update.
575   * @param { AsyncCallback<void> } callback - Callback function, when the notification card is successfully enabled
576   *                                           for updating status, the error is undefined, otherwise is error object.
577   * @syscap SystemCapability.Ability.Form
578   * @systemapi
579   * @since 8
580   * @deprecated since 9
581   * @useinstead ohos.app.form.formHost/formHost#notifyFormsEnableUpdate
582   */
583  function notifyFormsEnableUpdate(
584    formIds: Array<string>,
585    isEnableUpdate: boolean,
586    callback: AsyncCallback<void>
587  ): void;
588
589  /**
590   * Notify form enable update state.
591   * <p>You can use this method to notify form enable update state.</p>
592   *
593   * @permission ohos.permission.REQUIRE_FORM
594   * @param { Array<string> } formIds - Indicates the specify form id.
595   * @param { boolean } isEnableUpdate - Indicates whether enable update.
596   * @returns { Promise<void> } The promise returned by the function.
597   * @syscap SystemCapability.Ability.Form
598   * @systemapi
599   * @since 8
600   * @deprecated since 9
601   * @useinstead ohos.app.form.formHost/formHost#notifyFormsEnableUpdate
602   */
603  function notifyFormsEnableUpdate(formIds: Array<string>, isEnableUpdate: boolean): Promise<void>;
604}
605export default formHost;
606