~ubuntu-branches/ubuntu/utopic/telepathy-python/utopic

« back to all changes in this revision

Viewing changes to spec/Client_Interface_Requests.xml

  • Committer: Bazaar Package Importer
  • Author(s): Laurent Bigonville
  • Date: 2009-06-16 11:23:44 UTC
  • mfrom: (1.1.14 upstream) (8.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090616112344-sslc71m4xns7uv8i
Tags: 0.15.8-1
* New upstream release.
* debian/control:
  - Change package priority to optional
  - Bump Standards-Version to 3.8.1 (no further changes)
  - Be more verbose in package extended description

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" ?>
 
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>
 
11
 
 
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>
 
16
 
 
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
 
20
      02110-1301, USA.</p>
 
21
  </tp:license>
 
22
 
 
23
  <interface name="org.freedesktop.Telepathy.Client.Interface.Requests">
 
24
    <tp:added version="0.17.26">(as a stable interface)</tp:added>
 
25
 
 
26
    <tp:requires interface="org.freedesktop.Telepathy.Client"/>
 
27
    <tp:requires interface="org.freedesktop.Telepathy.Client.Handler"/>
 
28
 
 
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>
 
32
    </tp:docstring>
 
33
 
 
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>
 
40
 
 
41
        <tp:rationale>
 
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>
 
45
 
 
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
 
49
            <tp:dbus-ref
 
50
              namespace="org.freedesktop.Telepathy.Client.Handler">HandlerChannelFilter</tp:dbus-ref>,
 
51
            and respect the preferred handler (if any).</p>
 
52
        </tp:rationale>
 
53
 
 
54
        <p>If the request succeeds and is given to the expected Handler,
 
55
          the Requests_Satisfied parameter to
 
56
          <tp:dbus-ref
 
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>
 
59
 
 
60
        <tp:rationale>
 
61
          <p>This lets the UI direct the channels to the window that it
 
62
            already opened.</p>
 
63
        </tp:rationale>
 
64
 
 
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>
 
68
 
 
69
        <tp:rationale>
 
70
          <p>This lets the UI close the window or display the error.</p>
 
71
        </tp:rationale>
 
72
 
 
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>
 
82
 
 
83
        <tp:rationale>
 
84
          <p>Expected handling is for the UI to close the window it
 
85
            previously opened.</p>
 
86
        </tp:rationale>
 
87
 
 
88
        <p>Handlers SHOULD NOT return an error from this method; errors
 
89
          returned from this method SHOULD NOT alter the channel dispatcher's
 
90
          behaviour.</p>
 
91
 
 
92
        <tp:rationale>
 
93
          <p>Calls to this method are merely a notification.</p>
 
94
        </tp:rationale>
 
95
      </tp:docstring>
 
96
 
 
97
      <arg name="Request" type="o" direction="in">
 
98
        <tp:docstring>
 
99
          The <tp:dbus-ref
 
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>
 
103
          or <tp:dbus-ref
 
104
            namespace="org.freedesktop.Telepathy.ChannelDispatcher">EnsureChannel</tp:dbus-ref>
 
105
          before this method is called.
 
106
 
 
107
          <tp:rationale>
 
108
            See those methods for the rationale of this ordering.
 
109
          </tp:rationale>
 
110
        </tp:docstring>
 
111
      </arg>
 
112
 
 
113
      <arg name="Properties" type="a{sv}"
 
114
        tp:type="Qualified_Property_Value_Map" direction="in">
 
115
        <tp:docstring>
 
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>
 
120
 
 
121
          <p>In particular, the properties <tp:dbus-ref
 
122
              namespace="org.freedesktop.Telepathy.ChannelRequest">Requests</tp:dbus-ref>
 
123
            and <tp:dbus-ref
 
124
              namespace="org.freedesktop.Telepathy.ChannelRequest">UserActionTime</tp:dbus-ref>
 
125
            MUST be included.</p>
 
126
        </tp:docstring>
 
127
      </arg>
 
128
    </method>
 
129
 
 
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>
 
136
 
 
137
        <p>Handlers SHOULD NOT return an error from this method; errors
 
138
          returned from this method SHOULD NOT alter the channel dispatcher's
 
139
          behaviour.</p>
 
140
 
 
141
        <tp:rationale>
 
142
          <p>Calls to this method are merely a notification.</p>
 
143
        </tp:rationale>
 
144
      </tp:docstring>
 
145
 
 
146
      <arg name="Request" type="o" direction="in">
 
147
        <tp:docstring>
 
148
          The request that failed.
 
149
        </tp:docstring>
 
150
      </arg>
 
151
 
 
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>
 
155
 
 
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>
 
159
        </tp:docstring>
 
160
      </arg>
 
161
 
 
162
      <arg name="Message" type="s" direction="in">
 
163
        <tp:docstring>
 
164
          Any message supplied with the D-Bus error.
 
165
        </tp:docstring>
 
166
      </arg>
 
167
    </method>
 
168
 
 
169
  </interface>
 
170
</node>
 
171
<!-- vim:set sw=2 sts=2 et ft=xml: -->