gcontini
2020-03-15 919409cb28a2ef9e97d7b15046fed2c5a4d0500f
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,12 @@
    * @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;
   // std::string brand() const;
   VIRTUALIZATION_DETAIL getVirtualizationDetail() const;
};
} /* namespace license */
}  // namespace os
}  // namespace license
#endif /* SRC_LIBRARY_OS_CPU_INFO_H_ */