diff options
Diffstat (limited to 'include/vintf/RuntimeInfo.h')
-rw-r--r-- | include/vintf/RuntimeInfo.h | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/include/vintf/RuntimeInfo.h b/include/vintf/RuntimeInfo.h index 1505c15..68b6929 100644 --- a/include/vintf/RuntimeInfo.h +++ b/include/vintf/RuntimeInfo.h | |||
@@ -38,6 +38,7 @@ struct CompatibilityMatrix; | |||
38 | struct RuntimeInfo { | 38 | struct RuntimeInfo { |
39 | 39 | ||
40 | RuntimeInfo() {} | 40 | RuntimeInfo() {} |
41 | virtual ~RuntimeInfo() = default; | ||
41 | 42 | ||
42 | // /proc/version | 43 | // /proc/version |
43 | // utsname.sysname | 44 | // utsname.sysname |
@@ -74,14 +75,28 @@ struct RuntimeInfo { | |||
74 | bool checkCompatibility(const CompatibilityMatrix& mat, std::string* error = nullptr, | 75 | bool checkCompatibility(const CompatibilityMatrix& mat, std::string* error = nullptr, |
75 | DisabledChecks disabledChecks = ENABLE_ALL_CHECKS) const; | 76 | DisabledChecks disabledChecks = ENABLE_ALL_CHECKS) const; |
76 | 77 | ||
78 | using FetchFlags = uint32_t; | ||
79 | enum FetchFlag : FetchFlags { | ||
80 | CPU_VERSION = 1 << 0, | ||
81 | CONFIG_GZ = 1 << 1, | ||
82 | CPU_INFO = 1 << 2, | ||
83 | POLICYVERS = 1 << 3, | ||
84 | AVB = 1 << 4, | ||
85 | LAST_PLUS_ONE, | ||
86 | |||
87 | NONE = 0, | ||
88 | ALL = ((LAST_PLUS_ONE - 1) << 1) - 1, | ||
89 | }; | ||
90 | |||
91 | protected: | ||
92 | virtual status_t fetchAllInformation(FetchFlags flags); | ||
93 | |||
77 | private: | 94 | private: |
78 | friend struct RuntimeInfoFetcher; | 95 | friend struct RuntimeInfoFetcher; |
79 | friend class VintfObject; | 96 | friend class VintfObject; |
80 | friend struct LibVintfTest; | 97 | friend struct LibVintfTest; |
81 | friend std::string dump(const RuntimeInfo &ki); | 98 | friend std::string dump(const RuntimeInfo &ki); |
82 | 99 | ||
83 | status_t fetchAllInformation(); | ||
84 | |||
85 | // mKernelVersion = x'.y'.z', minLts = x.y.z, | 100 | // mKernelVersion = x'.y'.z', minLts = x.y.z, |
86 | // match if x == x' , y == y' , and z <= z'. | 101 | // match if x == x' , y == y' , and z <= z'. |
87 | bool matchKernelVersion(const KernelVersion& minLts) const; | 102 | bool matchKernelVersion(const KernelVersion& minLts) const; |