Issue: #I5VJYU

Description: 包管理Api错误码整改
Sig: SIG_ApplicaitonFramework
Feature or Bugfix: Feature
Binary Source: No

Signed-off-by: zhaogan <zhaogan2@huawei.com>
This commit is contained in:
zhaogan 2022-10-17 14:25:42 +08:00
parent 4937643b95
commit d4b6ec3ff7
9 changed files with 1601 additions and 206 deletions

View File

@ -32,7 +32,7 @@ declare namespace appControl {
* @param { AsyncCallback } callback - The callback of setting the disposed status result.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 801 - Capicity not supported.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 17700005 - The specified appId was not found.
* @syscap SystemCapability.BundleManager.BundleFramework.AppControl
* @systemapi
@ -48,7 +48,7 @@ declare namespace appControl {
* @returns { Promise<void> } The result of setting the disposed status of a specified bundle.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 801 - Capicity not supported.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 17700005 - The specified appId was not found.
* @syscap SystemCapability.BundleManager.BundleFramework.AppControl
* @systemapi
@ -63,7 +63,7 @@ declare namespace appControl {
* @param { AsyncCallback<Want> } callback - The callback of getting the disposed status of a specified bundle result.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 801 - Capicity not supported.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 17700005 - The specified appId was not found.
* @syscap SystemCapability.BundleManager.BundleFramework.AppControl
* @systemapi
@ -78,7 +78,7 @@ declare namespace appControl {
* @returns { Promise<Want> } Returns the disposed status of a specified bundle.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 801 - Capicity not supported.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 17700005 - The specified appId was not found.
* @syscap SystemCapability.BundleManager.BundleFramework.AppControl
* @systemapi
@ -93,7 +93,7 @@ declare namespace appControl {
* @param { AsyncCallback<void> } callback - the callback of deleting the disposed status of a specified bundle result.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 801 - Capicity not supported.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 17700005 - The specified appId was not found.
* @syscap SystemCapability.BundleManager.BundleFramework.AppControl
* @systemapi
@ -108,7 +108,7 @@ declare namespace appControl {
* @returns { Promise<void> } Returns the result of deleting the disposed status of a specified bundle.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 801 - Capicity not supported.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 17700005 - The specified appId was not found.
* @syscap SystemCapability.BundleManager.BundleFramework.AppControl
* @systemapi

File diff suppressed because it is too large Load Diff

159
api/@ohos.bundle.d.ts vendored
View File

@ -37,6 +37,8 @@ import * as _BundleInstaller from './bundle/bundleInstaller';
* @since 7
* @syscap SystemCapability.BundleManager.BundleFramework
* @permission NA
* @deprecated since 9
* @useinstead ohos.bundle.bundleManager
*/
declare namespace bundle {
@ -46,6 +48,9 @@ declare namespace bundle {
* @syscap SystemCapability.BundleManager.BundleFramework
* @import NA
* @permission NA
* @deprecated since 9
* @useinstead ohos.bundle.bundleManager.BundleFlag, ohos.bundle.bundleManager.ApplicationFlag or
* ohos.bundle.bundleManager.AbilityFlag
*/
enum BundleFlag {
GET_BUNDLE_DEFAULT = 0x00000000,
@ -95,6 +100,8 @@ declare namespace bundle {
* @syscap SystemCapability.BundleManager.BundleFramework
* @import NA
* @permission NA
* @deprecated since 9
* @useinstead ohos.bundle.bundleManager.ExtensionAbilityFlag
*/
enum ExtensionFlag {
GET_EXTENSION_INFO_DEFAULT = 0x00000000,
@ -109,6 +116,7 @@ declare namespace bundle {
* @syscap SystemCapability.BundleManager.BundleFramework
* @import NA
* @permission NA
* @deprecated since 9
*/
export enum ColorMode {
AUTO_MODE = -1,
@ -122,6 +130,8 @@ declare namespace bundle {
* @syscap SystemCapability.BundleManager.BundleFramework
* @import NA
* @permission NA
* @deprecated since 9
* @useinstead bundleInfo.PermissionGrantStatus
*/
export enum GrantStatus {
PERMISSION_DENIED = -1,
@ -134,6 +144,8 @@ declare namespace bundle {
* @syscap SystemCapability.BundleManager.BundleFramework
* @import NA
* @permission NA
* @deprecated since 9
* @useinstead abilityInfo.AbilityType
*/
export enum AbilityType {
/**
@ -171,6 +183,7 @@ declare namespace bundle {
* @syscap SystemCapability.BundleManager.BundleFramework
* @import NA
* @permission NA
* @deprecated since 9
*/
export enum AbilitySubType {
UNSPECIFIED = 0,
@ -183,6 +196,8 @@ declare namespace bundle {
* @syscap SystemCapability.BundleManager.BundleFramework
* @import NA
* @permission NA
* @deprecated since 9
* @useinstead abilityInfo.DisplayOrientation
*/
export enum DisplayOrientation {
/**
@ -283,6 +298,8 @@ declare namespace bundle {
* @syscap SystemCapability.BundleManager.BundleFramework
* @import NA
* @permission NA
* @deprecated since 9
* @useinstead bundleManager/AbilityInfo.LaunchType
*/
export enum LaunchMode {
/**
@ -306,6 +323,8 @@ declare namespace bundle {
* @syscap SystemCapability.BundleManager.BundleFramework
* @import NA
* @permission NA
* @deprecated since 9
* @useinstead bundleManager/ExtensionAbilityInfo.ExtensionAbilityType
*/
export enum ExtensionAbilityType {
/**
@ -406,6 +425,7 @@ declare namespace bundle {
* @syscap SystemCapability.BundleManager.BundleFramework
* @import NA
* @permission NA
* @deprecated since 9
*/
export interface BundleOptions {
/**
@ -422,6 +442,7 @@ declare namespace bundle {
* @syscap SystemCapability.BundleManager.BundleFramework
* @import NA
* @permission NA
* @deprecated since 9
*/
export enum InstallErrorCode{
SUCCESS = 0,
@ -472,6 +493,8 @@ declare namespace bundle {
* @since 9
* @syscap SystemCapability.BundleManager.BundleFramework
* @systemapi Hide this for inner system use
* @deprecated since 9
* @useinstead ohos.bundle.freeInstall#UpgradeFlag
*/
export enum UpgradeFlag {
/**
@ -500,6 +523,8 @@ declare namespace bundle {
* @syscap SystemCapability.BundleManager.BundleFramework
* @import NA
* @permission NA
* @deprecated since 9, use @ohos.bundle.AbilityInfo.SupportWindowMode
* @useinstead bundleManager/AbilityInfo.SupportWindowMode
*/
export enum SupportWindowMode {
/**
@ -532,6 +557,8 @@ declare namespace bundle {
* @param options Indicates the bundle options object.
* @return Returns the BundleInfo object.
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
* @deprecated since 9
* @useinstead ohos.bundle.bundleManager#getBundleInfo
*/
function getBundleInfo(bundleName: string, bundleFlags: number, options: BundleOptions, callback: AsyncCallback<BundleInfo>): void;
function getBundleInfo(bundleName: string, bundleFlags: number, callback: AsyncCallback<BundleInfo>): void;
@ -545,6 +572,8 @@ declare namespace bundle {
* @return Returns the IBundleInstaller interface.
* @permission ohos.permission.INSTALL_BUNDLE
* @systemapi Hide this for inner system use
* @deprecated since 9
* @useinstead ohos.bundle.installer#getBundleInstaller
*/
function getBundleInstaller(callback: AsyncCallback<BundleInstaller>): void;
function getBundleInstaller(): Promise<BundleInstaller>;
@ -558,6 +587,8 @@ declare namespace bundle {
* @param abilityName Indicates the ability name.
* @return Returns the AbilityInfo object for the current ability.
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
* @deprecated since 9
* @useinstead ohos.bundle.bundleManager#queryAbilityInfo
*/
function getAbilityInfo(bundleName: string, abilityName: string, callback: AsyncCallback<AbilityInfo>): void;
function getAbilityInfo(bundleName: string, abilityName: string): Promise<AbilityInfo>;
@ -573,6 +604,8 @@ declare namespace bundle {
* @param userId Indicates the user ID or do not pass user ID.
* @return Returns the ApplicationInfo object.
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
* @deprecated since 9
* @useinstead ohos.bundle.bundleManager#getApplicationInfo
*/
function getApplicationInfo(bundleName: string, bundleFlags: number, userId: number, callback: AsyncCallback<ApplicationInfo>) : void;
function getApplicationInfo(bundleName: string, bundleFlags: number, callback: AsyncCallback<ApplicationInfo>) : void;
@ -590,6 +623,8 @@ declare namespace bundle {
* @param userId Indicates the user ID.
* @return Returns a list of AbilityInfo objects.
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
* @deprecated since 9
* @useinstead ohos.bundle.bundleManager#queryAbilityInfo
*/
function queryAbilityByWant(want: Want, bundleFlags: number, userId: number, callback: AsyncCallback<Array<AbilityInfo>>): void;
function queryAbilityByWant(want: Want, bundleFlags: number, callback: AsyncCallback<Array<AbilityInfo>>): void;
@ -605,6 +640,8 @@ declare namespace bundle {
* @param userId Indicates the user id.
* @return Returns a list of BundleInfo objects.
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
* @deprecated since 9
* @useinstead ohos.bundle.bundleManager#getAllBundleInfo
*/
function getAllBundleInfo(bundleFlag: BundleFlag, userId: number, callback: AsyncCallback<Array<BundleInfo>>) : void;
function getAllBundleInfo(bundleFlag: BundleFlag, callback: AsyncCallback<Array<BundleInfo>>) : void;
@ -620,6 +657,8 @@ declare namespace bundle {
* @param userId Indicates the user ID or do not pass user ID.
* @return Returns a list of ApplicationInfo objects.
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
* @deprecated since 9
* @useinstead ohos.bundle.bundleManager#getAllApplicationInfo
*/
function getAllApplicationInfo(bundleFlags: number, userId: number, callback: AsyncCallback<Array<ApplicationInfo>>) : void;
function getAllApplicationInfo(bundleFlags: number, callback: AsyncCallback<Array<ApplicationInfo>>) : void;
@ -632,6 +671,8 @@ declare namespace bundle {
* @syscap SystemCapability.BundleManager.BundleFramework
* @param uid Indicates the UID of an application.
* @return Returns the bundle name.
* @deprecated since 9
* @useinstead ohos.bundle.bundleManager#getNameForUid
*/
function getNameForUid(uid: number, callback: AsyncCallback<string>) : void
function getNameForUid(uid: number) : Promise<string>;
@ -646,6 +687,8 @@ declare namespace bundle {
* @param bundleFlags Indicates the flag used to specify information contained in the BundleInfo object to be
* returned.
* @return Returns the BundleInfo object.
* @deprecated since 9
* @useinstead ohos.bundle.bundleManager#getBundleArchiveInfo
*/
function getBundleArchiveInfo(hapFilePath: string, bundleFlags: number, callback: AsyncCallback<BundleInfo>) : void
function getBundleArchiveInfo(hapFilePath: string, bundleFlags: number) : Promise<BundleInfo>;
@ -677,6 +720,8 @@ declare namespace bundle {
* @param callback Indicates the callback to be invoked for returning the operation result.
* @permission ohos.permission.REMOVE_CACHE_FILES
* @systemapi Hide this for inner system use
* @deprecated since 9
* @useinstead ohos.bundle.bundleManager#cleanBundleCacheFiles
*/
function cleanBundleCacheFiles(bundleName: string, callback: AsyncCallback<void>): void;
function cleanBundleCacheFiles(bundleName: string): Promise<void>;
@ -691,6 +736,8 @@ declare namespace bundle {
* value false means to disable it.
* @permission ohos.permission.CHANGE_ABILITY_ENABLED_STATE
* @systemapi Hide this for inner system use
* @deprecated since 9
* @useinstead ohos.bundle.bundleManager#setApplicationEnabled
*/
function setApplicationEnabled(bundleName: string, isEnable: boolean, callback: AsyncCallback<void>): void;
function setApplicationEnabled(bundleName: string, isEnable: boolean): Promise<void>;
@ -705,6 +752,8 @@ declare namespace bundle {
* value false means to disable it..
* @permission ohos.permission.CHANGE_ABILITY_ENABLED_STATE
* @systemapi Hide this for inner system use
* @deprecated since 9
* @useinstead ohos.bundle.bundleManager#setAbilityEnabled
*/
function setAbilityEnabled(info: AbilityInfo, isEnable: boolean, callback: AsyncCallback<void>): void;
function setAbilityEnabled(info: AbilityInfo, isEnable: boolean): Promise<void>;
@ -720,6 +769,8 @@ declare namespace bundle {
* @param userId Indicates the user ID.
* @return Returns a list of ExtensionInfo objects.
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
* @deprecated since 9
* @useinstead ohos.bundle.bundleManager#queryExtensionAbilityInfo
*/
function queryExtensionAbilityInfos(want: Want, extensionType: number, extensionFlags: number, userId: number, callback: AsyncCallback<Array<ExtensionAbilityInfo>>): void;
function queryExtensionAbilityInfos(want: Want, extensionType: number, extensionFlags: number, callback: AsyncCallback<Array<ExtensionAbilityInfo>>): void;
@ -734,6 +785,8 @@ declare namespace bundle {
* @return Returns permissionDef object.
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
* @systemapi
* @deprecated since 9
* @useinstead ohos.bundle.bundleManager#getPermissionDef
*/
function getPermissionDef(permissionName: string, callback: AsyncCallback<PermissionDef>): void;
function getPermissionDef(permissionName: string): Promise<PermissionDef>;
@ -747,6 +800,8 @@ declare namespace bundle {
* @param abilityName Indicates the ability name.
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
* @return Returns the label representing the label of the specified ability.
* @deprecated since 9
* @useinstead ohos.bundle.bundleManager#getAbilityLabel
*/
function getAbilityLabel(bundleName: string, abilityName: string, callback: AsyncCallback<string>): void;
function getAbilityLabel(bundleName: string, abilityName: string): Promise<string>;
@ -760,6 +815,8 @@ declare namespace bundle {
* @param abilityName Indicates the ability name.
* @return Returns the PixelMap object representing the icon of the specified ability.
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
* @deprecated since 9
* @useinstead ohos.bundle.bundleManager#getAbilityIcon
*/
function getAbilityIcon(bundleName: string, abilityName: string, callback: AsyncCallback<image.PixelMap>): void;
function getAbilityIcon(bundleName: string, abilityName: string): Promise<image.PixelMap>;
@ -771,7 +828,9 @@ declare namespace bundle {
* @syscap SystemCapability.BundleManager.BundleFramework
* @param info Indicates information about the ability to check.
* @returns Returns true if the ability is enabled; returns false otherwise.
*/
* @deprecated since 9
* @useinstead ohos.bundle.bundleManager#isAbilityEnabled
*/
function isAbilityEnabled(info: AbilityInfo, callback: AsyncCallback<boolean>): void;
function isAbilityEnabled(info: AbilityInfo): Promise<boolean>;
@ -782,6 +841,8 @@ declare namespace bundle {
* @syscap SystemCapability.BundleManager.BundleFramework
* @param bundleName Indicates the bundle name of the application.
* @returns Returns true if the application is enabled; returns false otherwise.
* @deprecated since 9
* @useinstead ohos.bundle.bundleManager#isApplicationEnabled
*/
function isApplicationEnabled(bundleName: string, callback: AsyncCallback<boolean>): void;
function isApplicationEnabled(bundleName: string): Promise<boolean>;
@ -795,6 +856,8 @@ declare namespace bundle {
* @param moduleName Indicates the module name of the application.
* @param upgradeFlag Indicates upgradeFlag of the application.
* @systemapi Hide this for inner system use
* @deprecated since 9
* @useinstead ohos.bundle.freeInstall#setHapModuleUpgradeFlag
*/
function setModuleUpgradeFlag(bundleName: string, moduleName: string, upgradeFlag: UpgradeFlag, callback: AsyncCallback<void>):void;
function setModuleUpgradeFlag(bundleName: string, moduleName: string, upgradeFlag: UpgradeFlag): Promise<void>;
@ -808,6 +871,8 @@ declare namespace bundle {
* @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
* @deprecated since 9
* @useinstead ohos.bundle.freeInstall#isHapModuleRemovable
*/
function isModuleRemovable(bundleName: string, moduleName: string, callback: AsyncCallback<boolean>): void;
function isModuleRemovable(bundleName: string, moduleName: string): Promise<boolean>;
@ -821,11 +886,13 @@ declare namespace bundle {
* @param bundlePackFlag Indicates the application bundle pack flag to be queried.
* @return Returns the BundlePackInfo object.
* @systemapi hide this for inner system use
* @deprecated since 9
* @useinstead ohos.bundle.freeInstall#getBundlePackInfo
*/
function getBundlePackInfo(bundleName: string, bundlePackFlag : pack.BundlePackFlag, callback: AsyncCallback<pack.BundlePackInfo>): void;
function getBundlePackInfo(bundleName: string, bundlePackFlag : pack.BundlePackFlag): Promise<pack.BundlePackInfo>;
/**
/**
* Obtains information about the current ability.
*
* @since 9
@ -835,17 +902,21 @@ declare namespace bundle {
* @param abilityName Indicates the ability name.
* @return Returns the AbilityInfo object for the current ability.
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
* @deprecated since 9
* @useinstead ohos.bundle.bundleManager#getAbilityInfo
*/
function getAbilityInfo(bundleName: string, moduleName: string, abilityName: string, callback: AsyncCallback<AbilityInfo>): void;
function getAbilityInfo(bundleName: string, moduleName: string, abilityName: string): Promise<AbilityInfo>;
/**
/**
* Obtains information about the dispatcher version.
*
* @since 9
* @syscap SystemCapability.BundleManager.BundleFramework
* @return Returns the DispatchInfo object for the current ability.
* @systemapi hide this for inner system use
* @deprecated since 9
* @useinstead ohos.bundle.freeInstall#getDispatchInfo
*/
function getDispatcherVersion(callback: AsyncCallback<DispatchInfo>): void;
function getDispatcherVersion(): Promise<DispatchInfo>;
@ -860,6 +931,8 @@ declare namespace bundle {
* @param abilityName Indicates the ability name.
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
* @return Returns the label representing the label of the specified ability.
* @deprecated since 9
* @useinstead ohos.bundle.bundleManager#getAbilityLabel
*/
function getAbilityLabel(bundleName: string, moduleName: string, abilityName: string, callback: AsyncCallback<string>): void;
function getAbilityLabel(bundleName: string, moduleName: string, abilityName: string): Promise<string>;
@ -874,6 +947,8 @@ declare namespace bundle {
* @param abilityName Indicates the ability name.
* @return Returns the PixelMap object representing the icon of the specified ability.
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
* @deprecated since 9
* @useinstead ohos.bundle.bundleManager#getAbilityIcon
*/
function getAbilityIcon(bundleName: string, moduleName: string, abilityName: string, callback: AsyncCallback<image.PixelMap>): void;
function getAbilityIcon(bundleName: string, moduleName: string, abilityName: string): Promise<image.PixelMap>;
@ -887,6 +962,8 @@ declare namespace bundle {
* @param abilityName Indicates the abilityName of the application.
* @param metadataName Indicates the name of metadata in ability.
* @return Returns string in json-format of the corresponding config file.
* @deprecated since 9
* @useinstead ohos.bundle.bundleManager#getProfileByAbility
*/
function getProfileByAbility(moduleName: string, abilityName: string, metadataName: string, callback: AsyncCallback<Array<string>>): void;
function getProfileByAbility(moduleName: string, abilityName: string, metadataName?: string): Promise<Array<string>>;
@ -900,6 +977,8 @@ declare namespace bundle {
* @param extensionAbilityName Indicates the extensionAbilityName of the application.
* @param metadataName Indicates the name of metadata in ability.
* @return Returns string in json-format of the corresponding config file.
* @deprecated since 9
* @useinstead ohos.bundle.bundleManager#getProfileByExtensionAbility
*/
function getProfileByExtensionAbility(moduleName: string, extensionAbilityName: string, metadataName: string, callback: AsyncCallback<Array<string>>): void;
function getProfileByExtensionAbility(moduleName: string, extensionAbilityName: string, metadataName?: string): Promise<Array<string>>;
@ -914,6 +993,8 @@ declare namespace bundle {
* @return Returns the disposed status of a specified bundle.
* @permission ohos.permission.MANAGE_DISPOSED_APP_STATUS
* @systemapi Hide this for inner system use
* @deprecated since 9
* @useinstead ohos.bundle.appControl#setDisposedStatus
*/
function setDisposedStatus(bundleName: string, status: number, callback: AsyncCallback<void>): void;
function setDisposedStatus(bundleName: string, status: number): Promise<void>;
@ -927,6 +1008,8 @@ declare namespace bundle {
* @return Returns the disposed status of a specified bundle.
* @permission ohos.permission.MANAGE_DISPOSED_APP_STATUS
* @systemapi Hide this for inner system use
* @deprecated since 9
* @useinstead ohos.bundle.appControl#getDisposedStatus
*/
function getDisposedStatus(bundleName: string, callback: AsyncCallback<number>): void;
function getDisposedStatus(bundleName: string): Promise<number>;
@ -942,6 +1025,8 @@ declare namespace bundle {
* @param userId Indicates the user ID or do not pass user ID.
* @return Returns the ApplicationInfo object.
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
* @deprecated since 9
* @useinstead ohos.bundle.appControl#getApplicationInfoSync
*/
function getApplicationInfoSync(bundleName: string, bundleFlags: number, userId: number) : ApplicationInfo;
function getApplicationInfoSync(bundleName: string, bundleFlags: number) : ApplicationInfo;
@ -957,13 +1042,15 @@ declare namespace bundle {
* @param options Indicates the bundle options object.
* @return Returns the BundleInfo object.
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
* @deprecated since 9
* @useinstead ohos.bundle.appControl#getApplicationInfoSync
*/
function getBundleInfoSync(bundleName: string, bundleFlags: number, options: BundleOptions): BundleInfo;
function getBundleInfoSync(bundleName: string, bundleFlags: number): BundleInfo;
/**
* Obtains configuration information about an application.
*
*
* @since 9
* @syscap SystemCapability.BundleManager.BundleFramework
*/
@ -971,7 +1058,7 @@ declare namespace bundle {
/**
* Stores module information about an application.
*
*
* @since 9
* @syscap SystemCapability.BundleManager.BundleFramework
*/
@ -979,7 +1066,7 @@ declare namespace bundle {
/**
* Indicates the custom metadata.
*
*
* @since 9
* @syscap SystemCapability.BundleManager.BundleFramework
*/
@ -987,7 +1074,7 @@ declare namespace bundle {
/**
* Indicates the Metadata.
*
*
* @since 9
* @syscap SystemCapability.BundleManager.BundleFramework
*/
@ -995,7 +1082,7 @@ declare namespace bundle {
/**
* Obtains configuration information about a bundle.
*
*
* @since 9
* @syscap SystemCapability.BundleManager.BundleFramework
*/
@ -1003,7 +1090,7 @@ declare namespace bundle {
/**
* The scene which is used.
*
*
* @since 9
* @syscap SystemCapability.BundleManager.BundleFramework
*/
@ -1011,7 +1098,7 @@ declare namespace bundle {
/**
* Indicates the required permissions details defined in file config.json.
*
*
* @since 9
* @syscap SystemCapability.BundleManager.BundleFramework
*/
@ -1019,7 +1106,7 @@ declare namespace bundle {
/**
* Obtains configuration information about an module.
*
*
* @since 9
* @syscap SystemCapability.BundleManager.BundleFramework
*/
@ -1027,7 +1114,7 @@ declare namespace bundle {
/**
* Obtains configuration information about an ability.
*
*
* @since 9
* @syscap SystemCapability.BundleManager.BundleFramework
*/
@ -1035,7 +1122,7 @@ declare namespace bundle {
/**
* Obtains extension information about a bundle.
*
*
* @since 9
* @syscap SystemCapability.BundleManager.BundleFramework
*/
@ -1043,43 +1130,43 @@ declare namespace bundle {
/**
* Offers install, upgrade, and remove bundles on the devices.
*
*
* @since 9
* @syscap SystemCapability.BundleManager.BundleFramework
* @systemapi hide this for inner system use
*/
export type BundleInstaller = _BundleInstaller.BundleInstaller;
export type BundleInstaller = _BundleInstaller.BundleInstaller;
/**
* Provides parameters required for hashParam.
*
*
* @since 9
* @syscap SystemCapability.BundleManager.BundleFramework
* @systemapi hide this for inner system use
*/
export type HashParam = _BundleInstaller.HashParam;
export type HashParam = _BundleInstaller.HashParam;
/**
* Provides parameters required for installing or uninstalling an application.
*
*
* @since 9
* @syscap SystemCapability.BundleManager.BundleFramework
* @systemapi hide this for inner system use
*/
export type InstallParam = _BundleInstaller.InstallParam;
export type InstallParam = _BundleInstaller.InstallParam;
/**
* Indicates the install or uninstall status.
*
*
* @since 9
* @syscap SystemCapability.BundleManager.BundleFramework
* @systemapi hide this for inner system use
*/
export type InstallStatus = _BundleInstaller.InstallStatus;
export type InstallStatus = _BundleInstaller.InstallStatus;
/**
* Indicates the defined permission details in file config.json.
*
*
* @since 9
* @syscap SystemCapability.BundleManager.BundleFramework
* @systemapi hide this for inner system use
@ -1088,7 +1175,7 @@ declare namespace bundle {
/**
* Contains basic Ability information, which uniquely identifies an ability.
*
*
* @since 9
* @syscap SystemCapability.BundleManager.BundleFramework
*/
@ -1096,7 +1183,7 @@ declare namespace bundle {
/**
* The dispatch info class.
*
*
* @since 9
* @syscap SystemCapability.BundleManager.BundleFramework
* @systemapi hide this for inner system use
@ -1105,7 +1192,7 @@ declare namespace bundle {
/**
* The bundle pack info class.
*
*
* @since 9
* @syscap SystemCapability.BundleManager.BundleFramework
* @systemapi hide this for inner system use
@ -1114,7 +1201,7 @@ declare namespace bundle {
/**
* The package info class.
*
*
* @since 9
* @syscap SystemCapability.BundleManager.BundleFramework
* @systemapi hide this for inner system use
@ -1123,7 +1210,7 @@ declare namespace bundle {
/**
* The package summary class.
*
*
* @since 9
* @syscap SystemCapability.BundleManager.BundleFramework
* @systemapi hide this for inner system use
@ -1132,7 +1219,7 @@ declare namespace bundle {
/**
* The bundle summary class.
*
*
* @since 9
* @syscap SystemCapability.BundleManager.BundleFramework
* @systemapi hide this for inner system use
@ -1141,7 +1228,7 @@ declare namespace bundle {
/**
* The extension ability forms class.
*
*
* @since 9
* @syscap SystemCapability.BundleManager.BundleFramework
* @systemapi hide this for inner system use
@ -1150,7 +1237,7 @@ declare namespace bundle {
/**
* The module summary of a bundle.
*
*
* @since 9
* @syscap SystemCapability.BundleManager.BundleFramework
* @systemapi hide this for inner system use
@ -1159,7 +1246,7 @@ declare namespace bundle {
/**
* The bundle info summary class.
*
*
* @since 9
* @syscap SystemCapability.BundleManager.BundleFramework
* @systemapi hide this for inner system use
@ -1168,7 +1255,7 @@ declare namespace bundle {
/**
* The ability info of a module.
*
*
* @since 9
* @syscap SystemCapability.BundleManager.BundleFramework
* @systemapi hide this for inner system use
@ -1177,7 +1264,7 @@ declare namespace bundle {
/**
* The form info of an ability.
*
*
* @since 9
* @syscap SystemCapability.BundleManager.BundleFramework
* @systemapi hide this for inner system use
@ -1186,7 +1273,7 @@ declare namespace bundle {
/**
* The bundle version class.
*
*
* @since 9
* @syscap SystemCapability.BundleManager.BundleFramework
* @systemapi hide this for inner system use
@ -1195,7 +1282,7 @@ declare namespace bundle {
/**
* The bundle Api version class.
*
*
* @since 9
* @syscap SystemCapability.BundleManager.BundleFramework
* @systemapi hide this for inner system use
@ -1204,7 +1291,7 @@ declare namespace bundle {
/**
* Flags which are used to indicate bundle pack.
*
*
* @since 9
* @syscap SystemCapability.BundleManager.BundleFramework
* @systemapi hide this for inner system use

View File

@ -14,130 +14,205 @@
*/
import { AsyncCallback } from './basic';
import { BundleInfo } from './bundle/bundleInfo';
import { ElementName } from './bundle/elementName';
import { BundleInfo } from './bundleManager/bundleInfo';
import { ElementName } from './bundleManager/elementName';
/**
* default application manager.
* @name defaultAppManager
* Default application manager.
* @namespace defaultAppManager
* @syscap SystemCapability.BundleManager.BundleFramework.DefaultAppManager
* @since 9
* @syscap SystemCapability.BundleManager.BundleFramework
* @permission NA
*/
declare namespace defaultAppManager {
/**
* the constant for application type.
* @name ApplicationType
* The constant for application type.
* @enum {number}
* @syscap SystemCapability.BundleManager.BundleFramework.DefaultAppManager
* @since 9
* @syscap SystemCapability.BundleManager.BundleFramework
* @permission N/A
*/
export enum ApplicationType {
/**
* default browser identifier.
*
* Default browser identifier.
* @syscap SystemCapability.BundleManager.BundleFramework.DefaultAppManager
* @since 9
*/
BROWSER = "BROWSER",
BROWSER = "Web Browser",
/**
* default image identifier.
*
* Default image identifier.
* @syscap SystemCapability.BundleManager.BundleFramework.DefaultAppManager
* @since 9
*/
IMAGE = "IMAGE",
IMAGE = "Image Gallery",
/**
* default audio identifier.
*
* Default audio identifier.
* @syscap SystemCapability.BundleManager.BundleFramework.DefaultAppManager
* @since 9
*/
AUDIO = "AUDIO",
AUDIO = "Audio Player",
/**
* default video identifier.
*
* Default video identifier.
* @syscap SystemCapability.BundleManager.BundleFramework.DefaultAppManager
* @since 9
*/
VIDEO = "VIDEO",
VIDEO = "Video Player",
/**
* default pdf identifier.
*
* Default PDF identifier.
* @syscap SystemCapability.BundleManager.BundleFramework.DefaultAppManager
* @since 9
*/
PDF = "PDF",
PDF = "PDF Viewer",
/**
* default word identifier.
*
* Default word identifier.
* @syscap SystemCapability.BundleManager.BundleFramework.DefaultAppManager
* @since 9
*/
WORD = "WORD",
WORD = "Word Viewer",
/**
* default excel identifier.
*
* Default excel identifier.
* @syscap SystemCapability.BundleManager.BundleFramework.DefaultAppManager
* @since 9
*/
EXCEL = "EXCEL",
EXCEL = "Excel Viewer",
/**
* default ppt identifier.
*
* Default PPT identifier.
* @syscap SystemCapability.BundleManager.BundleFramework.DefaultAppManager
* @since 9
*/
PPT = "PPT",
PPT = "PPT Viewer",
}
/**
* query whether the caller is default application based on type.
*
* Query whether the caller is default application based on type.
* @param { string } type - Application type or a file type that conforms to media type format.
* @param { AsyncCallback<boolean> } callback - The callback of querying default application result.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 801 - Capability not supported.
* @syscap SystemCapability.BundleManager.BundleFramework.DefaultAppManager
* @since 9
* @syscap SystemCapability.BundleManager.BundleFramework
* @param type application type or file type.
* @return return true if caller is default application; return false otherwise.
* @permission N/A
*/
function isDefaultApplication(type: string) : Promise<boolean>;
function isDefaultApplication(type: string, callback: AsyncCallback<boolean>) : void;
/**
* get default application based on type.
*
* Query whether the caller is default application based on type.
* @param { string } type - Application type or a file type that conforms to media type format.
* @returns { Promise<boolean> } Return true if caller is default application; return false otherwise.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 801 - Capability not supported.
* @syscap SystemCapability.BundleManager.BundleFramework.DefaultAppManager
* @since 9
*/
function isDefaultApplication(type: string) : Promise<boolean>;
/**
* Get default application based on type.
* @permission ohos.permission.GET_DEFAULT_APPLICATION
* @param { string } type - Application type or a file type that conforms to media type format.
* @param { number } userId - Indicates the id for the user.
* @param { AsyncCallback<BundleInfo> } callback - The callback of the BundleInfo object result.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 17700004 - The specified user id is not found.
* @throws { BusinessError } 17700023 - The specified default app does not exist.
* @throws { BusinessError } 17700025 - The specified type is invalid.
* @syscap SystemCapability.BundleManager.BundleFramework.DefaultAppManager
* @systemapi
* @since 9
* @syscap SystemCapability.BundleManager.BundleFramework
* @param type application type or file type.
* @param userId indicates the id for the user.
* @return return the BundleInfo object.
* @permission ohos.permission.GET_DEFAULT_APPLICATION
* @systemapi hide this for inner system use.
*/
function getDefaultApplication(type: string, userId?: number) : Promise<BundleInfo>;
function getDefaultApplication(type: string, userId: number, callback: AsyncCallback<BundleInfo>) : void;
function getDefaultApplication(type: string, callback: AsyncCallback<BundleInfo>) : void;
/**
* set default application based on type.
*
* Get default application based on type.
* @permission ohos.permission.GET_DEFAULT_APPLICATION
* @param { string } type - Application type or a file type that conforms to media type format.
* @param { number } userId - Indicates the id for the user.
* @returns { Promise<BundleInfo> } Return the BundleInfo object.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 17700004 - The specified user id is not found.
* @throws { BusinessError } 17700023 - The specified default app does not exist.
* @throws { BusinessError } 17700025 - The specified type is invalid.
* @syscap SystemCapability.BundleManager.BundleFramework.DefaultAppManager
* @systemapi
* @since 9
*/
function getDefaultApplication(type: string, userId?: number) : Promise<BundleInfo>;
/**
* Set default application based on type.
* @permission ohos.permission.SET_DEFAULT_APPLICATION
* @param { string } type - Application type or a file type that conforms to media type format.
* @param { ElementName } elementName - Uniquely identifies an ability or extensionAbility.
* @param { number } userId - Indicates the id for the user.
* @param { AsyncCallback<void> } callback - The callback of setting default application result.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 17700004 - The specified user id is not found.
* @throws { BusinessError } 17700025 - The specified type is invalid.
* @throws { BusinessError } 17700028 - The specified ability and type does not match.
* @syscap SystemCapability.BundleManager.BundleFramework.DefaultAppManager.defaultAppManager
* @systemapi
* @since 9
* @syscap SystemCapability.BundleManager.BundleFramework
* @param type application type or file type.
* @param elementName uniquely identifies an ability or extensionAbility.
* @param userId indicates the id for the user.
* @permission ohos.permission.SET_DEFAULT_APPLICATION
* @systemapi hide this for inner system use.
*/
function setDefaultApplication(type: string, elementName: ElementName, userId?: number) : Promise<void>;
function setDefaultApplication(type: string, elementName: ElementName, userId: number, callback: AsyncCallback<void>) : void;
function setDefaultApplication(type: string, elementName: ElementName, callback: AsyncCallback<void>) : void;
/**
* reset default application based on type.
*
* @since 9
* @syscap SystemCapability.BundleManager.BundleFramework
* @param type application type or file type.
* @param userId indicates the id for the user.
* Set default application based on type.
* @permission ohos.permission.SET_DEFAULT_APPLICATION
* @systemapi hide this for inner system use.
* @param { string } type - Application type or a file type that conforms to media type format.
* @param { ElementName } elementName - Uniquely identifies an ability or extensionAbility.
* @param { number } userId - Indicates the id for the user.
* @returns { Promise<void> } The result of setting default application.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 17700004 - The specified user id is not found.
* @throws { BusinessError } 17700025 - The specified type is invalid.
* @throws { BusinessError } 17700028 - The specified ability and type does not match.
* @syscap SystemCapability.BundleManager.BundleFramework.DefaultAppManager.defaultAppManager
* @systemapi
* @since 9
*/
function setDefaultApplication(type: string, elementName: ElementName, userId?: number) : Promise<void>;
/**
* Reset default application based on type.
* @permission ohos.permission.SET_DEFAULT_APPLICATION
* @param { string } type - Application type or a file type that conforms to media type format.
* @param { number } userId - Indicates the id for the user.
* @param { AsyncCallback<void> } callback - The callback of resetting default application result.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 17700004 - The specified user id is not found.
* @throws { BusinessError } 17700025 - The specified type is invalid.
* @syscap SystemCapability.BundleManager.BundleFramework.DefaultAppManager.defaultAppManager
* @systemapi
* @since 9
*/
function resetDefaultApplication(type: string, userId?: number) : Promise<void>;
function resetDefaultApplication(type: string, userId: number, callback: AsyncCallback<void>) : void;
function resetDefaultApplication(type: string, callback: AsyncCallback<void>) : void;
/**
* Reset default application based on type.
* @permission ohos.permission.SET_DEFAULT_APPLICATION
* @param { string } type - Application type or a file type that conforms to media type format.
* @param { number } userId - Indicates the id for the user.
* @returns { Promise<void> } The result of resetting default application.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 17700004 - The specified user id is not found.
* @throws { BusinessError } 17700025 - The specified type is invalid.
* @syscap SystemCapability.BundleManager.BundleFramework.DefaultAppManager.defaultAppManager
* @systemapi
* @since 9
*/
function resetDefaultApplication(type: string, userId?: number) : Promise<void>;
}
export default defaultAppManager;
export default defaultAppManager;

View File

@ -19,6 +19,8 @@
* @syscap SystemCapability.BundleManager.BundleFramework
* @permission NA
* @systemapi
* @deprecated since 9
* @useinstead ohos.bundle.bundleManager.PermissionDef
*/
export interface PermissionDef {
/**

View File

@ -23,6 +23,8 @@ import { HapModuleInfo } from './hapModuleInfo';
* @since 7
* @syscap SystemCapability.BundleManager.BundleFramework
* @permission NA
* @deprecated since 9
* @useinstead ohos.bundle.bundleManager.BundleInfo
*
*/
export interface UsedScene {

View File

@ -18,6 +18,8 @@
* @since 7
* @syscap SystemCapability.BundleManager.BundleFramework
* @permission NA
* @deprecated since 9
* @useinstead ohos.bundle.bundleManager.Metadata
*
*/
export interface CustomizeData {
@ -27,14 +29,14 @@
* @syscap SystemCapability.BundleManager.BundleFramework
*/
name: string;
/**
* @default Indicates the custom metadata value
* @since 7
* @syscap SystemCapability.BundleManager.BundleFramework
*/
value: string;
/**
* @default Indicates the custom metadata resource
* @since 8

240
api/bundleManager/bundleInfo.d.ts vendored Normal file
View File

@ -0,0 +1,240 @@
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { ApplicationInfo } from './applicationInfo';
import { HapModuleInfo } from './hapModuleInfo';
/**
* Obtains configuration information about a bundle
* @typedef BundleInfo
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @since 9
*/
export interface BundleInfo {
/**
* Indicates the name of this bundle
* @type {string}
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @since 9
*/
readonly name: string;
/**
* Indicates the bundle vendor
* @type {string}
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @since 9
*/
readonly vendor: string;
/**
* Indicates the version code of the bundle
* @type {number}
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @since 9
*/
readonly versionCode: number;
/**
* Indicates the version name of the bundle
* @type {string}
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @since 9
*/
readonly versionName: string;
/**
* Indicates the **minimum ** version compatible with the bundle
* @type {number}
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @since 9
*/
readonly minCompatibleVersionCode: number;
/**
* Indicates the target version number of the bundle
* @type {number}
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @since 9
*/
readonly targetVersion: number;
/**
* Obtains configuration information about an application
* @type {ApplicationInfo}
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @since 9
*/
readonly appInfo: ApplicationInfo;
/**
* Obtains configuration information about an module
* @type {Array<HapModuleInfo>}
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @since 9
*/
readonly hapModulesInfo: Array<HapModuleInfo>;
/**
* Indicates the required permissions details defined in file config.json
* @type {Array<ReqPermissionDetail>}
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @since 9
*/
readonly reqPermissionDetails: Array<ReqPermissionDetail>;
/**
* Indicates the grant status of required permissions
* @type {Array<PermissionGrantStatus>}
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @since 9
*/
readonly permissionGrantStates: Array<PermissionGrantStatus>;
/**
* Indicates the SignatureInfo of the bundle
* @type {SignatureInfo}
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @since 9
*/
readonly signatureInfo: SignatureInfo;
/**
* Indicates the hap install time
* @type {number}
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @since 9
*/
readonly installTime: number;
/**
* Indicates the hap update time
* @type {number}
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @since 9
*/
readonly updateTime: number;
}
/**
* Indicates the required permissions details defined in configuration file
* @typedef ReqPermissionDetail
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @since 9
*/
export interface ReqPermissionDetail {
/**
* Indicates the name of this required permissions
* @type {string}
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @since 9
*/
name: string;
/**
* Indicates the reason of this required permissions
* @type {string}
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @since 9
*/
reason: string;
/**
* Indicates the reason id of this required permissions
* @type {number}
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @since 9
*/
reasonId: number;
/**
* Indicates the used scene of this required permissions
* @type {UsedScene}
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @since 9
*/
usedScene: UsedScene;
}
/**
* The scene which is used
* @typedef UsedScene
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @since 9
*/
export interface UsedScene {
/**
* Indicates the abilities that need the permission
* @type {Array<string>}
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @since 9
*/
abilities: Array<string>;
/**
* Indicates the time when the permission is used
* @type {string}
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @since 9
*/
when: string;
}
/**
* PermissionGrantStatus
* @enum {number}
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @since 9
*/
export enum PermissionGrantStatus {
/**
* PERMISSION_DENIED
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @since 9
*/
PERMISSION_DENIED = -1,
/**
* PERMISSION_GRANTED
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @since 9
*/
PERMISSION_GRANTED = 0,
}
/**
* Indicates SignatureInfo
* @typedef SignatureInfo
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @since 9
*/
export interface SignatureInfo {
/**
* Indicates the ID of the application to which this bundle belongs
* The application ID uniquely identifies an application. It is determined by the bundle name and signature
* @type {string}
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @since 9
*/
readonly appId: string;
/**
* Indicates the fingerprint of the certificate
* @type {string}
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @since 9
*/
readonly fingerprint: string;
}

55
api/bundleManager/permissionDef.d.ts vendored Normal file
View File

@ -0,0 +1,55 @@
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Indicates the defined permission details in file config.json
* @typedef PermissionDef
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 9
*/
export interface PermissionDef {
/**
* Indicates the name of this permission
* @type {string}
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @since 9
*/
permissionName: string;
/**
* Indicates the grant mode of this permission
* @type {number}
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @since 9
*/
grantMode: number;
/**
* Indicates the labelId of this permission
* @type {number}
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @since 9
*/
labelId: number;
/**
* Indicates the descriptionId of this permission
* @type {number}
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @since 9
*/
descriptionId: number;
}