From 767590c9bb1377bc4e09e54b9d2b7d75eeaddb40 Mon Sep 17 00:00:00 2001 From: sunhaiyang Date: Sun, 18 Feb 2024 11:03:18 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0host=E9=80=9A=E8=BF=87?= =?UTF-8?q?=E5=8D=A1=E7=89=87=E5=B0=BA=E5=AF=B8=E5=92=8C=E5=8C=85=E5=90=8D?= =?UTF-8?q?=E8=BF=87=E6=BB=A4=E6=9F=A5=E8=AF=A2=E7=9A=84=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I9fadc180aeff3143c719961b35f160bbf4473b5f Signed-off-by: sunhaiyang --- api/@ohos.app.form.formHost.d.ts | 19 +++++++++++++++++++ api/@ohos.app.form.formInfo.d.ts | 22 ++++++++++++++++++++++ 2 files changed, 41 insertions(+) diff --git a/api/@ohos.app.form.formHost.d.ts b/api/@ohos.app.form.formHost.d.ts index 3f8f325f9..ebb5fbc3a 100644 --- a/api/@ohos.app.form.formHost.d.ts +++ b/api/@ohos.app.form.formHost.d.ts @@ -547,6 +547,25 @@ declare namespace formHost { */ function getFormsInfo(bundleName: string, moduleName?: string): Promise>; + /** + * 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> } 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>; + /** * Deletes invalid forms of the application in the Form Manager Service based on the list of. *

You can use this method to delete invalid forms of the application.

diff --git a/api/@ohos.app.form.formInfo.d.ts b/api/@ohos.app.form.formInfo.d.ts index 13cd4e2e3..c92ce2739 100644 --- a/api/@ohos.app.form.formInfo.d.ts +++ b/api/@ohos.app.form.formInfo.d.ts @@ -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 } + * @syscap SystemCapability.Ability.Form + * @systemapi + * @since 12 + */ + supportedDimensions?: Array; } /**