Pool
Object Hierarchy:
Description:
Namespace: AppStream
Package: appstream
Content:
Creation methods:
- public Pool ()
Creates a new Pool.
Methods:
- public bool add_components (GenericArray<Component> cpts) throws Error
Register a set of components with the pool temporarily.
- public void add_extra_data_location (string directory, FormatStyle format_style)
Add an additional non-standard location to the metadata pool where metadata will be read from.
- public void add_flags (PoolFlags flags)
Convenience function to add one or multiple PoolFlags to the flag set of this data pool.
- public string[] build_search_tokens (string search)
Splits up a string into an array of tokens that are suitable for searching.
- public void clear ()
Remove all metadata from the pool, data will be reloaded once as_pool_load is called again.
- public GenericArray<Component> get_components ()
Get a list of found components.
- public GenericArray<Component> get_components_by_bundle_id (BundleKind kind, string bundle_id, bool match_prefix)
Find components that are provided by a bundle with a specific ID by its prefix.
- public GenericArray<Component> get_components_by_categories (string[] categories)
Return a list of components which are in one of the categories.
- public GenericArray<Component> get_components_by_extends (string extended_id)
Find components extending the component with the given ID.
- public GenericArray<Component> get_components_by_id (string cid)
Get a specific component by its ID.
- public GenericArray<Component> get_components_by_kind (ComponentKind kind)
Return a list of all components in the pool which are of a certain kind.
- public GenericArray<Component> get_components_by_launchable (LaunchableKind kind, string id)
Find components in the AppStream data pool which provide a specific launchable.
- public GenericArray<Component> get_components_by_provided_item (ProvidedKind kind, string item)
Find components in the AppStream data pool which provide a certain item.
- public PoolFlags get_flags ()
Get the PoolFlags for this data pool.
- public unowned string get_locale ()
Gets the currently used locale.
- public bool is_empty ()
Check if this pool contains any data.
- public bool load (Cancellable? cancellable = null) throws Error
Builds an index of all found components in the watched locations.
- public async bool load_async (Cancellable? cancellable) throws Error
Asynchronously loads data from all registered locations.
- public void remove_flags (PoolFlags flags)
Convenience function to remove one or multiple PoolFlags from the flag set of this data pool.
- public void reset_extra_data_locations ()
Remove all explicitly added metadata locations.
- public GenericArray<unowned Component> search (string search)
Search for a list of components matching the search term.
- public void set_flags (PoolFlags flags)
Set the PoolFlags for this data pool.
- public void set_load_std_data_locations (bool enabled)
This is a convenience function that enables or disables loading of metadata from well-known standard locations by configuring the PoolFlags of this Pool accordingly.
- public void set_locale (string locale)
Sets the current locale which should be used when parsing metadata.
Signals:
- public virtual signal void changed ()
The changed signal is emitted when components have been added or removed from the metadata pool.
Inherited Members:
All known members inherited from class GLib.Object