1 /* 2 * Copyright (c) 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_BUNDLEMANAGER_BUNDLE_FRAMEWORK_SERVICES_BUNDLEMGR_RESOURCE_INFO_H 17 #define FOUNDATION_BUNDLEMANAGER_BUNDLE_FRAMEWORK_SERVICES_BUNDLEMGR_RESOURCE_INFO_H 18 19 #include <string> 20 21 namespace OHOS { 22 namespace AppExecFwk { 23 class ResourceInfo { 24 public: 25 ResourceInfo(); 26 ~ResourceInfo(); 27 /** 28 * key: 29 * 1. bundleName 30 * 2. bundleName/moduleName/abilityName 31 */ 32 std::string GetKey() const; 33 void ParseKey(const std::string &key); 34 // key 35 std::string bundleName_; 36 std::string moduleName_; 37 std::string abilityName_; 38 // label resource 39 int32_t labelId_ = 0; 40 std::string label_; 41 // icon resource 42 int32_t iconId_ = 0; 43 std::string icon_; 44 // resource info update time 45 int64_t updateTime_ = 0; 46 // used for parse label and icon 47 std::string hapPath_; 48 // used for parse default icon 49 std::string defaultIconHapPath_; 50 }; 51 } // AppExecFwk 52 } // OHOS 53 #endif // FOUNDATION_BUNDLEMANAGER_BUNDLE_FRAMEWORK_SERVICES_BUNDLEMGR_RESOURCE_INFO_H 54