From 6b97710009d2830fa2ca86438a8eb83e3abf5810 Mon Sep 17 00:00:00 2001
From: open-license-manager <rillf@maildrop.cc>
Date: 摹曛, 31 7月 2014 16:33:19 +0800
Subject: [PATCH] valgrind & tests

---
 src/library/os/os.h |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/src/library/os/os.h b/src/library/os/os.h
index 7e0e3e7..5061ac5 100644
--- a/src/library/os/os.h
+++ b/src/library/os/os.h
@@ -14,6 +14,7 @@
 
 #include "../base/base.h"
 #include <stddef.h>
+#include <stdbool.h>
 
 typedef enum {
 	NONE, VMWARE
@@ -31,12 +32,32 @@
 	char device[255];
 	unsigned char disk_sn[8];
 	char label[255];
+	bool preferred;
 } DiskInfo;
 
 FUNCTION_RETURN getAdapterInfos(AdapterInfo * adapterInfos,
 		size_t * adapter_info_size);
 FUNCTION_RETURN getDiskInfos(DiskInfo * diskInfos, size_t * disk_info_size);
 FUNCTION_RETURN getUserHomePath(char[MAX_PATH]);
+/**
+ * Get an identifier of the machine in an os specific way.
+ * In Linux it uses:
+ * http://stackoverflow.com/questions/328936/getting-a-unique-id-from-a-unix-like-system
+ *
+ * <ul>
+ * <li>Dbus if available</li>
+ * </ul>
+ * Can be used as a fallback in case no other methods are available.
+ * Windows:
+ * HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\ CurrentVersion\ProductId
+ * http://sowkot.blogspot.it/2008/08/generating-unique-keyfinger-print-for.html
+ * http://stackoverflow.com/questions/2842116/reliable-way-of-generating-unique-hardware-id
+ *
+ *
+ * @param identifier
+ * @return
+ */
+FUNCTION_RETURN getOsSpecificIdentifier(unsigned char identifier[6]);
 VIRTUALIZATION getVirtualization();
 void os_initialize();
 

--
Gitblit v1.9.1