Skip to content

Commit

Permalink
Merge pull request #16 from cryptlex/muneeb/status-code
Browse files Browse the repository at this point in the history
feat: add status code
  • Loading branch information
ahmad-kemsan authored Aug 6, 2024
2 parents ee23b4d + 3679f3a commit 46638a3
Show file tree
Hide file tree
Showing 2 changed files with 92 additions and 8 deletions.
58 changes: 58 additions & 0 deletions lexfloatclient/LexFloatStatusCodes.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,13 +153,71 @@ enum LexFloatStatusCodes
*/
LF_E_FEATURE_FLAG_NOT_FOUND = 58,

/*
CODE: LF_E_SYSTEM_PERMISSION
MESSAGE: Insufficient system permissions.
*/
LF_E_SYSTEM_PERMISSION = 59,

/*
CODE: LF_E_IP
MESSAGE: IP address is not allowed.
*/
LF_E_IP = 60,

/*
CODE: LF_E_INVALID_PERMISSION_FLAG
MESSAGE: Invalid permission flag.
*/
LF_E_INVALID_PERMISSION_FLAG = 61,

/*
CODE: LF_E_OFFLINE_FLOATING_LICENSE_NOT_ALLOWED
MESSAGE: Offline floating license is not allowed for per-instance leasing strategy.
*/
LF_E_OFFLINE_FLOATING_LICENSE_NOT_ALLOWED = 62,

/*
CODE: LF_E_MAX_OFFLINE_LEASE_DURATION_EXCEEDED
MESSAGE: Maximum offline lease duration exeeded.
*/
LF_E_MAX_OFFLINE_LEASE_DURATION_EXCEEDED = 63,

/*
CODE: LF_E_ALLOWED_OFFLINE_FLOATING_CLIENTS_LIMIT_REACHED
MESSAGE: Allowed offline floating clients limit reached.
*/
LF_E_ALLOWED_OFFLINE_FLOATING_CLIENTS_LIMIT_REACHED = 64,

/*
CODE: LF_E_WMIC
MESSAGE: Fingerprint couldn't be generated because Windows Management
Instrumentation (WMI) service has been disabled. This error is specific
to Windows only.
*/
LF_E_WMIC = 65,

/*
CODE: LF_E_MACHINE_FINGERPRINT
MESSAGE: Machine fingerprint has changed since activation.
*/
LF_E_MACHINE_FINGERPRINT = 66,

/*
* CODE: LF_E_PROXY_NOT_TRUSTED
*
* MESSAGE: Request blocked due to untrusted proxy.
*/
LF_E_PROXY_NOT_TRUSTED = 67,

/*
CODE: LF_E_CLIENT
Expand Down
42 changes: 34 additions & 8 deletions lexfloatstatus_codes.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package lexfloatclient

// int enumeration from lexfloatclient/int.h int =4
const (
// Success code.
// Success code.
LF_OK int = 0

// Failure code.
Expand Down Expand Up @@ -32,12 +32,12 @@ const (
LF_E_LICENSE_EXISTS int = 46

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

// License lease has expired due to network error. This
// happens when the request to refresh the license fails due to
// network error.
// happens when the request to refresh the license fails due to
// network error.
LF_E_LICENSE_EXPIRED_INET int = 48

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

// No product version is linked with the license.
LF_E_PRODUCT_VERSION_NOT_LINKED int = 57
LF_E_PRODUCT_VERSION_NOT_LINKED int = 57

// The product version feature flag does not exist.
LF_E_FEATURE_FLAG_NOT_FOUND int = 58
// The product version feature flag does not exist.
LF_E_FEATURE_FLAG_NOT_FOUND int = 58

// Insufficient system permissions.
LF_E_SYSTEM_PERMISSION int = 59

// IP address is not allowed.
LF_E_IP int = 60

// Invalid permission flag.
LF_E_INVALID_PERMISSION_FLAG int = 61

// Offline floating license is not allowed for per-instance leasing strategy.
LF_E_OFFLINE_FLOATING_LICENSE_NOT_ALLOWED int = 62

// Maximum offline lease duration exceeded.
LF_E_MAX_OFFLINE_LEASE_DURATION_EXCEEDED int = 63

// Allowed offline floating clients limit reached.
LF_E_ALLOWED_OFFLINE_FLOATING_CLIENTS_LIMIT_REACHED int = 64

// Fingerprint couldn't be generated because Windows Management
// Instrumentation (WMI) service has been disabled. This error is specific
// to Windows only.
LF_E_WMIC int = 65

// Machine fingerprint has changed since activation.
LF_E_MACHINE_FINGERPRINT int = 66

// Request blocked due to untrusted proxy.
LF_E_PROXY_NOT_TRUSTED int = 67

// Client error.
LF_E_CLIENT int = 70

// Server error.
LF_E_SERVER int = 71

// System time on server has been tampered with. Ensure
// your date and time settings are correct on the server machine.
// your date and time settings are correct on the server machine.
LF_E_SERVER_TIME_MODIFIED int = 72

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

0 comments on commit 46638a3

Please sign in to comment.