Namespace

AppStream – 1.0

Library to work with AppStream metadata

Version1.0.2
AuthorsAppStream Developers
LicenseLGPL-2.1-or-later
Websitehttps://www.freedesktop.org/software/appstream/docs/
Sourcehttps://github.com/ximion/appstream

Build

C headersappstream.h
pkg-config filesappstream

Dependencies

GObject—2.0 The base type system library
Browse documentation
Gio—2.0 A modern, easy-to-use VFS API
Browse documentation

Additional documentation

Classes

Agreement

since: 1.0

AgreementSection

since: 1.0

Artifact

since: 1.0

Branding

since: 1.0

Bundle

since: 1.0

Category

since: 1.0

Checksum

since: 1.0

Component

since: 1.0

ComponentBox

since: 1.0

ContentRating

since: 1.0

Context

since: 1.0

Developer

since: 1.0

Icon

since: 1.0

Image

since: 1.0

Issue

since: 1.0

Launchable

since: 1.0

Metadata

since: 1.0

Pool

since: 1.0

Provided

since: 1.0

Reference

since: 1.0

Relation

since: 1.0

RelationCheckResult

since: 1.0

Release

since: 1.0

ReleaseList

since: 1.0

Review

since: 1.0

Screenshot

since: 1.0

Suggested

since: 1.0

SystemInfo

since: 1.0

Translation

since: 1.0

Validator

since: 1.0

ValidatorIssue

since: 1.0

Video

since: 1.0

Structs

BrandingColorIter

A AsBrandingColorIter structure represents an iterator that can be used to iterate over the accent colors of an AsBranding object. AsBrandingColorIter structures are typically allocated on the stack and then initialized with as_branding_color_iter_init().

since: 1.0

Enumerations

AgreementKind

The kind of the agreement.

since: 1.0

ArtifactKind

The artifact type.

since: 1.0

BundleKind

The bundle type.

since: 1.0

ChassisKind

The type of chassis a computing device is built into.

since: 1.0

CheckResult

Result of a check operation.

since: 1.0

ChecksumKind

Checksums supported by AsRelease.

since: 1.0

ColorKind

A branding color type.

since: 1.0

ColorSchemeKind

A color scheme type.

since: 1.0

ComponentKind

The type of an AsComponent.

since: 1.0

ComponentScope

Scope of the AsComponent (system-wide or user-scope)

since: 1.0

ContentRatingSystem

A content rating system for a particular territory.

since: 0.12.12

ContentRatingValue

The specified level of an content_rating rating ID.

since: 1.0

ControlKind

Kind of an input method for users to control software.

since: 1.0

DisplaySideKind

Side a display_length requirement is for.

since: 1.0

FormatKind

Format of the AppStream metadata.

since: 1.0

FormatStyle

There are a few differences between AppStream’s metainfo files (shipped by upstream projects) and the catalog metadata (shipped by distributors). The data source kind indicates which style we should process. Usually you do not want to set this explicitly.

since: 1.0

FormatVersion

Format version / API level of the AppStream metadata.

since: 1.0

IconKind

The icon type.

since: 1.0

ImageKind

The image type.

since: 1.0

InternetKind

Different internet connectivity requirements or recommendations for an application.

since: 0.15.5

IssueKind

Checksums supported by AsRelease.

since: 1.0

IssueSeverity

The severity of an issue found by AsValidator.

since: 1.0

LaunchableKind

Type of launch system the entries belong to.

since: 1.0

MarkupKind

Text markup types.

since: 1.0

MergeKind

Defines how AsComponent data should be merged if the component is set for merge.

since: 1.0

MetadataLocation

The flags used when installing and removing metadata files.

since: 1.0

ProvidedKind

Type of the public interface components can provide.

since: 1.0

ReferenceKind

A reference type.

since: 1.0

RelationCompare

The relational comparison type.

since: 1.0

RelationItemKind

Type of the item an AsRelation is for.

since: 1.0

RelationKind

Type of a component’s relation to other items.

since: 1.0

RelationStatus

Status of a relation check result.

since: 1.0

ReleaseKind

The release kind.

since: 0.12.0

ReleaseListKind

The kind of a releases block.

since: 0.16.0

ReleaseUrlKind

AS_RELEASE_URL_KIND_UNKNOWN Unknown release web URL type The release URL kinds.

since: 0.12.5

ScreenshotKind

The screenshot type.

since: 1.0

ScreenshotMediaKind

The media kind contained in this screenshot.

since: 1.0

SizeKind

The artifact size kind.

since: 0.8.6

SuggestedKind

The suggested type.

since: 1.0

TranslationKind

The translation type.

since: 1.0

UrgencyKind

The urgency of an AsRelease.

since: 1.0

UrlKind

The URL type.

since: 1.0

VideoCodecKind

Supported video codecs.

since: 1.0

VideoContainerKind

Supported video codecs.

since: 1.0

Bitfields

CacheFlags

Flags on how caching should be used.

since: 1.0

ComponentBoxFlags

Flags controlling the component box behavior.

since: 1.0

DataIdMatchFlags

The flags used when matching unique IDs.

since: 1.0

ParseFlags

Influence certain aspects of how AppStream metadata is parsed.

since: 1.0

PoolFlags

Flags controlling the metadata pool behavior.

since: 1.0

ReviewFlags

The flags for the review.

since: 0.14.0

ValueFlags

Set how values assigned to an AsComponent should be treated when they are set or retrieved.

since: 1.0

VercmpFlags

The flags used when matching unique IDs.

since: 1.0

Error Domains

MetadataError

A metadata processing error.

since: 1.0

PoolError

A metadata pool error.

since: 1.0

RelationError

The error type.

since: 1.0

SystemInfoError

The error type.

since: 1.0

UtilsError

The error type.

since: 1.0

ValidatorError

The error type.

since: 1.0

Functions

get_current_distro_component_id

Returns the component-ID of the current distribution based on contents of the /etc/os-release file. This function is a shorthand for %as_distro_details_get_cid.

since: 1.0

get_default_categories

Get a list of the default Freedesktop and AppStream categories that software components (especially GUI applications) can be sorted into in software centers.

since: 1.0

get_default_categories_gi

Get a list of the default Freedesktop and AppStream categories that software components (especially GUI applications) can be sorted into in software centers.

since: 1.0

get_license_name

Get a translated license name for the given SPDX ID.

since: 1.0.0

get_license_url

Get a web URL to the license text and more license information for an SPDX license identifier.

since: 0.12.7

gstring_replace

Replaces the string find with the string replace in a GString up to limit times. If the number of instances of find in the GString is less than limit, all instances are replaced. If limit is 0, all instances of find are replaced.

since: 1.0

is_spdx_license_exception_id

Searches the known list of SPDX license exception IDs.

since: 0.12.10

is_spdx_license_expression

Checks the licence string to check it being a valid licence. NOTE: SPDX licenses can’t typically contain brackets.

since: 0.9.8

is_spdx_license_id

Searches the known list of SPDX license IDs.

since: 0.9.8

license_is_free_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.

since: 0.12.10

license_is_metadata_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).

since: 1.0

license_is_metadata_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.

since: 1.0

license_to_spdx_id

Converts a non-SPDX license into an SPDX format string where possible.

since: 0.9.8

markup_convert

Converts XML description markup into other forms of text.

since: 1.0

markup_strsplit_words

Splits up a long line into an array of smaller strings, each being no longer than line_len. Words are not split.

since: 0.14.0

spdx_license_detokenize

De-tokenizes the SPDX licenses into a string.

since: 0.9.8

spdx_license_tokenize

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

utils_build_data_id

Builds an identifier string unique to the individual dataset using the supplied information.

since: 0.14.0

utils_data_id_equal

Checks two component data IDs for equality allowing globs to match.

since: 0.14.0

utils_data_id_get_cid

Get the component-id part of the data-id.

since: 1.0

utils_data_id_hash

Converts a data-id to a hash value.

since: 0.14.0

utils_data_id_match

Checks two data IDs for equality allowing globs to match, whilst also allowing clients to whitelist sections that have to match.

since: 0.14.0

utils_data_id_valid

Checks if a data ID is valid i.e. has the correct number of sections.

since: 0.14.0

utils_get_desktop_environment_name

Get a human-readable, translated name of the desktop environment represented by the given ID.

since: 1.0.0

utils_get_gui_environment_style_name

Get a human-readable, translated name of the combination of GUI environment and style. E.g. “plasma:dark” becomes “Plasma (Dark)”.

since: 1.0.0

utils_get_tag_search_weight

Retrieve the raw search token weight for the given tag name that AppStream uses internally for searching. This can be used to implement separate, but compatible search logic.

since: 1.0

utils_guess_scope_from_path

Guess the AsComponentScope that applies to a given path.

since: 0.15.0

utils_install_metadata_file

Installs an AppStream MetaInfo, AppStream Metadata Catalog or AppStream Icon tarball file to the right place on the filesystem. Please note that this function does almost no validation and may guess missing values such as icon sizes and origin names. Ensure your metadata is good before installing it.

since: 0.14.0

utils_is_category_name

Searches the known list of registered XDG category names. See https://specifications.freedesktop.org/menu-spec/menu-spec-1.0.html#category-registry for a reference.

since: 0.9.7

utils_is_desktop_environment

Checks if the submitted desktop environment ID is known and valid.

since: 0.10.0

utils_is_gui_environment_style

Checks if the given identifier is a valid, known GUI environment style.

since: 1.0.0

utils_is_platform_triplet

Test if the given string is a valid platform triplet recognized by AppStream.

since: 0.14.0

utils_is_tld

Searches the known list of TLDs we allow for AppStream IDs. This excludes internationalized names.

since: 0.9.8

utils_locale_is_compatible

Calculates if one locale is compatible with another. When doing the calculation the locale and language code is taken into account if possible.

since: 0.9.5

utils_posix_locale_to_bcp47

Converts a POSIX locale string to the corresponding IETF BCP47 format. If the given locale is already in BCP47 format, no change will be done.

since: 1.0

utils_sort_components_into_categories

Sorts all components in cpts into the AsCategory categories listed in categories.

since: 1.0

vercmp

Compare alpha and numeric segments of two software versions, considering flags.

since: 1.0

vercmp_simple

Compare alpha and numeric segments of two software versions.

since: 1.0

vercmp_test_match

Compare two version numbers and check if the given version comparator matches.

since: 0.16.0

version_string

Get the version of the AppStream library that is currently used at runtime as a string.

since: 0.14.0

Function Macros

CHECK_VERSION

since: 1.0

component_box_index

Returns the AsComponent at the given index of the array.

since: 1.0

component_box_len

Get the amount of components in its box array.

since: 1.0

flags_add

since: 1.0

flags_contains

since: 1.0

flags_invert

since: 1.0

flags_remove

since: 1.0

release_list_index

Returns the AsRelease at the given index of the array.

since: 1.0

release_list_len

Get the amount of release entries present.

since: 1.0

Constants

MAJOR_VERSION

since: 1.0

MICRO_VERSION

since: 1.0

MINOR_VERSION

since: 1.0