From c7cf4965bd613ea81baad60b86dc997ceec4f087 Mon Sep 17 00:00:00 2001 From: wangtiantian Date: Wed, 13 Jul 2022 15:22:35 +0800 Subject: [PATCH] IssueNo: #I5GW3N:add new interface Description:add new interface Sig:SIG_ApplicaitonFramework Feature or Bugfix:Feature Binary Source:No Signed-off-by: wangtiantian --- api/@ohos.bundle.d.ts | 13 +++++++++++ api/@ohos.bundle.innerBundleManager.d.ts | 29 ++++++++++++++++++++++++ api/bundle/hapModuleInfo.d.ts | 6 +++++ 3 files changed, 48 insertions(+) diff --git a/api/@ohos.bundle.d.ts b/api/@ohos.bundle.d.ts index 0b2eff47d6..481d0c905f 100644 --- a/api/@ohos.bundle.d.ts +++ b/api/@ohos.bundle.d.ts @@ -116,12 +116,25 @@ declare namespace bundle { * @syscap SystemCapability.BundleManager.BundleFramework * @import NA * @permission NA + * @deprecated since 9, use PermissionGrantStatus */ export enum GrantStatus { PERMISSION_DENIED = -1, PERMISSION_GRANTED = 0, } +/** + * @name PermissionGrantStatus + * @since 9 + * @syscap SystemCapability.BundleManager.BundleFramework + * @import NA + * @permission NA + */ + export enum PermissionGrantStatus { + PERMISSION_DENIED = -1, + PERMISSION_GRANTED = 0, +} + /** * @name AbilityType * @since 7 diff --git a/api/@ohos.bundle.innerBundleManager.d.ts b/api/@ohos.bundle.innerBundleManager.d.ts index aba733ae16..2a5e7eefe3 100644 --- a/api/@ohos.bundle.innerBundleManager.d.ts +++ b/api/@ohos.bundle.innerBundleManager.d.ts @@ -52,6 +52,7 @@ declare namespace innerBundleManager { * @return Returns the result or error maeeage. * @permission ohos.permission.LISTEN_BUNDLE_CHANGE * @systemapi Hide this for inner system use + * @deprecated since 9, use on(type:"bundleStatusChange", bundleStatusCallback : BundleStatusCallback) */ function on(type:"BundleStatusChange", bundleStatusCallback : BundleStatusCallback, callback: AsyncCallback) : void; function on(type:"BundleStatusChange", bundleStatusCallback : BundleStatusCallback): Promise; @@ -65,10 +66,38 @@ declare namespace innerBundleManager { * @return Returns the result or error maeeage. * @permission ohos.permission.LISTEN_BUNDLE_CHANGE * @systemapi Hide this for inner system use + * @deprecated since 9, use off(type:"bundleStatusChange") */ function off(type:"BundleStatusChange", callback: AsyncCallback) : void; function off(type:"BundleStatusChange"): Promise; + /** + * Register Callback. + * + * @since 9 + * @syscap SystemCapability.BundleManager.BundleFramework + * @param type Indicates the command should be implement. + * @param LauncherStatusCallback Indicates the callback to be register. + * @return Returns the result or error maeeage. + * @permission ohos.permission.LISTEN_BUNDLE_CHANGE + * @systemapi Hide this for inner system use + */ + function on(type:"bundleStatusChange", bundleStatusCallback : BundleStatusCallback, callback: Callback) : void; + function on(type:"bundleStatusChange", bundleStatusCallback : BundleStatusCallback): Promise; + + /** + * UnRegister Callback. + * + * @since 9 + * @syscap SystemCapability.BundleManager.BundleFramework + * @param type Indicates the command should be implement. + * @return Returns the result or error maeeage. + * @permission ohos.permission.LISTEN_BUNDLE_CHANGE + * @systemapi Hide this for inner system use + */ + function off(type:"bundleStatusChange", callback: Callback) : void; + function off(type:"bundleStatusChange"): Promise; + /** * Obtains based on a given userId. * diff --git a/api/bundle/hapModuleInfo.d.ts b/api/bundle/hapModuleInfo.d.ts index 5ed5be922e..5ca6893fa6 100644 --- a/api/bundle/hapModuleInfo.d.ts +++ b/api/bundle/hapModuleInfo.d.ts @@ -142,4 +142,10 @@ export interface HapModuleInfo { * @syscap SystemCapability.BundleManager.BundleFramework */ readonly hashValue: string; + /** + * @default Indicates the module source dir of this module + * @since 9 + * @syscap SystemCapability.BundleManager.BundleFramework + */ + readonly moduleSourceDir: string; } \ No newline at end of file -- Gitee