[gnome-online-accounts] backend: Add goa_object_skeleton_attach_photos() helper
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-online-accounts] backend: Add goa_object_skeleton_attach_photos() helper
- Date: Tue, 15 Mar 2016 18:18:43 +0000 (UTC)
commit 087fe3883b986d38d4228c1d3b940c86d8d7bfcd
Author: Christophe Fergeau <cfergeau redhat com>
Date: Sun May 3 19:03:00 2015 +0200
backend: Add goa_object_skeleton_attach_photos() helper
https://bugzilla.gnome.org/show_bug.cgi?id=761510
src/goabackend/goaobjectskeletonutils.c | 24 ++++++++++++++++++++++++
src/goabackend/goaobjectskeletonutils.h | 3 +++
2 files changed, 27 insertions(+), 0 deletions(-)
---
diff --git a/src/goabackend/goaobjectskeletonutils.c b/src/goabackend/goaobjectskeletonutils.c
index 86dbe9d..38accc6 100644
--- a/src/goabackend/goaobjectskeletonutils.c
+++ b/src/goabackend/goaobjectskeletonutils.c
@@ -159,3 +159,27 @@ goa_object_skeleton_attach_chat (GoaObjectSkeleton *object,
goa_object_skeleton_set_chat (object, NULL);
#endif
}
+
+void
+goa_object_skeleton_attach_photos (GoaObjectSkeleton *object,
+ gboolean photos_enabled)
+{
+ GoaPhotos *photos;
+
+ photos = goa_object_get_photos (GOA_OBJECT (object));
+
+ if (photos_enabled)
+ {
+ if (photos == NULL)
+ {
+ photos = goa_photos_skeleton_new ();
+ goa_object_skeleton_set_photos (object, photos);
+ }
+ }
+ else
+ {
+ if (photos != NULL)
+ goa_object_skeleton_set_photos (object, NULL);
+ }
+ g_clear_object (&photos);
+}
diff --git a/src/goabackend/goaobjectskeletonutils.h b/src/goabackend/goaobjectskeletonutils.h
index 9f84bec..b33cda0 100644
--- a/src/goabackend/goaobjectskeletonutils.h
+++ b/src/goabackend/goaobjectskeletonutils.h
@@ -49,6 +49,9 @@ void goa_object_skeleton_attach_files (GoaObjectSkeleton *o
gboolean files_enabled,
gboolean accept_ssl_errors);
+void goa_object_skeleton_attach_photos (GoaObjectSkeleton *object,
+ gboolean photos_enabled);
+
G_END_DECLS
#endif /* __GOA_OBJECT_SKELETON_UTILS_H__ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]