diff options
author | Florian Müllner <fmuellner@gnome.org> | 2017-07-07 16:36:03 +0200 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2018-08-06 14:59:46 +0100 |
commit | 1b9364c980f8bae169b646a2d1a78ec9c3fc0754 (patch) | |
tree | 2f0d41ed657e44b74529aa89aef781e450d274d1 /libappstream-glib/as-store.h | |
parent | d4fffd203144efa83c2f66a844fbbda59d22b4ad (diff) | |
download | appstream-glib-1b9364c980f8bae169b646a2d1a78ec9c3fc0754.tar.gz |
store: Provide async variants of load functions
The existing functions may block, which isn't ideal in IO-sensitive
contexts. To address this, add async variants that run the functions
in a thread.
Diffstat (limited to 'libappstream-glib/as-store.h')
-rw-r--r-- | libappstream-glib/as-store.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/libappstream-glib/as-store.h b/libappstream-glib/as-store.h index 553b38d..3d8c749 100644 --- a/libappstream-glib/as-store.h +++ b/libappstream-glib/as-store.h @@ -176,14 +176,33 @@ gboolean as_store_from_xml (AsStore *store, const gchar *data, const gchar *icon_root, GError **error); + gboolean as_store_load (AsStore *store, guint32 flags, GCancellable *cancellable, GError **error); +void as_store_load_async (AsStore *store, + AsStoreLoadFlags flags, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +gboolean as_store_load_finish (AsStore *store, + GAsyncResult *result, + GError **error); + gboolean as_store_load_path (AsStore *store, const gchar *path, GCancellable *cancellable, GError **error); +void as_store_load_path_async (AsStore *store, + const gchar *path, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +gboolean as_store_load_path_finish (AsStore *store, + GAsyncResult *result, + GError **error); + void as_store_load_search_cache (AsStore *store); void as_store_set_search_match (AsStore *store, guint16 search_match); |