From ff71d2541c762469b3311fa98704d95175b3c1c3 Mon Sep 17 00:00:00 2001 From: dy Date: Tue, 12 Apr 2022 20:12:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E8=80=81=E5=8C=96=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=20Sig:SIG=5FApplicationFramework=20Feature=20or=20Bug?= =?UTF-8?q?fix:=20Feature=20Binary=20Source:=20No?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: dy --- api/@ohos.bundle.d.ts | 53 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/api/@ohos.bundle.d.ts b/api/@ohos.bundle.d.ts index 9a23556dcd..d9b00457ac 100644 --- a/api/@ohos.bundle.d.ts +++ b/api/@ohos.bundle.d.ts @@ -358,6 +358,33 @@ declare namespace bundle { STATUS_UNINSTALL_PERMISSION_DENIED = 0x45, } + /** + * @name UpgradeFlag + * @since 9 + * @syscap SystemCapability.BundleManager.BundleFramework + * @systemapi Hide this for inner system use + */ + export enum UpgradeFlag { + /** + * @default Indicates module not need to be upgraded + * @since 9 + * @syscap SystemCapability.BundleManager.BundleFramework + */ + NOT_UPGRADE = 0, + /** + * @default Indicates single module need to be upgraded + * @since 9 + * @syscap SystemCapability.BundleManager.BundleFramework + */ + SINGLE_UPGRADE = 1, + /** + * @default Indicates relation module need to be upgraded + * @since 9 + * @syscap SystemCapability.BundleManager.BundleFramework + */ + RELATION_UPGRADE = 2, + } + /** * Obtains bundleInfo based on bundleName, bundleFlags and options. * @@ -620,6 +647,32 @@ declare namespace bundle { */ function isApplicationEnabled(bundleName: string, callback: AsyncCallback): void; function isApplicationEnabled(bundleName: string): Promise; + + /** + * Set the module wether need upgrade + * + * @since 9 + * @syscap SystemCapability.BundleManager.BundleFramework + * @param bundleName Indicates the bundle name of the application. + * @param moduleName Indicates the module name of the application. + * @param isNeedUpdate Indicates isNeedUpdate of the application. + * @systemapi Hide this for inner system use + */ + function setModuleUpgradeFlag(bundleName: string, moduleName: string, upgradeFlag: UpgradeFlag, callback: AsyncCallback):void; + function setModuleUpgradeFlag(bundleName: string, moduleName: string, upgradeFlag: UpgradeFlag): Promise; + + /** + * Checks whether a specified module is removable. + * + * @since 9 + * @syscap SystemCapability.BundleManager.BundleFramework + * @param bundleName Indicates the bundle name of the application. + * @param moduleName Indicates the module name of the application. + * @returns Returns true if the module is removable; returns false otherwise. + * @systemapi Hide this for inner system use + */ + function isModuleRemovable(bundleName: string, moduleName: string, callback: AsyncCallback): void; + function isModuleRemovable(bundleName: string, moduleName: string): Promise; } export default bundle; -- Gitee