Enrollment 28.2.0
Loading...
Searching...
No Matches
Info.h
Go to the documentation of this file.
1
9
10#pragma once
11
13#include "enrollment/Export.h"
14#include <array>
15#include <string>
16
17namespace inno
18{
19 extern "C"
20 {
21 INNO_ENROLLMENT_API const char* inno_EnrollmentInfo();
22 INNO_ENROLLMENT_API void inno_HardwareID(uint8_t method, char* hwid, int length, ErrorCallbacks errorCallbacks);
23 }
24
28 */
29 static inline std::string VersionInfo()
30 {
31 return inno_EnrollmentInfo();
32 }
33
34 /// Defines method of obtaining hardware ID for license create/check.
35 enum class HardwareIdMethod : uint8_t
36 {
38 AUTO = 0,
40 DISK = 1,
42 CPU_MAC = 2,
44 SMBIOS = 5,
46 AMAZON = 6,
50 PHYSICAL = 8,
55 SYSTEM = 10,
59 ANDROID_ID = 11
60 };
61
67 */
68 static inline std::string HardwareID()
69 {
70
71 static constexpr int HwidMaxLength = 200;
72 std::array<char, HwidMaxLength> hwid = {};
73
74 inno_HardwareID(
75 static_cast<uint8_t>(HardwareIdMethod::AUTO), hwid.data(), static_cast<int>(hwid.size()), ThrowOnError{});
76
77 return hwid.data();
78 }
79
87 */
88 static inline std::string HardwareID(HardwareIdMethod method)
89 {
90
91 static constexpr int HwidMaxLength = 200;
92 std::array<char, HwidMaxLength> hwid = {};
93
94 inno_HardwareID(static_cast<uint8_t>(method), hwid.data(), static_cast<int>(hwid.size()), ThrowOnError{});
95
96 return hwid.data();
97 }
98} // namespace inno
HardwareIdMethod
Defines method of obtaining hardware ID for license create/check.
Definition Info.h:35
@ ARM_ANDROID_MAC_ADDR
Use only network MAC address as hardware id.
Definition Info.h:52
@ DISK
Use disk based hardware id.
Definition Info.h:39
@ SMBIOS
Use smbios for hardware id.
Definition Info.h:43
@ APPLICATION_ID
Use application identifier as application id.
Definition Info.h:47
@ CPU_MAC
Use cpu and network mac address as hardware id.
Definition Info.h:41
@ AMAZON
Use amazon http request as hardware id.
Definition Info.h:45
@ ANDROID_ID
Use android ID.
Definition Info.h:58
@ AUTO
Automatically select the hardware id based on platform defaults.
Definition Info.h:37
@ SYSTEM
Use content of a system file to generate hardware id (/proc, /sys on Linux systems).
Definition Info.h:54
@ PHYSICAL
Use other physical hardware identifier (platform specific).
Definition Info.h:49
static std::string VersionInfo()
Provides information about SDK.
Definition Info.h:28
static std::string HardwareID()
Provides hardware ID of current PC/mobile/device.
Definition Info.h:67