1 # -*- coding: utf-8 -*-
2 # Generated from the Telepathy spec
3 """ Copyright © 2005-2009 Collabora Limited
4 Copyright © 2005-2009 Nokia Corporation
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Lesser General Public
9 License as published by the Free Software Foundation; either
10 version 2.1 of the License, or (at your option) any later version.
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Lesser General Public License for more details.
17 You should have received a copy of the GNU Lesser General Public
18 License along with this library; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
26 class ChannelTypeRoomList(dbus.service.Interface):
28 A channel type for listing named channels available on the server. Once the
29 ListRooms method is called, it emits signals for rooms present on the
30 server, until you Close this
31 channel. In some cases, it may not be possible
32 to stop the deluge of information from the server. This channel should be
33 closed when the room information is no longer being displayed, so that the
34 room handles can be freed.
36 This channel type may be implemented as a singleton on some protocols, so
37 clients should be prepared for the eventuality that they are given a
38 channel that is already in the middle of listing channels. The
39 ListingRooms signal, or
40 GetListingRooms method, can be used to check
44 @dbus.service.method('org.freedesktop.Telepathy.Channel.Type.RoomList', in_signature='', out_signature='b')
45 def GetListingRooms(self):
47 Check to see if there is already a room list request in progress
51 raise NotImplementedError
53 @dbus.service.method('org.freedesktop.Telepathy.Channel.Type.RoomList', in_signature='', out_signature='')
56 Request the list of rooms from the server. The
57 ListingRooms (True) signal should be
58 emitted when this request is being processed,
59 GotRooms when any room information is
60 received, and ListingRooms (False) when
61 the request is complete.
64 raise NotImplementedError
66 @dbus.service.method('org.freedesktop.Telepathy.Channel.Type.RoomList', in_signature='', out_signature='')
67 def StopListing(self):
69 Stop the room listing if it's in progress, but don't close the channel.
70 The ListingRooms (False) signal should
71 be emitted when the listing stops.
74 raise NotImplementedError
76 @dbus.service.signal('org.freedesktop.Telepathy.Channel.Type.RoomList', signature='a(usa{sv})')
77 def GotRooms(self, Rooms):
79 Emitted when information about rooms on the server becomes available.
80 The array contains the room handle (as can be passed to the
82 method with HANDLE_TYPE_ROOM), the channel
83 type, and a dictionary containing further information about the
84 room as available. The following well-known keys and types are
85 recommended for use where appropriate:
89 The identifier of the room (as would be returned by
93 The human-readable name of the room if different from the handle
96 A description of the room's overall purpose
99 The current subject of conversation in the room
102 The number of members in the room
105 True if the room requires a password to enter
108 True if you cannot join the room, but must be invited
114 @dbus.service.signal('org.freedesktop.Telepathy.Channel.Type.RoomList', signature='b')
115 def ListingRooms(self, Listing):
117 Emitted to indicate whether or not room listing request is currently