open-license-manager
2014-04-13 5b35fd450ef78c3be506ca3fc22c3f431ae5e562
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
 * os-dependent.hpp
 *
 *  Created on: Mar 29, 2014
 *      Author: devel
 */
 
#ifndef OS_DEPENDENT_HPP_
#define OS_DEPENDENT_HPP_
 
#include <string>
#include <vector>
 
namespace license {
using namespace std;
 
enum VIRTUALIZATION {
    NONE,VMWARE
};
 
struct AdapterInfo {
    int id;
    string description;
    unsigned char mac_address[8];
    unsigned char ipv4_address[4];
};
 
struct DiskInfo {
    int id;
    string device;
    unsigned char disk_sn[8];
    string label;
};
 
class OsFunctions {
public:
    static vector<AdapterInfo> getAdapterInfos();
    static vector<DiskInfo> getDiskInfos();
    static string getModuleName();
    static string getUserHomePath();
    //use system dependent methods to verify signature
    static bool verifySignature(const char * stringToVerify, const char* signature);
    static VIRTUALIZATION getVirtualization();
};
 
}
 
 
#endif /* OS_DEPENDENT_HPP_ */