Component
Object Hierarchy:
Description:
Namespace: AppStream
Package: appstream
Content:
Properties:
- public GenericArray<void*> categories { get; }
string array of categories
- public string description { owned get; set; }
the description
- public string developer_name { owned get; set; }
the developer name
- public List<Icon> icons { get; }
hash map of icon urls and sizes
- public string id { get; set; }
the unique identifier
- public string[] keywords { owned get; set; }
string array of keywords
- public ComponentKind kind { get; set; }
the ComponentKind of this component
- public string name { owned get; set; }
the name
- public string[] pkgnames { get; set; }
string array of packages name
- public string project_group { get; set; }
the project group
- public string project_license { get; set; }
the project license
- public GenericArray<Screenshot> screenshots { get; }
An array of Screenshot instances
- public string summary { owned get; set; }
the summary
- public HashTable<UrlKind,string> urls { owned get; }
the urls associated with this component
Creation methods:
- public Component ()
Creates a new Component.
Methods:
- public void add_addon (Component addon)
Add a reference to the addon that is enhancing this component.
- public void add_agreement (Agreement agreement)
Adds an agreement to the software component.
- public void add_bundle (Bundle bundle)
Adds a bundle to the component.
- public void add_category (string category)
Add a category.
- public void add_content_rating (ContentRating content_rating)
Adds a content rating to this component.
- public void add_extends (string cpt_id)
Add a reference to the extended component
- public void add_icon (Icon icon)
Add an icon to this component.
- public void add_keyword (string keyword, string? locale)
Add a new keyword to the keywords list for the given locale.
- public void add_language (string? locale, int percentage)
Adds a language to the component.
- public void add_launchable (Launchable launchable)
Adds a Launchable containing launchables entries for this component.
- public void add_provided (Provided prov)
Add a set of provided items to this component.
- public void add_provided_item (ProvidedKind kind, string item)
Adds a provided item to the component with the given
kind
, creating a newAsProvided
for this kind internally if necessary. - public void add_relation (Relation relation)
- public void add_release (Release release)
Add an Release to this component.
- public void add_replaces (string cid)
Add the component ID of a component that gets replaced by the current component.
- public void add_review (Review review)
Adds a user review to a software component.
- public void add_screenshot (Screenshot sshot)
Add an Screenshot to this component.
- public void add_suggested (Suggested suggested)
Add an Suggested to this component.
- public bool add_tag (string ns, string tag)
Add a tag to this component.
- public void add_translation (Translation tr)
Assign an Translation object describing the translation system used by this component.
- public void add_url (UrlKind url_kind, string url)
Adds some URL data to the component.
- public void clear_keywords (string? locale)
Remove all keywords for the given locale.
- public void clear_languages ()
Remove all registered language translation information.
- public void clear_tags ()
Remove all tags associated with this component.
- public unowned string get_active_locale ()
Get the current active locale for this component, which is used to get localized messages.
- public unowned GenericArray<Component> get_addons ()
Returns a list of Component objects which are addons extending this component in functionality.
- public unowned Agreement? get_agreement_by_kind (AgreementKind kind)
Gets an agreement the component has specified for the particular kind.
- public unowned GenericArray<Agreement> get_agreements ()
Get a list of all agreements registered with this software component.
- public unowned string get_branch ()
Gets the branch for the application.
- public unowned Branding? get_branding ()
Get the branding associated with this component, or null in case this component has no special branding.
- public unowned Bundle? get_bundle (BundleKind bundle_kind)
Gets a bundle identifier string.
- public unowned GenericArray<Bundle> get_bundles ()
Get a list of all software bundles associated with this component.
- public unowned GenericArray<string> get_categories ()
- public unowned GenericArray<string> get_compulsory_for_desktops ()
- public unowned ContentRating? get_content_rating (string kind)
Gets a content ratings of a specific type that are defined for this component.
- public unowned GenericArray<ContentRating> get_content_ratings ()
Gets all content ratings defined for this software.
- public unowned Context? get_context ()
Get the Context associated with this component.
- public unowned HashTable<void*,void*> get_custom ()
- public unowned string get_custom_value (string key)
Retrieve value for a custom data entry with the given key.
- public unowned string get_data_id ()
Get a unique identifier for this metadata set.
- public unowned string get_date_eol ()
Gets the end-of-life date for the entire component.
- public unowned string get_description ()
Get the localized long description of this component.
- public unowned string get_developer_name ()
Get the component's developer or development team name.
- public unowned GenericArray<string>? get_extends ()
Returns a string list of IDs of components which are extended by this addon.
- public unowned Icon? get_icon_by_size (uint width, uint height)
Gets an icon matching the size constraints.
- public unowned Icon? get_icon_stock ()
Gets a stock icon for this component if one is associated with it.
- public unowned GenericArray<Icon> get_icons ()
- public unowned string get_id ()
Get the unique AppStream identifier for this component.
- public unowned GenericArray<string> get_keywords ()
- public unowned HashTable<void*,void*> get_keywords_table ()
Retrieve the internal hash table mapping languages to keword arrays.
- public ComponentKind get_kind ()
Returns the ComponentKind of this component.
- public int get_language (string? locale)
Gets the translation coverage in percent for a specific locale
- public List<unowned string> get_languages ()
Get a list of all languages.
- public unowned Launchable? get_launchable (LaunchableKind kind)
Gets a Launchable of a specific type that contains launchable entries for this component.
- public unowned GenericArray<Launchable> get_launchables ()
- public MergeKind get_merge_kind ()
Get the merge method which should apply to duplicate components with this ID.
- public unowned string get_metadata_license ()
The license the metadata iself is subjected to.
- public unowned string get_name ()
A human-readable name for this component.
- public unowned HashTable<void*,void*> get_name_table ()
Get the internal locale to component name mapping table.
- public unowned string get_name_variant_suffix ()
Get variant suffix for the component name (only to be displayed if two components have the same name).
- public unowned string get_origin ()
- public unowned string 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.
- public unowned string[] get_pkgnames ()
Get a list of package names which this component consists of.
- public int get_priority ()
Returns the priority of this component.
- public unowned string get_project_group ()
Get the component's project group.
- public unowned string get_project_license ()
Get the license of the project this component belongs to.
- public unowned GenericArray<Provided> get_provided ()
Get a list of Provided objects associated with this component.
- public unowned Provided? get_provided_for_kind (ProvidedKind kind)
Get an Provided object for the given interface type, containing information about the public interfaces (mimetypes, firmware, DBus services, ...) this component provides.
- public unowned GenericArray<Relation> get_recommends ()
Get an array of items that are recommended by this component.
- public unowned GenericArray<Release> get_releases ()
Get an array of the Release items this component provides.
- public ReleasesKind get_releases_kind ()
Returns the ReleasesKind of the release metadata associated with this component.
- public unowned string get_releases_url ()
Get a remote URL to obtain release information for the component.
- public unowned GenericArray<string> get_replaces ()
Get a list of component IDs of components that this software replaces entirely.
- public unowned GenericArray<Relation> get_requires ()
Get an array of items that are required by this component.
- public unowned GenericArray<Review> get_reviews ()
Gets any reviews associated with the component.
- public ComponentScope get_scope ()
- public unowned GenericArray<Screenshot> get_screenshots ()
Get a list of associated screenshots.
- public GenericArray<unowned string> get_search_tokens ()
Returns all search tokens for this component.
- public uint get_sort_score ()
Returns the sorting priority of this component.
- public unowned string get_source_pkgname ()
- public unowned GenericArray<Suggested> get_suggested ()
Get a list of associated suggestions.
- public unowned string get_summary ()
Get a short description of this component.
- public unowned HashTable<void*,void*> get_summary_table ()
Get the internal locale to component summary mapping table.
- public unowned GenericArray<Relation> get_supports ()
Get an array of items that are supported by this component, e.
- public uint64 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.
- public unowned GenericArray<Translation> get_translations ()
Get a GenericArray of Translation objects describing the translation systems and translation-ids (e.
- public unowned string? get_url (UrlKind url_kind)
Gets a URL.
- public ValueFlags get_value_flags ()
- public bool has_bundle ()
- public bool has_category (string category)
Check if component is in the specified category.
- public bool has_tag (string ns, string tag)
Test if the component is tagged with the selected tag.
- public bool insert_custom_value (string key, string value)
Add a key and value pair to the custom data table.
- public bool is_compulsory_for_desktop (string desktop)
Check if this component is compulsory for the given desktop.
- public bool is_free ()
Returns true if this component is free and open source software.
- public bool is_ignored ()
- public bool is_member_of_category (Category category)
Test if the component this is a member of category
category
. - public bool is_valid ()
Check if the essential properties of this Component are populated with useful data.
- public bool load_from_bytes (Context context, FormatKind format, Bytes bytes) throws Error
Load metadata for this component from an XML string.
- public bool load_releases (bool reload, bool allow_net) throws Error
Load data from an external source, possibly a local file or a network resource.
- public bool load_releases_from_bytes (Bytes bytes) throws Error
Load release information from XML bytes.
- public bool remove_tag (string ns, string tag)
Remove a tag from this component
- public uint search_matches (string term)
Searches component data for a specific keyword.
- public uint search_matches_all (string terms)
Searches component data for all the specific keywords.
- public void set_active_locale (string? locale)
Set the current active locale for this component, which is used to get localized messages.
- public void set_branch (string branch)
Set the branch that the component instance was sourced from.
- public void set_branding (Branding branding)
Set branding for this component.
- public void set_compulsory_for_desktop (string desktop)
Mark this component to be compulsory for the specified desktop environment.
- public void set_data_id (string value)
Set the session-specific unique metadata identifier for this component.
- public void set_date_eol (string date)
Sets an end-of-life date for this component.
- public void set_description (string value, string? locale)
Set long description for this component.
- public void set_developer_name (string value, string? locale)
Set the the component's developer or development team name.
- public void set_id (string value)
Set the AppStream identifier for this component.
- public void set_keywords (GenericArray<string> new_keywords, string? locale, bool deep_copy)
Set keywords for this component, replacing all existing ones for the selected locale.
- public void set_kind (ComponentKind value)
Sets the ComponentKind of this component.
- public void set_merge_kind (MergeKind kind)
Sets the MergeKind for this component.
- public void set_metadata_license (string value)
Set the license this metadata is licensed under.
- public void set_name (string value, string? locale)
Set a human-readable name for this component.
- public void set_name_variant_suffix (string value, string? locale)
Set a variant suffix for the component name (only to be displayed if components have the same name).
- public void set_origin (string origin)
- public void set_pkgname (string pkgname)
Set the package name that provides this component.
- public void set_pkgnames (string[] packages)
Set a list of package names this component consists of.
- public void set_priority (int priority)
Sets the priority of this component.
- public void set_project_group (string value)
Set the component's project group.
- public void set_project_license (string value)
Set the project license.
- public void set_releases_kind (ReleasesKind kind)
Sets the ReleasesKind of the release metadata associated with this component.
- public void set_releases_url (string url)
Set a remote URL pointing to an AppStream release info file.
- public void set_scope (ComponentScope scope)
Sets the ComponentScope of this component.
- public void set_sort_score (uint score)
Sets the sorting score of this component.
- public void set_source_pkgname (string spkgname)
- public void set_summary (string value, string? locale)
Set a short description for this component.
- public void set_value_flags (ValueFlags flags)
- public string to_string ()
Returns a string identifying this component.
- public string to_xml_data (Context context) throws Error
Serialize this component into an XML string.
Inherited Members:
All known members inherited from class GLib.Object