Skip to content

Commit a616a33

Browse files
committed
Private headers: Decorate symbols for export needed for tests
We decorate just enough of the private symbols so that the test programs will link for clang-cl builds.
1 parent 697b8c9 commit a616a33

File tree

3 files changed

+44
-0
lines changed

3 files changed

+44
-0
lines changed

src/as-cache.h

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,12 @@
2727

2828
#include <glib-object.h>
2929
#include "as-component-box.h"
30+
#include "as-macros-private.h"
3031

3132
G_BEGIN_DECLS
3233

3334
#define AS_TYPE_CACHE (as_cache_get_type ())
35+
AS_INTERNAL_API
3436
G_DECLARE_DERIVABLE_TYPE (AsCache, as_cache, AS, CACHE, GObject)
3537

3638
struct _AsCacheClass {
@@ -89,26 +91,37 @@ typedef enum {
8991
} AsCacheError;
9092

9193
#define AS_CACHE_ERROR as_cache_error_quark ()
94+
AS_INTERNAL_API
9295
GQuark as_cache_error_quark (void);
9396

97+
AS_INTERNAL_API
9498
AsCache *as_cache_new (void);
9599

100+
AS_INTERNAL_API
96101
const gchar *as_cache_get_locale (AsCache *cache);
102+
AS_INTERNAL_API
97103
void as_cache_set_locale (AsCache *cache, const gchar *locale);
98104

105+
AS_INTERNAL_API
99106
void as_cache_set_locations (AsCache *cache,
100107
const gchar *system_cache_dir,
101108
const gchar *user_cache_dir);
102109

110+
AS_INTERNAL_API
103111
gboolean as_cache_get_prefer_os_metainfo (AsCache *cache);
112+
AS_INTERNAL_API
104113
void as_cache_set_prefer_os_metainfo (AsCache *cache, gboolean prefer_os_metainfo);
105114

115+
AS_INTERNAL_API
106116
void as_cache_set_resolve_addons (AsCache *cache, gboolean resolve_addons);
107117

118+
AS_INTERNAL_API
108119
void as_cache_prune_data (AsCache *cache);
109120

121+
AS_INTERNAL_API
110122
void as_cache_clear (AsCache *cache);
111123

124+
AS_INTERNAL_API
112125
gboolean as_cache_set_contents_for_section (AsCache *cache,
113126
AsComponentScope scope,
114127
AsFormatStyle source_format_style,
@@ -117,69 +130,87 @@ gboolean as_cache_set_contents_for_section (AsCache *cache,
117130
const gchar *cache_key,
118131
gpointer refinefn_user_data,
119132
GError **error);
133+
AS_INTERNAL_API
120134
gboolean as_cache_set_contents_for_path (AsCache *cache,
121135
GPtrArray *cpts,
122136
const gchar *filename,
123137
gpointer refinefn_user_data,
124138
GError **error);
125139

140+
AS_INTERNAL_API
126141
time_t as_cache_get_ctime (AsCache *cache,
127142
AsComponentScope scope,
128143
const gchar *cache_key,
129144
AsCacheScope *cache_scope);
130145

146+
AS_INTERNAL_API
131147
void as_cache_load_section_for_key (AsCache *cache,
132148
AsComponentScope scope,
133149
AsFormatStyle source_format_style,
134150
gboolean is_os_data,
135151
const gchar *cache_key,
136152
gboolean *is_outdated,
137153
gpointer refinefn_user_data);
154+
AS_INTERNAL_API
138155
void as_cache_load_section_for_path (AsCache *cache,
139156
const gchar *filename,
140157
gboolean *is_outdated,
141158
gpointer refinefn_user_data);
142159

160+
AS_INTERNAL_API
143161
void as_cache_mask_by_data_id (AsCache *cache, const gchar *cdid);
162+
AS_INTERNAL_API
144163
gboolean as_cache_add_masking_components (AsCache *cache, GPtrArray *cpts, GError **error);
145164

165+
AS_INTERNAL_API
146166
void as_cache_set_refine_func (AsCache *cache, AsCacheDataRefineFn func);
147167

168+
AS_INTERNAL_API
148169
gboolean as_cache_is_empty (AsCache *cache);
170+
AS_INTERNAL_API
149171
guint as_cache_get_component_count (AsCache *cache);
150172

173+
AS_INTERNAL_API
151174
AsComponentBox *as_cache_get_components_all (AsCache *cache, GError **error);
152175

176+
AS_INTERNAL_API
153177
AsComponentBox *as_cache_get_components_by_id (AsCache *cache, const gchar *id, GError **error);
154178

179+
AS_INTERNAL_API
155180
AsComponentBox *as_cache_get_components_by_extends (AsCache *cache,
156181
const gchar *extends_id,
157182
GError **error);
158183

184+
AS_INTERNAL_API
159185
AsComponentBox *as_cache_get_components_by_kind (AsCache *cache,
160186
AsComponentKind kind,
161187
GError **error);
162188

189+
AS_INTERNAL_API
163190
AsComponentBox *as_cache_get_components_by_provided_item (AsCache *cache,
164191
AsProvidedKind kind,
165192
const gchar *item,
166193
GError **error);
167194

195+
AS_INTERNAL_API
168196
AsComponentBox *as_cache_get_components_by_categories (AsCache *cache,
169197
gchar **categories,
170198
GError **error);
171199

200+
AS_INTERNAL_API
172201
AsComponentBox *as_cache_get_components_by_launchable (AsCache *cache,
173202
AsLaunchableKind kind,
174203
const gchar *id,
175204
GError **error);
176205

206+
AS_INTERNAL_API
177207
AsComponentBox *as_cache_get_components_by_bundle_id (AsCache *cache,
178208
AsBundleKind kind,
179209
const gchar *id,
180210
gboolean match_prefix,
181211
GError **error);
182212

213+
AS_INTERNAL_API
183214
AsComponentBox *as_cache_search (AsCache *cache,
184215
const gchar *const *terms,
185216
gboolean sort,

src/as-file-monitor.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,12 @@
2828
#include <glib-object.h>
2929
#include <gio/gio.h>
3030

31+
#include "as-macros-private.h"
32+
3133
G_BEGIN_DECLS
3234

3335
#define AS_TYPE_FILE_MONITOR (as_file_monitor_get_type ())
36+
AS_INTERNAL_API
3437
G_DECLARE_DERIVABLE_TYPE (AsFileMonitor, as_file_monitor, AS, FILE_MONITOR, GObject)
3538

3639
struct _AsFileMonitorClass {
@@ -62,13 +65,17 @@ typedef enum {
6265

6366
#define AS_FILE_MONITOR_ERROR as_file_monitor_error_quark ()
6467

68+
AS_INTERNAL_API
6569
AsFileMonitor *as_file_monitor_new (void);
70+
AS_INTERNAL_API
6671
GQuark as_file_monitor_error_quark (void);
6772

73+
AS_INTERNAL_API
6874
gboolean as_file_monitor_add_directory (AsFileMonitor *monitor,
6975
const gchar *filename,
7076
GCancellable *cancellable,
7177
GError **error);
78+
AS_INTERNAL_API
7279
gboolean as_file_monitor_add_file (AsFileMonitor *monitor,
7380
const gchar *filename,
7481
GCancellable *cancellable,

src/as-stemmer.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,20 @@
2727

2828
#include <glib-object.h>
2929

30+
#include "as-macros-private.h"
31+
3032
G_BEGIN_DECLS
3133

3234
#define AS_TYPE_STEMMER (as_stemmer_get_type ())
35+
AS_INTERNAL_API
3336
G_DECLARE_FINAL_TYPE (AsStemmer, as_stemmer, AS, STEMMER, GObject)
3437

38+
AS_INTERNAL_API
3539
AsStemmer *as_stemmer_get (const gchar *locale);
3640

41+
AS_INTERNAL_API
3742
void as_stemmer_reload (AsStemmer *stemmer, const gchar *locale);
43+
AS_INTERNAL_API
3844
gchar *as_stemmer_stem (AsStemmer *stemmer, const gchar *term);
3945

4046
G_END_DECLS

0 commit comments

Comments
 (0)