diff options
author | Richard Hughes <richard@hughsie.com> | 2017-02-27 10:02:08 +0000 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2017-02-27 11:36:28 +0000 |
commit | 2557bb9d53590b1926f7f8d36db4296a83395282 (patch) | |
tree | 5427361a2d7ddb88d5254b9456ac496af5d5f13a | |
parent | 96c0cb0498790b04f4918264d230cf67e8cf1f03 (diff) | |
download | appstream-glib-2557bb9d53590b1926f7f8d36db4296a83395282.tar.gz |
trivial: Rename some non exported symbols to use AsFormat
-rw-r--r-- | libappstream-glib/as-app.c | 2 | ||||
-rw-r--r-- | libappstream-glib/as-node-private.h | 6 | ||||
-rw-r--r-- | libappstream-glib/as-node.c | 28 | ||||
-rw-r--r-- | libappstream-glib/as-release.c | 2 | ||||
-rw-r--r-- | libappstream-glib/as-self-test.c | 4 |
5 files changed, 21 insertions, 21 deletions
diff --git a/libappstream-glib/as-app.c b/libappstream-glib/as-app.c index a5d96a8..f25cb49 100644 --- a/libappstream-glib/as-app.c +++ b/libappstream-glib/as-app.c @@ -5662,7 +5662,7 @@ as_app_parse_appdata_file (AsApp *app, } } ctx = as_node_context_new (); - as_node_context_set_source_kind (ctx, AS_FORMAT_KIND_APPDATA); + as_node_context_set_format_kind (ctx, AS_FORMAT_KIND_APPDATA); if (!as_app_node_parse_full (app, node, flags, ctx, error)) return FALSE; diff --git a/libappstream-glib/as-node-private.h b/libappstream-glib/as-node-private.h index ac3630c..e161afc 100644 --- a/libappstream-glib/as-node-private.h +++ b/libappstream-glib/as-node-private.h @@ -38,9 +38,9 @@ void as_node_context_free (AsNodeContext *ctx); gdouble as_node_context_get_version (AsNodeContext *ctx); void as_node_context_set_version (AsNodeContext *ctx, gdouble version); -AsFormatKind as_node_context_get_source_kind (AsNodeContext *ctx); -void as_node_context_set_source_kind (AsNodeContext *ctx, - AsFormatKind source_kind); +AsFormatKind as_node_context_get_format_kind (AsNodeContext *ctx); +void as_node_context_set_format_kind (AsNodeContext *ctx, + AsFormatKind format_kind); gboolean as_node_context_get_output_trusted (AsNodeContext *ctx); void as_node_context_set_output_trusted (AsNodeContext *ctx, gboolean output_trusted); diff --git a/libappstream-glib/as-node.c b/libappstream-glib/as-node.c index 83e6307..e70c744 100644 --- a/libappstream-glib/as-node.c +++ b/libappstream-glib/as-node.c @@ -2047,7 +2047,7 @@ as_node_get_localized_unwrap (const AsNode *node, GError **error) /* helper struct */ struct _AsNodeContext { - AsFormatKind source_kind; + AsFormatKind format_kind; AsFormatKind output; gdouble version; gboolean output_trusted; @@ -2069,7 +2069,7 @@ as_node_context_new (void) AsNodeContext *ctx; ctx = g_new0 (AsNodeContext, 1); ctx->version = 0.f; - ctx->source_kind = AS_FORMAT_KIND_APPSTREAM; + ctx->format_kind = AS_FORMAT_KIND_APPSTREAM; ctx->output = AS_FORMAT_KIND_UNKNOWN; return ctx; } @@ -2124,34 +2124,34 @@ as_node_context_set_version (AsNodeContext *ctx, gdouble version) } /** - * as_node_context_get_source_kind: (skip) + * as_node_context_get_format_kind: (skip) * @ctx: a #AsNodeContext. * - * Gets the AppStream API source_kind used when parsing nodes. + * Gets the AppStream API format kind used when parsing nodes. * - * Returns: source_kind number + * Returns: format kind, e.g. %AS_FORMAT_KIND_APPDATA * - * Since: 0.3.6 + * Since: 0.6.9 **/ AsFormatKind -as_node_context_get_source_kind (AsNodeContext *ctx) +as_node_context_get_format_kind (AsNodeContext *ctx) { - return ctx->source_kind; + return ctx->format_kind; } /** - * as_node_context_set_source_kind: (skip) + * as_node_context_set_format_kind: (skip) * @ctx: a #AsNodeContext. - * @source_kind: an API source_kind number to target. + * @format_kind: an API format kind, e.g. %AS_FORMAT_KIND_APPDATA * - * Sets the AppStream API source_kind used when parsing nodes. + * Sets the AppStream API format kind used when exporting nodes. * - * Since: 0.3.6 + * Since: 0.6.9 **/ void -as_node_context_set_source_kind (AsNodeContext *ctx, AsFormatKind source_kind) +as_node_context_set_format_kind (AsNodeContext *ctx, AsFormatKind format_kind) { - ctx->source_kind = source_kind; + ctx->format_kind = format_kind; } /** diff --git a/libappstream-glib/as-release.c b/libappstream-glib/as-release.c index 4aa197d..cc396f1 100644 --- a/libappstream-glib/as-release.c +++ b/libappstream-glib/as-release.c @@ -782,7 +782,7 @@ as_release_node_parse (AsRelease *release, GNode *node, } /* AppStream: multiple <description> tags */ - if (as_node_context_get_source_kind (ctx) == AS_FORMAT_KIND_APPSTREAM) { + if (as_node_context_get_format_kind (ctx) == AS_FORMAT_KIND_APPSTREAM) { for (n = node->children; n != NULL; n = n->next) { g_autoptr(GString) xml = NULL; if (as_node_get_tag (n) != AS_TAG_DESCRIPTION) diff --git a/libappstream-glib/as-self-test.c b/libappstream-glib/as-self-test.c index e333cf0..9598e01 100644 --- a/libappstream-glib/as-self-test.c +++ b/libappstream-glib/as-self-test.c @@ -639,7 +639,7 @@ as_test_release_appstream_func (void) /* back to node */ root = as_node_new (); as_node_context_set_version (ctx, 1.0); - as_node_context_set_source_kind (ctx, AS_FORMAT_KIND_APPSTREAM); + as_node_context_set_format_kind (ctx, AS_FORMAT_KIND_APPSTREAM); n = as_release_node_insert (release, root, ctx); xml = as_node_to_xml (n, AS_NODE_TO_XML_FLAG_FORMAT_MULTILINE); ret = as_test_compare_lines (xml->str, src, &error); @@ -676,7 +676,7 @@ as_test_release_appdata_func (void) n = as_node_find (root, "release"); g_assert (n != NULL); ctx = as_node_context_new (); - as_node_context_set_source_kind (ctx, AS_FORMAT_KIND_APPDATA); + as_node_context_set_format_kind (ctx, AS_FORMAT_KIND_APPDATA); ret = as_release_node_parse (release, n, ctx, &error); g_assert_no_error (error); g_assert (ret); |