1 # -*- coding: utf-8 -*-
2 # Generated from the Telepathy spec
3 """Copyright © 2008-2009 Collabora Ltd.
4 Copyright © 2008-2009 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,
26 class ChannelRequest(dbus.service.Object):
28 A channel request is an object in the ChannelDispatcher representing
29 an ongoing request for some channels to be created or found. There
30 can be any number of ChannelRequest objects at the same time.
32 Its well-known bus name is the same as that of the ChannelDispatcher,
33 "org.freedesktop.Telepathy.ChannelDispatcher".
37 ChannelDispatcher.CreateChannel
38 for rationale for ChannelRequest being a separate object.
41 A channel request can be cancelled by any client (not just the one
42 that requested it). This means that the ChannelDispatcher will
44 the resulting channel, or refrain from requesting it at all, rather
45 than dispatching it to a handler.
48 @dbus.service.method('org.freedesktop.Telepathy.ChannelRequest', in_signature='', out_signature='')
51 Proceed with the channel request.
54 The client that created this object calls this method
55 when it has connected signal handlers for
60 Clients other than the client which created the ChannelRequest
61 MUST NOT call this method.
63 This method SHOULD return immediately; on success, the request
64 might still fail, but this will be indicated asynchronously
67 Proceed cannot fail, unless clients have got the life-cycle
68 of a ChannelRequest seriously wrong (e.g. a client calls this
69 method twice, or a client that did not create the ChannelRequest
70 calls this method). If it fails, clients SHOULD assume that the
71 whole ChannelRequest has become useless.
74 raise NotImplementedError
76 @dbus.service.method('org.freedesktop.Telepathy.ChannelRequest', in_signature='', out_signature='')
79 Cancel the channel request. The precise effect depends on the
80 current progress of the request.
82 If the connection manager has not already been asked to create
83 a channel, then Failed is emitted
84 immediately, and the channel request is removed.
86 If the connection manager has already been asked to create a
87 channel but has not produced one yet (e.g. if Connection.Interface.Requests.CreateChannel
88 has been called, but has not yet returned), then the
89 ChannelDispatcher will remember that the request has been cancelled.
90 When the channel appears, it will be closed (if it was newly
91 created and can be closed), and will not be dispatched to a
94 If the connection manager has already returned a channel, but the
95 channel has not yet been dispatched to a handler
96 then the channel dispatcher will not dispatch that
97 channel to a handler. If the channel was newly created for this
98 request, the channel dispatcher will close it with Close;
99 otherwise, the channel dispatcher will ignore it. In either case,
100 Failed will be emitted when processing
103 If Failed is emitted in response to
104 this method, the error SHOULD be
105 org.freedesktop.Telepathy.Error.Cancelled.
107 If the channel has already been dispatched to a handler, then
108 it's too late to call this method, and the channel request will
112 raise NotImplementedError
114 @dbus.service.signal('org.freedesktop.Telepathy.ChannelRequest', signature='ss')
115 def Failed(self, Error, Message):
117 The channel request has failed. It is no longer present,
118 and further methods must not be called on it.
123 @dbus.service.signal('org.freedesktop.Telepathy.ChannelRequest', signature='')
126 The channel request has succeeded. It is no longer present,
127 and further methods must not be called on it.