From 65454077a8c63b50adda4e8c6095c8f00675c4d2 Mon Sep 17 00:00:00 2001 From: Gabriele Contini <contini.mailing@gmail.com> Date: 周日, 08 3月 2020 21:45:16 +0800 Subject: [PATCH] Merge branch 'feature/pc_identifiers' of https://github.com/open-license-manager/open-license-manager.git into feature/pc_identifiers --- src/library/os/cpu_info.hpp | 12 +++++++++--- 1 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/library/os/cpu_info.hpp b/src/library/os/cpu_info.hpp index 716ca40..662e181 100644 --- a/src/library/os/cpu_info.hpp +++ b/src/library/os/cpu_info.hpp @@ -9,11 +9,16 @@ #define SRC_LIBRARY_OS_CPU_INFO_H_ #include <string> namespace license { +namespace os { +typedef enum { BARE_TO_METAL, VMWARE, VIRTUALBOX, V_XEN, KVM, HV, V_OTHER } VIRTUALIZATION_DETAIL; /** * Cpu informations */ class CpuInfo { +private: + bool is_hypervisor_set() const; + public: CpuInfo(); virtual ~CpuInfo(); @@ -22,10 +27,11 @@ * @return true if the cpu is detected to be a virtual cpu */ bool cpu_virtual() const; - uint32_t model(); + uint32_t model() const; std::string vendor() const; + VIRTUALIZATION_DETAIL getVirtualizationDetail() const; }; -} /* namespace license */ - +} // namespace os +} // namespace license #endif /* SRC_LIBRARY_OS_CPU_INFO_H_ */ -- Gitblit v1.9.1