Top | ![]() |
![]() |
![]() |
![]() |
AsDataPool * | as_data_pool_new () |
gchar ** | as_data_pool_get_watched_locations () |
gboolean | as_data_pool_update () |
GList * | as_data_pool_get_components () |
AsComponent * | as_data_pool_get_component_by_id () |
const gchar * | as_data_pool_get_locale () |
void | as_data_pool_set_locale () |
void | as_data_pool_set_data_source_directories () |
This class contains a temporary pool of metadata which has been collected from different sources on the system. It can directly be used, but usually it is accessed through a AsDatabase instance. This class is used by internally by the cache builder, but might be useful for others.
See also: AsDatabase
gchar **
as_data_pool_get_watched_locations (AsDataPool *dpool
);
Return a list of all locations which are searched for metadata.
gboolean
as_data_pool_update (AsDataPool *dpool
);
Builds an index of all found components in the watched locations.
The function will try to get as much data into the pool as possible, so even if
the updates completes with FALSE
, it might still add components to the pool.
GList *
as_data_pool_get_components (AsDataPool *dpool
);
Get a list of found components.
a list of AsComponent instances, free with g_list_free()
.
[element-type AsComponent][transfer container]
AsComponent * as_data_pool_get_component_by_id (AsDataPool *dpool
,const gchar *id
);
Get a specific component by its ID.
const gchar *
as_data_pool_get_locale (AsDataPool *dpool
);
Gets the currently used locale.
void as_data_pool_set_locale (AsDataPool *dpool
,const gchar *locale
);
Sets the current locale which should be used when parsing metadata.
void as_data_pool_set_data_source_directories (AsDataPool *dpool
,gchar **dirs
);
Set locations for the data pool to read it's data from. This is mainly used for testing purposes. Each location should have an "xmls" and/or "yaml" subdirectory with the actual data as (compressed) AppStream XML or DEP-11 YAML in it.