summaryrefslogtreecommitdiff
path: root/json-glib/json-builder.h
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2014-03-06 14:35:49 +0000
committerEmmanuele Bassi <ebassi@gnome.org>2014-03-18 16:27:59 +0000
commit794664746dcbe8894255f9615357dd51f7f836c3 (patch)
tree05bc7f153bd80a904111d2aee0ada361bc32bc8f /json-glib/json-builder.h
parent50bf9cd2f6bc9fb21d9793377f0fd534732d215d (diff)
downloadjson-glib-794664746dcbe8894255f9615357dd51f7f836c3.tar.gz
Use compiler annotations to determine symbol visibility
Instead of relying on a separate file that requires being update every time we add a new public function we should use compiler annotations to let the linker know which symbols are public and exported. In order to achieve this we have to: * check for the visibility=hidden attribute * add -fvisibility=hidden to the linker flags * add a macro to annotate all public symbols While we're at it, we should copy the versioned symbols macro layout already used by GLib, GTK+, and other G* libraries, including the ability to express the range of allowed versions of JSON-GLib that third party code can compile against.
Diffstat (limited to 'json-glib/json-builder.h')
-rw-r--r--json-glib/json-builder.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/json-glib/json-builder.h b/json-glib/json-builder.h
index 361c64a..dd0bad8 100644
--- a/json-glib/json-builder.h
+++ b/json-glib/json-builder.h
@@ -75,29 +75,44 @@ struct _JsonBuilderClass
void (* _json_reserved2) (void);
};
+JSON_AVAILABLE_IN_1_0
GType json_builder_get_type (void) G_GNUC_CONST;
+JSON_AVAILABLE_IN_1_0
JsonBuilder *json_builder_new (void);
+JSON_AVAILABLE_IN_1_0
JsonNode *json_builder_get_root (JsonBuilder *builder);
+JSON_AVAILABLE_IN_1_0
void json_builder_reset (JsonBuilder *builder);
+JSON_AVAILABLE_IN_1_0
JsonBuilder *json_builder_begin_array (JsonBuilder *builder);
+JSON_AVAILABLE_IN_1_0
JsonBuilder *json_builder_end_array (JsonBuilder *builder);
+JSON_AVAILABLE_IN_1_0
JsonBuilder *json_builder_begin_object (JsonBuilder *builder);
+JSON_AVAILABLE_IN_1_0
JsonBuilder *json_builder_end_object (JsonBuilder *builder);
+JSON_AVAILABLE_IN_1_0
JsonBuilder *json_builder_set_member_name (JsonBuilder *builder,
const gchar *member_name);
+JSON_AVAILABLE_IN_1_0
JsonBuilder *json_builder_add_value (JsonBuilder *builder,
JsonNode *node);
+JSON_AVAILABLE_IN_1_0
JsonBuilder *json_builder_add_int_value (JsonBuilder *builder,
gint64 value);
+JSON_AVAILABLE_IN_1_0
JsonBuilder *json_builder_add_double_value (JsonBuilder *builder,
gdouble value);
+JSON_AVAILABLE_IN_1_0
JsonBuilder *json_builder_add_boolean_value (JsonBuilder *builder,
gboolean value);
+JSON_AVAILABLE_IN_1_0
JsonBuilder *json_builder_add_string_value (JsonBuilder *builder,
const gchar *value);
+JSON_AVAILABLE_IN_1_0
JsonBuilder *json_builder_add_null_value (JsonBuilder *builder);
G_END_DECLS