提交 250dde74 编写于 作者: G Gloria

Update docs against 16632+16245+16625+16458+16575+16632+11924+11931+16533

Signed-off-by: wusongqing<wusongqing@huawei.com>
上级 e7ea18b3
......@@ -5,6 +5,8 @@ The **BundlePackInfo** module provides information in the **pack.info** file. Th
> **NOTE**
>
> The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version.
>
> The APIs provided by this module are system APIs.
## BundlePackInfo
......@@ -63,10 +65,10 @@ The **BundlePackInfo** module provides information in the **pack.info** file. Th
| ------------------ | ------------------------------------------------- | ---- | ---- | ---------------------------------- |
| mainAbility | string | Yes| No| Name of the main ability.|
| apiVersion | [ApiVersion](#apiversion) | Yes | No | API version of the module. |
| deviceType | Array\<string> | Yes | No | Device types supported by the module. |
| deviceTypes | Array\<string> | Yes | No | Device types supported by the module. |
| distro | [ModuleDistroInfo](#moduledistroinfo) | Yes | No | Distribution information of the module. |
| abilities | Array\<[ModuleAbilityInfo](#moduleabilityinfo)> | Yes | No | Ability information of the module. |
| extensionAbilities | Array\<[ExtensionAbilities](#extensionability)> | Yes | No | ExtensionAbility information of the module.|
| extensionAbilities | Array\<[ExtensionAbility](#extensionability)> | Yes | No | ExtensionAbility information of the module.|
## ModuleDistroInfo
......@@ -123,7 +125,7 @@ The **BundlePackInfo** module provides information in the **pack.info** file. Th
## ApiVersion
**System API**: This is a system API and cannot be called by third-party applications.
**System API**: This is a system API.
**System capability**: SystemCapability.BundleManager.BundleFrameWork.FreeInstall
......
......@@ -32,3 +32,4 @@ The **ApplicationInfo** module defines the application information. A system app
| appDistributionType | string | Yes | No | Distribution type of the application signing certificate. The options are **app_gallery**, **enterprise**, **os_integration**, and **crowdtesting**. |
| appProvisionType | string | Yes | No | Type of the application signing certificate file. The options are **debug** and **release**. |
| systemApp | boolean | Yes | No | Whether the application is a system application. |
| bundleType |[BundleType](js-apis-bundleManager.md#bundletype) | Yes | No | Bundle type, which can be **APP** (common application) or **ATOMIC_SERVICE** (atomic service). |
......@@ -26,3 +26,28 @@ The **HapModuleInfo** module defines the HAP module information. A system applic
| deviceTypes | Array\<string> | Yes | No | Types of devices where the module can run. |
| installationFree | boolean | Yes | No | Whether installation-free is supported. |
| hashValue | string | Yes | No | Hash value of the module. |
| moduleType | [ModuleType](js-apis-bundleManager.md#moduletype) | Yes | No | Type of the module. |
| preloads | Array\<[PreloadItem](#preloaditem)> | Yes | No | Preloaded modules in the atomic service.|
| dependencies | Array\<[Dependency](#dependency)> | Yes | No | Dynamic shared libraries on which the module depends. |
## PreloadItem
Describes the preloaded module information in the atomic service.
**System capability**: SystemCapability.BundleManager.BundleFramework.Core
| Name | Type | Readable| Writable| Description |
| --------- | -------------- | ---- | ---- | --------------------------- |
|moduleName | string | Yes | No | Name of the module automatically preloaded by the system.|
## Dependency
Describes the information about the dynamic shared library on which the module depends.
**System capability**: SystemCapability.BundleManager.BundleFramework.Core
| Name | Type | Readable| Writable| Description |
| ----------- | ------ | ---- | ---- | ---------------------- |
| bundleName | string | Yes | No | Name of the shared bundle on which the current module depends. |
| moduleName | string | Yes | No | Module name of the shared bundle on which the current module depends.|
| versionCode | number | Yes | No | Version number of the shared bundle. |
......@@ -49,7 +49,7 @@ Enumerates the application flags, which indicate the type of application informa
**System capability**: SystemCapability.BundleManager.BundleFramework.Core
**System API**: This is a system API and cannot be called by third-party applications.
**System API**: This is a system API.
| Name | Value | Description |
| ------------------------------------ | ---------- | ------------------------------------------------------------ |
......@@ -64,7 +64,7 @@ Enumerates the ability flags, which indicate the type of ability information to
**System capability**: SystemCapability.BundleManager.BundleFramework.Core
**System API**: This is a system API and cannot be called by third-party applications.
**System API**: This is a system API.
| Name | Value | Description |
| --------------------------------- | ---------- | ------------------------------------------------------------ |
......@@ -81,7 +81,7 @@ Enumerates the Extension ability flags, which indicate the type of Extension abi
**System capability**: SystemCapability.BundleManager.BundleFramework.Core
**System API**: This is a system API and cannot be called by third-party applications.
**System API**: This is a system API.
| Name | Value | Description |
| ------------------------------------------- | ---------- | ------------------------------------------------------------ |
......@@ -187,6 +187,39 @@ Enumerates the display orientations of the ability. This attribute applies only
| AUTO_ROTATION_PORTRAIT_RESTRICTED |11|Switched-determined auto rotation in the vertical direction.|
| LOCKED |12|Locked.|
### CompatiblePolicy
Defines the version compatibility type of the shared library.
**System capability**: SystemCapability.BundleManager.BundleFramework.Core
| Name | Value | Description |
| ---------------------- | ---- | -------------------------------- |
| BACKWARD_COMPATIBILITY | 1 | The shared library is backward compatible.|
### ModuleType
Enumerates the module types.
**System capability**: SystemCapability.BundleManager.BundleFramework.Core
| Name | Value | Description |
| ------- | ---- | -------------------- |
| ENTRY | 1 | Main module of the application. |
| FEATURE | 2 | Dynamic feature module of the application.|
| SHARED | 3 | Dynamic shared library module of the application. |
### BundleType
Enumerates the bundle types.
**System capability**: SystemCapability.BundleManager.BundleFramework.Core
| Name | Value | Description |
| -------------- | ---- | --------------- |
| APP | 0 | The bundle is a common application. |
| ATOMIC_SERVICE | 1 | The bundle is an atomic service.|
## APIs
### bundleManager.getBundleInfoForSelf
......@@ -1077,7 +1110,7 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc
| ID| Error Message |
| -------- | ------------------------------------- |
| 17700001 | The specified bundleName is not found. |
| 17700003 | The specified extensionAbility is not found. |
| 17700003 | The specified ability is not found. |
| 17700004 | The specified userId is invalid. |
| 17700026 | The specified bundle is disabled. |
| 17700029 | The specified ability is disabled. |
......@@ -3036,47 +3069,3 @@ try {
hilog.error(0x0000, 'testTag', 'getAllSharedBundleInfo failed. Cause: %{public}s', err.message);
}
```
## CompatiblePolicy
Defines the version compatibility type of the shared library.
**System capability**: SystemCapability.BundleManager.BundleFramework.Core
| Name | Value | Description |
| ---------------------- | ---- | -------------------------------- |
| BACKWARD_COMPATIBILITY | 1 | The shared library is backward compatible.|
## ModuleType
Enumerates the module types.
**System capability**: SystemCapability.BundleManager.BundleFramework.Core
| Name | Value | Description |
| ------- | ---- | -------------------- |
| ENTRY | 1 | Main module of the application. |
| FEATURE | 2 | Dynamic feature module of the application.|
| SHARED | 3 | Dynamic shared library module of the application. |
## BundleType
Enumerates the bundle types.
**System capability**: SystemCapability.BundleManager.BundleFramework.Core
| Name | Value | Description |
| -------------- | ---- | --------------- |
| APP | 0 | The bundle is a common application. |
| ATOMIC_SERVICE | 1 | The bundle is an atomic service.|
## AtomicServiceModuleType
Enumerates the module types of an atomic service.
**System capability**: SystemCapability.BundleManager.BundleFramework.Core
| Name | Value | Description |
| ------ | ---- | --------------------------- |
| NORMAL | 0 | Page package in the atomic service. |
| MAIN | 1 | Landing page package in the atomic service.|
......@@ -299,7 +299,7 @@ try {
getBundlePackInfo(bundleName: string, bundlePackFlag : BundlePackFlag): Promise\<BundlePackInfo>;
Obtains **bundlePackInfo** based on **bundleName** and **bundleFlag**. This API uses a promise to return the result.
Obtains **bundlePackInfo** based on **bundleName** and **BundlePackFlag**. This API uses a promise to return the result.
**System API**: This is a system API.
......
......@@ -26,7 +26,7 @@ getBundleInstaller(callback: AsyncCallback\<BundleInstaller>): void;
Obtains a **BundleInstaller** object. This API uses an asynchronous callback to return the result.
**System API**: This is a system API and cannot be called by third-party applications.
**System API**: This is a system API.
**System capability**: SystemCapability.BundleManager.BundleFramework.Core
......@@ -60,7 +60,7 @@ getBundleInstaller(): Promise\<BundleInstaller>;
Obtains a **BundleInstaller** object. This API uses an asynchronous callback to return the result.
**System API**: This is a system API and cannot be called by third-party applications.
**System API**: This is a system API.
**System capability**: SystemCapability.BundleManager.BundleFramework.Core
......@@ -90,7 +90,7 @@ install(hapFilePaths: Array&lt;string&gt;, installParam: InstallParam, callback:
Installs a bundle. This API uses an asynchronous callback to return the result.
**System API**: This is a system API and cannot be called by third-party applications.
**System API**: This is a system API.
**Required permissions**: ohos.permission.INSTALL_BUNDLE
......@@ -119,7 +119,9 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc
| 17700017 | Failed to install the HAP since the version of the HAP to install is too early. |
| 17700018 | Failed to install because the dependent module does not exist. |
| 17700031 | Failed to install the HAP because the overlay check of the HAP is failed. |
| 17700036 | Failed to install because without allow app shared bundle permission. |
| 17700036 | Failed to install the HSP because lacks appropriate permissions. |
| 17700039 | Failed to install because disallow install a shared bundle by hapFilePaths. |
| 17700041 | Failed to install because enterprise device management disallow install. |
**Example**
......@@ -149,13 +151,84 @@ try {
}
```
## BundleInstaller.install
install(hapFilePaths: Array\<string\>, installParam?: InstallParam) : Promise\<void\>;
Installs a bundle. This API uses a promise to return the result.
**System API**: This is a system API.
**Required permissions**: ohos.permission.INSTALL_BUNDLE
**System capability**: SystemCapability.BundleManager.BundleFramework.Core
**Parameters**
| Name | Type | Mandatory| Description |
| ------------ | ----------------------------- | ---- | ------------------------------------------------------------ |
| hapFilePaths | Array\<string\> | Yes | Paths where the HAP files of the bundle are stored, which are the data directories. If only one directory is passed, the HAP files in the directory must belong to the same bundle and have the same signature.|
| installParam | [InstallParam](#installparam) | No | Parameters required for the installation. |
**Return value**
| Type | Description |
| --------------- | -------------------------------------- |
| Promise\<void\> | Promise that returns no value.|
**Error codes**
For details about the error codes, see [Bundle Error Codes](../errorcodes/errorcode-bundle.md).
| ID| Error Message |
| -------- | ------------------------------------------------------------ |
| 17700004 | The specified user ID is not found. |
| 17700010 | Failed to install the HAP because the HAP fails to be parsed. |
| 17700011 | Failed to install the HAP because the HAP signature fails to be verified. |
| 17700012 | Failed to install the HAP because the HAP path is invalid or the HAP is too large. |
| 17700015 | Failed to install the HAPs because they have different configuration information. |
| 17700016 | Failed to install the HAP because of insufficient system disk space. |
| 17700017 | Failed to install the HAP since the version of the HAP to install is too early. |
| 17700018 | Failed to install because the dependent module does not exist. |
| 17700031 | Failed to install the HAP because the overlay check of the HAP is failed. |
| 17700036 | Failed to install the HSP because lacks appropriate permissions. |
| 17700039 | Failed to install because disallow install a shared bundle by hapFilePaths. |
| 17700041 | Failed to install because enterprise device management disallow install. |
**Example**
```ts
import installer from '@ohos.bundle.installer';
let hapFilePaths = ['/data/storage/el2/base/haps/entry/files/'];
let installParam = {
userId: 100,
isKeepData: false,
installFlag: 1,
};
try {
installer.getBundleInstaller().then(data => {
data.install(hapFilePaths, installParam)
.then((data) => {
console.info('install success: ' + JSON.stringify(data));
}).catch((error) => {
console.error('install failed:' + err.message);
});
}).catch(error => {
console.error('getBundleInstaller failed. Cause: ' + error.message);
});
} catch (error) {
console.error('getBundleInstaller failed. Cause: ' + error.message);
}
```
## BundleInstaller.uninstall
uninstall(bundleName: string, installParam: InstallParam, callback: AsyncCallback&lt;void&gt;): void;
Uninstalls a bundle. This API uses an asynchronous callback to return the result.
**System API**: This is a system API and cannot be called by third-party applications.
**System API**: This is a system API.
**Required permissions**: ohos.permission.INSTALL_BUNDLE
......@@ -177,6 +250,7 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc
| -------- | ------------------------------------------------------------ |
| 17700004 | The specified user ID is not found. |
| 17700020 | The specified bundle is pre-installed bundle which cannot be uninstalled. |
| 17700040 | The specified bundle is a shared bundle which cannot be uninstalled. |
**Example**
......@@ -212,7 +286,7 @@ uninstall(uninstallParam: UninstallParam, callback : AsyncCallback\<void>) : voi
Uninstalls a shared bundle. This API uses an asynchronous callback to return the result.
**System API**: This is a system API and cannot be called by third-party applications.
**System API**: This is a system API.
**Required permissions**: ohos.permission.INSTALL_BUNDLE
......@@ -266,7 +340,7 @@ uninstall(uninstallParam: UninstallParam) : Promise\<void>;
Uninstalls a shared bundle. This API uses a promise to return the result.
**System API**: This is a system API and cannot be called by third-party applications.
**System API**: This is a system API.
**Required permissions**: ohos.permission.INSTALL_BUNDLE
......@@ -325,7 +399,7 @@ recover(bundleName: string, installParam: InstallParam, callback: AsyncCallback&
Recovers a bundle. This API uses an asynchronous callback to return the result.
**System API**: This is a system API and cannot be called by third-party applications.
**System API**: This is a system API.
**Required permissions**: ohos.permission.INSTALL_BUNDLE
......@@ -381,7 +455,7 @@ Defines the hash parameters for bundle installation and uninstall.
**System capability**: SystemCapability.BundleManager.BundleFramework.Core
**System API**: This is a system API and cannot be called by third-party applications.
**System API**: This is a system API.
| Name | Type | Mandatory| Description |
| ---------- | ------ | ---------------- | ---------------- |
......@@ -394,15 +468,15 @@ Defines the parameters that need to be specified for bundle installation, uninst
**System capability**: SystemCapability.BundleManager.BundleFramework.Core
**System API**: This is a system API and cannot be called by third-party applications.
**System API**: This is a system API.
| Name | Type | Mandatory | Description |
| ------------------------------ | ------------------------------ | ------------------ | ------------------ |
| userId | number | Yes | User ID. You can use [queryOsAccountLocalIdFromProcess](js-apis-osAccount.md#getOsAccountLocalId) to obtain the user of the current process.|
| installFlag | number | Yes | Installation flag. The value **0** means initial installation and **1** means overwrite installation.|
| isKeepData | boolean | Yes | Whether to retain the data directory during bundle uninstall.|
| hashParams | Array<[HashParam](#hashparam)> | Yes| Hash parameters. |
| crowdtestDeadline| number | Yes |End date of crowdtesting.|
| userId | number | No | User ID. You can use [queryOsAccountLocalIdFromProcess](js-apis-osAccount.md#getOsAccountLocalId) to obtain the user of the current process.|
| installFlag | number | No | Installation flag. The value **0** means initial installation and **1** means overwrite installation.|
| isKeepData | boolean | No | Whether to retain the data directory during bundle uninstall.|
| hashParams | Array<[HashParam](#hashparam)> | No| Hash parameters. |
| crowdtestDeadline| number | No |End date of crowdtesting.|
| sharedBundleDirPaths | Array\<String> | No|Paths of the shared bundle files.|
## UninstallParam<sup>10+</sup>
......@@ -411,7 +485,7 @@ Defines the parameters required for the uninstallation of a shared bundle.
**System capability**: SystemCapability.BundleManager.BundleFramework.Core
**System API**: This is a system API and cannot be called by third-party applications.
**System API**: This is a system API.
| Name | Type | Mandatory| Description |
| ----------- | ------ | ---- | ------------------------------------------------------------ |
......
......@@ -5,8 +5,6 @@ The **overlay** module provides APIs for installing a [module with the overlay f
> **NOTE**
>
> The initial APIs of this module are supported since API version 10. Newly added APIs will be marked with a superscript to indicate their earliest API version.
>
> The APIs provided by this module are system APIs.
## Modules to Import
......@@ -41,8 +39,8 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc
| ID| Error Message |
| ------ | -------------------------------------- |
| 17700002 | The specified moduleName is not existed. |
| 17700033 | The specified moduleName is not overlay module. |
| 17700002 | The specified module name is not found. |
| 17700033 | The specified module is not an overlay module. |
**Example**
......@@ -84,8 +82,8 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc
| ID| Error Message |
| ------ | -------------------------------------- |
| 17700002 | The specified moduleName is not existed. |
| 17700033 | The specified moduleName is not overlay module. |
| 17700002 | The specified module name is not found. |
| 17700033 | The specified module is not an overlay module. |
**Example**
......@@ -116,7 +114,7 @@ Enables or disables a module with the overlay feature in another application. Th
**System capability**: SystemCapability.BundleManager.BundleFramework.Overlay
**System API**: This is a system API and cannot be called by third-party applications.
**System API**: This is a system API.
**Parameters**
......@@ -139,9 +137,9 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc
| ID| Error Message |
| ------ | -------------------------------------- |
| 17700001 | The specified bundleName is not found. |
| 17700002 | The specified moduleName is not existed. |
| 17700032 | The specified bundleName does not contain any overlay module. |
| 17700033 | The specified moduleName is not overlay module. |
| 17700002 | The specified module name is not found. |
| 17700032 | The specified bundle does not contain any overlay module. |
| 17700033 | The specified module is not an overlay module. |
**Example**
......@@ -172,7 +170,7 @@ Enables or disables a module with the overlay feature in another application. Th
**System capability**: SystemCapability.BundleManager.BundleFramework.Overlay
**System API**: This is a system API and cannot be called by third-party applications.
**System API**: This is a system API.
**Parameters**
......@@ -181,7 +179,7 @@ Enables or disables a module with the overlay feature in another application. Th
| bundleName | string | Yes | Bundle name of the application. |
| moduleName | string | Yes | HAP name of the module with the overlay feature. |
| isEnabled | boolean | Yes | Whether to enable the module with the overlay feature. The value **true** means to enable the module, and **false** means to disable the module.|
| callback | AsyncCallback\<Want> | Yes | Callback used to return the result. If the operation is successful, **err** is **undefined** and **data** is the processing result obtained; otherwise, **err** is an error object. |
| callback | AsyncCallback\<void> | Yes | Callback used to return the result. If the operation is successful, **err** is **undefined** and data is the processing result obtained; otherwise, **err** is an error object. |
**Error codes**
......@@ -190,9 +188,9 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc
| ID| Error Message |
| ------ | -------------------------------------- |
| 17700001 | The specified bundleName is not found. |
| 17700002 | The specified moduleName is not existed. |
| 17700032 | The specified bundleName does not contain any overlay module. |
| 17700033 | The specified moduleName is not overlay module. |
| 17700002 | The specified module name is not found. |
| 17700032 | The specified bundle does not contain any overlay module. |
| 17700033 | The specified module is not an overlay module. |
**Example**
......@@ -240,8 +238,9 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc
| ID| Error Message |
| ------ | -------------------------------------- |
| 17700002 | The specified moduleName is not existed. |
| 17700033 | The specified moduleName is not overlay module. |
| 17700002 | The specified module name is not found. |
| 17700032 | he specified bundle does not contain any overlay module. |
| 17700033 | The specified module is not an overlay module. |
**Example**
......@@ -271,7 +270,7 @@ Obtains the information about a module with the overlay feature in the current a
| Name | Type | Mandatory | Description |
| ----------- | ------ | ---- | --------------------------------------- |
| moduleName | string | Yes | HAP name of the module with the overlay feature. |
| callback | AsyncCallback\<OverlayModuleInfo> | Yes | Callback used to return the result, which is an **OverlayModuleInfo** object. If the operation is successful, **err** is **undefined**; otherwise, **err** is an error object. |
| callback | AsyncCallback\<OverlayModuleInfo> | Yes | Callback used to return the result. If the operation is successful, **err** is **undefined**; otherwise, **err** is an error object. |
**Error codes**
......@@ -279,8 +278,9 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc
| ID| Error Message |
| ------ | -------------------------------------- |
| 17700002 | The specified moduleName is not existed. |
| 17700033 | The specified moduleName is not overlay module. |
| 17700002 | The specified module name is not found. |
| 17700032 | he specified bundle does not contain any overlay module. |
| 17700033 | The specified module is not an overlay module. |
**Example**
......@@ -325,8 +325,8 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc
| ID| Error Message |
| ------ | -------------------------------------- |
| 17700002 | The specified moduleName is not existed. |
| 17700034 | The specified moduleName is overlay module. |
| 17700002 | The specified module name is not found. |
| 17700034 | The specified module is an overlay module. |
**Example**
......@@ -356,7 +356,7 @@ Obtains the information about modules with the overlay feature in the current ap
| Name | Type | Mandatory | Description |
| ----------- | ------ | ---- | --------------------------------------- |
| targetModuleName | string | Yes | HAP name of the target module specified by modules with the overlay feature. |
| callback | AsyncCallback\<Array\<OverlayModuleInfo>> | Yes | Callback used to return the result, which is an array of **OverlayModuleInfo** objects. If the operation is successful, **err** is **undefined**; otherwise, **err** is an error object. |
| callback | AsyncCallback\<Array\<OverlayModuleInfo>> | Yes | Callback used to return the result. If the operation is successful, **err** is **undefined**; otherwise, **err** is an error object. |
**Error codes**
......@@ -364,8 +364,8 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc
| ID| Error Message |
| ------ | -------------------------------------- |
| 17700002 | The specified moduleName is not existed. |
| 17700034 | The specified moduleName is overlay module. |
| 17700002 | The specified module name is not found. |
| 17700034 | The specified module is an overlay module. |
**Example**
......@@ -394,7 +394,7 @@ Obtains the information about a module with the overlay feature in another appli
**System capability**: SystemCapability.BundleManager.BundleFramework.Overlay
**System API**: This is a system API and cannot be called by third-party applications.
**System API**: This is a system API.
**Parameters**
......@@ -416,9 +416,9 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc
| ID| Error Message |
| ------ | -------------------------------------- |
| 17700001 | The specified bundleName is not found |
| 17700002 | The specified moduleName is not existed. |
| 17700032 | The specified bundleName does not contain any overlay module. |
| 17700033 | The specified moduleName is not overlay module. |
| 17700002 | The specified module name is not found. |
| 17700032 | The specified bundle does not contain any overlay module. |
| 17700033 | The specified module is not an overlay module. |
**Example**
......@@ -446,7 +446,7 @@ Obtains the information about a module with the overlay feature in another appli
**System capability**: SystemCapability.BundleManager.BundleFramework.Overlay
**System API**: This is a system API and cannot be called by third-party applications.
**System API**: This is a system API.
**Parameters**
......@@ -454,7 +454,7 @@ Obtains the information about a module with the overlay feature in another appli
| ----------- | ------ | ---- | --------------------------------------- |
| bundleName | string | Yes | Bundle name of the application. |
| moduleName | string | Yes | HAP name of the module with the overlay feature. If this parameter is not specified, the API obtains the information of all modules with the overlay feature in that application. |
| callback | AsyncCallback\<Array\<OverlayModuleInfo>> | Yes | Callback used to return the result, which is an array of **OverlayModuleInfo** objects. If the operation is successful, **err** is **undefined**; otherwise, **err** is an error object. |
| callback | AsyncCallback\<Array\<OverlayModuleInfo>> | Yes | Callback used to return the result. If the operation is successful, **err** is **undefined**; otherwise, **err** is an error object. |
**Error codes**
......@@ -463,9 +463,9 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc
| ID| Error Message |
| ------ | -------------------------------------- |
| 17700001 | The specified bundleName is not found |
| 17700002 | The specified moduleName is not existed. |
| 17700032 | The specified bundleName does not contain any overlay module. |
| 17700033 | The specified moduleName is not overlay module. |
| 17700002 | The specified module name is not found. |
| 17700032 | The specified bundle does not contain any overlay module. |
| 17700033 | The specified module is not an overlay module. |
**Example**
......@@ -496,14 +496,14 @@ Obtains the information about all modules with the overlay feature in another ap
**System capability**: SystemCapability.BundleManager.BundleFramework.Overlay
**System API**: This is a system API and cannot be called by third-party applications.
**System API**: This is a system API.
**Parameters**
| Name | Type | Mandatory | Description |
| ----------- | ------ | ---- | --------------------------------------- |
| bundleName | string | Yes | Bundle name of the application. |
| callback | AsyncCallback\<Array\<OverlayModuleInfo>> | Yes | Callback used to return the result, which is an array of **OverlayModuleInfo** objects. If the operation is successful, **err** is **undefined**; otherwise, **err** is an error object. |
| callback | AsyncCallback\<Array\<OverlayModuleInfo>> | Yes | Callback used to return the result. If the operation is successful, **err** is **undefined**; otherwise, **err** is an error object. |
**Error codes**
......@@ -512,9 +512,9 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc
| ID| Error Message |
| ------ | -------------------------------------- |
| 17700001 | The specified bundleName is not found |
| 17700002 | The specified moduleName is not existed. |
| 17700032 | The specified bundleName does not contain any overlay module. |
| 17700033 | The specified moduleName is not overlay module. |
| 17700002 | The specified module name is not found. |
| 17700032 | The specified bundle does not contain any overlay module. |
| 17700033 | The specified module is not an overlay module. |
**Example**
......@@ -544,7 +544,7 @@ Obtains the information about modules with the overlay feature in another applic
**System capability**: SystemCapability.BundleManager.BundleFramework.Overlay
**System API**: This is a system API and cannot be called by third-party applications.
**System API**: This is a system API.
**Parameters**
......@@ -557,7 +557,7 @@ Obtains the information about modules with the overlay feature in another applic
| Type | Description |
| ------------------------- | ------------------ |
| Promise\<Array\<OverlayModuleInfo>> | Promise used to return the result, which is an array of **OverlayModuleInfo** objects.|
| Promise\<Array\<OverlayModuleInfo>> | Promise used to return the array of overlay module information obtained.|
**Error codes**
......@@ -566,9 +566,9 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc
| ID| Error Message |
| ------ | -------------------------------------- |
| 17700001 | The specified bundleName is not found |
| 17700002 | The specified moduleName is not existed. |
| 17700034 | The specified moduleName is overlay module. |
| 17700035 | The specified bundleName is overlay bundle. |
| 17700002 | The specified module name is not found. |
| 17700034 | The specified module is an overlay module. |
| 17700035 | The specified bundle is an overlay bundle. |
**Example**
......@@ -596,15 +596,15 @@ Obtains the information about modules with the overlay feature in another applic
**System capability**: SystemCapability.BundleManager.BundleFramework.Overlay
**System API**: This is a system API and cannot be called by third-party applications.
**System API**: This is a system API.
**Parameters**
| Name | Type | Mandatory | Description |
| ----------- | ------ | ---- | --------------------------------------- |
| targetBundleName | string | Yes | Bundle name of the application. |
| moduleName | string | No | HAP name of the target module, which is **targetModuleName** specified by modules with the overlay feature. If this parameter is not specified, the API obtains the information associated with all modules in that application. |
| callback | AsyncCallback\<Array\<OverlayModuleInfo>> | Yes | Callback used to return the result, which is an array of **OverlayModuleInfo** objects. If the operation is successful, **err** is **undefined**; otherwise, **err** is an error object. |
| moduleName | string | Yes | HAP name of the target module, which is **targetModuleName** specified by modules with the overlay feature. If this parameter is not specified, the API obtains the information associated with all modules in that application. |
| callback | AsyncCallback\<Array\<OverlayModuleInfo>> | Yes | Callback used to return the result. If the operation is successful, **err** is **undefined**; otherwise, **err** is an error object. |
**Error codes**
......@@ -613,9 +613,9 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc
| ID| Error Message |
| ------ | -------------------------------------- |
| 17700001 | The specified bundleName is not found |
| 17700002 | The specified moduleName is not existed. |
| 17700034 | The specified moduleName is overlay module. |
| 17700035 | The specified bundleName is overlay bundle. |
| 17700002 | The specified module name is not found. |
| 17700034 | The specified module is an overlay module. |
| 17700035 | The specified bundle is an overlay bundle. |
**Example**
......@@ -646,14 +646,14 @@ Obtains the information about all modules with the overlay feature in another ap
**System capability**: SystemCapability.BundleManager.BundleFramework.Overlay
**System API**: This is a system API and cannot be called by third-party applications.
**System API**: This is a system API.
**Parameters**
| Name | Type | Mandatory | Description |
| ----------- | ------ | ---- | --------------------------------------- |
| targetBundleName | string | Yes | Bundle name of the application. |
| callback | AsyncCallback\<Array\<OverlayModuleInfo>> | Yes | Callback used to return the result, which is an array of **OverlayModuleInfo** objects. If the operation is successful, **err** is **undefined**; otherwise, **err** is an error object. |
| callback | AsyncCallback\<Array\<OverlayModuleInfo>> | Yes | Callback used to return the result. If the operation is successful, **err** is **undefined**; otherwise, **err** is an error object. |
**Error codes**
......@@ -662,9 +662,9 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc
| ID| Error Message |
| ------ | -------------------------------------- |
| 17700001 | The specified bundleName is not found |
| 17700002 | The specified moduleName is not existed. |
| 17700034 | The specified moduleName is overlay module. |
| 17700035 | The specified bundleName is overlay bundle. |
| 17700002 | The specified module name is not found. |
| 17700034 | The specified module is an overlay module. |
| 17700035 | The specified bundle is an overlay bundle. |
**Example**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册