1 /* 2 * Copyright (c) 2025-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 INTERFACES_INNER_API_BUNDLE_MANAGER_INCLUDE_EDM_APPLICATION_INFO_H 17 #define INTERFACES_INNER_API_BUNDLE_MANAGER_INCLUDE_EDM_APPLICATION_INFO_H 18 19 #include <string> 20 21 #include "edm_constants.h" 22 #include "parcel.h" 23 24 namespace OHOS { 25 namespace EDM { 26 struct EdmResource : public Parcelable { 27 /** the resource id in hap */ 28 uint32_t id = 0; 29 30 /** the hap bundle name */ 31 std::string bundleName; 32 33 /** the hap module name */ 34 std::string moduleName; 35 36 bool ReadFromParcel(Parcel &parcel); 37 virtual bool Marshalling(Parcel &parcel) const override; 38 static EdmResource *Unmarshalling(Parcel &parcel); 39 }; 40 41 struct EdmApplicationInfo : public Parcelable { 42 bool removable = true; 43 bool isSystemApp = false; 44 bool debug = false; 45 bool userDataClearable = true; 46 bool enabled = false; 47 48 uint32_t accessTokenId = 0; 49 uint32_t iconId = 0; 50 uint32_t labelId = 0; 51 uint32_t descriptionId = 0; 52 53 int32_t uid = -1; 54 int32_t appIndex = 0; 55 56 std::string name; 57 std::string description; 58 std::string label; 59 std::string icon; 60 std::string process; 61 std::string codePath; 62 std::string appDistributionType = EdmConstants::APP_DISTRIBUTION_TYPE_NONE; 63 std::string appProvisionType = EdmConstants::APP_PROVISION_TYPE_RELEASE; 64 std::string nativeLibraryPath; 65 std::string installSource; 66 std::string apiReleaseType; 67 68 EdmResource iconResource; 69 EdmResource labelResource; 70 EdmResource descriptionResource; 71 72 bool ReadFromParcel(Parcel &parcel); 73 virtual bool Marshalling(Parcel &parcel) const override; 74 static EdmApplicationInfo *Unmarshalling(Parcel &parcel); 75 }; 76 } // namespace EDM 77 } // namespace OHOS 78 #endif // INTERFACES_INNER_API_BUNDLE_MANAGER_INCLUDE_EDM_APPLICATION_INFO_H 79