[gimp] libgimpconfig: Add gimp_config_serialize() and _deserialize()
- From: Martin Nordholts <martinn src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gimp] libgimpconfig: Add gimp_config_serialize() and _deserialize()
- Date: Sat, 19 Sep 2009 16:34:05 +0000 (UTC)
commit a0923b62ee54dc0e58265a4d31611c18ce6b86b8
Author: Martin Nordholts <martinn src gnome org>
Date: Sat Sep 19 17:46:49 2009 +0200
libgimpconfig: Add gimp_config_serialize() and _deserialize()
devel-docs/libgimpconfig/libgimpconfig-docs.sgml | 3 +
libgimpconfig/gimpconfig-iface.c | 51 ++++++++++++++++
libgimpconfig/gimpconfig-iface.h | 69 ++++++++++++----------
3 files changed, 92 insertions(+), 31 deletions(-)
---
diff --git a/devel-docs/libgimpconfig/libgimpconfig-docs.sgml b/devel-docs/libgimpconfig/libgimpconfig-docs.sgml
index 95cebd3..771c27d 100644
--- a/devel-docs/libgimpconfig/libgimpconfig-docs.sgml
+++ b/devel-docs/libgimpconfig/libgimpconfig-docs.sgml
@@ -40,6 +40,9 @@
<index role="GIMP 2.6" id="libgimpconfig-index-new-in-2-6">
<title>Index of new symbols in GIMP 2.6</title>
</index>
+ <index role="GIMP 2.8" id="libgimpconfig-index-new-in-2-8">
+ <title>Index of new symbols in GIMP 2.8</title>
+ </index>
<index role="deprecated" id="libgimpconfig-index-deprecated">
<title>Index of deprecated symbols</title>
</index>
diff --git a/libgimpconfig/gimpconfig-iface.c b/libgimpconfig/gimpconfig-iface.c
index f7e9070..4671a35 100644
--- a/libgimpconfig/gimpconfig-iface.c
+++ b/libgimpconfig/gimpconfig-iface.c
@@ -493,6 +493,57 @@ gimp_config_deserialize_return (GScanner *scanner,
/**
+ * gimp_config_serialize:
+ * @config: a #GObject that implements the #GimpConfigInterface.
+ * @writer: the #GimpConfigWriter to use.
+ * @data: client data
+ *
+ * Serialize the #GimpConfig object.
+ *
+ * Returns: %TRUE if serialization succeeded, %FALSE otherwise.
+ *
+ * Since: GIMP 2.8
+ **/
+gboolean
+gimp_config_serialize (GimpConfig *config,
+ GimpConfigWriter *writer,
+ gpointer data)
+{
+ g_return_val_if_fail (GIMP_IS_CONFIG (config), FALSE);
+
+ return GIMP_CONFIG_GET_INTERFACE (config)->serialize (config,
+ writer,
+ data);
+}
+
+/**
+ * gimp_config_deserialize:
+ * @config: a #GObject that implements the #GimpConfigInterface.
+ * @scanner: the #GScanner to use.
+ * @nest_level: the nest level.
+ * @data: client data.
+ *
+ * Deserialize the #GimpConfig object.
+ *
+ * Returns: %TRUE if deserialization succeeded, %FALSE otherwise.
+ *
+ * Since: GIMP 2.8
+ **/
+gboolean
+gimp_config_deserialize (GimpConfig *config,
+ GScanner *scanner,
+ gint nest_level,
+ gpointer data)
+{
+ g_return_val_if_fail (GIMP_IS_CONFIG (config), FALSE);
+
+ return GIMP_CONFIG_GET_INTERFACE (config)->deserialize (config,
+ scanner,
+ nest_level,
+ data);
+}
+
+/**
* gimp_config_duplicate:
* @config: a #GObject that implements the #GimpConfigInterface.
*
diff --git a/libgimpconfig/gimpconfig-iface.h b/libgimpconfig/gimpconfig-iface.h
index aad216b..f2cb013 100644
--- a/libgimpconfig/gimpconfig-iface.h
+++ b/libgimpconfig/gimpconfig-iface.h
@@ -69,37 +69,44 @@ struct _GimpConfigInterface
GType gimp_config_interface_get_type (void) G_GNUC_CONST;
-gboolean gimp_config_serialize_to_file (GimpConfig *config,
- const gchar *filename,
- const gchar *header,
- const gchar *footer,
- gpointer data,
- GError **error);
-gboolean gimp_config_serialize_to_fd (GimpConfig *config,
- gint fd,
- gpointer data);
-gchar * gimp_config_serialize_to_string (GimpConfig *config,
- gpointer data);
-gboolean gimp_config_deserialize_file (GimpConfig *config,
- const gchar *filename,
- gpointer data,
- GError **error);
-gboolean gimp_config_deserialize_string (GimpConfig *config,
- const gchar *text,
- gint text_len,
- gpointer data,
- GError **error);
-gboolean gimp_config_deserialize_return (GScanner *scanner,
- GTokenType expected_token,
- gint nest_level);
-
-gpointer gimp_config_duplicate (GimpConfig *config);
-gboolean gimp_config_is_equal_to (GimpConfig *a,
- GimpConfig *b);
-void gimp_config_reset (GimpConfig *config);
-gboolean gimp_config_copy (GimpConfig *src,
- GimpConfig *dest,
- GParamFlags flags);
+gboolean gimp_config_serialize_to_file (GimpConfig *config,
+ const gchar *filename,
+ const gchar *header,
+ const gchar *footer,
+ gpointer data,
+ GError **error);
+gboolean gimp_config_serialize_to_fd (GimpConfig *config,
+ gint fd,
+ gpointer data);
+gchar * gimp_config_serialize_to_string (GimpConfig *config,
+ gpointer data);
+gboolean gimp_config_deserialize_file (GimpConfig *config,
+ const gchar *filename,
+ gpointer data,
+ GError **error);
+gboolean gimp_config_deserialize_string (GimpConfig *config,
+ const gchar *text,
+ gint text_len,
+ gpointer data,
+ GError **error);
+gboolean gimp_config_deserialize_return (GScanner *scanner,
+ GTokenType expected_token,
+ gint nest_level);
+
+gboolean gimp_config_serialize (GimpConfig *config,
+ GimpConfigWriter *writer,
+ gpointer data);
+gboolean gimp_config_deserialize (GimpConfig *config,
+ GScanner *scanner,
+ gint nest_level,
+ gpointer data);
+gpointer gimp_config_duplicate (GimpConfig *config);
+gboolean gimp_config_is_equal_to (GimpConfig *a,
+ GimpConfig *b);
+void gimp_config_reset (GimpConfig *config);
+gboolean gimp_config_copy (GimpConfig *src,
+ GimpConfig *dest,
+ GParamFlags flags);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]