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_ABILITY_RUNTIME_SIMULATOR_COMMON_APPLICATION_INFO_H 17 #define MOCK_FOUNDATION_ABILITY_RUNTIME_SIMULATOR_COMMON_APPLICATION_INFO_H 18 19 #include <map> 20 #include <string> 21 #include <vector> 22 23 namespace OHOS { 24 namespace AppExecFwk { 25 enum class MultiAppModeType : uint8_t { 26 UNSPECIFIED = 0, 27 MULTI_INSTANCE = 1, 28 APP_CLONE = 2, 29 }; 30 31 enum class BundleType { 32 APP = 0, 33 ATOMIC_SERVICE = 1, 34 SHARED = 2, 35 }; 36 37 struct Metadata { 38 std::string name; 39 std::string value; 40 std::string resource; 41 }; 42 43 struct CustomizeData { 44 std::string name; 45 std::string value; 46 std::string extra; 47 }; 48 49 struct MetaData { 50 std::vector<CustomizeData> customizeData; 51 }; 52 53 struct Resource { 54 std::string bundleName; 55 std::string moduleName; 56 int32_t id = 0; 57 }; 58 59 struct ApplicationInfo { 60 std::string name; 61 std::string bundleName; 62 uint32_t versionCode = 0; 63 std::string versionName; 64 int32_t minCompatibleVersionCode = 0; 65 uint32_t apiCompatibleVersion = 0; 66 int32_t apiTargetVersion = 0; 67 std::string iconPath; 68 int32_t iconId = 0; 69 Resource iconResource; 70 std::string label; 71 int32_t labelId = 0; 72 Resource labelResource; 73 int32_t flags = 0; 74 BundleType bundleType = BundleType::APP; 75 }; 76 } // namespace AppExecFwk 77 } // namespace OHOS 78 #endif