Codebase list telepathy-spec / 9f19419
Imported Upstream version 0.16.0 Simon McVittie 15 years ago
55 changed file(s) with 8041 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 Daniel d'Andrada T. de Carvalho <daniel.carvalho@indt.org.br>
1 Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
2 Julien Gilli <jgilli@acm.org>
3 Dafydd Harries <dafydd.harries@collabora.co.uk>
4 Tobias Hunger <tobias.hunger@basyskom.de>
5 Andre Magalhaes <andrunko@gmail.com>
6 Robert McQueen <robert.mcqueen@collabora.co.uk>
7 Simon McVittie <simon.mcvittie@collabora.co.uk>
8 Mads Chr. Olesen <shiyee@gmail.com>
9 Senko Rasic <senko.rasic@collabora.co.uk>
10 Ole Andre Vadla Ravnaas <ole.andre.ravnaas@collabora.co.uk>
11 Olli Salli <olli.salli@collabora.co.uk>
12 Sjoerd Simons <sjoerd@luon.net>
13 Raphael Slinckx <raphael@slinckx.net>
14 Rob Taylor <rob.taylor@codethink.co.uk>
0
1 GNU LESSER GENERAL PUBLIC LICENSE
2 Version 2.1, February 1999
3
4 Copyright (C) 1991, 1999 Free Software Foundation, Inc.
5 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
6 Everyone is permitted to copy and distribute verbatim copies
7 of this license document, but changing it is not allowed.
8
9 [This is the first released version of the Lesser GPL. It also counts
10 as the successor of the GNU Library Public License, version 2, hence
11 the version number 2.1.]
12
13 Preamble
14
15 The licenses for most software are designed to take away your
16 freedom to share and change it. By contrast, the GNU General Public
17 Licenses are intended to guarantee your freedom to share and change
18 free software--to make sure the software is free for all its users.
19
20 This license, the Lesser General Public License, applies to some
21 specially designated software packages--typically libraries--of the
22 Free Software Foundation and other authors who decide to use it. You
23 can use it too, but we suggest you first think carefully about whether
24 this license or the ordinary General Public License is the better
25 strategy to use in any particular case, based on the explanations
26 below.
27
28 When we speak of free software, we are referring to freedom of use,
29 not price. Our General Public Licenses are designed to make sure that
30 you have the freedom to distribute copies of free software (and charge
31 for this service if you wish); that you receive source code or can get
32 it if you want it; that you can change the software and use pieces of
33 it in new free programs; and that you are informed that you can do
34 these things.
35
36 To protect your rights, we need to make restrictions that forbid
37 distributors to deny you these rights or to ask you to surrender these
38 rights. These restrictions translate to certain responsibilities for
39 you if you distribute copies of the library or if you modify it.
40
41 For example, if you distribute copies of the library, whether gratis
42 or for a fee, you must give the recipients all the rights that we gave
43 you. You must make sure that they, too, receive or can get the source
44 code. If you link other code with the library, you must provide
45 complete object files to the recipients, so that they can relink them
46 with the library after making changes to the library and recompiling
47 it. And you must show them these terms so they know their rights.
48
49 We protect your rights with a two-step method: (1) we copyright the
50 library, and (2) we offer you this license, which gives you legal
51 permission to copy, distribute and/or modify the library.
52
53 To protect each distributor, we want to make it very clear that
54 there is no warranty for the free library. Also, if the library is
55 modified by someone else and passed on, the recipients should know
56 that what they have is not the original version, so that the original
57 author's reputation will not be affected by problems that might be
58 introduced by others.
59
60 Finally, software patents pose a constant threat to the existence of
61 any free program. We wish to make sure that a company cannot
62 effectively restrict the users of a free program by obtaining a
63 restrictive license from a patent holder. Therefore, we insist that
64 any patent license obtained for a version of the library must be
65 consistent with the full freedom of use specified in this license.
66
67 Most GNU software, including some libraries, is covered by the
68 ordinary GNU General Public License. This license, the GNU Lesser
69 General Public License, applies to certain designated libraries, and
70 is quite different from the ordinary General Public License. We use
71 this license for certain libraries in order to permit linking those
72 libraries into non-free programs.
73
74 When a program is linked with a library, whether statically or using
75 a shared library, the combination of the two is legally speaking a
76 combined work, a derivative of the original library. The ordinary
77 General Public License therefore permits such linking only if the
78 entire combination fits its criteria of freedom. The Lesser General
79 Public License permits more lax criteria for linking other code with
80 the library.
81
82 We call this license the "Lesser" General Public License because it
83 does Less to protect the user's freedom than the ordinary General
84 Public License. It also provides other free software developers Less
85 of an advantage over competing non-free programs. These disadvantages
86 are the reason we use the ordinary General Public License for many
87 libraries. However, the Lesser license provides advantages in certain
88 special circumstances.
89
90 For example, on rare occasions, there may be a special need to
91 encourage the widest possible use of a certain library, so that it
92 becomes a de-facto standard. To achieve this, non-free programs must
93 be allowed to use the library. A more frequent case is that a free
94 library does the same job as widely used non-free libraries. In this
95 case, there is little to gain by limiting the free library to free
96 software only, so we use the Lesser General Public License.
97
98 In other cases, permission to use a particular library in non-free
99 programs enables a greater number of people to use a large body of
100 free software. For example, permission to use the GNU C Library in
101 non-free programs enables many more people to use the whole GNU
102 operating system, as well as its variant, the GNU/Linux operating
103 system.
104
105 Although the Lesser General Public License is Less protective of the
106 users' freedom, it does ensure that the user of a program that is
107 linked with the Library has the freedom and the wherewithal to run
108 that program using a modified version of the Library.
109
110 The precise terms and conditions for copying, distribution and
111 modification follow. Pay close attention to the difference between a
112 "work based on the library" and a "work that uses the library". The
113 former contains code derived from the library, whereas the latter must
114 be combined with the library in order to run.
115
116 GNU LESSER GENERAL PUBLIC LICENSE
117 TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
118
119 0. This License Agreement applies to any software library or other
120 program which contains a notice placed by the copyright holder or
121 other authorized party saying it may be distributed under the terms of
122 this Lesser General Public License (also called "this License").
123 Each licensee is addressed as "you".
124
125 A "library" means a collection of software functions and/or data
126 prepared so as to be conveniently linked with application programs
127 (which use some of those functions and data) to form executables.
128
129 The "Library", below, refers to any such software library or work
130 which has been distributed under these terms. A "work based on the
131 Library" means either the Library or any derivative work under
132 copyright law: that is to say, a work containing the Library or a
133 portion of it, either verbatim or with modifications and/or translated
134 straightforwardly into another language. (Hereinafter, translation is
135 included without limitation in the term "modification".)
136
137 "Source code" for a work means the preferred form of the work for
138 making modifications to it. For a library, complete source code means
139 all the source code for all modules it contains, plus any associated
140 interface definition files, plus the scripts used to control
141 compilation and installation of the library.
142
143 Activities other than copying, distribution and modification are not
144 covered by this License; they are outside its scope. The act of
145 running a program using the Library is not restricted, and output from
146 such a program is covered only if its contents constitute a work based
147 on the Library (independent of the use of the Library in a tool for
148 writing it). Whether that is true depends on what the Library does
149 and what the program that uses the Library does.
150
151 1. You may copy and distribute verbatim copies of the Library's
152 complete source code as you receive it, in any medium, provided that
153 you conspicuously and appropriately publish on each copy an
154 appropriate copyright notice and disclaimer of warranty; keep intact
155 all the notices that refer to this License and to the absence of any
156 warranty; and distribute a copy of this License along with the
157 Library.
158
159 You may charge a fee for the physical act of transferring a copy,
160 and you may at your option offer warranty protection in exchange for a
161 fee.
162
163 2. You may modify your copy or copies of the Library or any portion
164 of it, thus forming a work based on the Library, and copy and
165 distribute such modifications or work under the terms of Section 1
166 above, provided that you also meet all of these conditions:
167
168 a) The modified work must itself be a software library.
169
170 b) You must cause the files modified to carry prominent notices
171 stating that you changed the files and the date of any change.
172
173 c) You must cause the whole of the work to be licensed at no
174 charge to all third parties under the terms of this License.
175
176 d) If a facility in the modified Library refers to a function or a
177 table of data to be supplied by an application program that uses
178 the facility, other than as an argument passed when the facility
179 is invoked, then you must make a good faith effort to ensure that,
180 in the event an application does not supply such function or
181 table, the facility still operates, and performs whatever part of
182 its purpose remains meaningful.
183
184 (For example, a function in a library to compute square roots has
185 a purpose that is entirely well-defined independent of the
186 application. Therefore, Subsection 2d requires that any
187 application-supplied function or table used by this function must
188 be optional: if the application does not supply it, the square
189 root function must still compute square roots.)
190
191 These requirements apply to the modified work as a whole. If
192 identifiable sections of that work are not derived from the Library,
193 and can be reasonably considered independent and separate works in
194 themselves, then this License, and its terms, do not apply to those
195 sections when you distribute them as separate works. But when you
196 distribute the same sections as part of a whole which is a work based
197 on the Library, the distribution of the whole must be on the terms of
198 this License, whose permissions for other licensees extend to the
199 entire whole, and thus to each and every part regardless of who wrote
200 it.
201
202 Thus, it is not the intent of this section to claim rights or contest
203 your rights to work written entirely by you; rather, the intent is to
204 exercise the right to control the distribution of derivative or
205 collective works based on the Library.
206
207 In addition, mere aggregation of another work not based on the Library
208 with the Library (or with a work based on the Library) on a volume of
209 a storage or distribution medium does not bring the other work under
210 the scope of this License.
211
212 3. You may opt to apply the terms of the ordinary GNU General Public
213 License instead of this License to a given copy of the Library. To do
214 this, you must alter all the notices that refer to this License, so
215 that they refer to the ordinary GNU General Public License, version 2,
216 instead of to this License. (If a newer version than version 2 of the
217 ordinary GNU General Public License has appeared, then you can specify
218 that version instead if you wish.) Do not make any other change in
219 these notices.
220
221 Once this change is made in a given copy, it is irreversible for
222 that copy, so the ordinary GNU General Public License applies to all
223 subsequent copies and derivative works made from that copy.
224
225 This option is useful when you wish to copy part of the code of
226 the Library into a program that is not a library.
227
228 4. You may copy and distribute the Library (or a portion or
229 derivative of it, under Section 2) in object code or executable form
230 under the terms of Sections 1 and 2 above provided that you accompany
231 it with the complete corresponding machine-readable source code, which
232 must be distributed under the terms of Sections 1 and 2 above on a
233 medium customarily used for software interchange.
234
235 If distribution of object code is made by offering access to copy
236 from a designated place, then offering equivalent access to copy the
237 source code from the same place satisfies the requirement to
238 distribute the source code, even though third parties are not
239 compelled to copy the source along with the object code.
240
241 5. A program that contains no derivative of any portion of the
242 Library, but is designed to work with the Library by being compiled or
243 linked with it, is called a "work that uses the Library". Such a
244 work, in isolation, is not a derivative work of the Library, and
245 therefore falls outside the scope of this License.
246
247 However, linking a "work that uses the Library" with the Library
248 creates an executable that is a derivative of the Library (because it
249 contains portions of the Library), rather than a "work that uses the
250 library". The executable is therefore covered by this License.
251 Section 6 states terms for distribution of such executables.
252
253 When a "work that uses the Library" uses material from a header file
254 that is part of the Library, the object code for the work may be a
255 derivative work of the Library even though the source code is not.
256 Whether this is true is especially significant if the work can be
257 linked without the Library, or if the work is itself a library. The
258 threshold for this to be true is not precisely defined by law.
259
260 If such an object file uses only numerical parameters, data
261 structure layouts and accessors, and small macros and small inline
262 functions (ten lines or less in length), then the use of the object
263 file is unrestricted, regardless of whether it is legally a derivative
264 work. (Executables containing this object code plus portions of the
265 Library will still fall under Section 6.)
266
267 Otherwise, if the work is a derivative of the Library, you may
268 distribute the object code for the work under the terms of Section 6.
269 Any executables containing that work also fall under Section 6,
270 whether or not they are linked directly with the Library itself.
271
272 6. As an exception to the Sections above, you may also combine or
273 link a "work that uses the Library" with the Library to produce a
274 work containing portions of the Library, and distribute that work
275 under terms of your choice, provided that the terms permit
276 modification of the work for the customer's own use and reverse
277 engineering for debugging such modifications.
278
279 You must give prominent notice with each copy of the work that the
280 Library is used in it and that the Library and its use are covered by
281 this License. You must supply a copy of this License. If the work
282 during execution displays copyright notices, you must include the
283 copyright notice for the Library among them, as well as a reference
284 directing the user to the copy of this License. Also, you must do one
285 of these things:
286
287 a) Accompany the work with the complete corresponding
288 machine-readable source code for the Library including whatever
289 changes were used in the work (which must be distributed under
290 Sections 1 and 2 above); and, if the work is an executable linked
291 with the Library, with the complete machine-readable "work that
292 uses the Library", as object code and/or source code, so that the
293 user can modify the Library and then relink to produce a modified
294 executable containing the modified Library. (It is understood
295 that the user who changes the contents of definitions files in the
296 Library will not necessarily be able to recompile the application
297 to use the modified definitions.)
298
299 b) Use a suitable shared library mechanism for linking with the
300 Library. A suitable mechanism is one that (1) uses at run time a
301 copy of the library already present on the user's computer system,
302 rather than copying library functions into the executable, and (2)
303 will operate properly with a modified version of the library, if
304 the user installs one, as long as the modified version is
305 interface-compatible with the version that the work was made with.
306
307 c) Accompany the work with a written offer, valid for at least
308 three years, to give the same user the materials specified in
309 Subsection 6a, above, for a charge no more than the cost of
310 performing this distribution.
311
312 d) If distribution of the work is made by offering access to copy
313 from a designated place, offer equivalent access to copy the above
314 specified materials from the same place.
315
316 e) Verify that the user has already received a copy of these
317 materials or that you have already sent this user a copy.
318
319 For an executable, the required form of the "work that uses the
320 Library" must include any data and utility programs needed for
321 reproducing the executable from it. However, as a special exception,
322 the materials to be distributed need not include anything that is
323 normally distributed (in either source or binary form) with the major
324 components (compiler, kernel, and so on) of the operating system on
325 which the executable runs, unless that component itself accompanies
326 the executable.
327
328 It may happen that this requirement contradicts the license
329 restrictions of other proprietary libraries that do not normally
330 accompany the operating system. Such a contradiction means you cannot
331 use both them and the Library together in an executable that you
332 distribute.
333
334 7. You may place library facilities that are a work based on the
335 Library side-by-side in a single library together with other library
336 facilities not covered by this License, and distribute such a combined
337 library, provided that the separate distribution of the work based on
338 the Library and of the other library facilities is otherwise
339 permitted, and provided that you do these two things:
340
341 a) Accompany the combined library with a copy of the same work
342 based on the Library, uncombined with any other library
343 facilities. This must be distributed under the terms of the
344 Sections above.
345
346 b) Give prominent notice with the combined library of the fact
347 that part of it is a work based on the Library, and explaining
348 where to find the accompanying uncombined form of the same work.
349
350 8. You may not copy, modify, sublicense, link with, or distribute
351 the Library except as expressly provided under this License. Any
352 attempt otherwise to copy, modify, sublicense, link with, or
353 distribute the Library is void, and will automatically terminate your
354 rights under this License. However, parties who have received copies,
355 or rights, from you under this License will not have their licenses
356 terminated so long as such parties remain in full compliance.
357
358 9. You are not required to accept this License, since you have not
359 signed it. However, nothing else grants you permission to modify or
360 distribute the Library or its derivative works. These actions are
361 prohibited by law if you do not accept this License. Therefore, by
362 modifying or distributing the Library (or any work based on the
363 Library), you indicate your acceptance of this License to do so, and
364 all its terms and conditions for copying, distributing or modifying
365 the Library or works based on it.
366
367 10. Each time you redistribute the Library (or any work based on the
368 Library), the recipient automatically receives a license from the
369 original licensor to copy, distribute, link with or modify the Library
370 subject to these terms and conditions. You may not impose any further
371 restrictions on the recipients' exercise of the rights granted herein.
372 You are not responsible for enforcing compliance by third parties with
373 this License.
374
375 11. If, as a consequence of a court judgment or allegation of patent
376 infringement or for any other reason (not limited to patent issues),
377 conditions are imposed on you (whether by court order, agreement or
378 otherwise) that contradict the conditions of this License, they do not
379 excuse you from the conditions of this License. If you cannot
380 distribute so as to satisfy simultaneously your obligations under this
381 License and any other pertinent obligations, then as a consequence you
382 may not distribute the Library at all. For example, if a patent
383 license would not permit royalty-free redistribution of the Library by
384 all those who receive copies directly or indirectly through you, then
385 the only way you could satisfy both it and this License would be to
386 refrain entirely from distribution of the Library.
387
388 If any portion of this section is held invalid or unenforceable under
389 any particular circumstance, the balance of the section is intended to
390 apply, and the section as a whole is intended to apply in other
391 circumstances.
392
393 It is not the purpose of this section to induce you to infringe any
394 patents or other property right claims or to contest validity of any
395 such claims; this section has the sole purpose of protecting the
396 integrity of the free software distribution system which is
397 implemented by public license practices. Many people have made
398 generous contributions to the wide range of software distributed
399 through that system in reliance on consistent application of that
400 system; it is up to the author/donor to decide if he or she is willing
401 to distribute software through any other system and a licensee cannot
402 impose that choice.
403
404 This section is intended to make thoroughly clear what is believed to
405 be a consequence of the rest of this License.
406
407 12. If the distribution and/or use of the Library is restricted in
408 certain countries either by patents or by copyrighted interfaces, the
409 original copyright holder who places the Library under this License
410 may add an explicit geographical distribution limitation excluding those
411 countries, so that distribution is permitted only in or among
412 countries not thus excluded. In such case, this License incorporates
413 the limitation as if written in the body of this License.
414
415 13. The Free Software Foundation may publish revised and/or new
416 versions of the Lesser General Public License from time to time.
417 Such new versions will be similar in spirit to the present version,
418 but may differ in detail to address new problems or concerns.
419
420 Each version is given a distinguishing version number. If the Library
421 specifies a version number of this License which applies to it and
422 "any later version", you have the option of following the terms and
423 conditions either of that version or of any later version published by
424 the Free Software Foundation. If the Library does not specify a
425 license version number, you may choose any version ever published by
426 the Free Software Foundation.
427
428 14. If you wish to incorporate parts of the Library into other free
429 programs whose distribution conditions are incompatible with these,
430 write to the author to ask for permission. For software which is
431 copyrighted by the Free Software Foundation, write to the Free
432 Software Foundation; we sometimes make exceptions for this. Our
433 decision will be guided by the two goals of preserving the free status
434 of all derivatives of our free software and of promoting the sharing
435 and reuse of software generally.
436
437 NO WARRANTY
438
439 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
440 WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
441 EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
442 OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
443 KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
444 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
445 PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
446 LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
447 THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
448
449 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
450 WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
451 AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
452 FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
453 CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
454 LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
455 RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
456 FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
457 SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
458 DAMAGES.
459
460 END OF TERMS AND CONDITIONS
461
462 How to Apply These Terms to Your New Libraries
463
464 If you develop a new library, and you want it to be of the greatest
465 possible use to the public, we recommend making it free software that
466 everyone can redistribute and change. You can do so by permitting
467 redistribution under these terms (or, alternatively, under the terms
468 of the ordinary General Public License).
469
470 To apply these terms, attach the following notices to the library.
471 It is safest to attach them to the start of each source file to most
472 effectively convey the exclusion of warranty; and each file should
473 have at least the "copyright" line and a pointer to where the full
474 notice is found.
475
476
477 <one line to give the library's name and a brief idea of what it does.>
478 Copyright (C) <year> <name of author>
479
480 This library is free software; you can redistribute it and/or
481 modify it under the terms of the GNU Lesser General Public
482 License as published by the Free Software Foundation; either
483 version 2.1 of the License, or (at your option) any later version.
484
485 This library is distributed in the hope that it will be useful,
486 but WITHOUT ANY WARRANTY; without even the implied warranty of
487 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
488 Lesser General Public License for more details.
489
490 You should have received a copy of the GNU Lesser General Public
491 License along with this library; if not, write to the Free Software
492 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
493
494 Also add information on how to contact you by electronic and paper mail.
495
496 You should also get your employer (if you work as a programmer) or
497 your school, if any, to sign a "copyright disclaimer" for the library,
498 if necessary. Here is a sample; alter the names:
499
500 Yoyodyne, Inc., hereby disclaims all copyright interest in the
501 library `Frob' (a library for tweaking knobs) written by James
502 Random Hacker.
503
504 <signature of Ty Coon>, 1 April 1990
505 Ty Coon, President of Vice
506
507 That's all there is to it!
508
509
0 all:
1
2 XSLTPROC = xsltproc --xinclude --nonet
3 CANONXML = xmllint --nsclean --noblanks --c14n --nonet
4 XML_LINEBREAKS = perl -pe 's/>/>\n/g'
5 DROP_NAMESPACE = perl -pe '$$hash = chr(35); s{xmlns:tp="http://telepathy\.freedesktop\.org/wiki/DbusSpec$${hash}extensions-v0"}{}g'
6
7 XMLS = $(wildcard spec/*.xml)
8 INTERFACE_XMLS = $(filter-out spec/all%.xml,$(filter-out spec/errors%.xml,$(XMLS)))
9 INTROSPECT = $(INTERFACE_XMLS:spec/%.xml=introspect/%.xml)
10 ASYNC_INTROSPECT = $(INTERFACE_XMLS:spec/%.xml=introspect/async/%.xml)
11 CANONICAL_NAMES = $(INTERFACE_XMLS:spec/%.xml=tmp/%.name)
12
13 $(CANONICAL_NAMES): tmp/%.name: spec/%.xml tools/extract-nodename.py
14 @install -d tmp
15 python tools/extract-nodename.py $< > $@
16 tr a-z A-Z < $@ > $@.upper
17 tr A-Z a-z < $@ > $@.lower
18 tr -d _ < $@ > $@.camel
19
20 TEST_XMLS = $(wildcard test/input/*.xml)
21 TEST_INTERFACE_XMLS = test/input/_Test.xml
22 TEST_INTROSPECT = test/output/_Test.introspect.xml
23 TEST_GENERATED_FILES = \
24 test/output/spec.html \
25 $(TEST_INTROSPECT) $(TEST_ASYNC_INTROSPECT)
26
27 GENERATED_FILES = \
28 doc/spec.html \
29 doc/telepathy-spec.devhelp2 \
30 $(INTROSPECT) $(ASYNC_INTROSPECT) \
31 $(CANONICAL_NAMES)
32
33 doc/spec.html: $(XMLS) tools/doc-generator.xsl
34 $(XSLTPROC) tools/doc-generator.xsl spec/all.xml > $@
35 doc/telepathy-spec.devhelp2: $(XMLS) tools/devhelp.xsl
36 $(XSLTPROC) tools/devhelp.xsl spec/all.xml > $@
37 test/output/spec.html: $(TEST_XMLS) tools/doc-generator.xsl
38 @install -d test/output
39 $(XSLTPROC) tools/doc-generator.xsl test/input/all.xml > $@
40
41 $(INTROSPECT): introspect/%.xml: spec/%.xml tools/spec-to-introspect.xsl
42 @install -d introspect
43 $(XSLTPROC) tools/spec-to-introspect.xsl $< | $(DROP_NAMESPACE) > $@
44 $(TEST_INTROSPECT): $(TEST_INTERFACE_XMLS) tools/spec-to-introspect.xsl
45 @install -d test/output
46 $(XSLTPROC) tools/spec-to-introspect.xsl $< | $(DROP_NAMESPACE) > $@
47
48 $(ASYNC_INTROSPECT): introspect/async/%.xml: introspect/%.xml tools/make_all_async.py
49 @install -d introspect/async
50 python tools/make_all_async.py $< $@
51 $(TEST_ASYNC_INTROSPECT): $(TEST_INTROSPECT) tools/make_all_async.py
52 @install -d test/output
53 python tools/make_all_async.py $< $@
54
55 all: $(GENERATED_FILES)
56
57 TEST_CANONICALIZED_FILES = test/output/spec.html.canon \
58 test/output/introspect.canon
59
60 test/output/spec.html.canon: test/output/spec.html
61 $(CANONXML) $< > $@
62 test/output/introspect.canon: test/output/_Test.introspect.xml
63 $(CANONXML) $< | $(XML_LINEBREAKS) > $@
64
65 check: all $(TEST_GENERATED_FILES) $(TEST_CANONICALIZED_FILES)
66 @e=0; \
67 diff -u test/expected/spec.html.canon test/output/spec.html.canon || e=1; \
68 diff -u test/expected/introspect.canon test/output/introspect.canon || e=1; \
69 exit $$e
70
71 clean:
72 rm -f $(GENERATED_FILES)
73 rm -fr introspect
74 rm -rf test/output
75 rm -rf tmp
76
77 maintainer-upload-snapshot: doc/spec.html
78 cp doc/spec.html tmp/spec.html
79 sed -i~ -e 's,\(<h2>Version [0-9][0-9.]*\)\(</h2>\),\1 (darcs snapshot '`date +%Y%m%d`')\2,' \
80 tmp/spec.html
81 scp tmp/spec.html \
82 telepathy.freedesktop.org:/srv/telepathy.freedesktop.org/www/spec-snapshot.html
0 Specification
1 -------------
2 Type 'make' in the doc/ directory to generate a spec.html with the latest
3 version of the D-Bus interface specification, from the base classes in
4 telepathy/.
0 Specification Todo
1 ------------------
2
3 ponder:
4 forwarding reason
5 member changed reason? requested, remote, disconnect?
6 specifying the conference server for listing jabber chats
7 destination for JUD searches
8 should privacy modes be discoverable/settable offline?
9 how do you specify the server and your nickname when joining a chat?
10 moderated channels?
11 blist versioning... gahrgahgrhagrhjg
12
13 later:
14 password changing interface
15 buddy list groups
16 typing notification
17 submitting vcards
18 sketching/drawing
19 buddy icons
20 mail notification
0 # Boring file regexps:
1 \.hi$
2 \.o$
3 \.o\.cmd$
4 # *.ko files aren't boring by default because they might
5 # be Korean translations rather than kernel modules.
6 # \.ko$
7 \.ko\.cmd$
8 \.mod\.c$
9 (^|/)\.tmp_versions($|/)
10 (^|/)CVS($|/)
11 (^|/)RCS($|/)
12 ~$
13 #(^|/)\.[^/]
14 (^|/)_darcs($|/)
15 \.bak$
16 \.BAK$
17 \.orig$
18 (^|/)vssver\.scc$
19 \.swp$
20 (^|/)MT($|/)
21 (^|/)\{arch\}($|/)
22 (^|/).arch-ids($|/)
23 (^|/),
24 \.class$
25 \.prof$
26 (^|/)\.DS_Store$
27 (^|/)BitKeeper($|/)
28 (^|/)ChangeSet($|/)
29 (^|/)\.svn($|/)
30 \.py[co]$
31 \#
32 \.cvsignore$
33 (^|/)Thumbs\.db$
34 (^|/)autom4te\.cache($|/)
35 # End of generic boring regexps
36 ^(\./)?introspect(/|$)
37 ^(\./)?test/output(/|$)
38 ^(\./)?doc/spec\.html$
39 ^(\./)?doc/telepathy-spec.devhelp2$
40 ^(\./)?tmp(/|$)
0 <?xml version="1.0" ?>
1 <node name="/Channel" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
2 <tp:copyright>Copyright (C) 2005, 2006 Collabora Limited</tp:copyright>
3 <tp:copyright>Copyright (C) 2005, 2006 Nokia Corporation</tp:copyright>
4 <tp:copyright>Copyright (C) 2006 INdT</tp:copyright>
5 <tp:license xmlns="http://www.w3.org/1999/xhtml">
6 <p>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.</p>
10
11 <p>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 Library General Public License for more details.</p>
15
16 <p>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, MA 02110-1301, USA.</p>
19 </tp:license>
20 <interface name="org.freedesktop.Telepathy.Channel">
21 <method name="Close">
22 <tp:docstring>
23 Request that the channel be closed. This is not the case until
24 the Closed signal has been emitted, and depending on the connection
25 manager this may simply remove you from the channel on the server,
26 rather than causing it to stop existing entirely. Some channels
27 such as contact list channels may not be closed.
28 </tp:docstring>
29 <tp:possible-errors>
30 <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
31 <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
32 <tp:error name="org.freedesktop.Telepathy.Error.NotImplemented">
33 <tp:docstring>
34 This channel may never be closed, e.g. a contact list
35 </tp:docstring>
36 </tp:error>
37 <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
38 <tp:docstring>
39 This channel is not currently in a state where it can be closed,
40 e.g. a non-empty user-defined contact group
41 </tp:docstring>
42 </tp:error>
43 </tp:possible-errors>
44 </method>
45 <signal name="Closed">
46 <tp:docstring>
47 Emitted when the channel has been closed. Method calls on the
48 channel are no longer valid after this signal has been emitted,
49 and the connection manager may then remove the object from the bus
50 at any point.
51 </tp:docstring>
52 </signal>
53 <method name="GetChannelType">
54 <arg direction="out" type="s" tp:type="Interface">
55 <tp:docstring>The interface name</tp:docstring>
56 </arg>
57 <tp:docstring>
58 Returns the interface name for the type of this channel.
59 </tp:docstring>
60 </method>
61 <method name="GetHandle">
62 <arg direction="out" type="u" tp:type="Handle_Type">
63 <tp:docstring>
64 The handle type, or zero if this channel does not correspond to any
65 particular handle
66 </tp:docstring>
67 </arg>
68 <arg direction="out" type="u" tp:type="Handle">
69 <tp:docstring>
70 The handle, or zero if this channel does not correspond to any
71 particular handle
72 </tp:docstring>
73 </arg>
74 <tp:docstring>
75 Returns the handle type and number if this channel represents a
76 communication with a particular contact, room or server-stored list, or
77 zero if it is transient and defined only by its contents.
78 </tp:docstring>
79 </method>
80 <method name="GetInterfaces">
81 <arg direction="out" type="as" tp:type="Interface[]">
82 <tp:docstring>
83 An array of the D-Bus interface names
84 </tp:docstring>
85 </arg>
86 <tp:docstring>
87 Get the optional interfaces implemented by the channel.
88 </tp:docstring>
89 </method>
90 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
91 <p>All communication in the Telepathy framework is carried out via channel
92 objects which are created and managed by connections. This interface must
93 be implemented by all channel objects, along with one single channel type,
94 such as Channel.Type.ContactList which represents a list of people (such
95 as a buddy list) or a Channel.Type.Text which represents a channel over
96 which textual messages are sent and received.</p>
97
98 <p>Each channel may have an immutable handle associated with it, which
99 may be any handle type, such as a contact, room or list handle,
100 indicating that the channel is for communicating with that handle.
101 There can be at most one channel for each combination of
102 (channel type, handle type, handle) with nonzero handle type.</p>
103
104 <p>If a channel does not have a handle (an "anonymous channel"), it
105 means that the channel is defined by some other terms, such as it
106 may be a transient group defined only by its members as visible
107 through the Channel.Interface.Group interface. There can be any number
108 of anonymous channels of the same channel type.</p>
109
110 <p>Other optional interfaces can be implemented to indicate other available
111 functionality, such as Channel.Interface.Group if the channel contains
112 a number of contacts, Channel.Interface.Password to indicate
113 that a channel may have a password set to require entry, and
114 Properties for extra data about channels which represent chat
115 rooms or voice calls. The interfaces implemented may not vary after the
116 channel's creation has been signalled to the bus (with the connection's
117 NewChannel signal).</p>
118
119 <p>Specific connection manager implementations may implement channel types and
120 interfaces which are not contained within this specification in order to
121 support further functionality. To aid interoperability between client and
122 connection manager implementations, the interfaces specified here should be
123 used wherever applicable, and new interfaces made protocol-independent
124 wherever possible. Because of the potential for 3rd party interfaces adding
125 methods or signals with conflicting names, the D-Bus interface names should
126 always be used to invoke methods and bind signals.</p>
127 </tp:docstring>
128 </interface>
129 </node>
130 <!-- vim:set sw=2 sts=2 et ft=xml: -->
0 <?xml version="1.0" ?>
1 <node name="/Channel_Interface_Chat_State" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
2 <tp:copyright> Copyright (C) 2007 Collabora Limited </tp:copyright>
3 <tp:license xmlns="http://www.w3.org/1999/xhtml">
4 <p>This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.</p>
8
9 <p>This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.</p>
13
14 <p>You should have received a copy of the GNU Lesser General Public
15 License along with this library; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
17 </tp:license>
18 <interface name="org.freedesktop.Telepathy.Channel.Interface.ChatState">
19 <tp:requires interface="org.freedesktop.Telepathy.Channel"/>
20 <method name="SetChatState">
21 <arg direction="in" name="state" type="u" tp:type="Channel_Chat_State">
22 <tp:docstring>
23 The new state: one of the values of ChannelChatState.
24 </tp:docstring>
25 </arg>
26 <tp:docstring>
27 Set the local state and notify other members of the channel that it
28 has changed.
29 </tp:docstring>
30 <tp:possible-errors>
31 <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
32 <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable"/>
33 <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument"/>
34 </tp:possible-errors>
35 </method>
36 <signal name="ChatStateChanged">
37 <arg name="contact" type="u" tp:type="Contact_Handle">
38 <tp:docstring>
39 An integer handle for the contact.
40 </tp:docstring>
41 </arg>
42 <arg name="state" type="u" tp:type="Channel_Chat_State">
43 <tp:docstring>
44 The new state of this contact: one of the values of ChannelChatState.
45 </tp:docstring>
46 </arg>
47 <tp:docstring>
48 Emitted when the state of a member of the channel has changed.
49 This includes local state.
50 </tp:docstring>
51 </signal>
52 <tp:enum name="Channel_Chat_State" type="u">
53 <tp:enumvalue suffix="Gone" value="0">
54 <tp:docstring>
55 The contact has effectively ceased participating in the chat.
56 </tp:docstring>
57 </tp:enumvalue>
58 <tp:enumvalue suffix="Inactive" value="1">
59 <tp:docstring>
60 The contact has not been active for some time.
61 </tp:docstring>
62 </tp:enumvalue>
63 <tp:enumvalue suffix="Active" value="2">
64 <tp:docstring>
65 The contact is actively participating in the chat.
66 </tp:docstring>
67 </tp:enumvalue>
68 <tp:enumvalue suffix="Paused" value="3">
69 <tp:docstring>
70 The contact has paused composing a message.
71 </tp:docstring>
72 </tp:enumvalue>
73 <tp:enumvalue suffix="Composing" value="4">
74 <tp:docstring>
75 The contact is composing a message to be sent to the chat.
76 </tp:docstring>
77 </tp:enumvalue>
78 </tp:enum>
79 <tp:docstring>
80 <p>An interface for channels for receiving notifications of remote contacts'
81 state, and for notifying remote contacts of the local state.</p>
82
83 <p>Clients should assume that a contact's state is Channel_Chat_State_Inactive
84 unless they receive a notification otherwise.</p>
85
86 <p>The Channel_Chat_State_Gone state is treated differently to other states:</p>
87 <ul>
88 <li>It may not be used for multi-user chats</li>
89 <li>It may not be explicitly sent</li>
90 <li>It should be automatically sent when the channel is closed</li>
91 <li>It must not be sent to the peer if a channel is closed without being used</li>
92 <li>Receiving it must not cause a new channel to be opened</li>
93 </ul>
94
95 <p>The different states are defined by XEP-0085, but may be applied to any suitable protocol.</p>
96 </tp:docstring>
97 </interface>
98 </node>
99 <!-- vim:set sw=2 sts=2 et ft=xml: -->
0 <?xml version="1.0" ?>
1 <node name="/Channel_Interface_DTMF" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
2 <tp:copyright>Copyright (C) 2005, 2006 Collabora Limited</tp:copyright>
3 <tp:copyright>Copyright (C) 2005, 2006 Nokia Corporation</tp:copyright>
4 <tp:copyright>Copyright (C) 2006 INdT</tp:copyright>
5 <tp:license xmlns="http://www.w3.org/1999/xhtml">
6 <p>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.</p>
10
11 <p>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 Library General Public License for more details.</p>
15
16 <p>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, MA 02110-1301, USA.</p>
19 </tp:license>
20 <interface name="org.freedesktop.Telepathy.Channel.Interface.DTMF">
21 <tp:requires interface="org.freedesktop.Telepathy.Channel.Type.StreamedMedia"/>
22 <method name="StartTone">
23 <arg direction="in" name="stream_id" type="u">
24 <tp:docstring>A stream ID as defined in the StreamedMedia channel type.</tp:docstring>
25 </arg>
26 <arg direction="in" name="event" type="y" tp:type="DTMF_Event">
27 <tp:docstring>A numeric event code from the DTMF_Event enum.</tp:docstring>
28 </arg>
29 <tp:docstring>
30 Start sending a DTMF tone on this stream. Where possible, the tone
31 will continue until StopTone is called. On certain protocols, it may
32 only be possible to send events with a predetermined length. In this
33 case, the implementation may emit a fixed-length tone, and the StopTone
34 method call should return NotAvailable.
35 </tp:docstring>
36 <tp:possible-errors>
37 <tp:error name="org.freedesktop.Telepathy.Error.NetworkError" />
38 <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
39 <tp:docstring>
40 The given stream ID was invalid.
41 </tp:docstring>
42 </tp:error>
43 <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
44 <tp:docstring>
45 The requested event is not available on this stream.
46 </tp:docstring>
47 </tp:error>
48 </tp:possible-errors>
49 </method>
50 <method name="StopTone">
51 <arg direction="in" name="stream_id" type="u">
52 <tp:docstring>A stream ID as defined in the StreamedMedia channel type.</tp:docstring>
53 </arg>
54 <tp:docstring>
55 Stop sending any DTMF tone which has been started using the StartTone
56 method. If there is no current tone, this method will do nothing.
57 </tp:docstring>
58 <tp:possible-errors>
59 <tp:error name="org.freedesktop.Telepathy.Error.NetworkError" />
60 <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
61 <tp:docstring>
62 The given stream ID was invalid.
63 </tp:docstring>
64 </tp:error>
65 <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
66 <tp:docstring>
67 Continuous tones are not supported by this stream.
68 </tp:docstring>
69 </tp:error>
70 </tp:possible-errors>
71 </method>
72 <tp:enum name="DTMF_Event" type="y">
73 <tp:enumvalue suffix="Digit_0" value="0">
74 <tp:docstring>0</tp:docstring>
75 </tp:enumvalue>
76 <tp:enumvalue suffix="Digit_1" value="1">
77 <tp:docstring>1</tp:docstring>
78 </tp:enumvalue>
79 <tp:enumvalue suffix="Digit_2" value="2">
80 <tp:docstring>2</tp:docstring>
81 </tp:enumvalue>
82 <tp:enumvalue suffix="Digit_3" value="3">
83 <tp:docstring>3</tp:docstring>
84 </tp:enumvalue>
85 <tp:enumvalue suffix="Digit_4" value="4">
86 <tp:docstring>4</tp:docstring>
87 </tp:enumvalue>
88 <tp:enumvalue suffix="Digit_5" value="5">
89 <tp:docstring>5</tp:docstring>
90 </tp:enumvalue>
91 <tp:enumvalue suffix="Digit_6" value="6">
92 <tp:docstring>6</tp:docstring>
93 </tp:enumvalue>
94 <tp:enumvalue suffix="Digit_7" value="7">
95 <tp:docstring>7</tp:docstring>
96 </tp:enumvalue>
97 <tp:enumvalue suffix="Digit_8" value="8">
98 <tp:docstring>8</tp:docstring>
99 </tp:enumvalue>
100 <tp:enumvalue suffix="Digit_9" value="9">
101 <tp:docstring>9</tp:docstring>
102 </tp:enumvalue>
103 <tp:enumvalue suffix="Asterisk" value="10">
104 <tp:docstring>*</tp:docstring>
105 </tp:enumvalue>
106 <tp:enumvalue suffix="Hash" value="11">
107 <tp:docstring>#</tp:docstring>
108 </tp:enumvalue>
109 <tp:enumvalue suffix="Letter_A" value="12">
110 <tp:docstring>A</tp:docstring>
111 </tp:enumvalue>
112 <tp:enumvalue suffix="Letter_B" value="13">
113 <tp:docstring>B</tp:docstring>
114 </tp:enumvalue>
115 <tp:enumvalue suffix="Letter_C" value="14">
116 <tp:docstring>C</tp:docstring>
117 </tp:enumvalue>
118 <tp:enumvalue suffix="Letter_D" value="15">
119 <tp:docstring>D</tp:docstring>
120 </tp:enumvalue>
121 </tp:enum>
122 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
123 An interface that gives a Channel the ability to send DTMF events over
124 audio streams which have been established using the StreamedMedia channel
125 type. The event codes used are in common with those defined in <a
126 href="http://www.rfc-editor.org/rfc/rfc4733.txt">RFC4733</a>, and are
127 listed in the DTMF_Event enumeration.
128 </tp:docstring>
129 </interface>
130 </node>
131 <!-- vim:set sw=2 sts=2 et ft=xml: -->
0 <?xml version="1.0" ?>
1 <node name="/Channel_Interface_Group" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
2 <tp:copyright>Copyright (C) 2005, 2006 Collabora Limited</tp:copyright>
3 <tp:copyright>Copyright (C) 2005, 2006 Nokia Corporation</tp:copyright>
4 <tp:copyright>Copyright (C) 2006 INdT</tp:copyright>
5 <tp:license xmlns="http://www.w3.org/1999/xhtml">
6 <p>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.</p>
10
11 <p>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 Library General Public License for more details.</p>
15
16 <p>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, MA 02110-1301, USA.</p>
19 </tp:license>
20 <interface name="org.freedesktop.Telepathy.Channel.Interface.Group">
21 <tp:requires interface="org.freedesktop.Telepathy.Channel"/>
22 <method name="AddMembers">
23 <arg direction="in" name="contacts" type="au" tp:type="Contact_Handle[]">
24 <tp:docstring>
25 An array of contact handles to invite to the channel
26 </tp:docstring>
27 </arg>
28 <arg direction="in" name="message" type="s">
29 <tp:docstring>
30 A string message, which can be blank if desired
31 </tp:docstring>
32 </arg>
33 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
34 <p>Invite all the given contacts into the channel, or accept requests for
35 channel membership for contacts on the pending local list.</p>
36
37 <p>A message may be provided along with the request, which will be sent
38 to the server if supported. See the CHANNEL_GROUP_FLAG_MESSAGE_ADD and
39 CHANNEL_GROUP_FLAG_MESSAGE_ACCEPT flags to see in which cases this
40 message should be provided.</p>
41 </tp:docstring>
42 <tp:possible-errors>
43 <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
44 <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
45 <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable"/>
46 <tp:error name="org.freedesktop.Telepathy.Error.PermissionDenied"/>
47 <tp:error name="org.freedesktop.Telepathy.Error.InvalidHandle"/>
48 <tp:error name="org.freedesktop.Telepathy.Error.Channel.Full"/>
49 <tp:error name="org.freedesktop.Telepathy.Error.Channel.InviteOnly"/>
50 <tp:error name="org.freedesktop.Telepathy.Error.Channel.Banned"/>
51 </tp:possible-errors>
52 </method>
53 <method name="GetAllMembers">
54 <arg direction="out" type="au" tp:type="Contact_Handle[]">
55 <tp:docstring>
56 array of handles of current members
57 </tp:docstring>
58 </arg>
59 <arg direction="out" type="au" tp:type="Contact_Handle[]">
60 <tp:docstring>
61 array of handles of local pending members
62 </tp:docstring>
63 </arg>
64 <arg direction="out" type="au" tp:type="Contact_Handle[]">
65 <tp:docstring>
66 array of handles of remote pending members
67 </tp:docstring>
68 </arg>
69 <tp:docstring>
70 Returns arrays of all current, local and remote pending channel
71 members.
72 </tp:docstring>
73 <tp:possible-errors>
74 <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
75 <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
76 </tp:possible-errors>
77 </method>
78 <tp:flags name="Channel_Group_Flags" value-prefix="Channel_Group_Flag" type="u">
79 <tp:flag suffix="Can_Add" value="1">
80 <tp:docstring>
81 The AddMembers method can be used to add or invite members who are
82 not already in the local pending list (which is always valid).
83 </tp:docstring>
84 </tp:flag>
85 <tp:flag suffix="Can_Remove" value="2">
86 <tp:docstring>
87 The RemoveMembers method can be used to remove channel members
88 (removing those on the pending local list is always valid).
89 </tp:docstring>
90 </tp:flag>
91 <tp:flag suffix="Can_Rescind" value="4">
92 <tp:docstring>
93 The RemoveMembers method can be used on people on the remote
94 pending list.
95 </tp:docstring>
96 </tp:flag>
97 <tp:flag suffix="Message_Add" value="8">
98 <tp:docstring>
99 A message may be sent to the server when calling AddMembers on
100 contacts who are not currently pending members.
101 </tp:docstring>
102 </tp:flag>
103 <tp:flag suffix="Message_Remove" value="16">
104 <tp:docstring>
105 A message may be sent to the server when calling RemoveMembers on
106 contacts who are currently channel members.
107 </tp:docstring>
108 </tp:flag>
109 <tp:flag suffix="Message_Accept" value="32">
110 <tp:docstring>
111 A message may be sent to the server when calling AddMembers on
112 contacts who are locally pending.
113 </tp:docstring>
114 </tp:flag>
115 <tp:flag suffix="Message_Reject" value="64">
116 <tp:docstring>
117 A message may be sent to the server when calling RemoveMembers on
118 contacts who are locally pending.
119 </tp:docstring>
120 </tp:flag>
121 <tp:flag suffix="Message_Rescind" value="128">
122 <tp:docstring>
123 A message may be sent to the server when calling RemoveMembers on
124 contacts who are remote pending.
125 </tp:docstring>
126 </tp:flag>
127 <tp:flag suffix="Channel_Specific_Handles" value="256">
128 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
129 <p>
130 The members of this group have handles which are specific to
131 this channel, and are not valid as general-purpose handles on
132 the connection. Depending on the channel, it may be possible to
133 call GetHandleOwners to find the owners of these handles, which
134 should be done if you wish to eg subscribe to the contact's
135 presence.
136 </p>
137
138 <p>
139 Connection managers must ensure that any given handle is not
140 simultaneously a general-purpose handle and a channel-specific
141 handle.
142 </p>
143 </tp:docstring>
144 </tp:flag>
145 <tp:flag suffix="Only_One_Group" value="512">
146 <tp:docstring>
147 Placing a contact in multiple groups of this type is not allowed
148 and will raise NotAvailable (on services where contacts may only
149 be in one user-defined group, user-defined groups will have
150 this flag).
151 </tp:docstring>
152 </tp:flag>
153 <tp:flag suffix="Handle_Owners_Not_Available" value="1024">
154 <tp:docstring>
155 In rooms with channel specific handles (ie Channel_Specific_Handles
156 flag is set), this flag indicates that none of the handle owners are
157 available, and that GetHandleOwners method will always return 0 for
158 channel members other than the self handle.
159 </tp:docstring>
160 </tp:flag>
161 </tp:flags>
162 <method name="GetGroupFlags">
163 <arg direction="out" type="u" tp:type="Channel_Group_Flags">
164 <tp:docstring>
165 The bitwise OR of zero or more values from ChannelGroupFlags
166 </tp:docstring>
167 </arg>
168 <tp:docstring>
169 Returns an integer representing the bitwise-OR of flags on this
170 channel. The user interface can use this to present information about
171 which operations are currently valid.
172 </tp:docstring>
173 <tp:possible-errors>
174 <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
175 <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
176 </tp:possible-errors>
177 </method>
178 <method name="GetHandleOwners">
179 <arg direction="in" name="handles" type="au" tp:type="Contact_Handle[]">
180 <tp:docstring>
181 A list of integer handles representing members of the channel
182 </tp:docstring>
183 </arg>
184 <arg direction="out" type="au" tp:type="Contact_Handle[]">
185 <tp:docstring>
186 An array of integer handles representing the owner handles of
187 the given room members, in the same order, or 0 if the
188 owner is not available
189 </tp:docstring>
190 </arg>
191 <tp:docstring>
192 If the CHANNEL_GROUP_FLAG_CHANNEL_SPECIFIC_HANDLES flag is set on
193 the channel, then the handles of the group members are specific
194 to this channel, and are not meaningful in a connection-wide
195 context such as contact lists. This method allows you to find
196 the owner of the handle if it can be discovered in this channel,
197 or 0 if the owner is not available.
198 </tp:docstring>
199 <tp:possible-errors>
200 <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
201 <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
202 <tp:error name="org.freedesktop.Telepathy.Error.InvalidHandle"/>
203 <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
204 <tp:docstring>
205 This channel doesn't have the CHANNEL_SPECIFIC_HANDLES flag,
206 so handles in this channel are globally meaningful and calling
207 this method is not necessary
208 </tp:docstring>
209 </tp:error>
210 <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
211 <tp:docstring>
212 One of the given handles is not a member
213 </tp:docstring>
214 </tp:error>
215 </tp:possible-errors>
216 </method>
217 <method name="GetLocalPendingMembers">
218 <arg direction="out" type="au" tp:type="Contact_Handle[]"/>
219 <tp:docstring>
220 Returns an array of handles representing contacts requesting
221 channel membership and awaiting local approval with AddMembers.
222 </tp:docstring>
223 <tp:possible-errors>
224 <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
225 <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
226 </tp:possible-errors>
227 </method>
228 <method name="GetLocalPendingMembersWithInfo">
229 <tp:added version="0.15.0" />
230 <tp:docstring>
231 Returns an array of structs containing handles representing contacts
232 requesting channel membership and awaiting local approval with
233 AddMembers.
234 </tp:docstring>
235 <arg direction="out" type="a(uuus)">
236 <tp:docstring>
237 An array of structs containing:
238 <ul>
239 <li>
240 A handle representing the contact requesting channel membership
241 </li>
242 <li>
243 A handle representing the contact making the request, or 0 if
244 unknown
245 </li>
246 <li>
247 The reason for the request: one of the values of
248 ChannelGroupChangeReason
249 </li>
250 <li>
251 A string message containing the reason for the request if any (or
252 blank if none)
253 </li>
254 </ul>
255 </tp:docstring>
256 </arg>
257 <tp:possible-errors>
258 <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
259 <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
260 </tp:possible-errors>
261 </method>
262 <method name="GetMembers">
263 <arg direction="out" type="au" tp:type="Contact_Handle[]"/>
264 <tp:docstring>
265 Returns an array of handles for the members of this channel.
266 </tp:docstring>
267 <tp:possible-errors>
268 <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
269 <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
270 </tp:possible-errors>
271 </method>
272 <method name="GetRemotePendingMembers">
273 <arg direction="out" type="au" tp:type="Contact_Handle[]"/>
274 <tp:docstring>
275 Returns an array of handles representing contacts who have been
276 invited to the channel and are awaiting remote approval.
277 </tp:docstring>
278 <tp:possible-errors>
279 <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
280 <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
281 </tp:possible-errors>
282 </method>
283 <method name="GetSelfHandle">
284 <arg direction="out" type="u" tp:type="Contact_Handle"/>
285 <tp:docstring>
286 Returns the handle for the user on this channel (which can also be a
287 local or remote pending member) or 0 if the user not a member at all
288 (which is likely to be the case, for instance, on Type.ContactList
289 channels). Note that this is different from the connection
290 GetSelfHandle on some protocols, so the value of this handle should
291 always be used with the methods of this interface.
292 </tp:docstring>
293 <tp:possible-errors>
294 <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
295 <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
296 </tp:possible-errors>
297 </method>
298 <signal name="GroupFlagsChanged">
299 <arg name="added" type="u" tp:type="Channel_Group_Flags">
300 <tp:docstring>
301 A bitwise OR of the flags which have been set
302 </tp:docstring>
303 </arg>
304 <arg name="removed" type="u" tp:type="Channel_Group_Flags">
305 <tp:docstring>
306 A bitwise OR of the flags which have been cleared
307 </tp:docstring>
308 </arg>
309 <tp:docstring>
310 Emitted when the flags as returned by GetGroupFlags are changed.
311 The user interface should be updated as appropriate.
312 </tp:docstring>
313 </signal>
314 <tp:enum name="Channel_Group_Change_Reason" type="u">
315 <tp:enumvalue suffix="None" value="0">
316 <tp:docstring>
317 No reason was provided for this change.
318 </tp:docstring>
319 </tp:enumvalue>
320 <tp:enumvalue suffix="Offline" value="1">
321 <tp:docstring>
322 The change is due to a user going offline. Also used when
323 user is already offline, but this wasn't known previously.
324 </tp:docstring>
325 </tp:enumvalue>
326 <tp:enumvalue suffix="Kicked" value="2">
327 <tp:docstring>
328 The change is due to a kick operation.
329 </tp:docstring>
330 </tp:enumvalue>
331 <tp:enumvalue suffix="Busy" value="3">
332 <tp:docstring>
333 The change is due to a busy indication.
334 </tp:docstring>
335 </tp:enumvalue>
336 <tp:enumvalue suffix="Invited" value="4">
337 <tp:docstring>
338 The change is due to an invitation.
339 </tp:docstring>
340 </tp:enumvalue>
341 <tp:enumvalue suffix="Banned" value="5">
342 <tp:docstring>
343 The change is due to a kick+ban operation.
344 </tp:docstring>
345 </tp:enumvalue>
346 <tp:enumvalue suffix="Error" value="6">
347 <tp:docstring>
348 The change is due to an error occurring.
349 </tp:docstring>
350 </tp:enumvalue>
351 <tp:enumvalue suffix="Invalid_Contact" value="7">
352 <tp:docstring>
353 The change is because the requested contact does not exist.
354 </tp:docstring>
355 </tp:enumvalue>
356 <tp:enumvalue suffix="No_Answer" value="8">
357 <tp:docstring>
358 The change is because the requested contact did not respond.
359 </tp:docstring>
360 </tp:enumvalue>
361 <tp:enumvalue suffix="Renamed" value="9">
362 <tp:docstring>
363 The change is because a contact's unique identifier changed.
364 There must be exactly one handle in the removed set and exactly
365 one handle in one of the added sets. The Renamed signal on the
366 Renaming interface will have been emitted for the same handles,
367 shortly before this MembersChanged signal is emitted.
368 </tp:docstring>
369 </tp:enumvalue>
370 <tp:enumvalue suffix="Permission_Denied" value="10">
371 <tp:docstring>
372 The change is because there was no permission to contact the
373 requested handle.
374 </tp:docstring>
375 </tp:enumvalue>
376 <tp:enumvalue suffix="Separated" value="11">
377 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
378 <p>If members are removed with this reason code, the change is
379 because the group has split into unconnected parts which can only
380 communicate within themselves (e.g. netsplits on IRC use this
381 reason code).
382 </p>
383 <p>
384 If members are added with this reason code, the change is because
385 unconnected parts of the group have rejoined. If this channel
386 carries messages (e.g. Text or Tubes channels) applications must
387 assume that the contacts being added are likely to have missed some
388 messages as a result of the separation, and that the contacts
389 in the group are likely to have missed some messages from the
390 contacts being added.
391 </p>
392 <p>Note that from the added contacts' perspective, they have been
393 in the group all along, and the contacts we indicate to be in
394 the group (including the local user) have just rejoined
395 the group with reason Separated. Application protocols in Tubes
396 should be prepared to cope with this situation.
397 </p>
398 </tp:docstring>
399 </tp:enumvalue>
400 </tp:enum>
401 <signal name="MembersChanged">
402 <arg name="message" type="s">
403 <tp:docstring>
404 A string message from the server, or blank if not
405 </tp:docstring>
406 </arg>
407 <arg name="added" type="au" tp:type="Contact_Handle[]">
408 <tp:docstring>
409 A list of members added to the channel
410 </tp:docstring>
411 </arg>
412 <arg name="removed" type="au" tp:type="Contact_Handle[]">
413 <tp:docstring>
414 A list of members removed from the channel
415 </tp:docstring>
416 </arg>
417 <arg name="local_pending" type="au" tp:type="Contact_Handle[]">
418 <tp:docstring>
419 A list of members who are pending local approval
420 </tp:docstring>
421 </arg>
422 <arg name="remote_pending" type="au" tp:type="Contact_Handle[]">
423 <tp:docstring>
424 A list of members who are pending remote approval
425 </tp:docstring>
426 </arg>
427 <arg name="actor" type="u" tp:type="Contact_Handle">
428 <tp:docstring>
429 The contact handle of the person who made the change, or 0
430 if not known
431 </tp:docstring>
432 </arg>
433 <arg name="reason" type="u" tp:type="Channel_Group_Change_Reason">
434 <tp:docstring>
435 A reason for the change: one of the values of
436 ChannelGroupChangeReason
437 </tp:docstring>
438 </arg>
439 <tp:docstring>
440 Emitted when contacts join any of the three lists (members, local
441 pending or remote pending). Contacts are listed in the removed
442 list when they leave any of the three lists. There may also be
443 a message from the server regarding this change, which may be
444 displayed to the user if desired.
445 </tp:docstring>
446 </signal>
447 <method name="RemoveMembers">
448 <arg direction="in" name="contacts" type="au" tp:type="Contact_Handle[]">
449 <tp:docstring>
450 An array of contact handles to remove from the channel
451 </tp:docstring>
452 </arg>
453 <arg direction="in" name="message" type="s">
454 <tp:docstring>
455 A string message, which can be blank if desired
456 </tp:docstring>
457 </arg>
458 <tp:docstring>
459 Requests the removal of contacts from a channel, reject their request
460 for channel membership on the pending local list, or rescind their
461 invitation on the pending remote list. A message may be provided along
462 with the request, which will be sent to the server if supported. See
463 the CHANNEL_GROUP_FLAG_MESSAGE_REMOVE,
464 CHANNEL_GROUP_FLAG_MESSAGE_REJECT and
465 CHANNEL_GROUP_FLAG_MESSAGE_RESCIND flags to see in which cases this
466 message should be provided.
467 </tp:docstring>
468 <tp:possible-errors>
469 <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
470 <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
471 <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable"/>
472 <tp:error name="org.freedesktop.Telepathy.Error.PermissionDenied"/>
473 <tp:error name="org.freedesktop.Telepathy.Error.InvalidHandle"/>
474 </tp:possible-errors>
475 </method>
476 <method name="RemoveMembersWithReason">
477 <arg direction="in" name="contacts" type="au" tp:type="Contact_Handle[]">
478 <tp:docstring>
479 An array of contact handles to remove from the channel
480 </tp:docstring>
481 </arg>
482 <arg direction="in" name="message" type="s">
483 <tp:docstring>
484 A string message, which can be blank if desired
485 </tp:docstring>
486 </arg>
487 <arg direction="in" name="reason" type="u"
488 tp:type="Channel_Group_Change_Reason">
489 <tp:docstring>
490 A reason for the change: one of the values of
491 ChannelGroupChangeReason
492 </tp:docstring>
493 </arg>
494 <tp:docstring>
495 As RemoveMembers, but a reason code may be provided where
496 appropriate. The reason code may be ignored if the underlying
497 protocol is unable to represent the given reason.
498 </tp:docstring>
499 <tp:possible-errors>
500 <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
501 <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
502 <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable"/>
503 <tp:error name="org.freedesktop.Telepathy.Error.PermissionDenied"/>
504 <tp:error name="org.freedesktop.Telepathy.Error.InvalidHandle"/>
505 <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
506 <tp:docstring>
507 The provided reason code was invalid.
508 </tp:docstring>
509 </tp:error>
510 </tp:possible-errors>
511 </method>
512 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
513 <p>Interface for channels which have multiple members, and where the members
514 of the channel can change during its lifetime. Your presence in the channel
515 cannot be presumed by the channel's existence (for example, a channel you
516 may request membership of but your request may not be granted).</p>
517
518 <p>This interface implements three lists: a list of current members, and two
519 lists of local pending and remote pending members. Contacts on the remote
520 pending list have been invited to the channel, but the remote user has not
521 accepted the invitation. Contacts on the local pending list have requested
522 membership of the channel, but the local user of the framework must accept
523 their request before they may join. A single contact should never appear on
524 more than one of the three lists. The lists are empty when the channel is
525 created, and the MembersChanged signal should be emitted when information
526 is retrieved from the server, or changes occur.</p>
527
528 <p>Addition of members to the channel may be requested by using AddMembers. If
529 remote acknowledgement is required, use of the AddMembers method will cause
530 users to appear on the remote pending list. If no acknowledgement is
531 required, AddMembers will add contacts to the member list directly. If a
532 contact is awaiting authorisation on the local pending list, AddMembers
533 will grant their membership request.</p>
534
535 <p>Removal of contacts from the channel may be requested by using
536 RemoveMembers. If a contact is awaiting authorisation on the local pending
537 list, RemoveMembers will refuse their membership request. If a contact is
538 on the remote pending list but has not yet accepted the invitation,
539 RemoveMembers will rescind the request if possible.</p>
540
541 <p>It should not be presumed that the requester of a channel implementing this
542 interface is immediately granted membership, or indeed that they are a
543 member at all, unless they appear in the list. They may, for instance,
544 be placed into the remote pending list until a connection has been
545 established or the request acknowledged remotely.</p>
546
547 <p>If the local user joins a Group channel whose members or other state
548 cannot be discovered until the user joins (e.g. many chat room
549 implementations), the connection manager should ensure that the channel
550 is, as far as possible, in a consistent state before adding the local
551 contact to the members set; until this happens, the local contact should
552 be in the remote-pending set. For instance, if the connection manager
553 queries the server to find out the initial members list for the
554 channel, it should leave the local contact in the remote-pending set
555 until it has finished receiving the initial members list.
556 </p>
557
558 <p>If the protocol provides no reliable way to tell whether the complete
559 initial members list has been received yet, the connection manager
560 should make a best-effort attempt to wait for the full list
561 (in the worst case, waiting for a suitable arbitrary timeout)
562 rather than requiring user interfaces to do so on its behalf.</p>
563 </tp:docstring>
564 </interface>
565 </node>
566 <!-- vim:set sw=2 sts=2 et ft=xml: -->
0 <?xml version="1.0" ?>
1 <node name="/Channel_Interface_Hold" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
2 <tp:copyright> Copyright (C) 2005, 2006 Collabora Limited </tp:copyright>
3 <tp:copyright> Copyright (C) 2005, 2006 Nokia Corporation </tp:copyright>
4 <tp:copyright> Copyright (C) 2006 INdT </tp:copyright>
5 <tp:license xmlns="http://www.w3.org/1999/xhtml">
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.
10
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 Library General Public License for more details.
15
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, MA 02110-1301, USA.
19 </tp:license>
20 <tp:enum name="Channel_Hold_State" type="u">
21 <tp:enumvalue suffix="None" value="0">
22 <tp:docstring>
23 Neither the local user and the remote member are on hold, and media
24 is being sent bidirectionally.
25 </tp:docstring>
26 </tp:enumvalue>
27 <tp:enumvalue suffix="Send_Only" value="1">
28 <tp:docstring>
29 The local user has put the remote member on hold, so is sending
30 media but has arranged not to receive any media streams.
31 </tp:docstring>
32 </tp:enumvalue>
33 <tp:enumvalue suffix="Recv_Only" value="2">
34 <tp:docstring>
35 The user has been put on hold by the remote member, so is receiving
36 media but has arranged not to send any media streams.
37 </tp:docstring>
38 </tp:enumvalue>
39 <tp:enumvalue suffix="Both" value="3">
40 <tp:docstring>
41 Both the local user and the remote member have agreed not to send
42 any media streams to each other.
43 </tp:docstring>
44 </tp:enumvalue>
45 </tp:enum>
46 <interface name="org.freedesktop.Telepathy.Channel.Interface.Hold">
47 <tp:requires interface="org.freedesktop.Telepathy.Channel"/>
48 <method name="GetHoldState">
49 <arg direction="in" name="member" type="u" tp:type="Contact_Handle">
50 <tp:docstring>
51 The contact handle for a member of the channel
52 </tp:docstring>
53 </arg>
54 <arg direction="out" type="u" tp:type="Channel_Hold_State">
55 <tp:docstring>
56 The member's current hold state as one of the values of
57 ChannelHoldState
58 </tp:docstring>
59 </arg>
60 <tp:docstring>
61 Given a member of the channel, return their current hold state.
62 </tp:docstring>
63 <tp:possible-errors>
64 <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
65 <tp:error name="org.freedesktop.Telepathy.Error.InvalidHandle"/>
66 </tp:possible-errors>
67 </method>
68 <signal name="HoldStateChanged">
69 <arg name="member" type="u" tp:type="Contact_Handle">
70 <tp:docstring>
71 The integer handle of a member of the channel
72 </tp:docstring>
73 </arg>
74 <arg name="state" type="u" tp:type="Channel_Hold_State">
75 <tp:docstring>
76 An integer representing the new hold state
77 </tp:docstring>
78 </arg>
79 <tp:docstring>
80 Emitted to indicate that the hold state (as defined in GetHoldState
81 above) has changed for a member of this channel. This may occur as
82 a consequence of you requesting a change with RequestHold, or the
83 state changing as a result of a request from the remote member
84 or another process.
85 </tp:docstring>
86 </signal>
87 <method name="RequestHold">
88 <arg direction="in" name="member" type="u" tp:type="Contact_Handle">
89 <tp:docstring>
90 The contact handle for a member of the channel
91 </tp:docstring>
92 </arg>
93 <arg direction="in" name="hold" type="b">
94 <tp:docstring>
95 A boolean indicating whether or not the user should be on hold
96 </tp:docstring>
97 </arg>
98 <tp:docstring>
99 Request that a certain member be put on hold (be instructed not to send
100 any media streams to you) or be taken off hold. Success is indicated
101 by the HoldStateChanged signal being emitted.
102 </tp:docstring>
103 <tp:possible-errors>
104 <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
105 <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
106 <tp:error name="org.freedesktop.Telepathy.Error.InvalidHandle"/>
107 </tp:possible-errors>
108 </method>
109 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
110 <p>THIS INTERFACE IS DEPRECATED AND SHOULD NOT BE USED. Hold functionality
111 should be added to the StreamedMedia channel in due course.</p>
112
113 <p>Interface for channels where members may put you on hold, or you may put
114 members on hold. This usually only makes sense for channels where you are
115 streaming media to or from the members. Hold is defined as requesting
116 that you are not sent any media streams by another, so these states
117 indicate whether or not you are sending and receiving media streams
118 to each member of the channel.</p>
119 </tp:docstring>
120 </interface>
121 </node>
122 <!-- vim:set sw=2 sts=2 et ft=xml: -->
0 <?xml version="1.0" ?>
1 <node name="/Channel_Interface_Media_Signalling" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
2 <tp:copyright> Copyright (C) 2005, 2006 Collabora Limited </tp:copyright>
3 <tp:copyright> Copyright (C) 2005, 2006 Nokia Corporation </tp:copyright>
4 <tp:copyright> Copyright (C) 2006 INdT </tp:copyright>
5 <tp:license xmlns="http://www.w3.org/1999/xhtml">
6 <p>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.</p>
10
11 <p>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 Library General Public License for more details.</p>
15
16 <p>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, MA 02110-1301, USA.</p>
19 </tp:license>
20 <interface name="org.freedesktop.Telepathy.Channel.Interface.MediaSignalling">
21 <tp:requires interface="org.freedesktop.Telepathy.Channel"/>
22 <tp:requires interface="org.freedesktop.Telepathy.Channel.Type.StreamedMedia"/>
23 <method name="GetSessionHandlers">
24 <arg direction="out" type="a(os)"/>
25 <tp:docstring>
26 Returns all currently active session handlers on this channel
27 as a list of (session_handler_path, type).
28 </tp:docstring>
29 </method>
30 <signal name="NewSessionHandler">
31 <arg name="session_handler" type="o">
32 <tp:docstring>
33 Object path of the new MediaSessionHandler object
34 </tp:docstring>
35 </arg>
36 <arg name="type" type="s">
37 <tp:docstring>
38 String indicating type of session, eg &quot;rtp&quot;
39 </tp:docstring>
40 </arg>
41 <tp:docstring>
42 Signal that a session handler object has been created. The client
43 should create a session object and create streams for the streams
44 within.
45 </tp:docstring>
46 </signal>
47 <tp:property name="nat-traversal" type="s">
48 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
49 <p>A string indicating the NAT traversal techniques employed by the
50 streams within this channel. Can be protocol-specific values, but the
51 following values should be used if appropriate:</p>
52
53 <dl>
54 <dt>none</dt>
55 <dd>No attempt should be made at NAT traversal.</dd>
56
57 <dt>stun</dt>
58 <dd>If appropriate, a STUN request should be made to the given server
59 to open a UDP port mapping and determine the external IP.</dd>
60
61 <dt>gtalk-p2p</dt>
62 <dd>Google Talk peer-to-peer connectivity establishment should be used,
63 as implemented in libjingle 0.3.</dd>
64 </dl>
65 </tp:docstring>
66 </tp:property>
67 <tp:property name="stun-server" type="s">
68 <tp:docstring>
69 The IP address or hostname of the STUN server to use for NAT traversal.
70 </tp:docstring>
71 </tp:property>
72 <tp:property name="stun-port" type="q">
73 <tp:docstring>
74 The UDP port number to use on the provided STUN server.
75 </tp:docstring>
76 </tp:property>
77 <tp:property name="gtalk-p2p-relay-token" type="s">
78 <tp:docstring>
79 The authentication token for use with the Google Talk peer-to-peer relay
80 server.
81 </tp:docstring>
82 </tp:property>
83 <tp:docstring>
84 An interface for signalling a channel containing synchronised media
85 sessions which can contain an arbitrary number of streams. The negotiation
86 interface is based closely around the API of the Farsight library
87 (http://farsight.sourceforge.net/). This in turn is based upon the IETF
88 MMusic ICE drafts where connections are established by signalling potential
89 connection candidates to the peer until a usable connection is found, and
90 codecs are negotiated with an SDP-style offer and answer. However, the
91 principles should be applicable to other media streaming methods and the
92 API re-used without difficulty.
93 </tp:docstring>
94 </interface>
95 </node>
96 <!-- vim:set sw=2 sts=2 et ft=xml: -->
0 <?xml version="1.0" ?>
1 <node name="/Channel_Interface_Password" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
2 <tp:copyright>
3 Copyright (C) 2005, 2006 Collabora Limited
4 Copyright (C) 2005, 2006 Nokia Corporation
5 Copyright (C) 2006 INdT
6 </tp:copyright>
7 <tp:license>
8 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.
12
13 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 Library General Public License for more details.
17
18 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, USA.
21 </tp:license>
22 <interface name="org.freedesktop.Telepathy.Channel.Interface.Password">
23 <tp:requires interface="org.freedesktop.Telepathy.Channel"/>
24 <tp:flags name="Channel_Password_Flags" value-prefix="Channel_Password_Flag" type="u">
25 <tp:flag suffix="Provide" value="8">
26 <tp:docstring>
27 The ProvidePassword method must be called now for the user to join
28 the channel
29 </tp:docstring>
30 </tp:flag>
31 </tp:flags>
32 <method name="GetPasswordFlags">
33 <arg direction="out" type="u" tp:type="Channel_Password_Flags">
34 <tp:docstring>
35 An integer with the logical OR of all the flags set
36 (values of ChannelPasswordFlags)
37 </tp:docstring>
38 </arg>
39 <tp:docstring>
40 Returns the bitwise-OR of the flags relevant to the password on this
41 channel. The user interface can use this to present information about
42 which operations are currently valid.
43 </tp:docstring>
44 <tp:possible-errors>
45 <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
46 <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
47 </tp:possible-errors>
48 </method>
49 <signal name="PasswordFlagsChanged">
50 <arg name="added" type="u" tp:type="Channel_Password_Flags">
51 <tp:docstring>
52 A bitwise OR of the flags which have been set
53 </tp:docstring>
54 </arg>
55 <arg name="removed" type="u" tp:type="Channel_Password_Flags">
56 <tp:docstring>
57 A bitwise OR of the flags which have been cleared
58 </tp:docstring>
59 </arg>
60 <tp:docstring>
61 Emitted when the flags as returned by GetPasswordFlags are changed.
62 The user interface should be updated as appropriate.
63 </tp:docstring>
64 </signal>
65 <method name="ProvidePassword">
66 <arg direction="in" name="password" type="s">
67 <tp:docstring>
68 The password
69 </tp:docstring>
70 </arg>
71 <arg direction="out" type="b">
72 A boolean indicating whether or not the password was correct
73 </arg>
74 <tp:docstring>
75 Provide the password so that the channel can be joined. Must be
76 called with the correct password in order for channel joining to
77 proceed if the 'provide' password flag is set.
78 </tp:docstring>
79 <tp:possible-errors>
80 <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
81 <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
82 <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument"/>
83 </tp:possible-errors>
84 </method>
85 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
86 <p>Interface for channels that may have a password set that users need
87 to provide before being able to join, or may be able to view or change
88 once they have joined the channel.</p>
89
90 <p>The GetPasswordFlags method and the associated PasswordFlagsChanged
91 signal indicate whether the channel has a password, whether the user
92 must now provide it to join, and whether it can be viewed or changed
93 by the user.</p>
94 </tp:docstring>
95 </interface>
96 </node>
97 <!-- vim:set sw=2 sts=2 et ft=xml: -->
0 <?xml version="1.0" ?>
1 <node name="/Channel_Interface_Transfer" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
2 <tp:copyright> Copyright (C) 2005, 2006 Collabora Limited </tp:copyright>
3 <tp:copyright> Copyright (C) 2005, 2006 Nokia Corporation </tp:copyright>
4 <tp:copyright> Copyright (C) 2006 INdT </tp:copyright>
5 <tp:license xmlns="http://www.w3.org/1999/xhtml">
6 <p>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.</p>
10
11 <p>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 Library General Public License for more details.</p>
15
16 <p>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, MA 02110-1301, USA.</p>
19 </tp:license>
20 <interface name="org.freedesktop.Telepathy.Channel.Interface.Transfer">
21 <tp:requires interface="org.freedesktop.Telepathy.Channel"/>
22 <method name="Transfer">
23 <arg direction="in" name="member" type="u" tp:type="Contact_Handle">
24 <tp:docstring>
25 The handle of the member to transfer
26 </tp:docstring>
27 </arg>
28 <arg direction="in" name="destination" type="u" tp:type="Contact_Handle">
29 <tp:docstring>
30 The handle of the destination contact
31 </tp:docstring>
32 </arg>
33 <tp:docstring>
34 Request that the given channel member instead connects to a different
35 contact ID.
36 </tp:docstring>
37 <tp:possible-errors>
38 <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
39 <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
40 <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable"/>
41 <tp:error name="org.freedesktop.Telepathy.Error.InvalidHandle"/>
42 <tp:error name="org.freedesktop.Telepathy.Error.PermissionDenied"/>
43 </tp:possible-errors>
44 </method>
45 <tp:docstring>
46 An interface for channels where you may request that one of the members
47 connects to somewhere else instead.
48 </tp:docstring>
49 </interface>
50 </node>
51 <!-- vim:set sw=2 sts=2 et ft=xml: -->
0 <?xml version="1.0" ?>
1 <node name="/Channel_Type_Contact_List" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
2 <tp:copyright> Copyright (C) 2005, 2006 Collabora Limited </tp:copyright>
3 <tp:copyright> Copyright (C) 2005, 2006 Nokia Corporation </tp:copyright>
4 <tp:copyright> Copyright (C) 2006 INdT </tp:copyright>
5 <tp:license xmlns="http://www.w3.org/1999/xhtml">
6 <p>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.</p>
10
11 <p>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 Library General Public License for more details.</p>
15
16 <p>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, MA 02110-1301, USA.</p>
19 </tp:license>
20 <interface name="org.freedesktop.Telepathy.Channel.Type.ContactList">
21 <tp:requires interface="org.freedesktop.Telepathy.Channel"/>
22 <tp:requires interface="org.freedesktop.Telepathy.Channel.Interface.Group"/>
23 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
24 <p>A channel type for representing a list of people on the server which is
25 not used for communication. This is intended for use with the interface
26 Channel.Interface.Group for managing buddy lists and privacy lists
27 on the server. This channel type has no methods because all of the
28 functionality it represents is available via the group interface.</p>
29
30 <p>There are currently two types of contact list:
31 HANDLE_TYPE_LIST is a &quot;magic&quot; server-defined list, and
32 HANDLE_TYPE_GROUP is a user-defined contact group.</p>
33
34 <p>For server-defined lists like the subscribe list, singleton instances
35 of this channel type should be created by the connection manager at
36 connection time if the list exists on the server, or may be requested
37 by using the appropriate handle. These handles can be obtained using
38 RequestHandle with a handle type of HANDLE_TYPE_LIST and
39 one of the following identifiers:</p>
40
41 <ul>
42 <li>subscribe - the group of contacts for whom you wish to receive presence</li>
43 <li>publish - the group of contacts who may receive your presence</li>
44 <li>hide - a group of contacts who are on the publish list but are temporarily disallowed from receiving your presence</li>
45 <li>allow - a group of contacts who may send you messages</li>
46 <li>deny - a group of contacts who may not send you messages</li>
47 </ul>
48
49 <p>These contact list channels may not be closed.</p>
50
51 <p>For user-defined contact groups, instances of this channel type should
52 be created by the connection manager at connection time for each group
53 that exists on the server. New, empty groups can be created by calling
54 RequestHandle with a handle type of
55 HANDLE_TYPE_GROUP and with the name set to the
56 human-readable UTF-8 name of the group.</p>
57
58 <p>User-defined groups may be deleted by closing the channel, but only if
59 the group is already empty. Closing a channel to a non-empty group is
60 not allowed; its members must be set to the empty set first.</p>
61
62 <p>On some protocols (e.g. XMPP) empty groups are not represented on the
63 server, so disconnecting from the server and reconnecting might cause
64 empty groups to vanish.</p>
65 </tp:docstring>
66 </interface>
67 </node>
68 <!-- vim:set sw=2 sts=2 et ft=xml: -->
0 <?xml version="1.0" ?>
1 <node name="/Channel_Type_Contact_Search" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
2 <tp:copyright> Copyright (C) 2005, 2006 Collabora Limited </tp:copyright>
3 <tp:copyright> Copyright (C) 2005, 2006 Nokia Corporation </tp:copyright>
4 <tp:copyright> Copyright (C) 2006 INdT </tp:copyright>
5 <tp:license xmlns="http://www.w3.org/1999/xhtml">
6 <p>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.</p>
10
11 <p>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 Library General Public License for more details.</p>
15
16 <p>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, MA 02110-1301, USA.</p>
19 </tp:license>
20 <interface name="org.freedesktop.Telepathy.Channel.Type.ContactSearch">
21 <tp:requires interface="org.freedesktop.Telepathy.Channel"/>
22 <method name="GetSearchKeys">
23 <arg direction="out" type="s">
24 <tp:docstring>
25 A string with any instructions from the server
26 </tp:docstring>
27 </arg>
28 <arg direction="out" type="a{s(bg)}">
29 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
30 A dictionary mapping string search key names to an array of:
31 <ul>
32 <li>booleans indicating if the search key is mandatory</li>
33 <li>type signature of the value for this search key</li>
34 </ul>
35 </tp:docstring>
36 </arg>
37 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
38 <p>Returns any instructions from the server along with a dictionary of
39 search key names to their types, and a boolean indicating if the key is
40 mandatory. The following well-known search key names should be used
41 where appropriate:</p>
42 <dl>
43 <dt>s:first</dt><dd>The desired contact's given name</dd>
44 <dt>s:last</dt><dd>The desired contact's family name</dd>
45 <dt>s:nick</dt><dd>The desired contact's nickname</dd>
46 <dt>s:email</dt><dd>The e-mail address of the desired contact</dd>
47 </dl>
48 </tp:docstring>
49 <tp:possible-errors>
50 <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
51 <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
52 <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable"/>
53 </tp:possible-errors>
54 </method>
55 <tp:enum name="Channel_Contact_Search_State" type="u">
56 <tp:enumvalue suffix="Before" value="0">
57 <tp:docstring>The search has not started</tp:docstring>
58 </tp:enumvalue>
59 <tp:enumvalue suffix="During" value="1">
60 <tp:docstring>The search is in progress</tp:docstring>
61 </tp:enumvalue>
62 <tp:enumvalue suffix="After" value="2">
63 <tp:docstring>The search has been completed</tp:docstring>
64 </tp:enumvalue>
65 </tp:enum>
66 <method name="GetSearchState">
67 <arg direction="out" type="u" tp:type="Channel_Contact_Search_State">
68 <tp:docstring>The search state represented as one of the values of
69 ChannelContactSearchState</tp:docstring>
70 </arg>
71 <tp:docstring>
72 Returns the current state of this search channel object.
73 </tp:docstring>
74 </method>
75 <method name="Search">
76 <arg direction="in" name="terms" type="a{sv}">
77 <tp:docstring>
78 A dictionary mapping search key names to the desired values
79 </tp:docstring>
80 </arg>
81 <tp:docstring>
82 Send a request to start a search for contacts on this connection. A
83 valid search request will cause the SearchStateChanged signal to be
84 emitted with the status CHANNEL_CONTACT_SEARCH_STATE_DURING.
85 </tp:docstring>
86 <tp:possible-errors>
87 <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
88 <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
89 <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument"/>
90 </tp:possible-errors>
91 </method>
92 <signal name="SearchResultReceived">
93 <arg name="contact" type="u" tp:type="Contact_Handle">
94 <tp:docstring>An integer handle for the contact</tp:docstring>
95 </arg>
96 <arg name="values" type="a{sv}">
97 <tp:docstring>A dictionary mapping search key names to values for this contact</tp:docstring>
98 </arg>
99 <tp:docstring>
100 Emitted when a search result is received from the server.
101 </tp:docstring>
102 </signal>
103 <signal name="SearchStateChanged">
104 <arg name="state" type="u" tp:type="Channel_Contact_Search_State">
105 <tp:docstring>An integer representing the new search state</tp:docstring>
106 </arg>
107 <tp:docstring>
108 Emitted when the search state (as returned by the GetSearchState
109 method) changes.
110 </tp:docstring>
111 </signal>
112 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
113 <p>A channel type for searching server-stored user directories. A new channel
114 should be requested by a client for each search attempt, and it should be
115 closed when the search is completed or the required result has been found
116 in order to free unused handles. The search can be cancelled at any time
117 by calling the channel Close method, although depending upon the protocol
118 the connection manager may not be able to prevent the server from sending
119 further results.</p>
120
121 <p>Before searching, the GetSearchKeys method should be used to discover any
122 instructions sent by the server, and the valid search keys which can be
123 provided to the Search method. A search request is then started by
124 providing some of these terms to the Search method, and the search status
125 will be set to CHANNEL_CONTACT_SEARCH_STATE_DURING. When results are
126 returned by the server, the SearchResultReceived signal is emitted for each
127 contact found, and when the search is complete, the search status will be
128 set to CHANNEL_SEARCH_STATE_AFTER.</p>
129 </tp:docstring>
130 </interface>
131 </node>
132 <!-- vim:set sw=2 sts=2 et ft=xml: -->
0 <?xml version="1.0" ?>
1 <node name="/Channel_Type_Room_List" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
2 <tp:copyright> Copyright (C) 2005, 2006 Collabora Limited </tp:copyright>
3 <tp:copyright> Copyright (C) 2005, 2006 Nokia Corporation </tp:copyright>
4 <tp:copyright> Copyright (C) 2006 INdT </tp:copyright>
5 <tp:license xmlns="http://www.w3.org/1999/xhtml">
6 <p>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.</p>
10
11 <p>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 Library General Public License for more details.</p>
15
16 <p>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, MA 02110-1301, USA.</p>
19 </tp:license>
20 <interface name="org.freedesktop.Telepathy.Channel.Type.RoomList">
21 <tp:requires interface="org.freedesktop.Telepathy.Channel"/>
22 <method name="GetListingRooms">
23 <arg direction="out" type="b">
24 <tp:docstring>
25 A boolean indicating if room listing is in progress
26 </tp:docstring>
27 </arg>
28 <tp:docstring>
29 Check to see if there is already a room list request in progress
30 on this channel.
31 </tp:docstring>
32 </method>
33 <signal name="GotRooms">
34 <arg name="rooms" type="a(usa{sv})">
35 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
36 An array of structs containing:
37 <ul>
38 <li>an integer room handle</li>
39 <li>a string representing the D-Bus interface name of the channel type</li>
40 <li>a dictionary mapping string keys to variant boxed information</li>
41 </ul>
42 </tp:docstring>
43 </arg>
44 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
45 <p>Emitted when information about rooms on the server becomes available.
46 The array contains the room handle (as can be passed to the
47 RequestChannel method with HANDLE_TYPE_ROOM), the channel
48 type, and a dictionary containing further information about the
49 room as available. The following well-known keys and types are
50 recommended for use where appropriate:</p>
51
52 <dl>
53 <dt>s:handle-name</dt><dd>The string name of the room handle (as would be returned by InspectHandles)</dd>
54 <dt>s:name</dt><dd>The human-readable name of the room if different from the handle</dd>
55 <dt>s:description</dt><dd>A description of the room's overall purpose</dd>
56 <dt>s:subject</dt><dd>The current subject of conversation in the room</dd>
57 <dt>u:members</dt><dd>The number of members of the room</dd>
58 <dt>b:password</dt><dd>True if the room requires a password to enter</dd>
59 <dt>b:invite-only</dt><dd>True if you cannot join the room, but must be invited</dd>
60 </dl>
61 </tp:docstring>
62 </signal>
63 <method name="ListRooms">
64 <tp:docstring>
65 Request the list of rooms from the server. The ListingRooms signal
66 should be emitted when this request is being processed, GotRooms when
67 any room information is received, and ListingRooms when the request
68 is complete.
69 </tp:docstring>
70 <tp:possible-errors>
71 <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
72 <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
73 <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable"/>
74 <tp:error name="org.freedesktop.Telepathy.Error.PermissionDenied"/>
75 </tp:possible-errors>
76 </method>
77 <method name="StopListing">
78 <tp:docstring>
79 Stop the room listing if it's in progress, but don't close the channel.
80 The ListingRooms signal should be emitted when the listing stops.
81 </tp:docstring>
82 </method>
83 <signal name="ListingRooms">
84 <arg name="listing" type="b">
85 <tp:docstring>A boolean indicating if room listing is in progress</tp:docstring>
86 </arg>
87 <tp:docstring>
88 Emitted to indicate whether or not room listing request is currently
89 in progress.
90 </tp:docstring>
91 </signal>
92 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
93 <p>A channel type for listing named channels available on the server. Once the
94 ListRooms method is called, it emits signals for rooms present on the
95 server, until you Close this channel. In some cases, it may not be possible
96 to stop the deluge of information from the server. This channel should be
97 closed when the room information is no longer being displayed, so that the
98 room handles can be freed.</p>
99
100 <p>This channel type may be implemented as a singleton on some protocols, so
101 clients should be prepared for the eventuality that they are given a
102 channel that is already in the middle of listing channels. The ListingRooms
103 signal, or GetListingRooms method, can be used to check this.</p>
104 </tp:docstring>
105 </interface>
106 </node>
107 <!-- vim:set sw=2 sts=2 et ft=xml: -->
0 <?xml version="1.0" ?>
1 <node name="/Channel_Type_Streamed_Media" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
2 <tp:copyright> Copyright (C) 2005, 2006 Collabora Limited </tp:copyright>
3 <tp:copyright> Copyright (C) 2005, 2006 Nokia Corporation </tp:copyright>
4 <tp:copyright> Copyright (C) 2006 INdT </tp:copyright>
5 <tp:license xmlns="http://www.w3.org/1999/xhtml">
6 <p>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.</p>
10
11 <p>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 Library General Public License for more details.</p>
15
16 <p>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, MA 02110-1301, USA.</p>
19 </tp:license>
20 <interface name="org.freedesktop.Telepathy.Channel.Type.StreamedMedia">
21 <tp:requires interface="org.freedesktop.Telepathy.Channel"/>
22 <tp:requires interface="org.freedesktop.Telepathy.Channel.Interface.Group"/>
23 <tp:enum name="Media_Stream_Type" type="u">
24 <tp:enumvalue suffix="Audio" value="0">
25 <tp:docstring>An audio stream</tp:docstring>
26 </tp:enumvalue>
27 <tp:enumvalue suffix="Video" value="1">
28 <tp:docstring>A video stream</tp:docstring>
29 </tp:enumvalue>
30 </tp:enum>
31 <tp:enum name="Media_Stream_State" type="u">
32 <tp:enumvalue suffix="Disconnected" value="0">
33 <tp:docstring>The stream is disconnected.</tp:docstring>
34 </tp:enumvalue>
35 <tp:enumvalue suffix="Connecting" value="1">
36 <tp:docstring>The stream is trying to connect.</tp:docstring>
37 </tp:enumvalue>
38 <tp:enumvalue suffix="Connected" value="2">
39 <tp:docstring>The stream is connected.</tp:docstring>
40 </tp:enumvalue>
41 </tp:enum>
42 <tp:enum name="Media_Stream_Direction" type="u">
43 <tp:enumvalue suffix="None" value="0">
44 <tp:docstring>Media are not being sent or received</tp:docstring>
45 </tp:enumvalue>
46 <tp:enumvalue suffix="Send" value="1">
47 <tp:docstring>Media are being sent, but not received</tp:docstring>
48 </tp:enumvalue>
49 <tp:enumvalue suffix="Receive" value="2">
50 <tp:docstring>Media are being received, but not sent</tp:docstring>
51 </tp:enumvalue>
52 <tp:enumvalue suffix="Bidirectional" value="3">
53 <tp:docstring>Media are being sent and received</tp:docstring>
54 </tp:enumvalue>
55 </tp:enum>
56 <tp:flags name="Media_Stream_Pending_Send" value-prefix="Media_Stream_Pending" type="u">
57 <tp:flag suffix="Local_Send" value="1">
58 <tp:docstring>
59 The local user has been asked to send media by the remote user.
60 Call RequestStreamDirection to indicate whether or not this is
61 acceptable.
62 </tp:docstring>
63 </tp:flag>
64 <tp:flag suffix="Remote_Send" value="2">
65 <tp:docstring>
66 The remote user has been asked to send media by the local user.
67 The StreamDirectionChanged signal will be emitted when the remote
68 user accepts or rejects this change.
69 </tp:docstring>
70 </tp:flag>
71 </tp:flags>
72 <method name="ListStreams">
73 <arg direction="out" type="a(uuuuuu)">
74 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
75 An array of structs containing:
76 <ul>
77 <li>the stream identifier</li>
78 <li>the contact handle who the stream is with (or 0 if the stream
79 represents more than a single member)</li>
80 <li>the type of the stream</li>
81 <li>the current stream state</li>
82 <li>the current direction of the stream</li>
83 <li>the current pending send flags</li>
84 </ul>
85 </tp:docstring>
86 </arg>
87 <tp:docstring>
88 Returns an array of structs representing the streams currently active
89 within this channel. Each stream is identified by an unsigned integer
90 which is unique for each stream within the channel.
91 </tp:docstring>
92 </method>
93 <method name="RemoveStreams">
94 <arg direction="in" name="streams" type="au">
95 <tp:docstring>
96 An array of stream identifiers (as defined in ListStreams)
97 </tp:docstring>
98 </arg>
99 <tp:docstring>
100 Request that the given streams are removed.
101 </tp:docstring>
102 <tp:possible-errors>
103 <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
104 A stream identifier is unknown
105 </tp:error>
106 </tp:possible-errors>
107 </method>
108 <method name="RequestStreamDirection">
109 <arg direction="in" name="stream_id" type="u">
110 <tp:docstring>
111 The stream identifier (as defined in ListStreams)
112 </tp:docstring>
113 </arg>
114 <arg direction="in" name="stream_direction" type="u" tp:type="Media_Stream_Direction">
115 <tp:docstring>
116 The desired stream direction (a value of MediaStreamDirection)
117 </tp:docstring>
118 </arg>
119 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
120 <p>Request a change in the direction of an existing stream. In particular,
121 this might be useful to stop sending media of a particular type,
122 or inform the peer that you are no longer using media that is being
123 sent to you.</p>
124
125 <p>Depending on the protocol, streams which are no longer sending in
126 either direction should be removed and a StreamRemoved signal emitted.
127 Some direction changes can be enforced locally (for example,
128 BIDIRECTIONAL -&gt; RECEIVE can be achieved by merely stopping sending),
129 others may not be possible on some protocols, and some need agreement
130 from the remote end. In this case, the MEDIA_STREAM_PENDING_REMOTE_SEND
131 flag will be set in the StreamDirectionChanged signal, and the signal
132 emitted again without the flag to indicate the resulting direction when
133 the remote end has accepted or rejected the change.</p>
134 </tp:docstring>
135 <tp:possible-errors>
136 <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
137 A stream identifier is unknown
138 </tp:error>
139 <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
140 The requested direction is not available on this stream
141 </tp:error>
142 </tp:possible-errors>
143 </method>
144 <method name="RequestStreams">
145 <arg direction="in" name="contact_handle" type="u" tp:type="Contact_Handle">
146 <tp:docstring>
147 A contact handle with whom to establish the streams
148 </tp:docstring>
149 </arg>
150 <arg direction="in" name="types" type="au">
151 <tp:docstring>
152 An array of stream types (values of MediaStreamType)
153 </tp:docstring>
154 </arg>
155 <arg direction="out" type="a(uuuuuu)">
156 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
157 An array of structs (in the same order as the given stream types)
158 containing:
159 <ul>
160 <li>the stream identifier</li>
161 <li>the contact handle who the stream is with (or 0 if the stream
162 represents more than a single member)</li>
163 <li>the type of the stream</li>
164 <li>the current stream state</li>
165 <li>the current direction of the stream</li>
166 <li>the current pending send flags</li>
167 </ul>
168 </tp:docstring>
169 </arg>
170 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
171 <p>Request that streams be established to exchange the given types of
172 media with the given member. In general this will try and establish a
173 bidirectional stream, but on some protocols it may not be possible to
174 indicate to the peer that you would like to receive media, so a
175 send-only stream will be created initially. In the cases where the
176 stream requires remote agreement (eg you wish to receive media from
177 them), the StreamDirectionChanged signal will be emitted with the
178 MEDIA_STREAM_PENDING_REMOTE_SEND flag set, and the signal emitted again
179 with the flag cleared when the remote end has replied.</p>
180 </tp:docstring>
181 <tp:possible-errors>
182 <tp:error name="org.freedesktop.Telepathy.Error.InvalidHandle"/>
183 <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
184 A stream type given is invalid
185 </tp:error>
186 <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
187 That contact is not able to do this stream type
188 </tp:error>
189 </tp:possible-errors>
190 </method>
191 <signal name="StreamAdded">
192 <arg name="stream_id" type="u">
193 <tp:docstring>
194 The stream identifier (as defined in ListStreams)
195 </tp:docstring>
196 </arg>
197 <arg name="contact_handle" type="u" tp:type="Contact_Handle">
198 <tp:docstring>
199 The contact handle who the stream is with (or 0 if it
200 represents more than a single member)
201 </tp:docstring>
202 </arg>
203 <arg name="stream_type" type="u" tp:type="Media_Stream_Type">
204 <tp:docstring>
205 The stream type (a value from MediaStreamType)
206 </tp:docstring>
207 </arg>
208 <tp:docstring>
209 Emitted when a new stream has been added to this channel.
210 </tp:docstring>
211 </signal>
212 <signal name="StreamDirectionChanged">
213 <arg name="stream_id" type="u">
214 <tp:docstring>
215 The stream identifier (as defined in ListStreams)
216 </tp:docstring>
217 </arg>
218 <arg name="stream_direction" type="u" tp:type="Media_Stream_Direction">
219 <tp:docstring>
220 The new stream direction (as defined in ListStreams)
221 </tp:docstring>
222 </arg>
223 <arg name="pending_flags" type="u" tp:type="Media_Stream_Pending_Send">
224 <tp:docstring>
225 The new pending send flags (as defined in ListStreams)
226 </tp:docstring>
227 </arg>
228 <tp:docstring>
229 Emitted when the direction or pending flags of a stream are changed. If
230 the MEDIA_STREAM_PENDING_LOCAL_SEND flag is set, the remote user has
231 requested that we begin sending on this stream. RequestStreamDirection
232 should be called to indicate whether or not this change is acceptable.
233 </tp:docstring>
234 </signal>
235 <signal name="StreamError">
236 <arg name="stream_id" type="u">
237 <tp:docstring>
238 The stream identifier (as defined in ListStreams)
239 </tp:docstring>
240 </arg>
241 <arg name="errno" type="u">
242 <tp:docstring>
243 A stream error number, one of the values of MediaStreamError
244 </tp:docstring>
245 </arg>
246 <arg name="message" type="s">
247 <tp:docstring>
248 A string describing the error (for debugging purposes only)
249 </tp:docstring>
250 </arg>
251 <tp:docstring>
252 Emitted when a stream encounters an error.
253 </tp:docstring>
254 </signal>
255 <signal name="StreamRemoved">
256 <arg name="stream_id" type="u">
257 <tp:docstring>
258 stream_id - the stream identifier (as defined in ListStreams)
259 </tp:docstring>
260 </arg>
261 <tp:docstring>
262 Emitted when a stream has been removed from this channel.
263 </tp:docstring>
264 </signal>
265 <signal name="StreamStateChanged">
266 <arg name="stream_id" type="u">
267 <tp:docstring>
268 The stream identifier (as defined in ListStreams)
269 </tp:docstring>
270 </arg>
271 <arg name="stream_state" type="u" tp:type="Media_Stream_State">
272 <tp:docstring>
273 The new stream state (as defined in ListStreams)
274 </tp:docstring>
275 </arg>
276 <tp:docstring>
277 Emitted when a member's stream's state changes.
278 </tp:docstring>
279 </signal>
280 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
281 <p>A channel that can send and receive streamed media such as audio or video.
282 Provides a number of methods for listing and requesting new streams, and
283 signals to indicate when streams have been added, removed and changed
284 status.</p>
285
286 <p>Channels of this type are expected to provide the Group interface
287 and be "anonymous" (have no associated handle). To make a media call
288 to a contact, clients should request a new, empty streamed media
289 channel, then call AddMembers to add the contact to the channel.
290 The local user should be in the group's members, while the contact
291 should be in "remote pending" until the call is accepted, then
292 move to the group's members.</p>
293
294 <p>Similarly, incoming calls should be signalled as having handle type 0
295 and handle 0. The remote contact should be in the group's members,
296 with the local user in the "local pending" members; to accept the
297 call, AddMembers can be used to move the local user to the
298 group's members.</p>
299
300 <p>In general this should be used in conjunction with the MediaSignalling
301 interface to exchange connection candidates and codec choices with
302 whichever component is responsible for the streams. However, in certain
303 applications where no candidate exchange is necessary (eg the streams are
304 handled by specialised hardware which is controlled directly by the
305 connection manager), the signalling interface can be omitted and this
306 channel type used simply to control the streams.</p>
307 </tp:docstring>
308 <tp:flags name="Channel_Media_Capabilities" value-prefix="Channel_Media_Capability" type="u">
309 <tp:docstring>
310 The channel-type-specific capability flags used for
311 Channel.Type.StreamedMedia in the Connection.Interface.Capabilities
312 interface.
313 </tp:docstring>
314 <tp:flag suffix="Audio" value="1">
315 <tp:docstring>
316 The handle is capable of using audio streams within a media channel.
317 </tp:docstring>
318 </tp:flag>
319 <tp:flag suffix="Video" value="2">
320 <tp:docstring>
321 The handle is capable of using video streams within a media channel.
322 </tp:docstring>
323 </tp:flag>
324 <tp:flag suffix="NAT_Traversal_STUN" value="4">
325 <tp:docstring>
326 The handle is capable of performing STUN to traverse NATs.
327 </tp:docstring>
328 </tp:flag>
329 <tp:flag suffix="NAT_Traversal_GTalk_P2P" value="8">
330 <tp:docstring>
331 The handle is capable of establishing Google Talk peer-to-peer
332 connections (as implemented in libjingle 0.3) to traverse NATs.
333 </tp:docstring>
334 </tp:flag>
335 </tp:flags>
336 </interface>
337 </node>
338 <!-- vim:set sw=2 sts=2 et ft=xml: -->
0 <?xml version="1.0" ?>
1 <node name="/Channel_Type_Text" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
2 <tp:copyright> Copyright (C) 2005, 2006 Collabora Limited </tp:copyright>
3 <tp:copyright> Copyright (C) 2005, 2006 Nokia Corporation </tp:copyright>
4 <tp:copyright> Copyright (C) 2006 INdT </tp:copyright>
5 <tp:license xmlns="http://www.w3.org/1999/xhtml">
6 <p>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.</p>
10
11 <p>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 Library General Public License for more details.</p>
15
16 <p>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, MA 02110-1301, USA.</p>
19 </tp:license>
20 <interface name="org.freedesktop.Telepathy.Channel.Type.Text">
21 <tp:requires interface="org.freedesktop.Telepathy.Channel"/>
22 <method name="AcknowledgePendingMessages">
23 <arg direction="in" name="ids" type="au">
24 <tp:docstring>
25 The IDs of the messages to acknowledge
26 </tp:docstring>
27 </arg>
28 <tp:docstring>
29 Inform the channel that you have handled messages by displaying them to
30 the user (or equivalent), so they can be removed from the pending queue.
31 </tp:docstring>
32 <tp:possible-errors>
33 <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
34 A given message ID was not found, so no action was taken
35 </tp:error>
36 </tp:possible-errors>
37 </method>
38 <method name="GetMessageTypes">
39 <arg direction="out" type="au" tp:type="Channel_Text_Message_Type[]">
40 <tp:docstring>
41 An array of integer message types (ChannelTextMessageType)
42 </tp:docstring>
43 </arg>
44 <tp:docstring>
45 Return an array indicating which types of message may be sent on this
46 channel.
47 </tp:docstring>
48 </method>
49 <method name="ListPendingMessages">
50 <arg direction="in" name="clear" type="b">
51 <tp:docstring>
52 If true, remove all messages from the queue
53 </tp:docstring>
54 </arg>
55 <arg direction="out" type="a(uuuuus)">
56 <tp:docstring>
57 An array of structs representing the pending queue. Each contains:
58 <ul>
59 <li>a numeric identifier</li>
60 <li>a Unix timestamp indicating when the message was received</li>
61 <li>the contact handle for the contact who sent the message</li>
62 <li>the message type, taken from ChannelTextMessageType</li>
63 <li>the bitwise-OR of the message flags from ChannelTextMessageFlags</li>
64 <li>the text of the message</li>
65 </ul>
66 </tp:docstring>
67 </arg>
68 <tp:docstring>
69 List the messages currently in the pending queue, and optionally
70 remove then all.
71 </tp:docstring>
72 </method>
73 <signal name="LostMessage">
74 <tp:docstring>
75 This signal is emitted to indicate that an incoming message was
76 not able to be stored and forwarded by the connection manager
77 due to lack of memory.
78 </tp:docstring>
79 </signal>
80 <signal name="Received">
81 <arg name="id" type="u">
82 <tp:docstring>
83 A numeric identifier for acknowledging the message
84 </tp:docstring>
85 </arg>
86 <arg name="timestamp" type="u" tp:type="Timestamp">
87 <tp:docstring>
88 A Unix timestamp indicating when the message was received
89 </tp:docstring>
90 </arg>
91 <arg name="sender" type="u" tp:type="Contact_Handle">
92 <tp:docstring>
93 The handle of the contact who sent the message
94 </tp:docstring>
95 </arg>
96 <arg name="type" type="u" tp:type="Channel_Text_Message_Type">
97 <tp:docstring>
98 The type of the message (normal, action, notice, etc), from
99 ChannelTextMessageType
100 </tp:docstring>
101 </arg>
102 <arg name="flags" type="u" tp:type="Channel_Text_Message_Flags">
103 <tp:docstring>
104 A bitwise OR of the message flags as defined by ChannelTextMessageFlags
105 </tp:docstring>
106 </arg>
107 <arg name="text" type="s">
108 <tp:docstring>
109 The text of the message
110 </tp:docstring>
111 </arg>
112 <tp:docstring>
113 Signals that a message with the given id, timestamp, sender, type
114 and text has been received on this channel. Applications that catch
115 this signal and reliably inform the user of the message should
116 acknowledge that they have dealt with the message with the
117 AcknowledgePendingMessage method.
118 </tp:docstring>
119 </signal>
120 <method name="Send">
121 <arg direction="in" name="type" type="u" tp:type="Channel_Text_Message_Type">
122 <tp:docstring>
123 An integer indicating the type of the message, from
124 ChannelTextMessageType
125 </tp:docstring>
126 </arg>
127 <arg direction="in" name="text" type="s">
128 <tp:docstring>
129 The message to send
130 </tp:docstring>
131 </arg>
132 <tp:docstring>
133 Request that a message be sent on this channel. The Sent signal will be
134 emitted when the message has been sent, and this method will return.
135 </tp:docstring>
136 <tp:possible-errors>
137 <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
138 <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
139 <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument"/>
140 <tp:error name="org.freedesktop.Telepathy.Error.PermissionDenied"/>
141 </tp:possible-errors>
142 </method>
143 <tp:enum name="Channel_Text_Send_Error" type="u">
144 <tp:enumvalue suffix="Unknown" value="0">
145 <tp:docstring>
146 An unknown error occurred
147 </tp:docstring>
148 </tp:enumvalue>
149 <tp:enumvalue suffix="Offline" value="1">
150 <tp:docstring>
151 The requested contact was offline
152 </tp:docstring>
153 </tp:enumvalue>
154 <tp:enumvalue suffix="Invalid_Contact" value="2">
155 <tp:docstring>
156 The requested contact is not valid
157 </tp:docstring>
158 </tp:enumvalue>
159 <tp:enumvalue suffix="Permission_Denied" value="3">
160 <tp:docstring>
161 The user does not have permission to speak on this channel
162 </tp:docstring>
163 </tp:enumvalue>
164 <tp:enumvalue suffix="Too_Long" value="4">
165 <tp:docstring>
166 The outgoing message was too long and was rejected by the server
167 </tp:docstring>
168 </tp:enumvalue>
169 <tp:enumvalue suffix="Not_Implemented" value="5">
170 <tp:docstring>
171 The channel doesn't support sending text messages to the requested
172 contact
173 </tp:docstring>
174 </tp:enumvalue>
175 </tp:enum>
176 <signal name="SendError">
177 <arg name="error" type="u">
178 <tp:docstring>
179 One of the values of ChannelTextSendError
180 </tp:docstring>
181 </arg>
182 <arg name="timestamp" type="u" tp:type="Timestamp">
183 <tp:docstring>
184 The Unix timestamp indicating when the message was sent
185 </tp:docstring>
186 </arg>
187 <arg name="type" type="u" tp:type="Channel_Text_Message_Type">
188 <tp:docstring>
189 The message type from ChannelTextMessageType
190 </tp:docstring>
191 </arg>
192 <arg name="text" type="s">
193 <tp:docstring>
194 The text of the message
195 </tp:docstring>
196 </arg>
197 <tp:docstring>
198 Signals that an outgoing message has failed to send. The error
199 will be one of the values from ChannelTextSendError.
200 </tp:docstring>
201 </signal>
202 <signal name="Sent">
203 <arg name="timestamp" type="u" tp:type="Timestamp">
204 <tp:docstring>
205 Unix timestamp indicating when the message was sent
206 </tp:docstring>
207 </arg>
208 <arg name="type" type="u" tp:type="Channel_Text_Message_Type">
209 <tp:docstring>
210 The message type (normal, action, notice, etc) from
211 ChannelTextMessageType
212 </tp:docstring>
213 </arg>
214 <arg name="text" type="s">
215 <tp:docstring>
216 The text of the message
217 </tp:docstring>
218 </arg>
219 <tp:docstring>
220 Signals that a message has been sent on this channel.
221 </tp:docstring>
222 </signal>
223 <tp:enum name="Channel_Text_Message_Type" type="u">
224 <tp:enumvalue suffix="Normal" value="0">
225 <tp:docstring>
226 A standard message
227 </tp:docstring>
228 </tp:enumvalue>
229 <tp:enumvalue suffix="Action" value="1">
230 <tp:docstring>
231 An action which might be presented to the user as
232 "* &lt;sender&gt; &lt;action&gt;"
233 </tp:docstring>
234 </tp:enumvalue>
235 <tp:enumvalue suffix="Notice" value="2">
236 <tp:docstring>
237 A one-off or automated message not necessarily expecting a reply
238 </tp:docstring>
239 </tp:enumvalue>
240 <tp:enumvalue suffix="Auto_Reply" value="3">
241 <tp:docstring>
242 An automatically-generated reply message
243 </tp:docstring>
244 </tp:enumvalue>
245 </tp:enum>
246 <tp:flags name="Channel_Text_Message_Flags" value-prefix="Channel_Text_Message_Flag" type="u">
247 <tp:flag suffix="Truncated" value="1">
248 <tp:docstring>
249 The incoming message was truncated to a shorter length by the
250 server or the connection manager.
251 </tp:docstring>
252 </tp:flag>
253 </tp:flags>
254 <tp:property name="anonymous" type="b">
255 <tp:docstring>
256 True if people may join the channel without other members being made
257 aware of their identity.
258 </tp:docstring>
259 </tp:property>
260 <tp:property name="invite-only" type="b">
261 <tp:docstring>
262 True if people may not join the channel until they have been invited.
263 </tp:docstring>
264 </tp:property>
265 <tp:property name="limit" type="u">
266 <tp:docstring>
267 The limit to the number of members, if limited is true.
268 </tp:docstring>
269 </tp:property>
270 <tp:property name="limited" type="b">
271 <tp:docstring>
272 True if there is a limit to the number of channel members.
273 </tp:docstring>
274 </tp:property>
275 <tp:property name="moderated" type="b">
276 <tp:docstring>
277 True if channel membership is not sufficient to allow participation.
278 </tp:docstring>
279 </tp:property>
280 <tp:property name="name" type="s">
281 <tp:docstring>
282 A human-visible name for the channel, if it differs from the string
283 version of the channel's handle.
284 </tp:docstring>
285 </tp:property>
286 <tp:property name="description" type="s">
287 <tp:docstring>
288 A human-readable description of the channel's overall purpose.
289 </tp:docstring>
290 </tp:property>
291 <tp:property name="password" type="s">
292 <tp:docstring>
293 The password required to enter the channel if password-required is true.
294 </tp:docstring>
295 </tp:property>
296 <tp:property name="password-required" type="b">
297 <tp:docstring>
298 True if a password must be provided to enter the channel.
299 </tp:docstring>
300 </tp:property>
301 <tp:property name="persistent" type="b">
302 <tp:docstring>
303 True if the channel will remain in existence on the server after all
304 members have left it.
305 </tp:docstring>
306 </tp:property>
307 <tp:property name="private" type="b">
308 <tp:docstring>
309 True if the channel is not visible to non-members.
310 </tp:docstring>
311 </tp:property>
312 <tp:property name="subject" type="s">
313 <tp:docstring>
314 A human-readable description of the current subject of conversation in
315 the channel, similar to /topic in IRC.
316 </tp:docstring>
317 </tp:property>
318 <tp:property name="subject-contact" type="u" tp:type="Contact_Handle">
319 <tp:docstring>
320 A contact handle representing who last modified the subject, or 0
321 if it isn't known.
322 </tp:docstring>
323 </tp:property>
324 <tp:property name="subject-timestamp" type="u" tp:type="Timestamp">
325 <tp:docstring>
326 A unix timestamp indicating when the subject was last modified.
327 </tp:docstring>
328 </tp:property>
329 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
330 <p>A channel type for sending and receiving messages in plain text, with no
331 formatting.</p>
332
333 <p>When a message is received, an identifier is assigned and a Received signal
334 emitted, and the message placed in a pending queue which can be inspected
335 with ListPendingMessages. A client which has handled the message by showing
336 it to the user (or equivalent) should acknowledge the receipt using the
337 AcknowledgePendingMessage method, and the message will then be removed from
338 the pending queue. Numeric identifiers for received messages may be reused
339 over the lifetime of the channel.</p>
340
341 <p>Each message has an associated 'type' value, which should be one of the
342 values allowed by ChannelTextMessageType.</p>
343
344 <p>Each message also has a flags value, which is a bitwise OR of the
345 flags given in ChannelTextMessageFlags.</p>
346
347 <p>Sending messages can be requested using the Send method, which will return
348 and cause the Sent signal to be emitted when the message has been delivered
349 to the server, or SendError if there is a failure.</p>
350
351 <p>On protocols where additional contacts cannot be invited into
352 a one-to-one chat, or where a one-to-one chat is just a series of
353 individual personal messages rather than being represented by some
354 object on the server (i.e. most protocols), one-to-one chats should be
355 represented by a Text channel with handle type CONTACT.</p>
356
357 <p>Named chat rooms whose identity can be saved and used again later
358 (IRC channels, Jabber MUCs) are expected to be represented by Text
359 channels with handle type ROOM and the Group interface; they should
360 usually also have the Properties interface.</p>
361
362 <p>Unnamed, transient chat rooms defined only by their members (e.g. on
363 MSN) are expected to be represented by Text channels with handle type
364 0, handle 0, the Group interface, and optionally the Properties
365 interface.</p>
366
367 <p>On protocols where a conversation with a user is actually just
368 a nameless chat room starting with exactly two members, to which
369 more members can be invited, calling RequestChannel with type Text
370 and handle type CONTACT should continue to succeed, but may return
371 a channel with handle type 0, handle 0, the group interface,
372 and the local and remote contacts in its members.</p>
373 </tp:docstring>
374 </interface>
375 </node>
376 <!-- vim:set sw=2 sts=2 et ft=xml: -->
0 <?xml version="1.0" ?>
1 <node name="/Channel_Type_Tubes" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
2 <tp:copyright>
3 Copyright (C) 2007 Collabora Limited
4 </tp:copyright>
5 <tp:license>
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.
10
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 Library General Public License for more details.
15
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, MA 02110-1301, USA.
19 </tp:license>
20 <interface name="org.freedesktop.Telepathy.Channel.Type.Tubes" tp:name-const="CHANNEL_TYPE_TUBES">
21 <tp:requires interface="org.freedesktop.Telepathy.Channel"/>
22 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
23 <p>A "tube" is a mechanism for arbitrary data transfer. Two types of
24 data transfer are currently specified: D-Bus messages, and streams of
25 bytes. Each tube has a service name, which is a string specifying the
26 kind of communication that takes place over it, and a dictionary of
27 arbitrary parameters. Tube parameters are commonly used for bootstrap
28 information such as usernames and passwords. Each tube is identified
29 by a locally unique identifier.</p>
30
31 <p>The Tubes channel type may be requested for handles of type
32 HANDLE_TYPE_CONTACT and HANDLE_TYPE_ROOM.</p>
33
34 <p>Stream tubes specify listening addresses using pairs of parameters
35 with signature 'u', 'v', where the integer 'u' is a member of
36 Socket_Address_Type and the v is dependent on the type of address.</p>
37 </tp:docstring>
38
39 <tp:enum name="Tube_Type">
40 <tp:enumvalue suffix="DBus" value="0">
41 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
42 <p>An ordered reliable transport, for transporting D-Bus
43 traffic.</p>
44
45 <p>For each D-Bus tube, the connection manager listens on a D-Bus
46 server address, as detailed in the D-Bus specification. On this
47 address, it emulates a bus upon which each tube participant appears
48 as an endpoint.</p>
49
50 <p>The objects and interfaces which are expected to exist on the
51 emulated bus depend on the well-known name; typically, either the
52 participant who initiated the tube is expected to export the same
53 objects/interfaces that would be exported by a service of that name
54 on a bus, or all participants are expected to export those
55 objects/interfaces.</p>
56
57 <p>In a multi-user context (Handle_Type_Room) the tube behaves
58 like the D-Bus bus daemon, so participants can send each other
59 private messages, or can send broadcast messages which are
60 received by everyone in the tube (including themselves).
61 Each participant has a D-Bus unique name; connection managers
62 must prevent participants from sending messages with the wrong
63 sender unique name, and should attempt to avoid participants
64 receiving messages not intended for them.</p>
65
66 <p>In a 1-1 context (Handle_Type_Contact) the tube behaves like
67 a peer-to-peer D-Bus connection - arbitrary D-Bus messages with
68 any sender and/or destination can be sent by each participant,
69 and each participant receives all messages sent by the other
70 participant.</p>
71 </tp:docstring>
72 </tp:enumvalue>
73
74 <tp:enumvalue suffix="Stream" value="1">
75 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
76 <p>A transport for ordered, reliable data transfer, similar to
77 SOCK_STREAM sockets.</p>
78
79 <p>When accepting a Stream Unix tube, a new listening local socket is
80 created. Each time the client connects to this socket, the
81 connection manager of the initiator of the tube opens a new
82 connection to its local socket. Both sides can then use this pair
83 of sockets to communicate together.</p>
84 </tp:docstring>
85 </tp:enumvalue>
86 </tp:enum>
87
88 <tp:enum name="Tube_State">
89 <tp:enumvalue suffix="Local_Pending" value="0">
90 <tp:docstring>
91 The tube is waiting to be accepted/closed locally.
92 </tp:docstring>
93 </tp:enumvalue>
94 <tp:enumvalue suffix="Remote_Pending" value="1">
95 <tp:docstring>
96 The tube is waiting to be accepted/closed remotely.
97 </tp:docstring>
98 </tp:enumvalue>
99 <tp:enumvalue suffix="Open" value="2">
100 <tp:docstring>
101 The tube is open for traffic.
102 </tp:docstring>
103 </tp:enumvalue>
104 </tp:enum>
105
106 <tp:enum name="Socket_Address_Type">
107 <tp:enumvalue suffix="Unix" value="0">
108 <tp:docstring>
109 A Unix socket. The variant contains a byte-array, signature 'ay',
110 containing the path of the socket.
111 </tp:docstring>
112 </tp:enumvalue>
113
114 <tp:enumvalue suffix="Abstract_Unix" value="1">
115 <tp:docstring>
116 An abstract Unix socket. The variant contains a byte-array,
117 signature 'ay', containing the path of the socket including the
118 leading null byte.
119 </tp:docstring>
120 </tp:enumvalue>
121
122 <tp:enumvalue suffix="IPv4" value="2">
123 <tp:docstring>
124 An IPv4 socket. The variant contains a struct with signature (sq)
125 in which the string is an IPv4 dotted-quad address literal
126 (and must not be a DNS name), while the 16-bit unsigned integer is
127 the port number.
128 </tp:docstring>
129 </tp:enumvalue>
130
131 <tp:enumvalue suffix="IPv6" value="3">
132 <tp:docstring>
133 An IPv6 socket. The variant contains a struct with signature (sq)
134 in which the string is an IPv6 address literal as specified in
135 RFC2373 (and must not be a DNS name), while the 16-bit unsigned
136 integer is the port number.
137 </tp:docstring>
138 </tp:enumvalue>
139
140 </tp:enum>
141
142 <tp:enum name="Socket_Access_Control">
143 <tp:enumvalue suffix="Localhost" value="0">
144 <tp:docstring>
145 The IP or Unix socket can be accessed by any local user (e.g.
146 a Unix socket that accepts all local connections, or an IP socket
147 listening on 127.0.0.1 (or ::1) or rejecting connections not from
148 that address). The associated variant must be ignored.
149 </tp:docstring>
150 </tp:enumvalue>
151 <tp:enumvalue suffix="Port" value="1">
152 <tp:docstring>
153 May only be used on IP sockets. The associated variant must contain
154 a struct with signature (sq) containing the string form of an
155 IP address of the appropriate version, and a port number.
156 The socket can only be accessed if the connecting process has that
157 address and port number; all other connections will be rejected.
158 </tp:docstring>
159 </tp:enumvalue>
160 <tp:enumvalue suffix="Netmask" value="2">
161 <tp:docstring>
162 May only be used on IP sockets. The associated variant must contain
163 a struct with signature (sy) containing the string form of an
164 IP address of the appropriate version, and a prefix length "n".
165 The socket can only be accessed if the first n bits of the
166 connecting address match the first n bits of the given address.
167 </tp:docstring>
168 </tp:enumvalue>
169 <tp:enumvalue suffix="Credentials" value="3">
170 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
171 <p>The connecting process must send a single zero (NUL) byte when
172 it first connects, which is not considered to be part of the data
173 stream. If the operating system uses sendmsg() with SCM_CREDS or
174 SCM_CREDENTIALS to pass credentials over sockets, the connecting
175 process must do so if possible; if not, it must still send the
176 byte.</p>
177
178 <p>The listening process will disconnect the connection unless it
179 can determine by OS-specific means that the connecting process
180 has the same user ID as the listening process.</p>
181
182 <p>The associated variant must be ignored.</p>
183 </tp:docstring>
184 </tp:enumvalue>
185 </tp:enum>
186
187 <method name="GetAvailableStreamTubeTypes">
188 <tp:docstring>List the available address types and access-control types
189 for stream tubes.</tp:docstring>
190 <arg direction="out" type="a{uau}">
191 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
192 <p>A mapping from address types (members of Socket_Address_Type) to
193 arrays of access-control type (members of Socket_Access_Control)
194 that the connection manager supports for stream tubes with that
195 address type. For simplicity, if a CM supports offering a
196 particular type of tube, it is assumed to support accepting it.</p>
197
198 <p>A typical value for a host without IPv6 support:</p>
199
200 <pre>
201 {
202 Socket_Address_Type_IPv4:
203 [Socket_Access_Control_Localhost, Socket_Access_Control_Port,
204 Socket_Access_Control_Netmask],
205 Socket_Address_Type_Unix:
206 [Socket_Access_Control_Localhost, Socket_Access_Control_Credentials]
207 }
208 </pre>
209
210 <p>If stream tubes are not supported, this will be an empty
211 dictionary.</p>
212 </tp:docstring>
213 </arg>
214 </method>
215
216 <method name="GetAvailableTubeTypes">
217 <arg direction="out" type="au" tp:type="Tube_Type[]">
218 <tp:docstring>
219 An array of the available tube types, as defined by the Tube_Type
220 enum.
221 </tp:docstring>
222 </arg>
223 </method>
224
225 <method name="ListTubes">
226 <arg direction="out" type="a(uuusa{sv}u)">
227 <tp:docstring>
228 Return an array of tuples, each representing a tube, with the
229 following members:
230
231 <ul>
232 <li>the tube's ID</li>
233 <li>the tube's initiator</li>
234 <li>the tube's type</li>
235 <li>the tube's service</li>
236 <li>the tube's parameters</li>
237 <li>the tube's state</li>
238 </ul>
239 </tp:docstring>
240 </arg>
241 </method>
242
243 <method name="OfferDBusTube">
244 <tp:docstring>
245 Offers a D-Bus tube providing the service specified.
246 </tp:docstring>
247 <arg direction="in" name="service" type="s">
248 <tp:docstring>
249 A string representing the service name that will be used over the
250 tube.
251 It should be a well-known D-Bus service name, of the form
252 com.example.ServiceName.
253 </tp:docstring>
254 </arg>
255 <arg direction="in" name="parameters" type="a{sv}">
256 <tp:docstring>
257 A dictionary of properties for the new tube; the allowable keys,
258 types and values are defined by the service. Connection managers
259 must support the value being any primitive (non-container)
260 D-Bus type, or a byte array 'ay'.
261 </tp:docstring>
262 </arg>
263 <arg direction="out" type="u">
264 <tp:docstring>
265 The ID of the new tube.
266 </tp:docstring>
267 </arg>
268 <tp:possible-errors>
269 <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
270 <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
271 <tp:docstring>
272 The contact associated with this channel doesn't have tubes
273 capabilities.
274 </tp:docstring>
275 </tp:error>
276 <tp:error name="org.freedesktop.Telepathy.Error.NotImplemented">
277 <tp:docstring>
278 The connection manager doesn't support D-Bus tubes.
279 </tp:docstring>
280 </tp:error>
281 </tp:possible-errors>
282 </method>
283
284 <method name="OfferStreamTube">
285 <tp:docstring>
286 Offer a stream tube exporting the local socket specified.
287 </tp:docstring>
288 <arg direction="in" name="service" type="s">
289 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
290 A string representing the service name that will be used over the
291 tube.
292 It should be a well-known TCP service name as defined by
293 <a href="http://www.dns-sd.org/ServiceTypes.html">
294 http://www.dns-sd.org/ServiceTypes.html</a>, for instance
295 "rsync" or "daap".
296 </tp:docstring>
297 </arg>
298 <arg direction="in" name="parameters" type="a{sv}">
299 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
300 <p>A dictionary of properties for the new tube; the allowable keys,
301 types and values are defined by the service. Connection managers
302 must support the value being any primitive (non-container)
303 D-Bus type, or a byte array 'ay'.</p>
304 <p>These should usually be the same key-value pairs specified for
305 use in the DNS-SD TXT record for that service.</p>
306 </tp:docstring>
307 </arg>
308 <arg direction="in" name="address_type" type="u" tp:type="Socket_Address_Type">
309 <tp:docstring>
310 The type of the listening address of the local service, as a member of
311 Socket_Address_Type.
312 </tp:docstring>
313 </arg>
314 <arg direction="in" name="address" type="v">
315 <tp:docstring>
316 The listening address of the local service, as indicated by the
317 address_type.
318 </tp:docstring>
319 </arg>
320 <arg direction="in" name="access_control" type="u" tp:type="Socket_Access_Control">
321 <tp:docstring>
322 The access control the local service applies to the local socket,
323 specified so the connection manager can behave appropriately
324 when it connects.
325 </tp:docstring>
326 </arg>
327 <arg direction="in" name="access_control_param" type="v">
328 <tp:docstring>
329 A parameter for the access control type, to be interpreted as
330 specified in the documentation for the Socket_Access_Control enum.
331 </tp:docstring>
332 </arg>
333 <arg direction="out" type="u">
334 <tp:docstring>
335 The ID of the new tube.
336 </tp:docstring>
337 </arg>
338 <tp:possible-errors>
339 <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
340 <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
341 <tp:docstring>
342 The contact associated with this channel doesn't have tube
343 capabilities.
344 </tp:docstring>
345 </tp:error>
346 <tp:error name="org.freedesktop.Telepathy.Error.NotImplemented">
347 <tp:docstring>
348 The connection manager doesn't support stream tubes, or
349 does not support the given address type or access-control type.
350 </tp:docstring>
351 </tp:error>
352 </tp:possible-errors>
353 </method>
354
355 <signal name="NewTube">
356 <tp:docstring>
357 Emitted when a tube is created.
358 </tp:docstring>
359 <arg name="id" type="u">
360 <tp:docstring>
361 The ID of the new tube.
362 </tp:docstring>
363 </arg>
364 <arg name="initiator" type="u" tp:type="Contact_Handle">
365 <tp:docstring>
366 The handle of the contact who initiated the tube.
367 </tp:docstring>
368 </arg>
369 <arg name="type" type="u" tp:type="Tube_Type">
370 <tp:docstring>
371 The tube type, as defined by the Tube_Type enum.
372 </tp:docstring>
373 </arg>
374 <arg name="service" type="s">
375 <tp:docstring>
376 A string representing the service that will be used over the tube.
377 </tp:docstring>
378 </arg>
379 <arg name="parameters" type="a{sv}">
380 <tp:docstring>
381 The new tube's properties.
382 </tp:docstring>
383 </arg>
384 <arg name="state" type="u" tp:type="Tube_State">
385 <tp:docstring>
386 The new tube's state.
387 </tp:docstring>
388 </arg>
389 </signal>
390
391 <method name="AcceptDBusTube">
392 <tp:docstring>
393 Accept a D-Bus tube that's in the "local pending" state. The
394 connection manager will attempt to open the tube. The tube remains in
395 the "local pending" state until the TubeStateChanged signal is
396 emitted.
397 </tp:docstring>
398 <arg direction="in" name="id" type="u">
399 <tp:docstring>
400 The ID of the tube to accept.
401 </tp:docstring>
402 </arg>
403 <arg direction="out" name="address" type="s">
404 <tp:docstring>
405 The string describing the address of the private bus. The client
406 should not attempt to connect to the address until the tube is open.
407 </tp:docstring>
408 </arg>
409 <tp:possible-errors>
410 <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
411 <tp:docstring>
412 The given tube ID is invalid or does not refer to a D-Bus
413 tube.
414 </tp:docstring>
415 </tp:error>
416 </tp:possible-errors>
417 </method>
418
419 <method name="AcceptStreamTube">
420 <tp:docstring>
421 Accept a stream tube that's in the "local pending" state. The
422 connection manager will attempt to open the tube. The tube remains in
423 the "local pending" state until the TubeStateChanged signal is
424 emitted.
425 </tp:docstring>
426 <arg direction="in" name="id" type="u">
427 <tp:docstring>
428 The ID of the tube to accept.
429 </tp:docstring>
430 </arg>
431 <arg direction="in" name="address_type" type="u" tp:type="Socket_Address_Type">
432 <tp:docstring>
433 The type of address the connection manager should listen on.
434 </tp:docstring>
435 </arg>
436 <arg direction="in" name="access_control" type="u" tp:type="Socket_Access_Control">
437 <tp:docstring>
438 The type of access control the connection manager should apply to
439 the socket.
440 </tp:docstring>
441 </arg>
442 <arg direction="in" name="access_control_param" type="v">
443 <tp:docstring>
444 A parameter for the access control type, to be interpreted as
445 specified in the documentation for the Socket_Access_Control enum.
446 </tp:docstring>
447 </arg>
448 <arg direction="out" name="address" type="v">
449 <tp:docstring>
450 The address on which the connection manager will listen for
451 connections to this tube. The client should not attempt to connect
452 to the address until the tube is open.
453 </tp:docstring>
454 </arg>
455
456 <tp:possible-errors>
457 <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
458 <tp:docstring>
459 The given tube ID is invalid or does not refer to a stream
460 tube.
461 </tp:docstring>
462 </tp:error>
463 <tp:error name="org.freedesktop.Telepathy.Error.NotImplemented">
464 <tp:docstring>
465 The given address type or access-control mechanism is not supported.
466 </tp:docstring>
467 </tp:error>
468 </tp:possible-errors>
469 </method>
470
471 <signal name="TubeStateChanged">
472 <tp:docstring>
473 Emitted when the state of a tube changes.
474 </tp:docstring>
475 <arg name="id" type="u">
476 <tp:docstring>
477 The ID of the tube that changed state.
478 </tp:docstring>
479 </arg>
480 <arg name="state" type="u" tp:type="Tube_State">
481 <tp:docstring>
482 The new state of the tube; see the Tube_State enumeration.
483 </tp:docstring>
484 </arg>
485 </signal>
486
487 <method name="CloseTube">
488 <tp:docstring>
489 Close a tube.
490 </tp:docstring>
491 <arg direction="in" name="id" type="u">
492 <tp:docstring>
493 The ID of the tube to close.
494 </tp:docstring>
495 </arg>
496 <tp:possible-errors>
497 <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument" />
498 </tp:possible-errors>
499 </method>
500
501 <signal name="TubeClosed">
502 <tp:docstring>
503 Emitted when a tube has been closed. The ID of a closed tube is no
504 longer valid. The ID may later be reused for a new tube.
505 </tp:docstring>
506 <arg name="id" type="u">
507 <tp:docstring>
508 The ID of the tube that was closed.
509 </tp:docstring>
510 </arg>
511 </signal>
512
513 <method name="GetDBusTubeAddress">
514 <tp:docstring>
515 For a D-Bus tube, return a string describing the address of the
516 private bus.
517 </tp:docstring>
518 <arg direction="in" name="id" type="u">
519 <tp:docstring>
520 The ID of the tube to get an address for.
521 </tp:docstring>
522 </arg>
523 <arg direction="out" type="s">
524 <tp:docstring>
525 The bus address.
526 </tp:docstring>
527 </arg>
528 <tp:possible-errors>
529 <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
530 <tp:docstring>
531 The tube is not a D-Bus tube.
532 </tp:docstring>
533 </tp:error>
534 <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
535 <tp:docstring>
536 This tube is not in the "open" state.
537 </tp:docstring>
538 </tp:error>
539 </tp:possible-errors>
540 </method>
541
542 <method name="GetDBusNames">
543 <tp:docstring>
544 For a multi-user (i.e. Handle_Type_Room) D-Bus tube, obtain a mapping
545 between contact handles and their unique bus names on this tube.
546 </tp:docstring>
547 <arg direction="in" name="id" type="u">
548 <tp:docstring>
549 The ID of the tube to get names for.
550 </tp:docstring>
551 </arg>
552 <arg direction="out" type="a(us)">
553 <tp:docstring>
554 An array of structures, each containing a contact handle and a D-Bus
555 bus name.
556 </tp:docstring>
557 </arg>
558 <tp:possible-errors>
559 <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
560 <tp:docstring>
561 The tube is not a multi-user D-Bus tube.
562 </tp:docstring>
563 </tp:error>
564 <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
565 <tp:docstring>
566 This tube is not in the "open" state.
567 </tp:docstring>
568 </tp:error>
569 </tp:possible-errors>
570 </method>
571
572 <signal name="DBusNamesChanged">
573 <tp:docstring>
574 Emitted on a multi-user (i.e. Handle_Type_Room) D-Bus tube when a
575 participant opens or closes the tube.
576 </tp:docstring>
577 <arg name="id" type="u">
578 <tp:docstring>
579 The ID of the tube whose names have changed.
580 </tp:docstring>
581 </arg>
582 <arg name="added" type="a(us)">
583 <tp:docstring>
584 Array of handles and D-Bus names of new participants.
585 </tp:docstring>
586 </arg>
587 <arg name="removed" type="au" tp:type="Contact_Handle[]">
588 <tp:docstring>
589 Array of handles of former participants.
590 </tp:docstring>
591 </arg>
592 </signal>
593
594 <method name="GetStreamTubeSocketAddress">
595 <tp:docstring>
596 For a stream tube, obtain the address of the socket used to
597 communicate over this tube.
598 </tp:docstring>
599 <arg direction="in" name="id" type="u">
600 <tp:docstring>
601 The ID of the stream tube to get the socket for.
602 </tp:docstring>
603 </arg>
604 <arg direction="out" name="address_type" type="u" tp:type="Socket_Address_Type">
605 <tp:docstring>
606 The type of the listening address of the socket, as a member of
607 Socket_Address_Type.
608 </tp:docstring>
609 </arg>
610 <arg direction="out" name="address" type="v">
611 <tp:docstring>
612 The listening address of the socket, as indicated by the
613 address_type.
614 </tp:docstring>
615 </arg>
616 <tp:possible-errors>
617 <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
618 <tp:docstring>
619 The tube is not a stream tube.
620 </tp:docstring>
621 </tp:error>
622 <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
623 <tp:docstring>
624 This tube is not in the "open" state.
625 </tp:docstring>
626 </tp:error>
627 </tp:possible-errors>
628 </method>
629
630 <signal name="StreamTubeNewConnection">
631 <tp:docstring>
632 Emitted on a stream tube when a participant opens a new connection
633 to its socket.
634 </tp:docstring>
635 <arg name="id" type="u">
636 <tp:docstring>
637 The ID of the tube
638 </tp:docstring>
639 </arg>
640 <arg name="handle" type="u" tp:type="Contact_Handle">
641 <tp:docstring>
642 The handle of the participant who opened the new connection
643 </tp:docstring>
644 </arg>
645 </signal>
646
647 </interface>
648
649 </node>
650 <!-- vim:set sw=2 sts=2 et ft=xml: -->
0 <?xml version="1.0" ?>
1 <node name="/Connection"
2 xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0"
3 >
4 <tp:copyright>Copyright (C) 2005, 2006, 2007 Collabora Limited</tp:copyright>
5 <tp:copyright>Copyright (C) 2005, 2006 Nokia Corporation</tp:copyright>
6 <tp:copyright>Copyright (C) 2006 INdT</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 Library 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, USA.</p>
21 </tp:license>
22 <interface name="org.freedesktop.Telepathy.Connection">
23 <method name="Connect">
24 <tp:docstring>
25 Request that the connection be established. This will be done
26 asynchronously and errors will be returned by emitting StatusChanged
27 signals.
28 </tp:docstring>
29 <tp:possible-errors>
30 <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
31 The connection is already connecting or connected
32 </tp:error>
33 </tp:possible-errors>
34 </method>
35 <method name="Disconnect">
36 <tp:docstring>
37 Request that the connection be closed. This closes the connection if
38 it's not already in DISCONNECTED state, and destroys the connection
39 object.
40 </tp:docstring>
41 </method>
42 <method name="GetInterfaces">
43 <arg direction="out" type="as" tp:type="Interface[]">
44 <tp:docstring>
45 An array of D-Bus interface names
46 </tp:docstring>
47 </arg>
48 <tp:docstring>
49 Get the optional interfaces supported by this connection.
50 </tp:docstring>
51 <tp:possible-errors>
52 <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
53 </tp:possible-errors>
54 </method>
55 <method name="GetProtocol">
56 <arg direction="out" type="s">
57 <tp:docstring>
58 A string identifier for the protocol
59 </tp:docstring>
60 </arg>
61 <tp:docstring>
62 Get the protocol this connection is using.
63 </tp:docstring>
64 </method>
65 <method name="GetSelfHandle">
66 <arg direction="out" type="u">
67 <tp:docstring>
68 An integer handle representing the user
69 </tp:docstring>
70 </arg>
71 <tp:docstring>
72 Get the handle which represents the user on this connection, which will
73 remain valid for the lifetime of this connection, or until a change
74 in the user's identifier is signalled by the Renamed signal on the
75 Renaming interface (if present). This is always a CONTACT type handle.
76 </tp:docstring>
77 <tp:possible-errors>
78 <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
79 </tp:possible-errors>
80 </method>
81 <method name="GetStatus">
82 <arg direction="out" type="u" tp:type="Connection_Status">
83 <tp:docstring>
84 An integer representing the current status
85 </tp:docstring>
86 </arg>
87 <tp:docstring>
88 Get the current status as defined in the StatusChanged signal.
89 </tp:docstring>
90 </method>
91 <method name="HoldHandles">
92 <arg direction="in" name="handle_type" type="u" tp:type="Handle_Type">
93 <tp:docstring>
94 An integer handle type (as defined in HandleType)
95 </tp:docstring>
96 </arg>
97 <arg direction="in" name="handles" type="au" tp:type="Handle[]">
98 <tp:docstring>
99 A array of integer handles to hold
100 </tp:docstring>
101 </arg>
102 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
103 <p>Notify the connection manger that your client is holding a copy
104 of handles which may not be in use in any existing channel or
105 list, and were not obtained by using the RequestHandles method. For
106 example, a handle observed in an emitted signal, or displayed
107 somewhere in the UI that is not associated with a channel. The
108 connection manager must not deallocate a handle where any clients
109 have used this method to indicate it is in use until the ReleaseHandle
110 method is called, or the clients disappear from the bus.</p>
111
112 <p>Note that HoldHandles is idempotent - calling it multiple times
113 is equivalent to calling it once. If a handle is "referenced" by
114 several components which share a D-Bus unique name, the client
115 should perform reference counting internally, and only call
116 ReleaseHandles when none of the cooperating components need the
117 handle any longer.</p>
118 </tp:docstring>
119 <tp:possible-errors>
120 <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
121 <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
122 The handle type is invalid
123 </tp:error>
124 <tp:error name="org.freedesktop.Telepathy.Error.InvalidHandle">
125 One of the given handles is not valid
126 </tp:error>
127 </tp:possible-errors>
128 </method>
129 <method name="InspectHandles">
130 <arg direction="in" name="handle_type" type="u" tp:type="Handle_Type">
131 <tp:docstring>
132 An integer handle type (as defined in HandleType)
133 </tp:docstring>
134 </arg>
135 <arg direction="in" name="handles" type="au" tp:type="Handle[]">
136 <tp:docstring>
137 An array of integer handles of this type
138 </tp:docstring>
139 </arg>
140 <arg direction="out" type="as">
141 <tp:docstring>
142 An array of handle names in the same order as the given numbers
143 </tp:docstring>
144 </arg>
145 <tp:docstring>
146 Return a string representation for a number of handles of a given
147 type.
148 </tp:docstring>
149 <tp:possible-errors>
150 <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
151 <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
152 The handle type is invalid
153 </tp:error>
154 <tp:error name="org.freedesktop.Telepathy.Error.InvalidHandle">
155 One of the given handles is not valid
156 </tp:error>
157 </tp:possible-errors>
158 </method>
159 <method name="ListChannels">
160 <arg direction="out" type="a(osuu)">
161 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
162 <p>An array of structs containing:</p>
163 <ul>
164 <li>a D-Bus object path for the channel object on this service</li>
165 <li>a D-Bus interface name representing the channel type</li>
166 <li>an integer representing the handle type this channel communicates with, or zero</li>
167 <li>an integer handle representing the contact, room or list this channel communicates with, or zero</li>
168 </ul>
169 </tp:docstring>
170 </arg>
171 <tp:docstring>
172 List all the channels which currently exist on this connection.
173 </tp:docstring>
174 <tp:possible-errors>
175 <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
176 </tp:possible-errors>
177 </method>
178 <signal name="NewChannel">
179 <arg name="object_path" type="o">
180 <tp:docstring>
181 A D-Bus object path for the channel object on this service
182 </tp:docstring>
183 </arg>
184 <arg name="channel_type" type="s" tp:type="Interface">
185 <tp:docstring>
186 A D-Bus interface name representing the channel type
187 </tp:docstring>
188 </arg>
189 <arg name="handle_type" type="u" tp:type="Handle_Type">
190 <tp:docstring>
191 An integer representing the type of handle this channel communicates with, which is zero if no handle is specified
192 </tp:docstring>
193 </arg>
194 <arg name="handle" type="u" tp:type="Handle">
195 <tp:docstring>
196 A handle indicating the specific contact, room or list this channel communicates with, or zero if it is an anonymous channel
197 </tp:docstring>
198 </arg>
199 <arg name="suppress_handler" type="b">
200 <tp:docstring>
201 A boolean indicating that the channel was requested by a client that intends to display it to the user, so no handler needs to be launched
202 </tp:docstring>
203 </arg>
204 <tp:docstring>
205 Emitted when a new Channel object is created, either through user
206 request or incoming information from the service. The suppress_handler
207 boolean indicates if the channel was requested by an existing client,
208 or is an incoming communication and needs to have a handler launched.
209 </tp:docstring>
210 </signal>
211 <method name="ReleaseHandles">
212 <arg direction="in" name="handle_type" type="u" tp:type="Handle_Type">
213 <tp:docstring>
214 An integer handle type (as defined in RequestHandle)
215 </tp:docstring>
216 </arg>
217 <arg direction="in" name="handles" type="au" tp:type="Handle[]">
218 <tp:docstring>
219 An array of integer handles being held by the client
220 </tp:docstring>
221 </arg>
222 <tp:docstring>
223 Explicitly notify the connection manager that your client is no
224 longer holding any references to the given handles, and that they
225 may be deallocated if they are not held by any other clients or
226 referenced by any existing channels. See HoldHandles for notes.
227 </tp:docstring>
228 <tp:possible-errors>
229 <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
230 <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
231 The handle type is invalid
232 </tp:error>
233 <tp:error name="org.freedesktop.Telepathy.Error.InvalidHandle">
234 One of the given handles is not valid
235 </tp:error>
236 <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
237 One of the given handles is not held by this client
238 </tp:error>
239 </tp:possible-errors>
240 </method>
241 <method name="RequestChannel">
242 <arg direction="in" name="type" type="s" tp:type="Interface">
243 <tp:docstring>
244 A D-Bus interface name representing base channel type
245 </tp:docstring>
246 </arg>
247 <arg direction="in" name="handle_type" type="u" tp:type="Handle_Type">
248 <tp:docstring>
249 An integer representing the handle type, or zero if no handle is being specified
250 </tp:docstring>
251 </arg>
252 <arg direction="in" name="handle" type="u" tp:type="Handle">
253 <tp:docstring>
254 A nonzero integer handle representing a contact, room, list etc.
255 according to handle_type, or zero if the handle_type is zero
256 </tp:docstring>
257 </arg>
258 <arg direction="in" name="suppress_handler" type="b">
259 <tp:docstring>
260 If true, the requesting client intends to take responsibility for
261 displaying the channel to the user, so no other handler needs to
262 be launched
263 </tp:docstring>
264 </arg>
265 <arg direction="out" type="o">
266 <tp:docstring>
267 The D-Bus object path for the channel created or retrieved
268 </tp:docstring>
269 </arg>
270 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
271 <p>Request a channel satisfying the specified type and communicating
272 with the contact, room, list etc. indicated by the given
273 handle_type and handle. The handle_type and handle may both be
274 zero to request the creation of a new, empty channel, which may
275 or may not be possible, depending on the protocol and channel
276 type.</p>
277
278 <p>On success, the returned channel will always be of the requested
279 type (i.e. implement the requested channel-type interface).</p>
280
281 <p>If a new, empty channel is requested, on success the returned
282 channel will always be an "anonymous" channel for which the type
283 and handle are both zero.</p>
284
285 <p>If a channel to a contact, room etc. is requested, on success, the
286 returned channel may either be a new or existing channel to
287 the requested entity (i.e. its GetHandle() returns the
288 requested handle type and handle), or a newly created "anonymous"
289 channel associated with the requested handle in some
290 implementation-specific way.</p>
291
292 <p>For example, for a contact handle, the returned channel
293 might be "anonymous", but implement the groups interface and have
294 the requested contact already present among the members.</p>
295
296 <p>If the request cannot be satisfied, an error is raised and no
297 channel is created.</p>
298 </tp:docstring>
299 <tp:possible-errors>
300 <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
301 <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
302 <tp:error name="org.freedesktop.Telepathy.Error.NotImplemented">
303 <tp:docstring>
304 Unknown channel type
305 </tp:docstring>
306 </tp:error>
307 <tp:error name="org.freedesktop.Telepathy.Error.InvalidHandle">
308 <tp:docstring>
309 The given handle does not exist or cannot be created
310 </tp:docstring>
311 </tp:error>
312 <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
313 <tp:docstring>
314 The requested channel type cannot be created with the given handle
315 </tp:docstring>
316 </tp:error>
317 <tp:error name="org.freedesktop.Telepathy.Error.Channel.Banned"/>
318 <tp:error name="org.freedesktop.Telepathy.Error.Channel.Full"/>
319 <tp:error name="org.freedesktop.Telepathy.Error.Channel.InviteOnly"/>
320 </tp:possible-errors>
321 </method>
322 <tp:enum name="Handle_Type" type="u">
323 <tp:enumvalue suffix="None" value="0">
324 <tp:docstring>
325 A "null" handle type used to indicate the absence of a handle.
326 When a handle type and a handle appear as a pair, if the handle
327 type is zero, the handle must also be zero.
328 </tp:docstring>
329 </tp:enumvalue>
330 <tp:enumvalue suffix="Contact" value="1">
331 <tp:docstring>
332 A contact
333 </tp:docstring>
334 </tp:enumvalue>
335 <tp:enumvalue suffix="Room" value="2">
336 <tp:docstring>
337 A chat room
338 </tp:docstring>
339 </tp:enumvalue>
340 <tp:enumvalue suffix="List" value="3">
341 <tp:docstring>
342 A server-generated contact list (see Channel.Interface.Group)
343 </tp:docstring>
344 </tp:enumvalue>
345 <tp:enumvalue suffix="Group" value="4">
346 <tp:docstring>
347 A user-defined contact list (see Channel.Interface.Group)
348 </tp:docstring>
349 </tp:enumvalue>
350 </tp:enum>
351 <method name="RequestHandles">
352 <arg direction="in" name="handle_type" type="u" tp:type="Handle_Type">
353 <tp:docstring>
354 An integer handle type (as defined in HandleType)
355 </tp:docstring>
356 </arg>
357 <arg direction="in" name="names" type="as">
358 <tp:docstring>
359 An array of names of entities to request handles for
360 </tp:docstring>
361 </arg>
362 <arg direction="out" type="au" tp:type="Handle[]">
363 <tp:docstring>
364 An array of integer handle numbers in the same order as the given strings
365 </tp:docstring>
366 </arg>
367 <tp:docstring>
368 Request several handles from the connection manager which represent a
369 number of contacts, rooms or server-stored lists on the service. The
370 connection manager should record that these handles are in use by the
371 client who invokes this method, and must not deallocate the handles
372 until the client disconnects from the bus or calls the ReleaseHandle
373 method. Where the name refers to an entity that already has a handle
374 in this connection manager, this handle should be returned instead.
375 The handle number 0 must not be returned by the connection manager.
376 </tp:docstring>
377 <tp:possible-errors>
378 <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
379 <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
380 The handle type is invalid
381 </tp:error>
382 <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
383 The given name is not a valid entity of the given type
384 </tp:error>
385 </tp:possible-errors>
386 </method>
387 <tp:enum name="Connection_Status" plural="Connection_Statuses" type="u">
388 <tp:enumvalue suffix="Connected" value="0">
389 <tp:docstring>
390 The connection is alive and all methods are available.
391 </tp:docstring>
392 </tp:enumvalue>
393 <tp:enumvalue suffix="Connecting" value="1">
394 <tp:docstring>
395 The connection has not yet been established, or has been
396 severed and reconnection is being attempted. Some methods may fail
397 until the connection has been established.
398 </tp:docstring>
399 </tp:enumvalue>
400 <tp:enumvalue suffix="Disconnected" value="2">
401 <tp:docstring>
402 The connection has been severed and no method calls are
403 valid. The object may be removed from the bus at any time.
404 </tp:docstring>
405 </tp:enumvalue>
406 </tp:enum>
407 <tp:enum name="Connection_Status_Reason" type="u">
408 <tp:enumvalue suffix="None_Specified" value="0">
409 <tp:docstring>
410 There is no reason set for this state change.
411 </tp:docstring>
412 </tp:enumvalue>
413 <tp:enumvalue suffix="Requested" value="1">
414 <tp:docstring>
415 The change is in response to a user request.
416 </tp:docstring>
417 </tp:enumvalue>
418 <tp:enumvalue suffix="Network_Error" value="2">
419 <tp:docstring>
420 There was an error sending or receiving on the network socket.
421 </tp:docstring>
422 </tp:enumvalue>
423 <tp:enumvalue suffix="Authentication_Failed" value="3">
424 <tp:docstring>
425 The username or password was invalid.
426 </tp:docstring>
427 </tp:enumvalue>
428 <tp:enumvalue suffix="Encryption_Error" value="4">
429 <tp:docstring>
430 There was an error negotiating SSL on this connection, or
431 encryption was unavailable and require-encryption was set when the
432 connection was created.
433 </tp:docstring>
434 </tp:enumvalue>
435 <tp:enumvalue suffix="Name_In_Use" value="5">
436 <tp:docstring>
437 Someone is already connected to the server using the name
438 you are trying to connect with.
439 </tp:docstring>
440 </tp:enumvalue>
441 <tp:enumvalue suffix="Cert_Not_Provided" value="6">
442 <tp:docstring>
443 The server did not provide a SSL certificate.
444 </tp:docstring>
445 </tp:enumvalue>
446 <tp:enumvalue suffix="Cert_Untrusted" value="7">
447 <tp:docstring>
448 The server's SSL certificate could not be trusted.
449 </tp:docstring>
450 </tp:enumvalue>
451 <tp:enumvalue suffix="Cert_Expired" value="8">
452 <tp:docstring>
453 The server's SSL certificate has expired.
454 </tp:docstring>
455 </tp:enumvalue>
456 <tp:enumvalue suffix="Cert_Not_Activated" value="9">
457 <tp:docstring>
458 The server's SSL certificate is not yet valid.
459 </tp:docstring>
460 </tp:enumvalue>
461 <tp:enumvalue suffix="Cert_Hostname_Mismatch" value="10">
462 <tp:docstring>
463 The server's SSL certificate did not match its hostname.
464 </tp:docstring>
465 </tp:enumvalue>
466 <tp:enumvalue suffix="Cert_Fingerprint_Mismatch" value="11">
467 <tp:docstring>
468 The server's SSL certificate does not have the expected
469 fingerprint.
470 </tp:docstring>
471 </tp:enumvalue>
472 <tp:enumvalue suffix="Cert_Self_Signed" value="12">
473 <tp:docstring>
474 The server's SSL certificate is self-signed.
475 </tp:docstring>
476 </tp:enumvalue>
477 <tp:enumvalue suffix="Cert_Other_Error" value="13">
478 <tp:docstring>
479 There was some other error validating the server's SSL certificate.
480 </tp:docstring>
481 </tp:enumvalue>
482 </tp:enum>
483 <signal name="StatusChanged">
484 <arg name="status" type="u" tp:type="Connection_Status">
485 <tp:docstring>
486 An integer indicating the new status, as defined by ConnectionStatus
487 </tp:docstring>
488 </arg>
489 <arg name="reason" type="u" tp:type="Connection_Status_Reason">
490 <tp:docstring>
491 An integer indicating the reason for the status change, as defined
492 by ConnectionStatusReason
493 </tp:docstring>
494 </arg>
495 <tp:docstring>
496 Emitted when the status of the connection changes. All states and
497 reasons have numerical values, as defined in ConnectionStatus
498 and ConnectionStatusReason.
499 </tp:docstring>
500 </signal>
501 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
502 <p>This models a connection to a single user account on a communication
503 service. Its basic capability is to provide the facility to request and
504 receive channels of differing types (such as text channels or streaming
505 media channels) which are used to carry out further communication.</p>
506
507 <p>As well as the methods and signatures below, arbitrary interfaces may be
508 provided by the Connection object to represent extra connection-wide
509 functionality, such as the Connection.Interface.Presence for receiving and
510 reporting presence information, and Connection.Interface.Aliasing for
511 connections where contacts may set and change an alias for themselves.
512 These interfaces can be discovered using GetInterfaces after the
513 connection, has been established and must not change subsequently at
514 runtime.</p>
515
516 <p>Contacts, rooms, and server-stored lists (such as subscribed contacts,
517 block lists, or allow lists) on a service are all represented by
518 immutable <em>handles</em>, which are unsigned non-zero integers which are
519 valid only for the lifetime of the connection object, and are used
520 throughout the protocol where these entities are represented, allowing
521 simple testing of equality within clients.</p>
522
523 <p>Zero as a handle value is sometimes used as a "null" value to mean
524 the absence of a contact, room, etc.</p>
525
526 <p>Handles have per-type uniqueness, meaning that
527 every (handle type, handle number) tuple is guaranteed to be unique within
528 a connection and that a handle alone (without its type) is meaningless or
529 ambiguous. Connection manager implementations should reference count these
530 handles to determine if they are in use either by any active clients or any
531 open channels, and may deallocate them when this ceases to be true. Clients
532 may request handles of a given type and name with the RequestHandles
533 method, inspect the entity name of handles with the InspectHandles method,
534 keep handles from being released with HoldHandles, and notify that they are
535 no longer storing handles with ReleaseHandles.</p>
536 </tp:docstring>
537 </interface>
538 </node>
539 <!-- vim:set sw=2 sts=2 et ft=xml: -->
0 <?xml version="1.0" ?>
1 <node name="/Connection_Interface_Aliasing" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
2 <tp:copyright> Copyright (C) 2005, 2006 Collabora Limited </tp:copyright>
3 <tp:copyright> Copyright (C) 2005, 2006 Nokia Corporation </tp:copyright>
4 <tp:copyright> Copyright (C) 2006 INdT </tp:copyright>
5 <tp:license xmlns="http://www.w3.org/1999/xhtml">
6 <p>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.</p>
10
11 <p>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 Library General Public License for more details.</p>
15
16 <p>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, MA 02110-1301, USA.</p>
19 </tp:license>
20 <interface name="org.freedesktop.Telepathy.Connection.Interface.Aliasing">
21 <tp:requires interface="org.freedesktop.Telepathy.Connection"/>
22 <signal name="AliasesChanged">
23 <arg name="aliases" type="a(us)">
24 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
25 An array containing structs of:
26 <ul>
27 <li>the handle representing the contact</li>
28 <li>the new alias</li>
29 </ul>
30 </tp:docstring>
31 </arg>
32 <tp:docstring>
33 Signal emitted when a contact's alias (or that of the user) is changed.
34 </tp:docstring>
35 </signal>
36 <tp:flags name="Connection_Alias_Flags" value-prefix="Connection_Alias_Flag" type="u">
37 <tp:flag suffix="User_Set" value="1">
38 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
39 <p>The aliases of contacts on this connection may be changed by the
40 user of the service, not just by the contacts themselves. This is
41 the case on Jabber, for instance.</p>
42 <p>It is possible that aliases can be changed by the contacts too -
43 which alias takes precedence is not defined by this
44 specification, and depends on the server and/or connection manager
45 implementation.</p>
46 <p>This flag only applies to the aliases of "globally valid" contact
47 handles. At this time, clients should not expect to be able to
48 change the aliases corresponding to any channel-specific
49 handles. If this becomes possible in future, a new flag will
50 be defined.</p>
51 </tp:docstring>
52 </tp:flag>
53 </tp:flags>
54 <method name="GetAliasFlags">
55 <arg direction="out" type="u" tp:type="Connection_Alias_Flags">
56 <tp:docstring>
57 An integer with a bitwise OR of flags from ConnectionAliasFlags
58 </tp:docstring>
59 </arg>
60 <tp:docstring>
61 Return a bitwise OR of flags detailing the behaviour of aliases on this
62 connection.
63 </tp:docstring>
64 <tp:possible-errors>
65 <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
66 </tp:possible-errors>
67 </method>
68 <method name="RequestAliases">
69 <arg direction="in" name="contacts" type="au" tp:type="Contact_Handle[]">
70 <tp:docstring>
71 An array of handles representing contacts
72 </tp:docstring>
73 </arg>
74 <arg direction="out" type="as">
75 <tp:docstring>
76 A list of aliases in the same order as the contact handles
77 </tp:docstring>
78 </arg>
79 <tp:docstring>
80 Request the value of several contacts' aliases at once.
81 </tp:docstring>
82 <tp:possible-errors>
83 <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
84 <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
85 <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable"/>
86 <tp:error name="org.freedesktop.Telepathy.Error.InvalidHandle"/>
87 </tp:possible-errors>
88 </method>
89 <method name="SetAliases">
90 <arg direction="in" name="aliases" type="a{us}">
91 <tp:docstring>
92 A dictionary mapping integer handles of contacts
93 to strings of the new alias to set.
94 </tp:docstring>
95 </arg>
96 <tp:docstring>
97 Request that the alias of the given contact be changed. Success will be
98 indicated by emitting an AliasUpdate signal. On connections where the
99 CONNECTION_ALIAS_FLAG_USER_SET flag is not set, this method will only
100 ever succeed if the contact is the user's own handle (as returned by
101 GetSelfHandle on the Connection interface).
102 </tp:docstring>
103 <tp:possible-errors>
104 <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
105 <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
106 <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable"/>
107 <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument"/>
108 <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable"/>
109 <tp:error name="org.freedesktop.Telepathy.Error.PermissionDenied"/>
110 </tp:possible-errors>
111 </method>
112 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
113 <p>An interface on connections to support protocols where contacts have an
114 alias which they can change at will. Provides a method for the user to set
115 their own alias, and a signal which should be emitted when a contact's
116 alias is changed or first discovered.</p>
117
118 <p>On connections where the user is allowed to set aliases for contacts and
119 store them on the server, the GetAliasFlags method will have the
120 CONNECTION_ALIAS_FLAG_USER_SET flag set, and the SetAliases method
121 may be called on contact handles other than the user themselves.</p>
122
123 <p>Aliases are intended to be used as the main displayed name for the
124 contact, where available.</p>
125 </tp:docstring>
126 </interface>
127 </node>
128 <!-- vim:set sw=2 sts=2 et ft=xml: -->
0 <?xml version="1.0" ?>
1 <node name="/Connection_Interface_Avatars" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
2 <tp:copyright>Copyright (C) 2005-2007 Collabora Limited</tp:copyright>
3 <tp:copyright>Copyright (C) 2005, 2006 Nokia Corporation</tp:copyright>
4 <tp:copyright>Copyright (C) 2006 INdT</tp:copyright>
5 <tp:license xmlns="http://www.w3.org/1999/xhtml">
6 <p>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.</p>
10
11 <p>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 Library General Public License for more details.</p>
15
16 <p>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, MA 02110-1301, USA.</p>
19 </tp:license>
20 <interface name="org.freedesktop.Telepathy.Connection.Interface.Avatars">
21 <tp:requires interface="org.freedesktop.Telepathy.Connection"/>
22 <signal name="AvatarUpdated">
23 <arg name="contact" type="u" tp:type="Contact_Handle">
24 <tp:docstring>
25 An integer handle for the contact whose avatar has changed
26 </tp:docstring>
27 </arg>
28 <arg name="new_avatar_token" type="s">
29 <tp:docstring>
30 Unique token for their new avatar
31 </tp:docstring>
32 </arg>
33 <tp:docstring>
34 Emitted when the avatar for a contact has been updated, or first
35 discovered on this connection. If the token differs from the token
36 associated with the client's cached avatar for this contact, the new
37 avatar should be requested with RequestAvatar.
38 </tp:docstring>
39 </signal>
40 <signal name="AvatarRetrieved">
41 <arg name="contact" type="u" tp:type="Contact_Handle">
42 <tp:docstring>
43 The contact whose avatar has been retrieved
44 </tp:docstring>
45 </arg>
46 <arg name="token" type="s">
47 <tp:docstring>
48 The token corresponding to the avatar
49 </tp:docstring>
50 </arg>
51 <arg name="avatar" type="ay">
52 <tp:docstring>
53 An array of bytes containing the image data
54 </tp:docstring>
55 </arg>
56 <arg name="type" type="s">
57 <tp:docstring>
58 A string containing the image MIME type (eg image/jpeg), or empty if
59 unknown
60 </tp:docstring>
61 </arg>
62 <tp:docstring>
63 Emitted when the avatar for a contact has been retrieved.
64 </tp:docstring>
65 </signal>
66 <method name="GetAvatarRequirements">
67 <arg direction="out" type="as">
68 <tp:docstring>
69 An array of supported MIME types (eg image/jpeg)
70 </tp:docstring>
71 </arg>
72 <arg direction="out" type="q">
73 <tp:docstring>
74 The minimum image width in pixels
75 </tp:docstring>
76 </arg>
77 <arg direction="out" type="q">
78 <tp:docstring>
79 The minimum image height in pixels
80 </tp:docstring>
81 </arg>
82 <arg direction="out" type="q">
83 <tp:docstring>
84 The maximum image width in pixels, or 0 if there is no limit
85 </tp:docstring>
86 </arg>
87 <arg direction="out" type="q">
88 <tp:docstring>
89 The maximum image height in pixels, or 0 if there is no limit
90 </tp:docstring>
91 </arg>
92 <arg direction="out" type="u">
93 <tp:docstring>
94 The maximum image size in bytes, or 0 if there is no limit
95 </tp:docstring>
96 </arg>
97 <tp:docstring>
98 Get the required format of avatars on this connection.
99 </tp:docstring>
100 <tp:possible-errors>
101 <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
102 <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
103 <tp:error name="org.freedesktop.Telepathy.Error.PermissionDenied"/>
104 <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable"/>
105 </tp:possible-errors>
106 </method>
107 <method name="GetAvatarTokens">
108 <arg direction="in" name="contacts" type="au" tp:type="Contact_Handle[]">
109 <tp:docstring>
110 An array of handles representing contacts
111 </tp:docstring>
112 </arg>
113 <arg direction="out" type="as">
114 <tp:docstring>
115 An array of avatar tokens or empty strings (if no avatar is set) in the
116 same order as the given array of contact handles
117 </tp:docstring>
118 </arg>
119 <tp:docstring>
120 Get the unique tokens for all of the given contacts' avatars.
121
122 Using this method in new Telepathy clients is deprecated; use
123 GetKnownAvatarTokens instead.
124 </tp:docstring>
125 <tp:possible-errors>
126 <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
127 <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
128 <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument"/>
129 <tp:error name="org.freedesktop.Telepathy.Error.PermissionDenied"/>
130 <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable"/>
131 </tp:possible-errors>
132 </method>
133 <method name="GetKnownAvatarTokens">
134 <arg direction="in" name="contacts" type="au" tp:type="Contact_Handle[]">
135 <tp:docstring>
136 An array of handles representing contacts
137 </tp:docstring>
138 </arg>
139 <arg direction="out" type="a{us}">
140 <tp:docstring>
141 A dictionary of handles mapped to avatar tokens, containing only
142 the known avatar tokens.
143 </tp:docstring>
144 </arg>
145 <tp:docstring>
146 Get the unique tokens for the given contacts' avatars. These tokens
147 can be persisted across connections, and should be used by the client
148 to check whether the avatars have been updated. A empty token means
149 that no avatar is set for the given contact.
150 </tp:docstring>
151 <tp:possible-errors>
152 <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
153 <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
154 <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument"/>
155 <tp:error name="org.freedesktop.Telepathy.Error.PermissionDenied"/>
156 <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable"/>
157 </tp:possible-errors>
158 </method>
159 <method name="RequestAvatar">
160 <arg direction="in" name="contact" type="u" tp:type="Contact_Handle">
161 <tp:docstring>
162 An integer handle for the contact to request the avatar for
163 </tp:docstring>
164 </arg>
165 <arg direction="out" type="ay">
166 <tp:docstring>
167 An array of bytes containing the image data
168 </tp:docstring>
169 </arg>
170 <arg direction="out" type="s">
171 <tp:docstring>
172 A string containing the image MIME type (eg image/jpeg), or empty if
173 unknown
174 </tp:docstring>
175 </arg>
176 <tp:docstring>
177 Request the avatar for a given contact. Using this method in new
178 Telepathy clients is deprecated; use RequestAvatars instead.
179 </tp:docstring>
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.InvalidHandle"/>
184 <tp:error name="org.freedesktop.Telepathy.Error.PermissionDenied"/>
185 <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
186 <tp:docstring>
187 The contact does not currently have an avatar.
188 </tp:docstring>
189 </tp:error>
190 </tp:possible-errors>
191 </method>
192 <method name="RequestAvatars">
193 <arg direction="in" name="contacts" type="au"
194 tp:type="Contact_Handle[]">
195 <tp:docstring>
196 The contacts to retrieve avatars for
197 </tp:docstring>
198 </arg>
199 <tp:docstring>
200 Request avatars for a number of contacts. The AvatarRetrieved signal
201 is emitted for each avatar retrieved. If the handles are valid but
202 retrieving an avatar fails (for any reason, including the contact not
203 having an avatar) the AvatarRetrieved signal is not emitted for that
204 contact.
205 </tp:docstring>
206 <tp:possible-errors>
207 <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
208 <tp:error name="org.freedesktop.Telepathy.Error.InvalidHandle"/>
209 </tp:possible-errors>
210 </method>
211 <method name="SetAvatar">
212 <arg direction="in" name="avatar" type="ay">
213 <tp:docstring>
214 An array of bytes representing the avatar image data
215 </tp:docstring>
216 </arg>
217 <arg direction="in" name="mime_type" type="s">
218 <tp:docstring>
219 A string representing the image MIME type
220 </tp:docstring>
221 </arg>
222 <arg direction="out" type="s">
223 <tp:docstring>
224 The string token of the new avatar
225 </tp:docstring>
226 </arg>
227 <tp:docstring>
228 Set a new avatar image for this connection. The avatar image must
229 respect the requirements obtained by GetAvatarRequirements.
230 </tp:docstring>
231 <tp:possible-errors>
232 <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
233 <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
234 <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument"/>
235 <tp:error name="org.freedesktop.Telepathy.Error.PermissionDenied"/>
236 <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable"/>
237 </tp:possible-errors>
238 </method>
239 <method name="ClearAvatar">
240 <tp:added version="0.15.0" />
241 <tp:docstring>
242 Remove the avatar image for this connection.
243 </tp:docstring>
244 <tp:possible-errors>
245 <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
246 <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
247 </tp:possible-errors>
248 </method>
249 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
250 <p>An interface for requesting avatars for contacts on a given connection,
251 receiving notification when avatars are changed, and publishing your own
252 avatar.</p>
253
254 <p>Avatars are identified by a unique (per contact) token which represents a
255 hash or timestamp (depending on the protocol) of the contacts' avatar data.
256 An empty token means that an avatar has not been set for this contact, and
257 a changed token implies the contact's avatar has changed, but the strings
258 should otherwise be considered opaque by clients.</p>
259
260 <p>A client should use GetAvatarTokens to request the tokens for the avatars
261 of all the contacts it is interested in when it connects. The avatars can
262 then be retreived using RequestAvatar for the corresponding contact.
263 Clients should bind to the AvatarChanged signal and request a new copy of
264 the avatar when a contacts' avatar token changes. Clients should cache the
265 token and data of each contact's avatar between connections, to avoid
266 repeatedly retrieving the same avatar.</p>
267
268 <p>To publish an avatar, a client should use SetAvatar to provide an image
269 which meets the requirements returned by the GetAvatarRequirements
270 function. On some protocols the avatar is stored on the server, so setting
271 the avatar is persistent, but on others it is transferred via a peer to
272 peer mechanism, so needs to be set every connection. Hence, on every
273 connection, clients should inspect the avatar token of the connection's
274 self handle, and set the avatar if it is an empty string (and may
275 optionally replace it if the token corresponds to a different avatar).</p>
276
277 <p>To remove the published avatar on protocols which have persistent avatars,
278 a client should use the ClearAvatar method. This method can safely be used
279 even if there is no avatar for this connection.</p>
280 </tp:docstring>
281 </interface>
282 </node>
283 <!-- vim:set sw=2 sts=2 et ft=xml: -->
0 <?xml version="1.0" ?>
1 <node name="/Connection_Interface_Capabilities" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
2 <tp:copyright> Copyright (C) 2005, 2006 Collabora Limited </tp:copyright>
3 <tp:copyright> Copyright (C) 2005, 2006 Nokia Corporation </tp:copyright>
4 <tp:copyright> Copyright (C) 2006 INdT </tp:copyright>
5 <tp:license xmlns="http://www.w3.org/1999/xhtml">
6 <p>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.</p>
10
11 <p>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 Library General Public License for more details.</p>
15
16 <p>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, MA 02110-1301, USA.</p>
19 </tp:license>
20 <interface name="org.freedesktop.Telepathy.Connection.Interface.Capabilities">
21 <tp:requires interface="org.freedesktop.Telepathy.Connection"/>
22 <method name="AdvertiseCapabilities">
23 <arg direction="in" name="add" type="a(su)">
24 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
25 An array of structures containing:
26 <ul>
27 <li>a string channel type</li>
28 <li>a bitwise OR of type specific capability flags</li>
29 </ul>
30 </tp:docstring>
31 </arg>
32 <arg direction="in" name="remove" type="as" tp:type="Interface[]">
33 <tp:docstring>
34 An array of D-Bus interface names of channel types to remove
35 </tp:docstring>
36 </arg>
37 <arg direction="out" type="a(su)">
38 <tp:docstring>
39 An array of structures describing the current capabilities containing:
40 <ul>
41 <li>a string channel type</li>
42 <li>a bitwise OR of type specific capability flags</li>
43 </ul>
44 </tp:docstring>
45 </arg>
46 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
47 <p>Used by user interfaces to indicate which channel types they are able
48 to handle on this connection. Because these may be provided by
49 different client processes, this method accepts channel types to add
50 and remove from the set already advertised on this connection. The type
51 of advertised capabilities (create versus invite) is protocol-dependent
52 and hence cannot be set by the this method. In the case of a client
53 adding an already advertised channel type but with new channel type
54 specific flags, the connection manager should simply add the new flags
55 to the set of advertised capabilities.</p>
56
57 <p>Upon a successful invocation of this method, the CapabilitiesChanged
58 signal will be emitted for the user's own handle (as returned by
59 GetSelfHandle) the by the connection manager to indicate the changes
60 that have been made. This signal should also be monitored to ensure
61 that the set is kept accurate - for example, a client may remove
62 capabilities or type specific capability flags when it exits
63 which are still provided by another client.</p>
64 </tp:docstring>
65 <tp:possible-errors>
66 <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
67 <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
68 </tp:possible-errors>
69 </method>
70 <signal name="CapabilitiesChanged">
71 <arg name="caps" type="a(usuuuu)">
72 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
73 An array of structures containing:
74 <ul>
75 <li>an integer handle representing the contact</li>
76 <li>a string channel type</li>
77 <li>a bitwise OR of the contact's old generic capability flags</li>
78 <li>a bitwise OR of the contact's new generic capability flags</li>
79 <li>a bitwise OR of the contact's old type specific capability flags</li>
80 <li>a bitwise OR of the contact's new type specific capability flags</li>
81 </ul>
82 </tp:docstring>
83 </arg>
84 <tp:docstring>
85 Announce that there has been a change of capabilities on the
86 given handle, or on the connection itself if the handle is zero.
87 </tp:docstring>
88 </signal>
89 <method name="GetCapabilities">
90 <arg direction="in" name="handles" type="au" tp:type="Contact_Handle[]">
91 <tp:docstring>
92 An array of contact handles for this connection, or zero to query capabilities available on the connection itself
93 </tp:docstring>
94 </arg>
95 <arg direction="out" type="a(usuu)">
96 <tp:docstring>
97 An array of structures containing:
98 <ul>
99 <li>an integer handle representing the contact</li>
100 <li>a string channel type</li>
101 <li>a bitwise OR of generic capability flags for the type</li>
102 <li>a bitwise OR of type specific capability flags for the type</li>
103 </ul>
104 </tp:docstring>
105 </arg>
106 <tp:docstring>
107 Returns an array of capabilities for the given contact handles, or
108 the connection itself (where handle is zero).
109 </tp:docstring>
110 <tp:possible-errors>
111 <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
112 <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
113 <tp:error name="org.freedesktop.Telepathy.Error.InvalidHandle">
114 <tp:docstring>
115 The handle does not represent a contact
116 </tp:docstring>
117 </tp:error>
118 <tp:error name="org.freedesktop.Telepathy.Error.PermissionDenied"/>
119 </tp:possible-errors>
120 </method>
121 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
122 <p>An interface for connections where it is possible to know what channel
123 types may be requested before the request is made to the connection object.
124 Each capability represents a commitment by the connection manager that it
125 will ordinarily be able to create a channel when given a request with the
126 given type and handle.</p>
127
128 <p>Capabilities can pertain to a certain contact handle, representing
129 activities such as having a text chat or a voice call with the user, or can
130 be on the connection itself (where the handle will be zero), where they
131 represent the ability to create channels for chat rooms or activities such
132 as searching and room listing. The activities are represented by the D-Bus
133 interface name of the channel type for that activity.</p>
134
135 <p>The generic capability flags are defined by ConnectionCapabilityFlag.</p>
136
137 <p>In addition, channel types may have type specific capability flags of their
138 own, which are described in the documentation for each channel type.</p>
139
140 <p>This interface also provides for user interfaces notifying the connection
141 manager of what capabilities to advertise for the user. This is done by
142 using the AdvertiseCapabilities method, and deals with the interface names
143 of channel types and the type specific flags pertaining to them which are
144 implemented by available client processes.</p>
145 </tp:docstring>
146 </interface>
147 <tp:flags name="Connection_Capability_Flags" value-prefix="Connection_Capability_Flag" type="u">
148 <tp:flag suffix="Create" value="1">
149 <tp:docstring>
150 The given channel type and handle can be given to RequestChannel to
151 create a new channel of this type.
152 </tp:docstring>
153 </tp:flag>
154 <tp:flag suffix="Invite" value="2">
155 <tp:docstring>
156 The given contact can be invited to an existing channel of this type.
157 </tp:docstring>
158 </tp:flag>
159 </tp:flags>
160 </node>
161 <!-- vim:set sw=2 sts=2 et ft=xml: -->
0 <?xml version="1.0" ?>
1 <node name="/Connection_Interface_Contact_Info" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
2 <tp:copyright> Copyright (C) 2005, 2006 Collabora Limited </tp:copyright>
3 <tp:copyright> Copyright (C) 2005, 2006 Nokia Corporation </tp:copyright>
4 <tp:copyright> Copyright (C) 2006 INdT </tp:copyright>
5 <tp:license xmlns="http://www.w3.org/1999/xhtml">
6 <p>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.</p>
10
11 <p>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 Library General Public License for more details.</p>
15
16 <p>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, MA 02110-1301, USA.</p>
19 </tp:license>
20 <interface name="org.freedesktop.Telepathy.Connection.Interface.ContactInfo">
21 <tp:requires interface="org.freedesktop.Telepathy.Connection"/>
22 <signal name="GotContactInfo">
23 <arg name="contact" type="u" tp:type="Contact_Handle">
24 <tp:docstring>
25 An integer handle of the contact ID on the server
26 </tp:docstring>
27 </arg>
28 <arg name="vcard" type="s">
29 <tp:docstring>
30 The XML string containing their vcard information
31 </tp:docstring>
32 </arg>
33 <tp:docstring>
34 Emitted when information has been received from the server with
35 the details of a particular contact.
36 </tp:docstring>
37 </signal>
38 <method name="RequestContactInfo">
39 <arg direction="in" name="contact" type="u" tp:type="Contact_Handle">
40 <tp:docstring>
41 An integer handle for the contact to request info for
42 </tp:docstring>
43 </arg>
44 <tp:docstring>
45 Request information for a given contact. The function will return
46 after a GotContactInfo signal has been emitted for the contact, or
47 an error returned.
48 </tp:docstring>
49 <tp:possible-errors>
50 <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
51 <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
52 <tp:error name="org.freedesktop.Telepathy.Error.InvalidHandle"/>
53 <tp:error name="org.freedesktop.Telepathy.Error.PermissionDenied"/>
54 <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable"/>
55 </tp:possible-errors>
56 </method>
57 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
58 <p>THIS INTERFACE IS DEPRECATED AND SHOULD NOT BE USED. A new version
59 will be proposed in the 0.13 specification branch.</p>
60
61 <p>An interface for requesting information about a contact on a given
62 connection. Information is returned as a vCard represented as an XML
63 string, in the format defined by JEP-0054: vcard-temp specifiation
64 from the Jabber Software Foundation (this is derived from the
65 aborted IETF draft draft-dawson-vcard-xml-dtd-01).</p>
66
67 <p>Implementations using PHOTO or SOUND elements should use the URI encoding
68 where possible, and not provide base64 encoded data to avoid unnecessary
69 bus traffic. Clients should not implement support for these encoded forms.
70 A separate interface will be provided for transferring user avatars.</p>
71
72 <p>The following extended element names are also added to represent
73 information from other systems which are not based around vCards:</p>
74 <dl>
75 <dt>USERNAME</dt><dd>the username of the contact on their local system (used on IRC for example)</dd>
76 <dt>HOSTNAME</dt><dd>the fully qualified hostname, or IPv4 or IPv6 address of the contact in dotted quad or colon-separated form</dd>
77 </dl>
78 </tp:docstring>
79 </interface>
80 </node>
81 <!-- vim:set sw=2 sts=2 et ft=xml: -->
0 <?xml version="1.0" ?>
1 <node name="/Connection_Interface_Forwarding" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
2 <tp:copyright> Copyright (C) 2005, 2006 Collabora Limited </tp:copyright>
3 <tp:copyright> Copyright (C) 2005, 2006 Nokia Corporation </tp:copyright>
4 <tp:copyright> Copyright (C) 2006 INdT </tp:copyright>
5 <tp:license xmlns="http://www.w3.org/1999/xhtml">
6 <p>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.</p>
10
11 <p>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 Library General Public License for more details.</p>
15
16 <p>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, MA 02110-1301, USA.</p>
19 </tp:license>
20 <interface name="org.freedesktop.Telepathy.Connection.Interface.Forwarding">
21 <tp:requires interface="org.freedesktop.Telepathy.Connection"/>
22 <signal name="ForwardingChanged">
23 <arg name="forward_to" type="u" tp:type="Contact_Handle">
24 <tp:docstring>
25 An integer contact handle to forward communication to
26 </tp:docstring>
27 </arg>
28 <tp:docstring>
29 Emitted when the forwarding contact handle for this connection has been
30 changed. An zero handle indicates forwarding is disabled.
31 </tp:docstring>
32 </signal>
33 <method name="GetForwardingHandle">
34 <arg direction="out" type="u" tp:type="Contact_Handle">
35 <tp:docstring>
36 An integer contact handle to whom incoming communication is forwarded
37 </tp:docstring>
38 </arg>
39 <tp:docstring>
40 Returns the current forwarding contact handle, or zero if none is set.
41 </tp:docstring>
42 <tp:possible-errors>
43 <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
44 <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
45 <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable"/>
46 </tp:possible-errors>
47 </method>
48 <method name="SetForwardingHandle">
49 <arg direction="in" name="forward_to" type="u" tp:type="Contact_Handle">
50 <tp:docstring>
51 An integer contact handle to forward incoming communications to
52 </tp:docstring>
53 </arg>
54 <tp:docstring>
55 Set a contact handle to forward incoming communications to. A zero
56 handle disables forwarding.
57 </tp:docstring>
58 <tp:possible-errors>
59 <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
60 <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
61 <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable"/>
62 <tp:error name="org.freedesktop.Telepathy.Error.PermissionDenied"/>
63 <tp:error name="org.freedesktop.Telepathy.Error.InvalidHandle"/>
64 </tp:possible-errors>
65 </method>
66 <tp:docstring>
67 A connection interface for services which can signal to contacts
68 that they should instead contact a different user ID, effectively
69 forwarding all incoming communication channels to another contact on
70 the service.
71 </tp:docstring>
72 </interface>
73 </node>
74 <!-- vim:set sw=2 sts=2 et ft=xml: -->
0 <?xml version="1.0" ?>
1 <node name="/Connection_Interface_Presence" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
2 <tp:copyright>
3 Copyright (C) 2005, 2006 Collabora Limited
4 </tp:copyright>
5 <tp:copyright>
6 Copyright (C) 2005, 2006 Nokia Corporation
7 </tp:copyright>
8 <tp:copyright>
9 Copyright (C) 2006 INdT
10 </tp:copyright>
11 <tp:license xmlns="http://www.w3.org/1999/xhtml">
12 <p>This library is free software; you can redistribute it and/or
13 modify it under the terms of the GNU Lesser General Public
14 License as published by the Free Software Foundation; either
15 version 2.1 of the License, or (at your option) any later version.</p>
16
17 <p>This library is distributed in the hope that it will be useful,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 Library General Public License for more details.</p>
21
22 <p>You should have received a copy of the GNU Lesser General Public
23 License along with this library; if not, write to the Free Software
24 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
25 </tp:license>
26 <interface name="org.freedesktop.Telepathy.Connection.Interface.Presence">
27 <tp:requires interface="org.freedesktop.Telepathy.Connection"/>
28 <method name="AddStatus">
29 <arg direction="in" name="status" type="s">
30 <tp:docstring>
31 The string identifier of the desired status
32 </tp:docstring>
33 </arg>
34 <arg direction="in" name="parms" type="a{sv}">
35 <tp:docstring>
36 A dictionary of optional parameter names mapped to their variant-boxed values
37 </tp:docstring>
38 </arg>
39 <tp:docstring>
40 Request that a single presence status is published for the user, along
41 with any desired parameters. Changes will be indicated by PresenceUpdate
42 signals being emitted.
43 </tp:docstring>
44 <tp:possible-errors>
45 <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
46 <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
47 <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument"/>
48 <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable"/>
49 <tp:error name="org.freedesktop.Telepathy.Error.PermissionDenied"/>
50 </tp:possible-errors>
51 </method>
52 <method name="ClearStatus">
53 <tp:docstring>
54 Request that all of a user's presence statuses be removed. Be aware
55 that this request may simply result in the statuses being replaced by a
56 default available status. Changes will be indicated by PresenceUpdate
57 signals being emitted.
58 </tp:docstring>
59 <tp:possible-errors>
60 <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
61 <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
62 <tp:error name="org.freedesktop.Telepathy.Error.PermissionDenied"/>
63 </tp:possible-errors>
64 </method>
65 <method name="GetPresence">
66 <arg direction="in" name="contacts" type="au" tp:type="Contact_Handle[]">
67 <tp:docstring>
68 An array of the contacts whose presence should be obtained
69 </tp:docstring>
70 </arg>
71 <arg direction="out" name="presence" type="a{u(ua{sa{sv}})}">
72 <tp:docstring>
73 Presence information in the same format as for the PresenceUpdate
74 signal
75 </tp:docstring>
76 </arg>
77 <tp:docstring>
78 Get presence previously emitted by PresenceUpdate for the given
79 contacts. Data is returned in the same structure as the PresenceUpdate
80 signal. Using this method in favour of RequestPresence has the
81 advantage that it will not wake up each client connected to the
82 PresenceUpdate signal.
83 </tp:docstring>
84 <tp:possible-errors>
85 <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
86 <tp:error name="org.freedesktop.Telepathy.Error.InvalidHandle"/>
87 <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable"/>
88 </tp:possible-errors>
89 </method>
90 <method name="GetStatuses">
91 <arg direction="out" type="a{s(ubba{ss})}">
92 <tp:docstring>
93 A dictionary of string identifiers mapped to a struct for each status, containing:
94 <ul>
95 <li>a type value from one of the values above</li>
96 <li>a boolean to indicate if this status may be set on yourself</li>
97 <li>a boolean to indicate if this is an exclusive status which you may not set alongside any other</li>
98 <li>a dictionary of valid optional string argument names mapped to their types</li>
99 </ul>
100 </tp:docstring>
101 </arg>
102 <tp:docstring>
103 Get a dictionary of the valid presence statuses for this connection.
104 This is only available when online because only some statuses will
105 be available on some servers.
106 </tp:docstring>
107 <tp:possible-errors>
108 <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
109 <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
110 </tp:possible-errors>
111 </method>
112 <signal name="PresenceUpdate">
113 <arg name="presence" type="a{u(ua{sa{sv}})}">
114 <tp:docstring>
115 A dictionary of contact handles mapped to a struct containing
116 a UNIX timestamp of the last activity time (in UTC), and
117 a dictionary mapping the contact's current status identifiers to
118 a dictionary of optional parameter names mapped to their
119 variant-boxed values
120 </tp:docstring>
121 </arg>
122 <tp:docstring>
123 This signal should be emitted when your own presence has been changed,
124 or the presence of the member of any of the connection's channels has
125 been changed, or when the presence requested by RequestPresence is available.
126
127 </tp:docstring>
128 </signal>
129 <method name="RemoveStatus">
130 <arg direction="in" name="status" type="s">
131 <tp:docstring>
132 The string identifier of the status not to publish anymore for the user
133 </tp:docstring>
134 </arg>
135 <tp:docstring>
136 Request that the given presence status is no longer published for the
137 user. Changes will be indicated by PresenceUpdate signals being
138 emitted. As with ClearStatus, removing a status may actually result in
139 it being replaced by a default available status.
140 </tp:docstring>
141 <tp:possible-errors>
142 <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
143 <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
144 <tp:error name="org.freedesktop.Telepathy.Error.PermissionDenied"/>
145 <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
146 <tp:docstring>The status requested is not currently set</tp:docstring>
147 </tp:error>
148 </tp:possible-errors>
149 </method>
150 <method name="RequestPresence">
151 <arg direction="in" name="contacts" type="au" tp:type="Contact_Handle[]">
152 <tp:docstring>
153 An array of the contacts whose presence should be obtained
154 </tp:docstring>
155 </arg>
156 <tp:docstring>
157 Request the presence for contacts on this connection. A PresenceUpdate
158 signal will be emitted when they are received. This is not the same as
159 subscribing to the presence of a contact, which must be done using the
160 'subscription' Channel.Type.ContactList, and on some protocols presence
161 information may not be available unless a subscription exists.
162 </tp:docstring>
163 <tp:possible-errors>
164 <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
165 <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
166 <tp:error name="org.freedesktop.Telepathy.Error.InvalidHandle"/>
167 <tp:error name="org.freedesktop.Telepathy.Error.PermissionDenied"/>
168 <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
169 <tp:docstring>
170 The presence of the requested contacts is not reported to this connection
171 </tp:docstring>
172 </tp:error>
173 </tp:possible-errors>
174 </method>
175 <method name="SetLastActivityTime">
176 <arg direction="in" name="time" type="u" tp:type="Timestamp">
177 <tp:docstring>
178 A UNIX timestamp of the user's last activity time (in UTC)
179 </tp:docstring>
180 </arg>
181 <tp:docstring>
182 Request that the recorded last activity time for the user be updated on
183 the server.
184 </tp:docstring>
185 <tp:possible-errors>
186 <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
187 <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
188 <tp:error name="org.freedesktop.Telepathy.Error.NotImplemented">
189 <tp:docstring>
190 This protocol has no concept of idle time
191 </tp:docstring>
192 </tp:error>
193 </tp:possible-errors>
194 </method>
195 <method name="SetStatus">
196 <arg direction="in" name="statuses" type="a{sa{sv}}">
197 <tp:docstring>
198 A dictionary mapping status identifiers to dictionaries, which
199 map optional parameter names to their variant-boxed values
200 </tp:docstring>
201 </arg>
202 <tp:docstring>
203 Request that the user's presence be changed to the given statuses and
204 desired parameters. Changes will be reflected by PresenceUpdate
205 signals being emitted. On certain protocols, this method may be
206 called on a newly-created connection which is still in the
207 DISCONNECTED state, and will sign on with the requested status.
208 If the requested status is not available after signing on,
209 NotAvailable will be returned and the connection will remain
210 offline, or if the protocol does not support signing on with
211 a certain status, Disconnected will be returned.
212 </tp:docstring>
213 <tp:possible-errors>
214 <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
215 <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
216 <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable"/>
217 <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument"/>
218 <tp:error name="org.freedesktop.Telepathy.Error.PermissionDenied"/>
219 </tp:possible-errors>
220 </method>
221 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
222 <p>This interface is for services which have a concept of presence which can
223 be published for yourself and monitored on your contacts. Telepathy's
224 definition of presence is based on that used by the Galago project
225 (see http://www.galago-project.org/).</p>
226
227 <p>Presence on an individual (yourself or one of your contacts) is modelled as
228 a last activity time along with a set of zero or more statuses, each of
229 which may have arbitrary key/value parameters. Valid statuses are defined
230 per connection, and a list of them can be obtained with the GetStatuses
231 method.</p>
232
233 <p>Each status has an arbitrary string identifier which should have an agreed
234 meaning between the connection manager and any client which is expected to
235 make use of it. The following well-known values (in common with those in
236 Galago) should be used where possible to allow clients to identify common
237 choices:</p>
238
239 <ul>
240 <li>available</li>
241 <li>away</li>
242 <li>brb (Be Right Back)</li>
243 <li>busy</li>
244 <li>dnd (Do Not Disturb),</li>
245 <li>xa (Extended Away)</li>
246 <li>hidden (aka Invisible)</li>
247 <li>offline</li>
248 </ul>
249
250 <p>As well as these well-known status identifiers, every status also has a
251 numerical type value chosen from ConnectionPresenceType which can be
252 used by the client to classify even unknown statuses into different
253 fundamental types.</p>
254
255 <p>These numerical types exist so that even if a client does not understand
256 the string identifier being used, and hence cannot present the presence to
257 the user to set on themselves, it may display an approximation of the
258 presence if it is set on a contact.</p>
259
260 <p>The dictionary of variant types allows the connection manager to exchange
261 further protocol-specific information with the client. It is recommended
262 that the string (s) argument 'message' be interpreted as an optional
263 message which can be associated with a presence status.</p>
264
265 <p>If the connection has a 'subscribe' contact list, PresenceUpdate signals
266 should be emitted to indicate changes of contacts on this list, and should
267 also be emitted for changes in your own presence. Depending on the
268 protocol, the signal may also be emitted for others such as people with
269 whom you are communicating, and any user interface should be updated
270 accordingly.</p>
271
272 <p>On some protocols, RequestPresence may only succeed on contacts on your
273 'subscribe' list, and other contacts will cause a PermissionDenied error.
274 On protocols where there is no 'subscribe' list, and RequestPresence
275 succeeds, a client may poll the server intermittently to update any display
276 of presence information.</p>
277 </tp:docstring>
278 <tp:enum name="Connection_Presence_Type" type="u">
279 <tp:enumvalue suffix="Unset" value="0">
280 <tp:docstring>
281 An invalid presence type used as a null value
282 </tp:docstring>
283 </tp:enumvalue>
284 <tp:enumvalue suffix="Offline" value="1">
285 <tp:docstring>
286 Offline
287 </tp:docstring>
288 </tp:enumvalue>
289 <tp:enumvalue suffix="Available" value="2">
290 <tp:docstring>
291 Available
292 </tp:docstring>
293 </tp:enumvalue>
294 <tp:enumvalue suffix="Away" value="3">
295 <tp:docstring>
296 Away
297 </tp:docstring>
298 </tp:enumvalue>
299 <tp:enumvalue suffix="Extended_Away" value="4">
300 <tp:docstring>
301 Away for an extended time
302 </tp:docstring>
303 </tp:enumvalue>
304 <tp:enumvalue suffix="Hidden" value="5">
305 <tp:docstring>
306 Hidden (invisible)
307 </tp:docstring>
308 </tp:enumvalue>
309 </tp:enum>
310 </interface>
311 </node>
312 <!-- vim:set sw=2 sts=2 et ft=xml: -->
0 <?xml version="1.0" ?>
1 <node name="/Connection_Interface_Privacy" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
2 <tp:copyright> Copyright (C) 2005, 2006 Collabora Limited </tp:copyright>
3 <tp:copyright> Copyright (C) 2005, 2006 Nokia Corporation </tp:copyright>
4 <tp:copyright> Copyright (C) 2006 INdT </tp:copyright>
5 <tp:license xmlns="http://www.w3.org/1999/xhtml">
6 <p>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.</p>
10
11 <p>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 Library General Public License for more details.</p>
15
16 <p>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, MA 02110-1301, USA.</p>
19 </tp:license>
20 <interface name="org.freedesktop.Telepathy.Connection.Interface.Privacy">
21 <tp:requires interface="org.freedesktop.Telepathy.Connection"/>
22 <method name="GetPrivacyMode">
23 <arg direction="out" type="s">
24 <tp:docstring>
25 A string representing the current privacy mode
26 </tp:docstring>
27 </arg>
28 <tp:docstring>
29 Return the current privacy mode, which must be one of the values
30 returned by GetPrivacyModes.
31 </tp:docstring>
32 <tp:possible-errors>
33 <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
34 <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
35 </tp:possible-errors>
36 </method>
37 <method name="GetPrivacyModes">
38 <arg direction="out" type="as">
39 <tp:docstring>
40 An array of valid privacy modes for this connection
41 </tp:docstring>
42 </arg>
43 <tp:docstring>
44 Returns the privacy modes available on this connection. The following
45 well-known names should be used where appropriate:
46 <dl>
47 <dt>allow-all</dt><dd>any contact may initiate communication</dd>
48 <dt>allow-specified</dt><dd>only contacts on your 'allow' list may initiate communication</dd>
49 <dt>allow-subscribed</dt><dd>only contacts on your subscription list may initiate communication</dd>
50 </dl>
51 </tp:docstring>
52 </method>
53 <signal name="PrivacyModeChanged">
54 <arg name="mode" type="s">
55 <tp:docstring>
56 The current privacy mode
57 </tp:docstring>
58 </arg>
59 <tp:docstring>
60 Emitted when the privacy mode is changed or the value has been
61 initially received from the server.
62 </tp:docstring>
63 </signal>
64 <method name="SetPrivacyMode">
65 <arg direction="in" name="mode" type="s">
66 <tp:docstring>
67 The desired privacy mode
68 </tp:docstring>
69 </arg>
70 <tp:docstring>
71 Request that the privacy mode be changed to the given value, which
72 must be one of the values returned by GetPrivacyModes. Success is
73 indicated by the method returning and the PrivacyModeChanged
74 signal being emitted.
75 </tp:docstring>
76 <tp:possible-errors>
77 <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
78 <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
79 <tp:error name="org.freedesktop.Telepathy.Error.PermissionDenied"/>
80 <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument"/>
81 </tp:possible-errors>
82 </method>
83 <tp:docstring>
84 An interface to support getting and setting privacy modes to configure
85 situations such as not being contactable by people who are not on your
86 subscribe list. If this interface is not implemented, the default can be
87 presumed to be allow-all (as defined in GetPrivacyModes).
88 </tp:docstring>
89 </interface>
90 </node>
91 <!-- vim:set sw=2 sts=2 et ft=xml: -->
0 <?xml version="1.0" ?>
1 <node name="/Connection_Interface_Renaming" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
2 <tp:copyright> Copyright (C) 2005, 2006 Collabora Limited </tp:copyright>
3 <tp:copyright> Copyright (C) 2005, 2006 Nokia Corporation </tp:copyright>
4 <tp:copyright> Copyright (C) 2006 INdT </tp:copyright>
5 <tp:license xmlns="http://www.w3.org/1999/xhtml">
6 <p>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.</p>
10
11 <p>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 Library General Public License for more details.</p>
15
16 <p>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, MA 02110-1301, USA.</p>
19 </tp:license>
20 <interface name="org.freedesktop.Telepathy.Connection.Interface.Renaming">
21 <tp:requires interface="org.freedesktop.Telepathy.Connection"/>
22 <signal name="Renamed">
23 <arg name="original" type="u" tp:type="Contact_Handle">
24 <tp:docstring>
25 The handle of the original identifier
26 </tp:docstring>
27 </arg>
28 <arg name="new" type="u" tp:type="Contact_Handle">
29 <tp:docstring>
30 The handle of the new identifier
31 </tp:docstring>
32 </arg>
33 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
34 <p>Emitted when the unique identifier of a contact on the server
35 changes.</p>
36
37 <p>Any channels associated with the contact's original handle will
38 continue to be to that handle, and so are no longer useful (unless
39 the contact renames back, or another contact connects with that
40 unique ID). Clients may open a similar channel associated with the
41 new handle to continue communicating with the contact.</p>
42
43 <p>For example, if a GUI client associates text
44 channels with chat windows, it should detach the old channel
45 from the chat window, closing it, and associate a channel to the
46 new handle with the same window.</p>
47
48 <p>If the contact's old handle is in any of the member lists of
49 a channel which has the groups interface, it will be removed from
50 the channel and the new handle will be added. The resulting
51 MembersChanged signal must be emitted <em>after</em> the Renamed
52 signal; the reason should be RENAMED.
53 </p>
54
55 <p>The handles may be either general-purpose or channel-specific.
56 If the original handle is general-purpose, the new handle must be
57 general-purpose; if the original handle is channel-specific, the
58 new handle must be channel-specific in the same channel.
59 </p>
60 </tp:docstring>
61 </signal>
62 <method name="RequestRename">
63 <arg direction="in" name="name" type="s">
64 <tp:docstring>
65 The desired identifier
66 </tp:docstring>
67 </arg>
68 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
69 <p>Request that the user's own identifier is changed on the server.
70 If successful, a Renamed signal will be emitted for the current
71 "self handle" as returned by GetSelfHandle.</p>
72 <p>It is protocol-dependent how the identifier that's actually
73 used will be derived from the supplied identifier; some sort of
74 normalization might take place.</p>
75 </tp:docstring>
76 <tp:possible-errors>
77 <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
78 <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
79 <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable"/>
80 <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument"/>
81 <tp:error name="org.freedesktop.Telepathy.Error.PermissionDenied"/>
82 </tp:possible-errors>
83 </method>
84 <tp:docstring>
85 An interface on connections to support protocols where the unique
86 identifiers of contacts can change. Because handles are immutable,
87 this is represented by a pair of handles, that representing the
88 old name, and that representing the new one.
89 </tp:docstring>
90 </interface>
91 </node>
92 <!-- vim:set sw=2 sts=2 et ft=xml: -->
0 <?xml version="1.0" ?>
1 <node name="/Connection_Manager" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
2 <tp:copyright>Copyright (C) 2005, 2006 Collabora Limited</tp:copyright>
3 <tp:copyright>Copyright (C) 2005, 2006 Nokia Corporation</tp:copyright>
4 <tp:copyright>Copyright (C) 2006 INdT</tp:copyright>
5 <tp:license xmlns="http://www.w3.org/1999/xhtml">
6 <p>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.</p>
10
11 <p>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 Library General Public License for more details.</p>
15
16 <p>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, MA 02110-1301, USA.</p>
19 </tp:license>
20 <interface name="org.freedesktop.Telepathy.ConnectionManager">
21 <tp:flags name="Conn_Mgr_Param_Flags" value-prefix="Conn_Mgr_Param_Flag" type="u">
22 <tp:flag suffix="Required" value="1">
23 <tp:docstring>
24 This parameter is required for connecting to the server.
25 </tp:docstring>
26 </tp:flag>
27 <tp:flag suffix="Register" value="2">
28 <tp:docstring>
29 This parameter is required for registering an account on the
30 server.
31 </tp:docstring>
32 </tp:flag>
33 <tp:flag suffix="Has_Default" value="4">
34 <tp:docstring>
35 This parameter has a default value, which is returned in
36 GetParameters; not providing this parameter is equivalent to
37 providing the default.
38 </tp:docstring>
39 </tp:flag>
40 </tp:flags>
41 <method name="GetParameters">
42 <arg direction="in" name="proto" type="s">
43 <tp:docstring>
44 The required protocol name
45 </tp:docstring>
46 </arg>
47 <arg direction="out" type="a(susv)">
48 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
49 An array of structs containing:
50 <ul>
51 <li>a string parameter name</li>
52 <li>a bitwise OR of the parameter flags (as defined above)</li>
53 <li>a string D-Bus type signature</li>
54 <li>a variant boxed default value (if the HAS_DEFAULT flag is not
55 present, there is no default and this takes some dummy value)</li>
56 </ul>
57 </tp:docstring>
58 </arg>
59 <tp:docstring>
60 Get a list of the parameters which must or may be provided to the
61 RequestConnection method when connecting to the given protocol,
62 or registering (the boolean &quot;register&quot; parameter is available,
63 and set to true).
64 </tp:docstring>
65 <tp:possible-errors>
66 <tp:error name="org.freedesktop.Telepathy.Error.NotImplemented">
67 The requested protocol is not supported by this manager
68 </tp:error>
69 </tp:possible-errors>
70 </method>
71 <method name="ListProtocols">
72 <arg direction="out" type="as">
73 <tp:docstring>
74 A array of string protocol identifiers supported by this manager
75 </tp:docstring>
76 </arg>
77 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
78 Get a list of protocol identifiers that are implemented by this
79 connection manager. The following well-known values should be used
80 when applicable:
81 <ul>
82 <li>aim - AOL Instant Messenger</li>
83 <li>gadugadu - Gadu-Gadu</li>
84 <li>groupwise - Novell Groupwise</li>
85 <li>icq - ICQ</li>
86 <li>irc - Internet Relay Chat</li>
87 <li>jabber - Jabber (XMPP)</li>
88 <li>local-xmpp - Link-local XMPP (XEP-0174, Bonjour, Salut)</li>
89 <li>msn - MSN Messenger</li>
90 <li>napster - Napster</li>
91 <li>silc - SILC</li>
92 <li>sip - Session Initiation Protocol (SIP)</li>
93 <li>trepia - Trepia</li>
94 <li>yahoo - Yahoo! Messenger</li>
95 <li>zephyr - Zephyr</li>
96 </ul>
97 </tp:docstring>
98 </method>
99 <signal name="NewConnection">
100 <arg name="bus_name" type="s">
101 <tp:docstring>
102 The D-Bus service where the connection object can be found
103 </tp:docstring>
104 </arg>
105 <arg name="object_path" type="o">
106 <tp:docstring>
107 The object path of the Connection object on this service
108 </tp:docstring>
109 </arg>
110 <arg name="proto" type="s">
111 <tp:docstring>
112 The identifier for the protocol this connection uses
113 </tp:docstring>
114 </arg>
115 <tp:docstring>
116 Emitted when a new Connection object is created.
117 </tp:docstring>
118 </signal>
119 <method name="RequestConnection">
120 <arg direction="in" name="proto" type="s">
121 <tp:docstring>
122 The protocol identifier
123 </tp:docstring>
124 </arg>
125 <arg direction="in" name="parameters" type="a{sv}">
126 <tp:docstring>
127 A dictionary mapping parameter name to the variant boxed value
128 </tp:docstring>
129 </arg>
130 <arg direction="out" type="s">
131 <tp:docstring>
132 A D-Bus service name where the new Connection object can be found
133 </tp:docstring>
134 </arg>
135 <arg direction="out" type="o">
136 <tp:docstring>
137 The D-Bus object path to the Connection on this service
138 </tp:docstring>
139 </arg>
140 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
141 <p>Request a Connection object representing a given account on a given
142 protocol with the given parameters. The method returns the bus name
143 and the object path where the new Connection object can be found, which
144 should have the status of CONNECTION_STATUS_DISCONNECTED, to allow
145 signal handlers to be attached before connecting is started with the
146 Connect method.</p>
147
148 <p>In order to allow Connection objects to be discovered by new clients,
149 the object path and bus name must be of the form:</p>
150 <pre>/org/freedesktop/Telepathy/Connection/manager/proto/account</pre>
151 <p>And:</p>
152 <pre>org.freedesktop.Telepathy.Connection.manager.proto.account</pre>
153 <p>Where manager and proto are the identifiers for this manager and this
154 protocol, and account is a series of elements formed such that any
155 valid distinct connection instance on this protocol has a distinct
156 name. This might be formed by including the server name followed by the
157 user name, or on protocols where connecting multiple times is
158 permissable, a per-connection identifier is also necessary to ensure
159 uniqueness.</p>
160
161 <p>The parameters which must and may be provided in the parameters
162 dictionary can be discovered with the GetParameters method. These
163 parameters, their types, and their default values may be cached
164 in files so that all available connection managers do not need to be
165 started to discover which protocols are available.</p>
166
167 <p>To request values for these parameters from the user, a client must
168 have prior knowledge of the meaning of the parameter names, so the
169 following well-known names and types should be used where appropriate:</p>
170
171 <dl>
172 <dt>s:account</dt>
173 <dd>The identifier for the user's account on the server</dd>
174
175 <dt>s:server</dt><dd>A fully qualified domain name or numeric IPv4 or IPv6
176 address. Using the fully-qualified domain name form is recommended
177 whenever possible. If this parameter is specified and the account
178 for that protocol also specifies a server, this parameter should
179 override that in the user id.</dd>
180
181 <dt>q:port</dt><dd>A TCP or UDP port number. If this parameter is specified
182 and the account for that protocol also specifies a port, this
183 parameter should override that in the account.</dd>
184
185 <dt>s:password</dt><dd>A password associated with the account.</dd>
186
187 <dt>b:require-encryption</dt><dd>Require encryption for this connection. A
188 connection should fail to connect if require-encryption is set
189 and an encrypted connection is not possible.</dd>
190
191 <dt>b:register</dt><dd>This account should be created on the server if it
192 does not already exist.</dd>
193
194 <dt>s:ident</dt><dd>The local username to report to the server if
195 necessary, such as in IRC.</dd>
196
197 <dt>s:fullname</dt><dd>The user's full name if the service requires this
198 when authenticating or registering.</dd>
199
200 <dt>s:stun-server</dt><dd>The IP address or FQDN of a STUN server to use
201 for NAT traversal, without any ":port" suffix.</dd>
202 <dt>q:stun-port</dt><dd>The UDP port number on the stun-server to use for
203 STUN. Only significant if the stun-server is also supplied.</dd>
204 </dl>
205
206 <p>Every successful RequestConnection call will cause the emission of a
207 NewConnection signal for the same newly created connection. The
208 requester can use the returned object path and service name
209 independently of the emission of that signal. In that case this signal
210 emission is most useful for, e.g. other processes that are monitoring
211 the creation of new connections.</p>
212 </tp:docstring>
213 <tp:possible-errors>
214 <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
215 <tp:error name="org.freedesktop.Telepathy.Error.NotImplemented">
216 The requested protocol is not supported by this manager
217 </tp:error>
218 <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
219 The requested connection already appears to exist
220 </tp:error>
221 <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
222 Unrecognised connection parameters
223 </tp:error>
224 </tp:possible-errors>
225 </method>
226 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
227 <p>A D-Bus service which allows connections to be created. The manager
228 processes are intended to be started by D-Bus service activation. The
229 names of these services, the protocols they support, and the parameters
230 understood by that protocol are intended to be discovered by reading files
231 on disk which are provided along with the connection manager. These are
232 documented elsewhere.</p>
233
234 <p>Once a connection manager service has been activated, the object
235 path of the manager object implementing this interface is always
236 /org/freedesktop/Telepathy/ConnectionManager/name
237 Where name is the identifier for the connection manager.</p>
238
239 <p>It is not required that a connection manager be able to support multiple
240 protocols, or even multiple connections. When a connection is made, a
241 service name where the connection object can be found is returned. A
242 manager which can only make one connection may then remove itself from its
243 well-known bus name, causing a new connection manager to be activated when
244 somebody attempts to make a new connection.</p>
245 </tp:docstring>
246 </interface>
247 </node>
248 <!-- vim:set sw=2 sts=2 et ft=xml: -->
0 <?xml version="1.0" ?>
1 <node name="/Media_Session_Handler" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
2 <tp:copyright> Copyright (C) 2005, 2006 Collabora Limited </tp:copyright>
3 <tp:copyright> Copyright (C) 2005, 2006 Nokia Corporation </tp:copyright>
4 <tp:copyright> Copyright (C) 2006 INdT </tp:copyright>
5 <tp:license xmlns="http://www.w3.org/1999/xhtml">
6 <p>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.</p>
10
11 <p>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 Library General Public License for more details.</p>
15
16 <p>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, MA 02110-1301, USA.</p>
19 </tp:license>
20 <interface name="org.freedesktop.Telepathy.Media.SessionHandler">
21 <method name="Error">
22 <arg direction="in" name="errno" type="u"/>
23 <arg direction="in" name="message" type="s"/>
24 <tp:docstring>
25 THIS METHOD IS DEPRECATED AND SHOULD NOT BE USED. Instead the Error
26 function should be used on the relevant MediaStreamHandler objects.
27 Informs the connection manager that an error occured in this session.
28 If used, the connection manager must terminate the session and all of
29 the streams within it, and may also emit a StreamError signal on the
30 channel for each stream within the session.
31 </tp:docstring>
32 </method>
33 <signal name="NewStreamHandler">
34 <arg name="stream_handler" type="o">
35 <tp:docstring>
36 An object path to a new MediaStreamHandler
37 </tp:docstring>
38 </arg>
39 <arg name="id" type="u">
40 <tp:docstring>
41 The unique ID of the new stream
42 </tp:docstring>
43 </arg>
44 <arg name="media_type" type="u" tp:type="Media_Stream_Type">
45 <tp:docstring>
46 Enum for type of media that this stream should handle
47 (a value from MediaStreamType)
48 </tp:docstring>
49 </arg>
50 <arg name="direction" type="u" tp:type="Media_Stream_Direction">
51 <tp:docstring>
52 Enum for direction of this stream (a value from
53 MediaStreamDirection)
54 </tp:docstring>
55 </arg>
56 <tp:docstring>
57 Emitted when a new stream handler has been created for this
58 session.
59 </tp:docstring>
60 </signal>
61 <method name="Ready">
62 <tp:docstring>
63 Inform the connection manager that a client is ready to handle
64 this session handler.
65 </tp:docstring>
66 </method>
67 <tp:docstring>
68 An media session handler is an object that handles a number of synchronised
69 media streams.
70 </tp:docstring>
71 </interface>
72 </node>
73 <!-- vim:set sw=2 sts=2 et ft=xml: -->
0 <?xml version="1.0" ?>
1 <node name="/Media_Stream_Handler" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
2 <tp:copyright> Copyright (C) 2005, 2006 Collabora Limited </tp:copyright>
3 <tp:copyright> Copyright (C) 2005, 2006 Nokia Corporation </tp:copyright>
4 <tp:copyright> Copyright (C) 2006 INdT </tp:copyright>
5 <tp:license xmlns="http://www.w3.org/1999/xhtml">
6 <p>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.</p>
10
11 <p>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 Library General Public License for more details.</p>
15
16 <p>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, MA 02110-1301, USA.</p>
19 </tp:license>
20 <interface name="org.freedesktop.Telepathy.Media.StreamHandler">
21 <signal name="AddRemoteCandidate">
22 <arg name="candidate_id" type="s">
23 <tp:docstring>
24 String identifier for this candidate
25 </tp:docstring>
26 </arg>
27 <arg name="transports" type="a(usuussduss)">
28 <tp:docstring>
29 Array of transports for this candidate with fields,
30 as defined in NewNativeCandidate
31 </tp:docstring>
32 </arg>
33 <tp:docstring>
34 Signal emitted when the connection manager wishes to inform the
35 client of a new remote candidate.
36 </tp:docstring>
37 </signal>
38 <signal name="Close">
39 <tp:docstring>
40 Signal emitted when the connection manager wishes the stream to be
41 closed.
42 </tp:docstring>
43 </signal>
44 <method name="CodecChoice">
45 <arg direction="in" name="codec_id" type="u"/>
46 <tp:docstring>
47 Inform the connection manager of the current codec choice.
48 </tp:docstring>
49 </method>
50 <method name="Error">
51 <arg direction="in" name="errno" type="u" tp:type="Media_Stream_Error">
52 <tp:docstring>
53 ID of error, from the MediaStreamError enumeration
54 </tp:docstring>
55 </arg>
56 <arg direction="in" name="message" type="s">
57 <tp:docstring>
58 String describing the error
59 </tp:docstring>
60 </arg>
61 <tp:docstring>
62 Inform the connection manager that an error occured in this stream. The
63 connection manager should emit the StreamError signal for the stream on
64 the relevant channel, and remove the stream from the session.
65 </tp:docstring>
66 </method>
67 <tp:enum name="Media_Stream_Error" type="u">
68 <tp:enumvalue suffix="Unknown" value="0">
69 <tp:docstring>
70 An unknown error occured.
71 </tp:docstring>
72 </tp:enumvalue>
73 <tp:enumvalue suffix="EOS" value="1">
74 <tp:docstring>
75 The end of the stream was reached.
76 </tp:docstring>
77 </tp:enumvalue>
78 </tp:enum>
79 <method name="NativeCandidatesPrepared">
80 <tp:docstring>
81 Informs the connection manager that all possible native candisates
82 have been discovered for the moment.
83 </tp:docstring>
84 </method>
85 <method name="NewActiveCandidatePair">
86 <arg direction="in" name="native_candidate_id" type="s"/>
87 <arg direction="in" name="remote_candidate_id" type="s"/>
88 <tp:docstring>
89 Informs the connection manager that a valid candidate pair
90 has been discovered and streaming is in progress.
91 </tp:docstring>
92 </method>
93 <tp:enum name="Media_Stream_Base_Proto" type="u">
94 <tp:enumvalue suffix="UDP" value="0">
95 <tp:docstring>UDP (User Datagram Protocol)</tp:docstring>
96 </tp:enumvalue>
97 <tp:enumvalue suffix="TCP" value="1">
98 <tp:docstring>TCP (Transmission Control Protocol)</tp:docstring>
99 </tp:enumvalue>
100 </tp:enum>
101 <method name="NewNativeCandidate">
102 <arg direction="in" name="candidate_id" type="s">
103 <tp:docstring>
104 String identifier for this candidate
105 </tp:docstring>
106 </arg>
107 <arg direction="in" name="transports" type="a(usuussduss)">
108 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
109 Array of transports for this candidate, with fields:
110 <ul>
111 <li>component number</li>
112 <li>IP address (as a string)</li>
113 <li>port</li>
114 <li>base network protocol (one of the values of MediaStreamBaseProto)</li>
115 <li>proto subtype (e.g. RTP)</li>
116 <li>proto profile (e.g. AVP)</li>
117 <li>our preference value of this transport (double in range 0.0-1.0
118 inclusive); 1 signals the most preferred transport</li>
119 <li>transport type, one of the values of MediaStreamTransportType</li>
120 <li>username if authentication is required</li>
121 <li>password if authentication is required</li>
122 </ul>
123 </tp:docstring>
124 </arg>
125 <tp:docstring>
126 Inform this MediaStreamHandler that a new native transport candidate
127 has been ascertained.
128 </tp:docstring>
129 </method>
130 <tp:enum name="Media_Stream_Transport_Type" type="u">
131 <tp:enumvalue suffix="Local" value="0">
132 <tp:docstring>
133 A local address
134 </tp:docstring>
135 </tp:enumvalue>
136 <tp:enumvalue suffix="Derived" value="1">
137 <tp:docstring>
138 An external address derived by a method such as STUN
139 </tp:docstring>
140 </tp:enumvalue>
141 <tp:enumvalue suffix="Relay" value="2">
142 <tp:docstring>
143 An external stream relay
144 </tp:docstring>
145 </tp:enumvalue>
146 </tp:enum>
147 <method name="Ready">
148 <arg direction="in" name="codecs" type="a(usuuua{ss})">
149 <tp:docstring>
150 As for SupportedCodecs.
151 </tp:docstring>
152 </arg>
153 <tp:docstring>
154 Inform the connection manager that a client is ready to handle
155 this StreamHandler. Also provide it with info about all supported
156 codecs.
157 </tp:docstring>
158 </method>
159 <method name="SetLocalCodecs">
160 <arg name="codecs" type="a(usuuua{ss})" direction="in">
161 <tp:docstring>Codecs in the same format as for
162 SupportedCodecs, which have the same semantics as the
163 local codecs passed to Ready</tp:docstring>
164 </arg>
165 <tp:docstring>
166 Used to provide codecs after Ready(), so the media client can go
167 ready for an incoming call and exchange candidates/codecs before
168 knowing what local codecs are available.
169 </tp:docstring>
170 </method>
171 <signal name="RemoveRemoteCandidate">
172 <arg name="candidate_id" type="s">
173 <tp:docstring>
174 String identifier for remote candidate to drop
175 </tp:docstring>
176 </arg>
177 <tp:docstring>
178 Signal emitted when the connection manager wishes to inform the
179 client that the remote end has removed a previously usable
180 candidate.
181 </tp:docstring>
182 </signal>
183 <signal name="SetActiveCandidatePair">
184 <arg name="native_candidate_id" type="s"/>
185 <arg name="remote_candidate_id" type="s"/>
186 <tp:docstring>
187 Emitted by the connection manager to inform the client that a
188 valid candidate pair has been discovered by the remote end
189 and streaming is in progress.
190 </tp:docstring>
191 </signal>
192 <signal name="SetRemoteCandidateList">
193 <arg name="remote_candidates" type="a(sa(usuussduss))">
194 <tp:docstring>
195 A list of candidate id and a list of transports
196 as defined in NewNativeCandidate
197 </tp:docstring>
198 </arg>
199 <tp:docstring>
200 Signal emitted when the connection manager wishes to inform the
201 client of all the available remote candidates at once.
202 </tp:docstring>
203 </signal>
204 <signal name="SetRemoteCodecs">
205 <arg name="codecs" type="a(usuuua{ss})">
206 <tp:docstring>As for SupportedCodecs</tp:docstring>
207 </arg>
208 <tp:docstring>
209 Signal emitted when the connection manager wishes to inform the
210 client of the codecs supported by the remote end.
211 </tp:docstring>
212 </signal>
213 <signal name="SetStreamPlaying">
214 <arg name="playing" type="b"/>
215 <tp:docstring>
216 Signal emitted when the connection manager wishes to set the
217 stream playing or stopped.
218 </tp:docstring>
219 </signal>
220 <signal name="SetStreamSending">
221 <arg name="sending" type="b"/>
222 <tp:docstring>
223 Signal emitted when the connection manager wishes to set whether or not
224 the stream sends to the remote end.
225 </tp:docstring>
226 </signal>
227 <signal name="StartTelephonyEvent">
228 <arg name="event" type="y">
229 <tp:docstring>
230 A telephony event code as defined by RFC 4733.
231 </tp:docstring>
232 </arg>
233 <tp:docstring>
234 Request that a telephony event (as defined by RFC 4733) is transmitted
235 over this stream until StopTelephonyEvent is called.
236 </tp:docstring>
237 </signal>
238 <signal name="StopTelephonyEvent">
239 <tp:docstring>
240 Request that any ongoing telephony events (as defined by RFC 4733)
241 being transmitted over this stream are stopped.
242 </tp:docstring>
243 </signal>
244 <method name="StreamState">
245 <arg direction="in" name="state" type="u" tp:type="Media_Stream_State"/>
246 <tp:docstring>
247 Informs the connection manager of the stream's current state, as
248 as specified in Channel.Type.StreamedMedia::ListStreams.
249 </tp:docstring>
250 </method>
251 <method name="SupportedCodecs">
252 <arg direction="in" name="codecs" type="a(usuuua{ss})">
253 <tp:docstring>
254 List of codec info structures, each containing:
255 <ul>
256 <li>ID of codec</li>
257 <li>Codec name</li>
258 <li>Media type</li>
259 <li>Clock rate of codec</li>
260 <li>Number of supported channels</li>
261 <li>String key-value pairs for supported optional parameters</li>
262 </ul>
263 </tp:docstring>
264 </arg>
265 <tp:docstring>
266 Inform the connection manager of the supported codecs for this session.
267 This is called after the connection manager has emitted SetRemoteCodecs
268 to notify what codecs are supported by the peer, and will thus be an
269 intersection of all locally supported codecs (passed to Ready)
270 and those supported by the peer.
271 </tp:docstring>
272 </method>
273 <tp:docstring>
274 Handles signalling the information pertaining to a specific media stream.
275 A client should provide information to this handler as and when it is
276 available.
277 </tp:docstring>
278 </interface>
279 </node>
280 <!-- vim:set sw=2 sts=2 et ft=xml: -->
0 <?xml version="1.0" ?>
1 <node name="/Properties_Interface" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
2 <tp:copyright> Copyright (C) 2005-2007 Collabora Limited </tp:copyright>
3 <tp:copyright> Copyright (C) 2005, 2006 Nokia Corporation </tp:copyright>
4 <tp:copyright> Copyright (C) 2006 INdT </tp:copyright>
5 <tp:license xmlns="http://www.w3.org/1999/xhtml">
6 <p>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.</p>
10
11 <p>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 Library General Public License for more details.</p>
15
16 <p>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, MA 02110-1301, USA.</p>
19 </tp:license>
20 <interface name="org.freedesktop.Telepathy.Properties">
21 <method name="GetProperties">
22 <tp:docstring>
23 Returns an array of (identifier, value) pairs containing the current
24 values of the given properties.
25 </tp:docstring>
26 <arg direction="in" name="properties" type="au">
27 <tp:docstring>An array of property identifiers</tp:docstring>
28 </arg>
29 <arg direction="out" type="a(uv)">
30 <!-- XXX: if we're ever breaking API compatibility, make this a{uv} -->
31 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
32 <p>An array of structs containing:</p>
33 <ul>
34 <li>integer identifiers</li>
35 <li>variant boxed values</li>
36 </ul>
37 </tp:docstring>
38 </arg>
39 <tp:possible-errors>
40 <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
41 <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
42 <tp:docstring>
43 Some property identifier requested is invalid
44 </tp:docstring>
45 </tp:error>
46 <tp:error name="org.freedesktop.Telepathy.Error.PermissionDenied">
47 <tp:docstring>
48 Some property requested does not have the PROPERTY_FLAG_READ flag
49 </tp:docstring>
50 </tp:error>
51 </tp:possible-errors>
52 </method>
53 <method name="ListProperties">
54 <tp:docstring>
55 Returns a dictionary of the properties available on this channel.
56 </tp:docstring>
57 <arg direction="out" type="a(ussu)">
58 <!-- XXX: if we're ever breaking API compatibility, make this
59 a{u(ssu)} ? -->
60 <tp:docstring>
61 An array of structs containing:
62 <ul>
63 <li>an integer identifier</li>
64 <li>a string property name</li>
65 <li>a string representing the D-Bus signature of this property</li>
66 <li>a bitwise OR of the flags applicable to this property</li>
67 </ul>
68 </tp:docstring>
69 </arg>
70 </method>
71 <signal name="PropertiesChanged">
72 <tp:docstring>
73 Emitted when the value of readable properties has changed.
74 </tp:docstring>
75 <arg name="properties" type="a(uv)">
76 <!-- XXX: if we're ever breaking API compatibility, make this a{uv} -->
77 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
78 <p>An array of structs containing:</p>
79 <ul>
80 <li>integer identifiers</li>
81 <li>variant boxed values</li>
82 </ul>
83 <p>The array should contain only properties whose values have
84 actually changed.</p>
85 </tp:docstring>
86 </arg>
87 </signal>
88 <signal name="PropertyFlagsChanged">
89 <tp:docstring>
90 Emitted when the flags of some room properties have changed.
91 </tp:docstring>
92 <arg name="properties" type="a(uu)">
93 <!-- XXX: if we're ever breaking API compatibility, make this a{uu} -->
94 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
95 <p>An array of structs containing:</p>
96 <ul>
97 <li>integer identifiers</li>
98 <li>a bitwise OR of the current flags</li>
99 </ul>
100 <p>The array should contain only properties whose flags have actually
101 changed.</p>
102 </tp:docstring>
103 </arg>
104 </signal>
105 <method name="SetProperties">
106 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
107 <p>Takes an array of (identifier, value) pairs containing desired
108 values to set the given properties. In the case of any errors, no
109 properties will be changed. When the changes have been acknowledged
110 by the server, the PropertiesChanged signal will be emitted.</p>
111
112 <p>All properties given must have the PROPERTY_FLAG_WRITE flag, or
113 PermissionDenied will be returned. If any variants are of the wrong
114 type, NotAvailable will be returned. If any given property identifiers
115 are invalid, InvalidArgument will be returned.</p>
116 </tp:docstring>
117
118 <arg direction="in" name="properties" type="a(uv)">
119 <!-- XXX: if we're ever breaking API compatibility, make this a{uv} -->
120 <tp:docstring>
121 A dictionary mapping integer identifiers to boxed values
122 </tp:docstring>
123 </arg>
124 <tp:possible-errors>
125 <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
126 <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument"/>
127 <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable"/>
128 <tp:error name="org.freedesktop.Telepathy.Error.PermissionDenied"/>
129 <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
130 </tp:possible-errors>
131 </method>
132 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
133 <p>Interface for channels and other objects, to allow querying and setting
134 properties. ListProperties returns which properties are valid for
135 the given channel, including their type, and an integer handle used to
136 refer to them in GetProperties, SetProperties, and the PropertiesChanged
137 signal. The values are represented by D-Bus variant types, and are
138 accompanied by flags indicating whether or not the property is readable or
139 writable.</p>
140
141 <p>Each property also has a flags value to indicate what methods are
142 available. This is a bitwise OR of PropertyFlags values.</p>
143 </tp:docstring>
144 <tp:flags name="Property_Flags" value-prefix="Property_Flag" type="u">
145 <tp:flag suffix="Read" value="1">
146 <tp:docstring>The property can be read</tp:docstring>
147 </tp:flag>
148 <tp:flag suffix="Write" value="2">
149 <tp:docstring>The property can be written</tp:docstring>
150 </tp:flag>
151 </tp:flags>
152 </interface>
153 </node>
154 <!-- vim:set sw=2 sts=2 et ft=xml: -->
0 <tp:spec
1 xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0"
2 xmlns:xi="http://www.w3.org/2001/XInclude">
3
4 <tp:title>Telepathy D-Bus Interface Specification</tp:title>
5 <tp:version>0.16.0</tp:version>
6
7 <tp:copyright>Copyright (C) 2005, 2006, 2007 Collabora Limited</tp:copyright>
8 <tp:copyright>Copyright (C) 2005, 2006, 2007 Nokia Corporation</tp:copyright>
9 <tp:copyright>Copyright (C) 2006 INdT</tp:copyright>
10
11 <tp:license xmlns="http://www.w3.org/1999/xhtml">
12 <p>This library is free software; you can redistribute it and/or
13 modify it under the terms of the GNU Lesser General Public
14 License as published by the Free Software Foundation; either
15 version 2.1 of the License, or (at your option) any later version.</p>
16
17 <p>This library is distributed in the hope that it will be useful,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 Library General Public License for more details.</p>
21
22 <p>You should have received a copy of the GNU Lesser General Public
23 License along with this library; if not, write to the Free Software
24 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
25 </tp:license>
26
27 <xi:include href="Connection_Manager.xml"/>
28 <xi:include href="Connection.xml"/>
29 <xi:include href="Connection_Interface_Aliasing.xml"/>
30 <xi:include href="Connection_Interface_Avatars.xml"/>
31 <xi:include href="Connection_Interface_Capabilities.xml"/>
32 <xi:include href="Connection_Interface_Contact_Info.xml"/>
33 <xi:include href="Connection_Interface_Forwarding.xml"/>
34 <xi:include href="Connection_Interface_Presence.xml"/>
35 <xi:include href="Connection_Interface_Privacy.xml"/>
36 <xi:include href="Connection_Interface_Renaming.xml"/>
37
38 <xi:include href="Channel.xml"/>
39 <xi:include href="Channel_Type_Contact_List.xml"/>
40 <xi:include href="Channel_Type_Contact_Search.xml"/>
41 <xi:include href="Channel_Type_Streamed_Media.xml"/>
42 <xi:include href="Channel_Type_Room_List.xml"/>
43 <xi:include href="Channel_Type_Text.xml"/>
44 <xi:include href="Channel_Type_Tubes.xml"/>
45
46 <xi:include href="Channel_Interface_Chat_State.xml"/>
47 <xi:include href="Channel_Interface_DTMF.xml"/>
48 <xi:include href="Channel_Interface_Group.xml"/>
49 <xi:include href="Channel_Interface_Hold.xml"/>
50 <xi:include href="Channel_Interface_Password.xml"/>
51 <xi:include href="Channel_Interface_Transfer.xml"/>
52 <xi:include href="Channel_Interface_Media_Signalling.xml"/>
53
54 <xi:include href="Media_Session_Handler.xml"/>
55 <xi:include href="Media_Stream_Handler.xml"/>
56
57 <xi:include href="Properties_Interface.xml"/>
58
59 <xi:include href="errors.xml"/>
60
61 <xi:include href="extensions.xml">
62 <xi:fallback>
63 <!-- absence of non-spec extensions is OK -->
64 </xi:fallback>
65 </xi:include>
66
67 </tp:spec>
0 <?xml version="1.0" ?>
1 <tp:errors xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0" namespace="org.freedesktop.Telepathy.Error">
2 <tp:error name="Network Error">
3 <tp:docstring>
4 Raised when there is an error reading from or writing to the network.
5 </tp:docstring>
6 </tp:error>
7
8 <tp:error name="Not Implemented">
9 <tp:docstring>
10 Raised when the requested method, channel, etc is not available on this connection.
11 </tp:docstring>
12 </tp:error>
13
14 <tp:error name="Invalid Argument">
15 <tp:docstring>
16 Raised when one of the provided arguments is invalid.
17 </tp:docstring>
18 </tp:error>
19
20 <tp:error name="Not Available">
21 <tp:docstring>
22 Raised when the requested functionality is temporarily unavailable.
23 </tp:docstring>
24 </tp:error>
25
26 <tp:error name="Permission Denied">
27 <tp:docstring>
28 The user is not permitted to perform the requested operation.
29 </tp:docstring>
30 </tp:error>
31
32 <tp:error name="Disconnected">
33 <tp:docstring>
34 The connection is not currently connected and cannot be used.
35 </tp:docstring>
36 </tp:error>
37
38 <tp:error name="Invalid Handle">
39 <tp:docstring>
40 The contact name specified is unknown on this channel or connection.
41 </tp:docstring>
42 </tp:error>
43
44 <tp:error name="Channel.Banned">
45 <tp:docstring>
46 You are banned from the channel.
47 </tp:docstring>
48 </tp:error>
49
50 <tp:error name="Channel.Full">
51 <tp:docstring>
52 The channel is full.
53 </tp:docstring>
54 </tp:error>
55
56 <tp:error name="Channel.Invite Only">
57 <tp:docstring>
58 The requested channel is invite-only.
59 </tp:docstring>
60 </tp:error>
61
62 <tp:copyright>Copyright (C) 2005, 2006, 2007 Collabora Limited</tp:copyright>
63 <tp:copyright>Copyright (C) 2005, 2006, 2007 Nokia Corporation</tp:copyright>
64 <tp:license xmlns="http://www.w3.org/1999/xhtml">
65 <p>This library is free software; you can redistribute it and/or
66 modify it under the terms of the GNU Lesser General Public
67 License as published by the Free Software Foundation; either
68 version 2.1 of the License, or (at your option) any later version.</p>
69
70 <p>This library is distributed in the hope that it will be useful,
71 but WITHOUT ANY WARRANTY; without even the implied warranty of
72 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
73 Library General Public License for more details.</p>
74
75 <p>You should have received a copy of the GNU Lesser General Public
76 License along with this library; if not, write to the Free Software
77 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
78 </tp:license>
79 </tp:errors>
0 # Generated from the Telepathy spec
1 """Copyright (C) 2006 Collabora Limited
2
3 This library is free software; you can redistribute it and/or
4 modify it under the terms of the GNU Lesser General Public
5 License as published by the Free Software Foundation; either
6 version 2.1 of the License, or (at your option) any later version.
7
8 This library is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 Library General Public License for more details.
12
13 You should have received a copy of the GNU Lesser General Public
14 License along with this library; if not, write to the Free Software
15 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
16 USA.
17
18 """
19
20 import dbus.service
21
22
23 class Test(dbus.service.Interface):
24 """\
25 A test case for the spec processing.
26 """
27 def __init__(self):
28 self._interfaces.add('org.freedesktop.Telepathy.SpecAutoGenTest')
29
30
31 @dbus.service.method('org.freedesktop.Telepathy.SpecAutoGenTest', in_signature='ba{sv}s', out_signature='a(uv)')
32 def DoStuff(self, badger, mushroom, snake):
33 """
34 Does stuff.
35
36 """
37 raise NotImplementedError
38
39 @dbus.service.signal('org.freedesktop.Telepathy.SpecAutoGenTest', signature='aysb')
40 def StuffHappened(self, stoat, ferret, weasel):
41 """
42 Emitted when stuff happened.
43
44 """
45 pass
46
0 """List of constants, generated from the Telepathy spec version 0.1.2
1
2 Copyright (C) 2006 Collabora Limited
3
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
14
15 """
16
17 # Test_Flags (bitfield/set of flags, 0 for none)
18 TEST_LOWBIT = 1
19 TEST_HIGHBIT = 128
20
21
22 # Adjective
23 ADJECTIVE_LEVERAGING = 0
24 ADJECTIVE_SYNERGISTIC = 1
25 LAST_ADJECTIVE = 1
0 /* Generated from the Telepathy spec, version 0.1.2
1
2 Copyright (C) 2006 Collabora Limited
3
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
14
15 */
16
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
20
21
22 /**
23 * TpTestFlags:
24 * @TP_TEST_LOWBIT: A bit
25 * @TP_TEST_HIGHBIT: Another bit
26 *
27
28 * A set of flags
29 *
30 * Bitfield/set of flags generated from the Telepathy specification.
31 */
32 typedef enum {
33 TP_TEST_LOWBIT = 1,
34 TP_TEST_HIGHBIT = 128,
35 } TpTestFlags;
36
37
38 /**
39 * TpAdjective:
40 * @TP_ADJECTIVE_LEVERAGING: Can leverage synergy
41 * @TP_ADJECTIVE_SYNERGISTIC: Can synergize with leverage
42 *
43
44 * Adjectives which may be applied to a specification
45 *
46 * Enumeration generated from the Telepathy specification.
47 */
48 /* Adjectives which may be applied to a specification */
49 typedef enum {
50 TP_ADJECTIVE_LEVERAGING = 0,
51 TP_ADJECTIVE_SYNERGISTIC = 1,
52 } TpAdjective;
53
54 /**
55 * NUM_TP_ADJECTIVES:
56 *
57 * 1 higher than the highest valid value of #TpAdjective.
58 */
59 #define NUM_TP_ADJECTIVES (1+1)
60
61
62
63 #ifdef __cplusplus
64 }
65 #endif
66
0 /* Generated from the Telepathy spec
1
2 Copyright (C) 2006, 2007 Collabora Limited
3
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with this library; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
18 USA.
19
20 */
21
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25
26 typedef enum {
27
28 /* org.freedesktop.Telepathy.SpecAutoGenTest.MiscError
29 Raised whenever appropriate.
30 */
31 TP_ERROR_SPEC_AUTOGEN_TEST_MISC_ERROR,
32
33 /* org.freedesktop.Telepathy.SpecAutoGenTest.OtherError
34 Raised at all other times.
35 */
36 TP_ERROR_SPEC_AUTOGEN_TEST_OTHER_ERROR,
37 } TpError;
38
39 #ifdef __cplusplus
40 }
41 #endif
0 """Exception classes, generated from the Telepathy spec
1
2 Copyright (C) 2006, 2007 Collabora Limited
3
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with this library; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
18 USA.
19
20 """
21
22 from dbus import DBusException
23
24
25 class SpecAutoGenTestMiscError(DBusException):
26 """\
27 Raised whenever appropriate.
28
29 """
30 _dbus_error_name = 'org.freedesktop.Telepathy.SpecAutoGenTest.MiscError'
31
32 class SpecAutoGenTestOtherError(DBusException):
33 """\
34 Raised at all other times.
35
36 """
37 _dbus_error_name = 'org.freedesktop.Telepathy.SpecAutoGenTest.OtherError'
38
0 /* Generated from the Telepathy spec
1
2 Copyright (C) 2006 Collabora Limited
3
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
14
15 */
16
17 /**
18 * TP_IFACE__TEST:
19 *
20 * The Telepathy interface name "org.freedesktop.Telepathy.SpecAutoGenTest"
21 */
22 #define TP_IFACE__TEST \
23 "org.freedesktop.Telepathy.SpecAutoGenTest"
24
0 """List of interfaces, generated from the Telepathy spec version 0.1.2
1
2 Copyright (C) 2006 Collabora Limited
3
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
14
15 """
16 _TEST = 'org.freedesktop.Telepathy.SpecAutoGenTest'
0 <node name="/_Test">
1 <interface name="org.freedesktop.Telepathy.SpecAutoGenTest">
2 <method name="DoStuff">
3 <arg direction="in" name="badger" type="b">
4 </arg>
5 <arg direction="in" name="mushroom" type="a{sv}">
6 </arg>
7 <arg direction="in" name="snake" type="s">
8 </arg>
9 <arg direction="out" type="a(uv)">
10 </arg>
11 </method>
12 <signal name="StuffHappened">
13 <arg name="stoat" type="ay">
14 </arg>
15 <arg name="ferret" type="s">
16 </arg>
17 <arg name="weasel" type="b">
18 </arg>
19 </signal>
20 </interface>
21 </node>
0 <html xmlns="http://www.w3.org/1999/xhtml"><head><meta content="text/html; charset=ascii" http-equiv="Content-Type"></meta><title>telepathy-spec tools test case version 0.1.2</title><style type="text/css" xml:space="preserve">
1
2 body {
3 font-family: sans-serif;
4 margin: 2em;
5 height: 100%;
6 font-size: 1.2em;
7 }
8 h1 {
9 padding-top: 5px;
10 padding-bottom: 5px;
11 font-size: 1.6em;
12 background: #dadae2;
13 }
14 h2 {
15 font-size: 1.3em;
16 }
17 h3 {
18 font-size: 1.2em;
19 }
20 a:link, a:visited, a:link:hover, a:visited:hover {
21 font-weight: bold;
22 }
23 .topbox {
24 padding-top: 10px;
25 padding-left: 10px;
26 border-bottom: black solid 1px;
27 padding-bottom: 10px;
28 background: #dadae2;
29 font-size: 2em;
30 font-weight: bold;
31 color: #5c5c5c;
32 }
33 .topnavbox {
34 padding-left: 10px;
35 padding-top: 5px;
36 padding-bottom: 5px;
37 background: #abacba;
38 border-bottom: black solid 1px;
39 font-size: 1.2em;
40 }
41 .topnavbox a{
42 color: black;
43 font-weight: normal;
44 }
45 .sidebar {
46 float: left;
47 /* width:9em;
48 border-right:#abacba solid 1px;
49 border-left: #abacba solid 1px;
50 height:100%; */
51 border: #abacba solid 1px;
52 padding-left: 10px;
53 margin-left: 10px;
54 padding-right: 10px;
55 margin-right: 10px;
56 color: #5d5d5d;
57 background: #dadae2;
58 }
59 .sidebar a {
60 text-decoration: none;
61 border-bottom: #e29625 dotted 1px;
62 color: #e29625;
63 font-weight: normal;
64 }
65 .sidebar h1 {
66 font-size: 1.2em;
67 color: black;
68 }
69 .sidebar ul {
70 padding-left: 25px;
71 padding-bottom: 10px;
72 border-bottom: #abacba solid 1px;
73 }
74 .sidebar li {
75 padding-top: 2px;
76 padding-bottom: 2px;
77 }
78 .sidebar h2 {
79 font-style:italic;
80 font-size: 0.81em;
81 padding-left: 5px;
82 padding-right: 5px;
83 font-weight: normal;
84 }
85 .date {
86 font-size: 0.6em;
87 float: right;
88 font-style: italic;
89 }
90 .method {
91 margin-left: 1em;
92 margin-right: 4em;
93 }
94 .signal {
95 margin-left: 1em;
96 margin-right: 4em;
97 }
98
99 </style></head><body><h1 class="topbox">telepathy-spec tools test case</h1><h2>Version 0.1.2</h2><div>Copyright (C) 2006 Collabora Limited</div><p>This library is free software; you can redistribute it and/or
100 modify it under the terms of the GNU Lesser General Public
101 License as published by the Free Software Foundation; either
102 version 2.1 of the License, or (at your option) any later version.</p><p>This library is distributed in the hope that it will be useful,
103 but WITHOUT ANY WARRANTY; without even the implied warranty of
104 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
105 Library General Public License for more details.</p><h2>Interfaces</h2><ul><li><code><a href="#org.freedesktop.Telepathy.SpecAutoGenTest" shape="rect">org.freedesktop.Telepathy.SpecAutoGenTest</a></code></li></ul><h1><a id="org.freedesktop.Telepathy.SpecAutoGenTest" name="org.freedesktop.Telepathy.SpecAutoGenTest" shape="rect"></a>org.freedesktop.Telepathy.SpecAutoGenTest</h1>
106 A test case for the spec processing.
107 <h2>Methods:</h2><div class="method"><h3><a id="org.freedesktop.Telepathy.SpecAutoGenTest.DoStuff" name="org.freedesktop.Telepathy.SpecAutoGenTest.DoStuff" shape="rect">DoStuff</a> (
108 b: badger, a{sv}: mushroom, s: snake
109 ) →
110 a(uv)</h3><div class="docstring">
111 Does stuff.
112 </div><div><h4>Parameters</h4><dl><dt><code>badger</code> -
113 <code>b</code></dt><dd>A badger, which MAY be breezy.</dd><dt><code>mushroom</code> -
114 <code>a{sv}</code></dt><dd>Use of hallucinogenic mushrooms will lead to undefined behaviour.</dd><dt><code>snake</code> -
115 <code>s</code></dt><dd>A snake, it's a snake.</dd></dl></div><div><h4>Returns</h4><dl><dt><code>a(uv)</code></dt><dd>Array of structs containing whatever seems appropriate.</dd></dl></div><div><h4>Possible errors</h4><dl><dt><code>org.freedesktop.Telepathy.SpecAutoGenTest.MiscError</code></dt><dd>
116 Raised whenever appropriate.
117 <em>(generic description)</em></dd><dt><code>org.freedesktop.Telepathy.SpecAutoGenTest.OtherError</code></dt><dd>Raised if the badger or the snake eats the mushrooms</dd></dl></div></div><h2>Signals:</h2><div class="signal"><h3><a id="org.freedesktop.Telepathy.SpecAutoGenTest.StuffHappened" name="org.freedesktop.Telepathy.SpecAutoGenTest.StuffHappened" shape="rect">StuffHappened</a> (
118 ay: stoat, s: ferret, b: weasel
119 )</h3><div class="docstring">
120 Emitted when stuff happened.
121 </div><div><h4>Parameters</h4><dl><dt><code>stoat</code> -
122 <code>ay</code></dt><dd>
123 <em>Mustela erminea</em>
124 </dd><dt><code>ferret</code> -
125 <code>s</code></dt><dd>
126 <em>Mustela putorius furo</em>
127 </dd><dt><code>weasel</code> -
128 <code>b</code></dt><dd>
129 <em>Mustela nivalis</em> (or compatible)
130 </dd></dl></div></div><h2>Properties:</h2><dl><dt><code>wobbly</code> -
131 <code>b</code></dt><dd>
132 Whether or not this badger is wobbly.
133 </dd></dl><h2>Enumerated types:</h2><h3><a id="org.freedesktop.Telepathy.SpecAutoGenTest.Adjective" name="org.freedesktop.Telepathy.SpecAutoGenTest.Adjective" shape="rect">Adjective</a></h3>Adjectives which may be applied to a specification<dl><dt><code>Adjective_Leveraging = 0</code></dt><dd>
134 Can leverage synergy
135 </dd><dt><code>Adjective_Synergistic = 1</code></dt><dd>
136 Can synergize with leverage
137 </dd></dl><h2>Sets of flags:</h2><h3>Test_Flags</h3>A set of flags<dl><dt><code>Test_LowBit = 1</code></dt><dd>
138 A bit
139 </dd><dt><code>Test_HighBit = 128</code></dt><dd>
140 Another bit
141 </dd></dl>
142 <h1>Errors</h1>
143 <h2><a id="org.freedesktop.Telepathy.SpecAutoGenTest.MiscError" name="org.freedesktop.Telepathy.SpecAutoGenTest.MiscError" shape="rect"></a>org.freedesktop.Telepathy.SpecAutoGenTest.MiscError</h2>
144 Raised whenever appropriate.
145
146
147 <h2><a id="org.freedesktop.Telepathy.SpecAutoGenTest.OtherError" name="org.freedesktop.Telepathy.SpecAutoGenTest.OtherError" shape="rect"></a>org.freedesktop.Telepathy.SpecAutoGenTest.OtherError</h2>
148 Raised at all other times.
149
150
151
152
153 </body></html>
0 <?xml version="1.0" ?>
1 <node name="/_Test" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
2 <tp:copyright>Copyright (C) 2006 Collabora Limited</tp:copyright>
3 <tp:license xmlns="http://www.w3.org/1999/xhtml">
4 <p>This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.</p>
8
9 <p>This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.</p>
13
14 <p>You should have received a copy of the GNU Lesser General Public
15 License along with this library; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
17 USA.</p>
18 </tp:license>
19 <interface name="org.freedesktop.Telepathy.SpecAutoGenTest">
20
21 <method name="DoStuff">
22 <arg direction="in" name="badger" type="b">
23 <tp:docstring>A badger, which MAY be breezy.</tp:docstring>
24 </arg>
25 <arg direction="in" name="mushroom" type="a{sv}">
26 <tp:docstring>Use of hallucinogenic mushrooms will lead to undefined behaviour.</tp:docstring>
27 </arg>
28 <arg direction="in" name="snake" type="s">
29 <tp:docstring>A snake, it's a snake.</tp:docstring>
30 </arg>
31 <arg direction="out" type="a(uv)">
32 <tp:docstring>Array of structs containing whatever seems appropriate.</tp:docstring>
33 </arg>
34 <tp:possible-errors>
35 <tp:error name="org.freedesktop.Telepathy.SpecAutoGenTest.MiscError"/>
36 <tp:error name="org.freedesktop.Telepathy.SpecAutoGenTest.OtherError">
37 <tp:docstring>Raised if the badger or the snake eats the mushrooms</tp:docstring>
38 </tp:error>
39 </tp:possible-errors>
40 <tp:docstring>
41 Does stuff.
42 </tp:docstring>
43 </method>
44
45 <signal name="StuffHappened">
46 <arg name="stoat" type="ay">
47 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
48 <em>Mustela erminea</em>
49 </tp:docstring>
50 </arg>
51 <arg name="ferret" type="s">
52 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
53 <em>Mustela putorius furo</em>
54 </tp:docstring>
55 </arg>
56 <arg name="weasel" type="b">
57 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
58 <em>Mustela nivalis</em> (or compatible)
59 </tp:docstring>
60 </arg>
61 <tp:docstring>
62 Emitted when stuff happened.
63 </tp:docstring>
64 </signal>
65
66 <tp:property name="wobbly" type="b">
67 <tp:docstring>
68 Whether or not this badger is wobbly.
69 </tp:docstring>
70 </tp:property>
71
72 <tp:flags name="Test_Flags" value-prefix="Test">
73 <tp:docstring>A set of flags</tp:docstring>
74 <tp:flag suffix="LowBit" value="1">
75 <tp:docstring>
76 A bit
77 </tp:docstring>
78 </tp:flag>
79 <tp:flag suffix="HighBit" value="128">
80 <tp:docstring>
81 Another bit
82 </tp:docstring>
83 </tp:flag>
84 </tp:flags>
85
86 <tp:enum name="Adjective">
87 <tp:docstring>Adjectives which may be applied to a specification</tp:docstring>
88 <tp:enumvalue suffix="Leveraging" value="0">
89 <tp:docstring>
90 Can leverage synergy
91 </tp:docstring>
92 </tp:enumvalue>
93 <tp:enumvalue suffix="Synergistic" value="1">
94 <tp:docstring>
95 Can synergize with leverage
96 </tp:docstring>
97 </tp:enumvalue>
98 </tp:enum>
99
100 <tp:docstring>
101 A test case for the spec processing.
102 </tp:docstring>
103
104 </interface>
105 </node>
106 <!-- vim:set sw=2 sts=2 et ft=xml: -->
0 <tp:spec
1 xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0"
2 xmlns:xi="http://www.w3.org/2001/XInclude">
3
4 <tp:title>telepathy-spec tools test case</tp:title>
5 <tp:version>0.1.2</tp:version>
6
7 <tp:copyright>Copyright (C) 2006 Collabora Limited</tp:copyright>
8 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
9 <p>This library is free software; you can redistribute it and/or
10 modify it under the terms of the GNU Lesser General Public
11 License as published by the Free Software Foundation; either
12 version 2.1 of the License, or (at your option) any later version.</p>
13
14 <p>This library is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 Library General Public License for more details.</p>
18 </tp:docstring>
19
20 <xi:include href="_Test.xml"/>
21
22 <xi:include href="errors.xml"/>
23
24 </tp:spec>
0 <?xml version="1.0" ?>
1 <tp:errors xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0" namespace='org.freedesktop.Telepathy'>
2 <tp:error name="Spec AutoGen Test.Misc Error">
3 <tp:docstring>
4 Raised whenever appropriate.
5 </tp:docstring>
6 </tp:error>
7
8 <tp:error name="Spec AutoGen Test.Other Error">
9 <tp:docstring>
10 Raised at all other times.
11 </tp:docstring>
12 </tp:error>
13
14 <tp:copyright>Copyright (C) 2006, 2007 Collabora Limited</tp:copyright>
15 <tp:license>
16 This library is free software; you can redistribute it and/or
17 modify it under the terms of the GNU Lesser General Public
18 License as published by the Free Software Foundation; either
19 version 2.1 of the License, or (at your option) any later version.
20
21 This library is distributed in the hope that it will be useful,
22 but WITHOUT ANY WARRANTY; without even the implied warranty of
23 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
24 Library General Public License for more details.
25
26 You should have received a copy of the GNU Lesser General Public
27 License along with this library; if not, write to the Free Software
28 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
29 USA.
30 </tp:license>
31 </tp:errors>
0 Some tools that used to be here are now maintained elsewhere.
1
2 c-constants-generator.xsl
3 Now in telepathy-glib (with a modified version in libtelepathy, and a
4 copy in Gabble for its spec extensions)
5
6 c-interfaces-generator.xsl
7 Now in telepathy-glib (with a modified version in libtelepathy, and a
8 copy in Gabble for its spec extensions)
9
10 genginterface.py
11 Now in telepathy-glib (with a copy in Gabble for its spec extensions)
12
13 python-constants-generator.xsl
14 Now in telepathy-python
15
16 python-errors-generator.xsl
17 Now in telepathy-python
18
19 python-interfaces-generator.xsl
20 Now in telepathy-python
21
22 spec-to-python.xsl
23 Now in telepathy-python
0 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
1 xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0"
2 exclude-result-prefixes="tp">
3
4 <xsl:output method="text" indent="no" encoding="ascii"/>
5
6 <xsl:template match="tp:error">
7 /* <xsl:value-of select="concat(../@namespace, '.', translate(@name, ' ', ''))"/>
8 <xsl:value-of select="tp:docstring"/> */
9 <xsl:text> TP_ERROR_</xsl:text><xsl:value-of select="translate(@name, 'abcdefghijklmnopqrstuvwxyz .', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ__')"/>,
10 </xsl:template>
11
12 <xsl:template match="text()"/>
13
14 <xsl:template match="/tp:errors">/* Generated from the Telepathy spec
15
16 <xsl:for-each select="tp:copyright">
17 <xsl:value-of select="."/><xsl:text>
18 </xsl:text></xsl:for-each><xsl:text>
19 </xsl:text><xsl:value-of select="tp:license"/>
20 */
21
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25
26 typedef enum {
27 <xsl:apply-templates select="tp:error"/>} TpError;
28
29 #ifdef __cplusplus
30 }
31 #endif
32 </xsl:template>
33
34 </xsl:stylesheet>
35
36 <!-- vim:set sw=2 sts=2 et noai noci: -->
0 <xsl:stylesheet version="1.0"
1 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
2 xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
3 <xsl:template match="/">
4 <book xmlns="http://www.devhelp.net/book" title="Telepathy Specification"
5 name="telepathy-spec" link="spec.html">
6 <xsl:text>&#x000a;</xsl:text>
7 <chapters>
8 <xsl:text>&#x000a;</xsl:text>
9 <xsl:apply-templates select="//interface" />
10 </chapters>
11 <xsl:text>&#x000a;</xsl:text>
12 <functions>
13 <xsl:text>&#x000a;</xsl:text>
14 <xsl:apply-templates select="//method" />
15 <xsl:apply-templates select="//signal" />
16 <xsl:apply-templates select="//tp:enum" />
17 </functions>
18 <xsl:text>&#x000a;</xsl:text>
19 </book>
20 </xsl:template>
21
22 <xsl:template match="//interface">
23 <xsl:text> </xsl:text>
24 <sub xmlns="http://www.devhelp.net/book" name="{@name}"
25 link="{concat('spec.html#', @name)}" />
26 <xsl:text>&#x000a;</xsl:text>
27 </xsl:template>
28
29 <xsl:template match="//method">
30 <xsl:text> </xsl:text>
31 <keyword type="function" xmlns="http://www.devhelp.net/book" name="{@name}"
32 link="{concat('spec.html#', concat(../@name, concat('.', @name)))}" />
33 <xsl:text>&#x000a;</xsl:text>
34 </xsl:template>
35
36 <xsl:template match="//signal">
37 <xsl:text> </xsl:text>
38 <keyword type="" xmlns="http://www.devhelp.net/book" name="{@name}"
39 link="{concat('spec.html#', concat(../@name, concat('.', @name)))}" />
40 <xsl:text>&#x000a;</xsl:text>
41 </xsl:template>
42
43 <xsl:template match="//tp:enum">
44 <xsl:text> </xsl:text>
45 <keyword type="enum" xmlns="http://www.devhelp.net/book" name="{@name}"
46 link="{concat('spec.html#', concat(../@name, concat('.', @name)))}" />
47 <xsl:text>&#x000a;</xsl:text>
48 </xsl:template>
49 </xsl:stylesheet>
0 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
1 xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0"
2 exclude-result-prefixes="tp">
3 <!--Don't move the declaration of the HTML namespace up here - XMLNSs
4 don't work ideally in the presence of two things that want to use the
5 absence of a prefix, sadly. -->
6
7 <xsl:template match="*" mode="identity">
8 <xsl:copy>
9 <xsl:apply-templates mode="identity"/>
10 </xsl:copy>
11 </xsl:template>
12
13 <xsl:template match="tp:docstring">
14 <xsl:apply-templates select="node()" mode="identity"/>
15 </xsl:template>
16
17 <xsl:template match="tp:errors">
18 <h1 xmlns="http://www.w3.org/1999/xhtml">Errors</h1>
19 <xsl:apply-templates/>
20 </xsl:template>
21
22 <xsl:template match="tp:error">
23 <h2 xmlns="http://www.w3.org/1999/xhtml"><a name="{concat(../@namespace, '.', translate(@name, ' ', ''))}"></a><xsl:value-of select="concat(../@namespace, '.', translate(@name, ' ', ''))"/></h2>
24 <xsl:apply-templates select="tp:docstring"/>
25 </xsl:template>
26
27 <xsl:template match="/tp:spec/tp:copyright">
28 <div xmlns="http://www.w3.org/1999/xhtml">
29 <xsl:apply-templates/>
30 </div>
31 </xsl:template>
32 <xsl:template match="/tp:spec/tp:license">
33 <div xmlns="http://www.w3.org/1999/xhtml" class="license">
34 <xsl:apply-templates mode="identity"/>
35 </div>
36 </xsl:template>
37
38 <xsl:template match="tp:copyright"/>
39 <xsl:template match="tp:license"/>
40
41 <xsl:template match="interface">
42 <h1 xmlns="http://www.w3.org/1999/xhtml"><a name="{@name}"></a><xsl:value-of select="@name"/></h1>
43
44 <xsl:if test="tp:requires">
45 <p>Implementations of this interface must also implement:</p>
46 <ul xmlns="http://www.w3.org/1999/xhtml">
47 <xsl:for-each select="tp:requires">
48 <li><code><a href="#{@interface}"><xsl:value-of select="@interface"/></a></code></li>
49 </xsl:for-each>
50 </ul>
51 </xsl:if>
52
53 <xsl:apply-templates select="tp:docstring" />
54
55 <xsl:choose>
56 <xsl:when test="method">
57 <h2 xmlns="http://www.w3.org/1999/xhtml">Methods:</h2>
58 <xsl:apply-templates select="method"/>
59 </xsl:when>
60 <xsl:otherwise>
61 <p xmlns="http://www.w3.org/1999/xhtml">Interface has no methods.</p>
62 </xsl:otherwise>
63 </xsl:choose>
64
65 <xsl:choose>
66 <xsl:when test="signal">
67 <h2 xmlns="http://www.w3.org/1999/xhtml">Signals:</h2>
68 <xsl:apply-templates select="signal"/>
69 </xsl:when>
70 <xsl:otherwise>
71 <p xmlns="http://www.w3.org/1999/xhtml">Interface has no signals.</p>
72 </xsl:otherwise>
73 </xsl:choose>
74
75 <xsl:choose>
76 <xsl:when test="tp:property">
77 <h2 xmlns="http://www.w3.org/1999/xhtml">Properties:</h2>
78 <dl xmlns="http://www.w3.org/1999/xhtml">
79 <xsl:apply-templates select="tp:property"/>
80 </dl>
81 </xsl:when>
82 <xsl:otherwise>
83 <p xmlns="http://www.w3.org/1999/xhtml">Interface has no properties.</p>
84 </xsl:otherwise>
85 </xsl:choose>
86
87 <xsl:if test="tp:enum">
88 <h2 xmlns="http://www.w3.org/1999/xhtml">Enumerated types:</h2>
89 <xsl:apply-templates select="tp:enum"/>
90 </xsl:if>
91
92 <xsl:if test="tp:flags">
93 <h2 xmlns="http://www.w3.org/1999/xhtml">Sets of flags:</h2>
94 <xsl:apply-templates select="tp:flags"/>
95 </xsl:if>
96
97 </xsl:template>
98
99 <xsl:template match="tp:flags">
100 <h3 xmlns="http://www.w3.org/1999/xhtml"><xsl:value-of select="@name"/></h3>
101 <xsl:apply-templates select="tp:docstring" />
102 <dl xmlns="http://www.w3.org/1999/xhtml">
103 <xsl:variable name="value-prefix">
104 <xsl:choose>
105 <xsl:when test="@value-prefix">
106 <xsl:value-of select="@value-prefix"/>
107 </xsl:when>
108 <xsl:otherwise>
109 <xsl:value-of select="@name"/>
110 </xsl:otherwise>
111 </xsl:choose>
112 </xsl:variable>
113 <xsl:for-each select="tp:flag">
114 <dt xmlns="http://www.w3.org/1999/xhtml"><code><xsl:value-of select="concat($value-prefix, '_', @suffix)"/> = <xsl:value-of select="@value"/></code></dt>
115 <xsl:choose>
116 <xsl:when test="tp:docstring">
117 <dd xmlns="http://www.w3.org/1999/xhtml"><xsl:apply-templates select="tp:docstring" /></dd>
118 </xsl:when>
119 <xsl:otherwise>
120 <dd xmlns="http://www.w3.org/1999/xhtml">(Undocumented)</dd>
121 </xsl:otherwise>
122 </xsl:choose>
123 </xsl:for-each>
124 </dl>
125 </xsl:template>
126
127 <xsl:template match="tp:enum">
128 <h3 xmlns="http://www.w3.org/1999/xhtml">
129 <a name="{concat(../@name, concat('.', @name))}">
130 <xsl:value-of select="@name"/>
131 </a>
132 </h3>
133 <xsl:apply-templates select="tp:docstring" />
134 <dl xmlns="http://www.w3.org/1999/xhtml">
135 <xsl:variable name="value-prefix">
136 <xsl:choose>
137 <xsl:when test="@value-prefix">
138 <xsl:value-of select="@value-prefix"/>
139 </xsl:when>
140 <xsl:otherwise>
141 <xsl:value-of select="@name"/>
142 </xsl:otherwise>
143 </xsl:choose>
144 </xsl:variable>
145 <xsl:for-each select="tp:enumvalue">
146 <dt xmlns="http://www.w3.org/1999/xhtml"><code><xsl:value-of select="concat($value-prefix, '_', @suffix)"/> = <xsl:value-of select="@value"/></code></dt>
147 <xsl:choose>
148 <xsl:when test="tp:docstring">
149 <dd xmlns="http://www.w3.org/1999/xhtml"><xsl:apply-templates select="tp:docstring" /></dd>
150 </xsl:when>
151 <xsl:otherwise>
152 <dd xmlns="http://www.w3.org/1999/xhtml">(Undocumented)</dd>
153 </xsl:otherwise>
154 </xsl:choose>
155 </xsl:for-each>
156 </dl>
157 </xsl:template>
158
159 <xsl:template match="tp:property">
160 <dt xmlns="http://www.w3.org/1999/xhtml">
161 <xsl:if test="@name">
162 <code><xsl:value-of select="@name"/></code> -
163 </xsl:if>
164 <code><xsl:value-of select="@type"/></code>
165 </dt>
166 <dd xmlns="http://www.w3.org/1999/xhtml">
167 <xsl:apply-templates select="tp:docstring"/>
168 </dd>
169 </xsl:template>
170
171 <xsl:template match="method">
172 <div xmlns="http://www.w3.org/1999/xhtml" class="method">
173 <h3 xmlns="http://www.w3.org/1999/xhtml">
174 <a name="{concat(../@name, concat('.', @name))}">
175 <xsl:value-of select="@name"/>
176 </a> (
177 <xsl:for-each xmlns="" select="arg[@direction='in']">
178 <xsl:value-of select="@type"/>: <xsl:value-of select="@name"/>
179 <xsl:if test="position() != last()">, </xsl:if>
180 </xsl:for-each>
181 ) &#x2192;
182 <xsl:choose>
183 <xsl:when test="arg[@direction='out']">
184 <xsl:for-each xmlns="" select="arg[@direction='out']">
185 <xsl:value-of select="@type"/>
186 <xsl:if test="position() != last()">, </xsl:if>
187 </xsl:for-each>
188 </xsl:when>
189 <xsl:otherwise>nothing</xsl:otherwise>
190 </xsl:choose>
191 </h3>
192 <div xmlns="http://www.w3.org/1999/xhtml" class="docstring">
193 <xsl:apply-templates select="tp:docstring" />
194 </div>
195
196 <xsl:if test="arg[@direction='in']">
197 <div xmlns="http://www.w3.org/1999/xhtml">
198 <h4>Parameters</h4>
199 <dl xmlns="http://www.w3.org/1999/xhtml">
200 <xsl:apply-templates select="arg[@direction='in']"
201 mode="parameters-in-docstring"/>
202 </dl>
203 </div>
204 </xsl:if>
205
206 <xsl:if test="arg[@direction='out']">
207 <div xmlns="http://www.w3.org/1999/xhtml">
208 <h4>Returns</h4>
209 <dl xmlns="http://www.w3.org/1999/xhtml">
210 <xsl:apply-templates select="arg[@direction='out']"
211 mode="returns-in-docstring"/>
212 </dl>
213 </div>
214 </xsl:if>
215
216 <xsl:if test="tp:possible-errors">
217 <div xmlns="http://www.w3.org/1999/xhtml">
218 <h4>Possible errors</h4>
219 <dl xmlns="http://www.w3.org/1999/xhtml">
220 <xsl:apply-templates select="tp:possible-errors/tp:error"/>
221 </dl>
222 </div>
223 </xsl:if>
224
225 </div>
226 </xsl:template>
227
228 <xsl:template match="arg" mode="parameters-in-docstring">
229 <dt xmlns="http://www.w3.org/1999/xhtml">
230 <code><xsl:value-of select="@name"/></code> -
231 <code><xsl:value-of select="@type"/></code>
232 </dt>
233 <dd xmlns="http://www.w3.org/1999/xhtml">
234 <xsl:apply-templates select="tp:docstring" />
235 </dd>
236 </xsl:template>
237
238 <xsl:template match="arg" mode="returns-in-docstring">
239 <dt xmlns="http://www.w3.org/1999/xhtml">
240 <xsl:if test="@name">
241 <code><xsl:value-of select="@name"/></code> -
242 </xsl:if>
243 <code><xsl:value-of select="@type"/></code>
244 </dt>
245 <dd xmlns="http://www.w3.org/1999/xhtml">
246 <xsl:apply-templates select="tp:docstring"/>
247 </dd>
248 </xsl:template>
249
250 <xsl:template match="tp:possible-errors/tp:error">
251 <dt xmlns="http://www.w3.org/1999/xhtml">
252 <code><xsl:value-of select="@name"/></code>
253 </dt>
254 <dd xmlns="http://www.w3.org/1999/xhtml">
255 <xsl:variable name="name" select="@name"/>
256 <xsl:choose>
257 <xsl:when test="tp:docstring">
258 <xsl:apply-templates select="tp:docstring"/>
259 </xsl:when>
260 <xsl:when test="//tp:errors/tp:error[concat(../@namespace, '.', translate(@name, ' ', ''))=$name]/tp:docstring">
261 <xsl:apply-templates select="//tp:errors/tp:error[concat(../@namespace, '.', translate(@name, ' ', ''))=$name]/tp:docstring"/> <em xmlns="http://www.w3.org/1999/xhtml">(generic description)</em>
262 </xsl:when>
263 <xsl:otherwise>
264 (Undocumented.)
265 </xsl:otherwise>
266 </xsl:choose>
267 </dd>
268 </xsl:template>
269
270 <xsl:template match="signal">
271 <div xmlns="http://www.w3.org/1999/xhtml" class="signal">
272 <h3 xmlns="http://www.w3.org/1999/xhtml">
273 <a name="{concat(../@name, concat('.', @name))}">
274 <xsl:value-of select="@name"/>
275 </a> (
276 <xsl:for-each xmlns="" select="arg">
277 <xsl:value-of select="@type"/>: <xsl:value-of select="@name"/>
278 <xsl:if test="position() != last()">, </xsl:if>
279 </xsl:for-each>
280 )</h3>
281 <div xmlns="http://www.w3.org/1999/xhtml" class="docstring">
282 <xsl:apply-templates select="tp:docstring"/>
283 </div>
284
285 <xsl:if test="arg">
286 <div xmlns="http://www.w3.org/1999/xhtml">
287 <h4>Parameters</h4>
288 <dl xmlns="http://www.w3.org/1999/xhtml">
289 <xsl:apply-templates select="arg" mode="parameters-in-docstring"/>
290 </dl>
291 </div>
292 </xsl:if>
293 </div>
294 </xsl:template>
295
296 <xsl:output method="xml" indent="no" encoding="ascii"
297 omit-xml-declaration="yes"
298 doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
299 doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" />
300
301 <xsl:template match="/tp:spec">
302 <html xmlns="http://www.w3.org/1999/xhtml">
303 <head>
304 <title>
305 <xsl:value-of select="tp:title"/>
306 <xsl:if test="tp:version">
307 <xsl:text> version </xsl:text>
308 <xsl:value-of select="tp:version"/>
309 </xsl:if>
310 </title>
311 <style type="text/css">
312
313 body {
314 font-family: sans-serif;
315 margin: 2em;
316 height: 100%;
317 font-size: 1.2em;
318 }
319 h1 {
320 padding-top: 5px;
321 padding-bottom: 5px;
322 font-size: 1.6em;
323 background: #dadae2;
324 }
325 h2 {
326 font-size: 1.3em;
327 }
328 h3 {
329 font-size: 1.2em;
330 }
331 a:link, a:visited, a:link:hover, a:visited:hover {
332 font-weight: bold;
333 }
334 .topbox {
335 padding-top: 10px;
336 padding-left: 10px;
337 border-bottom: black solid 1px;
338 padding-bottom: 10px;
339 background: #dadae2;
340 font-size: 2em;
341 font-weight: bold;
342 color: #5c5c5c;
343 }
344 .topnavbox {
345 padding-left: 10px;
346 padding-top: 5px;
347 padding-bottom: 5px;
348 background: #abacba;
349 border-bottom: black solid 1px;
350 font-size: 1.2em;
351 }
352 .topnavbox a{
353 color: black;
354 font-weight: normal;
355 }
356 .sidebar {
357 float: left;
358 /* width:9em;
359 border-right:#abacba solid 1px;
360 border-left: #abacba solid 1px;
361 height:100%; */
362 border: #abacba solid 1px;
363 padding-left: 10px;
364 margin-left: 10px;
365 padding-right: 10px;
366 margin-right: 10px;
367 color: #5d5d5d;
368 background: #dadae2;
369 }
370 .sidebar a {
371 text-decoration: none;
372 border-bottom: #e29625 dotted 1px;
373 color: #e29625;
374 font-weight: normal;
375 }
376 .sidebar h1 {
377 font-size: 1.2em;
378 color: black;
379 }
380 .sidebar ul {
381 padding-left: 25px;
382 padding-bottom: 10px;
383 border-bottom: #abacba solid 1px;
384 }
385 .sidebar li {
386 padding-top: 2px;
387 padding-bottom: 2px;
388 }
389 .sidebar h2 {
390 font-style:italic;
391 font-size: 0.81em;
392 padding-left: 5px;
393 padding-right: 5px;
394 font-weight: normal;
395 }
396 .date {
397 font-size: 0.6em;
398 float: right;
399 font-style: italic;
400 }
401 .method {
402 margin-left: 1em;
403 margin-right: 4em;
404 }
405 .signal {
406 margin-left: 1em;
407 margin-right: 4em;
408 }
409
410 </style>
411 </head>
412 <body>
413 <h1 class="topbox">
414 <xsl:value-of select="tp:title" />
415 </h1>
416 <xsl:if test="tp:version">
417 <h2>Version <xsl:apply-templates select="tp:version"/></h2>
418 </xsl:if>
419 <xsl:apply-templates select="tp:copyright"/>
420 <xsl:apply-templates select="tp:license"/>
421 <xsl:apply-templates select="tp:docstring"/>
422 <h2>Interfaces</h2>
423 <ul>
424 <xsl:for-each select="node/interface">
425 <li><code><a href="#{@name}"><xsl:value-of select="@name"/></a></code></li>
426 </xsl:for-each>
427 </ul>
428 <xsl:apply-templates select="node"/>
429 <xsl:apply-templates select="tp:errors"/>
430 </body>
431 </html>
432 </xsl:template>
433
434 </xsl:stylesheet>
435
436 <!-- vim:set sw=2 sts=2 et: -->
0 #!/usr/bin/python
1
2 import sys
3 import xml.dom.minidom
4
5 if __name__ == '__main__':
6 dom = xml.dom.minidom.parse(sys.argv[1])
7
8 nodes = dom.getElementsByTagName("node")
9 assert len(nodes) == 1
10 print nodes[0].getAttributeNode("name").nodeValue.replace('/', '')
0 #!/usr/bin/python
1
2 import sys
3 import os.path
4 import xml.dom.minidom
5 import dbus
6
7 def cmdline_error():
8 print "usage: gen-gobject xmlfile classname"
9 sys.exit(1)
10
11 def camelcase_to_lower(s):
12 out ="";
13 out += s[0].lower()
14 last_upper=False
15 if s[0].isupper():
16 last_upper=True
17 for i in range(1,len(s)):
18 if s[i].isupper():
19 if last_upper:
20 if (i+1) < len(s) and s[i+1].islower():
21 out += "_" + s[i].lower()
22 else:
23 out += s[i].lower()
24 else:
25 out += "_" + s[i].lower()
26 last_upper=True
27 else:
28 out += s[i]
29 last_upper=False
30 return out
31
32 def camelcase_to_upper(s):
33 return camelcase_to_lower(s).upper()
34
35 def type_to_gtype(s):
36 if s == 'y': #byte
37 return ("guchar ", "G_TYPE_UCHAR","UCHAR", False)
38 elif s == 'b': #boolean
39 return ("gboolean ", "G_TYPE_BOOLEAN","BOOLEAN", False)
40 elif s == 'n': #int16
41 return ("gint ", "G_TYPE_INT","INT", False)
42 elif s == 'q': #uint16
43 return ("guint ", "G_TYPE_UINT","UINT", False)
44 elif s == 'i': #int32
45 return ("gint ", "G_TYPE_INT","INT", False)
46 elif s == 'u': #uint32
47 return ("guint ", "G_TYPE_UINT","UINT", False)
48 elif s == 'x': #int64
49 return ("gint ", "G_TYPE_INT64","INT64", False)
50 elif s == 't': #uint32
51 return ("guint ", "G_TYPE_UINT64","UINT64", False)
52 elif s == 'd': #double
53 return ("gdouble ", "G_TYPE_DOUBLE","DOUBLE", False)
54 elif s == 's': #string
55 return ("gchar *", "G_TYPE_STRING", "STRING", True)
56 elif s == 'g': #signature - FIXME
57 return ("gchar *", "DBUS_TYPE_G_SIGNATURE", "STRING", True)
58 elif s == 'o': #object path
59 return ("gchar *", "DBUS_TYPE_G_OBJECT_PATH", "STRING", True)
60 elif s == 'v': #variant
61 return ("GValue *", "G_TYPE_VALUE", "BOXED", True)
62 elif s == 'as': #array of strings
63 return ("gchar **", "G_TYPE_STRV", "BOXED", True)
64 elif s == 'ay': #byte array
65 return ("GArray *", "DBUS_TYPE_G_BYTE_ARRAY", "BOXED", True)
66 elif s == 'au': #uint array
67 return ("GArray *", "DBUS_TYPE_G_UINT_ARRAY", "BOXED", True)
68 elif s == 'ai': #int array
69 return ("GArray *", "DBUS_TYPE_G_INT_ARRAY", "BOXED", True)
70 elif s == 'ax': #int64 array
71 return ("GArray *", "DBUS_TYPE_G_INT64_ARRAY", "BOXED", True)
72 elif s == 'at': #uint64 array
73 return ("GArray *", "DBUS_TYPE_G_UINT64_ARRAY", "BOXED", True)
74 elif s == 'ad': #double array
75 return ("GArray *", "DBUS_TYPE_G_DOUBLE_ARRAY", "BOXED", True)
76 elif s == 'ab': #boolean array
77 return ("GArray *", "DBUS_TYPE_G_BOOLEAN_ARRAY", "BOXED", True)
78 elif s[:2] == 'a(': #array of structs, recurse
79 gtype = type_to_gtype(s[1:])[1]
80 return ("GPtrArray *", "(dbus_g_type_get_collection (\"GPtrArray\", "+gtype+"))", "BOXED", True)
81 elif s == 'a{ss}': #hash table of string to string
82 return ("GHashTable *", "DBUS_TYPE_G_STRING_STRING_HASHTABLE", "BOXED", False)
83 elif s[:2] == 'a{': #some arbitrary hash tables
84 if s[2] not in ('y', 'b', 'n', 'q', 'i', 'u', 's', 'o', 'g'):
85 raise Exception, "can't index a hashtable off non-basic type " + s
86 first = type_to_gtype(s[2])
87 second = type_to_gtype(s[3:-1])
88 return ("GHashTable *", "(dbus_g_type_get_map (\"GHashTable\", " + first[1] + ", " + second[1] + "))", "BOXED", False)
89 elif s[:1] == '(': #struct
90 gtype = "(dbus_g_type_get_struct (\"GValueArray\", "
91 for subsig in dbus.Signature(s[1:-1]):
92 gtype = gtype + type_to_gtype(subsig)[1] + ", "
93 gtype = gtype + "G_TYPE_INVALID))"
94 return ("GValueArray *", gtype, "BOXED", True)
95
96 # we just don't know ..
97 raise Exception, "don't know the GType for " + s
98
99
100 def signal_to_marshal_type(signal):
101 """
102 return a list of strings indicating the marshalling type for this signal.
103 """
104
105 mtype=[]
106 for i in signal.getElementsByTagName("arg"):
107 name =i.getAttribute("name")
108 type = i.getAttribute("type")
109 mtype.append(type_to_gtype(type)[2])
110
111 return mtype
112
113 def signal_to_marshal_name(signal, prefix):
114 glib_marshallers = set(['VOID', 'BOOLEAN', 'CHAR', 'UCHAR', 'INT',
115 'STRING', 'UINT', 'LONG', 'ULONG', 'ENUM', 'FLAGS', 'FLOAT',
116 'DOUBLE', 'STRING', 'PARAM', 'BOXED', 'POINTER', 'OBJECT',
117 'UINT_POINTER'])
118
119 mtype = signal_to_marshal_type(signal)
120 if len(mtype):
121 name = '_'.join(mtype)
122 else:
123 name = 'VOID'
124
125 if name in glib_marshallers:
126 return 'g_cclosure_marshal_VOID__' + name
127 else:
128 return prefix + '_marshal_VOID__' + name
129
130 def signal_to_gtype_list(signal):
131 gtype=[]
132 for i in signal.getElementsByTagName("arg"):
133 name =i.getAttribute("name")
134 type = i.getAttribute("type")
135 gtype.append(type_to_gtype(type)[1])
136
137 return gtype
138
139
140 def print_license(stream, filename, description):
141 stream.write(
142 """/*
143 * %s - %s
144 * Copyright (C) 2005 Collabora Ltd.
145 * Copyright (C) 2005 Nokia Corporation
146 *
147 * This library is free software; you can redistribute it and/or
148 * modify it under the terms of the GNU Lesser General Public
149 * License as published by the Free Software Foundation; either
150 * version 2.1 of the License, or (at your option) any later version.
151 *
152 * This library is distributed in the hope that it will be useful,
153 * but WITHOUT ANY WARRANTY; without even the implied warranty of
154 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
155 * Lesser General Public License for more details.
156 *
157 * You should have received a copy of the GNU Lesser General Public
158 * License along with this library; if not, write to the Free Software
159 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
160 */
161
162 """ % (filename, description))
163
164 def print_header_begin(stream, prefix):
165 guardname = '__'+prefix.upper()+'_H__'
166 stream.write ("#ifndef "+guardname+"\n")
167 stream.write ("#define "+guardname+"\n\n")
168
169 stream.write ("#include <glib-object.h>\n\n")
170 stream.write ("G_BEGIN_DECLS\n\n")
171
172 def print_header_end(stream, prefix):
173 guardname = '__'+prefix.upper()+'_H__'
174 stream.write ("\nG_END_DECLS\n\n")
175 stream.write ("#endif /* #ifndef "+guardname+"*/\n")
176
177 def print_simple_class_defn(stream, prefix, classname):
178 stream.write ("typedef struct _%s %s;\n" % (classname,classname))
179 stream.write ("typedef struct _%sClass %sClass;\n\n" % (classname,classname))
180 stream.write ("struct _%sClass {\n" % classname)
181 stream.write (" GObjectClass parent_class;\n")
182 stream.write ("};\n\n")
183
184 stream.write ("struct _%s {\n" % classname)
185 stream.write (" GObject parent;\n\n")
186 stream.write (" gpointer priv;\n")
187 stream.write ("};\n")
188
189 stream.write(
190 """
191 GType %(prefix)s_get_type(void);
192
193 """ % {'prefix':prefix,'uprefix':prefix.upper()})
194
195 macro_prefix = prefix.upper().split('_',1)
196 gtype = '_TYPE_'.join(macro_prefix)
197
198 stream.write(
199 """/* TYPE MACROS */
200 #define %(type)s \\
201 (%(prefix)s_get_type())
202 #define %(main)s_%(sub)s(obj) \\
203 (G_TYPE_CHECK_INSTANCE_CAST((obj), %(type)s, %(name)s))
204 #define %(main)s_%(sub)s_CLASS(klass) \\
205 (G_TYPE_CHECK_CLASS_CAST((klass), %(type)s, %(name)sClass))
206 #define %(main)s_IS_%(sub)s(obj) \\
207 (G_TYPE_CHECK_INSTANCE_TYPE((obj), %(type)s))
208 #define %(main)s_IS_%(sub)s_CLASS(klass) \\
209 (G_TYPE_CHECK_CLASS_TYPE((klass), %(type)s))
210 #define %(main)s_%(sub)s_GET_CLASS(obj) \\
211 (G_TYPE_INSTANCE_GET_CLASS ((obj), %(type)s, %(name)sClass))
212
213 """ % {"main":macro_prefix[0], "sub":macro_prefix[1], "type":gtype, "name":classname, "prefix":prefix})
214
215 if __name__ == '__main__':
216 try:
217 classname = sys.argv[2]
218 except IndexError:
219 cmdline_error()
220
221 prefix = camelcase_to_lower(classname)
222 if len(sys.argv) > 3:
223 basename = sys.argv[3]
224 else:
225 basename = prefix.replace('_','-')
226
227 outname_header = basename + ".h"
228 outname_body = basename + ".c"
229 outname_signal_marshal = basename + "-signals-marshal.list"
230
231 header=open(outname_header,'w')
232 body=open(outname_body, 'w')
233 signal_marshal=open(outname_signal_marshal, 'w')
234
235 try:
236 dom = xml.dom.minidom.parse(sys.argv[1])
237 except IndexError:
238 cmdline_error()
239
240 signals = dom.getElementsByTagName("signal")
241 signals.sort(key=lambda n: n.getAttributeNode("name").nodeValue)
242 methods = dom.getElementsByTagName("method")
243 methods.sort(key=lambda n: n.getAttributeNode("name").nodeValue)
244
245 print_license(header, outname_header, "Header for " + classname)
246 print_license(body, outname_body, "Source for " + classname)
247 print_header_begin(header,prefix)
248
249 print_simple_class_defn(header, prefix, classname)
250
251 body.write(
252 """#include <dbus/dbus-glib.h>
253 #include <stdio.h>
254 #include <stdlib.h>
255
256 #include "%s"
257 #include "%s-signals-marshal.h"
258
259 #include "%s-glue.h"
260
261 """ % (outname_header, basename, basename))
262
263 body.write(
264 """G_DEFINE_TYPE(%(classname)s, %(prefix)s, G_TYPE_OBJECT)
265
266 """ % {'classname':classname, 'prefix':prefix})
267
268 body.write("/* signal enum */\nenum\n{\n")
269 for signal in signals:
270 dbus_name = signal.getAttributeNode("name").nodeValue
271 body.write(" %s,\n" % camelcase_to_upper(dbus_name) )
272 body.write(" LAST_SIGNAL\n};\n\n")
273 body.write("static guint signals[LAST_SIGNAL] = {0};\n\n")
274
275 gtypename = '_TYPE_'.join(prefix.upper().split('_',1))
276
277 body.write("""/* private structure */
278 typedef struct _%(classname)sPrivate %(classname)sPrivate;
279
280 struct _%(classname)sPrivate
281 {
282 gboolean dispose_has_run;
283 };
284
285 #define %(uprefix)s_GET_PRIVATE(obj) \\
286 ((%(classname)sPrivate *)obj->priv)
287 """ % {'classname':classname, 'uprefix':prefix.upper(), 'gtypename':gtypename})
288
289 body.write(
290 """
291 static void
292 %(prefix)s_init (%(classname)s *self)
293 {
294 %(classname)sPrivate *priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
295 %(gtypename)s, %(classname)sPrivate);
296
297 self->priv = priv;
298
299 /* allocate any data required by the object here */
300 }
301
302 static void %(prefix)s_dispose (GObject *object);
303 static void %(prefix)s_finalize (GObject *object);
304
305 static void
306 %(prefix)s_class_init (%(classname)sClass *%(prefix)s_class)
307 {
308 GObjectClass *object_class = G_OBJECT_CLASS (%(prefix)s_class);
309
310 g_type_class_add_private (%(prefix)s_class, sizeof (%(classname)sPrivate));
311
312 object_class->dispose = %(prefix)s_dispose;
313 object_class->finalize = %(prefix)s_finalize;
314 """ % {'classname':classname, 'gtypename':gtypename, 'prefix':prefix, 'uprefix':prefix.upper()})
315
316 header.write("\n")
317
318 marshallers = set()
319 for signal in signals:
320 dbus_name = signal.getAttributeNode("name").nodeValue
321 gtypelist = signal_to_gtype_list(signal)
322 marshal_name = signal_to_marshal_name(signal, prefix)
323
324 body.write(
325 """
326 signals[%s] =
327 g_signal_new ("%s",
328 G_OBJECT_CLASS_TYPE (%s_class),
329 G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED,
330 0,
331 NULL, NULL,
332 %s,
333 G_TYPE_NONE, %s);
334 """ % (camelcase_to_upper(dbus_name),
335 camelcase_to_lower(dbus_name).replace('_','-'),
336 prefix, marshal_name,
337 ', '.join([str(len(gtypelist))] + gtypelist)))
338
339 if not marshal_name.startswith('g_cclosure_marshal_VOID__'):
340 mtype = signal_to_marshal_type(signal)
341 assert(len(mtype))
342 marshallers.add(','.join(mtype))
343
344 for marshaller in marshallers:
345 signal_marshal.write("VOID:"+marshaller+"\n")
346
347 body.write(
348 """
349 dbus_g_object_type_install_info (G_TYPE_FROM_CLASS (%(prefix)s_class), &dbus_glib_%(prefix)s_object_info);
350 }
351
352 void
353 %(prefix)s_dispose (GObject *object)
354 {
355 %(classname)s *self = %(uprefix)s (object);
356 %(classname)sPrivate *priv = %(uprefix)s_GET_PRIVATE (self);
357
358 if (priv->dispose_has_run)
359 return;
360
361 priv->dispose_has_run = TRUE;
362
363 /* release any references held by the object here */
364
365 if (G_OBJECT_CLASS (%(prefix)s_parent_class)->dispose)
366 G_OBJECT_CLASS (%(prefix)s_parent_class)->dispose (object);
367 }
368
369 void
370 %(prefix)s_finalize (GObject *object)
371 {
372 %(classname)s *self = %(uprefix)s (object);
373 %(classname)sPrivate *priv = %(uprefix)s_GET_PRIVATE (self);
374
375 /* free any data held directly by the object here */
376
377 G_OBJECT_CLASS (%(prefix)s_parent_class)->finalize (object);
378 }
379
380
381 """ % {'classname':classname,'prefix':prefix, 'uprefix':prefix.upper()})
382
383 for method in methods:
384 dbus_method_name = method.getAttributeNode("name").nodeValue
385 c_method_name = prefix + '_' + camelcase_to_lower(dbus_method_name)
386 async=False
387 ret_count=0
388
389 for i in method.getElementsByTagName("annotation"):
390 if i.getAttribute("name") == "org.freedesktop.DBus.GLib.Async":
391 async=True
392
393 if async:
394 c_decl = "void\n"
395 else:
396 c_decl = "gboolean\n"
397
398 tmp = c_method_name+' ('
399 pad = ' ' * len(tmp)
400 c_decl += tmp+classname+' *self'
401
402 for i in method.getElementsByTagName("arg"):
403 name =i.getAttribute("name")
404 direction = i.getAttribute("direction")
405 type = i.getAttribute("type")
406
407 if async and direction=="out":
408 continue
409
410 if not name and direction == "out":
411 if ret_count==0:
412 name = "ret"
413 else:
414 name = "ret"+str(ret_count)
415 ret_count += 1
416
417 gtype = type_to_gtype(type)[0]
418 if direction =="out":
419 gtype+='*'
420 else:
421 if type_to_gtype(type)[3]:
422 gtype="const "+gtype
423 c_decl +=",\n"+pad+gtype+name
424
425 if async:
426 c_decl += ",\n"+pad+"DBusGMethodInvocation *context)"
427 else:
428 c_decl += ",\n"+pad+"GError **error)"
429
430 interface = method.parentNode.getAttribute("name");
431 header.write(c_decl+";\n\n")
432 body.write(
433 """
434 /**
435 * %(c_method_name)s
436 *
437 * Implements D-Bus method %(method)s
438 * on interface %(interface)s
439 *""" % {'c_method_name':c_method_name, 'method':dbus_method_name, 'interface':interface})
440 if async:
441 body.write(
442 """
443 * @context: The D-Bus invocation context to use to return values
444 * or throw an error.
445 */
446 """)
447 else:
448 body.write(
449 """
450 * @error: Used to return a pointer to a GError detailing any error
451 * that occurred, D-Bus will throw the error only if this
452 * function returns FALSE.
453 *
454 * Returns: TRUE if successful, FALSE if an error was thrown.
455 */
456 """)
457
458 if async:
459 body.write(c_decl+"\n{\n return;\n}\n\n")
460 else:
461 body.write(c_decl+"\n{\n return TRUE;\n}\n\n")
462
463 header.write('\n')
464
465 print_header_end(header,prefix)
466 header.close()
467 body.close()
0 #!/usr/bin/python2.4
1
2 import sys
3
4 try:
5 try:
6 # it's in this package in python2.5
7 from xml.etree.ElementTree import fromstring, tostring, ElementTree, Element
8 except ImportError:
9 from elementtree.ElementTree import fromstring, tostring, ElementTree, Element
10 except ImportError:
11 print "You need to install ElementTree (http://effbot.org/zone/element-index.htm)"
12 sys.exit(1)
13
14 from xml.dom.minidom import parseString
15
16 import sys
17
18 def strip (element):
19 if element.text:
20 element.text = element.text.strip()
21 if element.tail:
22 element.tail = element.tail.strip()
23 for child in element:
24 strip (child)
25
26 def annotate(root):
27 assert root.tag == 'node'
28
29 for interface_elt in root:
30 if interface_elt.tag != 'interface':
31 continue
32 for method_elt in interface_elt:
33 if method_elt.tag != 'method':
34 continue
35 a_elt = Element('annotation',
36 name='org.freedesktop.DBus.GLib.Async',
37 value='')
38 method_elt.insert(0, a_elt)
39 #a_elt = Element('annotation',
40 # name='org.freedesktop.DBus.GLib.Const',
41 # value='')
42 #method_elt.insert(0, a_elt)
43
44 if __name__ == '__main__':
45 root = ElementTree(file=sys.argv[1]).getroot()
46 annotate(root)
47
48 # pretty print
49 strip(root)
50 xml = tostring(root)
51 dom = parseString(xml)
52
53 output = file(sys.argv[2], 'w')
54 output.write(dom.toprettyxml(' ', '\n'))
55 output.close()
0 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
1 xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0"
2 exclude-result-prefixes="tp">
3
4 <xsl:template match="*">
5 <xsl:copy>
6 <xsl:for-each select="@*">
7 <xsl:if test="not(starts-with(name(), 'tp:'))">
8 <xsl:copy/>
9 </xsl:if>
10 </xsl:for-each>
11 <xsl:apply-templates/>
12 </xsl:copy>
13 </xsl:template>
14
15 <xsl:template match="tp:*"/>
16 <xsl:template match="text()"/>
17
18 <xsl:output method="xml" indent="yes" encoding="UTF-8"
19 omit-xml-declaration="no"
20 doctype-system="http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd"
21 doctype-public="-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" />
22
23 </xsl:stylesheet>
24
25 <!-- vim:set sw=2 sts=2 et: -->