Signed-off-by: wangkailong <wangkailong6@huawei.com>
Change-Id: I9d7779588fbe74ea5da4058dbfe319295ac34540
This commit is contained in:
wangkailong 2023-05-08 15:47:53 +08:00
parent 8439da7826
commit f95ffbb13e
2 changed files with 80 additions and 0 deletions

View File

@ -768,5 +768,39 @@ declare namespace formHost {
* @since 10
*/
function acquireFormData(formId: string): Promise<{[key: string]: Object}>;
/**
* Obtains the RunningFormInfo objects by FormProviderFilter.
* @permission ohos.permission.REQUIRE_FORM
* @param { formInfo.FormProviderFilter } formProviderFilter - Indicates the form provider app info.
* @returns { Promise<Array<formInfo.RunningFormInfo>> } The promise returned by the function.
* @throws { BusinessError } 201 - Permissions denied.
* @throws { BusinessError } 202 - The application is not a system application.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16500050 - An IPC connection error happened.
* @throws { BusinessError } 16501000 - An internal functional error occurred.
* @syscap SystemCapability.Ability.Form
* @systemapi
* @stagemodelonly
* @since 10
*/
function getRunningFormInfosByFilter(formProviderFilter: formInfo.FormProviderFilter): Promise<Array<formInfo.RunningFormInfo>>;
/**
* Obtains the RunningFormInfo objects by FormProviderFilter.
* @permission ohos.permission.REQUIRE_FORM
* @param { formInfo.FormProviderFilter } formProviderFilter - Indicates the form provider app info.
* @param { AsyncCallback<Array<formInfo.RunningFormInfo>> } callback - The callback of getFormInstancesByFilter.
* @throws { BusinessError } 201 - Permissions denied.
* @throws { BusinessError } 202 - The application is not a system application.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16500050 - An IPC connection error happened.
* @throws { BusinessError } 16501000 - An internal functional error occurred.
* @syscap SystemCapability.Ability.Form
* @systemapi
* @stagemodelonly
* @since 10
*/
function getRunningFormInfosByFilter(formProviderFilter: formInfo.FormProviderFilter, callback: AsyncCallback<Array<formInfo.RunningFormInfo>>): void;
}
export default formHost;

View File

@ -524,5 +524,51 @@ declare namespace formInfo {
*/
FORM_SHARE,
}
/**
* Information about a running form.
* @typedef FormProviderFilter
* @syscap SystemCapability.Ability.Form
* @systemapi
* @stagemodelonly
* @since 10
*/
interface FormProviderFilter {
/**
* Obtains the bundle name of the provider application.
* @syscap SystemCapability.Ability.Form
* @systemapi
* @stagemodelonly
* @since 10
*/
bundleName: string;
/**
* Obtains the form name of the provider application form.
* @syscap SystemCapability.Ability.Form
* @systemapi
* @stagemodelonly
* @since 10
*/
formName ?: string;
/**
* Obtains the module name of the provider application module.
* @syscap SystemCapability.Ability.Form
* @systemapi
* @stagemodelonly
* @since 10
*/
moduleName ?: string;
/**
* Obtains the ability name of the provider application module.
* @syscap SystemCapability.Ability.Form
* @systemapi
* @stagemodelonly
* @since 10
*/
abilityName ?: string;
}
}
export default formInfo;