Top | ![]() |
![]() |
![]() |
![]() |
GStrv | categories | Read / Write |
gchar * | description | Read / Write |
gchar * | homepage | Read / Write |
gchar * | icon | Read / Write |
gchar * | icon-url | Read / Write |
gchar * | idname | Read / Write |
GStrv | keywords | Read / Write |
AsComponentKind | kind | Read / Write |
GStrv | mimetypes | Read / Write |
gchar * | name | Read / Write |
gchar * | name-original | Read / Write |
gchar * | pkgname | Read / Write |
gchar * | project-license | Read / Write |
GPtrArray * | screenshots | Read |
gchar * | summary | Read / Write |
This object represents an Appstream software component which is associated to a package in the distribution's repositories. A component can be anything, ranging from an application to a font, a codec or even a non-visual software project providing libraries and python-modules for other applications to use.
The type of the component is stored as AsComponentKind and can be queried to find out which kind of component we're dealing with.
See also: AsProvidesKind, AsDatabase
const gchar *
as_component_kind_to_string (AsComponentKind kind
);
Converts the enumerated value to an text representation.
AsComponentKind
as_component_kind_from_string (const gchar *kind_str
);
Converts the text representation to an enumerated value.
AsComponent *
as_component_construct (GType object_type
);
Construct an AsComponent.
gboolean
as_component_is_valid (AsComponent *self
);
Check if the essential properties of this Component are populated with useful data.
gchar *
as_component_to_string (AsComponent *self
);
Returns a string identifying this component. (useful for debugging)
gboolean as_component_provides_item (AsComponent *self
,AsProvidesKind kind
,const gchar *value
);
Checks if this component provides an item of the specified type
self
a valid AsComponent
kind
the kind of the provides-item
value
the value of the provides-item
void as_component_set_kind (AsComponent *self
,AsComponentKind value
);
Sets the AsComponentKind of this component.
const gchar *
as_component_get_id (AsComponent *self
);
Set the unique identifier for this component.
void as_component_set_id (AsComponent *self
,const gchar *value
);
Set the unique identifier for this component.
void as_component_set_name_original (AsComponent *self
,const gchar *value
);
const gchar *
as_component_get_project_license (AsComponent *self
);
Get the license of the project this component belongs to.
void as_component_set_project_license (AsComponent *self
,const gchar *value
);
Set the project license.
const gchar *
as_component_get_project_group (AsComponent *self
);
Get the component's project group.
void as_component_set_project_group (AsComponent *self
,const gchar *value
);
Set the component's project group.
gchar **
as_component_get_compulsory_for_desktops
(AsComponent *self
);
void as_component_set_compulsory_for_desktops (AsComponent *self
,gchar **value
);
Set a list of desktops where this component is compulsory.
gboolean as_component_is_compulsory_for_desktop (AsComponent *self
,const gchar *desktop
);
Check if this component is compulsory for the given desktop.
void as_component_set_categories_from_str (AsComponent *self
,const gchar *categories_str
);
Set the categories list from a string
self
a valid AsComponent instance
categories_str
Semicolon-separated list of category-names
gboolean as_component_has_category (AsComponent *self
,const gchar *category
);
Check if component is in the specified category.
GPtrArray *
as_component_get_screenshots (AsComponent *self
);
Get a list of associated screenshots.
void as_component_add_screenshot (AsComponent *self
,AsScreenshot *sshot
);
Add an AsScreenshot to this component.
void as_component_set_description (AsComponent *self
,const gchar *value
);
void as_component_set_icon_url (AsComponent *self
,const gchar *value
);
GPtrArray *
as_component_get_provided_items (AsComponent *self
);
Get an array of the provides-items this component is associated with.
void as_component_add_provided_item (AsComponent *self
,AsProvidesKind kind
,const gchar *value
,const gchar *data
);
Adds a provided item to the component.
self |
a AsComponent instance. |
|
kind |
the kind of the provided item (e.g. |
|
data |
additional data associated with this item, or |
Since 0.6.2
GHashTable *
as_component_get_urls (AsComponent *self
);
Gets the URLs set for the component.
Since 0.6.2
const gchar * as_component_get_url (AsComponent *self
,AsUrlKind url_kind
);
Gets a URL.
Since 0.6.2
void as_component_add_url (AsComponent *self
,AsUrlKind url_kind
,const gchar *url
);
Adds some URL data to the component.
self |
a AsComponent instance. |
|
url_kind |
the URL kind, e.g. |
|
url |
the full URL. |
Since 0.6.2
GPtrArray *
as_component_get_releases (AsComponent *self
);
Get an array of the AsRelease items this component provides.
void as_component_add_release (AsComponent *self
,AsRelease *release
);
Add an AsRelease to this component.
“description”
property“description” gchar *
description.
Flags: Read / Write
Default value: NULL
“kind”
property“kind” AsComponentKind
kind.
Flags: Read / Write
Default value: AS_COMPONENT_KIND_UNKNOWN
“name-original”
property“name-original” gchar *
name-original.
Flags: Read / Write
Default value: NULL
“project-license”
property“project-license” gchar *
project-license.
Flags: Read / Write
Default value: NULL