From 5c36a83b15fbca6a8887063e2e39062925479c1f Mon Sep 17 00:00:00 2001 From: wendanli <3190103325@zju.edu.cn> Date: Wed, 13 Jul 2022 15:48:43 +0800 Subject: [PATCH] IssueNo:#I5GWFQ Description:support secondary module export Sig:SIG_ApplicaitonFramework Feature or Bugfix:Feature Binary Source:No Signed-off-by: wendanli <3190103325@zju.edu.cn> --- api/@ohos.bundle.d.ts | 37 ++++++++++++++++++++---- api/@ohos.bundle.defaultAppManager.d.ts | 13 +++++++-- api/@ohos.bundle.innerBundleManager.d.ts | 19 ++++++++++-- api/@ohos.distributedBundle.d.ts | 13 +++++++-- 4 files changed, 69 insertions(+), 13 deletions(-) diff --git a/api/@ohos.bundle.d.ts b/api/@ohos.bundle.d.ts index 0b2eff47d6..88bfb28a10 100644 --- a/api/@ohos.bundle.d.ts +++ b/api/@ohos.bundle.d.ts @@ -14,13 +14,13 @@ */ import { AsyncCallback, Callback } from './basic'; -import { ApplicationInfo } from './bundle/applicationInfo'; -import { BundleInfo } from './bundle/bundleInfo'; -import { AbilityInfo } from './bundle/abilityInfo'; -import { ExtensionAbilityInfo } from './bundle/extensionAbilityInfo'; +import { ApplicationInfo as _ApplicationInfo } from './bundle/applicationInfo'; +import { BundleInfo as _BundleInfo } from './bundle/bundleInfo'; +import { AbilityInfo as _AbilityInfo } from './bundle/abilityInfo'; +import { ExtensionAbilityInfo as _ExtensionAbilityInfo } from './bundle/extensionAbilityInfo'; import Want from './@ohos.application.want'; -import { BundleInstaller } from './bundle/bundleInstaller'; -import { PermissionDef } from './bundle/PermissionDef'; +import { BundleInstaller as _BundleInstaller } from './bundle/bundleInstaller'; +import { PermissionDef as _PermissionDef } from './bundle/PermissionDef'; import { DispatchInfo } from './bundle/dispatchInfo'; import image from './@ohos.multimedia.image'; import pack from './bundle/packInfo'; @@ -910,6 +910,31 @@ declare namespace bundle { */ function getDisposedStatus(bundleName: string, callback: AsyncCallback): void; function getDisposedStatus(bundleName: string): Promise; + + /** + * Re-export ApplicationInfo under namespace + */ + export type ApplicationInfo = _ApplicationInfo; + /** + * Re-export BundleInfo under namespace + */ + export type BundleInfo = _BundleInfo; + /** + * Re-export AbilityInfo under namespace + */ + export type AbilityInfo = _AbilityInfo; + /** + * Re-export ExtensionAbilityInfo under namespace + */ + export type ExtensionAbilityInfo = _ExtensionAbilityInfo; + /** + * Re-export BundleInstaller under namespace + */ + export type BundleInstaller = _BundleInstaller; + /** + * Re-export PermissionDef under namespace + */ + export type PermissionDef = _PermissionDef; } export default bundle; diff --git a/api/@ohos.bundle.defaultAppManager.d.ts b/api/@ohos.bundle.defaultAppManager.d.ts index d467bb1b4a..de71cb4714 100644 --- a/api/@ohos.bundle.defaultAppManager.d.ts +++ b/api/@ohos.bundle.defaultAppManager.d.ts @@ -14,8 +14,8 @@ */ import { AsyncCallback } from './basic'; -import { BundleInfo } from './bundle/bundleInfo'; -import { ElementName } from './bundle/elementName'; +import { BundleInfo as _BundleInfo } from './bundle/bundleInfo'; +import { ElementName as _ElementName } from './bundle/elementName'; /** * default application manager. @@ -138,6 +138,15 @@ declare namespace defaultAppManager { function resetDefaultApplication(type: string, userId?: number) : Promise; function resetDefaultApplication(type: string, userId: number, callback: AsyncCallback) : void; function resetDefaultApplication(type: string, callback: AsyncCallback) : void; + + /** + * Re-export BundleInfo under namespace + */ + export type BundleInfo = _BundleInfo; + /** + * Re-export ElementName under namespace + */ + export type ElementName = _ElementName; } export default defaultAppManager; diff --git a/api/@ohos.bundle.innerBundleManager.d.ts b/api/@ohos.bundle.innerBundleManager.d.ts index aba733ae16..39fe935a70 100644 --- a/api/@ohos.bundle.innerBundleManager.d.ts +++ b/api/@ohos.bundle.innerBundleManager.d.ts @@ -14,9 +14,9 @@ */ import { AsyncCallback, Callback } from './basic'; -import { BundleStatusCallback } from './bundle/bundleStatusCallback'; -import { LauncherAbilityInfo} from './bundle/launcherAbilityInfo'; -import { ShortcutInfo } from './bundle/shortcutInfo'; +import { BundleStatusCallback as _BundleStatusCallback } from './bundle/bundleStatusCallback'; +import { LauncherAbilityInfo as _LauncherAbilityInfo } from './bundle/launcherAbilityInfo'; +import { ShortcutInfo as _ShortcutInfo } from './bundle/shortcutInfo'; /** * inner bundle manager. @@ -94,6 +94,19 @@ declare namespace innerBundleManager { */ function getShortcutInfos(bundleName :string, callback: AsyncCallback>) : void; function getShortcutInfos(bundleName : string) : Promise>; + /** + * Re-export BundleStatusCallback under namespace + */ + export type BundleStatusCallback = _BundleStatusCallback; + /** + * Re-export LauncherAbilityInfo under namespace + */ + export type LauncherAbilityInfo = _LauncherAbilityInfo; + /** + * Re-export ShortcutInfo under namespace + */ + export type ShortcutInfo = _ShortcutInfo; + } export default innerBundleManager; diff --git a/api/@ohos.distributedBundle.d.ts b/api/@ohos.distributedBundle.d.ts index d838c64e5c..4bd63fef4e 100644 --- a/api/@ohos.distributedBundle.d.ts +++ b/api/@ohos.distributedBundle.d.ts @@ -14,8 +14,8 @@ */ import { AsyncCallback } from './basic'; -import { ElementName } from './bundle/elementName'; -import { RemoteAbilityInfo } from './bundle/remoteAbilityInfo'; +import { ElementName as _ElementName } from './bundle/elementName'; +import { RemoteAbilityInfo as _RemoteAbilityInfo } from './bundle/remoteAbilityInfo'; /** * distributedBundle. @@ -79,4 +79,13 @@ import { RemoteAbilityInfo } from './bundle/remoteAbilityInfo'; */ function getRemoteAbilityInfos(elementNames: Array, locale: string, callback: AsyncCallback>): void; function getRemoteAbilityInfos(elementNames: Array, locale: string): Promise>; + + /** + * Re-export ElementName under namespace + */ + export type ElementName = _ElementName; + /** + * Re-export RemoteAbilityInfo under namespace + */ + export type RemoteAbilityInfo = _RemoteAbilityInfo; } \ No newline at end of file -- Gitee