[Pkg-telepathy-commits] [telepathy-mission-control-6] 139/280: the Requests interface no longer needs to appear in Interfaces

Simon McVittie smcv at debian.org
Thu Mar 27 20:07:15 UTC 2014


This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to branch debian
in repository telepathy-mission-control-6.

commit 735ae9dd9bda230d45c47943992cc7fc8f2e8154
Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date:   Wed Jan 8 15:59:02 2014 +0000

    the Requests interface no longer needs to appear in Interfaces
    
    It's only a separate interface so its signals won't wake everything up.
    
    Bug: https://bugs.freedesktop.org/show_bug.cgi?id=50093
    Reviewed-by: Guillaume Desmottes <guillaume.desmottes at collabora.co.uk>
---
 src/mcd-connection.c    | 51 ++-----------------------------------------------
 tests/twisted/mctest.py |  1 -
 2 files changed, 2 insertions(+), 50 deletions(-)

diff --git a/src/mcd-connection.c b/src/mcd-connection.c
index 91bd098..e5a6dd6 100644
--- a/src/mcd-connection.c
+++ b/src/mcd-connection.c
@@ -1065,28 +1065,6 @@ on_connection_ready (GObject *source_object, GAsyncResult *result,
     if (!connection)
         goto finally;
 
-    if (!tp_proxy_has_interface_by_id (tp_conn,
-            TP_IFACE_QUARK_CONNECTION_INTERFACE_REQUESTS))
-    {
-        GHashTable *asv;
-
-        DEBUG ("%s: connection manager is too old",
-               tp_proxy_get_object_path (tp_conn));
-        connection->priv->abort_reason =
-            TP_CONNECTION_STATUS_REASON_NONE_SPECIFIED;
-        asv = tp_asv_new (
-            "debug-message", G_TYPE_STRING,
-                "Connection manager does not implement Requests interface",
-            NULL);
-        g_signal_emit (connection, signals[CONNECTION_STATUS_CHANGED], 0,
-            TP_CONNECTION_STATUS_DISCONNECTED,
-            connection->priv->abort_reason,
-            tp_conn, TP_ERROR_STR_SOFTWARE_UPGRADE_REQUIRED, asv);
-        g_hash_table_unref (asv);
-        _mcd_connection_release_tp_connection (connection, NULL, TRUE);
-        goto finally;
-    }
-
     DEBUG ("connection is ready");
     priv = MCD_CONNECTION_PRIV (connection);
 
@@ -1134,8 +1112,6 @@ _mcd_connection_start_dispatching (McdConnection *self,
 
     self->priv->dispatching_started = TRUE;
 
-    g_return_if_fail (tp_proxy_has_interface_by_id (self->priv->tp_conn,
-        TP_IFACE_QUARK_CONNECTION_INTERFACE_REQUESTS));
     mcd_connection_setup_requests (self);
 
     /* FIXME: why is this here? if we need to update caps before and after   *
@@ -1170,11 +1146,7 @@ mcd_connection_done_task_before_connect (McdConnection *self)
             DEBUG ("TpConnection went away, not doing anything");
         }
 
-        if (tp_proxy_has_interface_by_id (self->priv->tp_conn,
-                TP_IFACE_QUARK_CONNECTION_INTERFACE_REQUESTS))
-        {
-            _mcd_dispatcher_add_connection (self->priv->dispatcher, self);
-        }
+        _mcd_dispatcher_add_connection (self->priv->dispatcher, self);
 
         DEBUG ("%s: Calling Connect()",
                tp_proxy_get_object_path (self->priv->tp_conn));
@@ -1298,12 +1270,6 @@ mcd_connection_early_get_interfaces_cb (TpProxy *proxy,
                  * we can't usefully pre-load capabilities - we'll be told
                  * the real capabilities as soon as it has worked them out */
             }
-            else if (q == TP_IFACE_QUARK_CONNECTION_INTERFACE_REQUESTS)
-            {
-              /* If we have the Requests iface, we could start dispatching
-               * before the connection is in CONNECTED state */
-              tp_proxy_add_interface_by_id ((TpProxy *) tp_conn, q);
-            }
         }
     }
     else
@@ -1805,20 +1771,7 @@ _mcd_connection_request_channel (McdConnection *connection,
         return TRUE;
     }
 
-    if (tp_proxy_has_interface_by_id (priv->tp_conn,
-            TP_IFACE_QUARK_CONNECTION_INTERFACE_REQUESTS))
-    {
-        ret = request_channel_new_iface (connection, channel);
-    }
-    else
-    {
-        mcd_channel_take_error (channel,
-                                g_error_new (TP_ERROR,
-                                             TP_ERROR_NOT_IMPLEMENTED,
-                                             "No Requests interface"));
-        mcd_mission_abort ((McdMission *) channel);
-        return TRUE;
-    }
+    ret = request_channel_new_iface (connection, channel);
 
     if (ret)
         _mcd_channel_set_status (channel, MCD_CHANNEL_STATUS_REQUESTED);
diff --git a/tests/twisted/mctest.py b/tests/twisted/mctest.py
index 6dfc3e1..0be39f5 100644
--- a/tests/twisted/mctest.py
+++ b/tests/twisted/mctest.py
@@ -256,7 +256,6 @@ class SimulatedConnection(object):
 
         self.interfaces = []
         self.interfaces.append(cs.CONN_IFACE_CONTACTS)
-        self.interfaces.append(cs.CONN_IFACE_REQUESTS)
 
         if self.has_aliasing:
             self.interfaces.append(cs.CONN_IFACE_ALIASING)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-telepathy/telepathy-mission-control-6.git



More information about the Pkg-telepathy-commits mailing list