Imported Upstream version 0.21.0
Simon McVittie
10 years ago
0 | commit 0d60501986e382851570f3e927cde7842d4f5724 | |
1 | Author: Xavier Claessens <xavier.claessens@collabora.co.uk> | |
2 | Date: 2013-04-03 12:34:27 +0200 | |
3 | ||
4 | 0.20.2 release | |
5 | ||
6 | commit 49cf6904ed3c5cee461d1ddcbaff73f4a10e3426 | |
0 | commit 31cb359ef8c1dc80f700c3fcc72d2578b0ffa0ba | |
1 | Author: Xavier Claessens <xavier.claessens@collabora.co.uk> | |
2 | Date: 2013-04-03 12:54:54 +0200 | |
3 | ||
4 | 0.21.0 release | |
5 | ||
6 | commit bda340636d7fd33902e8016113e957dac2561a70 | |
7 | 7 | Author: Xavier Claessens <xavier.claessens@collabora.co.uk> |
8 | 8 | Date: 2013-04-03 11:02:13 +0200 |
9 | 9 | |
13 | 13 | but newer GLib follows Unicode Corrigendum 9 and allows them. |
14 | 14 | https://bugzilla.gnome.org/show_bug.cgi?id=694669 |
15 | 15 | |
16 | commit aa640da529abdefc4cc459c3b61e035ad0ec6a71 | |
17 | Author: Xavier Claessens <xavier.claessens@collabora.co.uk> | |
18 | Date: 2013-03-29 19:45:23 +0100 | |
19 | ||
20 | Verify that TpConnection is not leaked in contacts unit tests | |
21 | ||
22 | This plugs various leaks in the tests as well. | |
23 | ||
24 | commit 29f3243d20a1a239f3c7f3bc28b7fce17763f2ee | |
25 | Author: Xavier Claessens <xavier.claessens@collabora.co.uk> | |
26 | Date: 2013-03-29 18:16:59 +0100 | |
27 | ||
28 | TpConnection: break refcycle when invalidated | |
29 | ||
30 | It is already explained in tp_connection_invalidated(), connection | |
31 | must drop its refs to all TpContact at that point. | |
32 | ||
33 | commit 86ac0ba97da73ed41f74c2d4b6708be1a1928404 | |
34 | Author: Xavier Claessens <xavier.claessens@collabora.co.uk> | |
35 | Date: 2013-03-29 18:16:39 +0100 | |
36 | ||
37 | TpConnection: self->priv->self_contact is leaked | |
38 | ||
39 | commit 484abc61967d4b18b8aa97f9fe5b15d6e9475920 | |
40 | Merge: a0f78fa c7dab2d | |
41 | Author: Simon McVittie <simon.mcvittie@collabora.co.uk> | |
42 | Date: 2013-04-02 10:09:34 +0100 | |
43 | ||
44 | Merge branch 'telepathy-glib-0.20' | |
45 | ||
16 | 46 | commit c7dab2d3c6936443fb4aee43f54defa81b5dc592 |
17 | 47 | Author: Maksim Melnikau <maxposedon@gmail.com> |
18 | 48 | Date: 2013-03-31 19:40:51 +0300 |
23 | 53 | Bug: https://bugs.freedesktop.org/show_bug.cgi?id=62968 |
24 | 54 | Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk> |
25 | 55 | |
56 | commit a0f78fab8b33eae3855f905b99c2b6f2228eef2b | |
57 | Author: Xavier Claessens <xavier.claessens@collabora.co.uk> | |
58 | Date: 2013-03-19 10:57:26 +0100 | |
59 | ||
60 | Replace more printf() with DEBUG() | |
61 | ||
62 | commit b105ec76bdc812cd83134618c216773466f18056 | |
63 | Author: Xavier Claessens <xavier.claessens@collabora.co.uk> | |
64 | Date: 2013-03-19 10:41:19 +0100 | |
65 | ||
66 | GroupMixin: Use DEBUG() instead of printf() | |
67 | ||
68 | commit 819310eaf22c882481ac72b44f07c6be9c7af3bf | |
69 | Merge: 81b4e43 a33573f | |
70 | Author: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | |
71 | Date: 2013-03-12 16:40:22 +0100 | |
72 | ||
73 | Merge branch 'telepathy-glib-0.20' | |
74 | ||
26 | 75 | commit a33573ff2c48b9ec37bb6c36801be3b80871e62b |
27 | 76 | Author: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> |
28 | 77 | Date: 2013-03-12 16:25:43 +0100 |
29 | 78 | |
30 | 79 | start_file_transfer(): unset timer_id |
80 | ||
81 | commit 81b4e43cd4a71dbd0cb71150ef6c7fcf3cbd77b1 | |
82 | Merge: e61dd17 9ea571e | |
83 | Author: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | |
84 | Date: 2013-03-12 15:19:44 +0100 | |
85 | ||
86 | Merge branch 'telepathy-glib-0.20' | |
31 | 87 | |
32 | 88 | commit 9ea571eca7d12648776c7179255711dbdd9aac25 |
33 | 89 | Author: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> |
41 | 97 | |
42 | 98 | Fix introspection annotations for GStrv types |
43 | 99 | |
100 | commit e61dd171562690e6ab0cc411e048f7f511856e6e | |
101 | Author: Thomas Bechtold <thomasbechtold@jpberlin.de> | |
102 | Date: 2013-02-09 21:50:04 +0100 | |
103 | ||
104 | Fix introspection annotations for GStrv types | |
105 | ||
106 | commit 8198f852f26803285c14645b319c83d7e04e28d9 | |
107 | Author: Xavier Claessens <xavier.claessens@collabora.co.uk> | |
108 | Date: 2013-01-29 10:41:11 +0100 | |
109 | ||
110 | README: LD_LIBRARY_PATH needs to be set for running introspection examples | |
111 | ||
112 | commit 8608a306e80f3aec068c36c83e17f35c52df1381 | |
113 | Author: Simon McVittie <simon.mcvittie@collabora.co.uk> | |
114 | Date: 2013-01-28 14:01:10 +0000 | |
115 | ||
116 | NEWS for master | |
117 | ||
118 | commit fc5fdd26527e77f5f84a08f4475cc9984ccd7533 | |
119 | Merge: 18dd2cc bb3d4a4 | |
120 | Author: Simon McVittie <simon.mcvittie@collabora.co.uk> | |
121 | Date: 2013-01-28 13:52:17 +0000 | |
122 | ||
123 | Merge branch 'telepathy-glib-0.20' | |
124 | ||
125 | Conflicts: | |
126 | NEWS | |
127 | ||
44 | 128 | commit bb3d4a427f8bd28a83896e499b64755534de02c5 |
45 | 129 | Merge: 949324d 55f7253 |
46 | 130 | Author: Simon McVittie <simon.mcvittie@collabora.co.uk> |
69 | 153 | Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk> |
70 | 154 | Bug: https://bugs.freedesktop.org/show_bug.cgi?id=59604 |
71 | 155 | |
156 | commit 18dd2cc616621f796bf1d1987e55b51eedca00b8 | |
157 | Author: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | |
158 | Date: 2013-01-07 17:29:45 +0100 | |
159 | ||
160 | TpAccount: implement change notification on uri-schemes property | |
161 | ||
162 | commit 15b8eea5133e683ac14c79734dfbea6747af6e5f | |
163 | Author: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | |
164 | Date: 2013-01-07 17:07:50 +0100 | |
165 | ||
166 | add TpAccount:uri-schemes: property | |
167 | ||
168 | The property was missing for some reason. | |
169 | ||
170 | commit 16578d4864f04d26c05c94dbd4c6035ba728d55c | |
171 | Author: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | |
172 | Date: 2013-01-07 16:57:04 +0100 | |
173 | ||
174 | simple-account: add tp_tests_simple_account_add_uri_scheme() | |
175 | ||
176 | commit edd3e68fb24ffbeaf4b1073971bdecb0c4591a02 | |
177 | Merge: b3570e8 949324d | |
178 | Author: Will Thompson <will.thompson@collabora.co.uk> | |
179 | Date: 2013-01-09 10:00:56 +0000 | |
180 | ||
181 | Merge branch 'telepathy-glib-0.20' | |
182 | ||
72 | 183 | commit 949324dbc3515e2cebced4a1a410c725896f4a6e |
73 | 184 | Author: Will Thompson <will.thompson@collabora.co.uk> |
74 | 185 | Date: 2013-01-09 09:59:41 +0000 |
77 | 188 | |
78 | 189 | tp_connection_get_contact_by_id_async does not exist; it is called |
79 | 190 | tp_connection_dup_contact_by_id_async. |
191 | ||
192 | commit b3570e8e77cb890c62744dc62859c49a6bebd8aa | |
193 | Author: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | |
194 | Date: 2013-01-08 09:59:13 +0100 | |
195 | ||
196 | add missing config.h includes | |
197 | ||
198 | g_type_init() has been deprecated in GLib master. By including config.h we | |
199 | avoid the deprecation warning as it contains GLib's versions macros. | |
200 | ||
201 | commit 3c76b3c7833675bf04e28575805da874f07bee51 | |
202 | Merge: 08a0b1b 12e8b21 | |
203 | Author: Simon McVittie <simon.mcvittie@collabora.co.uk> | |
204 | Date: 2013-01-07 13:03:09 +0000 | |
205 | ||
206 | Merge branch 'telepathy-glib-0.20' | |
207 | ||
208 | Conflicts: | |
209 | NEWS | |
80 | 210 | |
81 | 211 | commit 12e8b215512e99b8f11a2800b8f9842c59dd38d6 |
82 | 212 | Merge: 308408b a0f0298 |
114 | 244 | [edited for coding style, added a comment -smcv] |
115 | 245 | Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk> |
116 | 246 | |
247 | commit 08a0b1b3462a571a91d12ab63d3d5c17d9317c38 | |
248 | Author: Maksim Melnikau <maxposedon@gmail.com> | |
249 | Date: 2013-01-06 02:03:36 +0300 | |
250 | ||
251 | del unused magic import in ft-handler.py example | |
252 | ||
253 | 1) it isn't used now | |
254 | 2) it is prevents run example on machines, which hasn't magic | |
255 | 3) magic(libmagic) isn't popular in various linux distributions | |
256 | ||
257 | Signed-off-by: Maksim Melnikau <maxposedon@gmail.com> | |
258 | Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk> | |
259 | ||
260 | commit ff1eea1e3abdc78665bb8b72c65bb19c8b1084b3 | |
261 | Author: Simon McVittie <simon.mcvittie@collabora.co.uk> | |
262 | Date: 2013-01-03 18:19:08 +0000 | |
263 | ||
264 | NEWS for 0.21 | |
265 | ||
266 | commit 71ed6c18ca1c52d11256dadfbb4a2e530b5ae9c9 | |
267 | Merge: 8759a8f 308408b | |
268 | Author: Simon McVittie <simon.mcvittie@collabora.co.uk> | |
269 | Date: 2013-01-03 18:18:39 +0000 | |
270 | ||
271 | Merge branch 'telepathy-glib-0.20' | |
272 | ||
273 | Conflicts: | |
274 | NEWS | |
275 | configure.ac | |
276 | ||
117 | 277 | commit 308408b98358b701a629b2b7821af81eaecc0239 |
118 | 278 | Author: Simon McVittie <simon.mcvittie@collabora.co.uk> |
119 | 279 | Date: 2013-01-03 18:17:31 +0000 |
120 | 280 | |
121 | 281 | NEWS |
282 | ||
283 | commit 8759a8f11bb1b480b0beaf3754020dfec73572e0 | |
284 | Author: Simon McVittie <simon.mcvittie@collabora.co.uk> | |
285 | Date: 2012-11-09 17:37:38 +0000 | |
286 | ||
287 | Add dbus-properties-mixin-internal.h to tarballs, fixing distcheck | |
288 | ||
289 | Cherry-picked: from commit 162f347d313608bd6ea7148813c9fef99a0dee81 | |
290 | ||
291 | commit 202e5adc9a6216688d57940f92e9a3fd5c3b50fc | |
292 | Author: Simon McVittie <simon.mcvittie@collabora.co.uk> | |
293 | Date: 2013-01-03 11:40:46 +0000 | |
294 | ||
295 | contact-lists test: add a regression test for fd.o #52011 | |
296 | ||
297 | Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> | |
298 | Bug: https://bugs.freedesktop.org/show_bug.cgi?id=52011 | |
299 | Reviewed-by: Xavier Claessens <xavier.claessens@collabora.co.uk> | |
300 | ||
301 | commit bbef06e7e6554850a9db6686ce19ad0cca39513f | |
302 | Author: Simon McVittie <simon.mcvittie@collabora.co.uk> | |
303 | Date: 2013-01-03 11:02:52 +0000 | |
304 | ||
305 | tp_base_contact_list_set_list_received: don't re-announce groups | |
306 | ||
307 | We already announced each group from tp_base_contact_list_groups_created | |
308 | a few lines ago; we don't need to do it again. | |
309 | ||
310 | Ideally we'd add each channel's members before announcing the | |
311 | channel itself, so that the channel is created "fully-formed"; but | |
312 | we've never actually done that, and keeping the first NewChannels | |
313 | instead of the second seems less likely to break applications. | |
314 | These channels are only for legacy code anyway: any modern client | |
315 | should be using the ContactGroups interface. | |
316 | ||
317 | Bug: https://bugs.freedesktop.org/show_bug.cgi?id=52011 | |
318 | Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> | |
319 | Reviewed-by: Xavier Claessens <xavier.claessens@collabora.co.uk> | |
320 | ||
321 | commit f4634b2caf1f92f27a507207ff181d3a7927871f | |
322 | Author: Simon McVittie <simon.mcvittie@collabora.co.uk> | |
323 | Date: 2013-01-03 12:33:09 +0000 | |
324 | ||
325 | Make the code generation tools work under either Python 2 or 3 | |
326 | ||
327 | They have been verified to produce identical output in _gen. | |
328 | ||
329 | Bug: https://bugs.freedesktop.org/show_bug.cgi?id=56758 | |
330 | Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> | |
331 | Reviewed-by: Xavier Claessens <xavier.claessens@collabora.co.uk> | |
332 | ||
333 | commit 8058faf2407867dcda1aca35616dd23496b1b814 | |
334 | Author: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | |
335 | Date: 2013-01-02 15:22:07 +0100 | |
336 | ||
337 | text-channel: rename static vars/function to match the feature name | |
338 | ||
339 | The actual name of the feature is INCOMING_MESSAGE, not PENDING_MESSAGE. | |
122 | 340 | |
123 | 341 | commit 8da3211ce74e143f59973b8f2f17295b7165b22c |
124 | 342 | Author: Philip Withnall <philip@tecnocode.co.uk> |
133 | 351 | |
134 | 352 | https://bugs.freedesktop.org/show_bug.cgi?id=58851 |
135 | 353 | |
354 | commit fe88f67b789b7702d15866b80ebb989a28b6f7e6 | |
355 | Author: Philip Withnall <philip@tecnocode.co.uk> | |
356 | Date: 2012-12-29 11:41:50 +0000 | |
357 | ||
358 | Add some missing (element-type) introspection annotations | |
359 | ||
360 | This fixes compilation with --enable-introspection when introspection | |
361 | warnings are treated as errors. | |
362 | ||
363 | Signed-off-by: Robert McQueen <robert.mcqueen@collabora.co.uk> | |
364 | ||
365 | https://bugs.freedesktop.org/show_bug.cgi?id=58851 | |
366 | ||
367 | commit 4acc51d5b848359211bb8a00f0daa8e0bc44eb65 | |
368 | Author: Will Thompson <will.thompson@collabora.co.uk> | |
369 | Date: 2012-12-10 14:11:05 +0000 | |
370 | ||
371 | Remove pkg-config dependency from .pc files | |
372 | ||
373 | This causes problems for Yocto, since they use pc files when choosing | |
374 | package dependencies. It doesn't make a huge amount of sense for a | |
375 | .pc file to depend on pkg-config: by the time you've parsed the file, | |
376 | you've got pkg-config. And the versioned dependency is checked by | |
377 | configure, as commit 1154794 (which added this) mentions, so if you've | |
378 | compiled telepathy-glib, your pkg-config is new enough. | |
379 | ||
136 | 380 | commit 9197c36511e0fedd1cd32d99327a06ae3cd993d9 |
137 | 381 | Author: Simon McVittie <simon.mcvittie@collabora.co.uk> |
138 | 382 | Date: 2012-11-09 18:04:42 +0000 |
150 | 394 | Date: 2012-11-09 17:25:08 +0000 |
151 | 395 | |
152 | 396 | Prepare release 0.20.1 |
397 | ||
398 | commit 48a6895f21fd3a3ef996e3e18ded4ed8a8f9f576 | |
399 | Author: Debarshi Ray <rishi@gnu.org> | |
400 | Date: 2012-10-17 14:48:11 +0200 | |
401 | ||
402 | base-call-channel: Don't call set_state from set_ringing and set_queued | |
403 | ||
404 | ... because they only change the flags and not the state. Instead emit | |
405 | CallStateChanged directly. | |
406 | ||
407 | Fixes: https://bugs.freedesktop.org/56044 | |
408 | ||
409 | commit dfca38a93e2c504c1a4643eec291c4ddb4368f4f | |
410 | Author: Debarshi Ray <rishi@gnu.org> | |
411 | Date: 2012-10-17 10:50:24 +0200 | |
412 | ||
413 | base-call-channel: Ignore transitions with the same state | |
414 | ||
415 | Fixes: https://bugs.freedesktop.org/56044 | |
153 | 416 | |
154 | 417 | commit 1dcb667751898544efad73b8e42d91ff58119e0d |
155 | 418 | Author: Debarshi Ray <rishi@gnu.org> |
170 | 433 | |
171 | 434 | Fixes: https://bugs.freedesktop.org/56044 |
172 | 435 | |
436 | commit a7e61d16b9aadf1cf212d8fc40db33e7cb2bccf1 | |
437 | Author: Simon McVittie <simon.mcvittie@collabora.co.uk> | |
438 | Date: 2012-10-10 15:44:26 +0100 | |
439 | ||
440 | add missing inclusion | |
441 | ||
442 | commit 1c6846e925196b8286d96ee59a8f0636ee6f2a60 | |
443 | Author: Xavier Claessens <xavier.claessens@collabora.co.uk> | |
444 | Date: 2012-10-10 14:39:05 +0200 | |
445 | ||
446 | Util: Link APIs to their bug for inclusion in GLib | |
447 | ||
448 | commit e83233400f60acaac9838966b504801f00206132 | |
449 | Author: Xavier Claessens <xavier.claessens@collabora.co.uk> | |
450 | Date: 2012-10-10 14:15:01 +0200 | |
451 | ||
452 | Deprecate tp_g_key_file_get_(u)int64, GLib has it since 2.26 | |
453 | ||
454 | commit acd25c4ddc583f4fbfe127c3dae2f3d5a1e58b03 | |
455 | Merge: b203d23 ce8d1f6 | |
456 | Author: Simon McVittie <simon.mcvittie@collabora.co.uk> | |
457 | Date: 2012-10-08 16:22:16 +0100 | |
458 | ||
459 | Merge branch 'telepathy-glib-0.20' | |
460 | ||
173 | 461 | commit ce8d1f6edf9161df170bc781f903f85346ac5554 |
174 | 462 | Author: Simon McVittie <simon.mcvittie@collabora.co.uk> |
175 | 463 | Date: 2012-10-08 14:32:12 +0100 |
178 | 466 | |
179 | 467 | foo_CPPFLAGS overrides AM_CPPFLAGS, so if you want to include the latter |
180 | 468 | in the former, you have to do it explicitly. |
469 | ||
470 | commit b203d2368f6f3d92d9be10b140be94dd00450a1d | |
471 | Merge: 75a6ae1 e39ce95 | |
472 | Author: Simon McVittie <simon.mcvittie@collabora.co.uk> | |
473 | Date: 2012-10-08 13:26:41 +0100 | |
474 | ||
475 | Merge branch 'telepathy-glib-0.20' | |
476 | ||
477 | Conflicts: | |
478 | NEWS | |
181 | 479 | |
182 | 480 | commit e39ce95dbf2b2c57fb4621291a450aa8584fb193 |
183 | 481 | Author: Simon McVittie <simon.mcvittie@collabora.co.uk> |
240 | 538 | Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> |
241 | 539 | Bug: https://bugs.freedesktop.org/show_bug.cgi?id=55666 |
242 | 540 | Reviewed-by: Xavier Claessens <xavier.claessens@collabora.co.uk> |
541 | ||
542 | commit 75a6ae1febed4ab47bbc090a5cc30627fe341458 | |
543 | Author: Xavier Claessens <xavier.claessens@collabora.co.uk> | |
544 | Date: 2012-10-04 15:08:37 +0200 | |
545 | ||
546 | Add missing doc for TP_VERSION_0_22 | |
547 | ||
548 | commit cb289352235a5c53815bcaf542c9edbbbd325d4d | |
549 | Author: Xavier Claessens <xavier.claessens@collabora.co.uk> | |
550 | Date: 2012-10-04 11:21:33 +0200 | |
551 | ||
552 | Add defs for 0.22 branch | |
553 | ||
554 | commit 5639838f829ef4ea38be2a6eaa30d87b15899c42 | |
555 | Author: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | |
556 | Date: 2012-10-03 14:17:19 +0200 | |
557 | ||
558 | start dev of 0.21.x | |
559 | ||
560 | commit ed011cd34e0a3c8b6e6fbf6a695b62f0a0177d02 | |
561 | Author: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | |
562 | Date: 2012-10-03 14:16:45 +0200 | |
563 | ||
564 | Revert "Disable warnings about deprecated functions for stable branch" | |
565 | ||
566 | This reverts commit 74b79c60c152d7ac49f091c88c2001a6dcec93f1. | |
567 | ||
568 | commit aba81b8599fca976d3d0313043d3ad2c1ce7d106 | |
569 | Author: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | |
570 | Date: 2012-10-03 14:16:34 +0200 | |
571 | ||
572 | Revert "Don't check documentation completeness in this stable branch" | |
573 | ||
574 | This reverts commit 860832b0521da2145e71bb2c06ff05b3a921c59f. | |
575 | ||
576 | commit 66b0194a274f7503074f4062884ab6472de090e2 | |
577 | Author: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | |
578 | Date: 2012-10-03 14:16:21 +0200 | |
579 | ||
580 | Revert "Upload documentation to the 0.20.x location" | |
581 | ||
582 | This reverts commit 8a13206cedc749c301521f65b7f6f017fa39aee5. | |
243 | 583 | |
244 | 584 | commit dc6f2f106202da6903e49848272f49d171423366 |
245 | 585 | Author: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> |
36 | 36 | maintainer-upload-release: _maintainer-upload-release-local |
37 | 37 | _maintainer-upload-release-local: _maintainer-upload-release-check |
38 | 38 | rsync -rvzPp --chmod=Dg+s,ug+rwX,o=rX $(builddir)/docs/reference/html/ \ |
39 | telepathy.freedesktop.org:/srv/telepathy.freedesktop.org/www/doc/telepathy-glib-0.20.x/ | |
39 | telepathy.freedesktop.org:/srv/telepathy.freedesktop.org/www/doc/telepathy-glib/ | |
40 | 40 | |
41 | 41 | BRANCH = $(shell sh tools/git-which-branch.sh misc | tr -d '\n' | tr -C "[:alnum:]" _) |
42 | 42 | UPLOAD_BRANCH_TO = people.freedesktop.org:public_html/telepathy-glib |
857 | 857 | maintainer-upload-release: _maintainer-upload-release-local |
858 | 858 | _maintainer-upload-release-local: _maintainer-upload-release-check |
859 | 859 | rsync -rvzPp --chmod=Dg+s,ug+rwX,o=rX $(builddir)/docs/reference/html/ \ |
860 | telepathy.freedesktop.org:/srv/telepathy.freedesktop.org/www/doc/telepathy-glib-0.20.x/ | |
860 | telepathy.freedesktop.org:/srv/telepathy.freedesktop.org/www/doc/telepathy-glib/ | |
861 | 861 | |
862 | 862 | upload-branch-docs: all |
863 | 863 | rsync -rtzvPp --chmod=a+rX docs/reference/html/ \ |
0 | telepathy-glib 0.20.2 (2013-04-03) | |
1 | ================================== | |
2 | ||
3 | Fixes: | |
0 | telepathy-glib 0.21.0 (2013-04-03) | |
1 | ================================== | |
2 | ||
3 | This starts a new development branch. | |
4 | ||
5 | Enhancements: | |
6 | ||
7 | • Code-generation now copes with ${PYTHON} being set to Python 3 | |
8 | (e.g. "./configure PYTHON=python3" on Debian); Python 2 remains | |
9 | fully supported (fd.o #56758, Simon) | |
10 | ||
11 | • Add uri-schemes property on TpAccount, with notify::uri-schemes | |
12 | emitted if using a recent AcountManager like Mission Control 5.15 or | |
13 | later (Guillaume) | |
14 | ||
15 | Fixes: | |
16 | ||
17 | • Remove the pkg-config dependency from .pc files (Will) | |
4 | 18 | |
5 | 19 | • In TpSimpleClientFactory, don't crash when ensuring a contact for an |
6 | 20 | obsolete connection manager without "immortal handles" fails |
10 | 24 | tp_capabilities_get_channel_classes, tp_asv_get_bytes and |
11 | 25 | tp_client_channel_factory_dup_channel_features (fd.o #58851, Philip Withnall) |
12 | 26 | |
27 | • Don't emit the NewChannels signal twice for the obsolete ContactList GROUP | |
28 | channels (fd.o #52011, Simon) | |
29 | ||
13 | 30 | • Fix builds with Automake 1.13 (fd.o #59604, Nuno Araujo) |
14 | 31 | |
15 | 32 | • Fix unit tests when running with glib >=2.36 (fd.o #63069, Xavier) |
33 | ||
34 | • Fix refcycle preventing TpConnection objects to be freed. This theoretically | |
35 | introduce a behaviour change of tp_connection_get_self_contact() that now | |
36 | returns NULL when the connection as been invalidated. (fd.o #63027, Xavier) | |
37 | ||
38 | Deprecations: | |
39 | ||
40 | • tp_g_key_file_get_int64, tp_g_key_file_get_uint64 (use the corresponding | |
41 | functions from GLib ≥ 2.26) | |
16 | 42 | |
17 | 43 | telepathy-glib 0.20.1 (2012-11-09) |
18 | 44 | ================================== |
118 | 118 | GI_TYPELIB_PATH=`pwd`/telepathy-glib |
119 | 119 | export GI_TYPELIB_PATH |
120 | 120 | |
121 | LD_LIBRARY_PATH=`pwd`/telepathy-glib/.libs | |
122 | export LD_LIBRARY_PATH | |
123 | ||
121 | 124 | In Python you can access the API using; |
122 | 125 | from gi.repository import TelepathyGLib |
0 | 0 | #! /bin/sh |
1 | 1 | # Guess values for system-dependent variables and create Makefiles. |
2 | # Generated by GNU Autoconf 2.69 for Telepathy-GLib 0.20.2. | |
2 | # Generated by GNU Autoconf 2.69 for Telepathy-GLib 0.21.0. | |
3 | 3 | # |
4 | 4 | # Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=Telepathy&component=tp-glib>. |
5 | 5 | # |
650 | 650 | # Identity of this package. |
651 | 651 | PACKAGE_NAME='Telepathy-GLib' |
652 | 652 | PACKAGE_TARNAME='telepathy-glib' |
653 | PACKAGE_VERSION='0.20.2' | |
654 | PACKAGE_STRING='Telepathy-GLib 0.20.2' | |
653 | PACKAGE_VERSION='0.21.0' | |
654 | PACKAGE_STRING='Telepathy-GLib 0.21.0' | |
655 | 655 | PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=Telepathy&component=tp-glib' |
656 | 656 | PACKAGE_URL='' |
657 | 657 | |
1488 | 1488 | # Omit some internal or obsolete options to make the list less imposing. |
1489 | 1489 | # This message is too long to be a string in the A/UX 3.1 sh. |
1490 | 1490 | cat <<_ACEOF |
1491 | \`configure' configures Telepathy-GLib 0.20.2 to adapt to many kinds of systems. | |
1491 | \`configure' configures Telepathy-GLib 0.21.0 to adapt to many kinds of systems. | |
1492 | 1492 | |
1493 | 1493 | Usage: $0 [OPTION]... [VAR=VALUE]... |
1494 | 1494 | |
1558 | 1558 | |
1559 | 1559 | if test -n "$ac_init_help"; then |
1560 | 1560 | case $ac_init_help in |
1561 | short | recursive ) echo "Configuration of Telepathy-GLib 0.20.2:";; | |
1561 | short | recursive ) echo "Configuration of Telepathy-GLib 0.21.0:";; | |
1562 | 1562 | esac |
1563 | 1563 | cat <<\_ACEOF |
1564 | 1564 | |
1709 | 1709 | test -n "$ac_init_help" && exit $ac_status |
1710 | 1710 | if $ac_init_version; then |
1711 | 1711 | cat <<\_ACEOF |
1712 | Telepathy-GLib configure 0.20.2 | |
1712 | Telepathy-GLib configure 0.21.0 | |
1713 | 1713 | generated by GNU Autoconf 2.69 |
1714 | 1714 | |
1715 | 1715 | Copyright (C) 2012 Free Software Foundation, Inc. |
2199 | 2199 | This file contains any messages produced by compilers while |
2200 | 2200 | running configure, to aid debugging if configure makes a mistake. |
2201 | 2201 | |
2202 | It was created by Telepathy-GLib $as_me 0.20.2, which was | |
2202 | It was created by Telepathy-GLib $as_me 0.21.0, which was | |
2203 | 2203 | generated by GNU Autoconf 2.69. Invocation command line was |
2204 | 2204 | |
2205 | 2205 | $ $0 $@ |
3017 | 3017 | |
3018 | 3018 | # Define the identity of the package. |
3019 | 3019 | PACKAGE='telepathy-glib' |
3020 | VERSION='0.20.2' | |
3020 | VERSION='0.21.0' | |
3021 | 3021 | |
3022 | 3022 | |
3023 | 3023 | cat >>confdefs.h <<_ACEOF |
12510 | 12510 | |
12511 | 12511 | |
12512 | 12512 | TP_MAJOR_VERSION=0 |
12513 | TP_MINOR_VERSION=20 | |
12514 | TP_MICRO_VERSION=2 | |
12513 | TP_MINOR_VERSION=21 | |
12514 | TP_MICRO_VERSION=0 | |
12515 | 12515 | |
12516 | 12516 | |
12517 | 12517 | |
12783 | 12783 | |
12784 | 12784 | |
12785 | 12785 | for tp_flag in missing-field-initializers \ |
12786 | unused-parameter \ | |
12787 | deprecated-declarations; do | |
12786 | unused-parameter; do | |
12788 | 12787 | |
12789 | 12788 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if compiler understands -Wno-$tp_flag" >&5 |
12790 | 12789 | $as_echo_n "checking to see if compiler understands -Wno-$tp_flag... " >&6; } |
18143 | 18142 | # report actual input values of CONFIG_FILES etc. instead of their |
18144 | 18143 | # values after options handling. |
18145 | 18144 | ac_log=" |
18146 | This file was extended by Telepathy-GLib $as_me 0.20.2, which was | |
18145 | This file was extended by Telepathy-GLib $as_me 0.21.0, which was | |
18147 | 18146 | generated by GNU Autoconf 2.69. Invocation command line was |
18148 | 18147 | |
18149 | 18148 | CONFIG_FILES = $CONFIG_FILES |
18209 | 18208 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
18210 | 18209 | ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" |
18211 | 18210 | ac_cs_version="\\ |
18212 | Telepathy-GLib config.status 0.20.2 | |
18211 | Telepathy-GLib config.status 0.21.0 | |
18213 | 18212 | configured by $0, generated by GNU Autoconf 2.69, |
18214 | 18213 | with options \\"\$ac_cs_config\\" |
18215 | 18214 |
9 | 9 | # set nano_version to 1 |
10 | 10 | |
11 | 11 | m4_define([tp_glib_major_version], [0]) |
12 | m4_define([tp_glib_minor_version], [20]) | |
13 | m4_define([tp_glib_micro_version], [2]) | |
12 | m4_define([tp_glib_minor_version], [21]) | |
13 | m4_define([tp_glib_micro_version], [0]) | |
14 | 14 | m4_define([tp_glib_nano_version], [0]) |
15 | 15 | |
16 | 16 | # If library source has changed since last release, increment revision |
115 | 115 | format-security \ |
116 | 116 | init-self], |
117 | 117 | [missing-field-initializers \ |
118 | unused-parameter \ | |
119 | deprecated-declarations]) | |
118 | unused-parameter]) | |
120 | 119 | AC_SUBST([ERROR_CFLAGS]) |
121 | 120 | |
122 | 121 | # these aren't really error flags but they serve a similar purpose for us - |
141 | 141 | echo "$$file missing from telepathy-glib-docs.sgml"; \ |
142 | 142 | err=1; \ |
143 | 143 | fi; \ |
144 | done | |
144 | done; \ | |
145 | case $(enable_fatal_warnings)/$$err in \ | |
146 | (yes/1) \ | |
147 | echo "Documentation check failed" >&2; \ | |
148 | exit $$err; \ | |
149 | ;; \ | |
150 | (*) \ | |
151 | exit 0; \ | |
152 | ;; \ | |
153 | esac | |
145 | 154 | endif |
146 | # ... but don't fail on incomplete documentation, this is a stable branch |
830 | 830 | @ENABLE_GTK_DOC_TRUE@ echo "$$file missing from telepathy-glib-docs.sgml"; \ |
831 | 831 | @ENABLE_GTK_DOC_TRUE@ err=1; \ |
832 | 832 | @ENABLE_GTK_DOC_TRUE@ fi; \ |
833 | @ENABLE_GTK_DOC_TRUE@ done | |
834 | # ... but don't fail on incomplete documentation, this is a stable branch | |
833 | @ENABLE_GTK_DOC_TRUE@ done; \ | |
834 | @ENABLE_GTK_DOC_TRUE@ case $(enable_fatal_warnings)/$$err in \ | |
835 | @ENABLE_GTK_DOC_TRUE@ (yes/1) \ | |
836 | @ENABLE_GTK_DOC_TRUE@ echo "Documentation check failed" >&2; \ | |
837 | @ENABLE_GTK_DOC_TRUE@ exit $$err; \ | |
838 | @ENABLE_GTK_DOC_TRUE@ ;; \ | |
839 | @ENABLE_GTK_DOC_TRUE@ (*) \ | |
840 | @ENABLE_GTK_DOC_TRUE@ exit 0; \ | |
841 | @ENABLE_GTK_DOC_TRUE@ ;; \ | |
842 | @ENABLE_GTK_DOC_TRUE@ esac | |
835 | 843 | |
836 | 844 | # Tell versions [3.59,3.63) of GNU make to not export all variables. |
837 | 845 | # Otherwise a system limit (for SysV at least) may be exceeded. |
14 | 14 | <div> |
15 | 15 | <div><table class="navigation" id="top" width="100%" cellpadding="2" cellspacing="0"><tr><th valign="middle"><p class="title">telepathy-glib API Reference Manual</p></th></tr></table></div> |
16 | 16 | <div><p class="releaseinfo"> |
17 | This manual documents telepathy-glib version 0.20.2 | |
17 | This manual documents telepathy-glib version 0.21.0 | |
18 | 18 | . |
19 | 19 | The latest development version of this documentation can be found here: |
20 | 20 | <a class="ulink" href="http://telepathy.freedesktop.org/doc/telepathy-glib/" target="_top">online copy of the telepathy-glib API Reference Manual</a>. |
21 | The latest version in this stable branch can be found here: | |
22 | <a class="ulink" href="http://telepathy.freedesktop.org/doc/telepathy-glib-0.20.x/" target="_top">online copy of the telepathy-glib 0.20.x API Reference Manual</a>. | |
23 | 21 | </p></div> |
24 | 22 | </div> |
25 | 23 | <hr> |
0 | 0 | <ONLINE href="http://telepathy.freedesktop.org/doc/telepathy-glib/"> |
1 | <ONLINE href="http://telepathy.freedesktop.org/doc/telepathy-glib-0.20.x/"> | |
2 | 1 | <ANCHOR id="telepathy-glib-proxy" href="telepathy-glib/telepathy-glib-proxy.html"> |
3 | 2 | <ANCHOR id="telepathy-glib-proxy.synopsis" href="telepathy-glib/telepathy-glib-proxy.html#telepathy-glib-proxy.synopsis"> |
4 | 3 | <ANCHOR id="TpProxy" href="telepathy-glib/telepathy-glib-proxy.html#TpProxy"> |
3335 | 3334 | <ANCHOR id="TpAccount--storage-provider" href="telepathy-glib/telepathy-glib-account.html#TpAccount--storage-provider"> |
3336 | 3335 | <ANCHOR id="TpAccount--storage-restrictions" href="telepathy-glib/telepathy-glib-account.html#TpAccount--storage-restrictions"> |
3337 | 3336 | <ANCHOR id="TpAccount--supersedes" href="telepathy-glib/telepathy-glib-account.html#TpAccount--supersedes"> |
3337 | <ANCHOR id="TpAccount--uri-schemes" href="telepathy-glib/telepathy-glib-account.html#TpAccount--uri-schemes"> | |
3338 | 3338 | <ANCHOR id="TpAccount--valid" href="telepathy-glib/telepathy-glib-account.html#TpAccount--valid"> |
3339 | 3339 | <ANCHOR id="telepathy-glib-account.signal-details" href="telepathy-glib/telepathy-glib-account.html#telepathy-glib-account.signal-details"> |
3340 | 3340 | <ANCHOR id="TpAccount-presence-changed" href="telepathy-glib/telepathy-glib-account.html#TpAccount-presence-changed"> |
6761 | 6761 | <ANCHOR id="TP-VERSION-0-16:CAPS" href="telepathy-glib/telepathy-glib-version.html#TP-VERSION-0-16:CAPS"> |
6762 | 6762 | <ANCHOR id="TP-VERSION-0-18:CAPS" href="telepathy-glib/telepathy-glib-version.html#TP-VERSION-0-18:CAPS"> |
6763 | 6763 | <ANCHOR id="TP-VERSION-0-20:CAPS" href="telepathy-glib/telepathy-glib-version.html#TP-VERSION-0-20:CAPS"> |
6764 | <ANCHOR id="TP-VERSION-0-22:CAPS" href="telepathy-glib/telepathy-glib-version.html#TP-VERSION-0-22:CAPS"> | |
6764 | 6765 | <ANCHOR id="TP-VERSION-MIN-REQUIRED:CAPS" href="telepathy-glib/telepathy-glib-version.html#TP-VERSION-MIN-REQUIRED:CAPS"> |
6765 | 6766 | <ANCHOR id="TP-VERSION-MAX-ALLOWED:CAPS" href="telepathy-glib/telepathy-glib-version.html#TP-VERSION-MAX-ALLOWED:CAPS"> |
6766 | 6767 | <ANCHOR id="telepathy-glib-util" href="telepathy-glib/telepathy-glib-util.html"> |
107 | 107 | </p> |
108 | 108 | <div class="section"> |
109 | 109 | <div class="titlepage"><div><div><h2 class="title" style="clear: both"> |
110 | <a name="idp107846592"></a>Implementing SimplePresence</h2></div></div></div> | |
110 | <a name="idp111078240"></a>Implementing SimplePresence</h2></div></div></div> | |
111 | 111 | <p> |
112 | 112 | Since 0.7.13 this mixin supports the entire SimplePresence interface. |
113 | 113 | You can implement <a class="link" href="telepathy-glib-svc-connection.html#TpSvcConnectionInterfaceSimplePresence"><span class="type">TpSvcConnectionInterfaceSimplePresence</span></a> as follows: |
145 | 145 | </p> |
146 | 146 | <div class="section"> |
147 | 147 | <div class="titlepage"><div><div><h2 class="title" style="clear: both"> |
148 | <a name="idp107862016"></a>Implementing old-style Presence</h2></div></div></div> | |
148 | <a name="idp111093904"></a>Implementing old-style Presence</h2></div></div></div> | |
149 | 149 | <p> |
150 | 150 | This mixin also supports a large subset of the deprecated Presence |
151 | 151 | interface. It does not support protocols where it is possible to set |
400 | 400 | "<a class="link" href="telepathy-glib-account.html#TpAccount--storage-provider" title='The "storage-provider" property'>storage-provider</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read |
401 | 401 | "<a class="link" href="telepathy-glib-account.html#TpAccount--storage-restrictions" title='The "storage-restrictions" property'>storage-restrictions</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> : Read |
402 | 402 | "<a class="link" href="telepathy-glib-account.html#TpAccount--supersedes" title='The "supersedes" property'>supersedes</a>" <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Boxed-Types.html#GStrv"><span class="type">GStrv</span></a> : Read |
403 | "<a class="link" href="telepathy-glib-account.html#TpAccount--uri-schemes" title='The "uri-schemes" property'>uri-schemes</a>" <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Boxed-Types.html#GStrv"><span class="type">GStrv</span></a> : Read | |
403 | 404 | "<a class="link" href="telepathy-glib-account.html#TpAccount--valid" title='The "valid" property'>valid</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read |
404 | 405 | </pre> |
405 | 406 | </div> |
2685 | 2686 | <a name="tp-account-get-uri-schemes"></a><h3>tp_account_get_uri_schemes ()</h3> |
2686 | 2687 | <pre class="programlisting">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * const * tp_account_get_uri_schemes (<em class="parameter"><code><a class="link" href="telepathy-glib-account.html#TpAccount"><span class="type">TpAccount</span></a> *self</code></em>);</pre> |
2687 | 2688 | <p> |
2688 | If the <a class="link" href="telepathy-glib-account.html#TP-ACCOUNT-FEATURE-ADDRESSING:CAPS" title="TP_ACCOUNT_FEATURE_ADDRESSING"><code class="literal">TP_ACCOUNT_FEATURE_ADDRESSING</code></a> feature has been prepared | |
2689 | successfully, return a list of additional URI schemes for which this | |
2690 | account should be used if possible. Otherwise return <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. | |
2691 | </p> | |
2692 | <p> | |
2693 | For instance, a SIP or Skype account might have "tel" in this list if the | |
2694 | user would like to use that account to call phone numbers. | |
2695 | </p> | |
2696 | <p> | |
2697 | This list should not contain the primary URI scheme(s) for the account's | |
2698 | protocol (for instance, "xmpp" for XMPP, or "sip" or "sips" for SIP), | |
2699 | since it should be assumed to be useful for those schemes in any case. | |
2689 | Return the <a class="link" href="telepathy-glib-account.html#TpAccount--uri-schemes" title='The "uri-schemes" property'><span class="type">"uri-schemes"</span></a> property | |
2700 | 2690 | </p> |
2701 | 2691 | <div class="variablelist"><table border="0"> |
2702 | 2692 | <col align="left" valign="top"> |
2708 | 2698 | </tr> |
2709 | 2699 | <tr> |
2710 | 2700 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span>Â :</span></p></td> |
2711 | <td>a list of URI schemes, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span> | |
2701 | <td>the value of <a class="link" href="telepathy-glib-account.html#TpAccount--uri-schemes" title='The "uri-schemes" property'><span class="type">"uri_schemes"</span></a> property. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span> | |
2712 | 2702 | </td> |
2713 | 2703 | </tr> |
2714 | 2704 | </tbody> |
4501 | 4491 | </div> |
4502 | 4492 | <hr> |
4503 | 4493 | <div class="refsect2"> |
4494 | <a name="TpAccount--uri-schemes"></a><h3>The <code class="literal">"uri-schemes"</code> property</h3> | |
4495 | <pre class="programlisting"> "uri-schemes" <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Boxed-Types.html#GStrv"><span class="type">GStrv</span></a> : Read</pre> | |
4496 | <p> | |
4497 | If the <a class="link" href="telepathy-glib-account.html#TP-ACCOUNT-FEATURE-ADDRESSING:CAPS" title="TP_ACCOUNT_FEATURE_ADDRESSING"><code class="literal">TP_ACCOUNT_FEATURE_ADDRESSING</code></a> feature has been prepared | |
4498 | successfully, a list of additional URI schemes for which this | |
4499 | account should be used if possible. Otherwise <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. | |
4500 | </p> | |
4501 | <p> | |
4502 | For instance, a SIP or Skype account might have "tel" in this list if the | |
4503 | user would like to use that account to call phone numbers. | |
4504 | </p> | |
4505 | <p> | |
4506 | This list should not contain the primary URI scheme(s) for the account's | |
4507 | protocol (for instance, "xmpp" for XMPP, or "sip" or "sips" for SIP), | |
4508 | since it should be assumed to be useful for those schemes in any case. | |
4509 | </p> | |
4510 | <p> | |
4511 | The notify::uri-schemes signal cannot be relied on if the Account Manager | |
4512 | is Mission Control version 5.14.0 or older. | |
4513 | </p> | |
4514 | <p class="since">Since 0.21.0</p> | |
4515 | </div> | |
4516 | <hr> | |
4517 | <div class="refsect2"> | |
4504 | 4518 | <a name="TpAccount--valid"></a><h3>The <code class="literal">"valid"</code> property</h3> |
4505 | 4519 | <pre class="programlisting"> "valid" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read</pre> |
4506 | 4520 | <p> |
215 | 215 | <p> |
216 | 216 | </p> |
217 | 217 | <div class="example"> |
218 | <a name="idp14692896"></a><p class="title"><b>Example 1. Using <a class="link" href="telepathy-glib-asv.html#tp-asv-new" title="tp_asv_new ()"><code class="function">tp_asv_new()</code></a></b></p> | |
218 | <a name="idp12108096"></a><p class="title"><b>Example 1. Using <a class="link" href="telepathy-glib-asv.html#tp-asv-new" title="tp_asv_new ()"><code class="function">tp_asv_new()</code></a></b></p> | |
219 | 219 | <div class="example-contents"><pre class="programlisting"> |
220 | 220 | GHashTable *parameters = tp_asv_new ( |
221 | 221 | "answer", G_TYPE_INT, 42, |
968 | 968 | <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *group_name</code></em>, |
969 | 969 | <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *key</code></em>, |
970 | 970 | <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre> |
971 | <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"> | |
972 | <h3 class="title">Warning</h3> | |
973 | <p><code class="literal">tp_g_key_file_get_int64</code> is deprecated and should not be used in newly-written code. Since 0.21.0. Use <a href="http://library.gnome.org/devel/glib/unstable/glib-Key-value-file-parser.html#g-key-file-get-int64"><code class="function">g_key_file_get_int64()</code></a> instead.</p> | |
974 | </div> | |
971 | 975 | <p> |
972 | 976 | Returns the value associated with <em class="parameter"><code>key</code></em> under <em class="parameter"><code>group_name</code></em> as a signed |
973 | 977 | 64-bit integer. This is similar to <a href="http://library.gnome.org/devel/glib/unstable/glib-Key-value-file-parser.html#g-key-file-get-integer"><code class="function">g_key_file_get_integer()</code></a> but can return |
1010 | 1014 | <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *group_name</code></em>, |
1011 | 1015 | <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *key</code></em>, |
1012 | 1016 | <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre> |
1017 | <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"> | |
1018 | <h3 class="title">Warning</h3> | |
1019 | <p><code class="literal">tp_g_key_file_get_uint64</code> is deprecated and should not be used in newly-written code. Since 0.21.0. Use <a href="http://library.gnome.org/devel/glib/unstable/glib-Key-value-file-parser.html#g-key-file-get-uint64"><code class="function">g_key_file_get_uint64()</code></a> instead.</p> | |
1020 | </div> | |
1013 | 1021 | <p> |
1014 | 1022 | Returns the value associated with <em class="parameter"><code>key</code></em> under <em class="parameter"><code>group_name</code></em> as an unsigned |
1015 | 1023 | 64-bit integer. This is similar to <a href="http://library.gnome.org/devel/glib/unstable/glib-Key-value-file-parser.html#g-key-file-get-integer"><code class="function">g_key_file_get_integer()</code></a> but can return |
1122 | 1130 | <p> |
1123 | 1131 | </p> |
1124 | 1132 | <div class="example"> |
1125 | <a name="idp126329392"></a><p class="title"><b>Example 3. using tp_value_array_build</b></p> | |
1133 | <a name="idp126373136"></a><p class="title"><b>Example 3. using tp_value_array_build</b></p> | |
1126 | 1134 | <div class="example-contents"><pre class="programlisting"> |
1127 | 1135 | GValueArray *array = tp_value_array_build (2, |
1128 | 1136 | G_TYPE_STRING, host, |
1172 | 1180 | <p> |
1173 | 1181 | </p> |
1174 | 1182 | <div class="example"> |
1175 | <a name="idp126348256"></a><p class="title"><b>Example 4. using tp_value_array_unpack</b></p> | |
1183 | <a name="idp126394544"></a><p class="title"><b>Example 4. using tp_value_array_unpack</b></p> | |
1176 | 1184 | <div class="example-contents"><pre class="programlisting"> |
1177 | 1185 | const gchar *host; |
1178 | 1186 | guint port; |
45 | 45 | #define <a class="link" href="telepathy-glib-version.html#TP-VERSION-0-16:CAPS" title="TP_VERSION_0_16">TP_VERSION_0_16</a> |
46 | 46 | #define <a class="link" href="telepathy-glib-version.html#TP-VERSION-0-18:CAPS" title="TP_VERSION_0_18">TP_VERSION_0_18</a> |
47 | 47 | #define <a class="link" href="telepathy-glib-version.html#TP-VERSION-0-20:CAPS" title="TP_VERSION_0_20">TP_VERSION_0_20</a> |
48 | #define <a class="link" href="telepathy-glib-version.html#TP-VERSION-0-22:CAPS" title="TP_VERSION_0_22">TP_VERSION_0_22</a> | |
48 | 49 | #define <a class="link" href="telepathy-glib-version.html#TP-VERSION-MIN-REQUIRED:CAPS" title="TP_VERSION_MIN_REQUIRED">TP_VERSION_MIN_REQUIRED</a> |
49 | 50 | #define <a class="link" href="telepathy-glib-version.html#TP-VERSION-MAX-ALLOWED:CAPS" title="TP_VERSION_MAX_ALLOWED">TP_VERSION_MAX_ALLOWED</a> |
50 | 51 | </pre> |
103 | 104 | <hr> |
104 | 105 | <div class="refsect2"> |
105 | 106 | <a name="TP-MINOR-VERSION:CAPS"></a><h3>TP_MINOR_VERSION</h3> |
106 | <pre class="programlisting">#define TP_MINOR_VERSION 20 | |
107 | <pre class="programlisting">#define TP_MINOR_VERSION 21 | |
107 | 108 | </pre> |
108 | 109 | <p> |
109 | 110 | The minor version of telepathy-glib (e.g. the 18 in 0.18.1) at the time your |
117 | 118 | <hr> |
118 | 119 | <div class="refsect2"> |
119 | 120 | <a name="TP-MICRO-VERSION:CAPS"></a><h3>TP_MICRO_VERSION</h3> |
120 | <pre class="programlisting">#define TP_MICRO_VERSION 2 | |
121 | <pre class="programlisting">#define TP_MICRO_VERSION 0 | |
121 | 122 | </pre> |
122 | 123 | <p> |
123 | 124 | The micro version of telepathy-glib (e.g. the 1 in 0.18.1) at the time your |
160 | 161 | <p> |
161 | 162 | A constant representing the telepathy-glib 0.20 stable branch, |
162 | 163 | and the 0.19 development branch that led to it. |
164 | </p> | |
165 | </div> | |
166 | <hr> | |
167 | <div class="refsect2"> | |
168 | <a name="TP-VERSION-0-22:CAPS"></a><h3>TP_VERSION_0_22</h3> | |
169 | <pre class="programlisting">#define TP_VERSION_0_22 (_TP_ENCODE_VERSION (0, 22)) | |
170 | </pre> | |
171 | <p> | |
172 | A constant representing the telepathy-glib 0.22 stable branch, | |
173 | and the 0.21 development branch that led to it. | |
163 | 174 | </p> |
164 | 175 | </div> |
165 | 176 | <hr> |
2728 | 2728 | <keyword type="property" name="The "storage-provider" property" link="telepathy-glib-account.html#TpAccount--storage-provider"/> |
2729 | 2729 | <keyword type="property" name="The "storage-restrictions" property" link="telepathy-glib-account.html#TpAccount--storage-restrictions"/> |
2730 | 2730 | <keyword type="property" name="The "supersedes" property" link="telepathy-glib-account.html#TpAccount--supersedes"/> |
2731 | <keyword type="property" name="The "uri-schemes" property" link="telepathy-glib-account.html#TpAccount--uri-schemes"/> | |
2731 | 2732 | <keyword type="property" name="The "valid" property" link="telepathy-glib-account.html#TpAccount--valid"/> |
2732 | 2733 | <keyword type="signal" name="The "presence-changed" signal" link="telepathy-glib-account.html#TpAccount-presence-changed"/> |
2733 | 2734 | <keyword type="signal" name="The "status-changed" signal" link="telepathy-glib-account.html#TpAccount-status-changed"/> |
5260 | 5261 | <keyword type="macro" name="TP_VERSION_0_16" link="telepathy-glib-version.html#TP-VERSION-0-16:CAPS"/> |
5261 | 5262 | <keyword type="macro" name="TP_VERSION_0_18" link="telepathy-glib-version.html#TP-VERSION-0-18:CAPS"/> |
5262 | 5263 | <keyword type="macro" name="TP_VERSION_0_20" link="telepathy-glib-version.html#TP-VERSION-0-20:CAPS"/> |
5264 | <keyword type="macro" name="TP_VERSION_0_22" link="telepathy-glib-version.html#TP-VERSION-0-22:CAPS"/> | |
5263 | 5265 | <keyword type="macro" name="TP_VERSION_MIN_REQUIRED" link="telepathy-glib-version.html#TP-VERSION-MIN-REQUIRED:CAPS"/> |
5264 | 5266 | <keyword type="macro" name="TP_VERSION_MAX_ALLOWED" link="telepathy-glib-version.html#TP-VERSION-MAX-ALLOWED:CAPS"/> |
5265 | 5267 | <keyword type="macro" name="tp_verify()" link="telepathy-glib-util.html#tp-verify" since="0.7.34"/> |
5291 | 5293 | <keyword type="function" name="tp_mixin_instance_get_offset ()" link="telepathy-glib-util.html#tp-mixin-instance-get-offset"/> |
5292 | 5294 | <keyword type="function" name="tp_escape_as_identifier ()" link="telepathy-glib-util.html#tp-escape-as-identifier"/> |
5293 | 5295 | <keyword type="function" name="tp_strv_contains ()" link="telepathy-glib-util.html#tp-strv-contains" since="0.7.15"/> |
5294 | <keyword type="function" name="tp_g_key_file_get_int64 ()" link="telepathy-glib-util.html#tp-g-key-file-get-int64" since="0.7.31"/> | |
5295 | <keyword type="function" name="tp_g_key_file_get_uint64 ()" link="telepathy-glib-util.html#tp-g-key-file-get-uint64" since="0.7.31"/> | |
5296 | <keyword type="function" name="tp_g_key_file_get_int64 ()" link="telepathy-glib-util.html#tp-g-key-file-get-int64" deprecated="Since 0.21.0. Use g_key_file_get_int64() instead." since="0.7.31"/> | |
5297 | <keyword type="function" name="tp_g_key_file_get_uint64 ()" link="telepathy-glib-util.html#tp-g-key-file-get-uint64" deprecated="Since 0.21.0. Use g_key_file_get_uint64() instead." since="0.7.31"/> | |
5296 | 5298 | <keyword type="function" name="tp_g_signal_connect_object ()" link="telepathy-glib-util.html#tp-g-signal-connect-object" since="0.9.2"/> |
5297 | 5299 | <keyword type="function" name="tp_value_array_build ()" link="telepathy-glib-util.html#tp-value-array-build" since="0.9.2"/> |
5298 | 5300 | <keyword type="function" name="tp_value_array_unpack ()" link="telepathy-glib-util.html#tp-value-array-unpack" since="0.11.0"/> |
9 | 9 | This manual documents telepathy-glib version &tpglibversion;. |
10 | 10 | The latest development version of this documentation can be found here: |
11 | 11 | <ulink role="online-location" url="http://telepathy.freedesktop.org/doc/telepathy-glib/">online copy of the telepathy-glib API Reference Manual</ulink>. |
12 | The latest version in this stable branch can be found here: | |
13 | <ulink role="online-location" url="http://telepathy.freedesktop.org/doc/telepathy-glib-0.20.x/">online copy of the telepathy-glib 0.20.x API Reference Manual</ulink>. | |
14 | 12 | </releaseinfo> |
15 | 13 | </bookinfo> |
16 | 14 |
43 | 43 | TP_VERSION_0_16 |
44 | 44 | TP_VERSION_0_18 |
45 | 45 | TP_VERSION_0_20 |
46 | TP_VERSION_0_22 | |
46 | 47 | TP_VERSION_MIN_REQUIRED |
47 | 48 | TP_VERSION_MAX_ALLOWED |
48 | 49 | <SUBSECTION Private> |
5 | 5 | |
6 | 6 | from gi.repository import Gio |
7 | 7 | from gi.repository import TelepathyGLib |
8 | ||
9 | import magic | |
10 | 8 | |
11 | 9 | def usage(): |
12 | 10 | print "%s FILE" % sys.argv[0] |
0 | #include "config.h" | |
1 | ||
0 | 2 | #include <telepathy-glib/telepathy-glib.h> |
1 | 3 | |
2 | 4 | static GMainLoop *loop = NULL; |
0 | #include "config.h" | |
1 | ||
0 | 2 | #include <telepathy-glib/telepathy-glib.h> |
1 | 3 | |
2 | 4 | static GMainLoop *loop = NULL; |
33 | 33 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
34 | 34 | */ |
35 | 35 | |
36 | #include "config.h" | |
37 | ||
36 | 38 | #include "call-channel.h" |
37 | 39 | |
38 | 40 | #include <string.h> |
1036 | 1036 | <method name="get_uri_schemes" |
1037 | 1037 | c:identifier="tp_account_get_uri_schemes" |
1038 | 1038 | version="0.13.8"> |
1039 | <doc xml:whitespace="preserve">If the %TP_ACCOUNT_FEATURE_ADDRESSING feature has been prepared | |
1040 | successfully, return a list of additional URI schemes for which this | |
1041 | account should be used if possible. Otherwise return %NULL. | |
1042 | ||
1043 | For instance, a SIP or Skype account might have "tel" in this list if the | |
1044 | user would like to use that account to call phone numbers. | |
1045 | ||
1046 | This list should not contain the primary URI scheme(s) for the account's | |
1047 | protocol (for instance, "xmpp" for XMPP, or "sip" or "sips" for SIP), | |
1048 | since it should be assumed to be useful for those schemes in any case.</doc> | |
1049 | <return-value transfer-ownership="none"> | |
1050 | <doc xml:whitespace="preserve">a list of URI schemes, or %NULL</doc> | |
1039 | <doc xml:whitespace="preserve">Return the #TpAccount:uri-schemes property</doc> | |
1040 | <return-value transfer-ownership="none"> | |
1041 | <doc xml:whitespace="preserve">the value of #TpAccount:uri_schemes property</doc> | |
1051 | 1042 | <array c:type="const gchar* const*"> |
1052 | 1043 | <type name="utf8"/> |
1053 | 1044 | </array> |
2450 | 2441 | This is not guaranteed to have been retrieved until the |
2451 | 2442 | %TP_ACCOUNT_FEATURE_CORE feature has been prepared; until then, |
2452 | 2443 | the value is NULL.</doc> |
2444 | <array> | |
2445 | <type name="utf8"/> | |
2446 | </array> | |
2447 | </property> | |
2448 | <property name="uri-schemes" version="0.21.0" transfer-ownership="none"> | |
2449 | <doc xml:whitespace="preserve">If the %TP_ACCOUNT_FEATURE_ADDRESSING feature has been prepared | |
2450 | successfully, a list of additional URI schemes for which this | |
2451 | account should be used if possible. Otherwise %NULL. | |
2452 | ||
2453 | For instance, a SIP or Skype account might have "tel" in this list if the | |
2454 | user would like to use that account to call phone numbers. | |
2455 | ||
2456 | This list should not contain the primary URI scheme(s) for the account's | |
2457 | protocol (for instance, "xmpp" for XMPP, or "sip" or "sips" for SIP), | |
2458 | since it should be assumed to be useful for those schemes in any case. | |
2459 | ||
2460 | The notify::uri-schemes signal cannot be relied on if the Account Manager | |
2461 | is Mission Control version 5.14.0 or older.</doc> | |
2453 | 2462 | <array> |
2454 | 2463 | <type name="utf8"/> |
2455 | 2464 | </array> |
36752 | 36761 | c:identifier="tp_g_key_file_get_int64" |
36753 | 36762 | version="0.7.31" |
36754 | 36763 | introspectable="0" |
36764 | deprecated="Since 0.21.0. Use g_key_file_get_int64() instead." | |
36755 | 36765 | throws="1"> |
36756 | 36766 | <doc xml:whitespace="preserve">Returns the value associated with @key under @group_name as a signed |
36757 | 36767 | 64-bit integer. This is similar to g_key_file_get_integer() but can return |
36779 | 36789 | c:identifier="tp_g_key_file_get_uint64" |
36780 | 36790 | version="0.7.31" |
36781 | 36791 | introspectable="0" |
36792 | deprecated="Since 0.21.0. Use g_key_file_get_uint64() instead." | |
36782 | 36793 | throws="1"> |
36783 | 36794 | <doc xml:whitespace="preserve">Returns the value associated with @key under @group_name as an unsigned |
36784 | 36795 | 64-bit integer. This is similar to g_key_file_get_integer() but can return |
180 | 180 | PROP_STORAGE_IDENTIFIER_VARIANT, |
181 | 181 | PROP_STORAGE_RESTRICTIONS, |
182 | 182 | PROP_SUPERSEDES, |
183 | PROP_URI_SCHEMES, | |
183 | 184 | N_PROPS |
184 | 185 | }; |
185 | 186 | |
1018 | 1019 | } |
1019 | 1020 | |
1020 | 1021 | static void |
1022 | addressing_props_changed (TpAccount *self, | |
1023 | GHashTable *changed_properties) | |
1024 | { | |
1025 | const gchar * const * v; | |
1026 | ||
1027 | if (self->priv->uri_schemes == NULL) | |
1028 | /* We did not fetch the initial value yet, ignoring */ | |
1029 | return; | |
1030 | ||
1031 | v = tp_asv_get_strv (changed_properties, "URISchemes"); | |
1032 | if (v == NULL) | |
1033 | return; | |
1034 | ||
1035 | g_strfreev (self->priv->uri_schemes); | |
1036 | self->priv->uri_schemes = g_strdupv ((GStrv) v); | |
1037 | ||
1038 | g_object_notify (G_OBJECT (self), "uri-schemes"); | |
1039 | } | |
1040 | ||
1041 | static void | |
1042 | dbus_properties_changed_cb (TpProxy *proxy, | |
1043 | const gchar *interface_name, | |
1044 | GHashTable *changed_properties, | |
1045 | const gchar **invalidated_properties, | |
1046 | gpointer user_data, | |
1047 | GObject *weak_object) | |
1048 | { | |
1049 | TpAccount *self = TP_ACCOUNT (weak_object); | |
1050 | ||
1051 | if (!tp_strdiff (interface_name, TP_IFACE_ACCOUNT_INTERFACE_ADDRESSING)) | |
1052 | { | |
1053 | addressing_props_changed (self, changed_properties); | |
1054 | } | |
1055 | } | |
1056 | ||
1057 | static void | |
1021 | 1058 | _tp_account_constructed (GObject *object) |
1022 | 1059 | { |
1023 | 1060 | TpAccount *self = TP_ACCOUNT (object); |
1056 | 1093 | |
1057 | 1094 | tp_cli_account_connect_to_account_property_changed (self, |
1058 | 1095 | _tp_account_properties_changed, NULL, NULL, object, NULL); |
1096 | ||
1097 | tp_cli_dbus_properties_connect_to_properties_changed (self, | |
1098 | dbus_properties_changed_cb, NULL, NULL, object, NULL); | |
1059 | 1099 | |
1060 | 1100 | tp_cli_dbus_properties_call_get_all (self, -1, TP_IFACE_ACCOUNT, |
1061 | 1101 | _tp_account_got_all_cb, NULL, NULL, G_OBJECT (self)); |
1148 | 1188 | case PROP_SUPERSEDES: |
1149 | 1189 | g_value_set_boxed (value, self->priv->supersedes); |
1150 | 1190 | break; |
1191 | case PROP_URI_SCHEMES: | |
1192 | g_value_set_boxed (value, self->priv->uri_schemes); | |
1193 | break; | |
1151 | 1194 | case PROP_AUTOMATIC_PRESENCE_TYPE: |
1152 | 1195 | g_value_set_uint (value, self->priv->auto_presence); |
1153 | 1196 | break; |
2029 | 2072 | G_PARAM_STATIC_STRINGS | G_PARAM_READABLE)); |
2030 | 2073 | |
2031 | 2074 | /** |
2075 | * TpAccount:uri-schemes: | |
2076 | * | |
2077 | * If the %TP_ACCOUNT_FEATURE_ADDRESSING feature has been prepared | |
2078 | * successfully, a list of additional URI schemes for which this | |
2079 | * account should be used if possible. Otherwise %NULL. | |
2080 | * | |
2081 | * For instance, a SIP or Skype account might have "tel" in this list if the | |
2082 | * user would like to use that account to call phone numbers. | |
2083 | * | |
2084 | * This list should not contain the primary URI scheme(s) for the account's | |
2085 | * protocol (for instance, "xmpp" for XMPP, or "sip" or "sips" for SIP), | |
2086 | * since it should be assumed to be useful for those schemes in any case. | |
2087 | * | |
2088 | * The notify::uri-schemes signal cannot be relied on if the Account Manager | |
2089 | * is Mission Control version 5.14.0 or older. | |
2090 | * | |
2091 | * Since: 0.21.0 | |
2092 | */ | |
2093 | g_object_class_install_property (object_class, PROP_URI_SCHEMES, | |
2094 | g_param_spec_boxed ("uri-schemes", | |
2095 | "URISchemes", | |
2096 | "URISchemes", | |
2097 | G_TYPE_STRV, | |
2098 | G_PARAM_STATIC_STRINGS | G_PARAM_READABLE)); | |
2099 | ||
2100 | /** | |
2032 | 2101 | * TpAccount::status-changed: |
2033 | 2102 | * @account: the #TpAccount |
2034 | 2103 | * @old_status: old #TpAccount:connection-status |
4224 | 4293 | * tp_account_get_uri_schemes: |
4225 | 4294 | * @self: a #TpAccount |
4226 | 4295 | * |
4227 | * If the %TP_ACCOUNT_FEATURE_ADDRESSING feature has been prepared | |
4228 | * successfully, return a list of additional URI schemes for which this | |
4229 | * account should be used if possible. Otherwise return %NULL. | |
4230 | * | |
4231 | * For instance, a SIP or Skype account might have "tel" in this list if the | |
4232 | * user would like to use that account to call phone numbers. | |
4233 | * | |
4234 | * This list should not contain the primary URI scheme(s) for the account's | |
4235 | * protocol (for instance, "xmpp" for XMPP, or "sip" or "sips" for SIP), | |
4236 | * since it should be assumed to be useful for those schemes in any case. | |
4237 | * | |
4238 | * Returns: (transfer none): a list of URI schemes, or %NULL | |
4296 | * Return the #TpAccount:uri-schemes property | |
4297 | * | |
4298 | * Returns: (transfer none): the value of #TpAccount:uri_schemes property | |
4239 | 4299 | * |
4240 | 4300 | * Since: 0.13.8 |
4241 | 4301 | */ |
2007 | 2007 | if (TP_IS_CONTACT_GROUP_LIST (self)) |
2008 | 2008 | { |
2009 | 2009 | GStrv groups = tp_base_contact_list_dup_groups (self); |
2010 | GHashTableIter h_iter; | |
2011 | gpointer channel; | |
2012 | 2010 | |
2013 | 2011 | tp_base_contact_list_groups_created (self, |
2014 | 2012 | (const gchar * const *) groups, -1); |
2022 | 2020 | (const gchar * const *) groups + i, 1, NULL, 0); |
2023 | 2021 | tp_handle_set_destroy (members); |
2024 | 2022 | } |
2025 | ||
2026 | g_hash_table_iter_init (&h_iter, self->priv->groups); | |
2027 | ||
2028 | while (g_hash_table_iter_next (&h_iter, NULL, &channel)) | |
2029 | tp_base_contact_list_announce_channel (self, channel, NULL); | |
2030 | 2023 | |
2031 | 2024 | g_strfreev (groups); |
2032 | 2025 | } |
1309 | 1309 | * refcycle completely. */ |
1310 | 1310 | if (self->priv->roster != NULL) |
1311 | 1311 | g_hash_table_remove_all (self->priv->roster); |
1312 | g_clear_object (&self->priv->self_contact); | |
1313 | tp_clear_pointer (&self->priv->blocked_contacts, g_ptr_array_unref); | |
1312 | 1314 | } |
1313 | 1315 | |
1314 | 1316 | static gboolean |
1630 | 1632 | } |
1631 | 1633 | |
1632 | 1634 | tp_clear_pointer (&self->priv->blocked_contacts, g_ptr_array_unref); |
1635 | g_clear_object (&self->priv->self_contact); | |
1633 | 1636 | |
1634 | 1637 | ((GObjectClass *) tp_connection_parent_class)->dispose (object); |
1635 | 1638 | } |
158 | 158 | #define TP_VERSION_0_16 (_TP_ENCODE_VERSION (0, 16)) |
159 | 159 | #define TP_VERSION_0_18 (_TP_ENCODE_VERSION (0, 18)) |
160 | 160 | #define TP_VERSION_0_20 (_TP_ENCODE_VERSION (0, 20)) |
161 | #define TP_VERSION_0_22 (_TP_ENCODE_VERSION (0, 22)) | |
161 | 162 | #define TP_VERSION_1_0 (_TP_ENCODE_VERSION (1, 0)) |
162 | 163 | |
163 | 164 | #if (TP_MINOR_VERSION == 99) |
219 | 220 | # define _TP_DEPRECATED_IN_0_20_FOR(f) /* nothing */ |
220 | 221 | #endif |
221 | 222 | |
223 | #if TP_VERSION_MIN_REQUIRED >= TP_VERSION_0_22 | |
224 | # define _TP_DEPRECATED_IN_0_22 _TP_DEPRECATED | |
225 | # define _TP_DEPRECATED_IN_0_22_FOR(f) _TP_DEPRECATED_FOR(f) | |
226 | #else | |
227 | # define _TP_DEPRECATED_IN_0_22 /* nothing */ | |
228 | # define _TP_DEPRECATED_IN_0_22_FOR(f) /* nothing */ | |
229 | #endif | |
230 | ||
222 | 231 | #if TP_VERSION_MIN_REQUIRED >= TP_VERSION_1_0 |
223 | 232 | # define _TP_DEPRECATED_IN_1_0 _TP_DEPRECATED |
224 | 233 | # define _TP_DEPRECATED_IN_1_0_FOR(f) _TP_DEPRECATED_FOR(f) |
251 | 260 | # define _TP_AVAILABLE_IN_0_20 _TP_UNAVAILABLE(0, 20) |
252 | 261 | #else |
253 | 262 | # define _TP_AVAILABLE_IN_0_20 /* nothing */ |
263 | #endif | |
264 | ||
265 | #if TP_VERSION_MAX_ALLOWED < TP_VERSION_0_22 | |
266 | # define _TP_AVAILABLE_IN_0_22 _TP_UNAVAILABLE(0, 22) | |
267 | #else | |
268 | # define _TP_AVAILABLE_IN_0_22 /* nothing */ | |
254 | 269 | #endif |
255 | 270 | |
256 | 271 | #if TP_VERSION_MAX_ALLOWED < TP_VERSION_1_0 |
463 | 463 | */ |
464 | 464 | |
465 | 465 | /** |
466 | * TP_VERSION_0_22: (skip) | |
467 | * | |
468 | * A constant representing the telepathy-glib 0.22 stable branch, | |
469 | * and the 0.21 development branch that led to it. | |
470 | */ | |
471 | ||
472 | /** | |
466 | 473 | * TP_VERSION_1_0: (skip) |
467 | 474 | * |
468 | 475 | * A constant representing the telepathy-glib 1.0 stable branch, |
1246 | 1246 | str_removed = group_flags_to_string (removed); |
1247 | 1247 | str_flags = group_flags_to_string (mixin->group_flags); |
1248 | 1248 | |
1249 | printf ("%s: emitting group flags changed\n" | |
1249 | DEBUG ("emitting group flags changed\n" | |
1250 | 1250 | " added : %s\n" |
1251 | 1251 | " removed : %s\n" |
1252 | 1252 | " flags now: %s\n", |
1253 | G_STRFUNC, str_added, str_removed, str_flags); | |
1254 | ||
1255 | fflush (stdout); | |
1253 | str_added, str_removed, str_flags); | |
1256 | 1254 | |
1257 | 1255 | g_free (str_added); |
1258 | 1256 | g_free (str_removed); |
1453 | 1451 | local_str = member_array_to_string (mixin->handle_repo, local_pending); |
1454 | 1452 | remote_str = member_array_to_string (mixin->handle_repo, remote_pending); |
1455 | 1453 | |
1456 | printf ("%s: emitting members changed\n" | |
1454 | DEBUG ("emitting members changed\n" | |
1457 | 1455 | " message : \"%s\"\n" |
1458 | 1456 | " added : %s\n" |
1459 | 1457 | " removed : %s\n" |
1461 | 1459 | " remote_pending: %s\n" |
1462 | 1460 | " actor : %u\n" |
1463 | 1461 | " reason : %u: %s\n", |
1464 | G_STRFUNC, message, add_str, rem_str, local_str, remote_str, | |
1462 | message, add_str, rem_str, local_str, remote_str, | |
1465 | 1463 | actor, reason, group_change_reason_str (reason)); |
1466 | ||
1467 | fflush (stdout); | |
1468 | 1464 | |
1469 | 1465 | g_free (add_str); |
1470 | 1466 | g_free (rem_str); |
890 | 890 | |
891 | 891 | prop_arr = g_ptr_array_sized_new (len); |
892 | 892 | |
893 | if (DEBUGGING) | |
894 | printf ("%s: emitting properties changed for propert%s:\n", | |
895 | G_STRFUNC, (len > 1) ? "ies" : "y"); | |
893 | DEBUG ("emitting properties changed for propert%s:\n", | |
894 | (len > 1) ? "ies" : "y"); | |
896 | 895 | |
897 | 896 | tp_intset_fast_iter_init (&iter, props); |
898 | 897 | |
911 | 910 | |
912 | 911 | g_ptr_array_add (prop_arr, g_value_get_boxed (&prop_val)); |
913 | 912 | |
914 | if (DEBUGGING) | |
915 | printf (" %s\n", mixin_cls->signatures[prop_id].name); | |
916 | } | |
917 | ||
918 | if (DEBUGGING) | |
919 | { | |
920 | fflush (stdout); | |
913 | DEBUG (" %s\n", mixin_cls->signatures[prop_id].name); | |
921 | 914 | } |
922 | 915 | |
923 | 916 | tp_svc_properties_interface_emit_properties_changed ( |
957 | 950 | |
958 | 951 | prop_arr = g_ptr_array_sized_new (len); |
959 | 952 | |
960 | if (DEBUGGING) | |
961 | printf ("%s: emitting properties flags changed for propert%s:\n", | |
962 | G_STRFUNC, (len > 1) ? "ies" : "y"); | |
953 | DEBUG ("emitting properties flags changed for propert%s:\n", | |
954 | (len > 1) ? "ies" : "y"); | |
963 | 955 | |
964 | 956 | tp_intset_fast_iter_init (&iter, props); |
965 | 957 | |
986 | 978 | { |
987 | 979 | gchar *str_flags = property_flags_to_string (prop_flags); |
988 | 980 | |
989 | printf (" %s's flags now: %s\n", | |
981 | DEBUG (" %s's flags now: %s\n", | |
990 | 982 | mixin_cls->signatures[prop_id].name, str_flags); |
991 | 983 | |
992 | 984 | g_free (str_flags); |
993 | 985 | } |
994 | } | |
995 | ||
996 | if (DEBUGGING) | |
997 | { | |
998 | fflush (stdout); | |
999 | 986 | } |
1000 | 987 | |
1001 | 988 | tp_svc_properties_interface_emit_property_flags_changed ( |
1266 | 1266 | case 'u': |
1267 | 1267 | case 't': |
1268 | 1268 | { |
1269 | guint64 v = tp_g_key_file_get_uint64 (file, group, key, &error); | |
1269 | guint64 v = g_key_file_get_uint64 (file, group, key, &error); | |
1270 | 1270 | |
1271 | 1271 | if (error != NULL) |
1272 | 1272 | { |
1307 | 1307 | } |
1308 | 1308 | else |
1309 | 1309 | { |
1310 | gint64 v = tp_g_key_file_get_int64 (file, group, key, &error); | |
1310 | gint64 v = g_key_file_get_int64 (file, group, key, &error); | |
1311 | 1311 | |
1312 | 1312 | if (error != NULL) |
1313 | 1313 | { |
5 | 5 | Name: Telepathy-GLib (uninstalled copy) |
6 | 6 | Description: GLib utility library for the Telepathy framework |
7 | 7 | Version: @VERSION@ |
8 | Requires: pkg-config >= 0.21 | |
9 | 8 | Requires.private: dbus-1 >= 0.95, dbus-glib-1 >= 0.90, glib-2.0 >= 2.30, gobject-2.0 >= 2.30, gio-2.0 >= 2.30 |
10 | 9 | Libs: ${abs_top_builddir}/telepathy-glib/libtelepathy-glib.la |
11 | 10 | Cflags: -I${abs_top_srcdir} -I${abs_top_builddir} |
5 | 5 | Name: Telepathy-GLib |
6 | 6 | Description: GLib utility library for the Telepathy framework |
7 | 7 | Version: @VERSION@ |
8 | Requires: pkg-config >= 0.21 | |
9 | 8 | Requires.private: dbus-1 >= 0.95, dbus-glib-1 >= 0.90, glib-2.0 >= 2.30, gobject-2.0 >= 2.30, gio-2.0 >= 2.30 |
10 | 9 | Libs: -L${libdir} -ltelepathy-glib |
11 | 10 | Cflags: -I${includedir}/telepathy-1.0 |
719 | 719 | } |
720 | 720 | |
721 | 721 | static void |
722 | tp_text_channel_prepare_pending_messages_async (TpProxy *proxy, | |
722 | tp_text_channel_prepare_incoming_messages_async (TpProxy *proxy, | |
723 | 723 | const TpProxyFeature *feature, |
724 | 724 | GAsyncReadyCallback callback, |
725 | 725 | gpointer user_data) |
750 | 750 | g_assert (self->priv->pending_messages_result == NULL); |
751 | 751 | self->priv->pending_messages_result = g_simple_async_result_new ( |
752 | 752 | (GObject *) proxy, callback, user_data, |
753 | tp_text_channel_prepare_pending_messages_async); | |
753 | tp_text_channel_prepare_incoming_messages_async); | |
754 | 754 | |
755 | 755 | |
756 | 756 | tp_cli_dbus_properties_call_get (proxy, -1, |
841 | 841 | } |
842 | 842 | |
843 | 843 | enum { |
844 | FEAT_PENDING_MESSAGES, | |
844 | FEAT_INCOMING_MESSAGES, | |
845 | 845 | FEAT_SMS, |
846 | 846 | FEAT_CHAT_STATES, |
847 | 847 | N_FEAT |
857 | 857 | if (G_LIKELY (features[0].name != 0)) |
858 | 858 | return features; |
859 | 859 | |
860 | features[FEAT_PENDING_MESSAGES].name = | |
860 | features[FEAT_INCOMING_MESSAGES].name = | |
861 | 861 | TP_TEXT_CHANNEL_FEATURE_INCOMING_MESSAGES; |
862 | features[FEAT_PENDING_MESSAGES].prepare_async = | |
863 | tp_text_channel_prepare_pending_messages_async; | |
862 | features[FEAT_INCOMING_MESSAGES].prepare_async = | |
863 | tp_text_channel_prepare_incoming_messages_async; | |
864 | 864 | |
865 | 865 | features[FEAT_SMS].name = |
866 | 866 | TP_TEXT_CHANNEL_FEATURE_SMS; |
828 | 828 | * 0 if the key was not found or could not be parsed. |
829 | 829 | * |
830 | 830 | * Since: 0.7.31 |
831 | * Deprecated: Since 0.21.0. Use g_key_file_get_int64() instead. | |
831 | 832 | */ |
832 | 833 | gint64 |
833 | 834 | tp_g_key_file_get_int64 (GKeyFile *key_file, |
876 | 877 | * or 0 if the key was not found or could not be parsed. |
877 | 878 | * |
878 | 879 | * Since: 0.7.31 |
880 | * Deprecated: Since 0.21.0. Use g_key_file_get_uint64() instead. | |
879 | 881 | */ |
880 | 882 | guint64 |
881 | 883 | tp_g_key_file_get_uint64 (GKeyFile *key_file, |
28 | 28 | |
29 | 29 | #include <gio/gio.h> |
30 | 30 | |
31 | #include <telepathy-glib/defs.h> | |
31 | 32 | #include <telepathy-glib/verify.h> |
32 | 33 | |
33 | 34 | #define tp_verify_statement(R) ((void) tp_verify_true (R)) |
74 | 75 | void tp_g_hash_table_update (GHashTable *target, GHashTable *source, |
75 | 76 | GBoxedCopyFunc key_dup, GBoxedCopyFunc value_dup); |
76 | 77 | |
78 | /* See https://bugzilla.gnome.org/show_bug.cgi?id=399880 for glib inclusion */ | |
77 | 79 | static inline gboolean |
78 | 80 | tp_str_empty (const gchar *s) |
79 | 81 | { |
80 | 82 | return (s == NULL || s[0] == '\0'); |
81 | 83 | } |
82 | 84 | |
85 | /* See https://bugzilla.gnome.org/show_bug.cgi?id=685878 for glib inclusion */ | |
83 | 86 | gboolean tp_strdiff (const gchar *left, const gchar *right); |
84 | 87 | |
85 | 88 | gpointer tp_mixin_offset_cast (gpointer instance, guint offset); |
88 | 91 | |
89 | 92 | gchar *tp_escape_as_identifier (const gchar *name) G_GNUC_WARN_UNUSED_RESULT; |
90 | 93 | |
94 | /* See https://bugzilla.gnome.org/show_bug.cgi?id=685880 for glib inclusion */ | |
91 | 95 | gboolean tp_strv_contains (const gchar * const *strv, const gchar *str); |
92 | 96 | |
97 | #ifndef TP_DISABLE_DEPRECATED | |
98 | _TP_DEPRECATED_IN_0_22_FOR(g_key_file_get_int64) | |
93 | 99 | gint64 tp_g_key_file_get_int64 (GKeyFile *key_file, const gchar *group_name, |
94 | 100 | const gchar *key, GError **error); |
101 | _TP_DEPRECATED_IN_0_22_FOR(g_key_file_get_uint64) | |
95 | 102 | guint64 tp_g_key_file_get_uint64 (GKeyFile *key_file, const gchar *group_name, |
96 | 103 | const gchar *key, GError **error); |
104 | #endif | |
97 | 105 | |
106 | /* g_signal_connect_object() has been fixed in GLib 2.36, we can deprecate this | |
107 | * once we depend on that version. */ | |
98 | 108 | gulong tp_g_signal_connect_object (gpointer instance, |
99 | 109 | const gchar *detailed_signal, GCallback c_handler, gpointer gobject, |
100 | 110 | GConnectFlags connect_flags); |
106 | 116 | gsize len, |
107 | 117 | ...); |
108 | 118 | |
119 | /* See https://bugzilla.gnome.org/show_bug.cgi?id=680813 for glib inclusion */ | |
109 | 120 | typedef struct _TpWeakRef TpWeakRef; |
110 | 121 | TpWeakRef *tp_weak_ref_new (gpointer object, |
111 | 122 | gpointer user_data, |
149 | 160 | gboolean tp_user_action_time_should_present (gint64 user_action_time, |
150 | 161 | guint32 *x11_time); |
151 | 162 | |
163 | /* See https://bugzilla.gnome.org/show_bug.cgi?id=610969 for glib inclusion */ | |
152 | 164 | gchar *tp_utf8_make_valid (const gchar *name); |
153 | 165 | |
154 | 166 | G_END_DECLS |
613 | 613 | } |
614 | 614 | |
615 | 615 | static void |
616 | check_uri_schemes (const gchar * const * schemes) | |
617 | { | |
618 | g_assert (schemes != NULL); | |
619 | g_assert (tp_strv_contains (schemes, "about")); | |
620 | g_assert (tp_strv_contains (schemes, "telnet")); | |
621 | g_assert (schemes[2] == NULL); | |
622 | } | |
623 | ||
624 | static void | |
625 | notify_cb (GObject *object, | |
626 | GParamSpec *spec, | |
627 | Test *test) | |
628 | { | |
629 | g_main_loop_quit (test->mainloop); | |
630 | } | |
631 | ||
632 | static void | |
616 | 633 | test_addressing (Test *test, |
617 | 634 | gconstpointer mode) |
618 | 635 | { |
619 | 636 | GQuark account_features[] = { TP_ACCOUNT_FEATURE_ADDRESSING, 0 }; |
620 | 637 | const gchar * const *schemes; |
638 | GStrv tmp; | |
621 | 639 | |
622 | 640 | test->account = tp_account_new (test->dbus, ACCOUNT_PATH, NULL); |
623 | 641 | g_assert (test->account != NULL); |
644 | 662 | g_main_loop_run (test->mainloop); |
645 | 663 | |
646 | 664 | schemes = tp_account_get_uri_schemes (test->account); |
647 | g_assert (schemes != NULL); | |
648 | g_assert (tp_strv_contains (schemes, "about")); | |
649 | g_assert (tp_strv_contains (schemes, "telnet")); | |
650 | g_assert (schemes[2] == NULL); | |
665 | check_uri_schemes (schemes); | |
666 | ||
667 | g_object_get (test->account, | |
668 | "uri-schemes", &tmp, | |
669 | NULL); | |
670 | ||
671 | check_uri_schemes ((const gchar * const *) tmp); | |
672 | g_strfreev (tmp); | |
651 | 673 | |
652 | 674 | g_assert (tp_account_associated_with_uri_scheme (test->account, |
653 | 675 | "about")); |
656 | 678 | g_assert (!tp_account_associated_with_uri_scheme (test->account, |
657 | 679 | "xmpp")); |
658 | 680 | |
681 | g_signal_connect (test->account, "notify::uri-schemes", | |
682 | G_CALLBACK (notify_cb), test); | |
683 | ||
684 | tp_tests_simple_account_add_uri_scheme (test->account_service, "xmpp"); | |
685 | g_main_loop_run (test->mainloop); | |
686 | ||
687 | g_assert (tp_account_associated_with_uri_scheme (test->account, | |
688 | "xmpp")); | |
659 | 689 | } |
660 | 690 | |
661 | 691 | static void |
17 | 17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
18 | 18 | */ |
19 | 19 | |
20 | #include "config.h" | |
21 | ||
20 | 22 | #include <telepathy-glib/telepathy-glib.h> |
21 | 23 | #include <telepathy-glib/proxy-subclass.h> |
22 | 24 |
12 | 12 | #include <telepathy-glib/connection.h> |
13 | 13 | |
14 | 14 | #include "examples/cm/contactlist/conn.h" |
15 | #include "tests/lib/debug.h" | |
15 | 16 | #include "tests/lib/util.h" |
16 | 17 | |
17 | 18 | typedef enum { |
95 | 96 | GHashTable *contact_attributes; |
96 | 97 | |
97 | 98 | GMainLoop *main_loop; |
99 | GError *error /* = NULL */; | |
98 | 100 | } Test; |
99 | 101 | |
100 | 102 | static void |
363 | 365 | } |
364 | 366 | |
365 | 367 | static void |
366 | setup (Test *test, | |
367 | gconstpointer data) | |
368 | test_connect_and_finish_setup (Test *test) | |
368 | 369 | { |
369 | 370 | GQuark features[] = { TP_CONNECTION_FEATURE_CONNECTED, 0 }; |
370 | ||
371 | setup_pre_connect (test, data); | |
372 | 371 | |
373 | 372 | tp_cli_connection_call_connect (test->conn, -1, NULL, NULL, NULL, NULL); |
374 | 373 | tp_tests_proxy_run_until_prepared (test->conn, features); |
424 | 423 | } |
425 | 424 | |
426 | 425 | static void |
426 | setup (Test *test, | |
427 | gconstpointer data) | |
428 | { | |
429 | setup_pre_connect (test, data); | |
430 | test_connect_and_finish_setup (test); | |
431 | } | |
432 | ||
433 | static void | |
427 | 434 | test_clear_log (Test *test) |
428 | 435 | { |
429 | 436 | g_ptr_array_foreach (test->log, (GFunc) log_entry_free, NULL); |
442 | 449 | tp_clear_object (&test->conn); |
443 | 450 | tp_clear_object (&test->dbus); |
444 | 451 | tp_clear_pointer (&test->main_loop, g_main_loop_unref); |
452 | g_clear_error (&test->error); | |
445 | 453 | } |
446 | 454 | |
447 | 455 | static void |
676 | 684 | } |
677 | 685 | |
678 | 686 | static void |
687 | expect_cambridge_once_cb (TpConnection *conn, | |
688 | const GPtrArray *channels, | |
689 | gpointer user_data, | |
690 | GObject *weak_object G_GNUC_UNUSED) | |
691 | { | |
692 | Test *test = user_data; | |
693 | GValueArray *va; | |
694 | const gchar *object_path; | |
695 | GHashTable *properties; | |
696 | ||
697 | g_assert_cmpuint (channels->len, ==, 1); | |
698 | va = g_ptr_array_index (channels, 0); | |
699 | object_path = g_value_get_boxed (va->values + 0); | |
700 | properties = g_value_get_boxed (va->values + 1); | |
701 | ||
702 | if (tp_asv_get_uint32 (properties, TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, NULL) | |
703 | != TP_HANDLE_TYPE_GROUP || | |
704 | tp_strdiff (tp_asv_get_string (properties, TP_PROP_CHANNEL_CHANNEL_TYPE), | |
705 | TP_IFACE_CHANNEL_TYPE_CONTACT_LIST) || | |
706 | tp_strdiff (tp_asv_get_string (properties, TP_PROP_CHANNEL_TARGET_ID), | |
707 | "Cambridge")) | |
708 | { | |
709 | /* either this is not a ContactList, or it's a LIST ContactList, | |
710 | * or it's one of the other groups - Montreal or Francophones. | |
711 | * Either way, it's not interesting right now. */ | |
712 | DEBUG ("NewChannels not for Cambridge group, ignoring"); | |
713 | return; | |
714 | } | |
715 | ||
716 | DEBUG ("NewChannels for Cambridge group"); | |
717 | /* the Cambridge group should only be created once (fd.o #52011) */ | |
718 | g_assert (test->group == NULL); | |
719 | ||
720 | test->group = tp_simple_client_factory_ensure_channel ( | |
721 | tp_proxy_get_factory (conn), | |
722 | conn, object_path, properties, &test->error); | |
723 | g_assert_no_error (test->error); | |
724 | } | |
725 | ||
726 | static void | |
679 | 727 | test_initial_channels (Test *test, |
680 | 728 | gconstpointer nil G_GNUC_UNUSED) |
681 | 729 | { |
730 | TpProxySignalConnection *new_channels_sig; | |
731 | ||
732 | /* legacy interface for the Group channels */ | |
733 | new_channels_sig = tp_cli_connection_interface_requests_connect_to_new_channels ( | |
734 | test->conn, expect_cambridge_once_cb, test, NULL, NULL, &test->error); | |
735 | g_assert_no_error (test->error); | |
736 | ||
737 | test_connect_and_finish_setup (test); | |
738 | ||
682 | 739 | test->publish = test_ensure_channel (test, TP_HANDLE_TYPE_LIST, "publish"); |
683 | 740 | test->subscribe = test_ensure_channel (test, TP_HANDLE_TYPE_LIST, |
684 | 741 | "subscribe"); |
743 | 800 | ==, 0); |
744 | 801 | g_assert (tp_intset_is_member (tp_channel_group_get_members (test->deny), |
745 | 802 | test->bill)); |
803 | ||
804 | /* the Cambridge group was announced (fd.o #52011) */ | |
805 | tp_tests_proxy_run_until_dbus_queue_processed (test->conn); | |
806 | tp_proxy_signal_connection_disconnect (new_channels_sig); | |
807 | g_assert (TP_IS_CHANNEL (test->group)); | |
746 | 808 | } |
747 | 809 | |
748 | 810 | static void |
2687 | 2749 | Test, NULL, setup, test_nothing, teardown); |
2688 | 2750 | |
2689 | 2751 | g_test_add ("/contact-lists/initial-channels", |
2690 | Test, NULL, setup, test_initial_channels, teardown); | |
2752 | Test, NULL, setup_pre_connect, test_initial_channels, teardown); | |
2691 | 2753 | g_test_add ("/contact-lists/properties", |
2692 | 2754 | Test, NULL, setup, test_properties, teardown); |
2693 | 2755 | g_test_add ("/contact-lists/contacts", |
358 | 358 | &result, finish, NULL); |
359 | 359 | g_main_loop_run (result.loop); |
360 | 360 | g_assert_no_error (result.error); |
361 | g_object_ref (g_ptr_array_index (result.contacts, 0)); | |
362 | 361 | reset_result (&result); |
363 | 362 | |
364 | 363 | tp_connection_set_contact_info_async (client_conn, info_list, |
1499 | 1498 | &result, finish, NULL); |
1500 | 1499 | g_main_loop_run (result.loop); |
1501 | 1500 | g_assert_no_error (result.error); |
1502 | reset_result (&f->result); | |
1501 | reset_result (&result); | |
1503 | 1502 | |
1504 | 1503 | put_the_connection_back (f); |
1505 | 1504 | |
2243 | 2242 | g_assert (contact != alice); |
2244 | 2243 | g_assert_cmpstr (tp_contact_get_identifier (contact), ==, "bob"); |
2245 | 2244 | g_assert_cmpuint (tp_contact_get_handle (contact), ==, bob_handle); |
2245 | g_object_unref (contact); | |
2246 | g_object_unref (alice); | |
2246 | 2247 | } |
2247 | 2248 | |
2248 | 2249 | typedef struct |
2691 | 2692 | gconstpointer unused G_GNUC_UNUSED) |
2692 | 2693 | { |
2693 | 2694 | const GQuark conn_features[] = { TP_CONNECTION_FEATURE_CONTACT_LIST, 0 }; |
2695 | const GQuark feature_connected[] = { TP_CONNECTION_FEATURE_CONNECTED, 0 }; | |
2694 | 2696 | Result result = { g_main_loop_new (NULL, FALSE), NULL, NULL, NULL }; |
2695 | 2697 | TpTestsContactListManager *manager; |
2696 | 2698 | TpSimpleClientFactory *factory; |
2732 | 2734 | g_signal_connect_swapped (f->client_conn, "notify::contact-list-state", |
2733 | 2735 | G_CALLBACK (finish), &result); |
2734 | 2736 | tp_cli_connection_call_connect (f->client_conn, -1, NULL, NULL, NULL, NULL); |
2735 | g_main_loop_run (result.loop); | |
2736 | g_assert_no_error (result.error); | |
2737 | tp_tests_proxy_run_until_prepared (f->client_conn, feature_connected); | |
2737 | 2738 | |
2738 | 2739 | g_assert_cmpint (tp_connection_get_contact_list_state (f->client_conn), ==, |
2739 | 2740 | TP_CONTACT_LIST_STATE_SUCCESS); |
2831 | 2832 | dbus_message_get_path (msg), TP_IFACE_CHANNEL_INTERFACE_GROUP, |
2832 | 2833 | TP_HANDLE_TYPE_LIST, 0, NULL); |
2833 | 2834 | tp_proxy_prepare_async (channel, NULL, channel_prepared_cb, closure); |
2835 | g_object_unref (channel); | |
2834 | 2836 | |
2835 | 2837 | /* Extract the number of added handles */ |
2836 | 2838 | dbus_message_iter_init (msg, &iter); |
2854 | 2856 | gconstpointer unused G_GNUC_UNUSED) |
2855 | 2857 | { |
2856 | 2858 | const GQuark conn_features[] = { TP_CONNECTION_FEATURE_CONTACT_LIST, 0 }; |
2859 | const GQuark feature_connected[] = { TP_CONNECTION_FEATURE_CONNECTED, 0 }; | |
2857 | 2860 | TpTestsContactListManager *manager; |
2858 | 2861 | MembersChangedClosure closure; |
2859 | 2862 | DBusConnection *dbus_connection; |
2901 | 2904 | tp_cli_connection_call_connect (f->client_conn, -1, |
2902 | 2905 | NULL, NULL, NULL, NULL); |
2903 | 2906 | |
2904 | g_main_loop_run (closure.loop); | |
2907 | tp_tests_proxy_run_until_prepared (f->client_conn, feature_connected); | |
2905 | 2908 | |
2906 | 2909 | dbus_bus_remove_match (dbus_connection, MEMBERS_CHANGED_MATCH_RULE, NULL); |
2907 | 2910 | dbus_connection_remove_filter (dbus_connection, message_filter, &closure); |
2973 | 2976 | gconstpointer unused G_GNUC_UNUSED) |
2974 | 2977 | { |
2975 | 2978 | if (f->client_conn != NULL) |
2976 | tp_tests_connection_assert_disconnect_succeeds (f->client_conn); | |
2977 | ||
2978 | tp_clear_object (&f->client_conn); | |
2979 | { | |
2980 | TpConnection *conn = f->client_conn; | |
2981 | ||
2982 | g_object_add_weak_pointer ((GObject *) conn, (gpointer *) &conn); | |
2983 | tp_tests_connection_assert_disconnect_succeeds (conn); | |
2984 | g_object_unref (conn); | |
2985 | g_assert (conn == NULL); | |
2986 | f->client_conn = NULL; | |
2987 | } | |
2988 | ||
2979 | 2989 | f->service_repo = NULL; |
2980 | 2990 | tp_clear_object (&f->service_conn); |
2981 | 2991 | tp_clear_object (&f->base_connection); |
79 | 79 | gchar *presence_msg; |
80 | 80 | gchar *connection_path; |
81 | 81 | gboolean enabled; |
82 | GPtrArray *uri_schemes; | |
82 | 83 | }; |
83 | 84 | |
84 | 85 | static void |
121 | 122 | #undef IMPLEMENT |
122 | 123 | } |
123 | 124 | |
125 | /* you may have noticed this is not entirely realistic */ | |
126 | static const gchar * const uri_schemes[] = { "about", "telnet", NULL }; | |
124 | 127 | |
125 | 128 | static void |
126 | 129 | tp_tests_simple_account_init (TpTestsSimpleAccount *self) |
127 | 130 | { |
131 | guint i; | |
132 | ||
128 | 133 | self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, TP_TESTS_TYPE_SIMPLE_ACCOUNT, |
129 | 134 | TpTestsSimpleAccountPrivate); |
130 | 135 | |
133 | 138 | self->priv->presence_msg = g_strdup ("this is my CurrentPresence"); |
134 | 139 | self->priv->connection_path = g_strdup ("/"); |
135 | 140 | self->priv->enabled = TRUE; |
136 | } | |
137 | ||
138 | /* you may have noticed this is not entirely realistic */ | |
139 | static const gchar * const uri_schemes[] = { "about", "telnet", NULL }; | |
141 | ||
142 | self->priv->uri_schemes = g_ptr_array_new_with_free_func (g_free); | |
143 | for (i = 0; uri_schemes[i] != NULL; i++) | |
144 | g_ptr_array_add (self->priv->uri_schemes, g_strdup (uri_schemes[i])); | |
145 | } | |
140 | 146 | |
141 | 147 | static void |
142 | 148 | tp_tests_simple_account_get_property (GObject *object, |
230 | 236 | TP_STORAGE_RESTRICTION_FLAG_CANNOT_SET_PARAMETERS); |
231 | 237 | break; |
232 | 238 | case PROP_URI_SCHEMES: |
233 | g_value_set_boxed (value, uri_schemes); | |
239 | { | |
240 | GPtrArray *arr; | |
241 | guint i; | |
242 | ||
243 | arr = g_ptr_array_sized_new (self->priv->uri_schemes->len + 1); | |
244 | for (i = 0; i < self->priv->uri_schemes->len; i++) | |
245 | g_ptr_array_add (arr, | |
246 | g_ptr_array_index (self->priv->uri_schemes, i)); | |
247 | g_ptr_array_add (arr, NULL); | |
248 | ||
249 | g_value_set_boxed (value, arr->pdata); | |
250 | g_ptr_array_unref (arr); | |
251 | } | |
234 | 252 | break; |
235 | 253 | case PROP_AVATAR: |
236 | 254 | { |
272 | 290 | g_free (self->priv->presence_status); |
273 | 291 | g_free (self->priv->presence_msg); |
274 | 292 | g_free (self->priv->connection_path); |
293 | ||
294 | g_ptr_array_unref (self->priv->uri_schemes); | |
275 | 295 | |
276 | 296 | G_OBJECT_CLASS (tp_tests_simple_account_parent_class)->finalize (object); |
277 | 297 | } |
577 | 597 | tp_svc_account_emit_account_property_changed (self, change); |
578 | 598 | g_hash_table_unref (change); |
579 | 599 | } |
600 | ||
601 | void | |
602 | tp_tests_simple_account_add_uri_scheme (TpTestsSimpleAccount *self, | |
603 | const gchar *uri_scheme) | |
604 | { | |
605 | GHashTable *changed; | |
606 | GStrv schemes; | |
607 | ||
608 | g_ptr_array_add (self->priv->uri_schemes, g_strdup (uri_scheme)); | |
609 | ||
610 | g_object_get (self, "uri-schemes", &schemes, NULL); | |
611 | ||
612 | changed = tp_asv_new ( | |
613 | "URISchemes", G_TYPE_STRV, schemes, | |
614 | NULL); | |
615 | ||
616 | tp_svc_dbus_properties_emit_properties_changed (self, | |
617 | TP_IFACE_ACCOUNT_INTERFACE_ADDRESSING, changed, NULL); | |
618 | ||
619 | g_strfreev (schemes); | |
620 | g_hash_table_unref (changed); | |
621 | } |
63 | 63 | void tp_tests_simple_account_set_enabled (TpTestsSimpleAccount *self, |
64 | 64 | gboolean enabled); |
65 | 65 | |
66 | void tp_tests_simple_account_add_uri_scheme (TpTestsSimpleAccount *self, | |
67 | const gchar * uri_scheme); | |
68 | ||
66 | 69 | G_END_DECLS |
67 | 70 | |
68 | 71 | #endif /* #ifndef __TP_TESTS_SIMPLE_ACCOUNT_H__ */ |
2 | 2 | from sys import argv, stdout, stderr |
3 | 3 | import xml.dom.minidom |
4 | 4 | |
5 | from libtpcodegen import file_set_contents | |
5 | from libtpcodegen import file_set_contents, u | |
6 | 6 | from libglibcodegen import NS_TP, get_docstring, \ |
7 | 7 | get_descendant_text, get_by_path |
8 | 8 | |
11 | 11 | self.prefix = prefix + '_' |
12 | 12 | self.spec = get_by_path(dom, "spec")[0] |
13 | 13 | |
14 | self.output_base = output_base | |
14 | self.output_base = output_base | |
15 | 15 | self.__header = [] |
16 | 16 | self.__docs = [] |
17 | 17 | |
20 | 20 | self.do_body() |
21 | 21 | self.do_footer() |
22 | 22 | |
23 | file_set_contents(self.output_base + '.h', ''.join(self.__header)) | |
24 | file_set_contents(self.output_base + '-gtk-doc.h', ''.join(self.__docs)) | |
23 | file_set_contents(self.output_base + '.h', u('').join(self.__header).encode('utf-8')) | |
24 | file_set_contents(self.output_base + '-gtk-doc.h', u('').join(self.__docs).encode('utf-8')) | |
25 | 25 | |
26 | 26 | def write(self, code): |
27 | self.__header.append(code.encode('utf-8')) | |
27 | self.__header.append(code) | |
28 | 28 | |
29 | 29 | def d(self, code): |
30 | self.__docs.append(code.encode('utf-8')) | |
30 | self.__docs.append(code) | |
31 | 31 | |
32 | 32 | # Header |
33 | 33 | def do_header(self): |
26 | 26 | import xml.dom.minidom |
27 | 27 | from getopt import gnu_getopt |
28 | 28 | |
29 | from libtpcodegen import file_set_contents | |
30 | from libglibcodegen import Signature, type_to_gtype, cmp_by_name, \ | |
29 | from libtpcodegen import file_set_contents, key_by_name, u | |
30 | from libglibcodegen import Signature, type_to_gtype, \ | |
31 | 31 | get_docstring, xml_escape, get_deprecated |
32 | 32 | |
33 | 33 | |
73 | 73 | self.guard = opts.get('--guard', None) |
74 | 74 | |
75 | 75 | def h(self, s): |
76 | if isinstance(s, unicode): | |
77 | s = s.encode('utf-8') | |
78 | 76 | self.__header.append(s) |
79 | 77 | |
80 | 78 | def b(self, s): |
81 | if isinstance(s, unicode): | |
82 | s = s.encode('utf-8') | |
83 | 79 | self.__body.append(s) |
84 | 80 | |
85 | 81 | def d(self, s): |
86 | if isinstance(s, unicode): | |
87 | s = s.encode('utf-8') | |
88 | 82 | self.__docs.append(s) |
89 | 83 | |
90 | 84 | def get_iface_quark(self): |
1190 | 1184 | self.b('') |
1191 | 1185 | |
1192 | 1186 | nodes = self.dom.getElementsByTagName('node') |
1193 | nodes.sort(cmp_by_name) | |
1187 | nodes.sort(key=key_by_name) | |
1194 | 1188 | |
1195 | 1189 | for node in nodes: |
1196 | 1190 | self.do_interface(node) |
1243 | 1237 | self.h('#endif /* defined (%s) */' % self.guard) |
1244 | 1238 | self.h('') |
1245 | 1239 | |
1246 | file_set_contents(self.basename + '.h', '\n'.join(self.__header)) | |
1247 | file_set_contents(self.basename + '-body.h', '\n'.join(self.__body)) | |
1248 | file_set_contents(self.basename + '-gtk-doc.h', '\n'.join(self.__docs)) | |
1240 | file_set_contents(self.basename + '.h', u('\n').join(self.__header).encode('utf-8')) | |
1241 | file_set_contents(self.basename + '-body.h', u('\n').join(self.__body).encode('utf-8')) | |
1242 | file_set_contents(self.basename + '-gtk-doc.h', u('\n').join(self.__docs).encode('utf-8')) | |
1249 | 1243 | |
1250 | 1244 | def types_to_gtypes(types): |
1251 | 1245 | return [type_to_gtype(t)[1] for t in types] |
30 | 30 | for signal in signals: |
31 | 31 | self.do_signal(signal) |
32 | 32 | |
33 | print 'void' | |
34 | print '%s_register_dbus_glib_marshallers (void)' % self.prefix | |
35 | print '{' | |
33 | print('void') | |
34 | print('%s_register_dbus_glib_marshallers (void)' % self.prefix) | |
35 | print('{') | |
36 | 36 | |
37 | all = self.marshallers.keys() | |
37 | all = list(self.marshallers.keys()) | |
38 | 38 | all.sort() |
39 | 39 | for marshaller in all: |
40 | 40 | rhs = self.marshallers[marshaller] |
41 | 41 | |
42 | print ' dbus_g_object_register_marshaller (' | |
43 | print ' g_cclosure_marshal_generic,' | |
44 | print ' G_TYPE_NONE, /* return */' | |
42 | print(' dbus_g_object_register_marshaller (') | |
43 | print(' g_cclosure_marshal_generic,') | |
44 | print(' G_TYPE_NONE, /* return */') | |
45 | 45 | for type in rhs: |
46 | print ' G_TYPE_%s,' % type.replace('VOID', 'NONE') | |
47 | print ' G_TYPE_INVALID);' | |
46 | print(' G_TYPE_%s,' % type.replace('VOID', 'NONE')) | |
47 | print(' G_TYPE_INVALID);') | |
48 | 48 | |
49 | print '}' | |
49 | print('}') | |
50 | 50 | |
51 | 51 | |
52 | 52 | def types_to_gtypes(types): |
11 | 11 | |
12 | 12 | def __call__(self): |
13 | 13 | |
14 | print '{' | |
15 | print ' GEnumClass *klass;' | |
16 | print ' GEnumValue *value_by_name;' | |
17 | print ' GEnumValue *value_by_nick;' | |
18 | print '' | |
19 | print ' g_type_init ();' | |
20 | print ' klass = g_type_class_ref (TP_TYPE_ERROR);' | |
14 | print('{') | |
15 | print(' GEnumClass *klass;') | |
16 | print(' GEnumValue *value_by_name;') | |
17 | print(' GEnumValue *value_by_nick;') | |
18 | print('') | |
19 | print(' g_type_init ();') | |
20 | print(' klass = g_type_class_ref (TP_TYPE_ERROR);') | |
21 | 21 | |
22 | 22 | for error in self.errors.getElementsByTagNameNS(NS_TP, 'error'): |
23 | 23 | ns = error.parentNode.getAttribute('namespace') |
27 | 27 | s = ('TP_ERROR_STR_' + |
28 | 28 | error.getAttribute('name').replace(' ', '_').replace('.', '_').upper()) |
29 | 29 | |
30 | print '' | |
31 | print ' /* %s.%s */' % (ns, nick) | |
32 | print (' value_by_name = g_enum_get_value_by_name (klass, "%s");' | |
33 | % enum) | |
34 | print (' value_by_nick = g_enum_get_value_by_nick (klass, "%s");' | |
35 | % nick) | |
36 | print (' g_assert (value_by_name != NULL);') | |
37 | print (' g_assert (value_by_nick != NULL);') | |
38 | print (' g_assert_cmpint (value_by_name->value, ==, %s);' | |
39 | % enum) | |
40 | print (' g_assert_cmpint (value_by_nick->value, ==, %s);' | |
41 | % enum) | |
42 | print (' g_assert_cmpstr (value_by_name->value_name, ==, "%s");' | |
43 | % enum) | |
44 | print (' g_assert_cmpstr (value_by_nick->value_name, ==, "%s");' | |
45 | % enum) | |
46 | print (' g_assert_cmpstr (value_by_name->value_nick, ==, "%s");' | |
47 | % nick) | |
48 | print (' g_assert_cmpstr (value_by_nick->value_nick, ==, "%s");' | |
49 | % nick) | |
50 | print (' g_assert_cmpstr (%s, ==, TP_ERROR_PREFIX ".%s");' | |
51 | % (s, nick)) | |
30 | print('') | |
31 | print(' /* %s.%s */' % (ns, nick)) | |
32 | print(' value_by_name = g_enum_get_value_by_name (klass, "%s");' | |
33 | % enum) | |
34 | print(' value_by_nick = g_enum_get_value_by_nick (klass, "%s");' | |
35 | % nick) | |
36 | print(' g_assert (value_by_name != NULL);') | |
37 | print(' g_assert (value_by_nick != NULL);') | |
38 | print(' g_assert_cmpint (value_by_name->value, ==, %s);' | |
39 | % enum) | |
40 | print(' g_assert_cmpint (value_by_nick->value, ==, %s);' | |
41 | % enum) | |
42 | print(' g_assert_cmpstr (value_by_name->value_name, ==, "%s");' | |
43 | % enum) | |
44 | print(' g_assert_cmpstr (value_by_nick->value_name, ==, "%s");' | |
45 | % enum) | |
46 | print(' g_assert_cmpstr (value_by_name->value_nick, ==, "%s");' | |
47 | % nick) | |
48 | print(' g_assert_cmpstr (value_by_nick->value_nick, ==, "%s");' | |
49 | % nick) | |
50 | print(' g_assert_cmpstr (%s, ==, TP_ERROR_PREFIX ".%s");' | |
51 | % (s, nick)) | |
52 | 52 | |
53 | print '}' | |
53 | print('}') | |
54 | 54 | |
55 | 55 | if __name__ == '__main__': |
56 | 56 | argv = sys.argv[1:] |
2 | 2 | import sys |
3 | 3 | import xml.dom.minidom |
4 | 4 | |
5 | from libtpcodegen import file_set_contents | |
5 | from libtpcodegen import file_set_contents, u | |
6 | 6 | from libglibcodegen import NS_TP, get_docstring, xml_escape |
7 | 7 | |
8 | 8 | class Generator(object): |
16 | 16 | self.__docs = [] |
17 | 17 | |
18 | 18 | def h(self, s): |
19 | if isinstance(s, unicode): | |
20 | s = s.encode('utf-8') | |
21 | 19 | self.__header.append(s) |
22 | 20 | |
23 | 21 | def b(self, s): |
24 | if isinstance(s, unicode): | |
25 | s = s.encode('utf-8') | |
26 | 22 | self.__body.append(s) |
27 | 23 | |
28 | 24 | def d(self, s): |
29 | if isinstance(s, unicode): | |
30 | s = s.encode('utf-8') | |
31 | 25 | self.__docs.append(s) |
32 | 26 | |
33 | 27 | def __call__(self): |
71 | 65 | self.h('') |
72 | 66 | self.b('') |
73 | 67 | |
74 | file_set_contents(self.basename + '.h', '\n'.join(self.__header)) | |
75 | file_set_contents(self.basename + '.c', '\n'.join(self.__body)) | |
76 | file_set_contents(self.basename + '-gtk-doc.h', '\n'.join(self.__docs)) | |
68 | file_set_contents(self.basename + '.h', u('\n').join(self.__header).encode('utf-8')) | |
69 | file_set_contents(self.basename + '.c', u('\n').join(self.__body).encode('utf-8')) | |
70 | file_set_contents(self.basename + '-gtk-doc.h', u('\n').join(self.__docs).encode('utf-8')) | |
77 | 71 | |
78 | 72 | if __name__ == '__main__': |
79 | 73 | argv = sys.argv[1:] |
25 | 25 | import os.path |
26 | 26 | import xml.dom.minidom |
27 | 27 | |
28 | from libtpcodegen import file_set_contents | |
29 | from libglibcodegen import Signature, type_to_gtype, cmp_by_name, \ | |
28 | from libtpcodegen import file_set_contents, key_by_name, u | |
29 | from libglibcodegen import Signature, type_to_gtype, \ | |
30 | 30 | NS_TP, dbus_gutils_wincaps_to_uscore |
31 | 31 | |
32 | 32 | |
84 | 84 | self.allow_havoc = allow_havoc |
85 | 85 | |
86 | 86 | def h(self, s): |
87 | if isinstance(s, unicode): | |
88 | s = s.encode('utf-8') | |
89 | 87 | self.__header.append(s) |
90 | 88 | |
91 | 89 | def b(self, s): |
92 | if isinstance(s, unicode): | |
93 | s = s.encode('utf-8') | |
94 | 90 | self.__body.append(s) |
95 | 91 | |
96 | 92 | def d(self, s): |
97 | if isinstance(s, unicode): | |
98 | s = s.encode('utf-8') | |
99 | 93 | self.__docs.append(s) |
100 | 94 | |
101 | 95 | def do_node(self, node): |
732 | 726 | |
733 | 727 | def __call__(self): |
734 | 728 | nodes = self.dom.getElementsByTagName('node') |
735 | nodes.sort(cmp_by_name) | |
729 | nodes.sort(key=key_by_name) | |
736 | 730 | |
737 | 731 | self.h('#include <glib-object.h>') |
738 | 732 | self.h('#include <dbus/dbus-glib.h>') |
760 | 754 | |
761 | 755 | self.h('') |
762 | 756 | self.b('') |
763 | file_set_contents(self.basename + '.h', '\n'.join(self.__header)) | |
764 | file_set_contents(self.basename + '.c', '\n'.join(self.__body)) | |
765 | file_set_contents(self.basename + '-gtk-doc.h', '\n'.join(self.__docs)) | |
757 | file_set_contents(self.basename + '.h', u('\n').join(self.__header).encode('utf-8')) | |
758 | file_set_contents(self.basename + '.c', u('\n').join(self.__body).encode('utf-8')) | |
759 | file_set_contents(self.basename + '-gtk-doc.h', u('\n').join(self.__docs).encode('utf-8')) | |
766 | 760 | |
767 | 761 | def cmdline_error(): |
768 | print """\ | |
762 | print("""\ | |
769 | 763 | usage: |
770 | 764 | gen-ginterface [OPTIONS] xmlfile Prefix_ |
771 | 765 | options: |
785 | 779 | void symbol (DBusGMethodInvocation *context) |
786 | 780 | and return some sort of "not implemented" error via |
787 | 781 | dbus_g_method_return_error (context, ...) |
788 | """ | |
782 | """) | |
789 | 783 | sys.exit(1) |
790 | 784 | |
791 | 785 |
22 | 22 | import sys |
23 | 23 | import xml.dom.minidom |
24 | 24 | |
25 | from libtpcodegen import file_set_contents | |
25 | from libtpcodegen import file_set_contents, u | |
26 | 26 | from libglibcodegen import escape_as_identifier, \ |
27 | 27 | get_docstring, \ |
28 | 28 | NS_TP, \ |
67 | 67 | self.need_other_arrays = {} |
68 | 68 | |
69 | 69 | def h(self, code): |
70 | self.header.append(code.encode("utf-8")) | |
70 | self.header.append(code) | |
71 | 71 | |
72 | 72 | def c(self, code): |
73 | self.body.append(code.encode("utf-8")) | |
73 | self.body.append(code) | |
74 | 74 | |
75 | 75 | def d(self, code): |
76 | self.docs.append(code.encode('utf-8')) | |
76 | self.docs.append(code) | |
77 | 77 | |
78 | 78 | def do_mapping_header(self, mapping): |
79 | 79 | members = mapping.getElementsByTagNameNS(NS_TP, 'member') |
291 | 291 | self.c(' return t;\n') |
292 | 292 | self.c('}\n\n') |
293 | 293 | |
294 | file_set_contents(self.output + '.h', ''.join(self.header)) | |
295 | file_set_contents(self.output + '-body.h', ''.join(self.body)) | |
296 | file_set_contents(self.output + '-gtk-doc.h', ''.join(self.docs)) | |
294 | file_set_contents(self.output + '.h', u('').join(self.header).encode('utf-8')) | |
295 | file_set_contents(self.output + '-body.h', u('').join(self.body).encode('utf-8')) | |
296 | file_set_contents(self.output + '-gtk-doc.h', u('').join(self.docs).encode('utf-8')) | |
297 | 297 | |
298 | 298 | if __name__ == '__main__': |
299 | 299 | argv = sys.argv[1:] |
2 | 2 | from sys import argv, stdout, stderr |
3 | 3 | import xml.dom.minidom |
4 | 4 | |
5 | from libtpcodegen import file_set_contents | |
5 | from libtpcodegen import file_set_contents, u | |
6 | 6 | from libglibcodegen import NS_TP, get_docstring, \ |
7 | 7 | get_descendant_text, get_by_path |
8 | 8 | |
23 | 23 | self.spec = get_by_path(dom, "spec")[0] |
24 | 24 | |
25 | 25 | def h(self, code): |
26 | self.decls.append(code.encode('utf-8')) | |
26 | self.decls.append(code) | |
27 | 27 | |
28 | 28 | def c(self, code): |
29 | self.impls.append(code.encode('utf-8')) | |
29 | self.impls.append(code) | |
30 | 30 | |
31 | 31 | def d(self, code): |
32 | self.docs.append(code.encode('utf-8')) | |
32 | self.docs.append(code) | |
33 | 33 | |
34 | 34 | def __call__(self): |
35 | 35 | for f in self.h, self.c: |
36 | 36 | self.do_header(f) |
37 | 37 | self.do_body() |
38 | 38 | |
39 | file_set_contents(self.implfile, ''.join(self.impls)) | |
40 | file_set_contents(self.declfile, ''.join(self.decls)) | |
41 | file_set_contents(self.docfile, ''.join(self.docs)) | |
39 | file_set_contents(self.implfile, u('').join(self.impls).encode('utf-8')) | |
40 | file_set_contents(self.declfile, u('').join(self.decls).encode('utf-8')) | |
41 | file_set_contents(self.docfile, u('').join(self.docs).encode('utf-8')) | |
42 | 42 | |
43 | 43 | # Header |
44 | 44 | def do_header(self, f): |
86 | 86 | |
87 | 87 | head, tail = argv |
88 | 88 | |
89 | print '\n'.join(gobject_header(head, tail, as_interface=as_interface)) | |
89 | print('\n'.join(gobject_header(head, tail, as_interface=as_interface))) |
153 | 153 | return ("GHashTable *", "DBUS_TYPE_G_STRING_STRING_HASHTABLE", "BOXED", False) |
154 | 154 | elif s[:2] == 'a{': #some arbitrary hash tables |
155 | 155 | if s[2] not in ('y', 'b', 'n', 'q', 'i', 'u', 's', 'o', 'g'): |
156 | raise Exception, "can't index a hashtable off non-basic type " + s | |
156 | raise Exception("can't index a hashtable off non-basic type " + s) | |
157 | 157 | first = type_to_gtype(s[2]) |
158 | 158 | second = type_to_gtype(s[3:-1]) |
159 | 159 | return ("GHashTable *", "(dbus_g_type_get_map (\"GHashTable\", " + first[1] + ", " + second[1] + "))", "BOXED", False) |
168 | 168 | return ("GValueArray *", gtype, "BOXED", True) |
169 | 169 | |
170 | 170 | # we just don't know .. |
171 | raise Exception, "don't know the GType for " + s | |
171 | raise Exception("don't know the GType for " + s) |
20 | 20 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
21 | 21 | |
22 | 22 | import os |
23 | import sys | |
23 | 24 | from string import ascii_letters, digits |
24 | 25 | |
25 | 26 | |
26 | 27 | NS_TP = "http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0" |
27 | 28 | |
28 | 29 | _ASCII_ALNUM = ascii_letters + digits |
30 | ||
31 | if sys.version_info[0] >= 3: | |
32 | def u(s): | |
33 | """Return s, which must be a str literal with no non-ASCII characters. | |
34 | This is like a more restricted form of the Python 2 u'' syntax. | |
35 | """ | |
36 | return s.encode('ascii').decode('ascii') | |
37 | else: | |
38 | def u(s): | |
39 | """Return a Unicode version of s, which must be a str literal | |
40 | (a bytestring) in which each byte is an ASCII character. | |
41 | This is like a more restricted form of the u'' syntax. | |
42 | """ | |
43 | return s.decode('ascii') | |
29 | 44 | |
30 | 45 | def file_set_contents(filename, contents): |
31 | 46 | try: |
37 | 52 | except OSError: |
38 | 53 | pass |
39 | 54 | |
40 | open(filename + '.tmp', 'w').write(contents) | |
55 | open(filename + '.tmp', 'wb').write(contents) | |
41 | 56 | os.rename(filename + '.tmp', filename) |
42 | 57 | |
43 | 58 | def cmp_by_name(node1, node2): |
44 | 59 | return cmp(node1.getAttributeNode("name").nodeValue, |
45 | 60 | node2.getAttributeNode("name").nodeValue) |
46 | 61 | |
62 | def key_by_name(node): | |
63 | return node.getAttributeNode("name").nodeValue | |
47 | 64 | |
48 | 65 | def escape_as_identifier(identifier): |
49 | 66 | """Escape the given string to be a valid D-Bus object path or service |
167 | 184 | self.remaining = string |
168 | 185 | |
169 | 186 | def next(self): |
187 | return self.__next__() | |
188 | ||
189 | def __next__(self): | |
170 | 190 | if self.remaining == '': |
171 | 191 | raise StopIteration |
172 | 192 |
62 | 62 | |
63 | 63 | if dpkg: |
64 | 64 | assert dpkg_first_line is not None |
65 | print dpkg_first_line | |
65 | print(dpkg_first_line) | |
66 | 66 | if dpkg_build_depends_package is not None: |
67 | print "* Build-Depends-Package: %s" % dpkg_build_depends_package | |
67 | print("* Build-Depends-Package: %s" % dpkg_build_depends_package) | |
68 | 68 | |
69 | 69 | for filename in abifiles: |
70 | 70 | lines = open(filename, 'r').readlines() |
119 | 119 | lines = lines[cut:] |
120 | 120 | |
121 | 121 | if gnuld: |
122 | print "%s {" % version | |
123 | print " global:" | |
122 | print("%s {" % version) | |
123 | print(" global:") | |
124 | 124 | |
125 | 125 | for symbol in lines: |
126 | 126 | symbol = symbol.strip() |
129 | 129 | continue |
130 | 130 | |
131 | 131 | if gnuld: |
132 | print " %s;" % symbol | |
132 | print(" %s;" % symbol) | |
133 | 133 | elif dpkg: |
134 | 134 | dpkg_symbols.append('%s@%s %s' % (symbol, version, release)) |
135 | 135 | |
141 | 141 | |
142 | 142 | if gnuld: |
143 | 143 | if extends == '-': |
144 | print " local:" | |
145 | print " *;" | |
146 | print "};" | |
144 | print(" local:") | |
145 | print(" *;") | |
146 | print("};") | |
147 | 147 | else: |
148 | print "} %s;" % extends | |
149 | ||
148 | print("} %s;" % extends) | |
149 | print("") | |
150 | 150 | |
151 | 151 | if dpkg: |
152 | 152 | dpkg_symbols.sort() |
153 | 153 | dpkg_versions.sort() |
154 | 154 | |
155 | 155 | for x in dpkg_versions: |
156 | print " %s" % x | |
156 | print(" %s" % x) | |
157 | 157 | |
158 | 158 | for x in dpkg_symbols: |
159 | print " %s" % x | |
159 | print(" %s" % x) | |
160 | 160 | |
161 | 161 | if symbol_set is not None: |
162 | 162 | missing = versioned_symbols - symbol_set |
181 | 181 | raise SystemExit(1) |
182 | 182 | |
183 | 183 | if gnuld: |
184 | print "%s {" % unreleased_version | |
185 | print " global:" | |
184 | print("%s {" % unreleased_version) | |
185 | print(" global:") | |
186 | 186 | |
187 | 187 | for symbol in unreleased: |
188 | print " %s;" % symbol | |
189 | ||
190 | print "} %s;" % version | |
188 | print(" %s;" % symbol) | |
189 | ||
190 | print("} %s;" % version) | |
191 | 191 | |
192 | 192 | |
193 | 193 | if __name__ == '__main__': |
0 | 0 | #!/usr/bin/python |
1 | 1 | |
2 | import sys | |
2 | 3 | from sys import argv, stdout, stderr |
3 | 4 | import codecs, locale |
4 | 5 | import os |
5 | 6 | import xml.dom.minidom |
6 | 7 | |
7 | stdout = codecs.getwriter('utf-8')(stdout) | |
8 | if sys.version_info[0] < 3: | |
9 | stdout = codecs.getwriter('utf-8')(stdout) | |
8 | 10 | |
9 | 11 | NS_XI = 'http://www.w3.org/2001/XInclude' |
10 | 12 | |
11 | 13 | def xincludate(dom, base, dropns = []): |
12 | 14 | remove_attrs = [] |
13 | for i in xrange(dom.documentElement.attributes.length): | |
15 | for i in range(dom.documentElement.attributes.length): | |
14 | 16 | attr = dom.documentElement.attributes.item(i) |
15 | 17 | if attr.prefix == 'xmlns': |
16 | 18 | if attr.localName in dropns: |
33 | 35 | argv = argv[1:] |
34 | 36 | dom = xml.dom.minidom.parse(argv[0]) |
35 | 37 | xincludate(dom, argv[0]) |
36 | xml = dom.toxml() | |
38 | ||
39 | if sys.version_info[0] >= 3: | |
40 | xml = dom.toxml(encoding=None) | |
41 | else: | |
42 | xml = dom.toxml() | |
43 | ||
37 | 44 | stdout.write(xml) |
38 | 45 | stdout.write('\n') |