getLicenseOwner static method
Retrieves the license owner.
return The license owner. throws BiosealException An error has occurred during Bioseal Library execution.
Implementation
static String getLicenseOwner() {
Pointer<Char> pLicenseOwner = calloc.allocate(256);
Pointer<Int> pLicenseOwnerSize = calloc.allocate(1);
pLicenseOwnerSize[0] = 256;
try {
var err = biosealSDK.id3BiosealLicense_GetLicenseOwner(pLicenseOwner, pLicenseOwnerSize);
if (err == BiosealError.insufficientBuffer.value) {
calloc.free(pLicenseOwner);
pLicenseOwner = calloc.allocate(pLicenseOwnerSize.value);
err = biosealSDK.id3BiosealLicense_GetLicenseOwner(pLicenseOwner, pLicenseOwnerSize);
if (err != BiosealError.success.value) {
throw BiosealException(err);
}
}
final vLicenseOwner = utf8.decode(Uint8List.fromList(pLicenseOwner.cast<Uint8>().asTypedList(pLicenseOwnerSize.value)));
return vLicenseOwner;
} finally {
calloc.free(pLicenseOwner);
calloc.free(pLicenseOwnerSize);
}
}