-
Notifications
You must be signed in to change notification settings - Fork 0
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 GetFloatingLicenseMode function #12
Changes from 4 commits
1fc8583
2434b8f
22dbc64
91864d0
2d57beb
6fccba7
75dcdc2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,7 +40,7 @@ func floatingLicenseCallbackWrapper(status int) { | |
|
||
PARAMETERS: | ||
* productId - the unique product id of your application as mentioned | ||
on the product page in the dashboard. | ||
on the product page in the dashboard. | ||
|
||
RETURN CODES: LF_OK, LF_E_PRODUCT_ID | ||
*/ | ||
|
@@ -50,6 +50,7 @@ func SetHostProductId(productId string) int { | |
freeCString(cProductId) | ||
return int(status) | ||
} | ||
|
||
/* | ||
FUNCTION: SetHostUrl() | ||
|
||
|
@@ -125,14 +126,14 @@ func SetFloatingClientMetadata(key string, value string) int { | |
PARAMETERS: | ||
* libraryVersion - pointer to a buffer that receives the value of the string | ||
* length - size of the buffer pointed to by the libraryVersion parameter | ||
|
||
RETURN CODES: LF_OK, LF_E_BUFFER_SIZE | ||
*/ | ||
func GetFloatingClientLibraryVersion(libraryVersion *string) int { | ||
var cLibraryVersion = getCArray() | ||
status := C.GetFloatingClientLibraryVersion(&cLibraryVersion[0], maxCArrayLength) | ||
*libraryVersion = ctoGoString(&cLibraryVersion[0]) | ||
return int(status) | ||
var cLibraryVersion = getCArray() | ||
status := C.GetFloatingClientLibraryVersion(&cLibraryVersion[0], maxCArrayLength) | ||
*libraryVersion = ctoGoString(&cLibraryVersion[0]) | ||
return int(status) | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @muneebkq Is this the UI reflecting this or was the indentation by mistake added here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. there was no proper indentation earlier |
||
|
||
/* | ||
|
@@ -193,7 +194,7 @@ func GetHostProductVersionFeatureFlag(name string, enabled *bool, data *string) | |
*enabled = cEnabled > 0 | ||
*data = ctoGoString(&cData[0]) | ||
return int(status) | ||
} | ||
} | ||
|
||
/* | ||
FUNCTION: GetHostLicenseMetadata() | ||
|
@@ -242,6 +243,7 @@ func GetHostLicenseMeterAttribute(name string, allowedUses *uint, totalUses *uin | |
freeCString(cName) | ||
return int(status) | ||
} | ||
|
||
/* | ||
FUNCTION: GetHostLicenseExpiryDate() | ||
|
||
|
@@ -258,6 +260,7 @@ func GetHostLicenseExpiryDate(expiryDate *uint) int { | |
*expiryDate = uint(cExpiryDate) | ||
return int(status) | ||
} | ||
|
||
/* | ||
FUNCTION: GetFloatingClientMeterAttributeUses() | ||
|
||
|
@@ -277,6 +280,7 @@ func GetFloatingClientMeterAttributeUses(name string, uses *uint) int { | |
freeCString(cName) | ||
return int(status) | ||
} | ||
|
||
/* | ||
FUNCTION: RequestFloatingLicense() | ||
|
||
|
@@ -322,6 +326,25 @@ func HasFloatingLicense() int { | |
return int(status) | ||
} | ||
|
||
/* | ||
FUNCTION: GetFloatinglicenseMode() | ||
|
||
PURPOSE: Gets the mode of the floating license (online or offline). | ||
|
||
PARAMETERS: | ||
* modePtr - pointer to a buffer that receives the value of the string | ||
* length - size of the buffer pointed to by the value parameter | ||
|
||
RETURN CODES: LF_OK, LF_E_PRODUCT_ID, LF_E_NO_LICENSE, LF_E_BUFFER_SIZE | ||
*/ | ||
|
||
func GetFloatingLicenseMode(modePtr *string) int { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @muneebkq Extra line between the docs and function. Also here we do not use the Ptr in the param across the go wrappers. Please check the other similar functions There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done |
||
var cModePtr = getCArray() | ||
status := C.GetFloatingLicenseMode(&cModePtr[0], maxCArrayLength) | ||
*modePtr = ctoGoString(&cModePtr[0]) | ||
return int(status) | ||
} | ||
|
||
/* | ||
FUNCTION: IncrementFloatingClientMeterAttributeUses() | ||
|
||
|
@@ -335,7 +358,6 @@ func HasFloatingLicense() int { | |
LF_E_INET, LF_E_LICENSE_NOT_FOUND, LF_E_CLIENT, LF_E_IP, LF_E_SERVER, LF_E_METER_ATTRIBUTE_USES_LIMIT_REACHED, | ||
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 | ||
|
||
*/ | ||
func IncrementFloatingClientMeterAttributeUses(name string, increment uint) int { | ||
cName := goToCString(name) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@muneebkq No need for this change.