Skip to content

Commit 46638a3

Browse files
authored
Merge pull request #16 from cryptlex/muneeb/status-code
feat: add status code
2 parents ee23b4d + 3679f3a commit 46638a3

File tree

2 files changed

+92
-8
lines changed

2 files changed

+92
-8
lines changed

lexfloatclient/LexFloatStatusCodes.h

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,13 +153,71 @@ enum LexFloatStatusCodes
153153
*/
154154
LF_E_FEATURE_FLAG_NOT_FOUND = 58,
155155

156+
/*
157+
CODE: LF_E_SYSTEM_PERMISSION
158+
159+
MESSAGE: Insufficient system permissions.
160+
*/
161+
LF_E_SYSTEM_PERMISSION = 59,
162+
156163
/*
157164
CODE: LF_E_IP
158165
159166
MESSAGE: IP address is not allowed.
160167
*/
161168
LF_E_IP = 60,
162169

170+
/*
171+
CODE: LF_E_INVALID_PERMISSION_FLAG
172+
173+
MESSAGE: Invalid permission flag.
174+
*/
175+
LF_E_INVALID_PERMISSION_FLAG = 61,
176+
177+
/*
178+
CODE: LF_E_OFFLINE_FLOATING_LICENSE_NOT_ALLOWED
179+
180+
MESSAGE: Offline floating license is not allowed for per-instance leasing strategy.
181+
*/
182+
LF_E_OFFLINE_FLOATING_LICENSE_NOT_ALLOWED = 62,
183+
184+
/*
185+
CODE: LF_E_MAX_OFFLINE_LEASE_DURATION_EXCEEDED
186+
187+
MESSAGE: Maximum offline lease duration exeeded.
188+
*/
189+
LF_E_MAX_OFFLINE_LEASE_DURATION_EXCEEDED = 63,
190+
191+
/*
192+
CODE: LF_E_ALLOWED_OFFLINE_FLOATING_CLIENTS_LIMIT_REACHED
193+
194+
MESSAGE: Allowed offline floating clients limit reached.
195+
*/
196+
LF_E_ALLOWED_OFFLINE_FLOATING_CLIENTS_LIMIT_REACHED = 64,
197+
198+
/*
199+
CODE: LF_E_WMIC
200+
201+
MESSAGE: Fingerprint couldn't be generated because Windows Management
202+
Instrumentation (WMI) service has been disabled. This error is specific
203+
to Windows only.
204+
*/
205+
LF_E_WMIC = 65,
206+
207+
/*
208+
CODE: LF_E_MACHINE_FINGERPRINT
209+
210+
MESSAGE: Machine fingerprint has changed since activation.
211+
*/
212+
LF_E_MACHINE_FINGERPRINT = 66,
213+
214+
/*
215+
* CODE: LF_E_PROXY_NOT_TRUSTED
216+
*
217+
* MESSAGE: Request blocked due to untrusted proxy.
218+
*/
219+
LF_E_PROXY_NOT_TRUSTED = 67,
220+
163221
/*
164222
CODE: LF_E_CLIENT
165223

lexfloatstatus_codes.go

Lines changed: 34 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ package lexfloatclient
44

55
// int enumeration from lexfloatclient/int.h int =4
66
const (
7-
// Success code.
7+
// Success code.
88
LF_OK int = 0
99

1010
// Failure code.
@@ -32,12 +32,12 @@ const (
3232
LF_E_LICENSE_EXISTS int = 46
3333

3434
// License does not exist on server or has already expired. This
35-
// happens when the request to refresh the license is delayed.
35+
// happens when the request to refresh the license is delayed.
3636
LF_E_LICENSE_NOT_FOUND int = 47
3737

3838
// License lease has expired due to network error. This
39-
// happens when the request to refresh the license fails due to
40-
// network error.
39+
// happens when the request to refresh the license fails due to
40+
// network error.
4141
LF_E_LICENSE_EXPIRED_INET int = 48
4242

4343
// The server has reached it's allowed limit of floating licenses.
@@ -65,22 +65,48 @@ const (
6565
LF_E_METER_ATTRIBUTE_USES_LIMIT_REACHED int = 56
6666

6767
// No product version is linked with the license.
68-
LF_E_PRODUCT_VERSION_NOT_LINKED int = 57
68+
LF_E_PRODUCT_VERSION_NOT_LINKED int = 57
6969

70-
// The product version feature flag does not exist.
71-
LF_E_FEATURE_FLAG_NOT_FOUND int = 58
70+
// The product version feature flag does not exist.
71+
LF_E_FEATURE_FLAG_NOT_FOUND int = 58
72+
73+
// Insufficient system permissions.
74+
LF_E_SYSTEM_PERMISSION int = 59
7275

7376
// IP address is not allowed.
7477
LF_E_IP int = 60
7578

79+
// Invalid permission flag.
80+
LF_E_INVALID_PERMISSION_FLAG int = 61
81+
82+
// Offline floating license is not allowed for per-instance leasing strategy.
83+
LF_E_OFFLINE_FLOATING_LICENSE_NOT_ALLOWED int = 62
84+
85+
// Maximum offline lease duration exceeded.
86+
LF_E_MAX_OFFLINE_LEASE_DURATION_EXCEEDED int = 63
87+
88+
// Allowed offline floating clients limit reached.
89+
LF_E_ALLOWED_OFFLINE_FLOATING_CLIENTS_LIMIT_REACHED int = 64
90+
91+
// Fingerprint couldn't be generated because Windows Management
92+
// Instrumentation (WMI) service has been disabled. This error is specific
93+
// to Windows only.
94+
LF_E_WMIC int = 65
95+
96+
// Machine fingerprint has changed since activation.
97+
LF_E_MACHINE_FINGERPRINT int = 66
98+
99+
// Request blocked due to untrusted proxy.
100+
LF_E_PROXY_NOT_TRUSTED int = 67
101+
76102
// Client error.
77103
LF_E_CLIENT int = 70
78104

79105
// Server error.
80106
LF_E_SERVER int = 71
81107

82108
// System time on server has been tampered with. Ensure
83-
// your date and time settings are correct on the server machine.
109+
// your date and time settings are correct on the server machine.
84110
LF_E_SERVER_TIME_MODIFIED int = 72
85111

86112
// The server has not been activated using a license key.

0 commit comments

Comments
 (0)