Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add status code #16

Merged
merged 5 commits into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,

/*
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add 67 error code as well

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.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add 67 error code as well

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