diff --git a/src/as-cache.h b/src/as-cache.h index 963e5f262..ee9f7d724 100644 --- a/src/as-cache.h +++ b/src/as-cache.h @@ -27,10 +27,12 @@ #include #include "as-component-box.h" +#include "as-macros-private.h" G_BEGIN_DECLS #define AS_TYPE_CACHE (as_cache_get_type ()) +AS_INTERNAL_API G_DECLARE_DERIVABLE_TYPE (AsCache, as_cache, AS, CACHE, GObject) struct _AsCacheClass { @@ -89,26 +91,37 @@ typedef enum { } AsCacheError; #define AS_CACHE_ERROR as_cache_error_quark () +AS_INTERNAL_API GQuark as_cache_error_quark (void); +AS_INTERNAL_API AsCache *as_cache_new (void); +AS_INTERNAL_API const gchar *as_cache_get_locale (AsCache *cache); +AS_INTERNAL_API void as_cache_set_locale (AsCache *cache, const gchar *locale); +AS_INTERNAL_API void as_cache_set_locations (AsCache *cache, const gchar *system_cache_dir, const gchar *user_cache_dir); +AS_INTERNAL_API gboolean as_cache_get_prefer_os_metainfo (AsCache *cache); +AS_INTERNAL_API void as_cache_set_prefer_os_metainfo (AsCache *cache, gboolean prefer_os_metainfo); +AS_INTERNAL_API void as_cache_set_resolve_addons (AsCache *cache, gboolean resolve_addons); +AS_INTERNAL_API void as_cache_prune_data (AsCache *cache); +AS_INTERNAL_API void as_cache_clear (AsCache *cache); +AS_INTERNAL_API gboolean as_cache_set_contents_for_section (AsCache *cache, AsComponentScope scope, AsFormatStyle source_format_style, @@ -117,17 +130,20 @@ gboolean as_cache_set_contents_for_section (AsCache *cache, const gchar *cache_key, gpointer refinefn_user_data, GError **error); +AS_INTERNAL_API gboolean as_cache_set_contents_for_path (AsCache *cache, GPtrArray *cpts, const gchar *filename, gpointer refinefn_user_data, GError **error); +AS_INTERNAL_API time_t as_cache_get_ctime (AsCache *cache, AsComponentScope scope, const gchar *cache_key, AsCacheScope *cache_scope); +AS_INTERNAL_API void as_cache_load_section_for_key (AsCache *cache, AsComponentScope scope, AsFormatStyle source_format_style, @@ -135,51 +151,66 @@ void as_cache_load_section_for_key (AsCache *cache, const gchar *cache_key, gboolean *is_outdated, gpointer refinefn_user_data); +AS_INTERNAL_API void as_cache_load_section_for_path (AsCache *cache, const gchar *filename, gboolean *is_outdated, gpointer refinefn_user_data); +AS_INTERNAL_API void as_cache_mask_by_data_id (AsCache *cache, const gchar *cdid); +AS_INTERNAL_API gboolean as_cache_add_masking_components (AsCache *cache, GPtrArray *cpts, GError **error); +AS_INTERNAL_API void as_cache_set_refine_func (AsCache *cache, AsCacheDataRefineFn func); +AS_INTERNAL_API gboolean as_cache_is_empty (AsCache *cache); +AS_INTERNAL_API guint as_cache_get_component_count (AsCache *cache); +AS_INTERNAL_API AsComponentBox *as_cache_get_components_all (AsCache *cache, GError **error); +AS_INTERNAL_API AsComponentBox *as_cache_get_components_by_id (AsCache *cache, const gchar *id, GError **error); +AS_INTERNAL_API AsComponentBox *as_cache_get_components_by_extends (AsCache *cache, const gchar *extends_id, GError **error); +AS_INTERNAL_API AsComponentBox *as_cache_get_components_by_kind (AsCache *cache, AsComponentKind kind, GError **error); +AS_INTERNAL_API AsComponentBox *as_cache_get_components_by_provided_item (AsCache *cache, AsProvidedKind kind, const gchar *item, GError **error); +AS_INTERNAL_API AsComponentBox *as_cache_get_components_by_categories (AsCache *cache, gchar **categories, GError **error); +AS_INTERNAL_API AsComponentBox *as_cache_get_components_by_launchable (AsCache *cache, AsLaunchableKind kind, const gchar *id, GError **error); +AS_INTERNAL_API AsComponentBox *as_cache_get_components_by_bundle_id (AsCache *cache, AsBundleKind kind, const gchar *id, gboolean match_prefix, GError **error); +AS_INTERNAL_API AsComponentBox *as_cache_search (AsCache *cache, const gchar *const *terms, gboolean sort, diff --git a/src/as-file-monitor.h b/src/as-file-monitor.h index 4a3e74e06..b81531eb9 100644 --- a/src/as-file-monitor.h +++ b/src/as-file-monitor.h @@ -28,9 +28,12 @@ #include #include +#include "as-macros-private.h" + G_BEGIN_DECLS #define AS_TYPE_FILE_MONITOR (as_file_monitor_get_type ()) +AS_INTERNAL_API G_DECLARE_DERIVABLE_TYPE (AsFileMonitor, as_file_monitor, AS, FILE_MONITOR, GObject) struct _AsFileMonitorClass { @@ -62,13 +65,17 @@ typedef enum { #define AS_FILE_MONITOR_ERROR as_file_monitor_error_quark () +AS_INTERNAL_API AsFileMonitor *as_file_monitor_new (void); +AS_INTERNAL_API GQuark as_file_monitor_error_quark (void); +AS_INTERNAL_API gboolean as_file_monitor_add_directory (AsFileMonitor *monitor, const gchar *filename, GCancellable *cancellable, GError **error); +AS_INTERNAL_API gboolean as_file_monitor_add_file (AsFileMonitor *monitor, const gchar *filename, GCancellable *cancellable, diff --git a/src/as-stemmer.h b/src/as-stemmer.h index 11c1bef34..b2484f4c4 100644 --- a/src/as-stemmer.h +++ b/src/as-stemmer.h @@ -27,14 +27,20 @@ #include +#include "as-macros-private.h" + G_BEGIN_DECLS #define AS_TYPE_STEMMER (as_stemmer_get_type ()) +AS_INTERNAL_API G_DECLARE_FINAL_TYPE (AsStemmer, as_stemmer, AS, STEMMER, GObject) +AS_INTERNAL_API AsStemmer *as_stemmer_get (const gchar *locale); +AS_INTERNAL_API void as_stemmer_reload (AsStemmer *stemmer, const gchar *locale); +AS_INTERNAL_API gchar *as_stemmer_stem (AsStemmer *stemmer, const gchar *term); G_END_DECLS