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 formBindingData from './@ohos.application.formBindingData'; 22import formInfo from './@ohos.app.form.formInfo'; 23import Want from './@ohos.app.ability.Want'; 24 25/** 26 * interface of formProvider. 27 * 28 * @namespace formProvider 29 * @syscap SystemCapability.Ability.Form 30 * @since 8 31 * @deprecated since 9 32 * @useinstead ohos.app.form.formProvider/formProvider 33 */ 34declare namespace formProvider { 35 /** 36 * Set next update time for a specified form. 37 * 38 * @param { string } formId - Indicates the form ID. 39 * @param { number } minute - Indicates duration minute before next update. 40 * @param { AsyncCallback<void> } callback - Callback function. 41 * @syscap SystemCapability.Ability.Form 42 * @since 8 43 * @deprecated since 9 44 * @useinstead ohos.app.form.formProvider/formProvider#setFormNextRefreshTime 45 */ 46 function setFormNextRefreshTime(formId: string, minute: number, callback: AsyncCallback<void>): void; 47 48 /** 49 * Set next update time for a specified form. 50 * 51 * @param { string } formId - Indicates the form ID. 52 * @param { number } minute - Indicates duration minute before next update. 53 * @returns { Promise<void> } The promise returned by the function. 54 * @syscap SystemCapability.Ability.Form 55 * @since 8 56 * @deprecated since 9 57 * @useinstead ohos.app.form.formProvider/formProvider#setFormNextRefreshTime 58 */ 59 function setFormNextRefreshTime(formId: string, minute: number): Promise<void>; 60 61 /** 62 * Update a specified form. 63 * Client to communication with FormManagerService. 64 * 65 * @param { string } formId - Indicates the form ID 66 * @param { formBindingData.FormBindingData } formBindingData - Indicates the form data 67 * @param { AsyncCallback<void> } callback - Callback function. 68 * @syscap SystemCapability.Ability.Form 69 * @since 8 70 * @deprecated since 9 71 * @useinstead ohos.app.form.formProvider/formProvider#updateForm 72 */ 73 function updateForm( 74 formId: string, 75 formBindingData: formBindingData.FormBindingData, 76 callback: AsyncCallback<void> 77 ): void; 78 79 /** 80 * Update a specified form. 81 * Client to communication with FormManagerService. 82 * 83 * @param { string } formId - Indicates the form ID 84 * @param { formBindingData.FormBindingData } formBindingData - Indicates the form data 85 * @returns { Promise<void> } The promise returned by the function. 86 * @syscap SystemCapability.Ability.Form 87 * @since 8 88 * @deprecated since 9 89 * @useinstead ohos.app.form.formProvider/formProvider#updateForm 90 */ 91 function updateForm(formId: string, formBindingData: formBindingData.FormBindingData): Promise<void>; 92} 93export default formProvider; 94