2
<node name="/Client_Interface_Requests"
3
xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
4
<tp:copyright>Copyright © 2008-2009 Collabora Ltd.</tp:copyright>
5
<tp:copyright>Copyright © 2008-2009 Nokia Corporation</tp:copyright>
6
<tp:license xmlns="http://www.w3.org/1999/xhtml">
7
<p>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.</p>
12
<p>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.</p>
17
<p>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
23
<interface name="org.freedesktop.Telepathy.Client.Interface.Requests">
24
<tp:added version="0.17.26">(as a stable interface)</tp:added>
26
<tp:requires interface="org.freedesktop.Telepathy.Client"/>
27
<tp:requires interface="org.freedesktop.Telepathy.Client.Handler"/>
29
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
30
<p>This interface can be implemented by a Handler to be notified about
31
requests for channels that it is likely to be asked to handle.</p>
34
<method name="AddRequest" tp:name-for-bindings="Add_Request">
35
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
36
<p>Called by the ChannelDispatcher to indicate that channels have been
37
requested, and that if the request is successful, they will probably
38
be handled by this Handler. The ChannelDispatcher SHOULD only
39
call this method on one handler per request.</p>
42
<p>This allows the UI to start preparing to handle the channels
43
in advance (e.g. render a window with an "in progress" message),
44
improving perceived responsiveness.</p>
46
<p>The use of "probably" is because you can't necessarily tell from
47
a channel request which handler will handle particular channels.
48
A reasonable heuristic would be to match the request against the
50
namespace="org.freedesktop.Telepathy.Client.Handler">HandlerChannelFilter</tp:dbus-ref>,
51
and respect the preferred handler (if any).</p>
54
<p>If the request succeeds and is given to the expected Handler,
55
the Requests_Satisfied parameter to
57
namespace="org.freedesktop.Telepathy.Client.Handler">HandleChannels</tp:dbus-ref>
58
can be used to match the channel to a previous AddRequest call.</p>
61
<p>This lets the UI direct the channels to the window that it
65
<p>If the request fails, the expected handler is notified by the
66
channel dispatcher calling its
67
<tp:member-ref>RemoveRequest</tp:member-ref> method.</p>
70
<p>This lets the UI close the window or display the error.</p>
73
<p>The channel dispatcher SHOULD remember which handler was notified,
74
and if the channel request succeeds, it SHOULD dispatch the channels
75
to the expected handler, unless the channels do not match that
76
handler's <tp:dbus-ref
77
namespace="org.freedesktop.Telepathy.Client.Handler">HandlerChannelFilter</tp:dbus-ref>.
78
If the channels are not dispatched to the expected handler, the
79
handler that was expected is notified by the channel dispatcher
80
calling its <tp:member-ref>RemoveRequest</tp:member-ref> method
81
with the NotYours error.</p>
84
<p>Expected handling is for the UI to close the window it
85
previously opened.</p>
88
<p>Handlers SHOULD NOT return an error from this method; errors
89
returned from this method SHOULD NOT alter the channel dispatcher's
93
<p>Calls to this method are merely a notification.</p>
97
<arg name="Request" type="o" direction="in">
100
namespace="org.freedesktop.Telepathy">ChannelRequest</tp:dbus-ref>
101
object, which MUST have been returned by <tp:dbus-ref
102
namespace="org.freedesktop.Telepathy.ChannelDispatcher">CreateChannel</tp:dbus-ref>
104
namespace="org.freedesktop.Telepathy.ChannelDispatcher">EnsureChannel</tp:dbus-ref>
105
before this method is called.
108
See those methods for the rationale of this ordering.
113
<arg name="Properties" type="a{sv}"
114
tp:type="Qualified_Property_Value_Map" direction="in">
116
<p>Some of the properties of the ChannelRequest. To avoid race
117
conditions, this dictionary MUST NOT include properties whose
118
values could subsequently change. It SHOULD include as many
119
properties as possible, given that constraint.</p>
121
<p>In particular, the properties <tp:dbus-ref
122
namespace="org.freedesktop.Telepathy.ChannelRequest">Requests</tp:dbus-ref>
124
namespace="org.freedesktop.Telepathy.ChannelRequest">UserActionTime</tp:dbus-ref>
125
MUST be included.</p>
130
<method name="RemoveRequest"
131
tp:name-for-bindings="Remove_Request">
132
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
133
<p>Called by the ChannelDispatcher to indicate that a request
134
previously passed to <tp:member-ref>AddRequest</tp:member-ref>
135
has failed and should be disregarded.</p>
137
<p>Handlers SHOULD NOT return an error from this method; errors
138
returned from this method SHOULD NOT alter the channel dispatcher's
142
<p>Calls to this method are merely a notification.</p>
146
<arg name="Request" type="o" direction="in">
148
The request that failed.
152
<arg name="Error" type="s" tp:type="DBus_Error_Name" direction="in">
153
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
154
<p>The name of the D-Bus error with which the request failed.</p>
156
<p>If this is <code>org.freedesktop.Telepathy.Error.NotYours</code>,
157
this indicates that the request succeeded, but all the resulting
158
channels were given to some other handler.</p>
162
<arg name="Message" type="s" direction="in">
164
Any message supplied with the D-Bus error.
171
<!-- vim:set sw=2 sts=2 et ft=xml: -->