增加host通过卡片尺寸和包名过滤查询的接口

Change-Id: I9fadc180aeff3143c719961b35f160bbf4473b5f
Signed-off-by: sunhaiyang <sunhy.sun@huawei.com>
This commit is contained in:
sunhaiyang 2024-02-18 11:03:18 +08:00
parent 0bc6189c47
commit 767590c9bb
2 changed files with 41 additions and 0 deletions

View File

@ -547,6 +547,25 @@ declare namespace formHost {
*/
function getFormsInfo(bundleName: string, moduleName?: string): Promise<Array<formInfo.FormInfo>>;
/**
* Obtains the FormInfo objects provided by all application with filter on the device.
*
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
* @param { formInfo.FormInfoFilter } filter - Indicates the requirements the forms that the formInfos belong to have to meet.
* @returns { Promise<Array<formInfo.FormInfo>> } Returns the FormInfo.
* @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 } 16500060 - A service connection error happened, please try again later.
* @throws { BusinessError } 16500100 - Failed to obtain the configuration information.
* @throws { BusinessError } 16501000 - An internal functional error occurred.
* @syscap SystemCapability.Ability.Form
* @systemapi
* @since 12
*/
function getFormsInfo(filter: formInfo.FormInfoFilter): Promise<Array<formInfo.FormInfo>>;
/**
* Deletes invalid forms of the application in the Form Manager Service based on the list of.
* <p>You can use this method to delete invalid forms of the application.</p>

View File

@ -1000,6 +1000,17 @@ declare namespace formInfo {
* @since 11
*/
interface FormInfoFilter {
/**
* optional bundleName that used to ask getFormsInfo to return
* form infos with the same bundleName.
*
* @type { ?string }
* @syscap SystemCapability.Ability.Form
* @systemapi
* @since 12
*/
bundleName?: string;
/**
* optional moduleName that used to ask getFormsInfo to return
* form infos with the same moduleName.
@ -1018,6 +1029,17 @@ declare namespace formInfo {
* @since 11
*/
moduleName?: string;
/**
* optional supportedDimensions that used to ask getFormsInfo to return
* form infos with the same supportedDimensions.
*
* @type { ?Array<number> }
* @syscap SystemCapability.Ability.Form
* @systemapi
* @since 12
*/
supportedDimensions?: Array<number>;
}
/**