File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed
Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -353,6 +353,28 @@ def GetHostFeatureEntitlement(feature_name):
353353 else :
354354 raise LexFloatClientException (status )
355355
356+ @staticmethod
357+ def GetHostProductMetadata (key ):
358+ """Gets the value of the product metadata.
359+
360+ Args:
361+ key (str): metadata key to retrieve the value
362+
363+ Raises:
364+ LexFloatClientException
365+
366+ Returns:
367+ str: value of metadata for the key
368+ """
369+ cstring_key = LexFloatClientNative .get_ctype_string (key )
370+ buffer_size = 4096
371+ buffer = LexFloatClientNative .get_ctype_string_buffer (buffer_size )
372+ status = LexFloatClientNative .GetHostProductMetadata (
373+ cstring_key , buffer , buffer_size )
374+ if status != LexFloatStatusCodes .LF_OK :
375+ raise LexFloatClientException (status )
376+ return LexFloatClientNative .byte_to_string (buffer .value )
377+
356378 @staticmethod
357379 def GetHostLicenseMetadata (key ):
358380 """Get the value of the license metadata field associated with the
Original file line number Diff line number Diff line change @@ -171,6 +171,10 @@ def byte_to_string(input):
171171GetHostFeatureEntitlement .argtypes = [CSTRTYPE , STRTYPE , c_uint32 ]
172172GetHostFeatureEntitlement .restype = c_int
173173
174+ GetHostProductMetadata = library .GetHostProductMetadata
175+ GetHostProductMetadata .argtypes = [CSTRTYPE , STRTYPE , c_uint32 ]
176+ GetHostProductMetadata .restype = c_int
177+
174178GetHostLicenseMetadata = library .GetHostLicenseMetadata
175179GetHostLicenseMetadata .argtypes = [CSTRTYPE , STRTYPE , c_uint32 ]
176180GetHostLicenseMetadata .restype = c_int
You can’t perform that action at this time.
0 commit comments