diff --git a/lexfloatclient.go b/lexfloatclient.go index 449a288..cb80e56 100644 --- a/lexfloatclient.go +++ b/lexfloatclient.go @@ -339,6 +339,27 @@ func HasFloatingLicense() int { return int(status) } +/* + FUNCTION: RequestOfflineFloatingLicense() + + PURPOSE: Sends the request to lease the license from the LexFloatServer for offline usage. + + The maximum value of lease duration is configured in the config.yml of LexFloatServer + + PARAMETERS: + * leaseDuration - value of the lease duration. + + 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() diff --git a/lexfloatclient/LexFloatClient.h b/lexfloatclient/LexFloatClient.h index ee04a47..9124430 100644 --- a/lexfloatclient/LexFloatClient.h +++ b/lexfloatclient/LexFloatClient.h @@ -269,6 +269,23 @@ 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. + + The maximum value of lease duration is configured in the config.yml of LexFloatServer + + PARAMETERS: + * leaseDuration - value of the lease duration. + + 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: GetFloatingClientLeaseExpiryDate()