Codebase list telepathy-glib / upstream/0.21.0
Imported Upstream version 0.21.0 Simon McVittie 10 years ago
59 changed file(s) with 942 addition(s) and 276 deletion(s). Raw diff Collapse all Expand all
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
77 Author: Xavier Claessens <xavier.claessens@collabora.co.uk>
88 Date: 2013-04-03 11:02:13 +0200
99
1313 but newer GLib follows Unicode Corrigendum 9 and allows them.
1414 https://bugzilla.gnome.org/show_bug.cgi?id=694669
1515
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
1646 commit c7dab2d3c6936443fb4aee43f54defa81b5dc592
1747 Author: Maksim Melnikau <maxposedon@gmail.com>
1848 Date: 2013-03-31 19:40:51 +0300
2353 Bug: https://bugs.freedesktop.org/show_bug.cgi?id=62968
2454 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2555
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
2675 commit a33573ff2c48b9ec37bb6c36801be3b80871e62b
2776 Author: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
2877 Date: 2013-03-12 16:25:43 +0100
2978
3079 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'
3187
3288 commit 9ea571eca7d12648776c7179255711dbdd9aac25
3389 Author: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
4197
4298 Fix introspection annotations for GStrv types
4399
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
44128 commit bb3d4a427f8bd28a83896e499b64755534de02c5
45129 Merge: 949324d 55f7253
46130 Author: Simon McVittie <simon.mcvittie@collabora.co.uk>
69153 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
70154 Bug: https://bugs.freedesktop.org/show_bug.cgi?id=59604
71155
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
72183 commit 949324dbc3515e2cebced4a1a410c725896f4a6e
73184 Author: Will Thompson <will.thompson@collabora.co.uk>
74185 Date: 2013-01-09 09:59:41 +0000
77188
78189 tp_connection_get_contact_by_id_async does not exist; it is called
79190 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
80210
81211 commit 12e8b215512e99b8f11a2800b8f9842c59dd38d6
82212 Merge: 308408b a0f0298
114244 [edited for coding style, added a comment -smcv]
115245 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
116246
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
117277 commit 308408b98358b701a629b2b7821af81eaecc0239
118278 Author: Simon McVittie <simon.mcvittie@collabora.co.uk>
119279 Date: 2013-01-03 18:17:31 +0000
120280
121281 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.
122340
123341 commit 8da3211ce74e143f59973b8f2f17295b7165b22c
124342 Author: Philip Withnall <philip@tecnocode.co.uk>
133351
134352 https://bugs.freedesktop.org/show_bug.cgi?id=58851
135353
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
136380 commit 9197c36511e0fedd1cd32d99327a06ae3cd993d9
137381 Author: Simon McVittie <simon.mcvittie@collabora.co.uk>
138382 Date: 2012-11-09 18:04:42 +0000
150394 Date: 2012-11-09 17:25:08 +0000
151395
152396 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
153416
154417 commit 1dcb667751898544efad73b8e42d91ff58119e0d
155418 Author: Debarshi Ray <rishi@gnu.org>
170433
171434 Fixes: https://bugs.freedesktop.org/56044
172435
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
173461 commit ce8d1f6edf9161df170bc781f903f85346ac5554
174462 Author: Simon McVittie <simon.mcvittie@collabora.co.uk>
175463 Date: 2012-10-08 14:32:12 +0100
178466
179467 foo_CPPFLAGS overrides AM_CPPFLAGS, so if you want to include the latter
180468 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
181479
182480 commit e39ce95dbf2b2c57fb4621291a450aa8584fb193
183481 Author: Simon McVittie <simon.mcvittie@collabora.co.uk>
240538 Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
241539 Bug: https://bugs.freedesktop.org/show_bug.cgi?id=55666
242540 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.
243583
244584 commit dc6f2f106202da6903e49848272f49d171423366
245585 Author: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
3636 maintainer-upload-release: _maintainer-upload-release-local
3737 _maintainer-upload-release-local: _maintainer-upload-release-check
3838 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/
4040
4141 BRANCH = $(shell sh tools/git-which-branch.sh misc | tr -d '\n' | tr -C "[:alnum:]" _)
4242 UPLOAD_BRANCH_TO = people.freedesktop.org:public_html/telepathy-glib
857857 maintainer-upload-release: _maintainer-upload-release-local
858858 _maintainer-upload-release-local: _maintainer-upload-release-check
859859 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/
861861
862862 upload-branch-docs: all
863863 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)
418
519 • In TpSimpleClientFactory, don't crash when ensuring a contact for an
620 obsolete connection manager without "immortal handles" fails
1024 tp_capabilities_get_channel_classes, tp_asv_get_bytes and
1125 tp_client_channel_factory_dup_channel_features (fd.o #58851, Philip Withnall)
1226
27 • Don't emit the NewChannels signal twice for the obsolete ContactList GROUP
28 channels (fd.o #52011, Simon)
29
1330 • Fix builds with Automake 1.13 (fd.o #59604, Nuno Araujo)
1431
1532 • 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)
1642
1743 telepathy-glib 0.20.1 (2012-11-09)
1844 ==================================
118118 GI_TYPELIB_PATH=`pwd`/telepathy-glib
119119 export GI_TYPELIB_PATH
120120
121 LD_LIBRARY_PATH=`pwd`/telepathy-glib/.libs
122 export LD_LIBRARY_PATH
123
121124 In Python you can access the API using;
122125 from gi.repository import TelepathyGLib
00 #! /bin/sh
11 # 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.
33 #
44 # Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=Telepathy&component=tp-glib>.
55 #
650650 # Identity of this package.
651651 PACKAGE_NAME='Telepathy-GLib'
652652 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'
655655 PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=Telepathy&component=tp-glib'
656656 PACKAGE_URL=''
657657
14881488 # Omit some internal or obsolete options to make the list less imposing.
14891489 # This message is too long to be a string in the A/UX 3.1 sh.
14901490 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.
14921492
14931493 Usage: $0 [OPTION]... [VAR=VALUE]...
14941494
15581558
15591559 if test -n "$ac_init_help"; then
15601560 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:";;
15621562 esac
15631563 cat <<\_ACEOF
15641564
17091709 test -n "$ac_init_help" && exit $ac_status
17101710 if $ac_init_version; then
17111711 cat <<\_ACEOF
1712 Telepathy-GLib configure 0.20.2
1712 Telepathy-GLib configure 0.21.0
17131713 generated by GNU Autoconf 2.69
17141714
17151715 Copyright (C) 2012 Free Software Foundation, Inc.
21992199 This file contains any messages produced by compilers while
22002200 running configure, to aid debugging if configure makes a mistake.
22012201
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
22032203 generated by GNU Autoconf 2.69. Invocation command line was
22042204
22052205 $ $0 $@
30173017
30183018 # Define the identity of the package.
30193019 PACKAGE='telepathy-glib'
3020 VERSION='0.20.2'
3020 VERSION='0.21.0'
30213021
30223022
30233023 cat >>confdefs.h <<_ACEOF
1251012510
1251112511
1251212512 TP_MAJOR_VERSION=0
12513 TP_MINOR_VERSION=20
12514 TP_MICRO_VERSION=2
12513 TP_MINOR_VERSION=21
12514 TP_MICRO_VERSION=0
1251512515
1251612516
1251712517
1278312783
1278412784
1278512785 for tp_flag in missing-field-initializers \
12786 unused-parameter \
12787 deprecated-declarations; do
12786 unused-parameter; do
1278812787
1278912788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if compiler understands -Wno-$tp_flag" >&5
1279012789 $as_echo_n "checking to see if compiler understands -Wno-$tp_flag... " >&6; }
1814318142 # report actual input values of CONFIG_FILES etc. instead of their
1814418143 # values after options handling.
1814518144 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
1814718146 generated by GNU Autoconf 2.69. Invocation command line was
1814818147
1814918148 CONFIG_FILES = $CONFIG_FILES
1820918208 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
1821018209 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
1821118210 ac_cs_version="\\
18212 Telepathy-GLib config.status 0.20.2
18211 Telepathy-GLib config.status 0.21.0
1821318212 configured by $0, generated by GNU Autoconf 2.69,
1821418213 with options \\"\$ac_cs_config\\"
1821518214
99 # set nano_version to 1
1010
1111 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])
1414 m4_define([tp_glib_nano_version], [0])
1515
1616 # If library source has changed since last release, increment revision
115115 format-security \
116116 init-self],
117117 [missing-field-initializers \
118 unused-parameter \
119 deprecated-declarations])
118 unused-parameter])
120119 AC_SUBST([ERROR_CFLAGS])
121120
122121 # these aren't really error flags but they serve a similar purpose for us -
141141 echo "$$file missing from telepathy-glib-docs.sgml"; \
142142 err=1; \
143143 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
145154 endif
146 # ... but don't fail on incomplete documentation, this is a stable branch
830830 @ENABLE_GTK_DOC_TRUE@ echo "$$file missing from telepathy-glib-docs.sgml"; \
831831 @ENABLE_GTK_DOC_TRUE@ err=1; \
832832 @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
835843
836844 # Tell versions [3.59,3.63) of GNU make to not export all variables.
837845 # Otherwise a system limit (for SysV at least) may be exceeded.
1414 <div>
1515 <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>
1616 <div><p class="releaseinfo">
17 This manual documents telepathy-glib version 0.20.2
17 This manual documents telepathy-glib version 0.21.0
1818 .
1919 The latest development version of this documentation can be found here:
2020 <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>.
2321 </p></div>
2422 </div>
2523 <hr>
00 <ONLINE href="http://telepathy.freedesktop.org/doc/telepathy-glib/">
1 <ONLINE href="http://telepathy.freedesktop.org/doc/telepathy-glib-0.20.x/">
21 <ANCHOR id="telepathy-glib-proxy" href="telepathy-glib/telepathy-glib-proxy.html">
32 <ANCHOR id="telepathy-glib-proxy.synopsis" href="telepathy-glib/telepathy-glib-proxy.html#telepathy-glib-proxy.synopsis">
43 <ANCHOR id="TpProxy" href="telepathy-glib/telepathy-glib-proxy.html#TpProxy">
33353334 <ANCHOR id="TpAccount--storage-provider" href="telepathy-glib/telepathy-glib-account.html#TpAccount--storage-provider">
33363335 <ANCHOR id="TpAccount--storage-restrictions" href="telepathy-glib/telepathy-glib-account.html#TpAccount--storage-restrictions">
33373336 <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">
33383338 <ANCHOR id="TpAccount--valid" href="telepathy-glib/telepathy-glib-account.html#TpAccount--valid">
33393339 <ANCHOR id="telepathy-glib-account.signal-details" href="telepathy-glib/telepathy-glib-account.html#telepathy-glib-account.signal-details">
33403340 <ANCHOR id="TpAccount-presence-changed" href="telepathy-glib/telepathy-glib-account.html#TpAccount-presence-changed">
67616761 <ANCHOR id="TP-VERSION-0-16:CAPS" href="telepathy-glib/telepathy-glib-version.html#TP-VERSION-0-16:CAPS">
67626762 <ANCHOR id="TP-VERSION-0-18:CAPS" href="telepathy-glib/telepathy-glib-version.html#TP-VERSION-0-18:CAPS">
67636763 <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">
67646765 <ANCHOR id="TP-VERSION-MIN-REQUIRED:CAPS" href="telepathy-glib/telepathy-glib-version.html#TP-VERSION-MIN-REQUIRED:CAPS">
67656766 <ANCHOR id="TP-VERSION-MAX-ALLOWED:CAPS" href="telepathy-glib/telepathy-glib-version.html#TP-VERSION-MAX-ALLOWED:CAPS">
67666767 <ANCHOR id="telepathy-glib-util" href="telepathy-glib/telepathy-glib-util.html">
107107 </p>
108108 <div class="section">
109109 <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>
111111 <p>
112112 Since 0.7.13 this mixin supports the entire SimplePresence interface.
113113 You can implement <a class="link" href="telepathy-glib-svc-connection.html#TpSvcConnectionInterfaceSimplePresence"><span class="type">TpSvcConnectionInterfaceSimplePresence</span></a> as follows:
145145 </p>
146146 <div class="section">
147147 <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>
149149 <p>
150150 This mixin also supports a large subset of the deprecated Presence
151151 interface. It does not support protocols where it is possible to set
400400 "<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
401401 "<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
402402 "<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
403404 "<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
404405 </pre>
405406 </div>
26852686 <a name="tp-account-get-uri-schemes"></a><h3>tp_account_get_uri_schemes ()</h3>
26862687 <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>
26872688 <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
27002690 </p>
27012691 <div class="variablelist"><table border="0">
27022692 <col align="left" valign="top">
27082698 </tr>
27092699 <tr>
27102700 <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>
27122702 </td>
27132703 </tr>
27142704 </tbody>
45014491 </div>
45024492 <hr>
45034493 <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">
45044518 <a name="TpAccount--valid"></a><h3>The <code class="literal">"valid"</code> property</h3>
45054519 <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>
45064520 <p>
215215 <p>
216216 </p>
217217 <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>
219219 <div class="example-contents"><pre class="programlisting">
220220 GHashTable *parameters = tp_asv_new (
221221 "answer", G_TYPE_INT, 42,
968968 <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>,
969969 <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>,
970970 <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>
971975 <p>
972976 Returns the value associated with <em class="parameter"><code>key</code></em> under <em class="parameter"><code>group_name</code></em> as a signed
973977 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
10101014 <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>,
10111015 <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>,
10121016 <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>
10131021 <p>
10141022 Returns the value associated with <em class="parameter"><code>key</code></em> under <em class="parameter"><code>group_name</code></em> as an unsigned
10151023 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
11221130 <p>
11231131 </p>
11241132 <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>
11261134 <div class="example-contents"><pre class="programlisting">
11271135 GValueArray *array = tp_value_array_build (2,
11281136 G_TYPE_STRING, host,
11721180 <p>
11731181 </p>
11741182 <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>
11761184 <div class="example-contents"><pre class="programlisting">
11771185 const gchar *host;
11781186 guint port;
4545 #define <a class="link" href="telepathy-glib-version.html#TP-VERSION-0-16:CAPS" title="TP_VERSION_0_16">TP_VERSION_0_16</a>
4646 #define <a class="link" href="telepathy-glib-version.html#TP-VERSION-0-18:CAPS" title="TP_VERSION_0_18">TP_VERSION_0_18</a>
4747 #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>
4849 #define <a class="link" href="telepathy-glib-version.html#TP-VERSION-MIN-REQUIRED:CAPS" title="TP_VERSION_MIN_REQUIRED">TP_VERSION_MIN_REQUIRED</a>
4950 #define <a class="link" href="telepathy-glib-version.html#TP-VERSION-MAX-ALLOWED:CAPS" title="TP_VERSION_MAX_ALLOWED">TP_VERSION_MAX_ALLOWED</a>
5051 </pre>
103104 <hr>
104105 <div class="refsect2">
105106 <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
107108 </pre>
108109 <p>
109110 The minor version of telepathy-glib (e.g. the 18 in 0.18.1) at the time your
117118 <hr>
118119 <div class="refsect2">
119120 <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
121122 </pre>
122123 <p>
123124 The micro version of telepathy-glib (e.g. the 1 in 0.18.1) at the time your
160161 <p>
161162 A constant representing the telepathy-glib 0.20 stable branch,
162163 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.
163174 </p>
164175 </div>
165176 <hr>
27282728 <keyword type="property" name="The &quot;storage-provider&quot; property" link="telepathy-glib-account.html#TpAccount--storage-provider"/>
27292729 <keyword type="property" name="The &quot;storage-restrictions&quot; property" link="telepathy-glib-account.html#TpAccount--storage-restrictions"/>
27302730 <keyword type="property" name="The &quot;supersedes&quot; property" link="telepathy-glib-account.html#TpAccount--supersedes"/>
2731 <keyword type="property" name="The &quot;uri-schemes&quot; property" link="telepathy-glib-account.html#TpAccount--uri-schemes"/>
27312732 <keyword type="property" name="The &quot;valid&quot; property" link="telepathy-glib-account.html#TpAccount--valid"/>
27322733 <keyword type="signal" name="The &quot;presence-changed&quot; signal" link="telepathy-glib-account.html#TpAccount-presence-changed"/>
27332734 <keyword type="signal" name="The &quot;status-changed&quot; signal" link="telepathy-glib-account.html#TpAccount-status-changed"/>
52605261 <keyword type="macro" name="TP_VERSION_0_16" link="telepathy-glib-version.html#TP-VERSION-0-16:CAPS"/>
52615262 <keyword type="macro" name="TP_VERSION_0_18" link="telepathy-glib-version.html#TP-VERSION-0-18:CAPS"/>
52625263 <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"/>
52635265 <keyword type="macro" name="TP_VERSION_MIN_REQUIRED" link="telepathy-glib-version.html#TP-VERSION-MIN-REQUIRED:CAPS"/>
52645266 <keyword type="macro" name="TP_VERSION_MAX_ALLOWED" link="telepathy-glib-version.html#TP-VERSION-MAX-ALLOWED:CAPS"/>
52655267 <keyword type="macro" name="tp_verify()" link="telepathy-glib-util.html#tp-verify" since="0.7.34"/>
52915293 <keyword type="function" name="tp_mixin_instance_get_offset ()" link="telepathy-glib-util.html#tp-mixin-instance-get-offset"/>
52925294 <keyword type="function" name="tp_escape_as_identifier ()" link="telepathy-glib-util.html#tp-escape-as-identifier"/>
52935295 <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"/>
52965298 <keyword type="function" name="tp_g_signal_connect_object ()" link="telepathy-glib-util.html#tp-g-signal-connect-object" since="0.9.2"/>
52975299 <keyword type="function" name="tp_value_array_build ()" link="telepathy-glib-util.html#tp-value-array-build" since="0.9.2"/>
52985300 <keyword type="function" name="tp_value_array_unpack ()" link="telepathy-glib-util.html#tp-value-array-unpack" since="0.11.0"/>
99 This manual documents telepathy-glib version &tpglibversion;.
1010 The latest development version of this documentation can be found here:
1111 <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>.
1412 </releaseinfo>
1513 </bookinfo>
1614
4343 TP_VERSION_0_16
4444 TP_VERSION_0_18
4545 TP_VERSION_0_20
46 TP_VERSION_0_22
4647 TP_VERSION_MIN_REQUIRED
4748 TP_VERSION_MAX_ALLOWED
4849 <SUBSECTION Private>
0 #include "config.h"
1
02 #include <telepathy-glib/telepathy-glib.h>
13 #include "constants.h"
24
0 #include "config.h"
1
02 #include <telepathy-glib/telepathy-glib.h>
13 #include "constants.h"
24
55
66 from gi.repository import Gio
77 from gi.repository import TelepathyGLib
8
9 import magic
108
119 def usage():
1210 print "%s FILE" % sys.argv[0]
0 #include "config.h"
1
02 #include <telepathy-glib/telepathy-glib.h>
13
24 static GMainLoop *loop = NULL;
0 #include "config.h"
1
02 #include <telepathy-glib/telepathy-glib.h>
13
24 static GMainLoop *loop = NULL;
3333 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
3434 */
3535
36 #include "config.h"
37
3638 #include "call-channel.h"
3739
3840 #include <string.h>
10361036 <method name="get_uri_schemes"
10371037 c:identifier="tp_account_get_uri_schemes"
10381038 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>
10511042 <array c:type="const gchar* const*">
10521043 <type name="utf8"/>
10531044 </array>
24502441 This is not guaranteed to have been retrieved until the
24512442 %TP_ACCOUNT_FEATURE_CORE feature has been prepared; until then,
24522443 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>
24532462 <array>
24542463 <type name="utf8"/>
24552464 </array>
3675236761 c:identifier="tp_g_key_file_get_int64"
3675336762 version="0.7.31"
3675436763 introspectable="0"
36764 deprecated="Since 0.21.0. Use g_key_file_get_int64() instead."
3675536765 throws="1">
3675636766 <doc xml:whitespace="preserve">Returns the value associated with @key under @group_name as a signed
3675736767 64-bit integer. This is similar to g_key_file_get_integer() but can return
3677936789 c:identifier="tp_g_key_file_get_uint64"
3678036790 version="0.7.31"
3678136791 introspectable="0"
36792 deprecated="Since 0.21.0. Use g_key_file_get_uint64() instead."
3678236793 throws="1">
3678336794 <doc xml:whitespace="preserve">Returns the value associated with @key under @group_name as an unsigned
3678436795 64-bit integer. This is similar to g_key_file_get_integer() but can return
180180 PROP_STORAGE_IDENTIFIER_VARIANT,
181181 PROP_STORAGE_RESTRICTIONS,
182182 PROP_SUPERSEDES,
183 PROP_URI_SCHEMES,
183184 N_PROPS
184185 };
185186
10181019 }
10191020
10201021 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
10211058 _tp_account_constructed (GObject *object)
10221059 {
10231060 TpAccount *self = TP_ACCOUNT (object);
10561093
10571094 tp_cli_account_connect_to_account_property_changed (self,
10581095 _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);
10591099
10601100 tp_cli_dbus_properties_call_get_all (self, -1, TP_IFACE_ACCOUNT,
10611101 _tp_account_got_all_cb, NULL, NULL, G_OBJECT (self));
11481188 case PROP_SUPERSEDES:
11491189 g_value_set_boxed (value, self->priv->supersedes);
11501190 break;
1191 case PROP_URI_SCHEMES:
1192 g_value_set_boxed (value, self->priv->uri_schemes);
1193 break;
11511194 case PROP_AUTOMATIC_PRESENCE_TYPE:
11521195 g_value_set_uint (value, self->priv->auto_presence);
11531196 break;
20292072 G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
20302073
20312074 /**
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 /**
20322101 * TpAccount::status-changed:
20332102 * @account: the #TpAccount
20342103 * @old_status: old #TpAccount:connection-status
42244293 * tp_account_get_uri_schemes:
42254294 * @self: a #TpAccount
42264295 *
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
42394299 *
42404300 * Since: 0.13.8
42414301 */
20072007 if (TP_IS_CONTACT_GROUP_LIST (self))
20082008 {
20092009 GStrv groups = tp_base_contact_list_dup_groups (self);
2010 GHashTableIter h_iter;
2011 gpointer channel;
20122010
20132011 tp_base_contact_list_groups_created (self,
20142012 (const gchar * const *) groups, -1);
20222020 (const gchar * const *) groups + i, 1, NULL, 0);
20232021 tp_handle_set_destroy (members);
20242022 }
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);
20302023
20312024 g_strfreev (groups);
20322025 }
13091309 * refcycle completely. */
13101310 if (self->priv->roster != NULL)
13111311 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);
13121314 }
13131315
13141316 static gboolean
16301632 }
16311633
16321634 tp_clear_pointer (&self->priv->blocked_contacts, g_ptr_array_unref);
1635 g_clear_object (&self->priv->self_contact);
16331636
16341637 ((GObjectClass *) tp_connection_parent_class)->dispose (object);
16351638 }
158158 #define TP_VERSION_0_16 (_TP_ENCODE_VERSION (0, 16))
159159 #define TP_VERSION_0_18 (_TP_ENCODE_VERSION (0, 18))
160160 #define TP_VERSION_0_20 (_TP_ENCODE_VERSION (0, 20))
161 #define TP_VERSION_0_22 (_TP_ENCODE_VERSION (0, 22))
161162 #define TP_VERSION_1_0 (_TP_ENCODE_VERSION (1, 0))
162163
163164 #if (TP_MINOR_VERSION == 99)
219220 # define _TP_DEPRECATED_IN_0_20_FOR(f) /* nothing */
220221 #endif
221222
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
222231 #if TP_VERSION_MIN_REQUIRED >= TP_VERSION_1_0
223232 # define _TP_DEPRECATED_IN_1_0 _TP_DEPRECATED
224233 # define _TP_DEPRECATED_IN_1_0_FOR(f) _TP_DEPRECATED_FOR(f)
251260 # define _TP_AVAILABLE_IN_0_20 _TP_UNAVAILABLE(0, 20)
252261 #else
253262 # 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 */
254269 #endif
255270
256271 #if TP_VERSION_MAX_ALLOWED < TP_VERSION_1_0
463463 */
464464
465465 /**
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 /**
466473 * TP_VERSION_1_0: (skip)
467474 *
468475 * A constant representing the telepathy-glib 1.0 stable branch,
12461246 str_removed = group_flags_to_string (removed);
12471247 str_flags = group_flags_to_string (mixin->group_flags);
12481248
1249 printf ("%s: emitting group flags changed\n"
1249 DEBUG ("emitting group flags changed\n"
12501250 " added : %s\n"
12511251 " removed : %s\n"
12521252 " flags now: %s\n",
1253 G_STRFUNC, str_added, str_removed, str_flags);
1254
1255 fflush (stdout);
1253 str_added, str_removed, str_flags);
12561254
12571255 g_free (str_added);
12581256 g_free (str_removed);
14531451 local_str = member_array_to_string (mixin->handle_repo, local_pending);
14541452 remote_str = member_array_to_string (mixin->handle_repo, remote_pending);
14551453
1456 printf ("%s: emitting members changed\n"
1454 DEBUG ("emitting members changed\n"
14571455 " message : \"%s\"\n"
14581456 " added : %s\n"
14591457 " removed : %s\n"
14611459 " remote_pending: %s\n"
14621460 " actor : %u\n"
14631461 " 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,
14651463 actor, reason, group_change_reason_str (reason));
1466
1467 fflush (stdout);
14681464
14691465 g_free (add_str);
14701466 g_free (rem_str);
890890
891891 prop_arr = g_ptr_array_sized_new (len);
892892
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");
896895
897896 tp_intset_fast_iter_init (&iter, props);
898897
911910
912911 g_ptr_array_add (prop_arr, g_value_get_boxed (&prop_val));
913912
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);
921914 }
922915
923916 tp_svc_properties_interface_emit_properties_changed (
957950
958951 prop_arr = g_ptr_array_sized_new (len);
959952
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");
963955
964956 tp_intset_fast_iter_init (&iter, props);
965957
986978 {
987979 gchar *str_flags = property_flags_to_string (prop_flags);
988980
989 printf (" %s's flags now: %s\n",
981 DEBUG (" %s's flags now: %s\n",
990982 mixin_cls->signatures[prop_id].name, str_flags);
991983
992984 g_free (str_flags);
993985 }
994 }
995
996 if (DEBUGGING)
997 {
998 fflush (stdout);
999986 }
1000987
1001988 tp_svc_properties_interface_emit_property_flags_changed (
12661266 case 'u':
12671267 case 't':
12681268 {
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);
12701270
12711271 if (error != NULL)
12721272 {
13071307 }
13081308 else
13091309 {
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);
13111311
13121312 if (error != NULL)
13131313 {
55 Name: Telepathy-GLib (uninstalled copy)
66 Description: GLib utility library for the Telepathy framework
77 Version: @VERSION@
8 Requires: pkg-config >= 0.21
98 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
109 Libs: ${abs_top_builddir}/telepathy-glib/libtelepathy-glib.la
1110 Cflags: -I${abs_top_srcdir} -I${abs_top_builddir}
55 Name: Telepathy-GLib
66 Description: GLib utility library for the Telepathy framework
77 Version: @VERSION@
8 Requires: pkg-config >= 0.21
98 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
109 Libs: -L${libdir} -ltelepathy-glib
1110 Cflags: -I${includedir}/telepathy-1.0
719719 }
720720
721721 static void
722 tp_text_channel_prepare_pending_messages_async (TpProxy *proxy,
722 tp_text_channel_prepare_incoming_messages_async (TpProxy *proxy,
723723 const TpProxyFeature *feature,
724724 GAsyncReadyCallback callback,
725725 gpointer user_data)
750750 g_assert (self->priv->pending_messages_result == NULL);
751751 self->priv->pending_messages_result = g_simple_async_result_new (
752752 (GObject *) proxy, callback, user_data,
753 tp_text_channel_prepare_pending_messages_async);
753 tp_text_channel_prepare_incoming_messages_async);
754754
755755
756756 tp_cli_dbus_properties_call_get (proxy, -1,
841841 }
842842
843843 enum {
844 FEAT_PENDING_MESSAGES,
844 FEAT_INCOMING_MESSAGES,
845845 FEAT_SMS,
846846 FEAT_CHAT_STATES,
847847 N_FEAT
857857 if (G_LIKELY (features[0].name != 0))
858858 return features;
859859
860 features[FEAT_PENDING_MESSAGES].name =
860 features[FEAT_INCOMING_MESSAGES].name =
861861 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;
864864
865865 features[FEAT_SMS].name =
866866 TP_TEXT_CHANNEL_FEATURE_SMS;
828828 * 0 if the key was not found or could not be parsed.
829829 *
830830 * Since: 0.7.31
831 * Deprecated: Since 0.21.0. Use g_key_file_get_int64() instead.
831832 */
832833 gint64
833834 tp_g_key_file_get_int64 (GKeyFile *key_file,
876877 * or 0 if the key was not found or could not be parsed.
877878 *
878879 * Since: 0.7.31
880 * Deprecated: Since 0.21.0. Use g_key_file_get_uint64() instead.
879881 */
880882 guint64
881883 tp_g_key_file_get_uint64 (GKeyFile *key_file,
2828
2929 #include <gio/gio.h>
3030
31 #include <telepathy-glib/defs.h>
3132 #include <telepathy-glib/verify.h>
3233
3334 #define tp_verify_statement(R) ((void) tp_verify_true (R))
7475 void tp_g_hash_table_update (GHashTable *target, GHashTable *source,
7576 GBoxedCopyFunc key_dup, GBoxedCopyFunc value_dup);
7677
78 /* See https://bugzilla.gnome.org/show_bug.cgi?id=399880 for glib inclusion */
7779 static inline gboolean
7880 tp_str_empty (const gchar *s)
7981 {
8082 return (s == NULL || s[0] == '\0');
8183 }
8284
85 /* See https://bugzilla.gnome.org/show_bug.cgi?id=685878 for glib inclusion */
8386 gboolean tp_strdiff (const gchar *left, const gchar *right);
8487
8588 gpointer tp_mixin_offset_cast (gpointer instance, guint offset);
8891
8992 gchar *tp_escape_as_identifier (const gchar *name) G_GNUC_WARN_UNUSED_RESULT;
9093
94 /* See https://bugzilla.gnome.org/show_bug.cgi?id=685880 for glib inclusion */
9195 gboolean tp_strv_contains (const gchar * const *strv, const gchar *str);
9296
97 #ifndef TP_DISABLE_DEPRECATED
98 _TP_DEPRECATED_IN_0_22_FOR(g_key_file_get_int64)
9399 gint64 tp_g_key_file_get_int64 (GKeyFile *key_file, const gchar *group_name,
94100 const gchar *key, GError **error);
101 _TP_DEPRECATED_IN_0_22_FOR(g_key_file_get_uint64)
95102 guint64 tp_g_key_file_get_uint64 (GKeyFile *key_file, const gchar *group_name,
96103 const gchar *key, GError **error);
104 #endif
97105
106 /* g_signal_connect_object() has been fixed in GLib 2.36, we can deprecate this
107 * once we depend on that version. */
98108 gulong tp_g_signal_connect_object (gpointer instance,
99109 const gchar *detailed_signal, GCallback c_handler, gpointer gobject,
100110 GConnectFlags connect_flags);
106116 gsize len,
107117 ...);
108118
119 /* See https://bugzilla.gnome.org/show_bug.cgi?id=680813 for glib inclusion */
109120 typedef struct _TpWeakRef TpWeakRef;
110121 TpWeakRef *tp_weak_ref_new (gpointer object,
111122 gpointer user_data,
149160 gboolean tp_user_action_time_should_present (gint64 user_action_time,
150161 guint32 *x11_time);
151162
163 /* See https://bugzilla.gnome.org/show_bug.cgi?id=610969 for glib inclusion */
152164 gchar *tp_utf8_make_valid (const gchar *name);
153165
154166 G_END_DECLS
613613 }
614614
615615 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
616633 test_addressing (Test *test,
617634 gconstpointer mode)
618635 {
619636 GQuark account_features[] = { TP_ACCOUNT_FEATURE_ADDRESSING, 0 };
620637 const gchar * const *schemes;
638 GStrv tmp;
621639
622640 test->account = tp_account_new (test->dbus, ACCOUNT_PATH, NULL);
623641 g_assert (test->account != NULL);
644662 g_main_loop_run (test->mainloop);
645663
646664 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);
651673
652674 g_assert (tp_account_associated_with_uri_scheme (test->account,
653675 "about"));
656678 g_assert (!tp_account_associated_with_uri_scheme (test->account,
657679 "xmpp"));
658680
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"));
659689 }
660690
661691 static void
1717 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
1818 */
1919
20 #include "config.h"
21
2022 #include <telepathy-glib/telepathy-glib.h>
2123 #include <telepathy-glib/proxy-subclass.h>
2224
1212 #include <telepathy-glib/connection.h>
1313
1414 #include "examples/cm/contactlist/conn.h"
15 #include "tests/lib/debug.h"
1516 #include "tests/lib/util.h"
1617
1718 typedef enum {
9596 GHashTable *contact_attributes;
9697
9798 GMainLoop *main_loop;
99 GError *error /* = NULL */;
98100 } Test;
99101
100102 static void
363365 }
364366
365367 static void
366 setup (Test *test,
367 gconstpointer data)
368 test_connect_and_finish_setup (Test *test)
368369 {
369370 GQuark features[] = { TP_CONNECTION_FEATURE_CONNECTED, 0 };
370
371 setup_pre_connect (test, data);
372371
373372 tp_cli_connection_call_connect (test->conn, -1, NULL, NULL, NULL, NULL);
374373 tp_tests_proxy_run_until_prepared (test->conn, features);
424423 }
425424
426425 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
427434 test_clear_log (Test *test)
428435 {
429436 g_ptr_array_foreach (test->log, (GFunc) log_entry_free, NULL);
442449 tp_clear_object (&test->conn);
443450 tp_clear_object (&test->dbus);
444451 tp_clear_pointer (&test->main_loop, g_main_loop_unref);
452 g_clear_error (&test->error);
445453 }
446454
447455 static void
676684 }
677685
678686 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
679727 test_initial_channels (Test *test,
680728 gconstpointer nil G_GNUC_UNUSED)
681729 {
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
682739 test->publish = test_ensure_channel (test, TP_HANDLE_TYPE_LIST, "publish");
683740 test->subscribe = test_ensure_channel (test, TP_HANDLE_TYPE_LIST,
684741 "subscribe");
743800 ==, 0);
744801 g_assert (tp_intset_is_member (tp_channel_group_get_members (test->deny),
745802 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));
746808 }
747809
748810 static void
26872749 Test, NULL, setup, test_nothing, teardown);
26882750
26892751 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);
26912753 g_test_add ("/contact-lists/properties",
26922754 Test, NULL, setup, test_properties, teardown);
26932755 g_test_add ("/contact-lists/contacts",
358358 &result, finish, NULL);
359359 g_main_loop_run (result.loop);
360360 g_assert_no_error (result.error);
361 g_object_ref (g_ptr_array_index (result.contacts, 0));
362361 reset_result (&result);
363362
364363 tp_connection_set_contact_info_async (client_conn, info_list,
14991498 &result, finish, NULL);
15001499 g_main_loop_run (result.loop);
15011500 g_assert_no_error (result.error);
1502 reset_result (&f->result);
1501 reset_result (&result);
15031502
15041503 put_the_connection_back (f);
15051504
22432242 g_assert (contact != alice);
22442243 g_assert_cmpstr (tp_contact_get_identifier (contact), ==, "bob");
22452244 g_assert_cmpuint (tp_contact_get_handle (contact), ==, bob_handle);
2245 g_object_unref (contact);
2246 g_object_unref (alice);
22462247 }
22472248
22482249 typedef struct
26912692 gconstpointer unused G_GNUC_UNUSED)
26922693 {
26932694 const GQuark conn_features[] = { TP_CONNECTION_FEATURE_CONTACT_LIST, 0 };
2695 const GQuark feature_connected[] = { TP_CONNECTION_FEATURE_CONNECTED, 0 };
26942696 Result result = { g_main_loop_new (NULL, FALSE), NULL, NULL, NULL };
26952697 TpTestsContactListManager *manager;
26962698 TpSimpleClientFactory *factory;
27322734 g_signal_connect_swapped (f->client_conn, "notify::contact-list-state",
27332735 G_CALLBACK (finish), &result);
27342736 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);
27372738
27382739 g_assert_cmpint (tp_connection_get_contact_list_state (f->client_conn), ==,
27392740 TP_CONTACT_LIST_STATE_SUCCESS);
28312832 dbus_message_get_path (msg), TP_IFACE_CHANNEL_INTERFACE_GROUP,
28322833 TP_HANDLE_TYPE_LIST, 0, NULL);
28332834 tp_proxy_prepare_async (channel, NULL, channel_prepared_cb, closure);
2835 g_object_unref (channel);
28342836
28352837 /* Extract the number of added handles */
28362838 dbus_message_iter_init (msg, &iter);
28542856 gconstpointer unused G_GNUC_UNUSED)
28552857 {
28562858 const GQuark conn_features[] = { TP_CONNECTION_FEATURE_CONTACT_LIST, 0 };
2859 const GQuark feature_connected[] = { TP_CONNECTION_FEATURE_CONNECTED, 0 };
28572860 TpTestsContactListManager *manager;
28582861 MembersChangedClosure closure;
28592862 DBusConnection *dbus_connection;
29012904 tp_cli_connection_call_connect (f->client_conn, -1,
29022905 NULL, NULL, NULL, NULL);
29032906
2904 g_main_loop_run (closure.loop);
2907 tp_tests_proxy_run_until_prepared (f->client_conn, feature_connected);
29052908
29062909 dbus_bus_remove_match (dbus_connection, MEMBERS_CHANGED_MATCH_RULE, NULL);
29072910 dbus_connection_remove_filter (dbus_connection, message_filter, &closure);
29732976 gconstpointer unused G_GNUC_UNUSED)
29742977 {
29752978 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
29792989 f->service_repo = NULL;
29802990 tp_clear_object (&f->service_conn);
29812991 tp_clear_object (&f->base_connection);
7979 gchar *presence_msg;
8080 gchar *connection_path;
8181 gboolean enabled;
82 GPtrArray *uri_schemes;
8283 };
8384
8485 static void
121122 #undef IMPLEMENT
122123 }
123124
125 /* you may have noticed this is not entirely realistic */
126 static const gchar * const uri_schemes[] = { "about", "telnet", NULL };
124127
125128 static void
126129 tp_tests_simple_account_init (TpTestsSimpleAccount *self)
127130 {
131 guint i;
132
128133 self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, TP_TESTS_TYPE_SIMPLE_ACCOUNT,
129134 TpTestsSimpleAccountPrivate);
130135
133138 self->priv->presence_msg = g_strdup ("this is my CurrentPresence");
134139 self->priv->connection_path = g_strdup ("/");
135140 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 }
140146
141147 static void
142148 tp_tests_simple_account_get_property (GObject *object,
230236 TP_STORAGE_RESTRICTION_FLAG_CANNOT_SET_PARAMETERS);
231237 break;
232238 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 }
234252 break;
235253 case PROP_AVATAR:
236254 {
272290 g_free (self->priv->presence_status);
273291 g_free (self->priv->presence_msg);
274292 g_free (self->priv->connection_path);
293
294 g_ptr_array_unref (self->priv->uri_schemes);
275295
276296 G_OBJECT_CLASS (tp_tests_simple_account_parent_class)->finalize (object);
277297 }
577597 tp_svc_account_emit_account_property_changed (self, change);
578598 g_hash_table_unref (change);
579599 }
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 }
6363 void tp_tests_simple_account_set_enabled (TpTestsSimpleAccount *self,
6464 gboolean enabled);
6565
66 void tp_tests_simple_account_add_uri_scheme (TpTestsSimpleAccount *self,
67 const gchar * uri_scheme);
68
6669 G_END_DECLS
6770
6871 #endif /* #ifndef __TP_TESTS_SIMPLE_ACCOUNT_H__ */
22 from sys import argv, stdout, stderr
33 import xml.dom.minidom
44
5 from libtpcodegen import file_set_contents
5 from libtpcodegen import file_set_contents, u
66 from libglibcodegen import NS_TP, get_docstring, \
77 get_descendant_text, get_by_path
88
1111 self.prefix = prefix + '_'
1212 self.spec = get_by_path(dom, "spec")[0]
1313
14 self.output_base = output_base
14 self.output_base = output_base
1515 self.__header = []
1616 self.__docs = []
1717
2020 self.do_body()
2121 self.do_footer()
2222
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'))
2525
2626 def write(self, code):
27 self.__header.append(code.encode('utf-8'))
27 self.__header.append(code)
2828
2929 def d(self, code):
30 self.__docs.append(code.encode('utf-8'))
30 self.__docs.append(code)
3131
3232 # Header
3333 def do_header(self):
2626 import xml.dom.minidom
2727 from getopt import gnu_getopt
2828
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, \
3131 get_docstring, xml_escape, get_deprecated
3232
3333
7373 self.guard = opts.get('--guard', None)
7474
7575 def h(self, s):
76 if isinstance(s, unicode):
77 s = s.encode('utf-8')
7876 self.__header.append(s)
7977
8078 def b(self, s):
81 if isinstance(s, unicode):
82 s = s.encode('utf-8')
8379 self.__body.append(s)
8480
8581 def d(self, s):
86 if isinstance(s, unicode):
87 s = s.encode('utf-8')
8882 self.__docs.append(s)
8983
9084 def get_iface_quark(self):
11901184 self.b('')
11911185
11921186 nodes = self.dom.getElementsByTagName('node')
1193 nodes.sort(cmp_by_name)
1187 nodes.sort(key=key_by_name)
11941188
11951189 for node in nodes:
11961190 self.do_interface(node)
12431237 self.h('#endif /* defined (%s) */' % self.guard)
12441238 self.h('')
12451239
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'))
12491243
12501244 def types_to_gtypes(types):
12511245 return [type_to_gtype(t)[1] for t in types]
3030 for signal in signals:
3131 self.do_signal(signal)
3232
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('{')
3636
37 all = self.marshallers.keys()
37 all = list(self.marshallers.keys())
3838 all.sort()
3939 for marshaller in all:
4040 rhs = self.marshallers[marshaller]
4141
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 */')
4545 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);')
4848
49 print '}'
49 print('}')
5050
5151
5252 def types_to_gtypes(types):
1111
1212 def __call__(self):
1313
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);')
2121
2222 for error in self.errors.getElementsByTagNameNS(NS_TP, 'error'):
2323 ns = error.parentNode.getAttribute('namespace')
2727 s = ('TP_ERROR_STR_' +
2828 error.getAttribute('name').replace(' ', '_').replace('.', '_').upper())
2929
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))
5252
53 print '}'
53 print('}')
5454
5555 if __name__ == '__main__':
5656 argv = sys.argv[1:]
22 import sys
33 import xml.dom.minidom
44
5 from libtpcodegen import file_set_contents
5 from libtpcodegen import file_set_contents, u
66 from libglibcodegen import NS_TP, get_docstring, xml_escape
77
88 class Generator(object):
1616 self.__docs = []
1717
1818 def h(self, s):
19 if isinstance(s, unicode):
20 s = s.encode('utf-8')
2119 self.__header.append(s)
2220
2321 def b(self, s):
24 if isinstance(s, unicode):
25 s = s.encode('utf-8')
2622 self.__body.append(s)
2723
2824 def d(self, s):
29 if isinstance(s, unicode):
30 s = s.encode('utf-8')
3125 self.__docs.append(s)
3226
3327 def __call__(self):
7165 self.h('')
7266 self.b('')
7367
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'))
7771
7872 if __name__ == '__main__':
7973 argv = sys.argv[1:]
2525 import os.path
2626 import xml.dom.minidom
2727
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, \
3030 NS_TP, dbus_gutils_wincaps_to_uscore
3131
3232
8484 self.allow_havoc = allow_havoc
8585
8686 def h(self, s):
87 if isinstance(s, unicode):
88 s = s.encode('utf-8')
8987 self.__header.append(s)
9088
9189 def b(self, s):
92 if isinstance(s, unicode):
93 s = s.encode('utf-8')
9490 self.__body.append(s)
9591
9692 def d(self, s):
97 if isinstance(s, unicode):
98 s = s.encode('utf-8')
9993 self.__docs.append(s)
10094
10195 def do_node(self, node):
732726
733727 def __call__(self):
734728 nodes = self.dom.getElementsByTagName('node')
735 nodes.sort(cmp_by_name)
729 nodes.sort(key=key_by_name)
736730
737731 self.h('#include <glib-object.h>')
738732 self.h('#include <dbus/dbus-glib.h>')
760754
761755 self.h('')
762756 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'))
766760
767761 def cmdline_error():
768 print """\
762 print("""\
769763 usage:
770764 gen-ginterface [OPTIONS] xmlfile Prefix_
771765 options:
785779 void symbol (DBusGMethodInvocation *context)
786780 and return some sort of "not implemented" error via
787781 dbus_g_method_return_error (context, ...)
788 """
782 """)
789783 sys.exit(1)
790784
791785
2222 import sys
2323 import xml.dom.minidom
2424
25 from libtpcodegen import file_set_contents
25 from libtpcodegen import file_set_contents, u
2626 from libglibcodegen import escape_as_identifier, \
2727 get_docstring, \
2828 NS_TP, \
6767 self.need_other_arrays = {}
6868
6969 def h(self, code):
70 self.header.append(code.encode("utf-8"))
70 self.header.append(code)
7171
7272 def c(self, code):
73 self.body.append(code.encode("utf-8"))
73 self.body.append(code)
7474
7575 def d(self, code):
76 self.docs.append(code.encode('utf-8'))
76 self.docs.append(code)
7777
7878 def do_mapping_header(self, mapping):
7979 members = mapping.getElementsByTagNameNS(NS_TP, 'member')
291291 self.c(' return t;\n')
292292 self.c('}\n\n')
293293
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'))
297297
298298 if __name__ == '__main__':
299299 argv = sys.argv[1:]
22 from sys import argv, stdout, stderr
33 import xml.dom.minidom
44
5 from libtpcodegen import file_set_contents
5 from libtpcodegen import file_set_contents, u
66 from libglibcodegen import NS_TP, get_docstring, \
77 get_descendant_text, get_by_path
88
2323 self.spec = get_by_path(dom, "spec")[0]
2424
2525 def h(self, code):
26 self.decls.append(code.encode('utf-8'))
26 self.decls.append(code)
2727
2828 def c(self, code):
29 self.impls.append(code.encode('utf-8'))
29 self.impls.append(code)
3030
3131 def d(self, code):
32 self.docs.append(code.encode('utf-8'))
32 self.docs.append(code)
3333
3434 def __call__(self):
3535 for f in self.h, self.c:
3636 self.do_header(f)
3737 self.do_body()
3838
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'))
4242
4343 # Header
4444 def do_header(self, f):
8686
8787 head, tail = argv
8888
89 print '\n'.join(gobject_header(head, tail, as_interface=as_interface))
89 print('\n'.join(gobject_header(head, tail, as_interface=as_interface)))
153153 return ("GHashTable *", "DBUS_TYPE_G_STRING_STRING_HASHTABLE", "BOXED", False)
154154 elif s[:2] == 'a{': #some arbitrary hash tables
155155 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)
157157 first = type_to_gtype(s[2])
158158 second = type_to_gtype(s[3:-1])
159159 return ("GHashTable *", "(dbus_g_type_get_map (\"GHashTable\", " + first[1] + ", " + second[1] + "))", "BOXED", False)
168168 return ("GValueArray *", gtype, "BOXED", True)
169169
170170 # 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)
2020 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
2121
2222 import os
23 import sys
2324 from string import ascii_letters, digits
2425
2526
2627 NS_TP = "http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0"
2728
2829 _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')
2944
3045 def file_set_contents(filename, contents):
3146 try:
3752 except OSError:
3853 pass
3954
40 open(filename + '.tmp', 'w').write(contents)
55 open(filename + '.tmp', 'wb').write(contents)
4156 os.rename(filename + '.tmp', filename)
4257
4358 def cmp_by_name(node1, node2):
4459 return cmp(node1.getAttributeNode("name").nodeValue,
4560 node2.getAttributeNode("name").nodeValue)
4661
62 def key_by_name(node):
63 return node.getAttributeNode("name").nodeValue
4764
4865 def escape_as_identifier(identifier):
4966 """Escape the given string to be a valid D-Bus object path or service
167184 self.remaining = string
168185
169186 def next(self):
187 return self.__next__()
188
189 def __next__(self):
170190 if self.remaining == '':
171191 raise StopIteration
172192
6262
6363 if dpkg:
6464 assert dpkg_first_line is not None
65 print dpkg_first_line
65 print(dpkg_first_line)
6666 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)
6868
6969 for filename in abifiles:
7070 lines = open(filename, 'r').readlines()
119119 lines = lines[cut:]
120120
121121 if gnuld:
122 print "%s {" % version
123 print " global:"
122 print("%s {" % version)
123 print(" global:")
124124
125125 for symbol in lines:
126126 symbol = symbol.strip()
129129 continue
130130
131131 if gnuld:
132 print " %s;" % symbol
132 print(" %s;" % symbol)
133133 elif dpkg:
134134 dpkg_symbols.append('%s@%s %s' % (symbol, version, release))
135135
141141
142142 if gnuld:
143143 if extends == '-':
144 print " local:"
145 print " *;"
146 print "};"
144 print(" local:")
145 print(" *;")
146 print("};")
147147 else:
148 print "} %s;" % extends
149 print
148 print("} %s;" % extends)
149 print("")
150150
151151 if dpkg:
152152 dpkg_symbols.sort()
153153 dpkg_versions.sort()
154154
155155 for x in dpkg_versions:
156 print " %s" % x
156 print(" %s" % x)
157157
158158 for x in dpkg_symbols:
159 print " %s" % x
159 print(" %s" % x)
160160
161161 if symbol_set is not None:
162162 missing = versioned_symbols - symbol_set
181181 raise SystemExit(1)
182182
183183 if gnuld:
184 print "%s {" % unreleased_version
185 print " global:"
184 print("%s {" % unreleased_version)
185 print(" global:")
186186
187187 for symbol in unreleased:
188 print " %s;" % symbol
189
190 print "} %s;" % version
188 print(" %s;" % symbol)
189
190 print("} %s;" % version)
191191
192192
193193 if __name__ == '__main__':
00 #!/usr/bin/python
11
2 import sys
23 from sys import argv, stdout, stderr
34 import codecs, locale
45 import os
56 import xml.dom.minidom
67
7 stdout = codecs.getwriter('utf-8')(stdout)
8 if sys.version_info[0] < 3:
9 stdout = codecs.getwriter('utf-8')(stdout)
810
911 NS_XI = 'http://www.w3.org/2001/XInclude'
1012
1113 def xincludate(dom, base, dropns = []):
1214 remove_attrs = []
13 for i in xrange(dom.documentElement.attributes.length):
15 for i in range(dom.documentElement.attributes.length):
1416 attr = dom.documentElement.attributes.item(i)
1517 if attr.prefix == 'xmlns':
1618 if attr.localName in dropns:
3335 argv = argv[1:]
3436 dom = xml.dom.minidom.parse(argv[0])
3537 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
3744 stdout.write(xml)
3845 stdout.write('\n')