[vala] json-glib-1.0: Update for 0.12.0
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] json-glib-1.0: Update for 0.12.0
- Date: Wed, 5 Jan 2011 23:10:23 +0000 (UTC)
commit af328dc2c64bc150e5cd0c53e36817c797048e35
Author: Jürg Billeter <j bitron ch>
Date: Thu Jan 6 00:06:24 2011 +0100
json-glib-1.0: Update for 0.12.0
vapi/Makefile.am | 1 +
vapi/json-glib-1.0.deps | 1 +
vapi/json-glib-1.0.vapi | 53 +++++
vapi/packages/json-glib-1.0/json-glib-1.0.deps | 1 +
vapi/packages/json-glib-1.0/json-glib-1.0.gi | 254 +++++++++++++++++++++++-
5 files changed, 307 insertions(+), 3 deletions(-)
---
diff --git a/vapi/Makefile.am b/vapi/Makefile.am
index 69068ae..800b673 100644
--- a/vapi/Makefile.am
+++ b/vapi/Makefile.am
@@ -118,6 +118,7 @@ dist_vapi_DATA = \
hildon-1.vapi \
hildon-fm-2.deps \
hildon-fm-2.vapi \
+ json-glib-1.0.deps \
json-glib-1.0.vapi \
libarchive.deps \
libarchive.vapi \
diff --git a/vapi/json-glib-1.0.deps b/vapi/json-glib-1.0.deps
new file mode 100644
index 0000000..cd10dfd
--- /dev/null
+++ b/vapi/json-glib-1.0.deps
@@ -0,0 +1 @@
+gio-2.0
diff --git a/vapi/json-glib-1.0.vapi b/vapi/json-glib-1.0.vapi
index fba6441..a6365a3 100644
--- a/vapi/json-glib-1.0.vapi
+++ b/vapi/json-glib-1.0.vapi
@@ -31,12 +31,31 @@ namespace Json {
public static unowned Json.Array sized_new (uint n_elements);
}
[CCode (cheader_filename = "json-glib/json-glib.h")]
+ public class Builder : GLib.Object {
+ [CCode (has_construct_function = false)]
+ public Builder ();
+ public unowned Json.Builder add_boolean_value (bool value);
+ public unowned Json.Builder add_double_value (double value);
+ public unowned Json.Builder add_int_value (int64 value);
+ public unowned Json.Builder add_null_value ();
+ public unowned Json.Builder add_string_value (string value);
+ public unowned Json.Builder add_value (Json.Node node);
+ public unowned Json.Builder begin_array ();
+ public unowned Json.Builder begin_object ();
+ public unowned Json.Builder end_array ();
+ public unowned Json.Builder end_object ();
+ public unowned Json.Node get_root ();
+ public void reset ();
+ public unowned Json.Builder set_member_name (string member_name);
+ }
+ [CCode (cheader_filename = "json-glib/json-glib.h")]
public class Generator : GLib.Object {
[CCode (has_construct_function = false)]
public Generator ();
public void set_root (Json.Node node);
public string to_data (out size_t length);
public bool to_file (string filename) throws GLib.Error;
+ public bool to_stream (GLib.OutputStream stream, GLib.Cancellable cancellable) throws GLib.Error;
[NoAccessorMethod]
public uint indent { get; set; }
[NoAccessorMethod]
@@ -119,6 +138,8 @@ namespace Json {
public bool has_assignment (out unowned string variable_name);
public bool load_from_data (string data, ssize_t length = -1) throws GLib.Error;
public bool load_from_file (string filename) throws GLib.Error;
+ public bool load_from_stream (GLib.InputStream stream, GLib.Cancellable cancellable) throws GLib.Error;
+ public async bool load_from_stream_async (GLib.InputStream stream, GLib.Cancellable cancellable) throws GLib.Error;
public virtual signal void array_element (Json.Array array, int index_);
public virtual signal void array_end (Json.Array array);
public virtual signal void array_start ();
@@ -129,6 +150,31 @@ namespace Json {
public virtual signal void parse_end ();
public virtual signal void parse_start ();
}
+ [CCode (cheader_filename = "json-glib/json-glib.h")]
+ public class Reader : GLib.Object {
+ [CCode (has_construct_function = false)]
+ public Reader (Json.Node node);
+ public int count_elements ();
+ public int count_members ();
+ public void end_element ();
+ public void end_member ();
+ public static GLib.Quark error_quark ();
+ public bool get_boolean_value ();
+ public double get_double_value ();
+ public unowned GLib.Error get_error ();
+ public int64 get_int_value ();
+ public bool get_null_value ();
+ public unowned string get_string_value ();
+ public unowned Json.Node get_value ();
+ public bool is_array ();
+ public bool is_object ();
+ public bool is_value ();
+ public bool read_element (uint index_);
+ public bool read_member (string member_name);
+ public void set_root (Json.Node root);
+ [NoAccessorMethod]
+ public Json.Node root { owned get; set construct; }
+ }
[CCode (cheader_filename = "json-glib/json-glib.h,json-glib/json-gobject.h")]
public interface Serializable {
public bool default_deserialize_property (string property_name, GLib.Value value, GLib.ParamSpec pspec, Json.Node property_node);
@@ -152,6 +198,13 @@ namespace Json {
INVALID_BAREWORD,
UNKNOWN
}
+ [CCode (cprefix = "JSON_READER_ERROR_", cheader_filename = "json-glib/json-glib.h")]
+ public enum ReaderError {
+ NO_ARRAY,
+ INVALID_INDEX,
+ NO_OBJECT,
+ INVALID_MEMBER
+ }
[CCode (cheader_filename = "json-glib/json-glib.h")]
public delegate void ArrayForeach (Json.Array array, uint index_, Json.Node element_node);
[CCode (cheader_filename = "json-glib/json-glib.h", has_target = false)]
diff --git a/vapi/packages/json-glib-1.0/json-glib-1.0.deps b/vapi/packages/json-glib-1.0/json-glib-1.0.deps
new file mode 100644
index 0000000..cd10dfd
--- /dev/null
+++ b/vapi/packages/json-glib-1.0/json-glib-1.0.deps
@@ -0,0 +1 @@
+gio-2.0
diff --git a/vapi/packages/json-glib-1.0/json-glib-1.0.gi b/vapi/packages/json-glib-1.0/json-glib-1.0.gi
index 35aa0a0..246fa53 100644
--- a/vapi/packages/json-glib-1.0/json-glib-1.0.gi
+++ b/vapi/packages/json-glib-1.0/json-glib-1.0.gi
@@ -674,6 +674,101 @@
<member name="JSON_PARSER_ERROR_INVALID_BAREWORD" value="4"/>
<member name="JSON_PARSER_ERROR_UNKNOWN" value="5"/>
</enum>
+ <enum name="JsonReaderError" type-name="JsonReaderError" get-type="json_reader_error_get_type">
+ <member name="JSON_READER_ERROR_NO_ARRAY" value="0"/>
+ <member name="JSON_READER_ERROR_INVALID_INDEX" value="1"/>
+ <member name="JSON_READER_ERROR_NO_OBJECT" value="2"/>
+ <member name="JSON_READER_ERROR_INVALID_MEMBER" value="3"/>
+ </enum>
+ <object name="JsonBuilder" parent="GObject" type-name="JsonBuilder" get-type="json_builder_get_type">
+ <method name="add_boolean_value" symbol="json_builder_add_boolean_value">
+ <return-type type="JsonBuilder*"/>
+ <parameters>
+ <parameter name="builder" type="JsonBuilder*"/>
+ <parameter name="value" type="gboolean"/>
+ </parameters>
+ </method>
+ <method name="add_double_value" symbol="json_builder_add_double_value">
+ <return-type type="JsonBuilder*"/>
+ <parameters>
+ <parameter name="builder" type="JsonBuilder*"/>
+ <parameter name="value" type="gdouble"/>
+ </parameters>
+ </method>
+ <method name="add_int_value" symbol="json_builder_add_int_value">
+ <return-type type="JsonBuilder*"/>
+ <parameters>
+ <parameter name="builder" type="JsonBuilder*"/>
+ <parameter name="value" type="gint64"/>
+ </parameters>
+ </method>
+ <method name="add_null_value" symbol="json_builder_add_null_value">
+ <return-type type="JsonBuilder*"/>
+ <parameters>
+ <parameter name="builder" type="JsonBuilder*"/>
+ </parameters>
+ </method>
+ <method name="add_string_value" symbol="json_builder_add_string_value">
+ <return-type type="JsonBuilder*"/>
+ <parameters>
+ <parameter name="builder" type="JsonBuilder*"/>
+ <parameter name="value" type="gchar*"/>
+ </parameters>
+ </method>
+ <method name="add_value" symbol="json_builder_add_value">
+ <return-type type="JsonBuilder*"/>
+ <parameters>
+ <parameter name="builder" type="JsonBuilder*"/>
+ <parameter name="node" type="JsonNode*"/>
+ </parameters>
+ </method>
+ <method name="begin_array" symbol="json_builder_begin_array">
+ <return-type type="JsonBuilder*"/>
+ <parameters>
+ <parameter name="builder" type="JsonBuilder*"/>
+ </parameters>
+ </method>
+ <method name="begin_object" symbol="json_builder_begin_object">
+ <return-type type="JsonBuilder*"/>
+ <parameters>
+ <parameter name="builder" type="JsonBuilder*"/>
+ </parameters>
+ </method>
+ <method name="end_array" symbol="json_builder_end_array">
+ <return-type type="JsonBuilder*"/>
+ <parameters>
+ <parameter name="builder" type="JsonBuilder*"/>
+ </parameters>
+ </method>
+ <method name="end_object" symbol="json_builder_end_object">
+ <return-type type="JsonBuilder*"/>
+ <parameters>
+ <parameter name="builder" type="JsonBuilder*"/>
+ </parameters>
+ </method>
+ <method name="get_root" symbol="json_builder_get_root">
+ <return-type type="JsonNode*"/>
+ <parameters>
+ <parameter name="builder" type="JsonBuilder*"/>
+ </parameters>
+ </method>
+ <constructor name="new" symbol="json_builder_new">
+ <return-type type="JsonBuilder*"/>
+ </constructor>
+ <method name="reset" symbol="json_builder_reset">
+ <return-type type="void"/>
+ <parameters>
+ <parameter name="builder" type="JsonBuilder*"/>
+ </parameters>
+ </method>
+ <method name="set_member_name" symbol="json_builder_set_member_name">
+ <return-type type="JsonBuilder*"/>
+ <parameters>
+ <parameter name="builder" type="JsonBuilder*"/>
+ <parameter name="member_name" type="gchar*"/>
+ </parameters>
+ </method>
+ </object>
<object name="JsonGenerator" parent="GObject" type-name="JsonGenerator" get-type="json_generator_get_type">
<constructor name="new" symbol="json_generator_new">
<return-type type="JsonGenerator*"/>
@@ -700,6 +795,15 @@
<parameter name="error" type="GError**"/>
</parameters>
</method>
+ <method name="to_stream" symbol="json_generator_to_stream">
+ <return-type type="gboolean"/>
+ <parameters>
+ <parameter name="generator" type="JsonGenerator*"/>
+ <parameter name="stream" type="GOutputStream*"/>
+ <parameter name="cancellable" type="GCancellable*"/>
+ <parameter name="error" type="GError**"/>
+ </parameters>
+ </method>
<property name="indent" type="guint" readable="1" writable="1" construct="0" construct-only="0"/>
<property name="indent-char" type="guint" readable="1" writable="1" construct="0" construct-only="0"/>
<property name="pretty" type="gboolean" readable="1" writable="1" construct="0" construct-only="0"/>
@@ -751,6 +855,33 @@
<parameter name="error" type="GError**"/>
</parameters>
</method>
+ <method name="load_from_stream" symbol="json_parser_load_from_stream">
+ <return-type type="gboolean"/>
+ <parameters>
+ <parameter name="parser" type="JsonParser*"/>
+ <parameter name="stream" type="GInputStream*"/>
+ <parameter name="cancellable" type="GCancellable*"/>
+ <parameter name="error" type="GError**"/>
+ </parameters>
+ </method>
+ <method name="load_from_stream_async" symbol="json_parser_load_from_stream_async">
+ <return-type type="void"/>
+ <parameters>
+ <parameter name="parser" type="JsonParser*"/>
+ <parameter name="stream" type="GInputStream*"/>
+ <parameter name="cancellable" type="GCancellable*"/>
+ <parameter name="callback" type="GAsyncReadyCallback"/>
+ <parameter name="user_data" type="gpointer"/>
+ </parameters>
+ </method>
+ <method name="load_from_stream_finish" symbol="json_parser_load_from_stream_finish">
+ <return-type type="gboolean"/>
+ <parameters>
+ <parameter name="parser" type="JsonParser*"/>
+ <parameter name="result" type="GAsyncResult*"/>
+ <parameter name="error" type="GError**"/>
+ </parameters>
+ </method>
<constructor name="new" symbol="json_parser_new">
<return-type type="JsonParser*"/>
</constructor>
@@ -816,6 +947,123 @@
</parameters>
</signal>
</object>
+ <object name="JsonReader" parent="GObject" type-name="JsonReader" get-type="json_reader_get_type">
+ <method name="count_elements" symbol="json_reader_count_elements">
+ <return-type type="gint"/>
+ <parameters>
+ <parameter name="reader" type="JsonReader*"/>
+ </parameters>
+ </method>
+ <method name="count_members" symbol="json_reader_count_members">
+ <return-type type="gint"/>
+ <parameters>
+ <parameter name="reader" type="JsonReader*"/>
+ </parameters>
+ </method>
+ <method name="end_element" symbol="json_reader_end_element">
+ <return-type type="void"/>
+ <parameters>
+ <parameter name="reader" type="JsonReader*"/>
+ </parameters>
+ </method>
+ <method name="end_member" symbol="json_reader_end_member">
+ <return-type type="void"/>
+ <parameters>
+ <parameter name="reader" type="JsonReader*"/>
+ </parameters>
+ </method>
+ <method name="error_quark" symbol="json_reader_error_quark">
+ <return-type type="GQuark"/>
+ </method>
+ <method name="get_boolean_value" symbol="json_reader_get_boolean_value">
+ <return-type type="gboolean"/>
+ <parameters>
+ <parameter name="reader" type="JsonReader*"/>
+ </parameters>
+ </method>
+ <method name="get_double_value" symbol="json_reader_get_double_value">
+ <return-type type="gdouble"/>
+ <parameters>
+ <parameter name="reader" type="JsonReader*"/>
+ </parameters>
+ </method>
+ <method name="get_error" symbol="json_reader_get_error">
+ <return-type type="GError*"/>
+ <parameters>
+ <parameter name="reader" type="JsonReader*"/>
+ </parameters>
+ </method>
+ <method name="get_int_value" symbol="json_reader_get_int_value">
+ <return-type type="gint64"/>
+ <parameters>
+ <parameter name="reader" type="JsonReader*"/>
+ </parameters>
+ </method>
+ <method name="get_null_value" symbol="json_reader_get_null_value">
+ <return-type type="gboolean"/>
+ <parameters>
+ <parameter name="reader" type="JsonReader*"/>
+ </parameters>
+ </method>
+ <method name="get_string_value" symbol="json_reader_get_string_value">
+ <return-type type="gchar*"/>
+ <parameters>
+ <parameter name="reader" type="JsonReader*"/>
+ </parameters>
+ </method>
+ <method name="get_value" symbol="json_reader_get_value">
+ <return-type type="JsonNode*"/>
+ <parameters>
+ <parameter name="reader" type="JsonReader*"/>
+ </parameters>
+ </method>
+ <method name="is_array" symbol="json_reader_is_array">
+ <return-type type="gboolean"/>
+ <parameters>
+ <parameter name="reader" type="JsonReader*"/>
+ </parameters>
+ </method>
+ <method name="is_object" symbol="json_reader_is_object">
+ <return-type type="gboolean"/>
+ <parameters>
+ <parameter name="reader" type="JsonReader*"/>
+ </parameters>
+ </method>
+ <method name="is_value" symbol="json_reader_is_value">
+ <return-type type="gboolean"/>
+ <parameters>
+ <parameter name="reader" type="JsonReader*"/>
+ </parameters>
+ </method>
+ <constructor name="new" symbol="json_reader_new">
+ <return-type type="JsonReader*"/>
+ <parameters>
+ <parameter name="node" type="JsonNode*"/>
+ </parameters>
+ </constructor>
+ <method name="read_element" symbol="json_reader_read_element">
+ <return-type type="gboolean"/>
+ <parameters>
+ <parameter name="reader" type="JsonReader*"/>
+ <parameter name="index_" type="guint"/>
+ </parameters>
+ </method>
+ <method name="read_member" symbol="json_reader_read_member">
+ <return-type type="gboolean"/>
+ <parameters>
+ <parameter name="reader" type="JsonReader*"/>
+ <parameter name="member_name" type="gchar*"/>
+ </parameters>
+ </method>
+ <method name="set_root" symbol="json_reader_set_root">
+ <return-type type="void"/>
+ <parameters>
+ <parameter name="reader" type="JsonReader*"/>
+ <parameter name="root" type="JsonNode*"/>
+ </parameters>
+ </method>
+ <property name="root" type="JsonNode*" readable="1" writable="1" construct="1" construct-only="0"/>
+ </object>
<interface name="JsonSerializable" type-name="JsonSerializable" get-type="json_serializable_get_type">
<method name="default_deserialize_property" symbol="json_serializable_default_deserialize_property">
<return-type type="gboolean"/>
@@ -876,9 +1124,9 @@
</vfunc>
</interface>
<constant name="JSON_MAJOR_VERSION" type="int" value="0"/>
- <constant name="JSON_MICRO_VERSION" type="int" value="1"/>
- <constant name="JSON_MINOR_VERSION" type="int" value="11"/>
+ <constant name="JSON_MICRO_VERSION" type="int" value="0"/>
+ <constant name="JSON_MINOR_VERSION" type="int" value="12"/>
<constant name="JSON_VERSION_HEX" type="int" value="0"/>
- <constant name="JSON_VERSION_S" type="char*" value="0.11.1"/>
+ <constant name="JSON_VERSION_S" type="char*" value="0.12.0"/>
</namespace>
</api>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]