1 /*
2  * Copyright (c) 2024 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 OHOS_BUNDLE_MANAGER_H
17 #define OHOS_BUNDLE_MANAGER_H
18 
19 
20 #include <cstdint>
21 #include <string>
22 #include "bundle_manager_utils.h"
23 #include "bundle_info.h"
24 #include "recoverable_application_info.h"
25 
26 namespace OHOS {
27 namespace CJSystemapi {
28 namespace BundleManager {
29 
30 constexpr int8_t UNSPECIFIED_USERID = -2;
31 constexpr int32_t BASE_USER_RANGE = 200000;
32 const std::string GET_BUNDLE_INFO = "GetBundleInfo";
33 
34 class BundleManagerImpl {
35 public:
36     static AppExecFwk::BundleInfo GetBundleInfoForSelf(int32_t bundleFlags);
37     static int32_t VerifyAbc(std::vector<std::string> abcPaths, bool flag);
38     static std::tuple<int32_t, std::vector<std::string>> GetProfileByExtensionAbility(
39         std::string moduleName, std::string extensionAbilityName, char* metadataName);
40     static std::tuple<int32_t, std::vector<std::string>> GetProfileByAbility(
41         std::string moduleName, std::string abilityName, char* metadataName);
42 };
43 
44 } // BundleManager
45 } // CJSystemapi
46 } // OHOS
47 
48 #endif