From 0d95f58e96079152f1206dca55cb82160138deeb Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Fri, 04 Jul 2008 11:36:24 +0000 Subject: move ListChannels directly to the D-Bus method --- 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. -- cgit v0.9.1