Skip to content

Commit

Permalink
Merge pull request #4 from cryptlex/feat/client-version
Browse files Browse the repository at this point in the history
feat: added GetFloatingClientLibraryVersion()
  • Loading branch information
ahmad-kemsan authored Dec 1, 2023
2 parents f447519 + 019ae5c commit 428793a
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
18 changes: 18 additions & 0 deletions lexfloatclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,24 @@ func SetFloatingClientMetadata(key string, value string) int {
return int(status)
}

/*
FUNCTION: GetFloatingClientLibraryVersion()
PURPOSE: Gets the version of this library.
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)
}

/*
FUNCTION: GetHostProductVersionName()
Expand Down
13 changes: 13 additions & 0 deletions lexfloatclient/LexFloatClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,19 @@ LEXFLOATCLIENT_API int LF_CC SetFloatingLicenseCallback(CallbackType callback);
*/
LEXFLOATCLIENT_API int LF_CC SetFloatingClientMetadata(CSTRTYPE key, CSTRTYPE value);

/*
FUNCTION: GetFloatingClientLibraryVersion()
PURPOSE: Gets the version of this library.
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
*/
LEXFLOATCLIENT_API int LF_CC GetFloatingClientLibraryVersion(STRTYPE libraryVersion, uint32_t length);

/*
FUNCTION: GetHostProductVersionName()
Expand Down

0 comments on commit 428793a

Please sign in to comment.