1 # -*- coding: utf-8 -*-
2 # Generated from the Telepathy spec
3 """Copyright (C) 2008 Collabora Limited
4 Copyright (C) 2008 Nokia Corporation
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
16 You should have received a copy of the GNU Lesser General Public
17 License along with this library; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
26 class ConnectionInterfaceRequests(dbus.service.Interface):
28 An enhanced version of the Telepathy connection interface, which can
29 represent bundles of channels that should be dispatched together, and
30 does not assume any particular properties by which channels are
31 uniquely identifiable.
33 If this interface is implemented on a connection, then
34 NewChannels MUST be emitted for
35 all new channels, even those created with RequestChannel.
39 self._interfaces.add('org.freedesktop.Telepathy.Connection.Interface.Requests')
41 @dbus.service.method('org.freedesktop.Telepathy.Connection.Interface.Requests', in_signature='a{sv}', out_signature='oa{sv}')
42 def CreateChannel(self, Request):
44 Request that an entirely new channel is created.
47 There is deliberately no flag corresponding to the
48 suppress_handler argument to
49 Connection.RequestChannel,
50 because passing a FALSE value for that argument is deprecated.
51 Requests made using this interface always behave as though
52 suppress_handler was TRUE.
57 raise NotImplementedError
59 @dbus.service.method('org.freedesktop.Telepathy.Connection.Interface.Requests', in_signature='a{sv}', out_signature='boa{sv}')
60 def EnsureChannel(self, Request):
62 Request that channels are ensured to exist.
65 The connection manager is in the best position to determine which
66 existing channels could satisfy which requests.
71 raise NotImplementedError
73 @dbus.service.signal('org.freedesktop.Telepathy.Connection.Interface.Requests', signature='a(oa{sv})')
74 def NewChannels(self, Channels):
76 New channels have been created. The connection manager SHOULD emit
77 a single signal for any group of closely related channels that are
78 created at the same time, so that the channel dispatcher can try to
79 dispatch them to a handler as a unit.
81 In particular, if additional channels are created as a side-effect
82 of a call to CreateChannel,
83 these channels SHOULD appear in the same NewChannels signal as
84 the channel that satisfies the request.
87 Joining a MUC Tube in XMPP requires joining the corresponding
88 MUC (chatroom), so a Text
89 channel can be created as a side-effect.
92 Every time NewChannels is emitted, it MUST be followed by
93 a Connection.NewChannel
94 signal for each channel.
97 The double signal emission is for the benefit of older Telepathy
98 clients, which won't be listening for NewChannels.
100 The more informative NewChannels signal comes first so that
101 clients that did not examine the connection to find
102 out whether Requests is supported will see the more informative
103 signal for each channel first, and then ignore the less
104 informative signal because it announces a new channel of which
105 they are already aware.
111 @dbus.service.signal('org.freedesktop.Telepathy.Connection.Interface.Requests', signature='o')
112 def ChannelClosed(self, Removed):
114 Emitted when a channel is closed and hence disappears from the
118 This is redundant with the Closed
119 signal on the channel itself, but it does provide full change
120 notification for the Channels property.