• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2022 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,int64_t bundleDataBytes,int uid)27     AgingBundleInfo(const std::string &name, int64_t time, int64_t bundleDataBytes, int uid)
28         : bundleName(name), recentlyUsedTime(time), dataBytes(bundleDataBytes), bundleUid(uid)
29     {
30     };
31     virtual ~AgingBundleInfo() = default;
32 
GetBundleName()33     const std::string &GetBundleName() const
34     {
35         return bundleName;
36     };
37 
GetRecentlyUsedTime()38     int64_t GetRecentlyUsedTime() const
39     {
40         return recentlyUsedTime;
41     };
42 
GetDataBytes()43     int64_t GetDataBytes() const
44     {
45         return dataBytes;
46     };
47 
GetBundleUid()48     int GetBundleUid() const
49     {
50         return bundleUid;
51     };
52 
53 private:
54     std::string bundleName;
55     int64_t recentlyUsedTime = 0;
56     int64_t dataBytes = 0;
57     int bundleUid = -1;
58 };
59 }  // namespace AppExecFwk
60 }  // namespace OHOS
61 #endif  // FOUNDATION_APPEXECFWK_SERVICES_BUNDLEMGR_INCLUDE_AGING_BUNDLE_INFO_H