Skip to content

Commit

Permalink
Private headers: Decorate symbols for export needed for tests
Browse files Browse the repository at this point in the history
We decorate just enough of the private symbols so that the test programs will
link for clang-cl builds.
  • Loading branch information
fanc999-1 committed Oct 24, 2023
1 parent 3905501 commit d4a3148
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 0 deletions.
31 changes: 31 additions & 0 deletions src/as-cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,12 @@

#include <glib-object.h>
#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 {
Expand Down Expand Up @@ -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,
Expand All @@ -117,69 +130,87 @@ 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,
gboolean is_os_data,
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,
Expand Down
7 changes: 7 additions & 0 deletions src/as-file-monitor.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,12 @@
#include <glib-object.h>
#include <gio/gio.h>

#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 {
Expand Down Expand Up @@ -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,
Expand Down
6 changes: 6 additions & 0 deletions src/as-stemmer.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,20 @@

#include <glib-object.h>

#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
Expand Down

0 comments on commit d4a3148

Please sign in to comment.