mirror of
https://gitee.com/openharmony/interface_sdk-js
synced 2025-04-17 12:41:05 +00:00
补充d.ts缺少的注释
Signed-off-by: junyi233 <zhengjun29@huawei.com>
This commit is contained in:
parent
6bf4632420
commit
c56aac1310
2
api/@ohos.bundle.appControl.d.ts
vendored
2
api/@ohos.bundle.appControl.d.ts
vendored
@ -31,7 +31,7 @@ declare namespace appControl {
|
||||
* @permission ohos.permission.MANAGE_DISPOSED_APP_STATUS
|
||||
* @param { string } appId - Indicates the app ID of the application.
|
||||
* @param { Want } disposedWant - Indicates the disposed want.
|
||||
* @param { AsyncCallback } callback - The callback of setting the disposed status result.
|
||||
* @param { AsyncCallback<void> } callback - The callback of setting the disposed status result.
|
||||
* @throws { BusinessError } 201 - Permission denied.
|
||||
* @throws { BusinessError } 202 - Permission denied, non-system app called system api.
|
||||
* @throws { BusinessError } 401 - The parameter check failed.
|
||||
|
242
api/@ohos.bundle.bundleManager.d.ts
vendored
242
api/@ohos.bundle.bundleManager.d.ts
vendored
@ -734,12 +734,31 @@ declare namespace bundleManager {
|
||||
function getBundleInfoForSelf(bundleFlags: number, callback: AsyncCallback<BundleInfo>): void;
|
||||
|
||||
/**
|
||||
* Obtains bundleInfo based on bundleName, bundleFlags and options. ohos.permission.GET_BUNDLE_INFO_PRIVILEGED is required for cross user access.
|
||||
* Obtains bundleInfo based on bundleName, bundleFlags. ohos.permission.GET_BUNDLE_INFO_PRIVILEGED is required for cross user access.
|
||||
*
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
|
||||
* @param { string } bundleName - Indicates the application bundle name to be queried.
|
||||
* @param { number } bundleFlags - Indicates the flag used to specify information contained in the BundleInfo objects that will be returned.
|
||||
* @param { AsyncCallback<BundleInfo> } callback - The callback of getting bundle info result.
|
||||
* @throws { BusinessError } 201 - Permission denied.
|
||||
* @throws { BusinessError } 202 - Permission denied, non-system app called system api.
|
||||
* @throws { BusinessError } 401 - The parameter check failed.
|
||||
* @throws { BusinessError } 17700001 - The specified bundleName is not found.
|
||||
* @throws { BusinessError } 17700026 - The specified bundle is disabled.
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework.Core
|
||||
* @systemapi
|
||||
* @since 9
|
||||
*/
|
||||
function getBundleInfo(bundleName: string, bundleFlags: number, callback: AsyncCallback<BundleInfo>): void;
|
||||
|
||||
/**
|
||||
* Obtains bundleInfo based on bundleName, bundleFlags and userId. ohos.permission.GET_BUNDLE_INFO_PRIVILEGED is required for cross user access.
|
||||
*
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
|
||||
* @param { string } bundleName - Indicates the application bundle name to be queried.
|
||||
* @param { number } bundleFlags - Indicates the flag used to specify information contained in the BundleInfo objects that will be returned.
|
||||
* @param { number } userId - Indicates the user ID or do not pass user ID.
|
||||
* @param { AsyncCallback } callback - The callback of getting bundle info result.
|
||||
* @param { AsyncCallback<BundleInfo> } callback - The callback of getting bundle info result.
|
||||
* @throws { BusinessError } 201 - Permission denied.
|
||||
* @throws { BusinessError } 202 - Permission denied, non-system app called system api.
|
||||
* @throws { BusinessError } 401 - The parameter check failed.
|
||||
@ -750,11 +769,12 @@ declare namespace bundleManager {
|
||||
* @systemapi
|
||||
* @since 9
|
||||
*/
|
||||
function getBundleInfo(bundleName: string, bundleFlags: number, callback: AsyncCallback<BundleInfo>): void;
|
||||
function getBundleInfo(bundleName: string, bundleFlags: number, userId: number, callback: AsyncCallback<BundleInfo>): void;
|
||||
function getBundleInfo(bundleName: string,
|
||||
bundleFlags: number, userId: number, callback: AsyncCallback<BundleInfo>): void;
|
||||
|
||||
/**
|
||||
* Obtains bundleInfo based on bundleName, bundleFlags and options. ohos.permission.GET_BUNDLE_INFO_PRIVILEGED is required for cross user access.
|
||||
* Obtains bundleInfo based on bundleName, bundleFlags and userId. ohos.permission.GET_BUNDLE_INFO_PRIVILEGED is required for cross user access.
|
||||
*
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
|
||||
* @param { string } bundleName - Indicates the application bundle name to be queried.
|
||||
* @param { number } bundleFlags - Indicates the flag used to specify information contained in the BundleInfo objects that will be returned.
|
||||
@ -774,6 +794,25 @@ declare namespace bundleManager {
|
||||
|
||||
/**
|
||||
* Obtains application info based on a given bundle name. ohos.permission.GET_BUNDLE_INFO_PRIVILEGED is required for cross user access.
|
||||
*
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
|
||||
* @param { string } bundleName - Indicates the application bundle name to be queried.
|
||||
* @param { number } appFlags - Indicates the flag used to specify information contained in the ApplicationInfo objects that will be returned.
|
||||
* @param { AsyncCallback<ApplicationInfo> } callback - The callback of getting application info result.
|
||||
* @throws { BusinessError } 201 - Permission denied.
|
||||
* @throws { BusinessError } 202 - Permission denied, non-system app called system api.
|
||||
* @throws { BusinessError } 401 - The parameter check failed.
|
||||
* @throws { BusinessError } 17700001 - The specified bundleName is not found.
|
||||
* @throws { BusinessError } 17700026 - The specified bundle is disabled.
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework.Core
|
||||
* @systemapi
|
||||
* @since 9
|
||||
*/
|
||||
function getApplicationInfo(bundleName: string, appFlags: number, callback: AsyncCallback<ApplicationInfo>): void;
|
||||
|
||||
/**
|
||||
* Obtains application info based on a given bundle name. ohos.permission.GET_BUNDLE_INFO_PRIVILEGED is required for cross user access.
|
||||
*
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
|
||||
* @param { string } bundleName - Indicates the application bundle name to be queried.
|
||||
* @param { number } appFlags - Indicates the flag used to specify information contained in the ApplicationInfo objects that will be returned.
|
||||
@ -789,11 +828,12 @@ declare namespace bundleManager {
|
||||
* @systemapi
|
||||
* @since 9
|
||||
*/
|
||||
function getApplicationInfo(bundleName: string, appFlags: number, callback: AsyncCallback<ApplicationInfo>): void;
|
||||
function getApplicationInfo(bundleName: string, appFlags: number, userId: number, callback: AsyncCallback<ApplicationInfo>): void;
|
||||
function getApplicationInfo(bundleName: string,
|
||||
appFlags: number, userId: number, callback: AsyncCallback<ApplicationInfo>): void;
|
||||
|
||||
/**
|
||||
* Obtains application info based on a given bundle name. ohos.permission.GET_BUNDLE_INFO_PRIVILEGED is required for cross user access.
|
||||
*
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
|
||||
* @param { string } bundleName - Indicates the application bundle name to be queried.
|
||||
* @param { number } appFlags - Indicates the flag used to specify information contained in the ApplicationInfo objects that will be returned.
|
||||
@ -813,10 +853,26 @@ declare namespace bundleManager {
|
||||
|
||||
/**
|
||||
* Obtains BundleInfo of all bundles available in the system.
|
||||
*
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
|
||||
* @param { number } bundleFlags - Indicates the flag used to specify information contained in the BundleInfo that will be returned.
|
||||
* @param { AsyncCallback<Array<BundleInfo>> } callback - The callback of getting a list of BundleInfo objects.
|
||||
* @throws { BusinessError } 201 - Permission denied.
|
||||
* @throws { BusinessError } 202 - Permission denied, non-system app called system api.
|
||||
* @throws { BusinessError } 401 - The parameter check failed.
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework.Core
|
||||
* @systemapi
|
||||
* @since 9
|
||||
*/
|
||||
function getAllBundleInfo(bundleFlags: number, callback: AsyncCallback<Array<BundleInfo>>): void;
|
||||
|
||||
/**
|
||||
* Obtains BundleInfo of all bundles available in the system.
|
||||
*
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
|
||||
* @param { number } bundleFlags - Indicates the flag used to specify information contained in the BundleInfo that will be returned.
|
||||
* @param { number } userId - Indicates the user id.
|
||||
* @param { AsyncCallback } callback - The callback of getting a list of BundleInfo objects.
|
||||
* @param { AsyncCallback<Array<BundleInfo>> } callback - The callback of getting a list of BundleInfo objects.
|
||||
* @throws { BusinessError } 201 - Permission denied.
|
||||
* @throws { BusinessError } 202 - Permission denied, non-system app called system api.
|
||||
* @throws { BusinessError } 401 - The parameter check failed.
|
||||
@ -825,11 +881,11 @@ declare namespace bundleManager {
|
||||
* @systemapi
|
||||
* @since 9
|
||||
*/
|
||||
function getAllBundleInfo(bundleFlags: number, callback: AsyncCallback<Array<BundleInfo>>): void;
|
||||
function getAllBundleInfo(bundleFlags: number, userId: number, callback: AsyncCallback<Array<BundleInfo>>): void;
|
||||
|
||||
/**
|
||||
* Obtains BundleInfo of all bundles available in the system.
|
||||
*
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
|
||||
* @param { number } bundleFlags - Indicates the flag used to specify information contained in the BundleInfo that will be returned.
|
||||
* @param { number } userId - Indicates the user id.
|
||||
@ -846,10 +902,26 @@ declare namespace bundleManager {
|
||||
|
||||
/**
|
||||
* Obtains information about all installed applications of a specified user.
|
||||
*
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
|
||||
* @param { number } appFlags - Indicates the flag used to specify information contained in the ApplicationInfo objects that will be returned.
|
||||
* @param { AsyncCallback<Array<ApplicationInfo>> } callback - The callback of getting a list of ApplicationInfo objects.
|
||||
* @throws { BusinessError } 201 - Permission denied.
|
||||
* @throws { BusinessError } 202 - Permission denied, non-system app called system api.
|
||||
* @throws { BusinessError } 401 - The parameter check failed.
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework.Core
|
||||
* @systemapi
|
||||
* @since 9
|
||||
*/
|
||||
function getAllApplicationInfo(appFlags: number, callback: AsyncCallback<Array<ApplicationInfo>>): void;
|
||||
|
||||
/**
|
||||
* Obtains information about all installed applications of a specified user.
|
||||
*
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
|
||||
* @param { number } appFlags - Indicates the flag used to specify information contained in the ApplicationInfo objects that will be returned.
|
||||
* @param { number } userId - Indicates the user ID or do not pass user ID.
|
||||
* @param { AsyncCallback } callback - The callback of getting a list of ApplicationInfo objects.
|
||||
* @param { AsyncCallback<Array<ApplicationInfo>> } callback - The callback of getting a list of ApplicationInfo objects.
|
||||
* @throws { BusinessError } 201 - Permission denied.
|
||||
* @throws { BusinessError } 202 - Permission denied, non-system app called system api.
|
||||
* @throws { BusinessError } 401 - The parameter check failed.
|
||||
@ -858,11 +930,12 @@ declare namespace bundleManager {
|
||||
* @systemapi
|
||||
* @since 9
|
||||
*/
|
||||
function getAllApplicationInfo(appFlags: number, callback: AsyncCallback<Array<ApplicationInfo>>): void;
|
||||
function getAllApplicationInfo(appFlags: number, userId: number, callback: AsyncCallback<Array<ApplicationInfo>>): void;
|
||||
function getAllApplicationInfo(appFlags: number,
|
||||
userId: number, callback: AsyncCallback<Array<ApplicationInfo>>): void;
|
||||
|
||||
/**
|
||||
* Obtains information about all installed applications of a specified user.
|
||||
*
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
|
||||
* @param { number } appFlags - Indicates the flag used to specify information contained in the ApplicationInfo objects that will be returned.
|
||||
* @param { number } userId - Indicates the user ID or do not pass user ID.
|
||||
@ -879,6 +952,27 @@ declare namespace bundleManager {
|
||||
|
||||
/**
|
||||
* Query the AbilityInfo by the given Want. ohos.permission.GET_BUNDLE_INFO_PRIVILEGED is required for cross user access.
|
||||
*
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
|
||||
* @param { Want } want - Indicates the Want containing the application bundle name to be queried.
|
||||
* @param { number } abilityFlags - Indicates the flag used to specify information contained in the AbilityInfo objects that will be returned.
|
||||
* @param { AsyncCallback<Array<AbilityInfo>> } callback - The callback of querying ability info result.
|
||||
* @throws { BusinessError } 201 - Permission denied.
|
||||
* @throws { BusinessError } 202 - Permission denied, non-system app called system api.
|
||||
* @throws { BusinessError } 401 - The parameter check failed.
|
||||
* @throws { BusinessError } 17700001 - The specified bundleName is not found.
|
||||
* @throws { BusinessError } 17700003 - The specified ability is not found.
|
||||
* @throws { BusinessError } 17700026 - The specified bundle is disabled.
|
||||
* @throws { BusinessError } 17700029 - The specified ability is disabled.
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework.Core
|
||||
* @systemapi
|
||||
* @since 9
|
||||
*/
|
||||
function queryAbilityInfo(want: Want, abilityFlags: number, callback: AsyncCallback<Array<AbilityInfo>>): void;
|
||||
|
||||
/**
|
||||
* Query the AbilityInfo by the given Want. ohos.permission.GET_BUNDLE_INFO_PRIVILEGED is required for cross user access.
|
||||
*
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
|
||||
* @param { Want } want - Indicates the Want containing the application bundle name to be queried.
|
||||
* @param { number } abilityFlags - Indicates the flag used to specify information contained in the AbilityInfo objects that will be returned.
|
||||
@ -896,11 +990,12 @@ declare namespace bundleManager {
|
||||
* @systemapi
|
||||
* @since 9
|
||||
*/
|
||||
function queryAbilityInfo(want: Want, abilityFlags: number, callback: AsyncCallback<Array<AbilityInfo>>): void;
|
||||
function queryAbilityInfo(want: Want, abilityFlags: number, userId: number, callback: AsyncCallback<Array<AbilityInfo>>): void;
|
||||
function queryAbilityInfo(want: Want,
|
||||
abilityFlags: number, userId: number, callback: AsyncCallback<Array<AbilityInfo>>): void;
|
||||
|
||||
/**
|
||||
* Query the AbilityInfo by the given Want. ohos.permission.GET_BUNDLE_INFO_PRIVILEGED is required for cross user access.
|
||||
*
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
|
||||
* @param { Want } want - Indicates the Want containing the application bundle name to be queried.
|
||||
* @param { number } abilityFlags - Indicates the flag used to specify information contained in the AbilityInfo objects that will be returned.
|
||||
@ -922,6 +1017,28 @@ declare namespace bundleManager {
|
||||
|
||||
/**
|
||||
* Query extension info of by utilizing a Want. ohos.permission.GET_BUNDLE_INFO_PRIVILEGED is required for cross user access.
|
||||
*
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
|
||||
* @param { Want } want - Indicates the Want containing the application bundle name to be queried.
|
||||
* @param { ExtensionAbilityType } extensionAbilityType - Indicates ExtensionAbilityType.
|
||||
* @param { number } extensionAbilityFlags - Indicates the flag used to specify information contained in the ExtensionAbilityInfo objects that will be returned.
|
||||
* @param { AsyncCallback<Array<ExtensionAbilityInfo>> } callback - The callback of querying extension ability info result.
|
||||
* @throws { BusinessError } 201 - Permission denied.
|
||||
* @throws { BusinessError } 202 - Permission denied, non-system app called system api.
|
||||
* @throws { BusinessError } 401 - The parameter check failed.
|
||||
* @throws { BusinessError } 17700001 - The specified bundleName is not found.
|
||||
* @throws { BusinessError } 17700003 - The specified extensionAbility is not found.
|
||||
* @throws { BusinessError } 17700026 - The specified bundle is disabled.
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework.Core
|
||||
* @systemapi
|
||||
* @since 9
|
||||
*/
|
||||
function queryExtensionAbilityInfo(want: Want, extensionAbilityType: ExtensionAbilityType,
|
||||
extensionAbilityFlags: number, callback: AsyncCallback<Array<ExtensionAbilityInfo>>): void;
|
||||
|
||||
/**
|
||||
* Query extension info of by utilizing a Want. ohos.permission.GET_BUNDLE_INFO_PRIVILEGED is required for cross user access.
|
||||
*
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
|
||||
* @param { Want } want - Indicates the Want containing the application bundle name to be queried.
|
||||
* @param { ExtensionAbilityType } extensionAbilityType - Indicates ExtensionAbilityType.
|
||||
@ -939,11 +1056,12 @@ declare namespace bundleManager {
|
||||
* @systemapi
|
||||
* @since 9
|
||||
*/
|
||||
function queryExtensionAbilityInfo(want: Want, extensionAbilityType: ExtensionAbilityType, extensionAbilityFlags: number, callback: AsyncCallback<Array<ExtensionAbilityInfo>>): void;
|
||||
function queryExtensionAbilityInfo(want: Want, extensionAbilityType: ExtensionAbilityType, extensionAbilityFlags: number, userId: number, callback: AsyncCallback<Array<ExtensionAbilityInfo>>): void;
|
||||
function queryExtensionAbilityInfo(want: Want, extensionAbilityType: ExtensionAbilityType,
|
||||
extensionAbilityFlags: number, userId: number, callback: AsyncCallback<Array<ExtensionAbilityInfo>>): void;
|
||||
|
||||
/**
|
||||
* Query the ExtensionAbilityInfo by the given Want. ohos.permission.GET_BUNDLE_INFO_PRIVILEGED is required for cross user access.
|
||||
*
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
|
||||
* @param { Want } want - Indicates the Want containing the application bundle name to be queried.
|
||||
* @param { ExtensionAbilityType } extensionAbilityType - Indicates ExtensionAbilityType.
|
||||
@ -961,10 +1079,12 @@ declare namespace bundleManager {
|
||||
* @systemapi
|
||||
* @since 9
|
||||
*/
|
||||
function queryExtensionAbilityInfo(want: Want, extensionAbilityType: ExtensionAbilityType, extensionAbilityFlags: number, userId?: number): Promise<Array<ExtensionAbilityInfo>>;
|
||||
function queryExtensionAbilityInfo(want: Want, extensionAbilityType: ExtensionAbilityType,
|
||||
extensionAbilityFlags: number, userId?: number): Promise<Array<ExtensionAbilityInfo>>;
|
||||
|
||||
/**
|
||||
* Obtains bundle name by the given uid.
|
||||
*
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
|
||||
* @param { number } uid - Indicates the UID of an application.
|
||||
* @param { AsyncCallback<string> } callback - The callback of getting bundle name.
|
||||
@ -976,10 +1096,11 @@ declare namespace bundleManager {
|
||||
* @systemapi
|
||||
* @since 9
|
||||
*/
|
||||
function getBundleNameByUid(uid: number, callback: AsyncCallback<string>): void
|
||||
function getBundleNameByUid(uid: number, callback: AsyncCallback<string>): void;
|
||||
|
||||
/**
|
||||
* Obtains bundle name by the given uid.
|
||||
*
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
|
||||
* @param { number } uid - Indicates the UID of an application.
|
||||
* @returns { Promise<string> } Returns the bundle name.
|
||||
@ -995,6 +1116,7 @@ declare namespace bundleManager {
|
||||
|
||||
/**
|
||||
* Obtains information about an application bundle contained in an ohos Ability Package (HAP).
|
||||
*
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
|
||||
* @param { string } hapFilePath - Indicates the path storing the HAP. The path should be the relative path to the data directory of the current application.
|
||||
* @param { number } bundleFlags - Indicates the flag used to specify information contained in the BundleInfo object to be returned.
|
||||
@ -1007,10 +1129,11 @@ declare namespace bundleManager {
|
||||
* @systemapi
|
||||
* @since 9
|
||||
*/
|
||||
function getBundleArchiveInfo(hapFilePath: string, bundleFlags: number, callback: AsyncCallback<BundleInfo>): void
|
||||
function getBundleArchiveInfo(hapFilePath: string, bundleFlags: number, callback: AsyncCallback<BundleInfo>): void;
|
||||
|
||||
/**
|
||||
* Obtains information about an application bundle contained in an ohos Ability Package (HAP).
|
||||
*
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
|
||||
* @param { string } hapFilePath - Indicates the path storing the HAP. The path should be the relative path to the data directory of the current application.
|
||||
* @param { number } bundleFlags - Indicates the flag used to specify information contained in the BundleInfo object to be returned.
|
||||
@ -1023,10 +1146,11 @@ declare namespace bundleManager {
|
||||
* @systemapi
|
||||
* @since 9
|
||||
*/
|
||||
function getBundleArchiveInfo(hapFilePath: string, bundleFlags: number): Promise<BundleInfo>;
|
||||
function getBundleArchiveInfo(hapFilePath: string, bundleFlags: number): Promise<BundleInfo>;
|
||||
|
||||
/**
|
||||
* Clears cache data of a specified application.
|
||||
*
|
||||
* @permission ohos.permission.REMOVE_CACHE_FILES
|
||||
* @param { string } bundleName - Indicates the bundle name of the application whose cache data is to be cleaned.
|
||||
* @param { AsyncCallback<void> } callback - The callback of cleaning bundle cache files result.
|
||||
@ -1043,6 +1167,7 @@ declare namespace bundleManager {
|
||||
|
||||
/**
|
||||
* Clears cache data of a specified application.
|
||||
*
|
||||
* @permission ohos.permission.REMOVE_CACHE_FILES
|
||||
* @param { string } bundleName - Indicates the bundle name of the application whose cache data is to be cleaned.
|
||||
* @returns { Promise<void> } Clean bundle cache files result
|
||||
@ -1059,6 +1184,7 @@ declare namespace bundleManager {
|
||||
|
||||
/**
|
||||
* Sets whether to enable a specified application.
|
||||
*
|
||||
* @permission ohos.permission.CHANGE_ABILITY_ENABLED_STATE
|
||||
* @param { string } bundleName - Indicates the bundle name of the application.
|
||||
* @param { boolean } isEnabled - The value true means to enable it, and the value false means to disable it.
|
||||
@ -1075,6 +1201,7 @@ declare namespace bundleManager {
|
||||
|
||||
/**
|
||||
* Sets whether to enable a specified application.
|
||||
*
|
||||
* @permission ohos.permission.CHANGE_ABILITY_ENABLED_STATE
|
||||
* @param { string } bundleName - Indicates the bundle name of the application.
|
||||
* @param { boolean } isEnabled - The value true means to enable it, and the value false means to disable it.
|
||||
@ -1091,6 +1218,7 @@ declare namespace bundleManager {
|
||||
|
||||
/**
|
||||
* Sets whether to enable a specified ability.
|
||||
*
|
||||
* @permission ohos.permission.CHANGE_ABILITY_ENABLED_STATE
|
||||
* @param { AbilityInfo } abilityInfo - Indicates information about the ability to set.
|
||||
* @param { boolean } isEnabled - The value true means to enable it, and the value false means to disable it.
|
||||
@ -1108,6 +1236,7 @@ declare namespace bundleManager {
|
||||
|
||||
/**
|
||||
* Sets whether to enable a specified ability.
|
||||
*
|
||||
* @permission ohos.permission.CHANGE_ABILITY_ENABLED_STATE
|
||||
* @param { AbilityInfo } abilityInfo - Indicates information about the ability to set.
|
||||
* @param { boolean } isEnabled - The value true means to enable it, and the value false means to disable it.
|
||||
@ -1125,6 +1254,7 @@ declare namespace bundleManager {
|
||||
|
||||
/**
|
||||
* Checks whether a specified application is enabled.
|
||||
*
|
||||
* @param { string } bundleName - Indicates the bundle name of the application.
|
||||
* @param { AsyncCallback<boolean> } callback - The callback of checking application enabled result. The result is true if enabled, false otherwise.
|
||||
* @throws { BusinessError } 202 - Permission denied, non-system app called system api.
|
||||
@ -1138,8 +1268,9 @@ declare namespace bundleManager {
|
||||
|
||||
/**
|
||||
* Checks whether a specified application is enabled.
|
||||
*
|
||||
* @param { string } bundleName - Indicates the bundle name of the application.
|
||||
* @returns { Promise<boolean> } Returns true if the application is enabled; returns false otherwise.
|
||||
* @returns { Promise<boolean> } Returns true if the application is enabled; returns false otherwise.
|
||||
* @throws { BusinessError } 202 - Permission denied, non-system app called system api.
|
||||
* @throws { BusinessError } 401 - The parameter check failed.
|
||||
* @throws { BusinessError } 17700001 - The specified bundleName is not found.
|
||||
@ -1151,6 +1282,7 @@ declare namespace bundleManager {
|
||||
|
||||
/**
|
||||
* Checks whether a specified ability is enabled.
|
||||
*
|
||||
* @param { AbilityInfo } info - Indicates information about the ability to check.
|
||||
* @param { AsyncCallback<boolean> } callback - The callback of checking ability enabled result. The result is true if enabled, false otherwise.
|
||||
* @throws { BusinessError } 202 - Permission denied, non-system app called system api.
|
||||
@ -1165,6 +1297,7 @@ declare namespace bundleManager {
|
||||
|
||||
/**
|
||||
* Checks whether a specified ability is enabled.
|
||||
*
|
||||
* @param { AbilityInfo } info - Indicates information about the ability to check.
|
||||
* @returns { Promise<boolean> } Returns true if the ability is enabled; returns false otherwise.
|
||||
* @throws { BusinessError } 202 - Permission denied, non-system app called system api.
|
||||
@ -1177,10 +1310,11 @@ declare namespace bundleManager {
|
||||
*/
|
||||
function isAbilityEnabled(info: AbilityInfo): Promise<boolean>;
|
||||
|
||||
/**
|
||||
/**
|
||||
* Obtains the Want for starting the main ability of an application based on the
|
||||
* given bundle name. The main ability of an application is the ability that has the
|
||||
* #ACTION_HOME and #ENTITY_HOME Want filters set in the application's <b>config.json</b> or <b>module.json</b> file.
|
||||
*
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
|
||||
* @param { string } bundleName - Indicates the bundle name of the application.
|
||||
* @param { number } userId - Indicates the user ID or do not pass user ID.
|
||||
@ -1201,6 +1335,7 @@ declare namespace bundleManager {
|
||||
* Obtains the Want for starting the main ability of an application based on the
|
||||
* given bundle name. The main ability of an application is the ability that has the
|
||||
* #ACTION_HOME and #ENTITY_HOME Want filters set in the application's <b>config.json</b> or <b>module.json</b> file.
|
||||
*
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
|
||||
* @param { string } bundleName - Indicates the bundle name of the application.
|
||||
* @param { AsyncCallback<Want> } callback - The callback for starting the application's main ability.
|
||||
@ -1208,7 +1343,6 @@ declare namespace bundleManager {
|
||||
* @throws { BusinessError } 202 - Permission denied, non-system app called system api.
|
||||
* @throws { BusinessError } 401 - Input parameters check failed.
|
||||
* @throws { BusinessError } 17700001 - The specified bundleName is not found.
|
||||
* @throws { BusinessError } 17700004 - The specified user ID is not found.
|
||||
* @throws { BusinessError } 17700026 - The specified bundle is disabled.
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework.Core
|
||||
* @systemapi
|
||||
@ -1220,6 +1354,7 @@ declare namespace bundleManager {
|
||||
* Obtains the Want for starting the main ability of an application based on the
|
||||
* given bundle name. The main ability of an application is the ability that has the
|
||||
* #ACTION_HOME and #ENTITY_HOME Want filters set in the application's <b>config.json</b> or <b>module.json</b> file.
|
||||
*
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
|
||||
* @param { string } bundleName - Indicates the bundle name of the application.
|
||||
* @param { number } userId - Indicates the user ID or do not pass user ID.
|
||||
@ -1238,6 +1373,7 @@ declare namespace bundleManager {
|
||||
|
||||
/**
|
||||
* Obtains the profile designated by metadata name, abilityName and moduleName from the current application.
|
||||
*
|
||||
* @param { string } moduleName - Indicates the moduleName of the application.
|
||||
* @param { string } abilityName - Indicates the abilityName of the application.
|
||||
* @param { string } metadataName - Indicates the name of metadata in ability.
|
||||
@ -1255,6 +1391,7 @@ declare namespace bundleManager {
|
||||
|
||||
/**
|
||||
* Obtains the profile designated by metadata name, abilityName and moduleName from the current application.
|
||||
*
|
||||
* @param { string } moduleName - Indicates the moduleName of the application.
|
||||
* @param { string } abilityName - Indicates the abilityName of the application.
|
||||
* @param { string } metadataName - Indicates the name of metadata in ability.
|
||||
@ -1272,6 +1409,7 @@ declare namespace bundleManager {
|
||||
|
||||
/**
|
||||
* Obtains the profile designated by metadata name, extensionAbilityName and moduleName from the current application.
|
||||
*
|
||||
* @param { string } moduleName - Indicates the moduleName of the application.
|
||||
* @param { string } extensionAbilityName - Indicates the extensionAbilityName of the application.
|
||||
* @param { string } metadataName - Indicates the name of metadata in ability.
|
||||
@ -1288,6 +1426,7 @@ declare namespace bundleManager {
|
||||
|
||||
/**
|
||||
* Obtains the profile designated by metadata name, extensionAbilityName and moduleName from the current application.
|
||||
*
|
||||
* @param { string } moduleName - Indicates the moduleName of the application.
|
||||
* @param { string } extensionAbilityName - Indicates the extensionAbilityName of the application.
|
||||
* @param { string } metadataName - Indicates the name of metadata in ability.
|
||||
@ -1304,6 +1443,7 @@ declare namespace bundleManager {
|
||||
|
||||
/**
|
||||
* Get the permission details by permission name.
|
||||
*
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
|
||||
* @param { string } permissionName - Indicates permission name.
|
||||
* @param { AsyncCallback<PermissionDef> } callback - The callback of get permissionDef object result.
|
||||
@ -1319,6 +1459,7 @@ declare namespace bundleManager {
|
||||
|
||||
/**
|
||||
* Get the permission details by permission name.
|
||||
*
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
|
||||
* @param { string } permissionName - Indicates permission name.
|
||||
* @returns { Promise<PermissionDef> } Returns permissionDef object.
|
||||
@ -1334,6 +1475,7 @@ declare namespace bundleManager {
|
||||
|
||||
/**
|
||||
* Obtains the label of a specified ability.
|
||||
*
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
|
||||
* @param { string } bundleName - Indicates the bundle name of the application to which the ability belongs.
|
||||
* @param { string } moduleName - Indicates the module name.
|
||||
@ -1356,6 +1498,7 @@ declare namespace bundleManager {
|
||||
|
||||
/**
|
||||
* Obtains the label of a specified ability.
|
||||
*
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
|
||||
* @param { string } bundleName - Indicates the bundle name of the application to which the ability belongs.
|
||||
* @param { string } moduleName - Indicates the module name.
|
||||
@ -1378,11 +1521,12 @@ declare namespace bundleManager {
|
||||
|
||||
/**
|
||||
* Obtains applicationInfo based on a given bundleName and bundleFlags.
|
||||
*
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
|
||||
* @param { string } bundleName - Indicates the application bundle name to be queried.
|
||||
* @param { number } applicationFlags - Indicates the flag used to specify information contained in the ApplicationInfo object that will be returned.
|
||||
* @param { string } bundleName - Indicates the application bundle name to be queried.
|
||||
* @param { number } applicationFlags - Indicates the flag used to specify information contained in the ApplicationInfo object that will be returned.
|
||||
* @param { number } userId - Indicates the user ID or do not pass user ID.
|
||||
* @returns Returns the ApplicationInfo object.
|
||||
* @returns { ApplicationInfo } - Returns the ApplicationInfo object.
|
||||
* @throws { BusinessError } 201 - Permission denied.
|
||||
* @throws { BusinessError } 202 - Permission denied, non-system app called system api.
|
||||
* @throws { BusinessError } 401 - The parameter check failed.
|
||||
@ -1393,14 +1537,15 @@ declare namespace bundleManager {
|
||||
* @systemapi
|
||||
* @since 9
|
||||
*/
|
||||
function getApplicationInfoSync(bundleName: string, applicationFlags: number, userId: number) : ApplicationInfo;
|
||||
function getApplicationInfoSync(bundleName: string, applicationFlags: number, userId: number): ApplicationInfo;
|
||||
|
||||
/**
|
||||
* Obtains applicationInfo based on a given bundleName and bundleFlags.
|
||||
*
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
|
||||
* @param { string } bundleName - Indicates the application bundle name to be queried.
|
||||
* @param { number } applicationFlags - Indicates the flag used to specify information contained in the ApplicationInfo object that will be returned.
|
||||
* @returns Returns the ApplicationInfo object.
|
||||
* @param { string } bundleName - Indicates the application bundle name to be queried.
|
||||
* @param { number } applicationFlags - Indicates the flag used to specify information contained in the ApplicationInfo object that will be returned.
|
||||
* @returns { ApplicationInfo } - Returns the ApplicationInfo object.
|
||||
* @throws { BusinessError } 201 - Permission denied.
|
||||
* @throws { BusinessError } 202 - Permission denied, non-system app called system api.
|
||||
* @throws { BusinessError } 401 - The parameter check failed.
|
||||
@ -1410,15 +1555,16 @@ declare namespace bundleManager {
|
||||
* @systemapi
|
||||
* @since 9
|
||||
*/
|
||||
function getApplicationInfoSync(bundleName: string, applicationFlags: number) : ApplicationInfo;
|
||||
function getApplicationInfoSync(bundleName: string, applicationFlags: number): ApplicationInfo;
|
||||
|
||||
/**
|
||||
* Obtains bundleInfo based on bundleName, bundleFlags and options.
|
||||
* Obtains bundleInfo based on bundleName, bundleFlags and userId.
|
||||
*
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
|
||||
* @param { string } bundleName - Indicates the application bundle name to be queried.
|
||||
* @param { number } bundleFlags - Indicates the flag used to specify information contained in the BundleInfo object that will be returned.
|
||||
* @param { number } userId - Indicates the user ID or do not pass user ID.
|
||||
* @returns Returns the BundleInfo object.
|
||||
* @returns { BundleInfo } - Returns the BundleInfo object.
|
||||
* @throws { BusinessError } 201 - Permission denied.
|
||||
* @throws { BusinessError } 202 - Permission denied, non-system app called system api.
|
||||
* @throws { BusinessError } 401 - The parameter check failed.
|
||||
@ -1429,14 +1575,15 @@ declare namespace bundleManager {
|
||||
* @systemapi
|
||||
* @since 9
|
||||
*/
|
||||
function getBundleInfoSync(bundleName: string, bundleFlags: number, userId: number): BundleInfo;
|
||||
function getBundleInfoSync(bundleName: string, bundleFlags: number, userId: number): BundleInfo;
|
||||
|
||||
/**
|
||||
* Obtains bundleInfo based on bundleName, bundleFlags and options.
|
||||
* Obtains bundleInfo based on bundleName, bundleFlags.
|
||||
*
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
|
||||
* @param { string } bundleName - Indicates the application bundle name to be queried.
|
||||
* @param { number } bundleFlags - Indicates the flag used to specify information contained in the BundleInfo object that will be returned.
|
||||
* @returns Returns the BundleInfo object.
|
||||
* @returns { BundleInfo } - Returns the BundleInfo object.
|
||||
* @throws { BusinessError } 201 - Permission denied.
|
||||
* @throws { BusinessError } 202 - Permission denied, non-system app called system api.
|
||||
* @throws { BusinessError } 401 - The parameter check failed.
|
||||
@ -1446,10 +1593,11 @@ declare namespace bundleManager {
|
||||
* @systemapi
|
||||
* @since 9
|
||||
*/
|
||||
function getBundleInfoSync(bundleName: string, bundleFlags: number): BundleInfo;
|
||||
function getBundleInfoSync(bundleName: string, bundleFlags: number): BundleInfo;
|
||||
|
||||
/**
|
||||
* Obtains SharedBundleInfo of all shared bundle available in the system.
|
||||
*
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
|
||||
* @param { AsyncCallback<Array<SharedBundleInfo>> } callback - The callback of getting a list of SharedBundleInfo objects.
|
||||
* @throws { BusinessError } 201 - Permission denied.
|
||||
@ -1462,6 +1610,7 @@ declare namespace bundleManager {
|
||||
|
||||
/**
|
||||
* Obtains SharedBundleInfo of all shared bundle available in the system.
|
||||
*
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
|
||||
* @returns { Promise<Array<SharedBundleInfo>> } Returns a list of SharedBundleInfo objects.
|
||||
* @throws { BusinessError } 201 - Permission denied.
|
||||
@ -1474,6 +1623,7 @@ declare namespace bundleManager {
|
||||
|
||||
/**
|
||||
* Obtains SharedBundleInfo of shared bundle by bundle name and module name.
|
||||
*
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
|
||||
* @param { string } bundleName - Indicates the bundleName of the application.
|
||||
* @param { string } moduleName - Indicates the moduleName of the application.
|
||||
@ -1491,6 +1641,7 @@ declare namespace bundleManager {
|
||||
|
||||
/**
|
||||
* Obtains SharedBundleInfo of shared bundle by bundle name and module name.
|
||||
*
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
|
||||
* @param { string } bundleName - Indicates the bundleName of the application.
|
||||
* @param { string } moduleName - Indicates the moduleName of the application.
|
||||
@ -1508,6 +1659,7 @@ declare namespace bundleManager {
|
||||
|
||||
/**
|
||||
* Obtains configuration information about an application.
|
||||
*
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework.Core
|
||||
* @since 9
|
||||
*/
|
||||
@ -1515,6 +1667,7 @@ declare namespace bundleManager {
|
||||
|
||||
/**
|
||||
* Indicates the Metadata.
|
||||
*
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework.Core
|
||||
* @since 9
|
||||
*/
|
||||
@ -1522,6 +1675,7 @@ declare namespace bundleManager {
|
||||
|
||||
/**
|
||||
* Obtains configuration information about a bundle.
|
||||
*
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework.Core
|
||||
* @since 9
|
||||
*/
|
||||
@ -1529,6 +1683,7 @@ declare namespace bundleManager {
|
||||
|
||||
/**
|
||||
* The scene which is used.
|
||||
*
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework.Core
|
||||
* @since 9
|
||||
*/
|
||||
@ -1536,13 +1691,15 @@ declare namespace bundleManager {
|
||||
|
||||
/**
|
||||
* Indicates the required permissions details defined in file config.json.
|
||||
*
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework.Core
|
||||
* @since 9
|
||||
*/
|
||||
export type ReqPermissionDetail = _BundleInfo.ReqPermissionDetail;
|
||||
|
||||
/**
|
||||
/**
|
||||
* Indicates the SignatureInfo.
|
||||
*
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework.Core
|
||||
* @since 9
|
||||
*/
|
||||
@ -1550,6 +1707,7 @@ declare namespace bundleManager {
|
||||
|
||||
/**
|
||||
* Obtains configuration information about a module.
|
||||
*
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework.Core
|
||||
* @since 9
|
||||
*/
|
||||
@ -1557,6 +1715,7 @@ declare namespace bundleManager {
|
||||
|
||||
/**
|
||||
* Obtains preload information about a module.
|
||||
*
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework.Core
|
||||
* @since 9
|
||||
*/
|
||||
@ -1564,6 +1723,7 @@ declare namespace bundleManager {
|
||||
|
||||
/**
|
||||
* Obtains dependency information about a module.
|
||||
*
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework.Core
|
||||
* @since 9
|
||||
*/
|
||||
@ -1571,6 +1731,7 @@ declare namespace bundleManager {
|
||||
|
||||
/**
|
||||
* Obtains configuration information about an ability.
|
||||
*
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework.Core
|
||||
* @since 9
|
||||
*/
|
||||
@ -1578,6 +1739,7 @@ declare namespace bundleManager {
|
||||
|
||||
/**
|
||||
* Contains basic Ability information. Indicates the window size..
|
||||
*
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework.Core
|
||||
* @since 9
|
||||
*/
|
||||
@ -1585,6 +1747,7 @@ declare namespace bundleManager {
|
||||
|
||||
/**
|
||||
* Obtains extension information about a bundle.
|
||||
*
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework.Core
|
||||
* @since 9
|
||||
*/
|
||||
@ -1592,6 +1755,7 @@ declare namespace bundleManager {
|
||||
|
||||
/**
|
||||
* Indicates the defined permission details in file config.json.
|
||||
*
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework.Core
|
||||
* @systemapi
|
||||
* @since 9
|
||||
@ -1600,6 +1764,7 @@ declare namespace bundleManager {
|
||||
|
||||
/**
|
||||
* Contains basic Ability information, which uniquely identifies an ability.
|
||||
*
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework.Core
|
||||
* @since 9
|
||||
*/
|
||||
@ -1607,6 +1772,7 @@ declare namespace bundleManager {
|
||||
|
||||
/**
|
||||
* Contains shared bundle info.
|
||||
*
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework.Core
|
||||
* @systemapi
|
||||
* @since 10
|
||||
|
573
api/@ohos.bundle.d.ts
vendored
573
api/@ohos.bundle.d.ts
vendored
@ -34,6 +34,7 @@ import { BundleInstaller } from './bundle/bundleInstaller';
|
||||
*/
|
||||
declare namespace bundle {
|
||||
/**
|
||||
* @enum { number }
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @since 7
|
||||
* @deprecated since 9
|
||||
@ -82,6 +83,7 @@ declare namespace bundle {
|
||||
}
|
||||
|
||||
/**
|
||||
* @enum { number }
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @since 7
|
||||
* @deprecated since 9
|
||||
@ -94,6 +96,7 @@ declare namespace bundle {
|
||||
}
|
||||
|
||||
/**
|
||||
* @enum { number }
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @since 7
|
||||
* @deprecated since 9
|
||||
@ -106,6 +109,7 @@ declare namespace bundle {
|
||||
}
|
||||
|
||||
/**
|
||||
* @enum { number }
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @since 7
|
||||
* @deprecated since 9
|
||||
@ -147,6 +151,7 @@ declare namespace bundle {
|
||||
}
|
||||
|
||||
/**
|
||||
* @enum { number }
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @since 7
|
||||
* @deprecated since 9
|
||||
@ -158,6 +163,7 @@ declare namespace bundle {
|
||||
}
|
||||
|
||||
/**
|
||||
* @enum { number }
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @since 7
|
||||
* @deprecated since 9
|
||||
@ -199,6 +205,7 @@ declare namespace bundle {
|
||||
}
|
||||
|
||||
/**
|
||||
* @enum { number }
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @since 7
|
||||
* @deprecated since 9
|
||||
@ -240,6 +247,7 @@ declare namespace bundle {
|
||||
}
|
||||
|
||||
/**
|
||||
* @enum { number }
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @since 7
|
||||
* @deprecated since 9
|
||||
@ -306,148 +314,343 @@ declare namespace bundle {
|
||||
/**
|
||||
* Obtains bundleInfo based on bundleName, bundleFlags and options.
|
||||
*
|
||||
* @since 7
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @param bundleName Indicates the application bundle name to be queried.
|
||||
* @param bundleFlags Indicates the application bundle flags to be queried.
|
||||
* @param options Indicates the bundle options object.
|
||||
* @returns Returns the BundleInfo object.
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
|
||||
* @param { string } bundleName - Indicates the application bundle name to be queried.
|
||||
* @param { number } bundleFlags - Indicates the application bundle flags to be queried.
|
||||
* @param { BundleOptions } options Indicates the bundle options object.
|
||||
* @param { AsyncCallback<BundleInfo> } callback
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @since 7
|
||||
* @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;
|
||||
function getBundleInfo(bundleName: string, bundleFlags: number, options?: BundleOptions): Promise<BundleInfo>;
|
||||
function getBundleInfo(bundleName: string,
|
||||
bundleFlags: number, options: BundleOptions, callback: AsyncCallback<BundleInfo>): void;
|
||||
|
||||
/**
|
||||
* Obtains bundleInfo based on bundleName, bundleFlags and options.
|
||||
*
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
|
||||
* @param { string } bundleName - Indicates the application bundle name to be queried.
|
||||
* @param { number } bundleFlags - Indicates the application bundle flags to be queried.
|
||||
* @param { AsyncCallback<BundleInfo> } callback
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @since 7
|
||||
* @deprecated since 9
|
||||
* @useinstead ohos.bundle.bundleManager#getBundleInfo
|
||||
*/
|
||||
function getBundleInfo(bundleName: string, bundleFlags: number, callback: AsyncCallback<BundleInfo>): void;
|
||||
|
||||
/**
|
||||
* Obtains bundleInfo based on bundleName, bundleFlags and options.
|
||||
*
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
|
||||
* @param { string } bundleName - Indicates the application bundle name to be queried.
|
||||
* @param { number } bundleFlags - Indicates the application bundle flags to be queried.
|
||||
* @param { BundleOptions } options Indicates the bundle options object.
|
||||
* @returns { Promise<BundleInfo> } Returns the BundleInfo object.
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @since 7
|
||||
* @deprecated since 9
|
||||
* @useinstead ohos.bundle.bundleManager#getBundleInfo
|
||||
*/
|
||||
function getBundleInfo(bundleName: string, bundleFlags: number, options?: BundleOptions): Promise<BundleInfo>;
|
||||
|
||||
/**
|
||||
* Obtains the interface used to install bundles.
|
||||
*
|
||||
* @since 7
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @returns Returns the IBundleInstaller interface.
|
||||
* @permission ohos.permission.INSTALL_BUNDLE
|
||||
* @param { AsyncCallback<BundleInstaller> } callback
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @systemapi Hide this for inner system use
|
||||
* @since 7
|
||||
* @deprecated since 9
|
||||
* @useinstead ohos.bundle.installer#getBundleInstaller
|
||||
*/
|
||||
function getBundleInstaller(callback: AsyncCallback<BundleInstaller>): void;
|
||||
|
||||
/**
|
||||
* Obtains the interface used to install bundles.
|
||||
*
|
||||
* @permission ohos.permission.INSTALL_BUNDLE
|
||||
* @returns { Promise<BundleInstaller> } Returns the IBundleInstaller interface.
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @systemapi Hide this for inner system use
|
||||
* @since 7
|
||||
* @deprecated since 9
|
||||
* @useinstead ohos.bundle.installer#getBundleInstaller
|
||||
*/
|
||||
function getBundleInstaller(): Promise<BundleInstaller>;
|
||||
|
||||
/**
|
||||
* Obtains information about the current ability.
|
||||
*
|
||||
* @since 7
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @param bundleName Indicates the application bundle name to be queried.
|
||||
* @param abilityName Indicates the ability name.
|
||||
* @returns Returns the AbilityInfo object for the current ability.
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
|
||||
* @param { string } bundleName - Indicates the application bundle name to be queried.
|
||||
* @param { string } abilityName - Indicates the ability name.
|
||||
* @param { AsyncCallback<AbilityInfo> } callback
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @since 7
|
||||
* @deprecated since 9
|
||||
* @useinstead ohos.bundle.bundleManager#queryAbilityInfo
|
||||
*/
|
||||
function getAbilityInfo(bundleName: string, abilityName: string, callback: AsyncCallback<AbilityInfo>): void;
|
||||
|
||||
/**
|
||||
* Obtains information about the current ability.
|
||||
*
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
|
||||
* @param { string } bundleName - Indicates the application bundle name to be queried.
|
||||
* @param { string } abilityName - Indicates the ability name.
|
||||
* @returns { Promise<AbilityInfo> } Returns the AbilityInfo object for the current ability.
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @since 7
|
||||
* @deprecated since 9
|
||||
* @useinstead ohos.bundle.bundleManager#queryAbilityInfo
|
||||
*/
|
||||
function getAbilityInfo(bundleName: string, abilityName: string): Promise<AbilityInfo>;
|
||||
|
||||
/**
|
||||
* Obtains based on a given bundle name.
|
||||
*
|
||||
* @since 7
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @param bundleName Indicates the application bundle name to be queried.
|
||||
* @param bundleFlags Indicates the flag used to specify information contained in the ApplicationInfo object
|
||||
* that will be returned.
|
||||
* @param userId Indicates the user ID or do not pass user ID.
|
||||
* @returns Returns the ApplicationInfo object.
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
|
||||
* @param { string } bundleName - Indicates the application bundle name to be queried.
|
||||
* @param { number } bundleFlags - Indicates the flag used to specify information contained
|
||||
* in the ApplicationInfo object that will be returned.
|
||||
* @param { number } userId - Indicates the user ID or do not pass user ID.
|
||||
* @param { AsyncCallback<ApplicationInfo> } callback
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @since 7
|
||||
* @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;
|
||||
function getApplicationInfo(bundleName: string, bundleFlags: number, userId?: number) : Promise<ApplicationInfo>;
|
||||
function getApplicationInfo(bundleName: string,
|
||||
bundleFlags: number, userId: number, callback: AsyncCallback<ApplicationInfo>) : void;
|
||||
|
||||
/**
|
||||
* Obtains based on a given bundle name.
|
||||
*
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
|
||||
* @param { string } bundleName - Indicates the application bundle name to be queried.
|
||||
* @param { number } bundleFlags - Indicates the flag used to specify information contained
|
||||
* in the ApplicationInfo object that will be returned.
|
||||
* @param { AsyncCallback<ApplicationInfo> } callback
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @since 7
|
||||
* @deprecated since 9
|
||||
* @useinstead ohos.bundle.bundleManager#getApplicationInfo
|
||||
*/
|
||||
function getApplicationInfo(bundleName: string, bundleFlags: number, callback: AsyncCallback<ApplicationInfo>): void;
|
||||
|
||||
/**
|
||||
* Obtains based on a given bundle name.
|
||||
*
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
|
||||
* @param { string } bundleName - Indicates the application bundle name to be queried.
|
||||
* @param { number } bundleFlags - Indicates the flag used to specify information contained
|
||||
* in the ApplicationInfo object that will be returned.
|
||||
* @param { number } userId - Indicates the user ID or do not pass user ID.
|
||||
* @returns { Promise<ApplicationInfo> } Returns the ApplicationInfo object.
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @since 7
|
||||
* @deprecated since 9
|
||||
* @useinstead ohos.bundle.bundleManager#getApplicationInfo
|
||||
*/
|
||||
function getApplicationInfo(bundleName: string, bundleFlags: number, userId?: number): Promise<ApplicationInfo>;
|
||||
|
||||
/**
|
||||
* Query the AbilityInfo by the given Want.
|
||||
*
|
||||
* @since 7
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @param want Indicates the Want containing the application bundle name to
|
||||
* be queried.
|
||||
* @param bundleFlags Indicates the flag used to specify information contained in the AbilityInfo objects that
|
||||
* will be returned.
|
||||
* @param userId Indicates the user ID.
|
||||
* @returns Returns a list of AbilityInfo objects.
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
|
||||
* @param { Want } want - Indicates the Want containing the application bundle name
|
||||
* to be queried.
|
||||
* @param { number } bundleFlags - Indicates the flag used to specify information contained in the AbilityInfo objects that
|
||||
* will be returned.
|
||||
* @param { number } userId - Indicates the user ID.
|
||||
* @param { AsyncCallback<Array<AbilityInfo>> } callback
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @since 7
|
||||
* @deprecated since 9
|
||||
* @useinstead ohos.bundle.bundleManager#queryAbilityInfo
|
||||
*/
|
||||
function queryAbilityByWant(want: Want,
|
||||
bundleFlags: number, userId: number, callback: AsyncCallback<Array<AbilityInfo>>): void;
|
||||
|
||||
/**
|
||||
* Query the AbilityInfo by the given Want.
|
||||
*
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
|
||||
* @param { Want } want - Indicates the Want containing the application bundle name
|
||||
* to be queried.
|
||||
* @param { number } bundleFlags - Indicates the flag used to specify information contained in the AbilityInfo objects that
|
||||
* will be returned.
|
||||
* @param { AsyncCallback<Array<AbilityInfo>> } callback
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @since 7
|
||||
* @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;
|
||||
function queryAbilityByWant(want: Want, bundleFlags: number, userId?:number): Promise<Array<AbilityInfo>>;
|
||||
|
||||
/**
|
||||
* Query the AbilityInfo by the given Want.
|
||||
*
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
|
||||
* @param { Want } want - Indicates the Want containing the application bundle name
|
||||
* to be queried.
|
||||
* @param { number } bundleFlags - Indicates the flag used to specify information contained in the AbilityInfo objects that
|
||||
* will be returned.
|
||||
* @param { number } userId - Indicates the user ID.
|
||||
* @returns { Promise<Array<AbilityInfo>> } Returns a list of AbilityInfo objects.
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @since 7
|
||||
* @deprecated since 9
|
||||
* @useinstead ohos.bundle.bundleManager#queryAbilityInfo
|
||||
*/
|
||||
function queryAbilityByWant(want: Want, bundleFlags: number, userId?: number): Promise<Array<AbilityInfo>>;
|
||||
|
||||
/**
|
||||
* Obtains BundleInfo of all bundles available in the system.
|
||||
*
|
||||
* @since 7
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @param bundleFlag Indicates the flag used to specify information contained in the BundleInfo that will be
|
||||
* returned.
|
||||
* @param userId Indicates the user id.
|
||||
* @returns Returns a list of BundleInfo objects.
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
|
||||
* @param { BundleFlag } bundleFlag - Indicates the flag used to specify information contained
|
||||
* in the BundleInfo that will be returned.
|
||||
* @param { number } userId - Indicates the user ID.
|
||||
* @param { AsyncCallback<Array<BundleInfo>> } callback
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @since 7
|
||||
* @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;
|
||||
function getAllBundleInfo(bundleFlag: BundleFlag, userId?: number) : Promise<Array<BundleInfo>>;
|
||||
function getAllBundleInfo(bundleFlag: BundleFlag, userId: number, callback: AsyncCallback<Array<BundleInfo>>): void;
|
||||
|
||||
/**
|
||||
* Obtains BundleInfo of all bundles available in the system.
|
||||
*
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
|
||||
* @param { BundleFlag } bundleFlag - Indicates the flag used to specify information contained
|
||||
* in the BundleInfo that will be returned.
|
||||
* @param { AsyncCallback<Array<BundleInfo>> } callback
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @since 7
|
||||
* @deprecated since 9
|
||||
* @useinstead ohos.bundle.bundleManager#getAllBundleInfo
|
||||
*/
|
||||
function getAllBundleInfo(bundleFlag: BundleFlag, callback: AsyncCallback<Array<BundleInfo>>): void;
|
||||
|
||||
/**
|
||||
* Obtains BundleInfo of all bundles available in the system.
|
||||
*
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
|
||||
* @param { BundleFlag } bundleFlag - Indicates the flag used to specify information contained
|
||||
* in the BundleInfo that will be returned.
|
||||
* @param { number } userId - Indicates the user ID.
|
||||
* @returns { Promise<Array<BundleInfo>> } Returns a list of BundleInfo objects.
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @since 7
|
||||
* @deprecated since 9
|
||||
* @useinstead ohos.bundle.bundleManager#getAllBundleInfo
|
||||
*/
|
||||
function getAllBundleInfo(bundleFlag: BundleFlag, userId?: number): Promise<Array<BundleInfo>>;
|
||||
|
||||
/**
|
||||
* Obtains information about all installed applications of a specified user.
|
||||
*
|
||||
* @since 7
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @param bundleFlags Indicates the flag used to specify information contained in the ApplicationInfo objects
|
||||
* that will be returned.
|
||||
* @param userId Indicates the user ID or do not pass user ID.
|
||||
* @returns Returns a list of ApplicationInfo objects.
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
|
||||
* @param { number } bundleFlags - Indicates the flag used to specify information contained
|
||||
* in the ApplicationInfo objects that will be returned.
|
||||
* @param { number } userId - Indicates the user ID.
|
||||
* @param { AsyncCallback<Array<ApplicationInfo>> } callback
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @since 7
|
||||
* @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;
|
||||
function getAllApplicationInfo(bundleFlags: number, userId?: number) : Promise<Array<ApplicationInfo>>;
|
||||
function getAllApplicationInfo(bundleFlags: number,
|
||||
userId: number, callback: AsyncCallback<Array<ApplicationInfo>>) : void;
|
||||
|
||||
/**
|
||||
* Obtains information about all installed applications of a specified user.
|
||||
*
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
|
||||
* @param { number } bundleFlags - Indicates the flag used to specify information contained
|
||||
* in the ApplicationInfo objects that will be returned.
|
||||
* @param { AsyncCallback<Array<ApplicationInfo>> } callback
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @since 7
|
||||
* @deprecated since 9
|
||||
* @useinstead ohos.bundle.bundleManager#getAllApplicationInfo
|
||||
*/
|
||||
function getAllApplicationInfo(bundleFlags: number, callback: AsyncCallback<Array<ApplicationInfo>>): void;
|
||||
|
||||
/**
|
||||
* Obtains information about all installed applications of a specified user.
|
||||
*
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
|
||||
* @param { number } bundleFlags - Indicates the flag used to specify information contained
|
||||
* in the ApplicationInfo objects that will be returned.
|
||||
* @param { number } userId - Indicates the user ID or do not pass user ID.
|
||||
* @returns { Promise<Array<ApplicationInfo>> } Returns a list of ApplicationInfo objects.
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @since 7
|
||||
* @deprecated since 9
|
||||
* @useinstead ohos.bundle.bundleManager#getAllApplicationInfo
|
||||
*/
|
||||
function getAllApplicationInfo(bundleFlags: number, userId?: number): Promise<Array<ApplicationInfo>>;
|
||||
|
||||
/**
|
||||
* Obtains bundle name by the given uid.
|
||||
*
|
||||
* @since 8
|
||||
* @param { number } uid - Indicates the UID of an application.
|
||||
* @param { AsyncCallback<string> } callback
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @param uid Indicates the UID of an application.
|
||||
* @returns Returns the bundle name.
|
||||
* @since 8
|
||||
* @deprecated since 9
|
||||
* @useinstead ohos.bundle.bundleManager#getNameForUid
|
||||
*/
|
||||
function getNameForUid(uid: number, callback: AsyncCallback<string>) : void
|
||||
function getNameForUid(uid: number) : Promise<string>;
|
||||
function getNameForUid(uid: number, callback: AsyncCallback<string>): void;
|
||||
|
||||
/**
|
||||
* Obtains bundle name by the given uid.
|
||||
*
|
||||
* @param { number } uid - Indicates the UID of an application.
|
||||
* @returns { Promise<string> } Returns the bundle name.
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @since 8
|
||||
* @deprecated since 9
|
||||
* @useinstead ohos.bundle.bundleManager#getNameForUid
|
||||
*/
|
||||
function getNameForUid(uid: number): Promise<string>;
|
||||
|
||||
/**
|
||||
* Obtains information about an application bundle contained in an ohos Ability Package (HAP).
|
||||
*
|
||||
* @since 7
|
||||
* @param { string } hapFilePath - Indicates the path storing the HAP. The path should be the relative path
|
||||
* to the data directory of the current application.
|
||||
* @param { number } bundleFlags - Indicates the flag used to specify information contained in the
|
||||
* BundleInfo object to be returned.
|
||||
* @param { AsyncCallback<BundleInfo> } callback
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @param hapFilePath Indicates the path storing the HAP. The path should be the relative path to the data
|
||||
* directory of the current application.
|
||||
* @param bundleFlags Indicates the flag used to specify information contained in the BundleInfo object to be
|
||||
* returned.
|
||||
* @returns Returns the BundleInfo object.
|
||||
* @since 7
|
||||
* @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>;
|
||||
function getBundleArchiveInfo(hapFilePath: string, bundleFlags: number, callback: AsyncCallback<BundleInfo>): void;
|
||||
|
||||
/**
|
||||
* Obtains information about an application bundle contained in an ohos Ability Package (HAP).
|
||||
*
|
||||
* @param { string } hapFilePath - Indicates the path storing the HAP. The path should be the relative path
|
||||
* to the data directory of the current application.
|
||||
* @param { number } bundleFlags - Indicates the flag used to specify information contained in the
|
||||
* BundleInfo object to be returned.
|
||||
* @returns { Promise<BundleInfo> } - Returns the BundleInfo object.
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @since 7
|
||||
* @deprecated since 9
|
||||
* @useinstead ohos.bundle.bundleManager#getBundleArchiveInfo
|
||||
*/
|
||||
function getBundleArchiveInfo(hapFilePath: string, bundleFlags: number): Promise<BundleInfo>;
|
||||
|
||||
/**
|
||||
* Obtains the Want for starting the main ability of an application based on the
|
||||
@ -455,134 +658,254 @@ declare namespace bundle {
|
||||
* #ACTION_HOME and #ENTITY_HOME Want
|
||||
* filters set in the application's <b>config.json</b> file.
|
||||
*
|
||||
* @since 7
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @param bundleName Indicates the bundle name of the application.
|
||||
* @returns Returns the Want for starting the application's main ability if any; returns null if
|
||||
* the given bundle does not exist or does not contain any main ability.
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
|
||||
* @param { string } bundleName - Indicates the bundle name of the application.
|
||||
* @param { AsyncCallback<Want> } callback
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @since 7
|
||||
* @deprecated since 9
|
||||
* @useinstead ohos.bundle.bundleManager#getLaunchWantForBundle
|
||||
*/
|
||||
function getLaunchWantForBundle(bundleName: string, callback: AsyncCallback<Want>): void;
|
||||
|
||||
/**
|
||||
* Obtains the Want for starting the main ability of an application based on the
|
||||
* given bundle name. The main ability of an application is the ability that has the
|
||||
* #ACTION_HOME and #ENTITY_HOME Want
|
||||
* filters set in the application's <b>config.json</b> file.
|
||||
*
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
|
||||
* @param { string } bundleName - Indicates the bundle name of the application.
|
||||
* @returns { Promise<Want> } Returns the Want for starting the application's main ability if any.
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @since 7
|
||||
* @deprecated since 9
|
||||
* @useinstead ohos.bundle.bundleManager#getLaunchWantForBundle
|
||||
*/
|
||||
function getLaunchWantForBundle(bundleName: string): Promise<Want>;
|
||||
|
||||
/**
|
||||
* Clears cache data of a specified application.
|
||||
*
|
||||
* @since 8
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @param bundleName Indicates the bundle name of the application whose cache data is to be cleared.
|
||||
* @param callback Indicates the callback to be invoked for returning the operation result.
|
||||
* @permission ohos.permission.REMOVE_CACHE_FILES
|
||||
* @param { string } bundleName - Indicates the bundle name of the application whose cache data is to be cleared.
|
||||
* @param { AsyncCallback<void> } callback Indicates the callback to be invoked for returning the operation result.
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @systemapi Hide this for inner system use
|
||||
* @since 8
|
||||
* @deprecated since 9
|
||||
* @useinstead ohos.bundle.bundleManager#cleanBundleCacheFiles
|
||||
*/
|
||||
function cleanBundleCacheFiles(bundleName: string, callback: AsyncCallback<void>): void;
|
||||
|
||||
/**
|
||||
* Clears cache data of a specified application.
|
||||
*
|
||||
* @permission ohos.permission.REMOVE_CACHE_FILES
|
||||
* @param { string } bundleName - Indicates the bundle name of the application whose cache data is to be cleared.
|
||||
* @returns { Promise<void> }
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @systemapi Hide this for inner system use
|
||||
* @since 8
|
||||
* @deprecated since 9
|
||||
* @useinstead ohos.bundle.bundleManager#cleanBundleCacheFiles
|
||||
*/
|
||||
function cleanBundleCacheFiles(bundleName: string): Promise<void>;
|
||||
|
||||
/**
|
||||
* Sets whether to enable a specified application.
|
||||
*
|
||||
* @since 8
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @param bundleName Indicates the bundle name of the application.
|
||||
* @param isEnable Specifies whether to enable the application. The value true means to enable it, and the
|
||||
* value false means to disable it.
|
||||
* @permission ohos.permission.CHANGE_ABILITY_ENABLED_STATE
|
||||
* @param { string } bundleName - Indicates the bundle name of the application.
|
||||
* @param { boolean } isEnable - Specifies whether to enable the application. The value true means to enable it,
|
||||
* and the value false means to disable it.
|
||||
* @param { AsyncCallback<void> } callback
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @systemapi Hide this for inner system use
|
||||
* @since 8
|
||||
* @deprecated since 9
|
||||
* @useinstead ohos.bundle.bundleManager#setApplicationEnabled
|
||||
*/
|
||||
function setApplicationEnabled(bundleName: string, isEnable: boolean, callback: AsyncCallback<void>): void;
|
||||
|
||||
/**
|
||||
* Sets whether to enable a specified application.
|
||||
*
|
||||
* @permission ohos.permission.CHANGE_ABILITY_ENABLED_STATE
|
||||
* @param { string } bundleName - Indicates the bundle name of the application.
|
||||
* @param { boolean } isEnable - Specifies whether to enable the application. The value true means to enable it,
|
||||
* and the value false means to disable it.
|
||||
* @returns { Promise<void> }
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @systemapi Hide this for inner system use
|
||||
* @since 8
|
||||
* @deprecated since 9
|
||||
* @useinstead ohos.bundle.bundleManager#setApplicationEnabled
|
||||
*/
|
||||
function setApplicationEnabled(bundleName: string, isEnable: boolean): Promise<void>;
|
||||
|
||||
/**
|
||||
* Sets whether to enable a specified ability.
|
||||
*
|
||||
* @since 8
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @param abilityInfo Indicates information about the ability to set.
|
||||
* @param isEnable Specifies whether to enable the ability. The value true means to enable it, and the
|
||||
* value false means to disable it..
|
||||
* @permission ohos.permission.CHANGE_ABILITY_ENABLED_STATE
|
||||
* @param { AbilityInfo } info - Indicates information about the ability to set.
|
||||
* @param { boolean } isEnable - Specifies whether to enable the application. The value true means to enable it,
|
||||
* and the value false means to disable it.
|
||||
* @param { AsyncCallback<void> } callback
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @systemapi Hide this for inner system use
|
||||
* @since 8
|
||||
* @deprecated since 9
|
||||
* @useinstead ohos.bundle.bundleManager#setAbilityEnabled
|
||||
*/
|
||||
function setAbilityEnabled(info: AbilityInfo, isEnable: boolean, callback: AsyncCallback<void>): void;
|
||||
|
||||
/**
|
||||
* Sets whether to enable a specified ability.
|
||||
*
|
||||
* @permission ohos.permission.CHANGE_ABILITY_ENABLED_STATE
|
||||
* @param { AbilityInfo } info - Indicates information about the ability to set.
|
||||
* @param { boolean } isEnable - Specifies whether to enable the application. The value true means to enable it,
|
||||
* and the value false means to disable it.
|
||||
* @returns { Promise<void> }
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @systemapi Hide this for inner system use
|
||||
* @since 8
|
||||
* @deprecated since 9
|
||||
* @useinstead ohos.bundle.bundleManager#setAbilityEnabled
|
||||
*/
|
||||
function setAbilityEnabled(info: AbilityInfo, isEnable: boolean): Promise<void>;
|
||||
|
||||
/**
|
||||
* Get the permission details by permissionName.
|
||||
*
|
||||
* @since 8
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @param permissionName Indicates permission name.
|
||||
* @returns Returns permissionDef object.
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
|
||||
* @param { string } permissionName - Indicates permission name.
|
||||
* @param { AsyncCallback<PermissionDef> } callback
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @systemapi
|
||||
* @since 8
|
||||
* @deprecated since 9
|
||||
* @useinstead ohos.bundle.bundleManager#getPermissionDef
|
||||
*/
|
||||
function getPermissionDef(permissionName: string, callback: AsyncCallback<PermissionDef>): void;
|
||||
|
||||
/**
|
||||
* Get the permission details by permissionName.
|
||||
*
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
|
||||
* @param { string } permissionName - Indicates permission name.
|
||||
* @returns { Promise<PermissionDef> } Returns permissionDef object.
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @systemapi
|
||||
* @since 8
|
||||
* @deprecated since 9
|
||||
* @useinstead ohos.bundle.bundleManager#getPermissionDef
|
||||
*/
|
||||
function getPermissionDef(permissionName: string): Promise<PermissionDef>;
|
||||
|
||||
/**
|
||||
* Obtains the label of a specified ability.
|
||||
*
|
||||
* @since 8
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @param bundleName Indicates the bundle name of the application to which the ability belongs.
|
||||
* @param abilityName Indicates the ability name.
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
|
||||
* @returns Returns the label representing the label of the specified ability.
|
||||
* @param { string } bundleName - Indicates the bundle name of the application to which the ability belongs.
|
||||
* @param { string } abilityName - Indicates the ability name.
|
||||
* @param { AsyncCallback<string> } callback
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @since 8
|
||||
* @deprecated since 9
|
||||
* @useinstead ohos.bundle.bundleManager#getAbilityLabel
|
||||
*/
|
||||
function getAbilityLabel(bundleName: string, abilityName: string, callback: AsyncCallback<string>): void;
|
||||
|
||||
/**
|
||||
* Obtains the label of a specified ability.
|
||||
*
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
|
||||
* @param { string } bundleName - Indicates the bundle name of the application to which the ability belongs.
|
||||
* @param { string } abilityName - Indicates the ability name.
|
||||
* @returns { Promise<string> } Returns the label representing the label of the specified ability.
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @since 8
|
||||
* @deprecated since 9
|
||||
* @useinstead ohos.bundle.bundleManager#getAbilityLabel
|
||||
*/
|
||||
function getAbilityLabel(bundleName: string, abilityName: string): Promise<string>;
|
||||
|
||||
/**
|
||||
* Obtains the icon of a specified ability.
|
||||
*
|
||||
* @since 8
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @param bundleName Indicates the bundle name of the application to which the ability belongs.
|
||||
* @param abilityName Indicates the ability name.
|
||||
* @returns 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.resourceManager#getMediaContent
|
||||
*/
|
||||
* Obtains the icon of a specified ability.
|
||||
*
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
|
||||
* @param { string } bundleName - Indicates the bundle name of the application to which the ability belongs.
|
||||
* @param { string } abilityName - Indicates the ability name.
|
||||
* @param { AsyncCallback<image.PixelMap> } callback
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @since 8
|
||||
* @deprecated since 9
|
||||
* @useinstead ohos.resourceManager#getMediaContent
|
||||
*/
|
||||
function getAbilityIcon(bundleName: string, abilityName: string, callback: AsyncCallback<image.PixelMap>): void;
|
||||
|
||||
/**
|
||||
* Obtains the icon of a specified ability.
|
||||
*
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
|
||||
* @param { string } bundleName - Indicates the bundle name of the application to which the ability belongs.
|
||||
* @param { string } abilityName - Indicates the ability name.
|
||||
* @returns { Promise<image.PixelMap> } Returns the PixelMap object representing the icon of the specified ability.
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @since 8
|
||||
* @deprecated since 9
|
||||
* @useinstead ohos.resourceManager#getMediaContent
|
||||
*/
|
||||
function getAbilityIcon(bundleName: string, abilityName: string): Promise<image.PixelMap>;
|
||||
|
||||
/**
|
||||
* Checks whether a specified ability is enabled.
|
||||
*
|
||||
* @since 8
|
||||
* @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
|
||||
*/
|
||||
* Checks whether a specified ability is enabled.
|
||||
*
|
||||
* @param { AbilityInfo } info - Indicates information about the ability to check.
|
||||
* @param { AsyncCallback<boolean> } callback
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @since 8
|
||||
* @deprecated since 9
|
||||
* @useinstead ohos.bundle.bundleManager#isAbilityEnabled
|
||||
*/
|
||||
function isAbilityEnabled(info: AbilityInfo, callback: AsyncCallback<boolean>): void;
|
||||
|
||||
/**
|
||||
* Checks whether a specified ability is enabled.
|
||||
*
|
||||
* @param { AbilityInfo } info - Indicates information about the ability to check.
|
||||
* @returns { Promise<boolean> } Returns true if the ability is enabled; returns false otherwise.
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @since 8
|
||||
* @deprecated since 9
|
||||
* @useinstead ohos.bundle.bundleManager#isAbilityEnabled
|
||||
*/
|
||||
function isAbilityEnabled(info: AbilityInfo): Promise<boolean>;
|
||||
|
||||
/**
|
||||
* Checks whether a specified application is enabled.
|
||||
*
|
||||
* @since 8
|
||||
* @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
|
||||
*/
|
||||
* Checks whether a specified application is enabled.
|
||||
*
|
||||
* @param { string }bundleName - Indicates the bundle name of the application.
|
||||
* @param { AsyncCallback<boolean> } callback
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @since 8
|
||||
* @deprecated since 9
|
||||
* @useinstead ohos.bundle.bundleManager#isApplicationEnabled
|
||||
*/
|
||||
function isApplicationEnabled(bundleName: string, callback: AsyncCallback<boolean>): void;
|
||||
|
||||
/**
|
||||
* Checks whether a specified application is enabled.
|
||||
*
|
||||
* @param { string }bundleName - Indicates the bundle name of the application.
|
||||
* @returns { Promise<boolean> } Returns true if the application is enabled; returns false otherwise.
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @since 8
|
||||
* @deprecated since 9
|
||||
* @useinstead ohos.bundle.bundleManager#isApplicationEnabled
|
||||
*/
|
||||
function isApplicationEnabled(bundleName: string): Promise<boolean>;
|
||||
}
|
||||
|
||||
|
51
api/@ohos.bundle.defaultAppManager.d.ts
vendored
51
api/@ohos.bundle.defaultAppManager.d.ts
vendored
@ -134,6 +134,23 @@ declare namespace defaultAppManager {
|
||||
* @since 9
|
||||
*/
|
||||
function getDefaultApplication(type: string, userId: number, callback: AsyncCallback<BundleInfo>) : void;
|
||||
|
||||
/**
|
||||
* 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 { AsyncCallback<BundleInfo> } callback - The callback of the BundleInfo object result.
|
||||
* @throws { BusinessError } 201 - Permission denied.
|
||||
* @throws { BusinessError } 202 - Permission denied, non-system app called system api.
|
||||
* @throws { BusinessError } 401 - The parameter check failed.
|
||||
* @throws { BusinessError } 801 - Capability not supported.
|
||||
* @throws { BusinessError } 17700023 - The specified default app does not exist.
|
||||
* @throws { BusinessError } 17700025 - The specified type is invalid.
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework.DefaultApp
|
||||
* @systemapi
|
||||
* @since 9
|
||||
*/
|
||||
function getDefaultApplication(type: string, callback: AsyncCallback<BundleInfo>) : void;
|
||||
|
||||
/**
|
||||
@ -177,6 +194,24 @@ declare namespace defaultAppManager {
|
||||
*/
|
||||
function setDefaultApplication(type: string,
|
||||
elementName: ElementName, userId: number, callback: AsyncCallback<void>) : void;
|
||||
|
||||
/**
|
||||
* 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 { AsyncCallback<void> } callback - The callback of setting default application result.
|
||||
* @throws { BusinessError } 201 - Permission denied.
|
||||
* @throws { BusinessError } 202 - Permission denied, non-system app called system api.
|
||||
* @throws { BusinessError } 401 - The parameter check failed.
|
||||
* @throws { BusinessError } 801 - Capability not supported.
|
||||
* @throws { BusinessError } 17700025 - The specified type is invalid.
|
||||
* @throws { BusinessError } 17700028 - The specified ability does not match the type.
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework.DefaultApp
|
||||
* @systemapi
|
||||
* @since 9
|
||||
*/
|
||||
function setDefaultApplication(type: string, elementName: ElementName, callback: AsyncCallback<void>) : void;
|
||||
|
||||
/**
|
||||
@ -218,6 +253,22 @@ declare namespace defaultAppManager {
|
||||
* @since 9
|
||||
*/
|
||||
function resetDefaultApplication(type: string, userId: number, 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 { AsyncCallback<void> } callback - The callback of resetting default application result.
|
||||
* @throws { BusinessError } 201 - Permission denied.
|
||||
* @throws { BusinessError } 202 - Permission denied, non-system app called system api.
|
||||
* @throws { BusinessError } 401 - The parameter check failed.
|
||||
* @throws { BusinessError } 801 - Capability not supported.
|
||||
* @throws { BusinessError } 17700025 - The specified type is invalid.
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework.DefaultApp
|
||||
* @systemapi
|
||||
* @since 9
|
||||
*/
|
||||
function resetDefaultApplication(type: string, callback: AsyncCallback<void>) : void;
|
||||
|
||||
/**
|
||||
|
@ -135,7 +135,7 @@ declare namespace distributedBundleManager {
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
|
||||
* @param { ElementName } elementName - Indicates the elementName.
|
||||
* @param { string } locale - Indicates the locale info
|
||||
* @returns { Promise<Array<RemoteAbilityInfo>> } The result of getting the ability info of the remote device.
|
||||
* @returns { Promise<RemoteAbilityInfo> } The result of getting the ability info of the remote device.
|
||||
* @throws { BusinessError } 201 - Permission denied.
|
||||
* @throws { BusinessError } 202 - Permission denied, non-system app called system api.
|
||||
* @throws { BusinessError } 401 - The parameter check failed.
|
||||
@ -156,7 +156,7 @@ declare namespace distributedBundleManager {
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
|
||||
* @param { Array<ElementName> } elementNames - Indicates the elementNames, Maximum array length ten.
|
||||
* @param { string } locale - Indicates the locale info
|
||||
* @param { AsyncCallback } callback - Returns the abilities info of the remote device.
|
||||
* @param { AsyncCallback<Array<RemoteAbilityInfo>> } callback - Returns the abilities info of the remote device.
|
||||
* @throws { BusinessError } 201 - Permission denied.
|
||||
* @throws { BusinessError } 202 - Permission denied, non-system app called system api.
|
||||
* @throws { BusinessError } 401 - The parameter check failed.
|
||||
|
2
api/@ohos.bundle.freeInstall.d.ts
vendored
2
api/@ohos.bundle.freeInstall.d.ts
vendored
@ -170,7 +170,7 @@ declare namespace freeInstall {
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
|
||||
* @param { string } bundleName - Indicates the bundle name of the application.
|
||||
* @param { string } moduleName - Indicates the module name of the application.
|
||||
* @returns { Promise<void> } Returns true if the module is removable; returns false otherwise.
|
||||
* @returns { Promise<boolean> } Returns true if the module is removable; returns false otherwise.
|
||||
* @throws { BusinessError } 201 - Permission denied.
|
||||
* @throws { BusinessError } 202 - Permission denied, non-system app called system api.
|
||||
* @throws { BusinessError } 401 - The parameter check failed.
|
||||
|
139
api/@ohos.bundle.innerBundleManager.d.ts
vendored
139
api/@ohos.bundle.innerBundleManager.d.ts
vendored
@ -20,91 +20,160 @@ import { ShortcutInfo } from './bundle/shortcutInfo';
|
||||
|
||||
/**
|
||||
* inner bundle manager.
|
||||
* @name innerBundleManager
|
||||
* @since 8
|
||||
*
|
||||
* @namespace innerBundleManager
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @systemapi Hide this for inner system use
|
||||
* @since 8
|
||||
* @deprecated since 9
|
||||
* @useinstead ohos.bundle.launcherBundleManager
|
||||
*/
|
||||
|
||||
declare namespace innerBundleManager {
|
||||
/**
|
||||
* Obtains based on a given bundleName and userId.
|
||||
*
|
||||
* @since 8
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @param bundleName Indicates the application bundle name to be queried.
|
||||
* @param userId Indicates the id for the user.
|
||||
* @returns Returns the LauncherAbilityInfo object.
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
|
||||
* @param { string } bundleName - Indicates the application bundle name to be queried.
|
||||
* @param { number } userId - Indicates the id for the user.
|
||||
* @param { AsyncCallback<Array<LauncherAbilityInfo>> } callback
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @systemapi Hide this for inner system use
|
||||
* @since 8
|
||||
* @deprecated since 9
|
||||
* @useinstead ohos.bundle.launcherBundleManager#getLauncherAbilityInfo
|
||||
*/
|
||||
function getLauncherAbilityInfos(bundleName: string, userId: number, callback: AsyncCallback<Array<LauncherAbilityInfo>>) : void;
|
||||
function getLauncherAbilityInfos(bundleName: string, userId: number) : Promise<Array<LauncherAbilityInfo>>;
|
||||
function getLauncherAbilityInfos(bundleName: string,
|
||||
userId: number, callback: AsyncCallback<Array<LauncherAbilityInfo>>) : void;
|
||||
|
||||
/**
|
||||
* Obtains based on a given bundleName and userId.
|
||||
*
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
|
||||
* @param { string } bundleName - Indicates the application bundle name to be queried.
|
||||
* @param { number } userId - Indicates the id for the user.
|
||||
* @returns { Promise<Array<LauncherAbilityInfo>> } Returns the LauncherAbilityInfo array.
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @systemapi Hide this for inner system use
|
||||
* @since 8
|
||||
* @deprecated since 9
|
||||
* @useinstead ohos.bundle.launcherBundleManager#getLauncherAbilityInfo
|
||||
*/
|
||||
function getLauncherAbilityInfos(bundleName: string, userId: number): Promise<Array<LauncherAbilityInfo>>;
|
||||
|
||||
/**
|
||||
* Register Callback.
|
||||
*
|
||||
* @since 8
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @param type Indicates the command should be implement.
|
||||
* @param LauncherStatusCallback Indicates the callback to be register.
|
||||
* @returns { string | Promise<string> } Returns the result of register.
|
||||
* @permission ohos.permission.LISTEN_BUNDLE_CHANGE
|
||||
* @param { 'BundleStatusChange' } type - Indicates the command should be implement.
|
||||
* @param { BundleStatusCallback } bundleStatusCallback - Indicates the callback to be register.
|
||||
* @param { AsyncCallback<string> } callback
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @systemapi Hide this for inner system use
|
||||
* @since 8
|
||||
* @deprecated since 9
|
||||
* @useinstead ohos.bundle.bundleMonitor#on
|
||||
*/
|
||||
function on(type:"BundleStatusChange", bundleStatusCallback : BundleStatusCallback, callback: AsyncCallback<string>) : void;
|
||||
function on(type:"BundleStatusChange", bundleStatusCallback : BundleStatusCallback): Promise<string>;
|
||||
function on(type:'BundleStatusChange',
|
||||
bundleStatusCallback : BundleStatusCallback, callback: AsyncCallback<string>) : void;
|
||||
|
||||
/**
|
||||
* Register Callback.
|
||||
*
|
||||
* @permission ohos.permission.LISTEN_BUNDLE_CHANGE
|
||||
* @param { 'BundleStatusChange' } type - Indicates the command should be implement.
|
||||
* @param { BundleStatusCallback } bundleStatusCallback - Indicates the callback to be register.
|
||||
* @returns { Promise<string> } - Returns the result of register.
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @systemapi Hide this for inner system use
|
||||
* @since 8
|
||||
* @deprecated since 9
|
||||
* @useinstead ohos.bundle.bundleMonitor#on
|
||||
*/
|
||||
function on(type: 'BundleStatusChange', bundleStatusCallback: BundleStatusCallback): Promise<string>;
|
||||
|
||||
/**
|
||||
* UnRegister Callback.
|
||||
*
|
||||
* @since 8
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @param type Indicates the command should be implement.
|
||||
* @returns { string | Promise<string> } Returns the result of unregister.
|
||||
* @permission ohos.permission.LISTEN_BUNDLE_CHANGE
|
||||
* @param { 'BundleStatusChange' } type - Indicates the command should be implement.
|
||||
* @param { AsyncCallback<string> } callback
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @systemapi Hide this for inner system use
|
||||
* @since 8
|
||||
* @deprecated since 9
|
||||
* @useinstead ohos.bundle.bundleMonitor#off
|
||||
*/
|
||||
function off(type:"BundleStatusChange", callback: AsyncCallback<string>) : void;
|
||||
function off(type:"BundleStatusChange"): Promise<string>;
|
||||
function off(type: 'BundleStatusChange', callback: AsyncCallback<string>): void;
|
||||
|
||||
/**
|
||||
* UnRegister Callback.
|
||||
*
|
||||
* @permission ohos.permission.LISTEN_BUNDLE_CHANGE
|
||||
* @param { 'BundleStatusChange' } type - Indicates the command should be implement.
|
||||
* @returns { Promise<string> } Returns the result of unregister.
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @systemapi Hide this for inner system use
|
||||
* @since 8
|
||||
* @deprecated since 9
|
||||
* @useinstead ohos.bundle.bundleMonitor#off
|
||||
*/
|
||||
function off(type: 'BundleStatusChange'): Promise<string>;
|
||||
|
||||
/**
|
||||
* Obtains based on a given userId.
|
||||
*
|
||||
* @since 8
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @param userId Indicates the id for the user.
|
||||
* @returns Returns the LauncherAbilityInfo object.
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
|
||||
* @param { number } userId - Indicates the id for the user.
|
||||
* @param { AsyncCallback<Array<LauncherAbilityInfo>> } callback
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @systemapi Hide this for inner system use
|
||||
* @since 8
|
||||
* @deprecated since 9
|
||||
* @useinstead ohos.bundle.launcherBundleManager#getAllLauncherAbilityInfos
|
||||
*/
|
||||
function getAllLauncherAbilityInfos(userId: number, callback: AsyncCallback<Array<LauncherAbilityInfo>>) : void;
|
||||
function getAllLauncherAbilityInfos(userId: number) : Promise<Array<LauncherAbilityInfo>>;
|
||||
function getAllLauncherAbilityInfos(userId: number, callback: AsyncCallback<Array<LauncherAbilityInfo>>): void;
|
||||
|
||||
/**
|
||||
* Obtains based on a given userId.
|
||||
*
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
|
||||
* @param { number } userId - Indicates the id for the user.
|
||||
* @returns { Promise<Array<LauncherAbilityInfo>> } Returns the LauncherAbilityInfo array.
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @systemapi Hide this for inner system use
|
||||
* @since 8
|
||||
* @deprecated since 9
|
||||
* @useinstead ohos.bundle.launcherBundleManager#getAllLauncherAbilityInfos
|
||||
*/
|
||||
function getAllLauncherAbilityInfos(userId: number): Promise<Array<LauncherAbilityInfo>>;
|
||||
|
||||
/**
|
||||
* Obtains based on a given bundleName.
|
||||
*
|
||||
* @since 8
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @param bundleName Indicates the application bundle name to be queried.
|
||||
* @returns Returns the LauncherShortcutInfo object.
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
|
||||
* @param { string } bundleName - Indicates the application bundle name to be queried.
|
||||
* @param { AsyncCallback<Array<ShortcutInfo>> } callback
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @systemapi Hide this for inner system use
|
||||
* @since 8
|
||||
* @deprecated since 9
|
||||
* @useinstead ohos.bundle.launcherBundleManager#getShortcutInfo
|
||||
*/
|
||||
function getShortcutInfos(bundleName :string, callback: AsyncCallback<Array<ShortcutInfo>>) : void;
|
||||
function getShortcutInfos(bundleName : string) : Promise<Array<ShortcutInfo>>;
|
||||
function getShortcutInfos(bundleName: string, callback: AsyncCallback<Array<ShortcutInfo>>): void;
|
||||
|
||||
/**
|
||||
* Obtains based on a given bundleName.
|
||||
*
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
|
||||
* @param { string } bundleName - Indicates the application bundle name to be queried.
|
||||
* @returns { Promise<Array<ShortcutInfo>> } Returns the LauncherShortcutInfo array.
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework
|
||||
* @systemapi Hide this for inner system use
|
||||
* @since 8
|
||||
* @deprecated since 9
|
||||
* @useinstead ohos.bundle.launcherBundleManager#getShortcutInfo
|
||||
*/
|
||||
function getShortcutInfos(bundleName: string): Promise<Array<ShortcutInfo>>;
|
||||
}
|
||||
|
||||
export default innerBundleManager;
|
||||
|
108
api/@ohos.bundle.installer.d.ts
vendored
108
api/@ohos.bundle.installer.d.ts
vendored
@ -17,6 +17,7 @@ import { AsyncCallback } from './basic';
|
||||
|
||||
/**
|
||||
* Support install, upgrade, remove and recover bundles on the devices.
|
||||
*
|
||||
* @namespace installer
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework.Core
|
||||
* @systemapi
|
||||
@ -25,20 +26,21 @@ import { AsyncCallback } from './basic';
|
||||
declare namespace installer {
|
||||
/**
|
||||
* Obtains the interface used to install bundle.
|
||||
* @param { AsyncCallback } callback - The callback of BundleInstaller object.
|
||||
*
|
||||
* @param { AsyncCallback<BundleInstaller> } callback - The callback of BundleInstaller object.
|
||||
* @throws { BusinessError } 202 - Permission denied, non-system app called system api.
|
||||
* @throws { BusinessError } 401 - Input parameters check failed.
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework.Core
|
||||
* @systemapi
|
||||
* @since 9
|
||||
*/
|
||||
function getBundleInstaller(callback: AsyncCallback<BundleInstaller>) : void
|
||||
function getBundleInstaller(callback: AsyncCallback<BundleInstaller>): void;
|
||||
|
||||
/**
|
||||
* Obtains the interface used to install bundle.
|
||||
* @param { AsyncCallback } callback - The callback of getting a list of BundleInstaller objects.
|
||||
* @throws { BusinessError } 202 - Permission denied, non-system app called system api.
|
||||
*
|
||||
* @returns { Promise<BundleInstaller> } BundleInstaller object.
|
||||
* @throws { BusinessError } 202 - Permission denied, non-system app called system api.
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework.Core
|
||||
* @systemapi
|
||||
* @since 9
|
||||
@ -47,6 +49,7 @@ declare namespace installer {
|
||||
|
||||
/**
|
||||
* Bundle installer interface, include install uninstall recover.
|
||||
*
|
||||
* @interface BundleInstaller
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework.Core
|
||||
* @systemapi
|
||||
@ -55,10 +58,11 @@ declare namespace installer {
|
||||
interface BundleInstaller {
|
||||
/**
|
||||
* Install haps for an application.
|
||||
*
|
||||
* @permission ohos.permission.INSTALL_BUNDLE
|
||||
* @param { Array<string> } hapFilePaths - Indicates the path where the hap of the application is stored.
|
||||
* @param { InstallParam } installParam - Indicates other parameters required for the installation.
|
||||
* @param { AsyncCallback } callback - The callback of installing haps result.
|
||||
* @param { AsyncCallback<void> } callback - The callback of installing haps result.
|
||||
* @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE'.
|
||||
* @throws { BusinessError } 202 - Permission denied, non-system app called system api.
|
||||
* @throws { BusinessError } 401 - Input parameters check failed.
|
||||
@ -79,14 +83,40 @@ declare namespace installer {
|
||||
* @since 9
|
||||
*/
|
||||
install(hapFilePaths: Array<string>, installParam: InstallParam, callback: AsyncCallback<void>) : void;
|
||||
|
||||
/**
|
||||
* Install haps for an application.
|
||||
*
|
||||
* @permission ohos.permission.INSTALL_BUNDLE
|
||||
* @param { Array<string> } hapFilePaths - Indicates the path where the hap of the application is stored.
|
||||
* @param { AsyncCallback<void> } callback - The callback of installing haps result.
|
||||
* @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE'.
|
||||
* @throws { BusinessError } 202 - Permission denied, non-system app called system api.
|
||||
* @throws { BusinessError } 401 - Input parameters check failed.
|
||||
* @throws { BusinessError } 17700010 - Failed to install the HAP because the HAP fails to be parsed.
|
||||
* @throws { BusinessError } 17700011 - Failed to install the HAP because the HAP signature fails to be verified.
|
||||
* @throws { BusinessError } 17700012 - Failed to install the HAP because the HAP path is invalid or the HAP is too large.
|
||||
* @throws { BusinessError } 17700015 - Failed to install the HAPs because they have different configuration information.
|
||||
* @throws { BusinessError } 17700016 - Failed to install the HAP because of insufficient system disk space.
|
||||
* @throws { BusinessError } 17700017 - Failed to install the HAP since the version of the HAP to install is too early.
|
||||
* @throws { BusinessError } 17700018 - Failed to install because the dependent module does not exist.
|
||||
* @throws { BusinessError } 17700031 - Failed to install the HAP because the overlay check of the HAP is failed.
|
||||
* @throws { BusinessError } 17700036 - Failed to install the HSP because lacks appropriate permissions.
|
||||
* @throws { BusinessError } 17700039 - Failed to install because disallow install a shared bundle by hapFilePaths.
|
||||
* @throws { BusinessError } 17700041 - Failed to install because enterprise device management disallow install.
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework.Core
|
||||
* @systemapi
|
||||
* @since 9
|
||||
*/
|
||||
install(hapFilePaths: Array<string>, callback: AsyncCallback<void>) : void;
|
||||
|
||||
/**
|
||||
* Install haps for an application.
|
||||
*
|
||||
* @permission ohos.permission.INSTALL_BUNDLE
|
||||
* @param { Array<string> } hapFilePaths - Indicates the path where the hap of the application is stored.
|
||||
* @param { InstallParam } installParam - Indicates other parameters required for the installation.
|
||||
* @param { AsyncCallback } callback - The callback of installing haps result.
|
||||
* @returns { Promise<void> }
|
||||
* @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE'.
|
||||
* @throws { BusinessError } 202 - Permission denied, non-system app called system api.
|
||||
* @throws { BusinessError } 401 - Input parameters check failed.
|
||||
@ -110,10 +140,11 @@ declare namespace installer {
|
||||
|
||||
/**
|
||||
* Uninstall an application.
|
||||
*
|
||||
* @permission ohos.permission.INSTALL_BUNDLE
|
||||
* @param { string } bundleName - Indicates the bundle name of the application to be uninstalled.
|
||||
* @param { InstallParam } installParam - Indicates other parameters required for the uninstall.
|
||||
* @param { AsyncCallback } callback - The callback of uninstalling application result.
|
||||
* @param { AsyncCallback<void> } callback - The callback of uninstalling application result.
|
||||
* @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE'.
|
||||
* @throws { BusinessError } 202 - Permission denied, non-system app called system api.
|
||||
* @throws { BusinessError } 401 - Input parameters check failed.
|
||||
@ -125,14 +156,31 @@ declare namespace installer {
|
||||
* @since 9
|
||||
*/
|
||||
uninstall(bundleName: string, installParam: InstallParam, callback : AsyncCallback<void>) : void;
|
||||
|
||||
/**
|
||||
* Uninstall an application.
|
||||
*
|
||||
* @permission ohos.permission.INSTALL_BUNDLE
|
||||
* @param { string } bundleName - Indicates the bundle name of the application to be uninstalled.
|
||||
* @param { AsyncCallback<void> } callback - The callback of uninstalling application result.
|
||||
* @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE'.
|
||||
* @throws { BusinessError } 202 - Permission denied, non-system app called system api.
|
||||
* @throws { BusinessError } 401 - Input parameters check failed.
|
||||
* @throws { BusinessError } 17700020 - The specified bundle is pre-installed bundle which cannot be uninstalled.
|
||||
* @throws { BusinessError } 17700040 - The specified bundle is a shared bundle which cannot be uninstalled.
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework.Core
|
||||
* @systemapi
|
||||
* @since 9
|
||||
*/
|
||||
uninstall(bundleName: string, callback : AsyncCallback<void>) : void;
|
||||
|
||||
/**
|
||||
* Uninstall an application.
|
||||
*
|
||||
* @permission ohos.permission.INSTALL_BUNDLE
|
||||
* @param { string } bundleName - Indicates the bundle name of the application to be uninstalled.
|
||||
* @param { InstallParam } installParam - Indicates other parameters required for the uninstall.
|
||||
* @param { AsyncCallback } callback - The callback of uninstalling application result.
|
||||
* @returns { Promise<void> }
|
||||
* @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE'.
|
||||
* @throws { BusinessError } 202 - Permission denied, non-system app called system api.
|
||||
* @throws { BusinessError } 401 - Input parameters check failed.
|
||||
@ -143,14 +191,15 @@ declare namespace installer {
|
||||
* @systemapi
|
||||
* @since 9
|
||||
*/
|
||||
uninstall(bundleName: string, installParam?: InstallParam) : Promise<void>;
|
||||
uninstall(bundleName: string, installParam?: InstallParam): Promise<void>;
|
||||
|
||||
/**
|
||||
* Recover an application.
|
||||
*
|
||||
* @permission ohos.permission.INSTALL_BUNDLE
|
||||
* @param { string } bundleName - Indicates the bundle name of the application to be recovered.
|
||||
* @param { InstallParam } installParam - Indicates other parameters required for the recover.
|
||||
* @param { AsyncCallback } callback - The callback of recovering application result.
|
||||
* @param { AsyncCallback<void> } callback - The callback of recovering application result.
|
||||
* @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE'.
|
||||
* @throws { BusinessError } 202 - Permission denied, non-system app called system api.
|
||||
* @throws { BusinessError } 401 - Input parameters check failed.
|
||||
@ -160,14 +209,29 @@ declare namespace installer {
|
||||
* @since 9
|
||||
*/
|
||||
recover(bundleName: string, installParam: InstallParam, callback: AsyncCallback<void>): void;
|
||||
|
||||
/**
|
||||
* Recover an application.
|
||||
*
|
||||
* @permission ohos.permission.INSTALL_BUNDLE
|
||||
* @param { string } bundleName - Indicates the bundle name of the application to be recovered.
|
||||
* @param { AsyncCallback<void> } callback - The callback of recovering application result.
|
||||
* @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE'.
|
||||
* @throws { BusinessError } 202 - Permission denied, non-system app called system api.
|
||||
* @throws { BusinessError } 401 - Input parameters check failed.
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework.Core
|
||||
* @systemapi
|
||||
* @since 9
|
||||
*/
|
||||
recover(bundleName: string, callback: AsyncCallback<void>): void;
|
||||
|
||||
/**
|
||||
* Recover an application.
|
||||
*
|
||||
* @permission ohos.permission.INSTALL_BUNDLE
|
||||
* @param { string } bundleName - Indicates the bundle name of the application to be recovered.
|
||||
* @param { InstallParam } installParam - Indicates other parameters required for the recover.
|
||||
* @param { AsyncCallback } callback - The callback of recovering application result.
|
||||
* @returns { Promise<void> }
|
||||
* @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE'.
|
||||
* @throws { BusinessError } 202 - Permission denied, non-system app called system api.
|
||||
* @throws { BusinessError } 401 - Input parameters check failed.
|
||||
@ -180,9 +244,10 @@ declare namespace installer {
|
||||
|
||||
/**
|
||||
* Uninstall a shared bundle.
|
||||
*
|
||||
* @permission ohos.permission.INSTALL_BUNDLE
|
||||
* @param { UninstallParam } uninstallParam - Indicates parameters required for the uninstall.
|
||||
* @param { AsyncCallback } callback - The callback of uninstalling shared bundle result.
|
||||
* @param { AsyncCallback<void> } callback - The callback of uninstalling shared bundle result.
|
||||
* @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE'.
|
||||
* @throws { BusinessError } 401 - Input parameters check failed.
|
||||
* @throws { BusinessError } 17700020 - The specified bundle is pre-installed bundle which cannot be uninstalled.
|
||||
@ -192,12 +257,14 @@ declare namespace installer {
|
||||
* @systemapi
|
||||
* @since 10
|
||||
*/
|
||||
uninstall(uninstallParam: UninstallParam, callback : AsyncCallback<void>) : void;
|
||||
uninstall(uninstallParam: UninstallParam, callback: AsyncCallback<void>): void;
|
||||
|
||||
/**
|
||||
* Uninstall a shared bundle.
|
||||
*
|
||||
* @permission ohos.permission.INSTALL_BUNDLE
|
||||
* @param { UninstallParam } uninstallParam - Indicates parameters required for the uninstall.
|
||||
* @returns { Promise<void> }
|
||||
* @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE'.
|
||||
* @throws { BusinessError } 401 - Input parameters check failed.
|
||||
* @throws { BusinessError } 17700020 - The specified bundle is pre-installed bundle which cannot be uninstalled.
|
||||
@ -207,11 +274,12 @@ declare namespace installer {
|
||||
* @systemapi
|
||||
* @since 10
|
||||
*/
|
||||
uninstall(uninstallParam: UninstallParam) : Promise<void>;
|
||||
uninstall(uninstallParam: UninstallParam): Promise<void>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Provides parameters required for hashParam.
|
||||
*
|
||||
* @typedef HashParam
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework.Core
|
||||
* @systemapi
|
||||
@ -220,6 +288,7 @@ declare namespace installer {
|
||||
export interface HashParam {
|
||||
/**
|
||||
* Indicates the moduleName
|
||||
*
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework.Core
|
||||
* @since 9
|
||||
*/
|
||||
@ -227,6 +296,7 @@ declare namespace installer {
|
||||
|
||||
/**
|
||||
* Indicates the hash value
|
||||
*
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework.Core
|
||||
* @since 9
|
||||
*/
|
||||
@ -235,6 +305,7 @@ declare namespace installer {
|
||||
|
||||
/**
|
||||
* Provides parameters required for installing or uninstalling an application.
|
||||
*
|
||||
* @typedef InstallParam
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework.Core
|
||||
* @systemapi
|
||||
@ -243,6 +314,7 @@ declare namespace installer {
|
||||
export interface InstallParam {
|
||||
/**
|
||||
* Indicates the user id
|
||||
*
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework.Core
|
||||
* @since 9
|
||||
*/
|
||||
@ -250,6 +322,7 @@ declare namespace installer {
|
||||
|
||||
/**
|
||||
* Indicates the install flag, which 0x00 for normal, 0x10 for freeInstall
|
||||
*
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework.Core
|
||||
* @since 9
|
||||
*/
|
||||
@ -257,6 +330,7 @@ declare namespace installer {
|
||||
|
||||
/**
|
||||
* Indicates whether the param has data
|
||||
*
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework.Core
|
||||
* @since 9
|
||||
*/
|
||||
@ -264,6 +338,7 @@ declare namespace installer {
|
||||
|
||||
/**
|
||||
* Indicates the hash params
|
||||
*
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework.Core
|
||||
* @since 9
|
||||
*/
|
||||
@ -271,6 +346,7 @@ declare namespace installer {
|
||||
|
||||
/**
|
||||
* Indicates the deadline of the crowdtesting bundle
|
||||
*
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework.Core
|
||||
* @since 9
|
||||
*/
|
||||
@ -278,6 +354,7 @@ declare namespace installer {
|
||||
|
||||
/**
|
||||
* Indicates the shared bundle dir paths.
|
||||
*
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework.Core
|
||||
* @since 10
|
||||
*/
|
||||
@ -286,6 +363,7 @@ declare namespace installer {
|
||||
|
||||
/**
|
||||
* Provides parameters required for uninstalling shared bundle.
|
||||
*
|
||||
* @typedef UninstallParam
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework.Core
|
||||
* @systemapi
|
||||
@ -294,6 +372,7 @@ declare namespace installer {
|
||||
export interface UninstallParam {
|
||||
/**
|
||||
* Indicates the shared bundle name
|
||||
*
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework.Core
|
||||
* @since 10
|
||||
*/
|
||||
@ -301,6 +380,7 @@ declare namespace installer {
|
||||
|
||||
/**
|
||||
* Indicates the shared version code. If default, indicates that all version sharing bundles are uninstalled
|
||||
*
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework.Core
|
||||
* @since 10
|
||||
*/
|
||||
|
137
api/@ohos.bundle.overlay.d.ts
vendored
137
api/@ohos.bundle.overlay.d.ts
vendored
@ -36,11 +36,25 @@ declare namespace overlay {
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework.Overlay
|
||||
* @since 10
|
||||
*/
|
||||
function setOverlayEnabled(moduleName:string, isEnabled: boolean, callback: AsyncCallback<void>): void;
|
||||
function setOverlayEnabled(moduleName:string, isEnabled: boolean): Promise<void>;
|
||||
function setOverlayEnabled(moduleName: string, isEnabled: boolean, callback: AsyncCallback<void>): void;
|
||||
|
||||
/**
|
||||
* Set enabled state of overlay module based on specified moduleName.
|
||||
*
|
||||
* @param { string } moduleName - Indicates the module name of the overlay module to be set.
|
||||
* @param { boolean } isEnabled - The value true means to enable overlay feature, and the value false means to disable overlay feature.
|
||||
* @returns { Promise<void> }
|
||||
* @throws { BusinessError } 401 - The parameter check failed.
|
||||
* @throws { BusinessError } 17700002 - The specified module name is not found.
|
||||
* @throws { BusinessError } 17700033 - The specified module is not an overlay module.
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework.Overlay
|
||||
* @since 10
|
||||
*/
|
||||
function setOverlayEnabled(moduleName: string, isEnabled: boolean): Promise<void>;
|
||||
|
||||
/**
|
||||
* Set enabled state of overlay module based on specified bundleName and moduleName.
|
||||
*
|
||||
* @permission ohos.permission.CHANGE_OVERLAY_ENABLED_STATE
|
||||
* @param { string } bundleName - Indicates the application bundle name of the overlay bundle to be set.
|
||||
* @param { string } moduleName - Indicates the module name of the overlay module to be set.
|
||||
@ -57,11 +71,33 @@ declare namespace overlay {
|
||||
* @systemapi
|
||||
* @since 10
|
||||
*/
|
||||
function setOverlayEnabledByBundleName(bundleName:string, moduleName:string, isEnabled: boolean, callback: AsyncCallback<void>): void;
|
||||
function setOverlayEnabledByBundleName(bundleName:string, moduleName:string, isEnabled: boolean): Promise<void>;
|
||||
function setOverlayEnabledByBundleName(bundleName:string,
|
||||
moduleName:string, isEnabled: boolean, callback: AsyncCallback<void>): void;
|
||||
|
||||
/**
|
||||
* Set enabled state of overlay module based on specified bundleName and moduleName.
|
||||
*
|
||||
* @permission ohos.permission.CHANGE_OVERLAY_ENABLED_STATE
|
||||
* @param { string } bundleName - Indicates the application bundle name of the overlay bundle to be set.
|
||||
* @param { string } moduleName - Indicates the module name of the overlay module to be set.
|
||||
* @param { boolean } isEnabled - The value true means to enable overlay feature, and the value false means to disable overlay feature.
|
||||
* @returns { Promise<void> }
|
||||
* @throws { BusinessError } 401 - The parameter check failed.
|
||||
* @throws { BusinessError } 201 - Permission denied.
|
||||
* @throws { BusinessError } 202 - Permission denied, non-system app called system api.
|
||||
* @throws { BusinessError } 17700001 - The specified bundleName is not found.
|
||||
* @throws { BusinessError } 17700002 - The specified module name is not found.
|
||||
* @throws { BusinessError } 17700032 - The specified bundle does not contain any overlay module.
|
||||
* @throws { BusinessError } 17700033 - The specified module is not an overlay module.
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework.Overlay
|
||||
* @systemapi
|
||||
* @since 10
|
||||
*/
|
||||
function setOverlayEnabledByBundleName(bundleName: string, moduleName: string, isEnabled: boolean): Promise<void>;
|
||||
|
||||
/**
|
||||
* Obtain the OverlayModuleInfo of current application based on moduleName.
|
||||
*
|
||||
* @param { string } moduleName - Indicates the module name of the overlay module to be queried.
|
||||
* @param { AsyncCallback<OverlayModuleInfo> } callback - The callback of getting OverlayModuleInfo object.
|
||||
* @throws { BusinessError } 401 - The parameter check failed.
|
||||
@ -71,11 +107,25 @@ declare namespace overlay {
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework.Overlay
|
||||
* @since 10
|
||||
*/
|
||||
function getOverlayModuleInfo(moduleName: string, callback: AsyncCallback<OverlayModuleInfo>): void;
|
||||
function getOverlayModuleInfo(moduleName: string): Promise<OverlayModuleInfo>;
|
||||
function getOverlayModuleInfo(moduleName: string, callback: AsyncCallback<OverlayModuleInfo>): void;
|
||||
|
||||
/**
|
||||
* Obtain the OverlayModuleInfo of current application based on moduleName.
|
||||
*
|
||||
* @param { string } moduleName - Indicates the module name of the overlay module to be queried.
|
||||
* @returns { Promise<OverlayModuleInfo> }
|
||||
* @throws { BusinessError } 401 - The parameter check failed.
|
||||
* @throws { BusinessError } 17700002 - The specified module name is not found.
|
||||
* @throws { BusinessError } 17700032 - The specified bundle does not contain any overlay module.
|
||||
* @throws { BusinessError } 17700033 - The specified module is not an overlay module.
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework.Overlay
|
||||
* @since 10
|
||||
*/
|
||||
function getOverlayModuleInfo(moduleName: string): Promise<OverlayModuleInfo>;
|
||||
|
||||
/**
|
||||
* Obtain the OverlayModuleInfo of current application based on moduleName.
|
||||
*
|
||||
* @param { string } targetModuleName - Indicates the target module name of the target module to be queried.
|
||||
* @param { AsyncCallback<Array<OverlayModuleInfo>> } callback - The callback of getting a list of OverlayModuleInfo object.
|
||||
* @throws { BusinessError } 401 - The parameter check failed.
|
||||
@ -84,11 +134,43 @@ declare namespace overlay {
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework.Overlay
|
||||
* @since 10
|
||||
*/
|
||||
function getTargetOverlayModuleInfos(targetModuleName: string, callback: AsyncCallback<Array<OverlayModuleInfo>>): void;
|
||||
function getTargetOverlayModuleInfos(targetModuleName: string): Promise<Array<OverlayModuleInfo>>;
|
||||
function getTargetOverlayModuleInfos(targetModuleName: string,
|
||||
callback: AsyncCallback<Array<OverlayModuleInfo>>): void;
|
||||
|
||||
/**
|
||||
* Obtain the OverlayModuleInfo of current application based on moduleName.
|
||||
*
|
||||
* @param { string } targetModuleName - Indicates the target module name of the target module to be queried.
|
||||
* @returns { Promise<Array<OverlayModuleInfo>> }
|
||||
* @throws { BusinessError } 401 - The parameter check failed.
|
||||
* @throws { BusinessError } 17700002 - The specified module name is not found.
|
||||
* @throws { BusinessError } 17700034 - The specified module is an overlay module.
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework.Overlay
|
||||
* @since 10
|
||||
*/
|
||||
function getTargetOverlayModuleInfos(targetModuleName: string): Promise<Array<OverlayModuleInfo>>;
|
||||
|
||||
/**
|
||||
* Obtain the OverlayModuleInfo of the specified application based on bundleName.
|
||||
*
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
|
||||
* @param { string } bundleName - Indicates the application bundle name of the overlay bundle to be quired.
|
||||
* @param { AsyncCallback<Array<OverlayModuleInfo>> } callback - The callback of getting a list of OverlayModuleInfo object.
|
||||
* @throws { BusinessError } 401 - The parameter check failed.
|
||||
* @throws { BusinessError } 201 - Permission denied.
|
||||
* @throws { BusinessError } 202 - Permission denied, non-system app called system api.
|
||||
* @throws { BusinessError } 17700001 - The specified bundleName is not found.
|
||||
* @throws { BusinessError } 17700032 - The specified bundle does not contain any overlay module.
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework.Overlay
|
||||
* @systemapi
|
||||
* @since 10
|
||||
*/
|
||||
function getOverlayModuleInfoByBundleName(bundleName: string,
|
||||
callback: AsyncCallback<Array<OverlayModuleInfo>>): void;
|
||||
|
||||
/**
|
||||
* Obtain the OverlayModuleInfo of the specified application based on bundleName.
|
||||
*
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
|
||||
* @param { string } bundleName - Indicates the application bundle name of the overlay bundle to be quired.
|
||||
* @param { string } moduleName - Indicates the module name of the overlay module to be queried.
|
||||
@ -104,11 +186,12 @@ declare namespace overlay {
|
||||
* @systemapi
|
||||
* @since 10
|
||||
*/
|
||||
function getOverlayModuleInfoByBundleName(bundleName: string, callback: AsyncCallback<Array<OverlayModuleInfo>>): void;
|
||||
function getOverlayModuleInfoByBundleName(bundleName: string, moduleName: string, callback: AsyncCallback<Array<OverlayModuleInfo>>): void;
|
||||
function getOverlayModuleInfoByBundleName(bundleName: string,
|
||||
moduleName: string, callback: AsyncCallback<Array<OverlayModuleInfo>>): void;
|
||||
|
||||
/**
|
||||
* Obtain the OverlayModuleInfo of the specified application based on bundleName and moduleName.
|
||||
*
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
|
||||
* @param { string } bundleName - Indicates the application bundle name of the overlay bundle to be quired.
|
||||
* @param { string } moduleName - Indicates the module name of the overlay module to be queried.
|
||||
@ -124,7 +207,26 @@ declare namespace overlay {
|
||||
* @systemapi
|
||||
* @since 10
|
||||
*/
|
||||
function getOverlayModuleInfoByBundleName(bundleName: string, moduleName?: string): Promise<Array<OverlayModuleInfo>>;
|
||||
function getOverlayModuleInfoByBundleName(bundleName: string,
|
||||
moduleName?: string): Promise<Array<OverlayModuleInfo>>;
|
||||
|
||||
/**
|
||||
* Obtain the OverlayModuleInfo of the specified target application based on bundleName.
|
||||
*
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
|
||||
* @param { string } targetBundleName - Indicates the application target bundle name of the overlay bundle to be quired.
|
||||
* @param { AsyncCallback<Array<OverlayModuleInfo>> } callback - The callback of getting a list of OverlayModuleInfo object.
|
||||
* @throws { BusinessError } 401 - The parameter check failed.
|
||||
* @throws { BusinessError } 201 - Permission denied.
|
||||
* @throws { BusinessError } 202 - Permission denied, non-system app called system api.
|
||||
* @throws { BusinessError } 17700001 - The specified bundleName is not found.
|
||||
* @throws { BusinessError } 17700035 - The specified bundle is an overlay bundle.
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework.Overlay
|
||||
* @systemapi
|
||||
* @since 10
|
||||
*/
|
||||
function getTargetOverlayModuleInfosByBundleName(targetBundleName: string,
|
||||
callback: AsyncCallback<Array<OverlayModuleInfo>>): void;
|
||||
|
||||
/**
|
||||
* Obtain the OverlayModuleInfo of the specified target application based on bundleName.
|
||||
@ -144,11 +246,12 @@ declare namespace overlay {
|
||||
* @systemapi
|
||||
* @since 10
|
||||
*/
|
||||
function getTargetOverlayModuleInfosByBundleName(targetBundleName: string, callback: AsyncCallback<Array<OverlayModuleInfo>>): void;
|
||||
function getTargetOverlayModuleInfosByBundleName(targetBundleName: string, moduleName: string, callback: AsyncCallback<Array<OverlayModuleInfo>>): void;
|
||||
function getTargetOverlayModuleInfosByBundleName(targetBundleName: string,
|
||||
moduleName: string, callback: AsyncCallback<Array<OverlayModuleInfo>>): void;
|
||||
|
||||
/**
|
||||
* Obtain the OverlayModuleInfo of the specified target application based on bundleName and moduleName.
|
||||
*
|
||||
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
|
||||
* @param { string } targetBundleName - Indicates the application target bundle name of the overlay bundle to be quired.
|
||||
* @param { string } moduleName - Indicates the module name of the overlay module to be queried.
|
||||
@ -164,14 +267,16 @@ declare namespace overlay {
|
||||
* @systemapi
|
||||
* @since 10
|
||||
*/
|
||||
function getTargetOverlayModuleInfosByBundleName(targetBundleName: string, moduleName?: string): Promise<Array<OverlayModuleInfo>>;
|
||||
function getTargetOverlayModuleInfosByBundleName(targetBundleName: string,
|
||||
moduleName?: string): Promise<Array<OverlayModuleInfo>>;
|
||||
|
||||
/**
|
||||
* Obtains configuration information about a overlay hap module.
|
||||
*
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework.Overlay
|
||||
* @since 10
|
||||
*/
|
||||
export type OverlayModuleInfo = _OverlayModuleInfo.OverlayModuleInfo;
|
||||
export type OverlayModuleInfo = _OverlayModuleInfo.OverlayModuleInfo;
|
||||
}
|
||||
|
||||
export default overlay;
|
||||
export default overlay;
|
||||
|
Loading…
x
Reference in New Issue
Block a user