Commit 5173d92a authored by Matthias Klumpp's avatar Matthias Klumpp
Browse files

qt: Add wrappers for license exception and freeness tests

parent b5fe2b28
......@@ -27,6 +27,11 @@ bool AppStream::SPDX::isLicenseId(const QString &license_id)
return as_is_spdx_license_id(qPrintable(license_id));
}
bool AppStream::SPDX::isLicenseExceptionId(const QString &exception_id)
{
return as_is_spdx_license_exception_id(qPrintable(exception_id));
}
bool AppStream::SPDX::isLicenseExpression(const QString &license)
{
return as_is_spdx_license_expression(qPrintable(license));
......@@ -37,6 +42,11 @@ bool AppStream::SPDX::isMetadataLicense(const QString &license)
return as_license_is_metadata_license(qPrintable(license));
}
bool AppStream::SPDX::isFreeLicense(const QString &license)
{
return as_license_is_free_license(qPrintable(license));
}
QStringList AppStream::SPDX::tokenizeLicense(const QString &license)
{
g_auto(GStrv) strv = as_spdx_license_tokenize(qPrintable(license));
......
......@@ -27,8 +27,11 @@ namespace AppStream {
namespace SPDX {
APPSTREAMQT_EXPORT bool isLicenseId(const QString &license_id);
APPSTREAMQT_EXPORT bool isLicenseExceptionId(const QString &exception_id);
APPSTREAMQT_EXPORT bool isLicenseExpression(const QString &license);
APPSTREAMQT_EXPORT bool isMetadataLicense(const QString &license);
APPSTREAMQT_EXPORT bool isFreeLicense(const QString &license);
APPSTREAMQT_EXPORT QStringList tokenizeLicense(const QString &license);
APPSTREAMQT_EXPORT QString detokenizeLicense(const QStringList &license_tokens);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment