Imported Upstream version 0.21.6
Simon McVittie
13 years ago
0 | commit b3382a1a248308e957494a335c32c578b8fb8176 | |
1 | Author: Simon McVittie <simon.mcvittie@collabora.co.uk> | |
2 | Date: 2010-12-01 18:35:17 +0000 | |
3 | ||
4 | Prepare version 0.21.6 | |
5 | ||
6 | commit 3b47edcbe1c3b96742dff73098916e19eb3dae68 | |
7 | Merge: 87a0a62 d533cac | |
8 | Author: Simon McVittie <simon.mcvittie@collabora.co.uk> | |
9 | Date: 2010-12-01 18:19:43 +0000 | |
10 | ||
11 | Merge branch 'immortality' | |
12 | ||
13 | Reviewed-by: Will Thompson <will.thompson@collabora.co.uk> | |
14 | Bug: https://bugs.freedesktop.org/show_bug.cgi?id=23155 | |
15 | ||
16 | commit d533cac6fba7fad92cc2206a6cf621b9f43f0c42 | |
17 | Author: Simon McVittie <simon.mcvittie@collabora.co.uk> | |
18 | Date: 2010-12-01 16:53:04 +0000 | |
19 | ||
20 | Don't require ReleaseHandles to detect unheld handles | |
21 | ||
22 | commit af378e2bf94a6b1bdff7eb843c0ea7195f10f926 | |
23 | Author: Simon McVittie <simon.mcvittie@collabora.co.uk> | |
24 | Date: 2010-12-01 16:52:47 +0000 | |
25 | ||
26 | Linkify HasImmortalHandles in more places and improve wording | |
27 | ||
28 | commit 87a0a62c33a5c4e478ce8a576215c6b1a3050911 | |
29 | Merge: 97312ab 11e0a5e | |
30 | Author: Simon McVittie <simon.mcvittie@collabora.co.uk> | |
31 | Date: 2010-12-01 14:15:34 +0000 | |
32 | ||
33 | Merge branch 'sometimes-immutable' | |
34 | ||
35 | Reviewed-by: Will Thompson <will.thompson@collabora.co.uk> | |
36 | Bug: https://bugs.freedesktop.org/show_bug.cgi?id=32015 | |
37 | ||
38 | commit 11e0a5ecd8f9a67b84b753e0656aa6996569e6a5 | |
39 | Author: Simon McVittie <simon.mcvittie@collabora.co.uk> | |
40 | Date: 2010-12-01 14:15:19 +0000 | |
41 | ||
42 | add missing full stop | |
43 | ||
44 | commit a27850a38c5aa181dd7d17f3ec469263f624b114 | |
45 | Author: Simon McVittie <simon.mcvittie@collabora.co.uk> | |
46 | Date: 2010-12-01 13:33:54 +0000 | |
47 | ||
48 | Add support for properties being sometimes-immutable | |
49 | ||
50 | commit 97312aba741b118306e0570d33bb2aa7af417e8c | |
51 | Author: Danielle Madeley <danielle.madeley@collabora.co.uk> | |
52 | Date: 2010-12-01 15:35:44 +1100 | |
53 | ||
54 | Add a Base.get_anchor() method, to be used in HTML anchors. | |
55 | ||
56 | Update get_url() to use get_anchor(). | |
57 | ||
58 | This removes the duplicate construction of anchors, once in the templates | |
59 | and once in the get_url() method and move it into one place. This allows us | |
60 | to easily change the way anchors are constructed for a given type. | |
61 | ||
62 | The way anchors are constructed has been changed to include the type name | |
63 | at the beginning, i.e. Type-Name:Short_Name, to prevent potential namespace | |
64 | collisions between client interests and capability tokens. | |
65 | ||
66 | commit 234bf29796b899312b6ffe03c3c1666c90708689 | |
67 | Author: Danielle Madeley <danielle.madeley@collabora.co.uk> | |
68 | Date: 2010-12-01 15:34:34 +1100 | |
69 | ||
70 | Add test for client-interests | |
71 | ||
72 | commit cb0561f12948b909dfa7ca970da1972912e0a841 | |
73 | Author: Danielle Madeley <danielle.madeley@collabora.co.uk> | |
74 | Date: 2010-12-01 15:21:11 +1100 | |
75 | ||
76 | Make ClientInterest inherit from TokenBase, it's a token type | |
77 | ||
78 | Omit name attribute from tp:client-interest if the name is simply the | |
79 | interface name. | |
80 | ||
81 | commit 78c4a5dd6a2a9c33dee4debe82937c1d85c497a5 | |
82 | Author: Danielle Madeley <danielle.madeley@collabora.co.uk> | |
83 | Date: 2010-11-30 16:08:42 +1100 | |
84 | ||
85 | Add client-interest to Conn.I.MailNotification | |
86 | ||
87 | commit 775a4deccb75f89be7025a2840ecaa1c2364bb36 | |
88 | Author: Danielle Madeley <danielle.madeley@collabora.co.uk> | |
89 | Date: 2010-11-30 16:08:24 +1100 | |
90 | ||
91 | Add parser support for <tp:client-interest> | |
92 | ||
93 | commit b58d627911903c1aacd4e6fc15297989cedb6754 | |
94 | Author: Simon McVittie <simon.mcvittie@collabora.co.uk> | |
95 | Date: 2010-11-25 13:55:17 +0000 | |
96 | ||
97 | Nano version | |
98 | ||
0 | 99 | commit 5ef14f95d9922cd460d972254e153c2b84027651 |
1 | 100 | Author: Simon McVittie <simon.mcvittie@collabora.co.uk> |
2 | 101 | Date: 2010-11-25 13:51:46 +0000 |
381 | 480 | Date: 2010-11-15 17:22:38 +0000 |
382 | 481 | |
383 | 482 | Chan.I.SASLAuthentication: rename ExtraContext to SASLContext |
483 | ||
484 | commit 806b1f51ffcc32541c00838f2c48983dfb712e61 | |
485 | Author: Simon McVittie <simon.mcvittie@collabora.co.uk> | |
486 | Date: 2010-11-15 15:39:13 +0000 | |
487 | ||
488 | Add HasImmortalHandles | |
384 | 489 | |
385 | 490 | commit e7f7ef3cfedec53dc933d13684faa059fc3aa9af |
386 | 491 | Author: Simon McVittie <simon.mcvittie@collabora.co.uk> |
0 | 0 | This file contains the same edited highlights as the announcement emails. |
1 | 1 | For full details, see the ChangeLog in tarballs, or "git log" in Git |
2 | 2 | checkouts. |
3 | ||
4 | telepathy-spec 0.21.6 (2010-12-01) | |
5 | ================================== | |
6 | ||
7 | The "recent change in the nature of fish" release. | |
8 | ||
9 | Changes to stable API: | |
10 | ||
11 | • Handles are no longer expected to be reference-counted - instead, they | |
12 | persist as long as the Connection does. A new property HasImmortalHandles | |
13 | indicates whether this is the case. telepathy-glib 0.13.8 will implement | |
14 | these semantics automatically for most connection managers. (smcv) | |
15 | ||
16 | Tools changes: | |
17 | ||
18 | • add support for tp:immutable="sometimes" (smcv) | |
19 | ||
20 | • add support for <tp:client-interest/> (danni) | |
3 | 21 | |
4 | 22 | telepathy-spec 0.21.5 (2010-11-25) |
5 | 23 | ================================== |
41 | 41 | <h1>Errors</h1> |
42 | 42 | #for $error in $spec.sorted_errors |
43 | 43 | <div class="inset error"> |
44 | <a name="$error.name"></a> | |
44 | <a name="$error.get_anchor()"></a> | |
45 | 45 | <span class="permalink">(<a href="$error.get_url()">Permalink</a>)</span> |
46 | 46 | <h2> |
47 | 47 | $error.short_name |
39 | 39 | <h1>Generic Types</h1> |
40 | 40 | #for $type in $spec.generic_types |
41 | 41 | <div class="inset type"> |
42 | <a name="$type.name"></a> | |
42 | <a name="$type.get_anchor()"></a> | |
43 | 43 | <span class="permalink">$type.get_type_name() (<a href="$type.get_url()">Permalink</a>)</span> |
44 | 44 | <h2> |
45 | 45 | $type.short_name — $type.dbus_type |
12 | 12 | <a href="index.html">Interface Index</a> |
13 | 13 | (<a href="interfaces.html">Compact</a>) |
14 | 14 | | <a href="#summary">Summary</a> |
15 | #if $interface.client_interests: | <a href="#client-interests">Client Interests</a> | |
15 | 16 | #if $interface.docstring: | <a href="#description">Description</a> |
16 | 17 | #if $interface.methods: | <a href="#methods">Methods</a> |
17 | 18 | #if $interface.signals: | <a href="#signals">Signals</a> |
26 | 27 | #if $interface.methods or $interface.signals or $interface.properties or $interface.types or $interface.tpproperties |
27 | 28 | <div class="summary"> |
28 | 29 | <a name="summary"></a> |
30 | #if $interface.client_interests | |
31 | <h3>Client Interests</h3> | |
32 | <table class="summary"> | |
33 | #for $interest in $interface.client_interests | |
34 | <td><a href="$interest.get_url()">$interest.name</a></td> | |
35 | #end for | |
36 | </table> | |
37 | #end if | |
29 | 38 | #if $interface.methods |
30 | 39 | <h3>Methods</h3> |
31 | 40 | <table class="summary"> |
193 | 202 | $interface.get_docstring() |
194 | 203 | #end if |
195 | 204 | |
205 | #if $interface.client_interests | |
206 | <div class="outset client-interests client-interest"> | |
207 | <a name="client-interests"></a> | |
208 | <h1>Client Interests</h1> | |
209 | <div> | |
210 | Set using the | |
211 | <a href="Connection.html#org.freedesktop.Telepathy.Connection.AddClientInterest">AddClientInterest</a> and | |
212 | <a href="Connection.html#org.freedesktop.Telepathy.Connection.RemoveClientInterest">RemoveClientInterest</a> methods. | |
213 | </div> | |
214 | #for $interest in $interface.client_interests | |
215 | <div class="inset client-interest"> | |
216 | <a name="$interest.get_anchor()"></a> | |
217 | <span class="permalink">(<a href="$interest.get_url()">Permalink</a>)</span> | |
218 | <h2>$interest.name</h2> | |
219 | ||
220 | $interest.get_docstring() | |
221 | </div> | |
222 | #end for | |
223 | </div> | |
224 | #end if | |
225 | ||
196 | 226 | #if $interface.methods |
197 | 227 | <div class="outset methods method"> |
198 | 228 | <a name="methods"></a> |
199 | 229 | <h1>Methods</h1> |
200 | 230 | #for $method in $interface.methods |
201 | 231 | <div class="inset method"> |
202 | <a name="$method.name"></a> | |
232 | <a name="$method.get_anchor()"></a> | |
203 | 233 | <span class="permalink">(<a href="$method.get_url()">Permalink</a>)</span> |
204 | 234 | <h2>$method.short_name ($method.get_in_args()) → $method.get_out_args()</h2> |
205 | 235 | |
271 | 301 | <h1>Signals</h1> |
272 | 302 | #for $signal in $interface.signals |
273 | 303 | <div class="inset signal"> |
274 | <a name="$signal.name"></a> | |
304 | <a name="$signal.get_anchor()"></a> | |
275 | 305 | <span class="permalink">(<a href="$signal.get_url()">Permalink</a>)</span> |
276 | 306 | <h2>$signal.short_name ($signal.get_args())</h2> |
277 | 307 | |
314 | 344 | </div> |
315 | 345 | #for $property in $interface.properties |
316 | 346 | <div class="inset property"> |
317 | <a name="$property.name"></a> | |
347 | <a name="$property.get_anchor()"></a> | |
318 | 348 | <span class="permalink">(<a href="$property.get_url()">Permalink</a>)</span> |
319 | 349 | <h2> |
320 | 350 | $property.short_name — $property.dbus_type |
322 | 352 | </h2> |
323 | 353 | <div class="access">$property.get_access()</div> |
324 | 354 | |
325 | #if $property.immutable: | |
355 | #if $property.sometimes_immutable: | |
356 | <div class="annotation immutable">Depending on the protocol, this | |
357 | property may be <strong>immutable</strong> which means that it can never | |
358 | #if $interface.is_channel_related: | |
359 | change once the channel has been created. Immutable properties SHOULD | |
360 | appear in the channel detail list | |
361 | of <a href="Connection_Interface_Requests.html#org.freedesktop.Telepathy.Connection.Interface.Requests.NewChannels">NewChannels</a> | |
362 | signals. | |
363 | #else | |
364 | change. | |
365 | #end if | |
366 | </div> | |
367 | #elif $property.immutable: | |
326 | 368 | <div class="annotation immutable">This property is |
327 | 369 | <strong>immutable</strong> which means that it can never |
328 | 370 | #if $interface.is_channel_related: |
329 | 371 | change once the channel has been created. Immutable properties SHOULD |
330 | 372 | appear in the channel detail list |
331 | 373 | of <a href="Connection_Interface_Requests.html#org.freedesktop.Telepathy.Connection.Interface.Requests.NewChannels">NewChannels</a> |
332 | signals | |
374 | signals. | |
333 | 375 | #else |
334 | 376 | change. |
335 | 377 | #end if |
403 | 445 | </div> |
404 | 446 | #for $property in $interface.tpproperties |
405 | 447 | <div class="inset tpproperty"> |
406 | <a name="$property.name"></a> | |
448 | <a name="$property.get_anchor()"></a> | |
407 | 449 | <span class="permalink">(<a href="$property.get_url()">Permalink</a>)</span> |
408 | 450 | <h2> |
409 | 451 | $property.short_name — $property.dbus_type |
428 | 470 | </div> |
429 | 471 | #for $token in $interface.contact_attributes |
430 | 472 | <div class="inset contact-attribute"> |
431 | <a name="$token.name"></a> | |
473 | <a name="$token.get_anchor()"></a> | |
432 | 474 | <span class="permalink">(<a href="$token.get_url()">Permalink</a>)</span> |
433 | 475 | <h2> |
434 | 476 | $token.name — $token.dbus_type |
452 | 494 | </div> |
453 | 495 | #for $token in $interface.handler_capability_tokens |
454 | 496 | <div class="inset handler-capability-token"> |
455 | <a name="$token.name"></a> | |
497 | <a name="$token.get_anchor()"></a> | |
456 | 498 | <span class="permalink">(<a href="$token.get_url()">Permalink</a>)</span> |
457 | 499 | <h2> |
458 | 500 | $token.name |
475 | 517 | <h1>Types</h1> |
476 | 518 | #for $type in $interface.types |
477 | 519 | <div class="inset type"> |
478 | <a name="$type.name"></a> | |
520 | <a name="$type.get_anchor()"></a> | |
479 | 521 | <span class="permalink">$type.get_type_name() (<a href="$type.get_url()">Permalink</a>)</span> |
480 | 522 | <h2> |
481 | 523 | $type.short_name — $type.dbus_type |
117 | 117 | |
118 | 118 | div.handler-capability-token { |
119 | 119 | border: 1px solid #228822; |
120 | } | |
121 | ||
122 | div.client-interests { | |
123 | background-color: #729fcf; | |
124 | } | |
125 | ||
126 | div.client-interest { | |
127 | border: 1px solid #204a87; | |
120 | 128 | } |
121 | 129 | |
122 | 130 | div.types { |
221 | 221 | </method> |
222 | 222 | |
223 | 223 | <method name="HoldHandles" tp:name-for-bindings="Hold_Handles"> |
224 | <tp:changed version="0.21.6">If | |
225 | <tp:member-ref>HasImmortalHandles</tp:member-ref> is true, | |
226 | this method no longer does anything.</tp:changed> | |
224 | 227 | <arg direction="in" name="Handle_Type" type="u" tp:type="Handle_Type"> |
225 | 228 | <tp:docstring> |
226 | 229 | The type of handle to be held |
234 | 237 | </arg> |
235 | 238 | |
236 | 239 | <tp:docstring xmlns="http://www.w3.org/1999/xhtml"> |
237 | <p>Notify the connection manger that your client is holding a copy | |
240 | <p>If <tp:member-ref>HasImmortalHandles</tp:member-ref> is true, | |
241 | which SHOULD always be the case in this version of telepathy-spec, | |
242 | this method does nothing and returns successfully, unless | |
243 | the given handle type or any of the given handles is invalid.</p> | |
244 | ||
245 | <p>In older connection managers, this method | |
246 | notifies the connection manger that your client is holding a copy | |
238 | 247 | of handles which may not be in use in any existing channel or |
239 | 248 | list, and were not obtained by using the |
240 | 249 | <tp:member-ref>RequestHandles</tp:member-ref> method. For |
389 | 398 | </signal> |
390 | 399 | |
391 | 400 | <method name="ReleaseHandles" tp:name-for-bindings="Release_Handles"> |
401 | <tp:changed version="0.21.6">If | |
402 | <tp:member-ref>HasImmortalHandles</tp:member-ref> is true, | |
403 | this method no longer does anything.</tp:changed> | |
392 | 404 | <arg direction="in" name="Handle_Type" type="u" tp:type="Handle_Type"> |
393 | 405 | <tp:docstring> |
394 | 406 | An integer handle type (as defined in RequestHandle) |
402 | 414 | </arg> |
403 | 415 | |
404 | 416 | <tp:docstring> |
405 | Explicitly notify the connection manager that your client is no | |
417 | <p>If <tp:member-ref>HasImmortalHandles</tp:member-ref> is true, | |
418 | which SHOULD always be the case in this version of telepathy-spec, | |
419 | this method does nothing and returns successfully, unless | |
420 | the given handle type or any of the given handles is invalid.</p> | |
421 | ||
422 | <p>In older connection managers, this method | |
423 | explicitly notifies the connection manager that your client is no | |
406 | 424 | longer holding any references to the given handles, and that they |
407 | 425 | may be deallocated if they are not held by any other clients or |
408 | referenced by any existing channels. See HoldHandles for notes. | |
426 | referenced by any existing channels. See | |
427 | <tp:member-ref>HoldHandles</tp:member-ref> for notes.</p> | |
409 | 428 | </tp:docstring> |
410 | 429 | |
411 | 430 | <tp:possible-errors> |
418 | 437 | <tp:error name="org.freedesktop.Telepathy.Error.InvalidHandle"> |
419 | 438 | <tp:docstring> |
420 | 439 | One of the given handles is not valid |
421 | </tp:docstring> | |
422 | </tp:error> | |
423 | <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable"> | |
424 | <tp:docstring> | |
425 | One of the given handles is not held by this client | |
426 | 440 | </tp:docstring> |
427 | 441 | </tp:error> |
428 | 442 | </tp:possible-errors> |
621 | 635 | </tp:simple-type> |
622 | 636 | |
623 | 637 | <method name="RequestHandles" tp:name-for-bindings="Request_Handles"> |
638 | <tp:changed version="0.21.6">If | |
639 | <tp:member-ref>HasImmortalHandles</tp:member-ref> is true, | |
640 | this method no longer has its reference-counting effect.</tp:changed> | |
624 | 641 | <arg direction="in" name="Handle_Type" type="u" tp:type="Handle_Type"> |
625 | 642 | <tp:docstring> |
626 | 643 | The type of handle required |
640 | 657 | </tp:docstring> |
641 | 658 | </arg> |
642 | 659 | |
643 | <tp:docstring> | |
644 | Request several handles from the connection manager which represent a | |
645 | number of contacts, rooms or server-stored lists on the service. The | |
646 | connection manager should record that these handles are in use by the | |
660 | <tp:docstring xmlns="http://www.w3.org/1999/xhtml"> | |
661 | <p>Request several handles from the connection manager which represent a | |
662 | number of contacts, rooms or server-stored lists on the service.</p> | |
663 | ||
664 | <p>If <tp:member-ref>HasImmortalHandles</tp:member-ref> is true, | |
665 | which SHOULD always be the case in this version of telepathy-spec, | |
666 | the handles remain valid until the connection disconnects.</p> | |
667 | ||
668 | <p>The implementation of this method in older connection managers | |
669 | must record that these handles are in use by the | |
647 | 670 | client who invokes this method, and must not deallocate the handles |
648 | 671 | until the client disconnects from the bus or calls the |
649 | 672 | <tp:member-ref>ReleaseHandles</tp:member-ref> |
650 | 673 | method. Where the identifier refers to an entity that already has a |
651 | 674 | handle in this connection manager, this handle should be returned |
652 | 675 | instead. The handle number 0 must not be returned by the connection |
653 | manager. | |
676 | manager.</p> | |
654 | 677 | </tp:docstring> |
655 | 678 | |
656 | 679 | <tp:possible-errors> |
1167 | 1190 | </tp:docstring> |
1168 | 1191 | </arg> |
1169 | 1192 | </method> |
1193 | ||
1194 | <property name="HasImmortalHandles" | |
1195 | tp:name-for-bindings="Has_Immortal_Handles" | |
1196 | access="read" type="b"> | |
1197 | <tp:added version="0.21.6"/> | |
1198 | <tp:docstring xmlns="http://www.w3.org/1999/xhtml"> | |
1199 | <p>True if handles last for the whole lifetime of the Connection. | |
1200 | This SHOULD be the case in all connection managers, but clients | |
1201 | MUST interoperate with older connection managers | |
1202 | (which reference-count handles).</p> | |
1203 | </tp:docstring> | |
1204 | </property> | |
1170 | 1205 | |
1171 | 1206 | <tp:docstring xmlns="http://www.w3.org/1999/xhtml"> |
1172 | 1207 | <p>This models a connection to a single user account on a communication |
172 | 172 | |
173 | 173 | <arg direction="in" name="Hold" type="b"> |
174 | 174 | <tp:docstring xmlns="http://www.w3.org/1999/xhtml"> |
175 | <p>Whether to hold the handles on behalf of the calling process. | |
176 | Equivalent to the corresponding argument to <tp:dbus-ref | |
177 | namespace="org.freedesktop.Telepathy.Connection.Interface.Contacts" | |
178 | >GetContactAttributes</tp:dbus-ref>.</p> | |
175 | <p>If true, all handles that appear as keys in the result have been | |
176 | held on behalf of the calling process, as if by a call to | |
177 | <tp:dbus-ref namespace="ofdT">Connection.HoldHandles</tp:dbus-ref>. | |
178 | (If <tp:dbus-ref namespace="ofdT.Connection" | |
179 | >HasImmortalHandles</tp:dbus-ref> is true, which SHOULD be the | |
180 | case in all new connection managers, this has no effect.)</p> | |
179 | 181 | </tp:docstring> |
180 | 182 | </arg> |
181 | 183 |
151 | 151 | </arg> |
152 | 152 | |
153 | 153 | <arg direction="in" name="Hold" type="b"> |
154 | <tp:docstring> | |
155 | If true, all handles in the result have been held on behalf of the | |
156 | calling process, as if by a call to | |
157 | <tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection.HoldHandles</tp:dbus-ref>. | |
154 | <tp:docstring xmlns="http://www.w3.org/1999/xhtml"> | |
155 | <p>If true, all handles that appear as keys in the result have been | |
156 | held on behalf of the calling process, as if by a call to | |
157 | <tp:dbus-ref namespace="ofdT">Connection.HoldHandles</tp:dbus-ref>. | |
158 | (If <tp:dbus-ref namespace="ofdT.Connection" | |
159 | >HasImmortalHandles</tp:dbus-ref> is true, which SHOULD be the | |
160 | case in all new connection managers, this has no effect.)</p> | |
158 | 161 | |
159 | 162 | <tp:rationale> |
160 | For further round-trip avoidance. | |
163 | <p>For further round-trip avoidance.</p> | |
161 | 164 | </tp:rationale> |
162 | 165 | </tp:docstring> |
163 | 166 | </arg> |
21 | 21 | name="org.freedesktop.Telepathy.Connection.Interface.MailNotification"> |
22 | 22 | <tp:requires interface="org.freedesktop.Telepathy.Connection"/> |
23 | 23 | <tp:added version="0.21.3">(as stable API)</tp:added> |
24 | ||
25 | <tp:client-interest> | |
26 | <tp:docstring> | |
27 | A client MUST notify interest in this feature before it will be | |
28 | enabled. | |
29 | </tp:docstring> | |
30 | </tp:client-interest> | |
24 | 31 | |
25 | 32 | <tp:flags name="Mail_Notification_Flags" value-prefix="Mail_Notification_Flag" type="u" > |
26 | 33 | <tp:flag suffix="Supports_Unread_Mail_Count" value="1"> |
2 | 2 | xmlns:xi="http://www.w3.org/2001/XInclude"> |
3 | 3 | |
4 | 4 | <tp:title>Telepathy D-Bus Interface Specification</tp:title> |
5 | <tp:version>0.21.5</tp:version> | |
5 | <tp:version>0.21.6</tp:version> | |
6 | 6 | |
7 | 7 | <tp:copyright>Copyright © 2005-2010 Collabora Limited</tp:copyright> |
8 | 8 | <tp:copyright>Copyright © 2005-2010 Nokia Corporation</tp:copyright> |
17 | 17 | USA.</p> |
18 | 18 | </tp:license> |
19 | 19 | <interface name="org.freedesktop.Telepathy.SpecAutoGenTest"> |
20 | ||
21 | <tp:client-interest/> | |
22 | <tp:client-interest name="badgers"/> | |
20 | 23 | |
21 | 24 | <tp:struct name="UV" array-name="UV_List"> |
22 | 25 | <tp:member name="Uint" type="u"/> |
80 | 80 | [(u'LowBit', u'1'), (u'HighBit', u'128')] |
81 | 81 | |
82 | 82 | >>> sorted(spec.everything.items()) |
83 | [(u'org.freedesktop.Telepathy.SpecAutoGenTest', Interface(org.freedesktop.Telepathy.SpecAutoGenTest)), (u'org.freedesktop.Telepathy.SpecAutoGenTest.DoStuff', Method(org.freedesktop.Telepathy.SpecAutoGenTest.DoStuff)), (u'org.freedesktop.Telepathy.SpecAutoGenTest.Introspective', Property(org.freedesktop.Telepathy.SpecAutoGenTest.Introspective:b)), (u'org.freedesktop.Telepathy.SpecAutoGenTest.StuffHappened', Signal(org.freedesktop.Telepathy.SpecAutoGenTest.StuffHappened)), (u'org.freedesktop.Telepathy.SpecAutoGenTest.wobbly', AwkwardTelepathyProperty(org.freedesktop.Telepathy.SpecAutoGenTest.wobbly:b))] | |
83 | [(u'org.freedesktop.Telepathy.SpecAutoGenTest', ClientInterest(org.freedesktop.Telepathy.SpecAutoGenTest)), (u'org.freedesktop.Telepathy.SpecAutoGenTest.DoStuff', Method(org.freedesktop.Telepathy.SpecAutoGenTest.DoStuff)), (u'org.freedesktop.Telepathy.SpecAutoGenTest.Introspective', Property(org.freedesktop.Telepathy.SpecAutoGenTest.Introspective:b)), (u'org.freedesktop.Telepathy.SpecAutoGenTest.StuffHappened', Signal(org.freedesktop.Telepathy.SpecAutoGenTest.StuffHappened)), (u'org.freedesktop.Telepathy.SpecAutoGenTest.wobbly', AwkwardTelepathyProperty(org.freedesktop.Telepathy.SpecAutoGenTest.wobbly:b)), (u'org.freedesktop.Telepathy.SpecAutoGenTest/badgers', ClientInterest(org.freedesktop.Telepathy.SpecAutoGenTest/badgers))] | |
84 | ||
84 | 85 | |
85 | 86 | >>> map (lambda o: i.added, spec.everything.values ()) |
86 | [None, None, None, None, None] | |
87 | [None, None, None, None, None, None] | |
87 | 88 | >>> map (lambda o: i.deprecated, spec.everything.values ()) |
88 | [None, None, None, None, None] | |
89 | [None, None, None, None, None, None] | |
89 | 90 | """ |
90 | 91 | |
91 | 92 | if __name__ == '__main__': |
166 | 166 | def get_interface(self): |
167 | 167 | return self.parent.get_interface() |
168 | 168 | |
169 | def get_anchor(self): | |
170 | return "%s:%s" % ( | |
171 | self.get_type_name().replace(' ', '-'), | |
172 | self.short_name) | |
173 | ||
169 | 174 | def get_url(self): |
170 | return "%s#%s" % (self.get_interface().get_url(), self.name) | |
175 | return "%s#%s" % (self.get_interface().get_url(), self.get_anchor()) | |
171 | 176 | |
172 | 177 | def _get_generic_with_ver(self, nnode, htmlclass, txt): |
173 | 178 | if nnode is None: |
560 | 565 | |
561 | 566 | immutable = dom.getAttributeNS(XMLNS_TP, 'immutable') |
562 | 567 | self.immutable = immutable != '' |
568 | self.sometimes_immutable = immutable == 'sometimes' | |
563 | 569 | |
564 | 570 | requestable = dom.getAttributeNS(XMLNS_TP, 'requestable') |
565 | 571 | self.requestable = requestable != '' |
576 | 582 | def get_flag_summary(self): |
577 | 583 | descriptions = [] |
578 | 584 | |
579 | if self.immutable: | |
585 | if self.sometimes_immutable: | |
586 | descriptions.append("Sometimes immutable") | |
587 | elif self.immutable: | |
580 | 588 | descriptions.append("Immutable") |
581 | 589 | |
582 | 590 | if self.sometimes_requestable: |
698 | 706 | self.contact_attributes = build_list(self, ContactAttribute, self.name, |
699 | 707 | dom.getElementsByTagNameNS(XMLNS_TP, 'contact-attribute')) |
700 | 708 | |
709 | self.client_interests = build_list(self, ClientInterest, self.name, | |
710 | dom.getElementsByTagNameNS(XMLNS_TP, 'client-interest')) | |
711 | ||
701 | 712 | # build a list of types in this interface |
702 | 713 | self.types = parse_types(self, dom, self.name) |
703 | 714 | |
759 | 770 | (XMLNS_TP, 'handler-capability-token'), |
760 | 771 | (XMLNS_TP, 'hct'), |
761 | 772 | (XMLNS_TP, 'contact-attribute'), |
773 | (XMLNS_TP, 'client-interest'), | |
762 | 774 | (XMLNS_TP, 'simple-type'), |
763 | 775 | (XMLNS_TP, 'enum'), |
764 | 776 | (XMLNS_TP, 'flags'), |
787 | 799 | |
788 | 800 | class Error(Base): |
789 | 801 | def get_url(self): |
790 | return 'errors.html#%s' % self.name | |
802 | return 'errors.html#%s' % self.get_anchor() | |
791 | 803 | |
792 | 804 | def get_root_namespace(self): |
793 | 805 | return self.namespace |
864 | 876 | else: |
865 | 877 | html = 'generic-types.html' |
866 | 878 | |
867 | return '%s#%s' % (html, self.name) | |
879 | return '%s#%s' % (html, self.get_anchor()) | |
868 | 880 | |
869 | 881 | class SimpleType(DBusType): |
870 | 882 | def get_type_name(self): |
1042 | 1054 | |
1043 | 1055 | def __init__(self, parent, namespace, dom): |
1044 | 1056 | super(TokenBase, self).__init__(parent, namespace, dom) |
1045 | self.name = namespace + '/' + self.short_name | |
1057 | ||
1058 | items = [ namespace ] | |
1059 | ||
1060 | if self.short_name != '': | |
1061 | items.append (self.short_name) | |
1062 | ||
1063 | self.name = self.separator.join (items) | |
1046 | 1064 | |
1047 | 1065 | class ContactAttribute(TokenBase, Typed): |
1048 | 1066 | |
1060 | 1078 | is_family = dom.getAttribute('is-family') |
1061 | 1079 | assert is_family in ('yes', 'no', '') |
1062 | 1080 | self.is_family = (is_family == 'yes') |
1081 | ||
1082 | class ClientInterest(TokenBase): | |
1083 | ||
1084 | def __init__(self, parent, namespace, dom): | |
1085 | super(ClientInterest, self).__init__(parent, namespace, dom) | |
1086 | ||
1087 | self.short_name = self.name | |
1088 | ||
1089 | def get_type_name(self): | |
1090 | return 'Client Interest' | |
1091 | ||
1092 | def validate(self): | |
1093 | pass | |
1063 | 1094 | |
1064 | 1095 | class SectionBase(object): |
1065 | 1096 | """A SectionBase is an abstract base class for any type of node that can |
1152 | 1183 | for interface in self.interfaces: |
1153 | 1184 | self.everything[interface.name] = interface |
1154 | 1185 | |
1155 | for method in interface.methods: | |
1156 | self.everything[method.name] = method | |
1157 | for signal in interface.signals: | |
1158 | self.everything[signal.name] = signal | |
1159 | for property in interface.properties: | |
1160 | self.everything[property.name] = property | |
1161 | for property in interface.tpproperties: | |
1162 | self.everything[property.name] = property | |
1163 | for token in interface.contact_attributes: | |
1164 | self.everything[token.name] = token | |
1165 | for token in interface.handler_capability_tokens: | |
1166 | self.everything[token.name] = token | |
1186 | for things in [ 'methods', 'signals', 'properties', | |
1187 | 'tpproperties', 'contact_attributes', | |
1188 | 'handler_capability_tokens', | |
1189 | 'client_interests' ]: | |
1190 | for thing in getattr(interface, things): | |
1191 | self.everything[thing.name] = thing | |
1167 | 1192 | |
1168 | 1193 | for type in interface.types: |
1169 | 1194 | self.types[type.name] = type |