[gnome-online-accounts] backend: Add goa_object_skeleton_attach_maps() helper
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-online-accounts] backend: Add goa_object_skeleton_attach_maps() helper
- Date: Tue, 15 Mar 2016 18:39:09 +0000 (UTC)
commit 4be42d21a4aa4e1bf8bddde1d84767074df0a6a9
Author: Christophe Fergeau <cfergeau redhat com>
Date: Sun May 3 21:01:06 2015 +0200
backend: Add goa_object_skeleton_attach_maps() 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 d05a611..c952826 100644
--- a/src/goabackend/goaobjectskeletonutils.c
+++ b/src/goabackend/goaobjectskeletonutils.c
@@ -207,3 +207,27 @@ goa_object_skeleton_attach_printers (GoaObjectSkeleton *object,
}
g_clear_object (&printers);
}
+
+void
+goa_object_skeleton_attach_maps (GoaObjectSkeleton *object,
+ gboolean maps_enabled)
+{
+ GoaMaps *maps;
+
+ maps = goa_object_get_maps (GOA_OBJECT (object));
+
+ if (maps_enabled)
+ {
+ if (maps == NULL)
+ {
+ maps = goa_maps_skeleton_new ();
+ goa_object_skeleton_set_maps (object, maps);
+ }
+ }
+ else
+ {
+ if (maps != NULL)
+ goa_object_skeleton_set_maps (object, NULL);
+ }
+ g_clear_object (&maps);
+}
diff --git a/src/goabackend/goaobjectskeletonutils.h b/src/goabackend/goaobjectskeletonutils.h
index 96acd0c..815675f 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_maps (GoaObjectSkeleton *object,
+ gboolean maps_enabled);
+
void goa_object_skeleton_attach_photos (GoaObjectSkeleton *object,
gboolean photos_enabled);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]