telepathy-haze: connection: claim to support MailNotification if supported

Guillaume Desmottes gdesmott at kemper.freedesktop.org
Wed Sep 18 04:10:36 PDT 2013


Module: telepathy-haze
Branch: master
Commit: adc09e9b0cadf015c399942a5c646e111a2c7aad
URL:    http://cgit.freedesktop.org/telepathy/telepathy-haze/commit/?id=adc09e9b0cadf015c399942a5c646e111a2c7aad

Author: Guillaume Desmottes <guillaume.desmottes at collabora.co.uk>
Date:   Tue Sep 17 14:43:26 2013 +0200

connection: claim to support MailNotification if supported

We never advertised that we support this Haze specific extension.

https://bugs.freedesktop.org/show_bug.cgi?id=69466

---

 src/connection.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/src/connection.c b/src/connection.c
index 6fd12d3..86828d7 100644
--- a/src/connection.c
+++ b/src/connection.c
@@ -167,6 +167,12 @@ protocol_info_supports_blocking (PurplePluginProtocolInfo *prpl_info)
     return (prpl_info->add_deny != NULL);
 }
 
+static gboolean
+protocol_info_supports_mail_notification (PurplePluginProtocolInfo *prpl_info)
+{
+    return ((prpl_info->options & OPT_PROTO_MAIL_CHECK) != 0);
+}
+
 static void
 connected_cb (PurpleConnection *pc)
 {
@@ -190,6 +196,14 @@ connected_cb (PurpleConnection *pc)
         tp_base_connection_add_interfaces (base_conn, blocking_ifaces);
     }
 
+    if (protocol_info_supports_mail_notification (prpl_info))
+    {
+        static const gchar *mail_ifaces[] = {
+            HAZE_IFACE_CONNECTION_INTERFACE_MAIL_NOTIFICATION,
+            NULL };
+        tp_base_connection_add_interfaces (base_conn, mail_ifaces);
+    }
+
     tp_base_contact_list_set_list_received (
         (TpBaseContactList *) conn->contact_list);
 



More information about the telepathy-commits mailing list