[telepathy-python/master] Implemented Channels D-Bus property in ConnectionInterfaceRequests.
Jonny Lamb
jonny.lamb at collabora.co.uk
Thu Jul 16 01:49:29 PDT 2009
Signed-off-by: Jonny Lamb <jonny.lamb at collabora.co.uk>
---
src/server/conn.py | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/src/server/conn.py b/src/server/conn.py
index 7accbf6..a6eee34 100644
--- a/src/server/conn.py
+++ b/src/server/conn.py
@@ -378,10 +378,20 @@ from telepathy._generated.Connection_Interface_Requests \
import ConnectionInterfaceRequests \
as _ConnectionInterfaceRequests
-class ConnectionInterfaceRequests(_ConnectionInterfaceRequests):
+class ConnectionInterfaceRequests(
+ _ConnectionInterfaceRequests,
+ DBusProperties):
def __init__(self):
_ConnectionInterfaceRequests.__init__(self)
+ DBusProperties.__init__(self)
+
+ self._implement_property_get(CONNECTION_INTERFACE_REQUESTS,
+ {'Channels': lambda: dbus.Array(self._get_channels(),
+ signature='(oa{sv})')})
+
+ def _get_channels(self):
+ return [(c._object_path, c.get_props()) for c in self._channels]
def _check_basic_properties(self, props):
# ChannelType must be present and must be a string.
--
1.5.6.5
More information about the telepathy-commits
mailing list