1 /* 2 * Copyright (c) 2022-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_APPEXECFWK_SERVICES_BUNDLEMGR_INCLUDE_AGING_BUNDLE_INFO_H 17 #define FOUNDATION_APPEXECFWK_SERVICES_BUNDLEMGR_INCLUDE_AGING_BUNDLE_INFO_H 18 19 #include <iostream> 20 #include <string> 21 22 namespace OHOS { 23 namespace AppExecFwk { 24 class AgingBundleInfo { 25 public: 26 AgingBundleInfo() = default; AgingBundleInfo(const std::string & name,int64_t time,int32_t startCount)27 AgingBundleInfo(const std::string &name, int64_t time, int32_t startCount) 28 : bundleName_(name), recentlyUsedTime_(time), startCount_(startCount) 29 {}; 30 ~AgingBundleInfo() = default; 31 GetBundleName()32 const std::string GetBundleName() const 33 { 34 return bundleName_; 35 }; 36 GetRecentlyUsedTime()37 int64_t GetRecentlyUsedTime() const 38 { 39 return recentlyUsedTime_; 40 }; 41 GetStartCount()42 int32_t GetStartCount() const 43 { 44 return startCount_; 45 }; 46 47 private: 48 std::string bundleName_; 49 int64_t recentlyUsedTime_ = 0; 50 int32_t startCount_ = 0; 51 }; 52 } // namespace AppExecFwk 53 } // namespace OHOS 54 #endif // FOUNDATION_APPEXECFWK_SERVICES_BUNDLEMGR_INCLUDE_AGING_BUNDLE_INFO_H