summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2019-10-17 09:55:09 +0100
committerRichard Hughes <richard@hughsie.com>2019-10-17 09:55:09 +0100
commited2b6ce3ea4a56272c0ba1858c9da92104160922 (patch)
treeb107369aed1d8dab49fc6c0eb2ab04168ba27699
parent2509805feeddeb415ea4954cebdbb0288e8273fe (diff)
downloadappstream-glib-wip/hughsie/symbol-sanity.tar.gz
Do not export private internal-only symbolswip/hughsie/symbol-sanity
Fixes https://github.com/hughsie/appstream-glib/issues/329
-rw-r--r--client/as-util.c8
-rw-r--r--libappstream-glib/as-agreement-private.h2
-rw-r--r--libappstream-glib/as-agreement-section-private.h2
-rw-r--r--libappstream-glib/as-app-private.h16
-rw-r--r--libappstream-glib/as-bundle-private.h3
-rw-r--r--libappstream-glib/as-checksum-private.h3
-rw-r--r--libappstream-glib/as-content-rating-private.h2
-rw-r--r--libappstream-glib/as-icon-private.h6
-rw-r--r--libappstream-glib/as-image-private.h4
-rw-r--r--libappstream-glib/as-launchable-private.h3
-rw-r--r--libappstream-glib/as-node-private.h19
-rw-r--r--libappstream-glib/as-provide-private.h3
-rw-r--r--libappstream-glib/as-release-private.h3
-rw-r--r--libappstream-glib/as-require-private.h3
-rw-r--r--libappstream-glib/as-review-private.h3
-rw-r--r--libappstream-glib/as-screenshot-private.h3
-rw-r--r--libappstream-glib/as-self-test.c6
-rw-r--r--libappstream-glib/as-suggest-private.h3
-rw-r--r--libappstream-glib/as-translation-private.h3
-rw-r--r--libappstream-glib/as-utils-private.h6
-rw-r--r--libappstream-glib/meson.build7
21 files changed, 99 insertions, 9 deletions
diff --git a/client/as-util.c b/client/as-util.c
index 4f7a4cf..45e49e5 100644
--- a/client/as-util.c
+++ b/client/as-util.c
@@ -3965,7 +3965,7 @@ as_util_incorporate (AsUtilPrivate *priv, gchar **values, GError **error)
for (i = 0; i < apps->len; i++) {
app = g_ptr_array_index (apps, i);
id = as_app_get_id (app);
- if (as_app_get_description_size (app) > 0) {
+ if (g_hash_table_size (as_app_get_descriptions (app)) > 0) {
as_util_pad_strings (id, "Already has AppData", align);
continue;
}
@@ -3974,7 +3974,7 @@ as_util_incorporate (AsUtilPrivate *priv, gchar **values, GError **error)
as_util_pad_strings (id, "Not found", align);
continue;
}
- if (as_app_get_description_size (app_source) == 0) {
+ if (g_hash_table_size (as_app_get_descriptions (app_source)) == 0) {
as_util_pad_strings (id, "No source AppData", align);
continue;
}
@@ -3994,7 +3994,7 @@ as_util_incorporate (AsUtilPrivate *priv, gchar **values, GError **error)
app = g_ptr_array_index (apps, i);
id = as_app_get_id (app);
- if (as_app_get_description_size (app) > 0) {
+ if (g_hash_table_size (as_app_get_descriptions (app)) > 0) {
as_util_pad_strings (id, "Already has AppData", align);
continue;
}
@@ -4011,7 +4011,7 @@ as_util_incorporate (AsUtilPrivate *priv, gchar **values, GError **error)
as_util_pad_strings (id, "Not found", align);
continue;
}
- if (as_app_get_description_size (app_source) == 0) {
+ if (g_hash_table_size (as_app_get_descriptions (app_source)) == 0) {
as_util_pad_strings (id, "No source AppData", align);
continue;
}
diff --git a/libappstream-glib/as-agreement-private.h b/libappstream-glib/as-agreement-private.h
index ebefb66..2d5f009 100644
--- a/libappstream-glib/as-agreement-private.h
+++ b/libappstream-glib/as-agreement-private.h
@@ -18,9 +18,11 @@
G_BEGIN_DECLS
+G_GNUC_INTERNAL
GNode *as_agreement_node_insert (AsAgreement *agreement,
GNode *parent,
AsNodeContext *ctx);
+G_GNUC_INTERNAL
gboolean as_agreement_node_parse (AsAgreement *agreement,
GNode *node,
AsNodeContext *ctx,
diff --git a/libappstream-glib/as-agreement-section-private.h b/libappstream-glib/as-agreement-section-private.h
index 907531e..194b6cb 100644
--- a/libappstream-glib/as-agreement-section-private.h
+++ b/libappstream-glib/as-agreement-section-private.h
@@ -18,9 +18,11 @@
G_BEGIN_DECLS
+G_GNUC_INTERNAL
GNode *as_agreement_section_node_insert (AsAgreementSection *agreement_section,
GNode *parent,
AsNodeContext *ctx);
+G_GNUC_INTERNAL
gboolean as_agreement_section_node_parse (AsAgreementSection *agreement_section,
GNode *node,
AsNodeContext *ctx,
diff --git a/libappstream-glib/as-app-private.h b/libappstream-glib/as-app-private.h
index 5089ba8..9d6744c 100644
--- a/libappstream-glib/as-app-private.h
+++ b/libappstream-glib/as-app-private.h
@@ -80,42 +80,58 @@ typedef enum {
/* unique */
#define AS_APP_UNIQUE_WILDCARD "*"
+G_GNUC_INTERNAL
AsAppProblems as_app_get_problems (AsApp *app);
+G_GNUC_INTERNAL
guint as_app_get_name_size (AsApp *app);
+G_GNUC_INTERNAL
guint as_app_get_comment_size (AsApp *app);
+G_GNUC_INTERNAL
guint as_app_get_description_size (AsApp *app);
+G_GNUC_INTERNAL
GPtrArray *as_app_get_search_tokens (AsApp *app);
+G_GNUC_INTERNAL
AsBundleKind as_app_get_bundle_kind (AsApp *app);
+G_GNUC_INTERNAL
GNode *as_app_node_insert (AsApp *app,
GNode *parent,
AsNodeContext *ctx);
+G_GNUC_INTERNAL
gboolean as_app_node_parse (AsApp *app,
GNode *node,
AsNodeContext *ctx,
GError **error);
+G_GNUC_INTERNAL
gboolean as_app_node_parse_dep11 (AsApp *app,
GNode *node,
AsNodeContext *ctx,
GError **error);
+G_GNUC_INTERNAL
gboolean as_app_parse_desktop_file (AsApp *app,
const gchar *filename,
AsAppParseFlags flags,
GError **error);
+G_GNUC_INTERNAL
gboolean as_app_parse_desktop_data (AsApp *app,
GBytes *data,
AsAppParseFlags flags,
GError **error);
+G_GNUC_INTERNAL
gboolean as_app_parse_inf_file (AsApp *app,
const gchar *filename,
AsAppParseFlags flags,
GError **error);
+G_GNUC_INTERNAL
void as_app_set_stemmer (AsApp *app,
AsStemmer *stemmer);
+G_GNUC_INTERNAL
void as_app_set_search_blacklist (AsApp *app,
GHashTable *search_blacklist);
+G_GNUC_INTERNAL
void as_app_set_icon_path_rstr (AsApp *app,
AsRefString *rstr);
+G_GNUC_INTERNAL
void as_app_set_origin_rstr (AsApp *app,
AsRefString *rstr);
diff --git a/libappstream-glib/as-bundle-private.h b/libappstream-glib/as-bundle-private.h
index 075cd92..ba6aa9c 100644
--- a/libappstream-glib/as-bundle-private.h
+++ b/libappstream-glib/as-bundle-private.h
@@ -16,13 +16,16 @@
G_BEGIN_DECLS
+G_GNUC_INTERNAL
GNode *as_bundle_node_insert (AsBundle *bundle,
GNode *parent,
AsNodeContext *ctx);
+G_GNUC_INTERNAL
gboolean as_bundle_node_parse (AsBundle *bundle,
GNode *node,
AsNodeContext *ctx,
GError **error);
+G_GNUC_INTERNAL
gboolean as_bundle_node_parse_dep11 (AsBundle *bundle,
GNode *node,
AsNodeContext *ctx,
diff --git a/libappstream-glib/as-checksum-private.h b/libappstream-glib/as-checksum-private.h
index 8cad315..cfead96 100644
--- a/libappstream-glib/as-checksum-private.h
+++ b/libappstream-glib/as-checksum-private.h
@@ -16,13 +16,16 @@
G_BEGIN_DECLS
+G_GNUC_INTERNAL
GNode *as_checksum_node_insert (AsChecksum *checksum,
GNode *parent,
AsNodeContext *ctx);
+G_GNUC_INTERNAL
gboolean as_checksum_node_parse (AsChecksum *checksum,
GNode *node,
AsNodeContext *ctx,
GError **error);
+G_GNUC_INTERNAL
gboolean as_checksum_node_parse_dep11 (AsChecksum *checksum,
GNode *node,
AsNodeContext *ctx,
diff --git a/libappstream-glib/as-content-rating-private.h b/libappstream-glib/as-content-rating-private.h
index d14de43..e11f45d 100644
--- a/libappstream-glib/as-content-rating-private.h
+++ b/libappstream-glib/as-content-rating-private.h
@@ -18,9 +18,11 @@
G_BEGIN_DECLS
+G_GNUC_INTERNAL
GNode *as_content_rating_node_insert (AsContentRating *content_rating,
GNode *parent,
AsNodeContext *ctx);
+G_GNUC_INTERNAL
gboolean as_content_rating_node_parse (AsContentRating *content_rating,
GNode *node,
AsNodeContext *ctx,
diff --git a/libappstream-glib/as-icon-private.h b/libappstream-glib/as-icon-private.h
index c695b8a..72877f3 100644
--- a/libappstream-glib/as-icon-private.h
+++ b/libappstream-glib/as-icon-private.h
@@ -16,22 +16,28 @@
G_BEGIN_DECLS
+G_GNUC_INTERNAL
GBytes *as_icon_get_data (AsIcon *icon);
+G_GNUC_INTERNAL
void as_icon_set_data (AsIcon *icon,
GBytes *data);
+G_GNUC_INTERNAL
GNode *as_icon_node_insert (AsIcon *icon,
GNode *parent,
AsNodeContext *ctx);
+G_GNUC_INTERNAL
gboolean as_icon_node_parse (AsIcon *icon,
GNode *node,
AsNodeContext *ctx,
GError **error);
+G_GNUC_INTERNAL
gboolean as_icon_node_parse_dep11 (AsIcon *icon,
GNode *node,
AsNodeContext *ctx,
GError **error);
+G_GNUC_INTERNAL
void as_icon_set_prefix_rstr (AsIcon *icon,
AsRefString *rstr);
diff --git a/libappstream-glib/as-image-private.h b/libappstream-glib/as-image-private.h
index 691830f..e4c253a 100644
--- a/libappstream-glib/as-image-private.h
+++ b/libappstream-glib/as-image-private.h
@@ -16,17 +16,21 @@
G_BEGIN_DECLS
+G_GNUC_INTERNAL
GNode *as_image_node_insert (AsImage *image,
GNode *parent,
AsNodeContext *ctx);
+G_GNUC_INTERNAL
gboolean as_image_node_parse (AsImage *image,
GNode *node,
AsNodeContext *ctx,
GError **error);
+G_GNUC_INTERNAL
gboolean as_image_node_parse_dep11 (AsImage *image,
GNode *node,
AsNodeContext *ctx,
GError **error);
+G_GNUC_INTERNAL
void as_image_set_url_rstr (AsImage *image,
AsRefString *rstr);
diff --git a/libappstream-glib/as-launchable-private.h b/libappstream-glib/as-launchable-private.h
index 4ac0220..cf136f0 100644
--- a/libappstream-glib/as-launchable-private.h
+++ b/libappstream-glib/as-launchable-private.h
@@ -16,13 +16,16 @@
G_BEGIN_DECLS
+G_GNUC_INTERNAL
GNode *as_launchable_node_insert (AsLaunchable *launchable,
GNode *parent,
AsNodeContext *ctx);
+G_GNUC_INTERNAL
gboolean as_launchable_node_parse (AsLaunchable *launchable,
GNode *node,
AsNodeContext *ctx,
GError **error);
+G_GNUC_INTERNAL
gboolean as_launchable_node_parse_dep11 (AsLaunchable *launchable,
GNode *node,
AsNodeContext *ctx,
diff --git a/libappstream-glib/as-node-private.h b/libappstream-glib/as-node-private.h
index ed25c8d..6d54175 100644
--- a/libappstream-glib/as-node-private.h
+++ b/libappstream-glib/as-node-private.h
@@ -18,38 +18,57 @@
G_BEGIN_DECLS
typedef struct _AsNodeContext AsNodeContext;
+G_GNUC_INTERNAL
AsNodeContext *as_node_context_new (void);
+G_GNUC_INTERNAL
void as_node_context_free (AsNodeContext *ctx);
+G_GNUC_INTERNAL
gdouble as_node_context_get_version (AsNodeContext *ctx);
+G_GNUC_INTERNAL
void as_node_context_set_version (AsNodeContext *ctx,
gdouble version);
+G_GNUC_INTERNAL
AsFormatKind as_node_context_get_format_kind (AsNodeContext *ctx);
+G_GNUC_INTERNAL
void as_node_context_set_format_kind (AsNodeContext *ctx,
AsFormatKind format_kind);
/* Kept for ABI compatibility with as-glib < 0.9.6 */
+G_GNUC_INTERNAL
G_DEPRECATED_FOR(as_node_context_get_format_kind)
AsFormatKind as_node_context_get_source_kind (AsNodeContext *ctx);
/* Kept for ABI compatibility with as-glib < 0.9.6 */
+G_GNUC_INTERNAL
G_DEPRECATED_FOR(as_node_context_set_format_kind)
void as_node_context_set_source_kind (AsNodeContext *ctx,
AsFormatKind source_kind);
+G_GNUC_INTERNAL
gboolean as_node_context_get_output_trusted (AsNodeContext *ctx);
+G_GNUC_INTERNAL
void as_node_context_set_output_trusted (AsNodeContext *ctx,
gboolean output_trusted);
+G_GNUC_INTERNAL
AsFormatKind as_node_context_get_output (AsNodeContext *ctx);
+G_GNUC_INTERNAL
void as_node_context_set_output (AsNodeContext *ctx,
AsFormatKind output);
+G_GNUC_INTERNAL
const gchar *as_node_context_get_media_base_url (AsNodeContext *ctx);
+G_GNUC_INTERNAL
void as_node_context_set_media_base_url (AsNodeContext *ctx,
const gchar *url);
+G_GNUC_INTERNAL
AsRefString *as_node_reflow_text (const gchar *text,
gssize text_len);
+G_GNUC_INTERNAL
AsRefString *as_node_fix_locale (const gchar *locale);
+G_GNUC_INTERNAL
AsRefString *as_node_fix_locale_full (const GNode *node,
const gchar *locale);
+G_GNUC_INTERNAL
AsRefString *as_node_get_data_as_refstr (const AsNode *node);
+G_GNUC_INTERNAL
AsRefString *as_node_get_attribute_as_refstr (const AsNode *node,
const gchar *key);
diff --git a/libappstream-glib/as-provide-private.h b/libappstream-glib/as-provide-private.h
index ae90310..d7514fa 100644
--- a/libappstream-glib/as-provide-private.h
+++ b/libappstream-glib/as-provide-private.h
@@ -16,13 +16,16 @@
G_BEGIN_DECLS
+G_GNUC_INTERNAL
GNode *as_provide_node_insert (AsProvide *provide,
GNode *parent,
AsNodeContext *ctx);
+G_GNUC_INTERNAL
gboolean as_provide_node_parse (AsProvide *provide,
GNode *node,
AsNodeContext *ctx,
GError **error);
+G_GNUC_INTERNAL
gboolean as_provide_node_parse_dep11 (AsProvide *provide,
GNode *node,
AsNodeContext *ctx,
diff --git a/libappstream-glib/as-release-private.h b/libappstream-glib/as-release-private.h
index a290142..e2b6142 100644
--- a/libappstream-glib/as-release-private.h
+++ b/libappstream-glib/as-release-private.h
@@ -16,13 +16,16 @@
G_BEGIN_DECLS
+G_GNUC_INTERNAL
GNode *as_release_node_insert (AsRelease *release,
GNode *parent,
AsNodeContext *ctx);
+G_GNUC_INTERNAL
gboolean as_release_node_parse (AsRelease *release,
GNode *node,
AsNodeContext *ctx,
GError **error);
+G_GNUC_INTERNAL
gboolean as_release_node_parse_dep11 (AsRelease *release,
GNode *node,
AsNodeContext *ctx,
diff --git a/libappstream-glib/as-require-private.h b/libappstream-glib/as-require-private.h
index 2a5f119..86fe191 100644
--- a/libappstream-glib/as-require-private.h
+++ b/libappstream-glib/as-require-private.h
@@ -16,13 +16,16 @@
G_BEGIN_DECLS
+G_GNUC_INTERNAL
GNode *as_require_node_insert (AsRequire *require,
GNode *parent,
AsNodeContext *ctx);
+G_GNUC_INTERNAL
gboolean as_require_node_parse (AsRequire *require,
GNode *node,
AsNodeContext *ctx,
GError **error);
+G_GNUC_INTERNAL
gboolean as_require_node_parse_dep11 (AsRequire *require,
GNode *node,
AsNodeContext *ctx,
diff --git a/libappstream-glib/as-review-private.h b/libappstream-glib/as-review-private.h
index ea71121..14e96c1 100644
--- a/libappstream-glib/as-review-private.h
+++ b/libappstream-glib/as-review-private.h
@@ -16,13 +16,16 @@
G_BEGIN_DECLS
+G_GNUC_INTERNAL
GNode *as_review_node_insert (AsReview *review,
GNode *parent,
AsNodeContext *ctx);
+G_GNUC_INTERNAL
gboolean as_review_node_parse (AsReview *review,
GNode *node,
AsNodeContext *ctx,
GError **error);
+G_GNUC_INTERNAL
gboolean as_review_node_parse_dep11 (AsReview *review,
GNode *node,
AsNodeContext *ctx,
diff --git a/libappstream-glib/as-screenshot-private.h b/libappstream-glib/as-screenshot-private.h
index 8f84893..e7509a2 100644
--- a/libappstream-glib/as-screenshot-private.h
+++ b/libappstream-glib/as-screenshot-private.h
@@ -18,13 +18,16 @@
G_BEGIN_DECLS
+G_GNUC_INTERNAL
GNode *as_screenshot_node_insert (AsScreenshot *screenshot,
GNode *parent,
AsNodeContext *ctx);
+G_GNUC_INTERNAL
gboolean as_screenshot_node_parse (AsScreenshot *screenshot,
GNode *node,
AsNodeContext *ctx,
GError **error);
+G_GNUC_INTERNAL
gboolean as_screenshot_node_parse_dep11 (AsScreenshot *screenshot,
GNode *node,
AsNodeContext *ctx,
diff --git a/libappstream-glib/as-self-test.c b/libappstream-glib/as-self-test.c
index 7100f69..e547952 100644
--- a/libappstream-glib/as-self-test.c
+++ b/libappstream-glib/as-self-test.c
@@ -2153,7 +2153,7 @@ as_test_app_validate_appdata_good_func (void)
g_assert_cmpstr (as_app_get_url_item (app, AS_URL_KIND_HOMEPAGE), ==,
"http://www.gnome.org/projects/gnome-power-manager/");
g_assert_cmpstr (as_app_get_description (app, "C"), !=, NULL);
- g_assert_cmpint (as_app_get_description_size (app), ==, 1);
+ g_assert_cmpint (g_hash_table_size (as_app_get_descriptions (app)), ==, 1);
probs = as_app_validate (app, AS_APP_VALIDATE_FLAG_NO_NETWORK, &error);
g_assert_no_error (error);
g_assert (probs != NULL);
@@ -2272,7 +2272,7 @@ as_test_app_translated_func (void)
/* check success */
g_assert_cmpstr (as_app_get_description (app, "C"), ==, "<p>Awesome</p>");
g_assert_cmpstr (as_app_get_description (app, "pl"), ==, "<p>Asomeski</p>");
- g_assert_cmpint (as_app_get_description_size (app), ==, 2);
+ g_assert_cmpint (g_hash_table_size (as_app_get_descriptions (app)), ==, 2);
}
static void
@@ -2295,7 +2295,7 @@ as_test_app_validate_file_bad_func (void)
g_assert (ret);
g_assert_cmpstr (as_app_get_description (app, "C"), !=, NULL);
- g_assert_cmpint (as_app_get_description_size (app), ==, 1);
+ g_assert_cmpint (g_hash_table_size (as_app_get_descriptions (app)), ==, 1);
probs = as_app_validate (app, AS_APP_VALIDATE_FLAG_NONE, &error);
g_assert_no_error (error);
diff --git a/libappstream-glib/as-suggest-private.h b/libappstream-glib/as-suggest-private.h
index 4796176..d0f783e 100644
--- a/libappstream-glib/as-suggest-private.h
+++ b/libappstream-glib/as-suggest-private.h
@@ -16,13 +16,16 @@
G_BEGIN_DECLS
+G_GNUC_INTERNAL
GNode *as_suggest_node_insert (AsSuggest *suggest,
GNode *parent,
AsNodeContext *ctx);
+G_GNUC_INTERNAL
gboolean as_suggest_node_parse (AsSuggest *suggest,
GNode *node,
AsNodeContext *ctx,
GError **error);
+G_GNUC_INTERNAL
gboolean as_suggest_node_parse_dep11 (AsSuggest *suggest,
GNode *node,
AsNodeContext *ctx,
diff --git a/libappstream-glib/as-translation-private.h b/libappstream-glib/as-translation-private.h
index 51aa056..8407c2a 100644
--- a/libappstream-glib/as-translation-private.h
+++ b/libappstream-glib/as-translation-private.h
@@ -16,13 +16,16 @@
G_BEGIN_DECLS
+G_GNUC_INTERNAL
GNode *as_translation_node_insert (AsTranslation *translation,
GNode *parent,
AsNodeContext *ctx);
+G_GNUC_INTERNAL
gboolean as_translation_node_parse (AsTranslation *translation,
GNode *node,
AsNodeContext *ctx,
GError **error);
+G_GNUC_INTERNAL
gboolean as_translation_node_parse_dep11 (AsTranslation *translation,
GNode *node,
AsNodeContext *ctx,
diff --git a/libappstream-glib/as-utils-private.h b/libappstream-glib/as-utils-private.h
index 5c4a7f8..9abcc5e 100644
--- a/libappstream-glib/as-utils-private.h
+++ b/libappstream-glib/as-utils-private.h
@@ -19,18 +19,24 @@ G_BEGIN_DECLS
#define AS_UTILS_UNIQUE_ID_PARTS 6
+G_GNUC_INTERNAL
const gchar *as_hash_lookup_by_locale (GHashTable *hash,
const gchar *locale);
+G_GNUC_INTERNAL
void as_pixbuf_sharpen (GdkPixbuf *src,
gint radius,
gdouble amount);
+G_GNUC_INTERNAL
void as_pixbuf_blur (GdkPixbuf *src,
gint radius,
gint iterations);
+G_GNUC_INTERNAL
const gchar *as_ptr_array_find_string (GPtrArray *array,
const gchar *value);
+G_GNUC_INTERNAL
gboolean as_utils_locale_is_compatible (const gchar *locale1,
const gchar *locale2);
+G_GNUC_INTERNAL
GDateTime *as_utils_iso8601_to_datetime (const gchar *iso_date);
G_END_DECLS
diff --git a/libappstream-glib/meson.build b/libappstream-glib/meson.build
index 271c6da..b52f77f 100644
--- a/libappstream-glib/meson.build
+++ b/libappstream-glib/meson.build
@@ -170,12 +170,15 @@ pkgg.generate(
)
selftest = executable(
- 'as-self-test', 'as-self-test.c',
+ 'as-self-test',
+ sources : [
+ 'as-self-test.c',
+ sources,
+ ],
include_directories : include_directories('..'),
dependencies : deps,
c_args : cargs + ['-DTESTDIRSRC="@0@/../data/tests"'.format(meson.current_source_dir())]
+ ['-DTESTDIRBUILD="@0@/../data/tests"'.format(meson.current_build_dir())],
- link_with : asglib,
)
test('as-self-test', selftest)