[telepathy-mission-control/master] SimulatedConnection: optionally switch off the reply to GetInterfaces
Simon McVittie
simon.mcvittie at collabora.co.uk
Fri Apr 3 09:24:35 PDT 2009
This lets us delay a connection becoming ready (at least in current
telepathy-glib - it's a bit fragile).
---
test/twisted/mctest.py | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/test/twisted/mctest.py b/test/twisted/mctest.py
index 9a0a6a8..df7405c 100644
--- a/test/twisted/mctest.py
+++ b/test/twisted/mctest.py
@@ -134,7 +134,8 @@ class SimulatedConnection(object):
self._identifiers[(type, self._last_handle)] = identifier
return self._last_handle
- def __init__(self, q, bus, cmname, protocol, account_part, self_ident):
+ def __init__(self, q, bus, cmname, protocol, account_part, self_ident,
+ implement_get_interfaces=True):
self.q = q
self.bus = bus
@@ -161,9 +162,12 @@ class SimulatedConnection(object):
interface=cs.CONN, method='GetSelfHandle')
q.add_dbus_method_impl(self.GetStatus,
path=self.object_path, interface=cs.CONN, method='GetStatus')
- q.add_dbus_method_impl(self.GetInterfaces,
- path=self.object_path, interface=cs.CONN,
- method='GetInterfaces')
+
+ if implement_get_interfaces:
+ q.add_dbus_method_impl(self.GetInterfaces,
+ path=self.object_path, interface=cs.CONN,
+ method='GetInterfaces')
+
q.add_dbus_method_impl(self.InspectHandles,
path=self.object_path, interface=cs.CONN,
method='InspectHandles')
--
1.5.6.5
More information about the telepathy-commits
mailing list