summaryrefslogtreecommitdiff
path: root/json-glib/json-gobject.h
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@linux.intel.com>2009-11-12 12:38:29 +0000
committerEmmanuele Bassi <ebassi@linux.intel.com>2009-11-12 12:38:29 +0000
commit63dc03da507a216c0764bc0e50fc62b2b77dc1b2 (patch)
treeec233b1722658b2fe1aaae1bdf055fa034fc7203 /json-glib/json-gobject.h
parent5f484d8c274a2b866f9a3d38eebe2baa1939b7ac (diff)
downloadjson-glib-63dc03da507a216c0764bc0e50fc62b2b77dc1b2.tar.gz
serializable: Add methods proxying default implementations
If you want to use the default implementation of serialize_property() and/or deserialize_property() from an object class implementing JsonSerializable you currently have to peek the interface vtable and then call the vfunc pointers. We can expose the default implementation through functions ourselves and simplify the required code.
Diffstat (limited to 'json-glib/json-gobject.h')
-rw-r--r--json-glib/json-gobject.h28
1 files changed, 19 insertions, 9 deletions
diff --git a/json-glib/json-gobject.h b/json-glib/json-gobject.h
index 89e8957..69ae4e2 100644
--- a/json-glib/json-gobject.h
+++ b/json-glib/json-gobject.h
@@ -69,15 +69,25 @@ struct _JsonSerializableIface
GType json_serializable_get_type (void) G_GNUC_CONST;
-JsonNode *json_serializable_serialize_property (JsonSerializable *serializable,
- const gchar *property_name,
- const GValue *value,
- GParamSpec *pspec);
-gboolean json_serializable_deserialize_property (JsonSerializable *serializable,
- const gchar *property_name,
- GValue *value,
- GParamSpec *pspec,
- JsonNode *property_node);
+JsonNode *json_serializable_serialize_property (JsonSerializable *serializable,
+ const gchar *property_name,
+ const GValue *value,
+ GParamSpec *pspec);
+gboolean json_serializable_deserialize_property (JsonSerializable *serializable,
+ const gchar *property_name,
+ GValue *value,
+ GParamSpec *pspec,
+ JsonNode *property_node);
+
+JsonNode *json_serializable_default_serialize_property (JsonSerializable *serializable,
+ const gchar *property_name,
+ const GValue *value,
+ GParamSpec *pspec);
+gboolean json_serializable_default_deserialize_property (JsonSerializable *serializable,
+ const gchar *property_name,
+ GValue *value,
+ GParamSpec *pspec,
+ JsonNode *property_node);
/**
* JsonBoxedSerializeFunc: