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