~ubuntu-branches/ubuntu/wily/telepathy-glib/wily

« back to all changes in this revision

Viewing changes to spec/Connection_Interface_Requests.xml

  • Committer: Bazaar Package Importer
  • Author(s): Simon McVittie
  • Date: 2009-03-24 22:06:52 UTC
  • mfrom: (1.3.1 upstream) (17.1.10 sid)
  • Revision ID: james.westby@ubuntu.com-20090324220652-c8dvom0nsqomp23d
Tags: 0.7.28-1
* New upstream version (ABI, API added)
* Put the -dbg package in section debug, as per recent archive changes
* Remove obsolete Conflicts/Replaces with libtelepathy-glib-static-dev, which
  was never in a stable release (and probably never in Debian at all)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" ?>
 
2
<node name="/Connection_Interface_Requests"
 
3
  xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0"
 
4
  >
 
5
  <tp:copyright>Copyright (C) 2008 Collabora Limited</tp:copyright>
 
6
  <tp:copyright>Copyright (C) 2008 Nokia Corporation</tp:copyright>
 
7
  <tp:license xmlns="http://www.w3.org/1999/xhtml">
 
8
    <p>This library is free software; you can redistribute it and/or
 
9
      modify it under the terms of the GNU Lesser General Public
 
10
      License as published by the Free Software Foundation; either
 
11
      version 2.1 of the License, or (at your option) any later version.</p>
 
12
 
 
13
    <p>This library is distributed in the hope that it will be useful,
 
14
      but WITHOUT ANY WARRANTY; without even the implied warranty of
 
15
      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
16
      Lesser General Public License for more details.</p>
 
17
 
 
18
    <p>You should have received a copy of the GNU Lesser General Public
 
19
      License along with this library; if not, write to the Free Software
 
20
      Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
 
21
      USA.</p>
 
22
  </tp:license>
 
23
 
 
24
  <interface name="org.freedesktop.Telepathy.Connection.Interface.Requests">
 
25
    <tp:requires interface="org.freedesktop.Telepathy.Connection"/>
 
26
    <tp:added version="0.17.11">(as stable API)</tp:added>
 
27
 
 
28
    <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
 
29
      <p>An enhanced version of the Telepathy connection interface, which can
 
30
        represent bundles of channels that should be dispatched together, and
 
31
        does not assume any particular properties by which channels are
 
32
        uniquely identifiable.</p>
 
33
    </tp:docstring>
 
34
 
 
35
    <tp:struct name="Channel_Details" array-name="Channel_Details_List">
 
36
      <tp:added version="0.17.11">(as stable API)</tp:added>
 
37
 
 
38
      <tp:docstring>
 
39
        Enough details of a channel that clients can work out how to dispatch
 
40
        or handle it.
 
41
      </tp:docstring>
 
42
 
 
43
      <tp:member name="Channel" type="o">
 
44
        <tp:docstring>
 
45
          The object path of the channel.
 
46
        </tp:docstring>
 
47
      </tp:member>
 
48
 
 
49
      <tp:member name="Properties" type="a{sv}"
 
50
        tp:type="Qualified_Property_Value_Map">
 
51
        <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
 
52
          <p>Properties of the channel.</p>
 
53
 
 
54
          <p>Connection managers MUST NOT include properties in this mapping
 
55
            if their values can change. Clients MUST ignore properties
 
56
            that appear in this mapping if their values can change.</p>
 
57
 
 
58
          <tp:rationale>
 
59
            <p>If properties that could change were included, the following
 
60
              race condition would be likely to exist in some cases:</p>
 
61
 
 
62
            <ul>
 
63
              <li>NewChannels or Get("Channels") includes a property P with
 
64
                value V1</li>
 
65
              <li>Client creates a proxy object for the channel</li>
 
66
              <li>The value of P changes to V2</li>
 
67
              <li>Client connects to PChanged signal</li>
 
68
              <li>Client should call Get("P") or GetAll here, to avoid the
 
69
                race, but client's author has forgotten to do so</li>
 
70
              <li>Proxy object thinks P == V1, but actually P == V2</li>
 
71
            </ul>
 
72
 
 
73
            <p>We've taken the opportunity to make the API encourage the
 
74
              client author to get it right. Where possible, we intend that
 
75
              properties whose value will be used in channel dispatching
 
76
              or other "early" processing will be defined so that they are
 
77
              immutable (can never change).</p>
 
78
          </tp:rationale>
 
79
 
 
80
          <p>Each dictionary MUST contain the keys
 
81
            <tp:dbus-ref>org.freedesktop.Telepathy.Channel.ChannelType</tp:dbus-ref>,
 
82
            <tp:dbus-ref>org.freedesktop.Telepathy.Channel.TargetHandleType</tp:dbus-ref>,
 
83
            <tp:dbus-ref>org.freedesktop.Telepathy.Channel.TargetHandle</tp:dbus-ref>,
 
84
            <tp:dbus-ref>org.freedesktop.Telepathy.Channel.TargetID</tp:dbus-ref>
 
85
            and
 
86
            <tp:dbus-ref>org.freedesktop.Telepathy.Channel.Requested</tp:dbus-ref>.
 
87
          </p>
 
88
 
 
89
          <tp:rationale>
 
90
            <p>We expect these to be crucial to the channel-dispatching
 
91
              process.</p>
 
92
          </tp:rationale>
 
93
        </tp:docstring>
 
94
      </tp:member>
 
95
    </tp:struct>
 
96
 
 
97
    <method name="CreateChannel" tp:name-for-bindings="Create_Channel">
 
98
      <tp:added version="0.17.11">(as stable API)</tp:added>
 
99
      <tp:changed version="0.17.14">It is now guaranteed that
 
100
        CreateChannel returns the channel before NewChannels announces it
 
101
        (the reverse was previously guaranteed).</tp:changed>
 
102
 
 
103
      <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
 
104
        <p>Request that an entirely new channel is created.</p>
 
105
 
 
106
        <tp:rationale>
 
107
          <p>There is deliberately no flag corresponding to the
 
108
            suppress_handler argument to
 
109
            <tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection.RequestChannel</tp:dbus-ref>,
 
110
            because passing a FALSE value for that argument is deprecated.
 
111
            Requests made using this interface always behave as though
 
112
            suppress_handler was TRUE.</p>
 
113
        </tp:rationale>
 
114
 
 
115
      </tp:docstring>
 
116
 
 
117
      <arg direction="in" name="Request" type="a{sv}"
 
118
        tp:type="Qualified_Property_Value_Map">
 
119
        <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
 
120
          <p>A dictionary containing desirable properties, which MUST include
 
121
            <tp:dbus-ref
 
122
              namespace="org.freedesktop.Telepathy.Channel">ChannelType</tp:dbus-ref>.
 
123
            Some properties
 
124
            are defined such that only an exact match makes sense, and
 
125
            connection managers MUST NOT satisfy a request with a channel
 
126
            where that property does not match; some properties are defined
 
127
            such that the connection manager MAY treat the request as merely
 
128
            a hint, and make a best-effort attempt to satisfy it. This is
 
129
            documented separately for each property.</p>
 
130
 
 
131
          <p>If this dictionary contains a property whose semantics
 
132
            are not known to the connection manager, this method MUST fail
 
133
            without side-effects (in particular it must not create a new
 
134
            channel).</p>
 
135
 
 
136
          <tp:rationale>
 
137
            <p>This is necessary if we want to be able to invent properties
 
138
              in future that, when used in a request, are hard requirements
 
139
              rather than just hints. A connection manager that did not know
 
140
              the semantics of those properties could incorrectly return a
 
141
              new channel that did not satisfy the requirements.</p>
 
142
          </tp:rationale>
 
143
 
 
144
          <p>The connection manager MUST NOT respond successfully,
 
145
            and SHOULD NOT create a new channel or cause any other
 
146
            side-effects, unless it can create a new channel that satisfies
 
147
            the client's requirements.</p>
 
148
 
 
149
          <p>Properties that will be set by this argument need not have write
 
150
            access after the channel has been created - indeed, it is
 
151
            expected that most will be read-only.</p>
 
152
        </tp:docstring>
 
153
      </arg>
 
154
 
 
155
      <arg name="Channel" direction="out" type="o">
 
156
        <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
 
157
          <p>The Channel object, which MUST NOT be signalled with
 
158
            <tp:member-ref>NewChannels</tp:member-ref> until after this method
 
159
            returns.</p>
 
160
 
 
161
          <tp:rationale>
 
162
            <p>This allows the requester to alter its handling of
 
163
              NewChannels by knowing whether one of the channels satisfied
 
164
              a request it made.</p>
 
165
          </tp:rationale>
 
166
        </tp:docstring>
 
167
      </arg>
 
168
 
 
169
      <arg name="Properties" direction="out" type="a{sv}"
 
170
        tp:type="Qualified_Property_Value_Map">
 
171
        <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
 
172
          <p>Properties of the channel that was produced, equivalent to
 
173
            the properties in <tp:type>Channel_Details</tp:type>.
 
174
            Connection managers MUST NOT include properties here whose
 
175
            values can change, for the same reasons as in
 
176
            <tp:type>Channel_Details</tp:type>.</p>
 
177
        </tp:docstring>
 
178
      </arg>
 
179
 
 
180
      <tp:possible-errors>
 
181
        <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
 
182
        <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
 
183
        <tp:error name="org.freedesktop.Telepathy.Error.NotImplemented">
 
184
          <tp:docstring>
 
185
            The channel request was one that can never succeed,
 
186
            such as requesting an unsupported channel type, or requesting
 
187
            a channel type which this connection manager does not support with
 
188
            the given target handle type.
 
189
          </tp:docstring>
 
190
        </tp:error>
 
191
        <tp:error name="org.freedesktop.Telepathy.Error.InvalidHandle">
 
192
          <tp:docstring>
 
193
            An invalid handle was requested as the value of a property whose
 
194
            value is a handle (like
 
195
            <tp:dbus-ref namespace="org.freedesktop.Telepathy">Channel.TargetHandle</tp:dbus-ref>),
 
196
            or a syntactically invalid identifier was requested as the value
 
197
            of a property whose value is the string corresponding to a handle
 
198
            (like <tp:dbus-ref
 
199
            namespace="org.freedesktop.Telepathy">Channel.TargetID</tp:dbus-ref>).
 
200
          </tp:docstring>
 
201
        </tp:error>
 
202
        <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
 
203
          <tp:docstring>
 
204
            The request matched the fixed properties of a
 
205
            <tp:type>Requestable_Channel_Class</tp:type> in
 
206
            <tp:member-ref>RequestableChannelClasses</tp:member-ref>, but the
 
207
            allowed arguments did not make sense; for example, a <tp:dbus-ref
 
208
              namespace="org.freedesktop.Telepathy.Channel.Type">RoomList</tp:dbus-ref>
 
209
            was requested, but the <tp:dbus-ref
 
210
              namespace="org.freedesktop.Telepathy.Channel.Type.RoomList">Server</tp:dbus-ref>
 
211
            property provided was not a valid DNS name.
 
212
          </tp:docstring>
 
213
        </tp:error>
 
214
        <tp:error name="org.freedesktop.Telepathy.Error.NotCapable">
 
215
          <tp:docstring>
 
216
            The requested channel cannot be created because the requested
 
217
            contact is using a client that lacks a particular feature.
 
218
          </tp:docstring>
 
219
        </tp:error>
 
220
        <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
 
221
          <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
 
222
            <p>The requested channel cannot be created, but in
 
223
              principle, a similar request might succeed in future.
 
224
              For instance, this might be because:</p>
 
225
 
 
226
            <ul>
 
227
              <li>a channel matching the request already exists and the
 
228
                protocol requires that only one such channel can exist at a
 
229
                time</li>
 
230
              <li>a channel matching the request has already been requested
 
231
                (by a previous call to CreateChannel,
 
232
                <tp:member-ref>EnsureChannel</tp:member-ref>,
 
233
                <tp:dbus-ref
 
234
                  namespace="org.freedesktop.Telepathy">Connection.RequestChannel</tp:dbus-ref>
 
235
                or similar) and the protocol requires that only one such
 
236
                channel can exist at a time</li>
 
237
            </ul>
 
238
          </tp:docstring>
 
239
        </tp:error>
 
240
        <tp:error name="org.freedesktop.Telepathy.Error.Channel.Banned"/>
 
241
        <tp:error name="org.freedesktop.Telepathy.Error.Channel.Full"/>
 
242
        <tp:error name="org.freedesktop.Telepathy.Error.Channel.InviteOnly"/>
 
243
      </tp:possible-errors>
 
244
    </method>
 
245
 
 
246
    <method name="EnsureChannel" tp:name-for-bindings="Ensure_Channel">
 
247
      <tp:added version="0.17.12"/>
 
248
      <tp:changed version="0.17.14">It is now guaranteed that if
 
249
        the channel was created by this call to EnsureChannel, it's returned
 
250
        before NewChannels announces it (the reverse was previously
 
251
        guaranteed).</tp:changed>
 
252
 
 
253
      <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
 
254
        <p>Request that channels are ensured to exist.</p>
 
255
 
 
256
        <tp:rationale>
 
257
          <p>The connection manager is in the best position to determine which
 
258
            existing channels could satisfy which requests.</p>
 
259
        </tp:rationale>
 
260
 
 
261
      </tp:docstring>
 
262
 
 
263
      <arg direction="in" name="Request" type="a{sv}"
 
264
        tp:type="Qualified_Property_Value_Map">
 
265
        <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
 
266
          <p>A dictionary containing desirable properties, with the same
 
267
            semantics as the corresponding parameter to
 
268
            <tp:member-ref>CreateChannel</tp:member-ref>.</p>
 
269
        </tp:docstring>
 
270
      </arg>
 
271
 
 
272
      <arg name="Yours" direction="out" type="b">
 
273
        <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
 
274
          <p>If false, the caller of EnsureChannel MUST assume that some
 
275
            other process is handling this channel; if true, the caller of
 
276
            EnsureChannel SHOULD handle it themselves or delegate it to another
 
277
            client.</p>
 
278
 
 
279
          <p>If the creation of a channel makes several calls to EnsureChannel
 
280
            (and no other requests) successful, exactly one of those calls MUST
 
281
            return a true value for this argument.</p>
 
282
 
 
283
          <p>If the creation of a channel makes other requests successful,
 
284
            the value returned for this argument MUST be such that exactly
 
285
            one of the clients making requests ends up responsible for the
 
286
            channel. In particular, if
 
287
            <tp:member-ref>CreateChannel</tp:member-ref> returns a channel
 
288
            <em>C</em>, any EnsureChannel calls that also return <em>C</em>
 
289
            MUST return a false value for this argument.</p>
 
290
        </tp:docstring>
 
291
      </arg>
 
292
 
 
293
      <arg name="Channel" direction="out" type="o">
 
294
        <tp:docstring>
 
295
          The Channel object. If it was created as a result of this method
 
296
          call, it MUST NOT be signalled by
 
297
          <tp:member-ref>NewChannels</tp:member-ref> until after this method
 
298
          returns.
 
299
 
 
300
          <tp:rationale>
 
301
            <p>This allows the requester to alter its handling of
 
302
              NewChannels by knowing whether one of the channels satisfied
 
303
              a request it made.</p>
 
304
          </tp:rationale>
 
305
        </tp:docstring>
 
306
      </arg>
 
307
 
 
308
      <arg name="Properties" direction="out" type="a{sv}"
 
309
        tp:type="Qualified_Property_Value_Map">
 
310
        <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
 
311
          <p>Properties of the channel that was produced, equivalent to
 
312
            the properties in <tp:type>Channel_Details</tp:type>.
 
313
            Connection managers MUST NOT include properties here whose
 
314
            values can change, for the same reasons as in
 
315
            <tp:type>Channel_Details</tp:type>.</p>
 
316
        </tp:docstring>
 
317
      </arg>
 
318
 
 
319
      <tp:possible-errors>
 
320
        <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
 
321
        <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
 
322
        <tp:error name="org.freedesktop.Telepathy.Error.NotImplemented">
 
323
          <tp:docstring>
 
324
            The channel request was one that can never succeed,
 
325
            such as requesting an unsupported channel type, or requesting
 
326
            a channel type which this connection manager does not support with
 
327
            the given target handle type.
 
328
          </tp:docstring>
 
329
        </tp:error>
 
330
        <tp:error name="org.freedesktop.Telepathy.Error.InvalidHandle">
 
331
          <tp:docstring>
 
332
            An invalid handle was requested as the value of a property whose
 
333
            value is a handle (like
 
334
            <tp:dbus-ref namespace="org.freedesktop.Telepathy">Channel.TargetHandle</tp:dbus-ref>),
 
335
            or a syntactically invalid identifier was requested as the value
 
336
            of a property whose value is the string corresponding to a handle
 
337
            (like <tp:dbus-ref
 
338
            namespace="org.freedesktop.Telepathy">Channel.TargetID</tp:dbus-ref>).
 
339
          </tp:docstring>
 
340
        </tp:error>
 
341
        <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
 
342
          <tp:docstring>
 
343
            The request matched the fixed properties of a
 
344
            <tp:type>Requestable_Channel_Class</tp:type> in
 
345
            <tp:member-ref>RequestableChannelClasses</tp:member-ref>, but the
 
346
            allowed arguments did not make sense; for example, a <tp:dbus-ref
 
347
              namespace="org.freedesktop.Telepathy.Channel.Type">RoomList</tp:dbus-ref>
 
348
            was requested, but the <tp:dbus-ref
 
349
              namespace="org.freedesktop.Telepathy.Channel.Type.RoomList">Server</tp:dbus-ref>
 
350
            property provided was not a valid DNS name.
 
351
          </tp:docstring>
 
352
        </tp:error>
 
353
        <tp:error name="org.freedesktop.Telepathy.Error.NotCapable">
 
354
          <tp:docstring>
 
355
            The requested channel cannot be created because the requested
 
356
            contact is using a client that lacks a particular feature.
 
357
          </tp:docstring>
 
358
        </tp:error>
 
359
        <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
 
360
          <tp:docstring>
 
361
            The requested channel cannot be created, but in
 
362
            principle, a similar request might succeed in future.
 
363
          </tp:docstring>
 
364
        </tp:error>
 
365
        <tp:error name="org.freedesktop.Telepathy.Error.Channel.Banned"/>
 
366
        <tp:error name="org.freedesktop.Telepathy.Error.Channel.Full"/>
 
367
        <tp:error name="org.freedesktop.Telepathy.Error.Channel.InviteOnly"/>
 
368
      </tp:possible-errors>
 
369
    </method>
 
370
 
 
371
    <signal name="NewChannels" tp:name-for-bindings="New_Channels">
 
372
      <tp:added version="0.17.11">(as stable API)</tp:added>
 
373
      <tp:changed version="0.17.14">Added a guarantee of ordering
 
374
        relative to NewChannel</tp:changed>
 
375
 
 
376
      <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
 
377
        <p>New channels have been created. The connection manager SHOULD emit
 
378
          a single signal for any group of closely related channels that are
 
379
          created at the same time, so that the channel dispatcher can try to
 
380
          dispatch them to a handler as a unit.</p>
 
381
 
 
382
        <p>In particular, if additional channels are created as a side-effect
 
383
          of a call to <tp:member-ref>CreateChannel</tp:member-ref>,
 
384
          these channels SHOULD appear in the same NewChannels signal as
 
385
          the channel that satisfies the request.</p>
 
386
 
 
387
        <tp:rationale>
 
388
          <p>Joining a MUC Tube in XMPP requires joining the corresponding
 
389
            MUC (chatroom), so a <tp:dbus-ref
 
390
              namespace="org.freedesktop.Telepathy.Channel.Type">Text</tp:dbus-ref>
 
391
            channel can be created as a side-effect.</p>
 
392
        </tp:rationale>
 
393
 
 
394
        <p>Every time NewChannels is emitted, it MUST be followed by
 
395
          a <tp:dbus-ref
 
396
            namespace="org.freedesktop.Telepathy">Connection.NewChannel</tp:dbus-ref>
 
397
          signal for each channel.</p>
 
398
 
 
399
        <tp:rationale>
 
400
          <p>The double signal emission is for the benefit of older Telepathy
 
401
            clients, which won't be listening for NewChannels.</p>
 
402
 
 
403
          <p>The more informative NewChannels signal comes first so that
 
404
            clients that did not examine the connection to find
 
405
            out whether Requests is supported will see the more informative
 
406
            signal for each channel first, and then ignore the less
 
407
            informative signal because it announces a new channel of which
 
408
            they are already aware.</p>
 
409
        </tp:rationale>
 
410
      </tp:docstring>
 
411
 
 
412
      <arg name="Channels" type="a(oa{sv})" tp:type="Channel_Details[]">
 
413
        <tp:docstring>
 
414
          The channels and their details. All channels that are signalled
 
415
          together like this MUST have the same
 
416
          <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel.FUTURE">Bundle</tp:dbus-ref>
 
417
          property, which may
 
418
          either refer to an existing bundle, or establish a new bundle.
 
419
        </tp:docstring>
 
420
      </arg>
 
421
    </signal>
 
422
 
 
423
    <property name="Channels" tp:name-for-bindings="Channels"
 
424
      type="a(oa{sv})" access="read" tp:type="Channel_Details[]">
 
425
      <tp:added version="0.17.11">(as stable API)</tp:added>
 
426
      <tp:docstring>
 
427
        A list of all the channels which currently exist on this connection.
 
428
        Change notification is via the
 
429
        <tp:member-ref>NewChannels</tp:member-ref> and
 
430
        <tp:member-ref>ChannelClosed</tp:member-ref> signals.
 
431
      </tp:docstring>
 
432
    </property>
 
433
 
 
434
    <signal name="ChannelClosed" tp:name-for-bindings="Channel_Closed">
 
435
      <tp:added version="0.17.11">(as stable API)</tp:added>
 
436
      <tp:docstring>
 
437
        Emitted when a channel is closed and hence disappears from the
 
438
        <tp:member-ref>Channels</tp:member-ref> property.
 
439
 
 
440
        <tp:rationale>
 
441
          This is redundant with the <tp:dbus-ref
 
442
            namespace="org.freedesktop.Telepathy.Channel">Closed</tp:dbus-ref>
 
443
          signal on the channel itself, but it does provide full change
 
444
          notification for the Channels property.
 
445
        </tp:rationale>
 
446
      </tp:docstring>
 
447
 
 
448
      <arg name="Removed" type="o">
 
449
        <tp:docstring>
 
450
          The channel which has been removed from the Channels property
 
451
        </tp:docstring>
 
452
      </arg>
 
453
    </signal>
 
454
 
 
455
    <tp:mapping name="Channel_Class" array-name="Channel_Class_List">
 
456
      <tp:added version="0.17.11">(as stable API)</tp:added>
 
457
      <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
 
458
        <p>Mapping representing a class of channels that can be requested
 
459
          from a connection manager, can be handled by a user interface,
 
460
          are supported by a contact, etc.</p>
 
461
 
 
462
        <p>Classes of channel are identified by the fixed values of
 
463
          a subset of their properties.</p>
 
464
 
 
465
        <p>Channel classes SHOULD always include the keys
 
466
          <tp:dbus-ref>org.freedesktop.Telepathy.Channel.ChannelType</tp:dbus-ref>
 
467
          and
 
468
          <tp:dbus-ref>org.freedesktop.Telepathy.Channel.TargetHandleType</tp:dbus-ref>.
 
469
          </p>
 
470
      </tp:docstring>
 
471
 
 
472
      <tp:member type="s" name="Key" tp:type="DBus_Qualified_Member">
 
473
        <tp:docstring>
 
474
          A D-Bus interface name, followed by a dot and a D-Bus property name.
 
475
        </tp:docstring>
 
476
      </tp:member>
 
477
 
 
478
      <tp:member type="v" name="Value">
 
479
        <tp:docstring>
 
480
          The value of the property.
 
481
        </tp:docstring>
 
482
      </tp:member>
 
483
    </tp:mapping>
 
484
 
 
485
    <tp:struct name="Requestable_Channel_Class"
 
486
      array-name="Requestable_Channel_Class_List">
 
487
      <tp:added version="0.17.11">(as stable API)</tp:added>
 
488
      <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
 
489
        <p>Structure representing a class of channels that can be requested,
 
490
          identified by a set of properties that identify that class of
 
491
          channel.</p>
 
492
 
 
493
        <tp:rationale>
 
494
          <p>This will often just be the channel type and the handle type,
 
495
            but can include other properties of the channel - for instance,
 
496
            encrypted channels might require properties that
 
497
            unencrypted channels do not, like an encryption key.</p>
 
498
        </tp:rationale>
 
499
 
 
500
        <p>In some cases, these classes of channel may overlap, in the sense
 
501
          that one class fixes all the properties that another class does,
 
502
          plus some more properties.</p>
 
503
 
 
504
        <tp:rationale>
 
505
          <p>For older clients to still be able to understand how to request
 
506
            channels in the presence of a hypothetical "encryption" interface,
 
507
            we'd need to represent it like this:</p>
 
508
 
 
509
          <ul>
 
510
            <li>class 1: ChannelType = Text, TargetHandleType = CONTACT</li>
 
511
            <li>class 2: Channel.ChannelType = Text,
 
512
              Channel.TargetHandleType = CONTACT,
 
513
              Encryption.Encrypted = TRUE</li>
 
514
          </ul>
 
515
        </tp:rationale>
 
516
      </tp:docstring>
 
517
 
 
518
      <tp:member name="Fixed_Properties" type="a{sv}"
 
519
        tp:type="Channel_Class">
 
520
        <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
 
521
          <p>The property values that identify this requestable channel class.
 
522
            These properties MUST be included in requests for a channel of this
 
523
            class, and MUST take these values.</p>
 
524
 
 
525
          <p>Clients that do not understand the semantics of all the
 
526
            Fixed_Properties MUST NOT request channels of this class, since
 
527
            they would be unable to avoid making an incorrect request.</p>
 
528
 
 
529
          <p>This implies that connection managers wishing to make channels
 
530
            available to old or minimal clients SHOULD have a channel class
 
531
            with the minimum number of Fixed_Properties, and MAY additionally
 
532
            have channel classes with extra Fixed_Properties.</p>
 
533
        </tp:docstring>
 
534
      </tp:member>
 
535
 
 
536
      <tp:member name="Allowed_Properties" type="as"
 
537
        tp:type="DBus_Qualified_Member[]">
 
538
        <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
 
539
          <p>Properties that MAY be set when requesting a channel of this
 
540
            channel type and handle type.</p>
 
541
 
 
542
          <p>This array MUST NOT include properties that are in the
 
543
            Fixed_Properties mapping.</p>
 
544
 
 
545
          <p>Properties in this array may either be required or optional,
 
546
            according to their documented semantics.</p>
 
547
 
 
548
          <tp:rationale>
 
549
            <p>For instance, if
 
550
              TargetHandleType takes a value that is not Handle_Type_None,
 
551
              one or the other of TargetHandle and TargetID is required.
 
552
              Clients are expected to understand the documented relationship
 
553
              between the properties, so we do not have separate arrays
 
554
              of required and optional properties.</p>
 
555
          </tp:rationale>
 
556
 
 
557
          <p>If this array contains the
 
558
            <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel.FUTURE">Bundle</tp:dbus-ref>
 
559
            property, then this class of channel can be combined with other
 
560
            channels with that property in a request, or added to an existing
 
561
            bundle. If not, this signifies that the connection manager is
 
562
            unable to mark channels of this class as part of a bundle - this
 
563
            means that to the remote contact they are likely to be
 
564
            indistinguishable from channels requested separately.</p>
 
565
        </tp:docstring>
 
566
      </tp:member>
 
567
    </tp:struct>
 
568
 
 
569
    <property name="RequestableChannelClasses" access="read"
 
570
      type="a(a{sv}as)" tp:type="Requestable_Channel_Class[]"
 
571
      tp:name-for-bindings="Requestable_Channel_Classes">
 
572
      <tp:added version="0.17.11">(as stable API)</tp:added>
 
573
      <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
 
574
        <p>The classes of channel that are expected to be available on this
 
575
          connection, i.e. those for which
 
576
          <tp:member-ref>CreateChannel</tp:member-ref> can reasonably
 
577
          be expected to succeed. User interfaces can use this information
 
578
          to show or hide UI components.</p>
 
579
 
 
580
        <p>This property cannot change after the connection has gone to
 
581
          state Connection_Status_Connected, so there is no change
 
582
          notification (if the connection has context-dependent capabilities,
 
583
          it SHOULD advertise support for all classes of channel that it might
 
584
          support during its lifetime). Before this state has been reached,
 
585
          the value of this property is undefined.</p>
 
586
 
 
587
        <tp:rationale>
 
588
          <p>This is not on an optional interface, because connection
 
589
            managers can always offer some sort of clue about the channel
 
590
            classes they expect to support (at worst, they can announce
 
591
            support for everything for which they have code).</p>
 
592
        </tp:rationale>
 
593
      </tp:docstring>
 
594
    </property>
 
595
 
 
596
  </interface>
 
597
</node>
 
598
<!-- vim:set sw=2 sts=2 et ft=xml: -->