Skip to content

Commit

Permalink
feat: add request offline floating license
Browse files Browse the repository at this point in the history
  • Loading branch information
muneebkq committed Jul 9, 2024
1 parent 2781d3c commit e6f75fe
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
16 changes: 16 additions & 0 deletions lexfloatclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,22 @@ func HasFloatingLicense() int {
return int(status)
}

/*
FUNCTION: RequestOfflineFloatingLicense()
PURPOSE: Sends the request to lease the license from the LexFloatServer for offline usage.
RETURN CODES: LF_OK, LF_FAIL, LF_E_PRODUCT_ID, LF_E_LICENSE_EXISTS, LF_E_HOST_URL,
LF_E_LICENSE_LIMIT_REACHED, LF_E_INET, LF_E_TIME, LF_E_CLIENT, LF_E_IP, LF_E_SERVER,
LF_E_SERVER_LICENSE_NOT_ACTIVATED, LF_E_SERVER_TIME_MODIFIED, LF_E_SERVER_LICENSE_SUSPENDED,
LF_E_SERVER_LICENSE_GRACE_PERIOD_OVER, LF_E_SERVER_LICENSE_EXPIRED, LF_E_WMIC, LF_E_SYSTEM_PERMISSION
*/
func RequestOfflineFloatingLicense(leaseDuration uint) int {
cLeaseDuration := (C.uint)(leaseDuration)
status := C.RequestOfflineFloatingLicense(cLeaseDuration)
return int(status)
};

/*
FUNCTION: IncrementFloatingClientMeterAttributeUses()
Expand Down
12 changes: 12 additions & 0 deletions lexfloatclient/LexFloatClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,18 @@ LEXFLOATCLIENT_API int LF_CC DropFloatingLicense();
*/
LEXFLOATCLIENT_API int LF_CC HasFloatingLicense();

/*
FUNCTION: RequestOfflineFloatingLicense()
PURPOSE: Sends the request to lease the license from the LexFloatServer for offline usage.
RETURN CODES: LF_OK, LF_FAIL, LF_E_PRODUCT_ID, LF_E_LICENSE_EXISTS, LF_E_HOST_URL,
LF_E_LICENSE_LIMIT_REACHED, LF_E_INET, LF_E_TIME, LF_E_CLIENT, LF_E_IP, LF_E_SERVER,
LF_E_SERVER_LICENSE_NOT_ACTIVATED, LF_E_SERVER_TIME_MODIFIED, LF_E_SERVER_LICENSE_SUSPENDED,
LF_E_SERVER_LICENSE_GRACE_PERIOD_OVER, LF_E_SERVER_LICENSE_EXPIRED, LF_E_WMIC, LF_E_SYSTEM_PERMISSION
*/
LEXFLOATCLIENT_API int LF_CC RequestOfflineFloatingLicense(uint32_t leaseDuration);

/*
FUNCTION: IncrementFloatingClientMeterAttributeUses()
Expand Down

0 comments on commit e6f75fe

Please sign in to comment.