From 037e7cc02b66a54d5dec19a6b93a7bf107a95a0e Mon Sep 17 00:00:00 2001
From: gcontini <1121667+gcontini@users.noreply.github.com>
Date: 周六, 28 3月 2020 22:29:12 +0800
Subject: [PATCH] documentation update (win32) and others

---
 src/library/os/execution_environment.hpp |   21 ++++++++++++++++-----
 1 files changed, 16 insertions(+), 5 deletions(-)

diff --git a/src/library/os/execution_environment.hpp b/src/library/os/execution_environment.hpp
index bc503fb..97172e4 100644
--- a/src/library/os/execution_environment.hpp
+++ b/src/library/os/execution_environment.hpp
@@ -13,6 +13,12 @@
 namespace license {
 namespace os {
 
+/*
+ * windows bios sometimes reports vm names add execution environment detection from bios
+const char *vmVendors[] = {
+	"VMware", "Microsoft Corporation", "Virtual Machine", "innotek GmbH", "PowerVM", "Bochs", "KVM"};
+*/
+
 typedef enum { NONE, CONTAINER, VM } VIRTUALIZATION;
 
 typedef enum {
@@ -32,18 +38,23 @@
 
 class ExecutionEnvironment {
 private:
-	std::string sys_vendor;
-	std::string bios_vendor;
-	std::string bios_description;
-	//detect if it's a kind of container technology (docker or lxc)
-	bool is_container() const;
+	std::string m_sys_vendor;
+	std::string m_bios_vendor;
+	std::string m_bios_description;
+
 public:
 	ExecutionEnvironment();
 	~ExecutionEnvironment(){};
 	VIRTUALIZATION getVirtualization() const;
 	bool is_cloud() const;
 	bool is_docker() const;
+	// detect if it's a kind of container technology (docker or lxc)
+	bool is_container() const;
 	CLOUD_PROVIDER getCloudProvider() const;
+	const std::string& bios_vendor() const { return m_bios_vendor; };
+	const std::string& sys_vendor() const { return m_sys_vendor; };
+	const std::string& bios_description() const { return m_bios_description; };
+	// VIRTUALIZATION_DETAIL getVirtualizationDetail() const; //as reported by the bios
 };
 
 }  // namespace os

--
Gitblit v1.9.1