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