1 /* 2 * Copyright (c) 2025 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 MOCK_FOUNDATION_APPEXECFWK_INTERFACES_INNERKITS_APPEXECFWK_BASE_INCLUDE_BUNDLE_INFO_H 17 #define MOCK_FOUNDATION_APPEXECFWK_INTERFACES_INNERKITS_APPEXECFWK_BASE_INCLUDE_BUNDLE_INFO_H 18 19 #include <string> 20 #include <vector> 21 #include "ability_info.h" 22 #include "application_info.h" 23 24 namespace OHOS { 25 namespace AppExecFwk { 26 enum BundleFlag { 27 GET_BUNDLE_DEFAULT = 0x00000000, 28 GET_BUNDLE_WITH_ABILITIES = 0x00000001, 29 GET_BUNDLE_WITH_REQUESTED_PERMISSION = 0x00000010, 30 GET_BUNDLE_WITH_EXTENSION_INFO = 0x00000020, 31 GET_BUNDLE_WITH_HASH_VALUE = 0x00000030, 32 GET_BUNDLE_WITH_MENU = 0x00000040, 33 GET_BUNDLE_WITH_ROUTER_MAP = 0x00000080, 34 GET_BUNDLE_WITH_SKILL = 0x00000800, 35 }; 36 37 enum class GetBundleInfoFlag { 38 GET_BUNDLE_INFO_DEFAULT = 0x00000000, 39 GET_BUNDLE_INFO_WITH_APPLICATION = 0x00000001, 40 GET_BUNDLE_INFO_WITH_HAP_MODULE = 0x00000002, 41 GET_BUNDLE_INFO_WITH_ABILITY = 0x00000004, 42 GET_BUNDLE_INFO_WITH_EXTENSION_ABILITY = 0x00000008, 43 GET_BUNDLE_INFO_WITH_REQUESTED_PERMISSION = 0x00000010, 44 GET_BUNDLE_INFO_WITH_METADATA = 0x00000020, 45 GET_BUNDLE_INFO_WITH_DISABLE = 0x00000040, 46 GET_BUNDLE_INFO_WITH_SIGNATURE_INFO = 0x00000080, 47 GET_BUNDLE_INFO_WITH_MENU = 0x00000100, 48 GET_BUNDLE_INFO_WITH_ROUTER_MAP = 0x00000200, 49 GET_BUNDLE_INFO_WITH_SKILL = 0x00000800, 50 GET_BUNDLE_INFO_ONLY_WITH_LAUNCHER_ABILITY = 0x00001000, 51 GET_BUNDLE_INFO_OF_ANY_USER = 0x00002000, 52 GET_BUNDLE_INFO_EXCLUDE_CLONE = 0x00004000, 53 }; 54 55 struct BundleInfo { 56 bool singleton = false; 57 uint32_t versionCode = 0; 58 int32_t appIndex = 0; 59 int uid = -1; 60 int gid = -1; 61 std::string name; 62 std::string versionName; 63 std::string appId; 64 std::vector<AbilityInfo> abilityInfos; 65 ApplicationInfo applicationInfo; 66 }; 67 } // namespace AppExecFwk 68 } // namespace OHOS 69 #endif