[telepathy-python/master] Changed ConnectionInterfaceRequests to expect a ChannelManager object.

Jonny Lamb jonny.lamb at collabora.co.uk
Thu Jul 16 01:49:30 PDT 2009


Signed-off-by: Jonny Lamb <jonny.lamb at collabora.co.uk>
---
 src/server/conn.py |   10 ++--------
 1 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/src/server/conn.py b/src/server/conn.py
index a75663e..cea8c1f 100644
--- a/src/server/conn.py
+++ b/src/server/conn.py
@@ -381,13 +381,10 @@ class ConnectionInterfaceRequests(
     _ConnectionInterfaceRequests,
     DBusProperties):
 
-    def __init__(self, requestable, make_channel):
+    def __init__(self):
         _ConnectionInterfaceRequests.__init__(self)
         DBusProperties.__init__(self)
 
-        self._requestable_channels = requestable
-        self._make_channel = make_channel
-
         self._implement_property_get(CONNECTION_INTERFACE_REQUESTS,
             {'Channels': lambda: dbus.Array(self._get_channels(),
                 signature='(oa{sv})')})
@@ -484,10 +481,7 @@ class ConnectionInterfaceRequests(
 
         props[CHANNEL_INTERFACE + '.Requested'] = True
 
-        if type not in self._requestable_channels:
-            raise NotImplemented('Unknown channel type "%s"' % type)
-
-        channel = self._make_channel(props)
+        channel = self._channel_manager.channel_for_props(props, signal=False)
 
         # TODO: This shouldn't return properties that can change.
         _success(channel._object_path, props)
-- 
1.5.6.5




More information about the telepathy-commits mailing list