| Top |
| AsDatabase * | as_database_new () |
| GQuark | as_database_error_quark () |
| gboolean | as_database_open () |
| const gchar * | as_database_get_location () |
| void | as_database_set_location () |
| GPtrArray * | as_database_find_components () |
| GPtrArray * | as_database_get_all_components () |
| AsComponent * | as_database_get_component_by_id () |
| GPtrArray * | as_database_get_components_by_provided_item () |
| GPtrArray * | as_database_get_components_by_kind () |
| #define | AS_TYPE_DATABASE |
| struct | AsDatabaseClass |
| enum | AsDatabaseError |
| #define | AS_DATABASE_ERROR |
| AsDatabase |
This object provides access to the Appstream Xapian database of available software components. You can search for components using various criteria, as well as getting some information about the data provided by this AppStream database.
By default, the global software component cache is used as datasource, unless a different database
is explicitly defined via as_database_set_location().
A new cache can be created using the appstreamcli(1) utility.
See also: AsComponent, AsDataPool
AsDatabase *
as_database_new (void);
as_database_new is deprecated and should not be used in newly-written code.
Creates a new AsDatabase.
gboolean as_database_open (AsDatabase *db,GError **error);
as_database_open is deprecated and should not be used in newly-written code.
Open the current AppStream metadata cache for reading.
const gchar *
as_database_get_location (AsDatabase *db);
as_database_get_location is deprecated and should not be used in newly-written code.
Get the current path of the AppStream database we use.
void as_database_set_location (AsDatabase *db,const gchar *dir);
as_database_set_location is deprecated and should not be used in newly-written code.
Set the location of the AppStream database we use.
GPtrArray * as_database_find_components (AsDatabase *db,const gchar *term,const gchar *cats_str,GError **error);
as_database_find_components is deprecated and should not be used in newly-written code.
Find components in the AppStream database, which match a given term. You can limit the search to a specific set of categories by setting the categories string to a semicolon-separated list of lower-cased category names.
db |
An instance of AsDatabase. |
|
term |
a search-term to look for. |
[nullable] |
cats_str |
A semicolon-delimited list of lower-cased category names, e.g. "science;development". |
[nullable] |
error |
A GError or |
an array of AsComponent objects which have been found.
[element-type AsComponent][transfer full]
GPtrArray * as_database_get_all_components (AsDatabase *db,GError **error);
as_database_get_all_components is deprecated and should not be used in newly-written code.
Dump a list of all software components found in the database.
AsComponent * as_database_get_component_by_id (AsDatabase *db,const gchar *cid,GError **error);
as_database_get_component_by_id is deprecated and should not be used in newly-written code.
Get a component by its AppStream-ID.
db |
An instance of AsDatabase. |
|
cid |
the ID of the component, e.g. "org.kde.gwenview.desktop" |
|
error |
A GError or |
GPtrArray * as_database_get_components_by_provided_item (AsDatabase *db,AsProvidedKind kind,const gchar *item,GError **error);
as_database_get_components_by_provided_item is deprecated and should not be used in newly-written code.
Find components in the Appstream database.
db |
An instance of AsDatabase. |
|
kind |
an AsProvidesKind |
|
item |
the name of the provided item. |
|
error |
A GError or |
an array of AsComponent objects which have been found, NULL on error.
[element-type AsComponent][transfer full]
GPtrArray * as_database_get_components_by_kind (AsDatabase *db,AsComponentKind kind,GError **error);
as_database_get_components_by_kind is deprecated and should not be used in newly-written code.
Return a list of all components in the database which match a certain kind.
an array of AsComponent objects which have been found, NULL on error.
[element-type AsComponent][transfer full]