AsDataPool

AsDataPool — Collect and temporarily store metadata from different sources

Functions

Object Hierarchy

    GObject
    ╰── AsDataPool

Description

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

Functions

as_data_pool_new ()

AsDataPool *
as_data_pool_new (void);

Creates a new AsDataPool.

Returns

a AsDataPool.

[transfer full]


as_data_pool_initialize ()

void
as_data_pool_initialize (AsDataPool *dpool);

Initialize the pool with the predefined metadata locations.


as_data_pool_get_watched_locations ()

gchar **
as_data_pool_get_watched_locations (AsDataPool *dpool);

Return a list of all locations which are searched for metadata.

Parameters

dpool

a valid AsDataPool instance

 

Returns

A string-list of watched (absolute) filepaths.

[transfer full]


as_data_pool_update ()

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.

Returns

TRUE if update completed without error.


as_data_pool_get_components ()

GList *
as_data_pool_get_components (AsDataPool *dpool);

Get a list of found components.

Returns

a list of AsComponent instances, free with g_list_free().

[element-type AsComponent][transfer container]


as_data_pool_set_data_source_directories ()

void
as_data_pool_set_data_source_directories
                               (AsDataPool *dpool,
                                gchar **dirs);

Types and Values