AppStream.Component
Description: Reference for AppStream.Component

### Class

# AppStreamComponent

since: 1.0

#### Description

    class AppStream.Component : GObject.Object
    {
      /* No available fields */
    }

No description available.

Available since: 1.0

#### Hierarchy

None

#### Ancestors

- GObject

#### Constructors

###### as_component_new

Creates a new `AsComponent`.

since: 1.0

#### Instance methods

###### as_component_add_addon

Add a reference to the addon that is enhancing this component.

since: 0.9.2

###### as_component_add_agreement

Adds an agreement to the software component.

since: 0.12.1

###### as_component_add_bundle

Adds a bundle to the component.

since: 0.8.0

###### as_component_add_category

Add a category.

since: 1.0

###### as_component_add_content_rating

Adds a content rating to this component.

since: 0.11.0

###### as_component_add_extends

Add a reference to the extended component.

since: 0.15.5

###### as_component_add_icon

Add an icon to this component.

since: 1.0

###### as_component_add_keyword

Add a new keyword to the keywords list for the given locale. This function does not check for duplicate keywords.

since: 1.0

###### as_component_add_language

Adds a language to the component.

since: 0.7.0

###### as_component_add_launchable

Adds a `AsLaunchable` containing launchables entries for this component.

since: 0.11.0

###### as_component_add_provided

Add a set of provided items to this component.

since: 0.6.2

###### as_component_add_provided_item

Adds a provided item to the component with the given `kind`, creating a new `AsProvided` for this kind internally if necessary.

since: 1.0

###### as_component_add_reference

Adds an external reference to the software component.

since: 1.0.0

###### as_component_add_relation

Adds a `AsRelation` to set a recommends or requires relation of component `cpt` on the item mentioned in the `AsRelation`.

since: 0.12.0

###### as_component_add_release

Add an `AsRelease` to this component.

since: 1.0

###### as_component_add_replaces

Add the component ID of a component that gets replaced by the current component.

since: 1.0

###### as_component_add_review

Adds a user review to a software component.

since: 0.14.0

###### as_component_add_screenshot

Add an `AsScreenshot` to this component.

since: 1.0

###### as_component_add_suggested

Add an `AsSuggested` to this component.

since: 1.0

###### as_component_add_tag

Add a tag to this component.

since: 0.15.0

###### as_component_add_translation

Assign an `AsTranslation` object describing the translation system used by this component.

since: 0.9.2

###### as_component_add_url

Adds some URL data to the component.

since: 0.6.2

###### as_component_check_relations

Verifies the respective relations and presents whether the system specified in `AsSystemInfo` `sysinfo` and data from `pool` supply the requested facilities.

since: 1.0.0

###### as_component_clear_keywords

Remove all keywords for the given locale.

since: 1.0

###### as_component_clear_languages

Remove all registered language translation information.

since: 0.14.5

###### as_component_clear_tags

Remove all tags associated with this component.

since: 0.15.0

###### as_component_get_addons

Returns a list of `AsComponent` objects which are addons extending this component in functionality.

since: 0.9.2

###### as_component_get_agreement_by_kind

Gets an agreement the component has specified for the particular kind.

since: 0.12.1

###### as_component_get_agreements

Get a list of all agreements registered with this software component.

since: 0.15.0

###### as_component_get_branch

Gets the branch for the application.

since: 0.14.0

###### as_component_get_branding

Get the branding associated with this component, or `NULL` in case this component has no special branding.

since: 0.15.2

###### as_component_get_bundle

Gets a bundle identifier string.

since: 0.8.0

###### as_component_get_bundles

Get a list of all software bundles associated with this component.

since: 0.10

###### as_component_get_categories

No description available.

since: 1.0

###### as_component_get_compulsory_for_desktops

No description available.

since: 1.0

###### as_component_get_content_rating

Gets a content ratings of a specific type that are defined for this component.

since: 0.11.0

###### as_component_get_content_ratings

Gets all content ratings defined for this software.

since: 0.11.0

###### as_component_get_context

Get the `AsContext` associated with this component. This function may return `NULL` if no context is set (which will be the case if the component was not loaded from a file or cache but constructed in memory).

since: 0.11.2

###### as_component_get_custom

No description available.

since: 0.10.5

###### as_component_get_custom_value

Retrieve value for a custom data entry with the given key.

since: 0.10.5

###### as_component_get_data_id

Get a unique identifier for this metadata set. This unique ID is only valid for the current session, as opposed to the AppStream ID which uniquely identifies a software component.

since: 1.0

###### as_component_get_date_eol

Gets the end-of-life date for the entire component.

since: 0.15.2

###### as_component_get_description

Get the localized long description of this component.

since: 1.0

###### as_component_get_developer

Get information about the component’s developer or development team. The returned object may be empty if no developer information was available.

since: 1.0

###### as_component_get_extends

Returns a string list of IDs of components which are extended by this addon.

since: 0.15.5

###### as_component_get_icon_by_size

Gets an icon matching the size constraints. The icons are not filtered by type, and the first icon which matches the size is returned. If you want more control over which icons you use for displaying, use the %as_component_get_icons() function to get a list of all icons.

since: 1.0

###### as_component_get_icon_stock

Gets a stock icon for this component if one is associated with it. Will return `NULL` otherwise.

since: 1.0

###### as_component_get_icons

No description available.

since: 1.0

###### as_component_get_id

Get the unique AppStream identifier for this component. This ID is unique for the described component, but does not uniquely identify the metadata set.

since: 1.0

###### as_component_get_keywords

No description available.

since: 1.0

###### as_component_get_keywords_table

Retrieve the internal hash table mapping languages to keword arrays.

since: 1.0

###### as_component_get_kind

Returns the `AsComponentKind` of this component.

since: 1.0

###### as_component_get_language

Gets the translation coverage in percent for a specific locale.

since: 0.7.0

###### as_component_get_languages

Get a list of all languages.

since: 0.7.0

###### as_component_get_launchable

Gets a `AsLaunchable` of a specific type that contains launchable entries for this component.

since: 0.11.0

###### as_component_get_launchables

No description available.

since: 0.11.0

###### as_component_get_merge_kind

Get the merge method which should apply to duplicate components with this ID.

since: 0.9.8

###### as_component_get_metadata_license

The license the metadata iself is subjected to.

since: 1.0

###### as_component_get_name

A human-readable name for this component.

since: 1.0

###### as_component_get_name_table

Get the internal locale to component name mapping table.

since: 1.0

###### as_component_get_name_variant_suffix

Get variant suffix for the component name (only to be displayed if two components have the same name).

since: 0.12.10

###### as_component_get_origin

No description available.

since: 1.0

###### as_component_get_pkgname

Get the first package name of the list of packages that need to be installed for this component to be present on the system. Since most components consist of only one package, this is safe to use for about 90% of all cases.

since: 1.0

###### as_component_get_pkgnames

Get a list of package names which this component consists of. This usually is just one package name.

since: 1.0

###### as_component_get_priority

Returns the priority of this component. This method is used internally.

since: 0.6.1

###### as_component_get_project_group

Get the component’s project group.

since: 1.0

###### as_component_get_project_license

Get the license of the project this component belongs to.

since: 1.0

###### as_component_get_provided

Get a list of `AsProvided` objects associated with this component.

since: 1.0

###### as_component_get_provided_for_kind

Get an `AsProvided` object for the given interface type, containing information about the public interfaces (mimetypes, firmware, DBus services, …) this component provides.

since: 1.0

###### as_component_get_recommends

Get an array of items that are recommended by this component.

since: 0.12.0

###### as_component_get_references

Get a list of external references and citation information for this component.

since: 1.0.0

###### as_component_get_releases_plain

Get release information for this component, without downloading or loading any data from external sources.

since: 1.0

###### as_component_get_replaces

Get a list of component IDs of components that this software replaces entirely.

since: 1.0

###### as_component_get_requires

Get an array of items that are required by this component.

since: 0.12.0

###### as_component_get_reviews

Gets any reviews associated with the component.

since: 0.14.0

###### as_component_get_scope

No description available.

since: 0.10.2

###### as_component_get_screenshots_all

Get a list of all associated screenshots, for all environments.

since: 1.0

###### as_component_get_search_tokens

Returns all search tokens for this component.

since: 0.9.7

###### as_component_get_sort_score

Returns the sorting priority of this component.

since: 0.12.11

###### as_component_get_source_pkgname

No description available.

since: 1.0

###### as_component_get_suggested

Get a list of associated suggestions.

since: 1.0

###### as_component_get_summary

Get a short description of this component.

since: 1.0

###### as_component_get_summary_table

Get the internal locale to component summary mapping table.

since: 1.0

###### as_component_get_supports

Get an array of items that are supported by this component, e.g. to indicate support for a specific piece of hardware.

since: 0.15.0

###### as_component_get_system_compatibility_score

Return a score between 0 and 100 determining how compatible the component is with the system configuration provided as parameter.

since: 1.0

###### as_component_get_timestamp_eol

Gets the UNIX timestamp for the date when this component is out of support (end-of-life) and will receive no more updates, not even security fixes.

since: 0.15.2

###### as_component_get_translations

Get a `GPtrArray` of `AsTranslation` objects describing the translation systems and translation-ids (e.g. Gettext domains) used by this software component.

since: 0.9.2

###### as_component_get_url

Gets a URL.

since: 0.6.2

###### as_component_has_bundle

No description available.

since: 1.0

###### as_component_has_category

Check if component is in the specified category.

since: 1.0

###### as_component_has_tag

Test if the component is tagged with the selected tag.

since: 0.15.0

###### as_component_insert_custom_value

Add a key and value pair to the custom data table.

since: 0.10.5

###### as_component_is_compulsory_for_desktop

Check if this component is compulsory for the given desktop.

since: 1.0

###### as_component_is_floss

Returns `TRUE` if this component is free and open source software. To determine this status, this function will check if it comes from a vetted free-software-only source or whether its licenses are only free software licenses.

since: 0.15.5

###### as_component_is_ignored

No description available.

since: 0.10.2

###### as_component_is_member_of_category

Test if the component `cpt` is a member of category `category`.

since: 1.0

###### as_component_is_valid

Check if the essential properties of this Component are populated with useful data.

since: 1.0

###### as_component_load_from_bytes

Load metadata for this component from an XML string. You normally do not want to use this method directly and instead use the more convenient API of `AsMetadata` to create and update components.

since: 0.14.0

###### as_component_load_releases

Get release information for this component, download it if necessary.

since: 1.0

###### as_component_remove_tag

Remove a tag from this component.

since: 0.15.0

###### as_component_search_matches

Searches component data for a specific keyword.

since: 0.9.7

###### as_component_search_matches_all

Searches component data for all the specific keywords.

since: 0.9.8

###### as_component_set_branch

Set the branch that the component instance was sourced from.

since: 0.14.0

###### as_component_set_branding

Set branding for this component.

since: 0.15.2

###### as_component_set_compulsory_for_desktop

Mark this component to be compulsory for the specified desktop environment.

since: 1.0

###### as_component_set_context

Sets the document context this component is associated with.

since: 0.11.2

###### as_component_set_context_locale

Set the active locale on the context assoaiacted with this component, creating a new context for the component if none exists yet.

since: 1.0

###### as_component_set_data_id

Set the session-specific unique metadata identifier for this component. If two components have a different data_id but the same ID, they will be treated as independent sets of metadata describing the same component type.

since: 1.0

###### as_component_set_date_eol

Sets an end-of-life date for this component.

since: 0.15.2

###### as_component_set_description

Set long description for this component.

since: 1.0

###### as_component_set_developer

Set the the component’s developer.

since: 1.0

###### as_component_set_id

Set the AppStream identifier for this component.

since: 1.0

###### as_component_set_keywords

Set keywords for this component, replacing all existing ones for the selected locale.

since: 1.0

###### as_component_set_kind

Sets the `AsComponentKind` of this component.

since: 1.0

###### as_component_set_merge_kind

Sets the `AsMergeKind` for this component.

since: 0.9.8

###### as_component_set_metadata_license

Set the license this metadata is licensed under.

since: 1.0

###### as_component_set_name

Set a human-readable name for this component.

since: 1.0

###### as_component_set_name_variant_suffix

Set a variant suffix for the component name (only to be displayed if components have the same name).

since: 0.12.10

###### as_component_set_origin

No description available.

since: 1.0

###### as_component_set_pkgname

Set the package name that provides this component.

since: 0.14.5

###### as_component_set_pkgnames

Set a list of package names this component consists of. (This should usually be just one package name)

since: 1.0

###### as_component_set_priority

Sets the priority of this component. This method is used internally.

since: 0.6.1

###### as_component_set_project_group

Set the component’s project group.

since: 1.0

###### as_component_set_project_license

Set the project license.

since: 1.0

###### as_component_set_releases

Set a new set of releases for this component.

since: 1.0

###### as_component_set_scope

Sets the `AsComponentScope` of this component.

since: 1.0

###### as_component_set_sort_score

Sets the sorting score of this component.

since: 0.9.8

###### as_component_set_source_pkgname

No description available.

since: 1.0

###### as_component_set_summary

Set a short description for this component.

since: 1.0

###### as_component_sort_screenshots

Reorder the screenshots to prioritize a certain environment or style, instead of using the default screenshot order.

since: 1.0

###### as_component_to_string

Returns a string identifying this component. (useful for debugging)

since: 1.0

###### as_component_to_xml_data

Serialize this component into an XML string. You normally do not want to use this method directly and instead use the more convenient API of `AsMetadata` to serialize components.

since: 0.12.10

##### Methods inherited from GObject (43)

Please see GObject for a full list of methods.

#### Properties

###### AppStream.Component:categories

String array of categories.

since: 1.0

###### AppStream.Component:description

The description.

since: 1.0

###### AppStream.Component:icons

Hash map of icon urls and sizes.

since: 1.0

###### AppStream.Component:id

The unique identifier.

since: 1.0

###### AppStream.Component:keywords

String array of keywords.

since: 1.0

###### AppStream.Component:kind

The `AsComponentKind` of this component.

since: 1.0

###### AppStream.Component:name

The name.

since: 1.0

###### AppStream.Component:pkgnames

String array of packages name.

since: 1.0

###### AppStream.Component:project-group

The project group.

since: 1.0

###### AppStream.Component:project-license

The project license.

since: 1.0

###### AppStream.Component:screenshots

An array of `AsScreenshot` instances.

since: 1.0

###### AppStream.Component:summary

The summary.

since: 1.0

###### AppStream.Component:urls

The urls associated with this component.

since: 1.0

#### Signals

##### Signals inherited from GObject (1)

###### GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

unstable since: 2.0

#### Class structure

    struct AppStreamComponentClass {
      GObjectClass parent_class;
      void (* _as_reserved1) (
    void
      );
      void (* _as_reserved2) (
    void
      );
      void (* _as_reserved3) (
    void
      );
      void (* _as_reserved4) (
    void
      );
      void (* _as_reserved5) (
    void
      );
      void (* _as_reserved6) (
    void
      );

    }

No description available.

###### Class members

`parent_class: GObjectClass`
  No description available.
`_as_reserved1: void (* _as_reserved1) ( void )`
  No description available.
`_as_reserved2: void (* _as_reserved2) ( void )`
  No description available.
`_as_reserved3: void (* _as_reserved3) ( void )`
  No description available.
`_as_reserved4: void (* _as_reserved4) ( void )`
  No description available.
`_as_reserved5: void (* _as_reserved5) ( void )`
  No description available.
`_as_reserved6: void (* _as_reserved6) ( void )`
  No description available.