Top |
gboolean | as_is_spdx_license_id () |
gboolean | as_is_spdx_license_exception_id () |
gboolean | as_is_spdx_license_expression () |
gchar ** | as_spdx_license_tokenize () |
gchar * | as_spdx_license_detokenize () |
gchar * | as_license_to_spdx_id () |
gboolean | as_license_is_metadata_license_id () |
gboolean | as_license_is_metadata_license () |
gboolean | as_license_is_free_license () |
gchar * | as_get_license_url () |
gboolean
as_is_spdx_license_id (const gchar *license_id
);
Searches the known list of SPDX license IDs.
Since: 0.9.8
gboolean
as_is_spdx_license_exception_id (const gchar *exception_id
);
Searches the known list of SPDX license exception IDs.
Since: 0.12.10
gboolean
as_is_spdx_license_expression (const gchar *license
);
Checks the licence string to check it being a valid licence. NOTE: SPDX licenses can't typically contain brackets.
Since: 0.9.8
gchar **
as_spdx_license_tokenize (const gchar *license
);
Tokenizes the SPDX license string (or any simarly formatted string) into parts. Any license parts of the string e.g. "LGPL-2.0+" are prefexed with "@", the conjunctive replaced with "&", the disjunctive replaced with "|" and the WITH operator for license exceptions replaced with "^". Brackets are added as indervidual tokens and other strings are appended into single tokens where possible.
Since: 0.9.8
gchar *
as_spdx_license_detokenize (gchar **license_tokens
);
De-tokenizes the SPDX licenses into a string.
Since: 0.9.8
gchar *
as_license_to_spdx_id (const gchar *license
);
Converts a non-SPDX license into an SPDX format string where possible.
Since: 0.9.8
gboolean
as_license_is_metadata_license_id (const gchar *license_id
);
Tests license ID against the vetted list of licenses that
can be used for metainfo metadata.
This function will not work for license expressions, if you need
to test an SPDX license expression for compliance, please
use as_license_is_metadata_license
insread.
gboolean
as_license_is_metadata_license (const gchar *license
);
Check if the metadata license is suitable for mixing with other metadata and redistributing the bundled result (this means we prefer permissive licenses here, to not require people shipping catalog metadata to perform a full license review).
This method checks against a hardcoded list of permissive licenses commonly used to license metadata under.
gboolean
as_license_is_free_license (const gchar *license
);
Check if the given license is for free-as-in-freedom software. A free software license is either approved by the Free Software Foundation or the Open Source Initiative.
This function does *not* yet handle complex license expressions with AND and OR. If the expression contains any of these, it will still simply check if all mentioned licenses are Free licenses. Currently, any license exception recognized by SPDX is assumed to not impact the free-ness status of a software component.
Please note that this function does not give any legal advice. Please read the license texts to learn more about the individual licenses and their conditions.
Since: 0.12.10