From dcc5a51e1c14c4e226cfabde2157bcecd78ae7a4 Mon Sep 17 00:00:00 2001 From: s00494828 Date: Sat, 22 Jan 2022 11:51:07 +0800 Subject: [PATCH] =?UTF-8?q?IssueNo:#I4RUAZ:=E4=BF=AE=E6=94=B9extensionInfo?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E6=8E=A5=E5=8F=A3=E6=B3=A8=E9=87=8A=E9=80=82?= =?UTF-8?q?=E9=85=8D=E5=8E=9F=E8=83=BD=E5=8A=9Bstage=E6=A8=A1=E5=9E=8B=20D?= =?UTF-8?q?escription:=E4=BF=AE=E6=94=B9extensionInfo=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=B3=A8=E9=87=8A=E9=80=82=E9=85=8D=E5=8E=9F?= =?UTF-8?q?=E8=83=BD=E5=8A=9Bstage=E6=A8=A1=E5=9E=8B=20Sig:SIG=5FApplicait?= =?UTF-8?q?onFramework=20Feature=20or=20Bugfix:Bugfix=20Binary=20Source:No?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: shilei Change-Id: I85f957eab6907e5bfdca39a6c0554f7f767bcf02 Signed-off-by: s00494828 --- api/@ohos.bundle.d.ts | 44 +++++++++++++++++---------- api/ability/want.d.ts | 6 ++-- api/bundle/abilityInfo.d.ts | 18 ++++++++++- api/bundle/applicationInfo.d.ts | 3 +- api/bundle/bundleInfo.d.ts | 3 +- api/bundle/extensionAbilityInfo.d.ts | 45 ++++++++++++++++++---------- api/bundle/hapModuleInfo.d.ts | 3 +- api/bundle/metadata.d.ts | 12 +++++--- 8 files changed, 94 insertions(+), 40 deletions(-) diff --git a/api/@ohos.bundle.d.ts b/api/@ohos.bundle.d.ts index 687712b656..8eba36a0d5 100644 --- a/api/@ohos.bundle.d.ts +++ b/api/@ohos.bundle.d.ts @@ -54,7 +54,8 @@ declare namespace bundle { */ GET_ABILITY_INFO_WITH_METADATA = 0x00000020, /** - * @since 8 + * @since 9 preview + * @StageModelOnly */ GET_BUNDLE_WITH_EXTENSION_ABILITY = 0x00000020, /** @@ -77,11 +78,12 @@ declare namespace bundle { /** * @name ExtensionFlag - * @since 8 + * @since 9 preview * @SysCap SystemCapability.Appexecfwk * @import NA * @permission NA * @devices phone, tablet, tv, wearable + * @StageModelOnly */ enum ExtensionFlag { GET_EXTENSION_INFO_DEFAULT = 0x00000000, @@ -232,71 +234,82 @@ declare namespace bundle { /** * @name ExtensionAbilityType - * @since 8 + * @since 9 preview * @SysCap SystemCapability.Appexecfwk * @import NA * @permission NA * @devices phone, tablet, tv, wearable + * @StageModelOnly */ export enum ExtensionAbilityType { /** * @default Indicates extension info with type of form - * @since 8 + * @since 9 preview * @SysCap SystemCapability.Appexecfwk + * @StageModelOnly */ FORM = 0, /** * @default Indicates extension info with type of work schedule - * @since 8 + * @since 9 preview * @SysCap SystemCapability.Appexecfwk + * @StageModelOnly */ WORK_SCHEDULER = 1, /** * @default Indicates extension info with type of input method - * @since 8 + * @since 9 preview * @SysCap SystemCapability.Appexecfwk + * @StageModelOnly */ INPUTMETHOD = 2, /** * @default Indicates extension info with type of service - * @since 8 + * @since 9 preview * @SysCap SystemCapability.Appexecfwk + * @StageModelOnly */ SERVICE = 3, /** * @default Indicates extension info with type of accessibility - * @since 8 + * @since 9 preview * @SysCap SystemCapability.Appexecfwk + * @StageModelOnly */ ACCESSIBILITY = 4, /** * @default Indicates extension info with type of datashare - * @since 8 + * @since 9 preview * @SysCap SystemCapability.Appexecfwk + * @StageModelOnly */ DATASHARE = 5, /** * @default Indicates extension info with type of fileshare - * @since 8 + * @since 9 preview * @SysCap SystemCapability.Appexecfwk + * @StageModelOnly */ FILESHARE = 6, /** * @default Indicates extension info with type of staticsubscriber - * @since 8 + * @since 9 preview * @SysCap SystemCapability.Appexecfwk + * @StageModelOnly */ STATICSUBSCRIBER = 7, /** * @default Indicates extension info with type of wallpaper - * @since 8 + * @since 9 preview * @SysCap SystemCapability.Appexecfwk + * @StageModelOnly */ WALLPAPER = 8, /** * @default Indicates extension info with type of unspecified - * @since 8 + * @since 9 preview * @SysCap SystemCapability.Appexecfwk + * @StageModelOnly */ UNSPECIFIED = 9, } @@ -508,7 +521,7 @@ declare namespace bundle { */ function getLaunchWantForBundle(bundleName: string, callback: AsyncCallback): void; function getLaunchWantForBundle(bundleName: string): Promise; - + /** * Obtains information about the shortcuts of the application. * @@ -583,7 +596,7 @@ declare namespace bundle { * Query extension info of by utilizing a Want. * * @devices phone, tablet, tv, wearable, car - * @since 8 + * @since 9 preview * @SysCap SystemCapability.Appexecfwk * @param want Indicates the Want containing the application bundle name to be queried. * @param extensionFlags Indicates the flag used to specify information contained in the ExtensionInfo objects that @@ -591,6 +604,7 @@ declare namespace bundle { * @param userId Indicates the user ID. * @return Returns a list of ExtensionInfo objects. * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED, ohos.permission.GET_BUNDLE_INFO + * @StageModelOnly */ function queryExtensionAbilityInfosByWant(want: Want, extensionFlags: number, userId: number, callback: AsyncCallback>): void; function queryExtensionAbilityInfosByWant(want: Want, extensionFlags: number, callback: AsyncCallback>): void; diff --git a/api/ability/want.d.ts b/api/ability/want.d.ts index 6935e76963..e0a091f09c 100644 --- a/api/ability/want.d.ts +++ b/api/ability/want.d.ts @@ -106,18 +106,20 @@ export declare interface Want { /** * The description of a extension ability name in a Want. * @devices phone, tablet - * @since 8 + * @since 9 preview * @sysCap AAFwk * @default - + * @StageModelOnly */ extensionAbilityName?: string; /** * The description of a extension ability type in a Want. * @devices phone, tablet - * @since 8 + * @since 9 preview * @sysCap AAFwk * @default - + * @StageModelOnly */ extensionAbilityType?: number; } \ No newline at end of file diff --git a/api/bundle/abilityInfo.d.ts b/api/bundle/abilityInfo.d.ts index 863800d290..7571f6e24d 100644 --- a/api/bundle/abilityInfo.d.ts +++ b/api/bundle/abilityInfo.d.ts @@ -100,6 +100,7 @@ export interface AbilityInfo { * @default Info about which ability is this nick point to * @since 7 * @SysCap SystemCapability.Appexecfwk + * @FAModelOnly */ readonly targetAbility: string; @@ -107,6 +108,7 @@ export interface AbilityInfo { * @default Indicates the background service addressing a specific usage scenario * @since 7 * @SysCap SystemCapability.Appexecfwk + * @FAModelOnly */ readonly backgroundModes: number; @@ -121,6 +123,7 @@ export interface AbilityInfo { * @default Indicates whether the ability provides the embedded card capability * @since 7 * @SysCap SystemCapability.Appexecfwk + * @FAModelOnly */ readonly formEnabled: boolean; @@ -128,6 +131,7 @@ export interface AbilityInfo { * @default Enumerates types of templates that can be used by an ability * @since 7 * @SysCap SystemCapability.Appexecfwk + * @FAModelOnly */ readonly type: bundle.AbilityType; @@ -135,6 +139,7 @@ export interface AbilityInfo { * @default Enumerates the subType of templates used by an ability * @since 7 * @SysCap SystemCapability.Appexecfwk + * @FAModelOnly */ readonly subType: bundle.AbilitySubType; @@ -142,6 +147,7 @@ export interface AbilityInfo { * @default Enumerates ability display orientations * @since 7 * @SysCap SystemCapability.Appexecfwk + * @FAModelOnly */ readonly orientation: bundle.DisplayOrientation; @@ -177,6 +183,7 @@ export interface AbilityInfo { * @default Indicates the permission required for reading ability data * @since 7 * @SysCap SystemCapability.Appexecfwk + * @FAModelOnly */ readonly readPermission: string; @@ -184,6 +191,7 @@ export interface AbilityInfo { * @default Indicates the permission required for writing data to the ability * @since 7 * @SysCap SystemCapability.Appexecfwk + * @FAModelOnly */ readonly writePermission: string; @@ -198,6 +206,7 @@ export interface AbilityInfo { * @default Where form can be displayed * @since 7 * @SysCap SystemCapability.Appexecfwk + * @FAModelOnly */ readonly formEntity: number; @@ -205,6 +214,7 @@ export interface AbilityInfo { * @default Minimum height of ability. * @since 7 * @SysCap SystemCapability.Appexecfwk + * @FAModelOnly */ readonly minFormHeight: number; @@ -212,6 +222,7 @@ export interface AbilityInfo { * @default Default height of ability * @since 7 * @SysCap SystemCapability.Appexecfwk + * @FAModelOnly */ readonly defaultFormHeight: number; @@ -219,6 +230,7 @@ export interface AbilityInfo { * @default Minimum width of ability * @since 7 * @SysCap SystemCapability.Appexecfwk + * @FAModelOnly */ readonly minFormWidth: number; @@ -226,6 +238,7 @@ export interface AbilityInfo { * @default Default width of ability * @since 7 * @SysCap SystemCapability.Appexecfwk + * @FAModelOnly */ readonly defaultFormWidth: number; @@ -233,6 +246,7 @@ export interface AbilityInfo { * @default Uri of ability * @since 7 * @SysCap SystemCapability.Appexecfwk + * @FAModelOnly */ readonly uri: string; @@ -252,8 +266,10 @@ export interface AbilityInfo { /** * @default Indicates the metadata of ability - * @since 8 + * @since 9 preview * @SysCap SystemCapability.Appexecfwk + * @StageModelOnly + * */ readonly metadata: Array; diff --git a/api/bundle/applicationInfo.d.ts b/api/bundle/applicationInfo.d.ts index 2b7909143c..584d317ea7 100644 --- a/api/bundle/applicationInfo.d.ts +++ b/api/bundle/applicationInfo.d.ts @@ -153,8 +153,9 @@ export interface ApplicationInfo { /** * @default Indicates the metadata of module - * @since 8 + * @since 9 preview * @SysCap SystemCapability.Appexecfwk + * @StageModelOnly */ readonly metadata: Map>; diff --git a/api/bundle/bundleInfo.d.ts b/api/bundle/bundleInfo.d.ts index 151d23f018..93ba964cb8 100644 --- a/api/bundle/bundleInfo.d.ts +++ b/api/bundle/bundleInfo.d.ts @@ -245,8 +245,9 @@ export interface BundleInfo { /** * @default Obtains configuration information about an ability - * @since 8 + * @since 9 preview * @SysCap SystemCapability.Appexecfwk + * @StageModelOnly */ readonly extensionAbilityInfo: Array; } diff --git a/api/bundle/extensionAbilityInfo.d.ts b/api/bundle/extensionAbilityInfo.d.ts index 57888bb5c5..3062732403 100644 --- a/api/bundle/extensionAbilityInfo.d.ts +++ b/api/bundle/extensionAbilityInfo.d.ts @@ -19,107 +19,122 @@ import bundle from './../@ohos.bundle'; /** * @name Obtains extension information about a bundle - * @since 8 + * @since 9 preview * @SysCap SystemCapability.Appexecfwk * @permission NA * @devices phone, tablet, tv, wearable, car + * @StageModelOnly */ export interface ExtensionAbilityInfo { /** * @default Indicates the name of the bundle - * @since 8 + * @since 9 preview * @SysCap SystemCapability.Appexecfwk + * @StageModelOnly */ readonly bundleName: string; /** * @default Indicates the name of the module - * @since 8 + * @since 9 preview * @SysCap SystemCapability.Appexecfwk + * @StageModelOnly */ readonly moduleName: string; /** * @default Indicates the name of the extension info - * @since 8 + * @since 9 preview * @SysCap SystemCapability.Appexecfwk + * @StageModelOnly */ readonly name: string; /** * @default Indicates the label id of the entension info - * @since 8 + * @since 9 preview * @SysCap SystemCapability.Appexecfwk + * @StageModelOnly */ readonly labelId: number; /** * @default Indicates the description id of the entension info - * @since 8 + * @since 9 preview * @SysCap SystemCapability.Appexecfwk + * @StageModelOnly */ readonly descriptionId: number; /** * @default Indicates the icon id of the entension info - * @since 8 + * @since 9 preview * @SysCap SystemCapability.Appexecfwk + * @StageModelOnly */ readonly iconId: number; /** * @default Indicates whether the entensionInfo can be visible or not - * @since 8 + * @since 9 preview * @SysCap SystemCapability.Appexecfwk + * @StageModelOnly */ readonly isVisible: boolean; /** * @default Enumerates types of the entension info - * @since 8 + * @since 9 preview * @SysCap SystemCapability.Appexecfwk + * @StageModelOnly */ readonly extensionAbilityType: bundle.ExtensionAbilityType; /** * @default The permissions that others need to use this extension info - * @since 8 + * @since 9 preview * @SysCap SystemCapability.Appexecfwk + * @StageModelOnly */ readonly permissions: Array; /** * @default Obtains configuration information about an application - * @since 8 + * @since 9 preview * @SysCap SystemCapability.Appexecfwk + * @StageModelOnly */ readonly applicationInfo: ApplicationInfo; /** * @default Indicates the metadata of bundle - * @since 8 + * @since 9 preview * @SysCap SystemCapability.Appexecfwk + * @StageModelOnly */ readonly metadata: Array; /** * @default Indicates the src language to express extension info - * @since 8 + * @since 9 preview * @SysCap SystemCapability.Appexecfwk + * @StageModelOnly */ readonly enabled: boolean; /** * @default Indicates the read permission extension ability info - * @since 8 + * @since 9 preview * @SysCap SystemCapability.Appexecfwk + * @StageModelOnly */ readonly readPermission: string; /** * @default Indicates the write permission of extension ability info - * @since 8 + * @since 9 preview * @SysCap SystemCapability.Appexecfwk + * @StageModelOnly */ readonly writePermission: string; } diff --git a/api/bundle/hapModuleInfo.d.ts b/api/bundle/hapModuleInfo.d.ts index 067bc26756..e5b6345e39 100644 --- a/api/bundle/hapModuleInfo.d.ts +++ b/api/bundle/hapModuleInfo.d.ts @@ -124,8 +124,9 @@ export interface HapModuleInfo { /** * @default Obtains configuration information about extension ability - * @since 8 + * @since 9 preview * @SysCap SystemCapability.Appexecfwk + * @StageModelOnly */ readonly extensionAbilityInfo: Array; } \ No newline at end of file diff --git a/api/bundle/metadata.d.ts b/api/bundle/metadata.d.ts index 43f3dba9ea..d02a078284 100644 --- a/api/bundle/metadata.d.ts +++ b/api/bundle/metadata.d.ts @@ -15,30 +15,34 @@ /** * @name Indicates the Metadata - * @since 8 + * @since 9 preview * @SysCap SystemCapability.Appexecfwk * @permission NA * @devices phone, tablet, tv, wearable, car + * @StageModelOnly */ export interface Metadata { /** * @default Indicates the metadata name - * @since 8 + * @since 9 preview * @SysCap SystemCapability.Appexecfwk + * @StageModelOnly */ name: string; /** * @default Indicates the metadata value - * @since 8 + * @since 9 preview * @SysCap SystemCapability.Appexecfwk + * @StageModelOnly */ value: string; /** * @default Indicates the metadata resource - * @since 8 + * @since 9 preview * @SysCap SystemCapability.Appexecfwk + * @StageModelOnly */ resource: string; } \ No newline at end of file -- Gitee