• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021-2023 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef FOUNDATION_APPEXECFWK_SERVICES_BUNDLEMGR_INCLUDE_BUNDLE_MGR_HOST_IMPL_H
17 #define FOUNDATION_APPEXECFWK_SERVICES_BUNDLEMGR_INCLUDE_BUNDLE_MGR_HOST_IMPL_H
18 
19 #ifdef BUNDLE_FRAMEWORK_FREE_INSTALL
20 #include "bundle_connect_ability_mgr.h"
21 #endif
22 #include "bundle_common_event_mgr.h"
23 #include "bundle_data_mgr.h"
24 #include "bundle_mgr_host.h"
25 #ifdef DISTRIBUTED_BUNDLE_FRAMEWORK
26 #include "distributed_bms_interface.h"
27 #endif
28 #include "inner_bundle_user_info.h"
29 
30 namespace OHOS {
31 namespace AppExecFwk {
32 class BundleMgrHostImpl : public BundleMgrHost {
33 public:
34     BundleMgrHostImpl() = default;
35     virtual ~BundleMgrHostImpl() = default;
36     /**
37      * @brief Obtains the ApplicationInfo based on a given bundle name.
38      * @param appName Indicates the application bundle name to be queried.
39      * @param flag Indicates the flag used to specify information contained
40      *             in the ApplicationInfo object that will be returned.
41      * @param userId Indicates the user ID.
42      * @param appInfo Indicates the obtained ApplicationInfo object.
43      * @return Returns true if the application is successfully obtained; returns false otherwise.
44      */
45     virtual bool GetApplicationInfo(
46         const std::string &appName, const ApplicationFlag flag, const int userId, ApplicationInfo &appInfo) override;
47     /**
48      * @brief Obtains the ApplicationInfo based on a given bundle name.
49      * @param appName Indicates the application bundle name to be queried.
50      * @param flags Indicates the flag used to specify information contained
51      *             in the ApplicationInfo object that will be returned.
52      * @param userId Indicates the user ID.
53      * @param appInfo Indicates the obtained ApplicationInfo object.
54      * @return Returns true if the application is successfully obtained; returns false otherwise.
55      */
56     virtual bool GetApplicationInfo(
57         const std::string &appName, int32_t flags, int32_t userId, ApplicationInfo &appInfo) override;
58     /**
59      * @brief Obtains the ApplicationInfo based on a given bundle name.
60      * @param appName Indicates the application bundle name to be queried.
61      * @param flags Indicates the flag used to specify information contained
62      *             in the ApplicationInfo object that will be returned.
63      * @param userId Indicates the user ID.
64      * @param appInfo Indicates the obtained ApplicationInfo object.
65      * @return Returns ERR_OK if the application is successfully obtained; returns error code otherwise.
66      */
67     virtual ErrCode GetApplicationInfoV9(
68         const std::string &appName, int32_t flags, int32_t userId, ApplicationInfo &appInfo) override;
69     /**
70      * @brief Obtains information about all installed applications of a specified user.
71      * @param flag Indicates the flag used to specify information contained
72      *             in the ApplicationInfo objects that will be returned.
73      * @param userId Indicates the user ID.
74      * @param appInfos Indicates all of the obtained ApplicationInfo objects.
75      * @return Returns true if the applications is successfully obtained; returns false otherwise.
76      */
77     virtual bool GetApplicationInfos(
78         const ApplicationFlag flag, const int userId, std::vector<ApplicationInfo> &appInfos) override;
79     /**
80      * @brief Obtains information about all installed applications of a specified user.
81      * @param flags Indicates the flag used to specify information contained
82      *             in the ApplicationInfo objects that will be returned.
83      * @param userId Indicates the user ID.
84      * @param appInfos Indicates all of the obtained ApplicationInfo objects.
85      * @return Returns true if the applications is successfully obtained; returns false otherwise.
86      */
87     virtual bool GetApplicationInfos(
88         int32_t flags, int32_t userId, std::vector<ApplicationInfo> &appInfos) override;
89     /**
90      * @brief Obtains information about all installed applications of a specified user.
91      * @param flags Indicates the flag used to specify information contained
92      *             in the ApplicationInfo objects that will be returned.
93      * @param userId Indicates the user ID.
94      * @param appInfos Indicates all of the obtained ApplicationInfo objects.
95      * @return Returns ERR_OK if the applications is successfully obtained; returns error code otherwise.
96      */
97     virtual ErrCode GetApplicationInfosV9(
98         int32_t flags, int32_t userId, std::vector<ApplicationInfo> &appInfos) override;
99     /**
100      * @brief Obtains the BundleInfo based on a given bundle name.
101      * @param bundleName Indicates the application bundle name to be queried.
102      * @param flag Indicates the information contained in the BundleInfo object to be returned.
103      * @param bundleInfo Indicates the obtained BundleInfo object.
104      * @param userId Indicates the user ID.
105      * @return Returns true if the BundleInfo is successfully obtained; returns false otherwise.
106      */
107     virtual bool GetBundleInfo(const std::string &bundleName,
108         const BundleFlag flag, BundleInfo &bundleInfo, int32_t userId = Constants::UNSPECIFIED_USERID) override;
109     /**
110      * @brief Obtains the BundleInfo based on a given bundle name.
111      * @param bundleName Indicates the application bundle name to be queried.
112      * @param flags Indicates the information contained in the BundleInfo object to be returned.
113      * @param bundleInfo Indicates the obtained BundleInfo object.
114      * @param userId Indicates the user ID.
115      * @return Returns true if the BundleInfo is successfully obtained; returns false otherwise.
116      */
117     virtual bool GetBundleInfo(const std::string &bundleName,
118         int32_t flags, BundleInfo &bundleInfo, int32_t userId = Constants::UNSPECIFIED_USERID) override;
119     /**
120      * @brief Obtains the BundleInfo based on a given bundle name.
121      * @param bundleName Indicates the application bundle name to be queried.
122      * @param flags Indicates the information contained in the BundleInfo object to be returned.
123      * @param bundleInfo Indicates the obtained BundleInfo object.
124      * @param userId Indicates the user ID.
125      * @return Returns ERR_OK if the BundleInfo is successfully obtained; returns error code otherwise.
126      */
127     virtual ErrCode GetBundleInfoV9(const std::string &bundleName,
128         int32_t flags, BundleInfo &bundleInfo, int32_t userId) override;
129     /**
130      * @brief Obtains the BundleInfo based on a given bundle name.
131      * @param flags Indicates the information contained in the BundleInfo object to be returned.
132      * @param bundleInfo Indicates the obtained BundleInfo object.
133      * @return Returns ERR_OK if the BundleInfo is successfully obtained; returns error code otherwise.
134      */
135     virtual ErrCode GetBundleInfoForSelf(int32_t flags, BundleInfo &bundleInfo) override;
136     /**
137      * @brief Obtains the BundleInfo based on a given bundle name, which the calling app depends on.
138      * @param sharedBundleName Indicates the bundle name to be queried.
139      * @param sharedBundleInfo Indicates the obtained BundleInfo object.
140      * @param flag Indicates the flag, GetDependentBundleInfoFlag.
141      * @return Returns ERR_OK if the BundleInfo is successfully obtained; returns error code otherwise.
142      */
143     virtual ErrCode GetDependentBundleInfo(const std::string &sharedBundleName, BundleInfo &sharedBundleInfo,
144         GetDependentBundleInfoFlag flag = GetDependentBundleInfoFlag::GET_APP_CROSS_HSP_BUNDLE_INFO) override;
145     /**
146      * @brief Obtains the BundlePackInfo based on a given bundle name.
147      * @param bundleName Indicates the application bundle name to be queried.
148      * @param flags Indicates the information contained in the BundleInfo object to be returned.
149      * @param BundlePackInfo Indicates the obtained BundlePackInfo object.
150      * @param userId Indicates the user ID.
151      * @return Returns ERR_OK if the BundlePackInfo is successfully obtained; returns other ErrCode otherwise.
152      */
153     virtual ErrCode GetBundlePackInfo(const std::string &bundleName, const BundlePackFlag flag,
154         BundlePackInfo &bundlePackInfo, int32_t userId = Constants::UNSPECIFIED_USERID) override;
155 
156     /**
157      * @brief Obtains the BundlePackInfo based on a given bundle name.
158      * @param bundleName Indicates the application bundle name to be queried.
159      * @param flags Indicates the information contained in the BundleInfo object to be returned.
160      * @param BundlePackInfo Indicates the obtained BundlePackInfo object.
161      * @param userId Indicates the user ID.
162      * @return Returns ERR_OK if the BundlePackInfo is successfully obtained; returns other ErrCode otherwise.
163      */
164     virtual ErrCode GetBundlePackInfo(const std::string &bundleName, int32_t flags, BundlePackInfo &bundlePackInfo,
165         int32_t userId = Constants::UNSPECIFIED_USERID) override;
166 
167     /**
168      * @brief Obtains BundleInfo of all bundles available in the system.
169      * @param flag Indicates the flag used to specify information contained in the BundleInfo that will be returned.
170      * @param bundleInfos Indicates all of the obtained BundleInfo objects.
171      * @param userId Indicates the user ID.
172      * @return Returns true if the BundleInfos is successfully obtained; returns false otherwise.
173      */
174     virtual bool GetBundleInfos(const BundleFlag flag,
175         std::vector<BundleInfo> &bundleInfos, int32_t userId = Constants::UNSPECIFIED_USERID) override;
176     /**
177      * @brief Obtains BundleInfo of all bundles available in the system.
178      * @param flags Indicates the flag used to specify information contained in the BundleInfo that will be returned.
179      * @param bundleInfos Indicates all of the obtained BundleInfo objects.
180      * @param userId Indicates the user ID.
181      * @return Returns true if the BundleInfos is successfully obtained; returns false otherwise.
182      */
183     virtual bool GetBundleInfos(int32_t flags,
184         std::vector<BundleInfo> &bundleInfos, int32_t userId = Constants::UNSPECIFIED_USERID) override;
185     /**
186      * @brief Obtains BundleInfo of all bundles available in the system.
187      * @param flags Indicates the flag used to specify information contained in the BundleInfo that will be returned.
188      * @param bundleInfos Indicates all of the obtained BundleInfo objects.
189      * @param userId Indicates the user ID.
190      * @return Returns ERR_OK if the BundleInfos is successfully obtained; returns error code otherwise.
191      */
192     virtual ErrCode GetBundleInfosV9(int32_t flags, std::vector<BundleInfo> &bundleInfos, int32_t userId) override;
193     /**
194      * @brief Obtains the application UID based on the given bundle name and user ID.
195      * @param bundleName Indicates the bundle name of the application.
196      * @param userId Indicates the user ID.
197      * @return Returns the uid if successfully obtained; returns -1 otherwise.
198      */
199     virtual bool GetBundleNameForUid(const int uid, std::string &bundleName) override;
200     /**
201      * @brief Obtains all bundle names of a specified application based on the given application UID.
202      * @param uid Indicates the uid.
203      * @param bundleNames Indicates the obtained bundle names.
204      * @return Returns true if the bundle names is successfully obtained; returns false otherwise.
205      */
206     virtual bool GetBundlesForUid(const int uid, std::vector<std::string> &bundleNames) override;
207     /**
208      * @brief Obtains the formal name associated with the given UID.
209      * @param uid Indicates the uid.
210      * @param name Indicates the obtained formal name.
211      * @return Returns ERR_OK if execute success; returns errCode otherwise.
212      */
213     virtual ErrCode GetNameForUid(const int uid, std::string &name) override;
214     /**
215      * @brief Obtains an array of all group IDs associated with a specified bundle.
216      * @param bundleName Indicates the bundle name.
217      * @param gids Indicates the group IDs associated with the specified bundle.
218      * @return Returns true if the gids is successfully obtained; returns false otherwise.
219      */
220     virtual bool GetBundleGids(const std::string &bundleName, std::vector<int> &gids) override;
221     /**
222      * @brief Obtains an array of all group IDs associated with the given bundle name and UID.
223      * @param bundleName Indicates the bundle name.
224      * @param uid Indicates the uid.
225      * @param gids Indicates the group IDs associated with the specified bundle.
226      * @return Returns true if the gids is successfully obtained; returns false otherwise.
227      */
228     virtual bool GetBundleGidsByUid(const std::string &bundleName, const int &uid, std::vector<int> &gids) override;
229     /**
230      * @brief Check whether the app is system app by it's UID.
231      * @param uid Indicates the uid.
232      * @return Returns true if the bundle is a system application; returns false otherwise.
233      */
234     virtual bool CheckIsSystemAppByUid(const int uid) override;
235     /**
236      * @brief Obtains the BundleInfo of application bundles based on the specified metaData.
237      * @param metaData Indicates the metadata to get in the bundle.
238      * @param bundleInfos Indicates all of the obtained BundleInfo objects.
239      * @return Returns true if the BundleInfos is successfully obtained; returns false otherwise.
240      */
241     virtual bool GetBundleInfosByMetaData(const std::string &metaData, std::vector<BundleInfo> &bundleInfos) override;
242     /**
243      * @brief Query the AbilityInfo by the given Want.
244      * @param want Indicates the information of the ability.
245      * @param abilityInfo Indicates the obtained AbilityInfo object.
246      * @return Returns true if the AbilityInfo is successfully obtained; returns false otherwise.
247      */
248     virtual bool QueryAbilityInfo(const Want &want, AbilityInfo &abilityInfo) override;
249 
250 #ifdef BUNDLE_FRAMEWORK_FREE_INSTALL
251     /**
252      * @brief Query the AbilityInfo by the given Want.
253      * @param want Indicates the information of the ability.
254      * @param abilityInfo Indicates the obtained AbilityInfo object.
255      * @return Returns true if the AbilityInfo is successfully obtained; returns false otherwise.
256      */
257     virtual bool QueryAbilityInfo(const Want &want, int32_t flags, int32_t userId,
258         AbilityInfo &abilityInfo, const sptr<IRemoteObject> &callBack) override;
259 
260     /**
261      * @brief Silent install by the given Want.
262      * @param want Indicates the information of the want.
263      * @param userId Indicates the user ID.
264      * @param callBack Indicates the callback to be invoked for return the operation result.
265      * @return Returns true if silent install successfully; returns false otherwise.
266      */
267     virtual bool SilentInstall(const Want &want, int32_t userId, const sptr<IRemoteObject> &callBack) override;
268 
269     virtual bool CheckAbilityEnableInstall(
270         const Want &want, int32_t missionId, int32_t userId, const sptr<IRemoteObject> &callback) override;
271 #endif
272     /**
273      * @brief Obtains the AbilityInfo based on a given bundle name through the proxy object.
274      * @param bundleName Indicates the application bundle name to be queried.
275      * @param abilityName Indicates the application ability name to be queried.
276      * @param abilityInfo Indicates the obtained AbilityInfo object.
277      * @return Returns true if the application is successfully obtained; returns false otherwise.
278      */
279     virtual bool GetAbilityInfo(
280         const std::string &bundleName, const std::string &abilityName, AbilityInfo &abilityInfo) override;
281     /**
282      * @brief Obtains the AbilityInfo based on a given bundle name through the proxy object.
283      * @param bundleName Indicates the application bundle name to be queried.
284      * @param moduleName Indicates the module name to be queried.
285      * @param abilityName Indicates the application ability name to be queried.
286      * @param abilityInfo Indicates the obtained AbilityInfo object.
287      * @return Returns true if the application is successfully obtained; returns false otherwise.
288      */
289     virtual bool GetAbilityInfo(
290         const std::string &bundleName, const std::string &moduleName,
291         const std::string &abilityName, AbilityInfo &abilityInfo) override;
292     /**
293      * @brief Query the AbilityInfo by the given Want.
294      * @param want Indicates the information of the ability.
295      * @param flags Indicates the information contained in the AbilityInfo object to be returned.
296      * @param userId Indicates the user ID.
297      * @param abilityInfo Indicates the obtained AbilityInfo object.
298      * @return Returns true if the AbilityInfo is successfully obtained; returns false otherwise.
299      */
300     virtual bool QueryAbilityInfo(const Want &want, int32_t flags, int32_t userId, AbilityInfo &abilityInfo) override;
301 #ifdef BUNDLE_FRAMEWORK_FREE_INSTALL
302     /**
303      * @brief Upgrade atomic service
304      * @param want Indicates the information of the ability.
305      * @param userId Indicates the user ID.
306      */
307     virtual void UpgradeAtomicService(const Want &want, int32_t userId) override;
308 
309     virtual bool ProcessPreload(const Want &want) override;
310 #endif
311     /**
312      * @brief Query the AbilityInfo of list by the given Want.
313      * @param want Indicates the information of the ability.
314      * @param abilityInfos Indicates the obtained AbilityInfos object.
315      * @return Returns true if the AbilityInfos is successfully obtained; returns false otherwise.
316      */
317     virtual bool QueryAbilityInfos(const Want &want, std::vector<AbilityInfo> &abilityInfos) override;
318     /**
319      * @brief Query the AbilityInfo of list by the given Want.
320      * @param want Indicates the information of the ability.
321      * @param flags Indicates the information contained in the AbilityInfo object to be returned.
322      * @param userId Indicates the user ID.
323      * @param abilityInfos Indicates the obtained AbilityInfos object.
324      * @return Returns true if the AbilityInfos is successfully obtained; returns false otherwise.
325      */
326     virtual bool QueryAbilityInfos(
327         const Want &want, int32_t flags, int32_t userId, std::vector<AbilityInfo> &abilityInfos) override;
328     /**
329      * @brief Query the AbilityInfo of list by the given Want.
330      * @param want Indicates the information of the ability.
331      * @param flags Indicates the information contained in the AbilityInfo object to be returned.
332      * @param userId Indicates the user ID.
333      * @param abilityInfos Indicates the obtained AbilityInfos object.
334      * @return Returns ERR_OK if the AbilityInfos is successfully obtained; returns errCode otherwise.
335      */
336     virtual ErrCode QueryAbilityInfosV9(
337         const Want &want, int32_t flags, int32_t userId, std::vector<AbilityInfo> &abilityInfos) override;
338     /**
339      * @brief Query the launcher AbilityInfo of list by the given Want.
340      * @param want Indicates the information of the ability.
341      * @param userId Indicates the user ID.
342      * @param abilityInfos Indicates the obtained AbilityInfos object.
343      * @return Returns ERR_OK if the AbilityInfos is successfully obtained; returns errCode otherwise.
344      */
345     virtual ErrCode QueryLauncherAbilityInfos(const Want &want,
346         int32_t userId, std::vector<AbilityInfo> &abilityInfos) override;
347     /**
348      * @brief Query the AbilityInfo of list of all service on launcher.
349      * @param userId Indicates the information of the user.
350      * @param abilityInfos Indicates the obtained AbilityInfos object.
351      * @return Returns true if the AbilityInfos is successfully obtained; returns false otherwise.
352      */
353     virtual bool QueryAllAbilityInfos(
354         const Want &want, int32_t userId, std::vector<AbilityInfo> &abilityInfos) override;
355     /**
356      * @brief Query the AbilityInfo by ability.uri in config.json.
357      * @param abilityUri Indicates the uri of the ability.
358      * @param abilityInfo Indicates the obtained AbilityInfo object.
359      * @return Returns true if the AbilityInfo is successfully obtained; returns false otherwise.
360      */
361     virtual bool QueryAbilityInfoByUri(const std::string &abilityUri, AbilityInfo &abilityInfo) override;
362     /**
363      * @brief Query the AbilityInfo by ability.uri in config.json.
364      * @param abilityUri Indicates the uri of the ability.
365      * @param abilityInfos Indicates the obtained AbilityInfos object.
366      * @return Returns true if the AbilityInfo is successfully obtained; returns false otherwise.
367      */
368     virtual bool QueryAbilityInfosByUri(
369         const std::string &abilityUri, std::vector<AbilityInfo> &abilityInfos) override;
370     /**
371      * @brief Query the AbilityInfo by ability.uri in config.json through the proxy object.
372      * @param abilityUri Indicates the uri of the ability.
373      * @param userId Indicates the user ID.
374      * @param abilityInfo Indicates the obtained AbilityInfo object.
375      * @return Returns true if the AbilityInfo is successfully obtained; returns false otherwise.
376      */
377     virtual bool QueryAbilityInfoByUri(
378         const std::string &abilityUri, int32_t userId, AbilityInfo &abilityInfo) override;
379     /**
380      * @brief Obtains the BundleInfo of all keep-alive applications in the system.
381      * @param bundleInfos Indicates all of the obtained BundleInfo objects.
382      * @return Returns true if the BundleInfos is successfully obtained; returns false otherwise.
383      */
384     virtual bool QueryKeepAliveBundleInfos(std::vector<BundleInfo> &bundleInfos) override;
385     /**
386      * @brief Obtains the label of a specified ability.
387      * @param bundleName Indicates the bundle name.
388      * @param abilityName Indicates the ability name.
389      * @return Returns the label of the ability if exist; returns empty string otherwise.
390      */
391     virtual std::string GetAbilityLabel(const std::string &bundleName, const std::string &abilityName) override;
392     /**
393      * @brief Obtains the label of a specified ability.
394      * @param bundleName Indicates the bundle name.
395      * @param moduleName Indicates the module name.
396      * @param abilityName Indicates the ability name.
397      * @param label Indicates the obtained label.
398      * @return Returns ERR_OK if called successfully; returns error code otherwise.
399      */
400     virtual ErrCode GetAbilityLabel(const std::string &bundleName, const std::string &moduleName,
401         const std::string &abilityName, std::string &label) override;
402     /**
403      * @brief Obtains information about an application bundle contained in an ohos Ability Package (HAP).
404      * @param hapFilePath Indicates the absolute file path of the HAP.
405      * @param flag Indicates the information contained in the BundleInfo object to be returned.
406      * @param bundleInfo Indicates the obtained BundleInfo object.
407      * @return Returns true if the BundleInfo is successfully obtained; returns false otherwise.
408      */
409     virtual bool GetBundleArchiveInfo(
410         const std::string &hapFilePath, const BundleFlag flag, BundleInfo &bundleInfo) override;
411     /**
412      * @brief Obtains information about an application bundle contained in an ohos Ability Package (HAP).
413      * @param hapFilePath Indicates the absolute file path of the HAP.
414      * @param flags Indicates the information contained in the BundleInfo object to be returned.
415      * @param bundleInfo Indicates the obtained BundleInfo object.
416      * @return Returns true if the BundleInfo is successfully obtained; returns false otherwise.
417      */
418     virtual bool GetBundleArchiveInfo(
419         const std::string &hapFilePath, int32_t flags, BundleInfo &bundleInfo) override;
420     /**
421      * @brief Obtains information about an application bundle contained in an ohos Ability Package (HAP).
422      * @param hapFilePath Indicates the absolute file path of the HAP.
423      * @param flags Indicates the information contained in the BundleInfo object to be returned.
424      * @param bundleInfo Indicates the obtained BundleInfo object.
425      * @return Returns ERR_OK if this function is successfully called; returns errCode otherwise.
426      */
427     virtual ErrCode GetBundleArchiveInfoV9(
428         const std::string &hapFilePath, int32_t flags, BundleInfo &bundleInfo) override;
429     /**
430      * @brief Obtain the HAP module info of a specific ability.
431      * @param abilityInfo Indicates the ability.
432      * @param hapModuleInfo Indicates the obtained HapModuleInfo object.
433      * @return Returns true if the HapModuleInfo is successfully obtained; returns false otherwise.
434      */
435     virtual bool GetHapModuleInfo(const AbilityInfo &abilityInfo, HapModuleInfo &hapModuleInfo) override;
436     /**
437      * @brief Obtain the HAP module info of a specific ability through the proxy object.
438      * @param abilityInfo Indicates the ability.
439      * @param userId Indicates the userId.
440      * @param hapModuleInfo Indicates the obtained HapModuleInfo object.
441      * @return Returns true if the HapModuleInfo is successfully obtained; returns false otherwise.
442      */
443     virtual bool GetHapModuleInfo(
444         const AbilityInfo &abilityInfo, int32_t userId, HapModuleInfo &hapModuleInfo) override;
445     /**
446      * @brief Obtains the Want for starting the main ability of an application based on the given bundle name.
447      * @param bundleName Indicates the bundle name.
448      * @param want Indicates the obtained launch Want object.
449      * @param userId Indicates the userId.
450      * @return Returns ERR_OK if this function is successfully called; returns errCode otherwise.
451      */
452     virtual ErrCode GetLaunchWantForBundle(
453         const std::string &bundleName, Want &want, int32_t userId = Constants::UNSPECIFIED_USERID) override;
454     /**
455      * @brief Obtains detailed information about a specified permission.
456      * @param permissionName Indicates the name of the ohos permission.
457      * @param permissionDef Indicates the object containing detailed information about the given ohos permission.
458      * @return Returns true if the PermissionDef object is successfully obtained; returns false otherwise.
459      */
460     virtual ErrCode GetPermissionDef(const std::string &permissionName, PermissionDef &permissionDef) override;
461     /**
462      * @brief Clears cache data of a specified application.
463      * @param bundleName Indicates the bundle name of the application whose cache data is to be cleared.
464      * @param cleanCacheCallback Indicates the callback to be invoked for returning the operation result.
465      * @param userId description the user id.
466      * @return Returns ERR_OK if this function is successfully called; returns other ErrCode otherwise.
467      */
468     virtual ErrCode CleanBundleCacheFiles(
469         const std::string &bundleName, const sptr<ICleanCacheCallback> cleanCacheCallback,
470         int32_t userId = Constants::UNSPECIFIED_USERID) override;
471     /**
472      * @brief Clears application running data of a specified application.
473      * @param bundleName Indicates the bundle name of the application whose data is to be cleared.
474      * @param userId Indicates the user id.
475      * @return Returns true if the data cleared successfully; returns false otherwise.
476      */
477     virtual bool CleanBundleDataFiles(const std::string &bundleName,
478         const int userId = Constants::UNSPECIFIED_USERID) override;
479     /**
480      * @brief Register the specific bundle status callback.
481      * @param bundleStatusCallback Indicates the callback to be invoked for returning the bundle status changed result.
482      * @return Returns true if this function is successfully called; returns false otherwise.
483      */
484     virtual bool RegisterBundleStatusCallback(const sptr<IBundleStatusCallback> &bundleStatusCallback) override;
485 
486     virtual bool RegisterBundleEventCallback(const sptr<IBundleEventCallback> &bundleEventCallback) override;
487 
488     virtual bool UnregisterBundleEventCallback(const sptr<IBundleEventCallback> &bundleEventCallback) override;
489     /**
490      * @brief Clear the specific bundle status callback.
491      * @param bundleStatusCallback Indicates the callback to be cleared.
492      * @return Returns true if this function is successfully called; returns false otherwise.
493      */
494     virtual bool ClearBundleStatusCallback(const sptr<IBundleStatusCallback> &bundleStatusCallback) override;
495     /**
496      * @brief Unregister all the callbacks of status changed.
497      * @return Returns true if this function is successfully called; returns false otherwise.
498      */
499     virtual bool UnregisterBundleStatusCallback() override;
500     /**
501      * @brief Dump the bundle informations with specific flags.
502      * @param flag Indicates the information contained in the dump result.
503      * @param bundleName Indicates the bundle name if needed.
504      * @param userId Indicates the user ID.
505      * @param result Indicates the dump information result.
506      * @return Returns true if the dump result is successfully obtained; returns false otherwise.
507      */
508     virtual bool DumpInfos(
509         const DumpFlag flag, const std::string &bundleName, int32_t userId, std::string &result) override;
510     /**
511      * @brief Compile the bundle informations with specific flags.
512      * @param bundleName Indicates the bundle name if needed.
513      * @param compileMode Indicates the mode name.
514      * @param isAllBundle Does it represent all bundlenames.
515      * @return Returns true if the compile result is successfully obtained; returns false otherwise.
516      */
517     virtual ErrCode CompileProcessAOT(
518         const std::string &bundleName, const std::string &compileMode, bool isAllBundle) override;
519     /**
520      * @brief Compile the bundle informations with specific flags.
521      * @param bundleName Indicates the bundle name if needed.
522      * @param isAllBundle Does it represent all bundlenames.
523      * @return Returns true if the compile result is successfully obtained; returns false otherwise.
524      */
525     virtual ErrCode CompileReset(const std::string &bundleName, bool isAllBundle) override;
526     /**
527      * @brief Checks whether a specified application is enabled.
528      * @param bundleName Indicates the bundle name of the application.
529      * @param isEnable Indicates the application status is enabled.
530      * @return Returns result of the operation.
531      */
532     virtual ErrCode IsApplicationEnabled(const std::string &bundleName, bool &isEnable) override;
533     /**
534      * @brief Sets whether to enable a specified application.
535      * @param bundleName Indicates the bundle name of the application.
536      * @param isEnable Specifies whether to enable the application.
537      *                 The value true means to enable it, and the value false means to disable it.
538      * @param userId description the user id.
539      * @return Returns result of the operation.
540      */
541     virtual ErrCode SetApplicationEnabled(const std::string &bundleName, bool isEnable,
542         int32_t userId = Constants::UNSPECIFIED_USERID) override;
543     /**
544      * @brief Sets whether to enable a specified ability through the proxy object.
545      * @param abilityInfo Indicates information about the ability to check.
546      * @param isEnable Indicates the ability status is enabled.
547      * @return Returns result of the operation.
548      */
549     virtual ErrCode IsAbilityEnabled(const AbilityInfo &abilityInfo, bool &isEnable) override;
550     /**
551      * @brief Sets whether to enable a specified ability through the proxy object.
552      * @param abilityInfo Indicates information about the ability.
553      * @param isEnabled Specifies whether to enable the ability.
554      *                 The value true means to enable it, and the value false means to disable it.
555      * @param userId description the user id.
556      * @return Returns result of the operation.
557      */
558     virtual ErrCode SetAbilityEnabled(const AbilityInfo &abilityInfo, bool isEnabled,
559         int32_t userId = Constants::UNSPECIFIED_USERID) override;
560     /**
561      * @brief Obtains the interface used to install and uninstall bundles.
562      * @return Returns a pointer to IBundleInstaller class if exist; returns nullptr otherwise.
563      */
564     virtual sptr<IBundleInstaller> GetBundleInstaller() override;
565     /**
566      * @brief Obtains the interface used to create or delete user.
567      * @return Returns a pointer to IBundleUserMgr class if exist; returns nullptr otherwise.
568      */
569     virtual sptr<IBundleUserMgr> GetBundleUserMgr() override;
570     /**
571      * @brief Obtains the IVerifyManager.
572      * @return Returns a pointer to IVerifyManager class if exist; returns nullptr otherwise.
573      */
574     virtual sptr<IVerifyManager> GetVerifyManager() override;
575     /**
576      * @brief Obtains the FormInfo objects provided by all applications on the device.
577      * @param formInfos List of FormInfo objects if obtained; returns an empty List if no FormInfo is available on the
578      * device.
579      * @return Returns true if this function is successfully called; returns false otherwise.
580      */
581     virtual bool GetAllFormsInfo(std::vector<FormInfo> &formInfos) override;
582     /**
583      * @brief Obtains the FormInfo objects provided by a specified application on the device.
584      * @param bundleName Indicates the bundle name of the application.
585      * @param formInfos List of FormInfo objects if obtained; returns an empty List if no FormInfo is available on the
586      * device.
587      * @return Returns true if this function is successfully called; returns false otherwise.
588      */
589     virtual bool GetFormsInfoByApp(const std::string &bundleName, std::vector<FormInfo> &formInfos) override;
590     /**
591      * @brief Obtains the FormInfo objects provided by a specified module name.
592      * @param bundleName Indicates the bundle name of the application.
593      * @param moduleName Indicates the module name of the application.
594      * @param formInfos List of FormInfo objects if obtained; returns an empty List if no FormInfo is available on the
595      * device.
596      * @return Returns true if this function is successfully called; returns false otherwise.
597      */
598     virtual bool GetFormsInfoByModule(
599         const std::string &bundleName, const std::string &moduleName, std::vector<FormInfo> &formInfos) override;
600     /**
601      * @brief Obtains the ShortcutInfo objects provided by a specified application on the device.
602      * @param bundleName Indicates the bundle name of the application.
603      * @param shortcutInfos List of ShortcutInfo objects if obtained.
604      * @return Returns true if GetShortcutInfos successfully; returns false otherwise.
605      */
606     virtual bool GetShortcutInfos(const std::string &bundleName, std::vector<ShortcutInfo> &shortcutInfos) override;
607 
608     /**
609      * @brief Obtains the ShortcutInfo objects provided by a specified application on the device.
610      * @param bundleName Indicates the bundle name of the application.
611      * @param shortcutInfos List of ShortcutInfo objects if obtained.
612      * @return Returns errCode of result.
613      */
614     virtual ErrCode GetShortcutInfoV9(const std::string &bundleName,
615         std::vector<ShortcutInfo> &shortcutInfos) override;
616     /**
617      * @brief Obtains the CommonEventInfo objects provided by an event key on the device.
618      * @param eventKey Indicates the event of the subscribe.
619      * @param commonEventInfos List of CommonEventInfo objects if obtained.
620      * @return Returns true if this function is successfully called; returns false otherwise.
621      */
622     virtual bool GetAllCommonEventInfo(const std::string &eventKey,
623         std::vector<CommonEventInfo> &commonEventInfos) override;
624     /**
625      * @brief Obtains the DistributedBundleInfo based on a given bundle name and networkId.
626      * @param networkId Indicates the networkId of remote device.
627      * @param bundleName Indicates the application bundle name to be queried.
628      * @param distributedBundleInfo Indicates the obtained DistributedBundleInfo object.
629      * @return Returns true if the DistributedBundleInfo is successfully obtained; returns false otherwise.
630      */
631     virtual bool GetDistributedBundleInfo(const std::string &networkId, const std::string &bundleName,
632         DistributedBundleInfo &distributedBundleInfo) override;
633     /**
634      * @brief Get app privilege level.
635      * @param bundleName Indicates the bundle name of the app privilege level.
636      * @param userId Indicates the user id.
637      * @return Returns app privilege level.
638      */
639     virtual std::string GetAppPrivilegeLevel(
640         const std::string &bundleName, int32_t userId = Constants::UNSPECIFIED_USERID) override;
641     /**
642      * @brief Query extension info.
643      * @param Want Indicates the information of extension info.
644      * @param flag Indicates the query flag which will fliter any specified stuff in the extension info.
645      * @param userId Indicates the userId in the system.
646      * @param extensionInfos Indicates the obtained extensions.
647      * @return Returns true if this function is successfully called; returns false otherwise.
648      */
649     virtual bool QueryExtensionAbilityInfos(const Want &want, const int32_t &flag, const int32_t &userId,
650         std::vector<ExtensionAbilityInfo> &extensionInfos) override;
651     /**
652      * @brief Query extension info.
653      * @param Want Indicates the information of extension info.
654      * @param flag Indicates the query flag which will filter any specified stuff in the extension info.
655      * @param userId Indicates the userId in the system.
656      * @param extensionInfos Indicates the obtained extensions.
657      * @return Returns ERR_OK if this function is successfully called; returns errCode otherwise.
658      */
659     virtual ErrCode QueryExtensionAbilityInfosV9(const Want &want, int32_t flags, int32_t userId,
660         std::vector<ExtensionAbilityInfo> &extensionInfos) override;
661     /**
662      * @brief Query extension info.
663      * @param Want Indicates the information of extension info.
664      * @param extensionType Indicates the type of the extension.
665      * @param flag Indicates the query flag which will fliter any specified stuff in the extension info.
666      * @param userId Indicates the userId in the system.
667      * @param extensionInfos Indicates the obtained extensions.
668      * @return Returns true if this function is successfully called; returns false otherwise.
669      */
670     virtual bool QueryExtensionAbilityInfos(const Want &want, const ExtensionAbilityType &extensionType,
671         const int32_t &flag, const int32_t &userId, std::vector<ExtensionAbilityInfo> &extensionInfos) override;
672     /**
673      * @brief Query extension info.
674      * @param Want Indicates the information of extension info.
675      * @param extensionType Indicates the type of the extension.
676      * @param flag Indicates the query flag which will filter any specified stuff in the extension info.
677      * @param userId Indicates the userId in the system.
678      * @param extensionInfos Indicates the obtained extensions.
679      * @return Returns ERR_OK if this function is successfully called; returns errCode otherwise.
680      */
681     virtual ErrCode QueryExtensionAbilityInfosV9(const Want &want, const ExtensionAbilityType &extensionType,
682         int32_t flags, int32_t userId, std::vector<ExtensionAbilityInfo> &extensionInfos) override;
683     /**
684      * @brief Process hidump.
685      * @param fd Indicates the fd.
686      * @param args Indicates the params.
687      * @return Returns the dump result.
688      */
689     int Dump(int fd, const std::vector<std::u16string> &args) override;
690 
691     virtual bool QueryExtensionAbilityInfos(const ExtensionAbilityType &extensionType, const int32_t &userId,
692         std::vector<ExtensionAbilityInfo> &extensionInfos) override;
693 
694     virtual bool VerifyCallingPermission(const std::string &permission) override;
695 
696     virtual bool VerifySystemApi(int32_t beginApiVersion = Constants::INVALID_API_VERSION) override;
697 
698     virtual bool QueryExtensionAbilityInfoByUri(const std::string &uri, int32_t userId,
699         ExtensionAbilityInfo &extensionAbilityInfo) override;
700 
701     virtual std::string GetAppIdByBundleName(const std::string &bundleName, const int userId) override;
702 
703     virtual std::string GetAppType(const std::string &bundleName) override;
704 
705     virtual int GetUidByBundleName(const std::string &bundleName, const int userId) override;
706 
707     virtual int GetUidByDebugBundleName(const std::string &bundleName, const int userId) override;
708 
709     virtual bool ImplicitQueryInfoByPriority(const Want &want, int32_t flags, int32_t userId,
710         AbilityInfo &abilityInfo, ExtensionAbilityInfo &extensionInfo) override;
711 
712     virtual bool ImplicitQueryInfos(const Want &want, int32_t flags, int32_t userId, bool withDefault,
713         std::vector<AbilityInfo> &abilityInfos, std::vector<ExtensionAbilityInfo> &extensionInfos) override;
714 
715     /**
716      * @brief Obtains the value of isRemovable based on a given bundle name and module name.
717      * @param bundleName Indicates the bundle name to be queried.
718      * @param moduleName Indicates the module name to be queried.
719      * @param isRemovable Indicates the module whether is removable.
720      * @return Returns ERR_OK if the isRemovable is successfully obtained; returns other ErrCode otherwise.
721      */
722     virtual ErrCode IsModuleRemovable(const std::string &bundleName, const std::string &moduleName,
723         bool &isRemovable) override;
724     /**
725      * @brief Sets whether to enable isRemovable based on a given bundle name and module name.
726      * @param bundleName Indicates the bundle name to be queried.
727      * @param moduleName Indicates the module name to be queried.
728      * @param isEnable Specifies whether to enable the isRemovable of InnerModuleInfo.
729      *                 The value true means to enable it, and the value false means to disable it
730      * @return Returns true if the isRemovable is successfully obtained; returns false otherwise.
731      */
732     virtual bool SetModuleRemovable(
733         const std::string &bundleName, const std::string &moduleName, bool isEnable) override;
734     /**
735      * @brief Obtains the dependent module names.
736      *
737      * @param bundleName Indicates the bundle name to be queried.
738      * @param moduleName Indicates the module name to be queried.
739      * @param dependentModuleNames Indicates the obtained dependent module names.
740      * @return Returns true if this function is successfully called; returns false otherwise.
741      */
742     virtual bool GetAllDependentModuleNames(const std::string &bundleName, const std::string &moduleName,
743         std::vector<std::string> &dependentModuleNames) override;
744     /**
745      * @brief Obtains the value of upgradeFlag based on a given bundle name and module name.
746      * @param bundleName Indicates the bundle name to be queried.
747      * @param moduleName Indicates the module name to be queried.
748      * @return Returns true if the upgradeFlag is successfully obtained; returns false otherwise.
749      */
750     virtual bool GetModuleUpgradeFlag(const std::string &bundleName, const std::string &moduleName) override;
751     /**
752      * @brief Sets whether to enable upgradeFlag based on a given bundle name and module name.
753      * @param bundleName Indicates the bundle name to be queried.
754      * @param moduleName Indicates the module name to be queried.
755      * @param isEnable Specifies whether to enable the upgradeFlag of InnerModuleInfo.
756      *                 The value true means to enable it, and the value false means to disable it
757      * @return Returns ERR_OK if the UpgradeFlag is successfully obtained; returns other ErrCode otherwise.
758      */
759     virtual ErrCode SetModuleUpgradeFlag(
760         const std::string &bundleName, const std::string &moduleName, int32_t upgradeFlag) override;
761     virtual ErrCode GetSandboxBundleInfo(
762         const std::string &bundleName, int32_t appIndex, int32_t userId, BundleInfo &info) override;
763 
764     virtual bool ObtainCallingBundleName(std::string &bundleName) override;
765 
766     virtual bool GetBundleStats(const std::string &bundleName, int32_t userId,
767         std::vector<int64_t> &bundleStats) override;
768 
769     virtual bool GetAllBundleStats(int32_t userId, std::vector<int64_t> &bundleStats) override;
770 
771 #ifdef BUNDLE_FRAMEWORK_DEFAULT_APP
772     virtual sptr<IDefaultApp> GetDefaultAppProxy() override;
773 #endif
774 
775 #ifdef BUNDLE_FRAMEWORK_APP_CONTROL
776     virtual sptr<IAppControlMgr> GetAppControlProxy() override;
777 #endif
778 
779     virtual ErrCode GetSandboxAbilityInfo(const Want &want, int32_t appIndex, int32_t flags, int32_t userId,
780         AbilityInfo &info) override;
781     virtual ErrCode GetSandboxExtAbilityInfos(const Want &want, int32_t appIndex, int32_t flags, int32_t userId,
782         std::vector<ExtensionAbilityInfo> &infos) override;
783     virtual ErrCode GetSandboxHapModuleInfo(const AbilityInfo &abilityInfo, int32_t appIndex, int32_t userId,
784         HapModuleInfo &info) override;
785 
786     virtual ErrCode GetMediaData(const std::string &bundleName, const std::string &moduleName,
787         const std::string &abilityName, std::unique_ptr<uint8_t[]> &mediaDataPtr, size_t &len, int32_t userId) override;
788 
789     virtual sptr<IQuickFixManager> GetQuickFixManagerProxy() override;
790     virtual std::string GetStringById(const std::string &bundleName, const std::string &moduleName,
791         uint32_t resId, int32_t userId, const std::string &localeInfo) override;
792     virtual std::string GetIconById(const std::string &bundleName, const std::string &moduleName,
793         uint32_t resId, uint32_t density, int32_t userId) override;
794     virtual ErrCode SetDebugMode(bool isDebug) override;
795     virtual sptr<IOverlayManager> GetOverlayManagerProxy() override;
796     virtual ErrCode GetAppProvisionInfo(const std::string &bundleName, int32_t userId,
797         AppProvisionInfo &appProvisionInfo) override;
798     virtual ErrCode GetProvisionMetadata(const std::string &bundleName, int32_t userId,
799         std::vector<Metadata> &provisionMetadatas) override;
800     virtual ErrCode GetBaseSharedBundleInfos(const std::string &bundleName,
801         std::vector<BaseSharedBundleInfo> &baseSharedBundleInfos,
802         GetDependentBundleInfoFlag flag = GetDependentBundleInfoFlag::GET_APP_CROSS_HSP_BUNDLE_INFO) override;
803     virtual ErrCode GetAllSharedBundleInfo(std::vector<SharedBundleInfo> &sharedBundles) override;
804     virtual ErrCode GetSharedBundleInfo(const std::string &bundleName, const std::string &moduleName,
805         std::vector<SharedBundleInfo> &sharedBundles) override;
806     virtual ErrCode GetSharedBundleInfoBySelf(const std::string &bundleName,
807         SharedBundleInfo &sharedBundleInfo) override;
808     virtual ErrCode GetSharedDependencies(const std::string &bundleName, const std::string &moduleName,
809         std::vector<Dependency> &dependencies) override;
810     virtual ErrCode GetProxyDataInfos(const std::string &bundleName, const std::string &moduleName,
811         std::vector<ProxyData> &proxyDatas, int32_t userId = Constants::UNSPECIFIED_USERID) override;
812     virtual ErrCode GetAllProxyDataInfos(
813         std::vector<ProxyData> &proxyDatas, int32_t userId = Constants::UNSPECIFIED_USERID) override;
814     virtual ErrCode GetSpecifiedDistributionType(const std::string &bundleName,
815         std::string &specifiedDistributionType) override;
816     virtual ErrCode GetAdditionalInfo(const std::string &bundleName,
817         std::string &additionalInfo) override;
818     virtual ErrCode SetExtNameOrMIMEToApp(const std::string &bundleName, const std::string &moduleName,
819         const std::string &abilityName, const std::string &extName, const std::string &mimeType) override;
820     virtual ErrCode DelExtNameOrMIMEToApp(const std::string &bundleName, const std::string &moduleName,
821         const std::string &abilityName, const std::string &extName, const std::string &mimeType) override;
822     virtual bool QueryDataGroupInfos(const std::string &bundleName, int32_t userId,
823         std::vector<DataGroupInfo> &infos) override;
824     virtual bool GetGroupDir(const std::string &dataGroupId, std::string &dir) override;
825     virtual bool QueryAppGalleryBundleName(std::string &bundleName) override;
826     virtual ErrCode ResetAOTCompileStatus(const std::string &bundleName, const std::string &moduleName,
827         int32_t triggerMode) override;
828     void SetBrokerServiceStatus(bool isServiceExisted);
829 
830     /**
831      * @brief Query extension info with type name.
832      * @param Want Indicates the information of extension info.
833      * @param extensionTypeName Indicates the type of the extension.
834      * @param flag Indicates the query flag which will fliter any specified stuff in the extension info.
835      * @param userId Indicates the userId in the system.
836      * @param extensionInfos Indicates the obtained extensions.
837      * @return Returns ERR_OK if this function is successfully called; returns other ErrCode otherwise.
838      */
839     virtual ErrCode QueryExtensionAbilityInfosWithTypeName(const Want &want, const std::string &extensionTypeName,
840         const int32_t flag, const int32_t userId, std::vector<ExtensionAbilityInfo> &extensionInfos) override;
841 
842     /**
843      * @brief Query extension info only with type name.
844      * @param extensionTypeName Indicates the type of the extension.
845      * @param flag Indicates the query flag which will fliter any specified stuff in the extension info.
846      * @param userId Indicates the userId in the system.
847      * @param extensionInfos Indicates the obtained extensions.
848      * @return Returns ERR_OK if this function is successfully called; returns other ErrCode otherwise.
849      */
850     virtual ErrCode QueryExtensionAbilityInfosOnlyWithTypeName(const std::string &extensionTypeName,
851         const uint32_t flag, const int32_t userId, std::vector<ExtensionAbilityInfo> &extensionInfos) override;
852 
853     virtual ErrCode GetJsonProfile(ProfileType profileType, const std::string &bundleName,
854         const std::string &moduleName, std::string &profile, int32_t userId = Constants::UNSPECIFIED_USERID) override;
855 
856     virtual sptr<IBundleResource> GetBundleResourceProxy() override;
857 
858     virtual ErrCode GetRecoverableApplicationInfo(
859         std::vector<RecoverableApplicationInfo> &recoverableApplicaitons) override;
860 
861     virtual ErrCode GetUninstalledBundleInfo(const std::string bundleName, BundleInfo &bundleInfo) override;
862 
863     virtual ErrCode SetAdditionalInfo(const std::string &bundleName, const std::string &additionalInfo) override;
864 
865     virtual ErrCode CreateBundleDataDir(int32_t userId) override;
866 
867 private:
868     const std::shared_ptr<BundleDataMgr> GetDataMgrFromService();
869 #ifdef DISTRIBUTED_BUNDLE_FRAMEWORK
870     const OHOS::sptr<IDistributedBms> GetDistributedBundleMgrService();
871 #endif
872 #ifdef BUNDLE_FRAMEWORK_FREE_INSTALL
873     const std::shared_ptr<BundleConnectAbilityMgr> GetConnectAbilityMgrFromService();
874 #endif
875     bool GetBundleUserInfo(
876         const std::string &bundleName, int32_t userId, InnerBundleUserInfo &innerBundleUserInfo);
877     bool GetBundleUserInfos(
878         const std::string &bundleName, std::vector<InnerBundleUserInfo> &innerBundleUserInfos);
879     bool GetShortcutInfos(
880         const std::string &bundleName, int32_t userId, std::vector<ShortcutInfo> &shortcutInfos);
881     bool DumpAllBundleInfoNames(int32_t userId, std::string &result);
882     bool DumpAllBundleInfoNamesByUserId(int32_t userId, std::string &result);
883     bool DumpBundleInfo(const std::string &bundleName, int32_t userId, std::string &result);
884     bool DumpShortcutInfo(const std::string &bundleName, int32_t userId, std::string &result);
885     std::set<int32_t> GetExistsCommonUserIs();
886     bool VerifyQueryPermission(const std::string &queryBundleName);
887     bool VerifyPrivilegedPermission(const std::string &queryBundleName);
888     bool VerifyDependency(const std::string &sharedBundleName);
889     void CleanBundleCacheTask(const std::string &bundleName, const sptr<ICleanCacheCallback> cleanCacheCallback,
890         const std::shared_ptr<BundleDataMgr> &dataMgr, int32_t userId);
891     void NotifyBundleStatus(const NotifyBundleEvents &installRes);
892     ErrCode GetBundleArchiveInfoBySandBoxPath(
893         const std::string &hapFilePath, int32_t flags, BundleInfo &bundleInfo, bool fromV9 = false);
894     bool IsPreInstallApp(const std::string &bundleName);
895     bool GetPreferableBundleInfoFromHapPaths(const std::vector<std::string> &hapPaths,
896         BundleInfo &bundleInfo);
897     bool IsBundleExist(const std::string &bundleName);
898     ErrCode ClearCache(const std::string &bundleName, const sptr<ICleanCacheCallback> cleanCacheCallback,
899         int32_t userId);
900 
901     bool isBrokerServiceExisted_ = false;
902 };
903 }  // namespace AppExecFwk
904 }  // namespace OHOS
905 #endif  // FOUNDATION_APPEXECFWK_SERVICES_BUNDLEMGR_INCLUDE_BUNDLE_MGR_HOST_IMPL_H
906