1 Star 0 Fork 4.8K

Lin_bruin / docs

forked from OpenHarmony / docs 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
bundle_manager-h.md 9.81 KB
一键复制 编辑 原始数据 按行查看 历史
wenjun 提交于 2020-09-08 10:08 . add OpenHarmony 1.0 baseline

bundle_manager.h

Overview

Related Modules:

BundleManager

Description:

Declares functions used for managing application bundles and obtaining bundle information.

You can use functions provided in this file to install, update, or uninstall an application, obtain AbilityInfo and BundleInfo about an application, obtain the bundle name of an application based on the application's user ID (UID), and obtain BundleInfo objects of all applications or keep-alive applications in the system.

Since:

1.0

Version:

1.0

Summary

Typedefs

Typedef Name

Description

InstallerCallback) (const uint8_t resultCode, const void *resultMessage)

typedef void(* 

Called when an application is installed, updated, or uninstalled.

Functions

Function Name

Description

RegisterCallback (BundleStatusCallback *BundleStatusCallback)

int32_t 

Registers a callback to monitor the installation, update, and uninstallation state changes of an application.

UnregisterCallback ()

int32_t 

Unregisters a callback previously registered for monitoring the installation, update, and uninstallation state changes of an application.

Install (const char *hapPath, const InstallParam *installParam, InstallerCallback installerCallback)

bool 

Installs or updates an application.

Uninstall (const char *bundleName, const InstallParam *installParam, InstallerCallback installerCallback)

bool 

Uninstalls an application.

QueryAbilityInfo (const Want *want, AbilityInfo *abilityInfo)

uint8_t 

Queries the AbilityInfo of an ability based on the information carried in the Want structure.

GetBundleInfo (const char *bundleName, int32_t flags, BundleInfo *bundleInfo)

uint8_t 

Obtains the BundleInfo of an application based on the specified bundle name.

GetBundleInfos (const int flags, BundleInfo **bundleInfos, int32_t *len)

uint8_t 

Obtains the BundleInfo of all bundles in the system.

QueryKeepAliveBundleInfos (BundleInfo **bundleInfos, int32_t *len)

uint8_t 

Obtains the BundleInfo of all keep-alive applications in the system.

GetBundleInfosByMetaData (const char *metaDataKey, BundleInfo **bundleInfos, int32_t *len)

uint8_t 

Obtains the BundleInfo of application bundles based on the specified MetaData.

GetBundleNameForUid (int32_t uid, char **bundleName)

uint8_t 

Obtains the bundle name of an application based on the specified UID.

1
https://gitee.com/dreaminghell/docs.git
git@gitee.com:dreaminghell/docs.git
dreaminghell
docs
docs
master

搜索帮助