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 () |
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 (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. Currently, all licenses listed on the SPDX website are considered to be "free software" licenses.
This definition may be tightened in future. In any case, this function does not give any legal advice. Please read the license texts to know more about the individual licenses.
Since: 0.12.10