Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2008-07-04 11:36:24 (GMT)
committer Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>2008-07-04 11:36:24 (GMT)
commit0d95f58e96079152f1206dca55cb82160138deeb (patch)
treef7458a87d82542b72f741ee00359459cb4a23ee2
parentf6b139691fcdc46b363b910e7ac549dfc40d012e (diff)
move ListChannels directly to the D-Bus method
-rw-r--r--src/activity.py27
1 files changed, 12 insertions, 15 deletions
diff --git a/src/activity.py b/src/activity.py
index ae37011..12f3ac2 100644
--- a/src/activity.py
+++ b/src/activity.py
@@ -602,7 +602,18 @@ class Activity(ExportedGObject):
- an integer handle representing the contact, room or
list this channel communicates with, or zero
"""
- return self.list_channels()
+ conn = self._tp.get_connection()
+ # XXX add other channels as necessary
+ channels = []
+ if self._text_channel is not None:
+ channels.append((self._text_channel.object_path,
+ CHANNEL_TYPE_TEXT, HANDLE_TYPE_ROOM, self._room))
+
+ if self._tubes_channel is not None:
+ channels.append((self._tubes_channel.object_path,
+ CHANNEL_TYPE_TUBES, HANDLE_TYPE_ROOM, self._room))
+
+ return (str(conn.service_name), conn.object_path, channels)
@dbus.service.method(_ACTIVITY_INTERFACE,
in_signature='a{sv}', out_signature='')
@@ -1039,20 +1050,6 @@ class Activity(ExportedGObject):
channels.append(self._tubes_channel.object_path)
return (str(conn.service_name), conn.object_path, channels)
- def list_channels(self):
- conn = self._tp.get_connection()
- # XXX add other channels as necessary
- channels = []
- if self._text_channel is not None:
- channels.append((self._text_channel.object_path,
- CHANNEL_TYPE_TEXT, HANDLE_TYPE_ROOM, self._room))
-
- if self._tubes_channel is not None:
- channels.append((self._tubes_channel.object_path,
- CHANNEL_TYPE_TUBES, HANDLE_TYPE_ROOM, self._room))
-
- return (str(conn.service_name), conn.object_path, channels)
-
def leave(self, async_cb, async_err_cb):
"""Local method for the local user to leave the shared activity.