!11166 [新需求]: 应用分身增加模式接口

Merge pull request !11166 from wangtiantian/appmode
This commit is contained in:
openharmony_ci 2024-05-11 09:54:35 +00:00 committed by Gitee
commit b3ecfffad4
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 71 additions and 1 deletions

View File

@ -1336,6 +1336,37 @@ declare namespace bundleManager {
NONE = 7
}
/**
* This enumeration value is used to identify various types of extension ability
*
* @enum { number }
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @since 12
*/
export enum MultiAppModeType {
/**
* Indicates multi app mode with type of unspecified
*
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @since 12
*/
UNSPECIFIED = 0,
/**
* Indicates multi app mode with type of multiInstance
*
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @since 12
*/
MULTI_INSTANCE = 1,
/**
* Indicates multi app mode with type of appClone
*
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @since 12
*/
APP_CLONE = 2,
}
/**
* Obtains own bundleInfo.
*

View File

@ -544,6 +544,16 @@ export interface ApplicationInfo {
* @since 12
*/
readonly nativeLibraryPath: string;
/**
* Indicates the MultiAppMode object of the bundle
*
* @type { MultiAppMode }
* @readonly
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @since 12
*/
readonly multiAppMode: MultiAppMode;
}
/**
@ -654,4 +664,33 @@ export interface PreinstalledApplicationInfo {
* @since 12
*/
readonly labelId: number;
}
}
/**
* Indicates MultiAppMode
*
* @typedef MultiAppMode
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @since 12
*/
export interface MultiAppMode {
/**
* Indicates the multiAppModeType of the bundle
*
* @type { bundleManager.MultiAppModeType }
* @readonly
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @since 12
*/
readonly multiAppModeType: bundleManager.MultiAppModeType;
/**
* Indicates the max count of the bundle
*
* @type { number }
* @readonly
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @since 12
*/
readonly maxCount: number;
}