summaryrefslogtreecommitdiff
path: root/json-glib/json-gobject.h
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@linux.intel.com>2011-06-01 12:35:58 +0100
committerEmmanuele Bassi <ebassi@linux.intel.com>2011-06-01 12:36:55 +0100
commit96b1e6b50f355c04e794ad7366bd33b9c3d1f81b (patch)
tree9c04289022797e2554826a89353b765edd83a607 /json-glib/json-gobject.h
parentc85fc93f6235b8b9d584585215b2fa860f07f2c3 (diff)
downloadjson-glib-96b1e6b50f355c04e794ad7366bd33b9c3d1f81b.tar.gz
serializable: Allow introspecting properties
This allows a Serializable implementation to override the property list, and the setter and the getter function.
Diffstat (limited to 'json-glib/json-gobject.h')
-rw-r--r--json-glib/json-gobject.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/json-glib/json-gobject.h b/json-glib/json-gobject.h
index 9eb6ac9..6c02ff9 100644
--- a/json-glib/json-gobject.h
+++ b/json-glib/json-gobject.h
@@ -65,6 +65,17 @@ struct _JsonSerializableIface
GValue *value,
GParamSpec *pspec,
JsonNode *property_node);
+
+ GParamSpec * (* find_property) (JsonSerializable *serializable,
+ const char *name);
+ GParamSpec **(* list_properties) (JsonSerializable *serializable,
+ guint *n_pspecs);
+ void (* set_property) (JsonSerializable *serializable,
+ GParamSpec *pspec,
+ const GValue *value);
+ void (* get_property) (JsonSerializable *serializable,
+ GParamSpec *pspec,
+ GValue *value);
};
GType json_serializable_get_type (void) G_GNUC_CONST;
@@ -79,6 +90,17 @@ gboolean json_serializable_deserialize_property (JsonSerializable *seri
GParamSpec *pspec,
JsonNode *property_node);
+GParamSpec * json_serializable_find_property (JsonSerializable *serializable,
+ const char *name);
+GParamSpec ** json_serializable_list_properties (JsonSerializable *serializable,
+ guint *n_pspecs);
+void json_serializable_set_property (JsonSerializable *serializable,
+ GParamSpec *pspec,
+ const GValue *value);
+void json_serializable_get_property (JsonSerializable *serializable,
+ GParamSpec *pspec,
+ GValue *value);
+
JsonNode *json_serializable_default_serialize_property (JsonSerializable *serializable,
const gchar *property_name,
const GValue *value,