[Pkg-telepathy-commits] [telepathy-mission-control-6] 09/280: service points: do not treat their handles as special

Simon McVittie smcv at debian.org
Thu Mar 27 20:06:59 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 6883eb824d0f11e704b8d3edb31da464b29546bd
Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date:   Mon Sep 9 19:41:19 2013 +0100

    service points: do not treat their handles as special
    
    Requesting channels by TargetHandle seems rather perverse when we've
    gone to some length to ensure that identifiers are always at least
    as available, and in particular, if the user of a Telepathy-based
    phone or something types 911 into a keypad, the request is going
    to be TargetID-based. telepathy-spec 1.0 should specify this.
    
    https://bugs.freedesktop.org/show_bug.cgi?id=69176
    Reviewed-by: Guillaume Desmottes <guillaume.desmottes at collabora.co.uk>
---
 src/mcd-connection-service-points.c                | 35 ----------------------
 .../dispatcher/create-delayed-by-mini-plugin.py    | 20 -------------
 2 files changed, 55 deletions(-)

diff --git a/src/mcd-connection-service-points.c b/src/mcd-connection-service-points.c
index 58b65f1..896f4bc 100644
--- a/src/mcd-connection-service-points.c
+++ b/src/mcd-connection-service-points.c
@@ -31,25 +31,6 @@
 #include <telepathy-glib/telepathy-glib-dbus.h>
 
 static void
-service_point_contact_cb (GObject *source,
-    GAsyncResult *result,
-    gpointer user_data)
-{
-  McdConnection *connection = MCD_CONNECTION (user_data);
-  TpContact *contact = tp_connection_dup_contact_by_id_finish (
-      TP_CONNECTION (source), result, NULL);
-
-  if (contact != NULL)
-    {
-      mcd_connection_add_emergency_handle (connection,
-          tp_contact_get_handle (contact));
-      g_object_unref (contact);
-    }
-
-  g_object_unref (connection);
-}
-
-static void
 parse_services_list (McdConnection *connection,
     const GPtrArray *services)
 {
@@ -76,22 +57,6 @@ parse_services_list (McdConnection *connection,
 
   if (e_numbers != NULL)
     {
-      GSList *service;
-      TpConnection *tp_conn = mcd_connection_get_tp_connection (connection);
-
-      /* FIXME: in 1.0, drop this and spec that when calling a service point,
-       * you should use TargetID. See
-       * https://bugs.freedesktop.org/show_bug.cgi?id=59162#c3 */
-      for (service = e_numbers; service != NULL; service =g_slist_next (service))
-        {
-          const gchar * const *iter;
-
-          for (iter = service->data; iter != NULL && *iter != NULL; iter++)
-            tp_connection_dup_contact_by_id_async (tp_conn,
-                *iter, 0, NULL, service_point_contact_cb,
-                g_object_ref (connection));
-        }
-
       _mcd_connection_take_emergency_numbers (connection, e_numbers);
     }
 }
diff --git a/tests/twisted/dispatcher/create-delayed-by-mini-plugin.py b/tests/twisted/dispatcher/create-delayed-by-mini-plugin.py
index 8c2925c..1c7c926 100644
--- a/tests/twisted/dispatcher/create-delayed-by-mini-plugin.py
+++ b/tests/twisted/dispatcher/create-delayed-by-mini-plugin.py
@@ -55,13 +55,6 @@ def test(q, bus, mc):
 
     q.dbus_return(e.message, points, signature='v')
 
-    # MC looks up the handles for these numbers
-    patterns = [EventPattern('dbus-method-call', path=conn.object_path,
-            interface=cs.CONN, method='RequestHandles',
-            args=[cs.HT_CONTACT, [num]],
-            handled=True) for num in e_numbers]
-    q.expect_many(*patterns)
-
     # the service points change
     e_numbers = ['911', '112', '999']
     points = dbus.Array([((cs.SERVICE_POINT_TYPE_EMERGENCY, 'urn:service:sos'),
@@ -69,13 +62,6 @@ def test(q, bus, mc):
     q.dbus_emit(conn.object_path, cs.CONN_IFACE_SERVICE_POINT,
                 'ServicePointsChanged', points, signature='a((us)as)')
 
-    # MC looks up the new handles
-    patterns = [EventPattern('dbus-method-call', path=conn.object_path,
-            interface=cs.CONN, method='RequestHandles',
-            args=[cs.HT_CONTACT, [num]],
-            handled=True) for num in e_numbers]
-    q.expect_many(*patterns)
-
     # MC used to critical if more than one emergency service point was
     # given by the CM. That's silly, so let's test it.
     e_numbers1 = ['911']
@@ -89,12 +75,6 @@ def test(q, bus, mc):
 
     e_numbers = e_numbers1 + e_numbers2
 
-    patterns = [EventPattern('dbus-method-call', path=conn.object_path,
-            interface=cs.CONN, method='RequestHandles',
-            args=[cs.HT_CONTACT, [num]],
-            handled=True) for num in e_numbers]
-    q.expect_many(*patterns)
-
     fixed_properties = dbus.Dictionary({
         cs.CHANNEL + '.TargetHandleType': cs.HT_CONTACT,
         cs.CHANNEL + '.ChannelType': DELAYED_CTYPE,

-- 
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