[gnome-online-accounts] backend: Add goa_object_skeleton_attach_chat() helper
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-online-accounts] backend: Add goa_object_skeleton_attach_chat() helper
- Date: Tue, 15 Mar 2016 17:53:12 +0000 (UTC)
commit a61d3700214f557c52be1f6b7371da2bf49f67e9
Author: Christophe Fergeau <cfergeau redhat com>
Date: Sun May 3 19:01:21 2015 +0200
backend: Add goa_object_skeleton_attach_chat() helper
https://bugzilla.gnome.org/show_bug.cgi?id=761510
src/goabackend/goaobjectskeletonutils.c | 28 ++++++++++++++++++++++++++++
src/goabackend/goaobjectskeletonutils.h | 3 +++
2 files changed, 31 insertions(+), 0 deletions(-)
---
diff --git a/src/goabackend/goaobjectskeletonutils.c b/src/goabackend/goaobjectskeletonutils.c
index fccbe77..86dbe9d 100644
--- a/src/goabackend/goaobjectskeletonutils.c
+++ b/src/goabackend/goaobjectskeletonutils.c
@@ -131,3 +131,31 @@ goa_object_skeleton_attach_documents (GoaObjectSkeleton *object,
}
g_clear_object (&documents);
}
+
+void
+goa_object_skeleton_attach_chat (GoaObjectSkeleton *object,
+ gboolean chat_enabled)
+{
+#ifdef GOA_TELEPATHY_ENABLED
+ GoaChat *chat;
+
+ chat = goa_object_get_chat (GOA_OBJECT (object));
+ if (chat_enabled)
+ {
+ if (chat == NULL)
+ {
+ chat = goa_chat_skeleton_new ();
+ goa_object_skeleton_set_chat (object, chat);
+ }
+ }
+ else
+ {
+ if (chat != NULL)
+ goa_object_skeleton_set_chat (object, NULL);
+ }
+ g_clear_object (&chat);
+#else
+ g_debug("Compiled without Telepathy support, chat is disabled");
+ goa_object_skeleton_set_chat (object, NULL);
+#endif
+}
diff --git a/src/goabackend/goaobjectskeletonutils.h b/src/goabackend/goaobjectskeletonutils.h
index 6d42ef0..9f84bec 100644
--- a/src/goabackend/goaobjectskeletonutils.h
+++ b/src/goabackend/goaobjectskeletonutils.h
@@ -33,6 +33,9 @@ void goa_object_skeleton_attach_calendar (GoaObjectSkeleton *o
gboolean calendar_enabled,
gboolean accept_ssl_errors);
+void goa_object_skeleton_attach_chat (GoaObjectSkeleton *object,
+ gboolean chat_enabled);
+
void goa_object_skeleton_attach_contacts (GoaObjectSkeleton *object,
const gchar *uri,
gboolean contacts_enabled,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]