summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÁlvaro Peña <alvaropg@gmail.com>2014-04-15 20:45:29 +0200
committerÁlvaro Peña <alvaropg@gmail.com>2014-04-15 20:45:29 +0200
commit47770be52227c39d7a8ef0962c34e5a0f57b3846 (patch)
tree44f46ed28cf5b5a3a791fbe140877f79c862e02e
parent81c3475a67713e413e5660e5efc1b9a250a9fc61 (diff)
downloadlibgfbgraph-47770be52227c39d7a8ef0962c34e5a0f57b3846.tar.gz
Album: Just two set property functions (for name and description)
-rw-r--r--gfbgraph/gfbgraph-album.c36
-rw-r--r--gfbgraph/gfbgraph-album.h3
2 files changed, 39 insertions, 0 deletions
diff --git a/gfbgraph/gfbgraph-album.c b/gfbgraph/gfbgraph-album.c
index 639b2d9..f280f11 100644
--- a/gfbgraph/gfbgraph-album.c
+++ b/gfbgraph/gfbgraph-album.c
@@ -313,3 +313,39 @@ gfbgraph_album_get_count (GFBGraphAlbum *album)
return album->priv->count;
}
+
+/**
+ * gfbgraph_album_set_name:
+ * @album: a #GFBGraphAlbum.
+ * @name: a const pointer to a #gchar.
+ *
+ * Sets the name for the @album.
+ **/
+void
+gfbgraph_album_set_name (GFBGraphAlbum *album, const gchar *name)
+{
+ g_return_if_fail (GFBGRAPH_IS_ALBUM (album));
+ g_return_if_fail (name != NULL);
+
+ g_object_set (G_OBJECT (album),
+ "name", name,
+ NULL);
+}
+
+/**
+ * gfbgraph_album_set_description:
+ * @album: a #GFBGraphAlbum.
+ * @description: a const pointer to a #gchar.
+ *
+ * Sets the description for the @album.
+ **/
+void
+gfbgraph_album_set_description (GFBGraphAlbum *album, const gchar *description)
+{
+ g_return_if_fail (GFBGRAPH_IS_ALBUM (album));
+ g_return_if_fail (description != NULL);
+
+ g_object_set (G_OBJECT (album),
+ "description", description,
+ NULL);
+}
diff --git a/gfbgraph/gfbgraph-album.h b/gfbgraph/gfbgraph-album.h
index da93a40..88eb0c2 100644
--- a/gfbgraph/gfbgraph-album.h
+++ b/gfbgraph/gfbgraph-album.h
@@ -56,6 +56,9 @@ const gchar* gfbgraph_album_get_description (GFBGraphAlbum *album);
const gchar* gfbgraph_album_get_cover_photo_id (GFBGraphAlbum *album);
guint gfbgraph_album_get_count (GFBGraphAlbum *album);
+void gfbgraph_album_set_name (GFBGraphAlbum *album, const gchar *name);
+void gfbgraph_album_set_description (GFBGraphAlbum *album, const gchar *description);
+
G_END_DECLS
#endif /* __GFBGRAPH_ALBUM_H__ */