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