Skip to content
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
17 changes: 17 additions & 0 deletions cryptlex/lexfloatclient/lexfloatclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,23 @@ def GetFloatingClientMeterAttributeUses(name):
return uses.value
else:
raise LexFloatClientException(status)

@staticmethod
def GetFloatingLicenseMode():
"""Gets the mode of the floating license (online or offline).

Raises:
LexActivatorException

Returns:
ActivationMode: mode of floating license.
"""
buffer_size = 256
buffer = LexFloatClientNative.get_ctype_string_buffer(buffer_size)
status = LexFloatClientNative.GetFloatingLicenseMode(buffer,buffer_size)
if status != LexFloatStatusCodes.LF_OK:
raise LexFloatClientException(status)
return LexFloatClientNative.byte_to_string(buffer.value)

@staticmethod
def RequestFloatingLicense():
Expand Down
4 changes: 4 additions & 0 deletions cryptlex/lexfloatclient/lexfloatclient_native.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,10 @@ def byte_to_string(input):
GetHostProductVersionDisplayName.argtypes = [STRTYPE, c_uint32]
GetHostProductVersionDisplayName.restype = c_int

GetFloatingLicenseMode = library.GetFloatingLicenseMode
GetFloatingLicenseMode.argtypes = [STRTYPE, c_uint32]
GetFloatingLicenseMode.restype = c_int

GetHostProductVersionFeatureFlag = library.GetHostProductVersionFeatureFlag
GetHostProductVersionFeatureFlag.argtypes = [CSTRTYPE, POINTER(c_uint32), STRTYPE, c_uint32]
GetHostProductVersionFeatureFlag.restype = c_int
Expand Down