[PATCH 6/6] Document serialize() / unserialize() functions
- From: "Juan A. Suarez Romero" <jasuarez igalia com>
- To: grilo-list gnome org
- Subject: [PATCH 6/6] Document serialize() / unserialize() functions
- Date: Fri, 28 May 2010 10:50:54 +0200
---
src/data/grl-media.c | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/src/data/grl-media.c b/src/data/grl-media.c
index 5fce573..2c714eb 100644
--- a/src/data/grl-media.c
+++ b/src/data/grl-media.c
@@ -107,6 +107,17 @@ grl_media_set_rating (GrlMedia *media, gfloat rating, gfloat max)
normalized_value);
}
+/**
+ * grl_media_serialize:
+ * @media: a #GrlMedia
+ * @full: if all properties should be included in the serialization
+ *
+ * Serializes a GrlMedia into a string.
+ *
+ * See grl_media_unserialize() to recover back the GrlMedia from the string.
+ *
+ * Returns: serialized media
+ **/
gchar *
grl_media_serialize (GrlMedia *media,
gboolean full)
@@ -203,6 +214,14 @@ grl_media_serialize (GrlMedia *media,
return g_string_free (serial, FALSE);
}
+/**
+ * grl_media_unserialize:
+ * @serial: a serialized media
+ *
+ * Unserializes a GrlMedia.
+ *
+ * Returns: the GrlMedia from the serial
+ **/
GrlMedia *
grl_media_unserialize (const gchar *serial)
{
--
1.7.0.4
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]