This file is indexed.

/usr/share/doc/libtelepathy-glib-doc/telepathy-glib/telepathy-glib-util.html is in libtelepathy-glib-doc 0.22.1-1ubuntu2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

   1
   2
   3
   4
   5
   6
   7
   8
   9
  10
  11
  12
  13
  14
  15
  16
  17
  18
  19
  20
  21
  22
  23
  24
  25
  26
  27
  28
  29
  30
  31
  32
  33
  34
  35
  36
  37
  38
  39
  40
  41
  42
  43
  44
  45
  46
  47
  48
  49
  50
  51
  52
  53
  54
  55
  56
  57
  58
  59
  60
  61
  62
  63
  64
  65
  66
  67
  68
  69
  70
  71
  72
  73
  74
  75
  76
  77
  78
  79
  80
  81
  82
  83
  84
  85
  86
  87
  88
  89
  90
  91
  92
  93
  94
  95
  96
  97
  98
  99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 231
 232
 233
 234
 235
 236
 237
 238
 239
 240
 241
 242
 243
 244
 245
 246
 247
 248
 249
 250
 251
 252
 253
 254
 255
 256
 257
 258
 259
 260
 261
 262
 263
 264
 265
 266
 267
 268
 269
 270
 271
 272
 273
 274
 275
 276
 277
 278
 279
 280
 281
 282
 283
 284
 285
 286
 287
 288
 289
 290
 291
 292
 293
 294
 295
 296
 297
 298
 299
 300
 301
 302
 303
 304
 305
 306
 307
 308
 309
 310
 311
 312
 313
 314
 315
 316
 317
 318
 319
 320
 321
 322
 323
 324
 325
 326
 327
 328
 329
 330
 331
 332
 333
 334
 335
 336
 337
 338
 339
 340
 341
 342
 343
 344
 345
 346
 347
 348
 349
 350
 351
 352
 353
 354
 355
 356
 357
 358
 359
 360
 361
 362
 363
 364
 365
 366
 367
 368
 369
 370
 371
 372
 373
 374
 375
 376
 377
 378
 379
 380
 381
 382
 383
 384
 385
 386
 387
 388
 389
 390
 391
 392
 393
 394
 395
 396
 397
 398
 399
 400
 401
 402
 403
 404
 405
 406
 407
 408
 409
 410
 411
 412
 413
 414
 415
 416
 417
 418
 419
 420
 421
 422
 423
 424
 425
 426
 427
 428
 429
 430
 431
 432
 433
 434
 435
 436
 437
 438
 439
 440
 441
 442
 443
 444
 445
 446
 447
 448
 449
 450
 451
 452
 453
 454
 455
 456
 457
 458
 459
 460
 461
 462
 463
 464
 465
 466
 467
 468
 469
 470
 471
 472
 473
 474
 475
 476
 477
 478
 479
 480
 481
 482
 483
 484
 485
 486
 487
 488
 489
 490
 491
 492
 493
 494
 495
 496
 497
 498
 499
 500
 501
 502
 503
 504
 505
 506
 507
 508
 509
 510
 511
 512
 513
 514
 515
 516
 517
 518
 519
 520
 521
 522
 523
 524
 525
 526
 527
 528
 529
 530
 531
 532
 533
 534
 535
 536
 537
 538
 539
 540
 541
 542
 543
 544
 545
 546
 547
 548
 549
 550
 551
 552
 553
 554
 555
 556
 557
 558
 559
 560
 561
 562
 563
 564
 565
 566
 567
 568
 569
 570
 571
 572
 573
 574
 575
 576
 577
 578
 579
 580
 581
 582
 583
 584
 585
 586
 587
 588
 589
 590
 591
 592
 593
 594
 595
 596
 597
 598
 599
 600
 601
 602
 603
 604
 605
 606
 607
 608
 609
 610
 611
 612
 613
 614
 615
 616
 617
 618
 619
 620
 621
 622
 623
 624
 625
 626
 627
 628
 629
 630
 631
 632
 633
 634
 635
 636
 637
 638
 639
 640
 641
 642
 643
 644
 645
 646
 647
 648
 649
 650
 651
 652
 653
 654
 655
 656
 657
 658
 659
 660
 661
 662
 663
 664
 665
 666
 667
 668
 669
 670
 671
 672
 673
 674
 675
 676
 677
 678
 679
 680
 681
 682
 683
 684
 685
 686
 687
 688
 689
 690
 691
 692
 693
 694
 695
 696
 697
 698
 699
 700
 701
 702
 703
 704
 705
 706
 707
 708
 709
 710
 711
 712
 713
 714
 715
 716
 717
 718
 719
 720
 721
 722
 723
 724
 725
 726
 727
 728
 729
 730
 731
 732
 733
 734
 735
 736
 737
 738
 739
 740
 741
 742
 743
 744
 745
 746
 747
 748
 749
 750
 751
 752
 753
 754
 755
 756
 757
 758
 759
 760
 761
 762
 763
 764
 765
 766
 767
 768
 769
 770
 771
 772
 773
 774
 775
 776
 777
 778
 779
 780
 781
 782
 783
 784
 785
 786
 787
 788
 789
 790
 791
 792
 793
 794
 795
 796
 797
 798
 799
 800
 801
 802
 803
 804
 805
 806
 807
 808
 809
 810
 811
 812
 813
 814
 815
 816
 817
 818
 819
 820
 821
 822
 823
 824
 825
 826
 827
 828
 829
 830
 831
 832
 833
 834
 835
 836
 837
 838
 839
 840
 841
 842
 843
 844
 845
 846
 847
 848
 849
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Utilities</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="index.html" title="telepathy-glib API Reference Manual">
<link rel="up" href="ch-utilities.html" title="Utilities">
<link rel="prev" href="telepathy-glib-version.html" title="Version information">
<link rel="next" href="telepathy-glib-gnio-util.html" title="GNIO Utilities">
<meta name="generator" content="GTK-Doc V1.19 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="telepathy-glib-version.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="ch-utilities.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">telepathy-glib API Reference Manual</th>
<td><a accesskey="n" href="telepathy-glib-gnio-util.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#telepathy-glib-util.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#telepathy-glib-util.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry">
<a name="telepathy-glib-util"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="telepathy-glib-util.top_of_page"></a>Utilities</span></h2>
<p>Utilities — Non-Telepathy utility functions</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="telepathy-glib-util.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include &lt;telepathy-glib/telepathy-glib.h&gt;

#define             <a class="link" href="telepathy-glib-util.html#tp-verify" title="tp_verify()">tp_verify</a>                           (R)
#define             <a class="link" href="telepathy-glib-util.html#tp-verify-true" title="tp_verify_true()">tp_verify_true</a>                      (R)
#define             <a class="link" href="telepathy-glib-util.html#tp-verify-statement" title="tp_verify_statement()">tp_verify_statement</a>                 (R)
<span class="returnvalue">void</span>                <a class="link" href="telepathy-glib-util.html#tp-g-hash-table-update" title="tp_g_hash_table_update ()">tp_g_hash_table_update</a>              (<em class="parameter"><code><span class="type">GHashTable</span> *target</code></em>,
                                                         <em class="parameter"><code><span class="type">GHashTable</span> *source</code></em>,
                                                         <em class="parameter"><code><span class="type">GBoxedCopyFunc</span> key_dup</code></em>,
                                                         <em class="parameter"><code><span class="type">GBoxedCopyFunc</span> value_dup</code></em>);
<span class="returnvalue">gboolean</span>            <a class="link" href="telepathy-glib-util.html#tp-g-ptr-array-contains" title="tp_g_ptr_array_contains ()">tp_g_ptr_array_contains</a>             (<em class="parameter"><code><span class="type">GPtrArray</span> *haystack</code></em>,
                                                         <em class="parameter"><code><span class="type">gpointer</span> needle</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="telepathy-glib-util.html#tp-g-ptr-array-extend" title="tp_g_ptr_array_extend ()">tp_g_ptr_array_extend</a>               (<em class="parameter"><code><span class="type">GPtrArray</span> *target</code></em>,
                                                         <em class="parameter"><code><span class="type">GPtrArray</span> *source</code></em>);
<span class="returnvalue">GValue</span> *            <a class="link" href="telepathy-glib-util.html#tp-g-value-slice-new" title="tp_g_value_slice_new ()">tp_g_value_slice_new</a>                (<em class="parameter"><code><span class="type">GType</span> type</code></em>);
<span class="returnvalue">GValue</span> *            <a class="link" href="telepathy-glib-util.html#tp-g-value-slice-new-boolean" title="tp_g_value_slice_new_boolean ()">tp_g_value_slice_new_boolean</a>        (<em class="parameter"><code><span class="type">gboolean</span> b</code></em>);
<span class="returnvalue">GValue</span> *            <a class="link" href="telepathy-glib-util.html#tp-g-value-slice-new-boxed" title="tp_g_value_slice_new_boxed ()">tp_g_value_slice_new_boxed</a>          (<em class="parameter"><code><span class="type">GType</span> type</code></em>,
                                                         <em class="parameter"><code><span class="type">gconstpointer</span> p</code></em>);
<span class="returnvalue">GValue</span> *            <a class="link" href="telepathy-glib-util.html#tp-g-value-slice-new-static-boxed" title="tp_g_value_slice_new_static_boxed ()">tp_g_value_slice_new_static_boxed</a>   (<em class="parameter"><code><span class="type">GType</span> type</code></em>,
                                                         <em class="parameter"><code><span class="type">gconstpointer</span> p</code></em>);
<span class="returnvalue">GValue</span> *            <a class="link" href="telepathy-glib-util.html#tp-g-value-slice-new-take-boxed" title="tp_g_value_slice_new_take_boxed ()">tp_g_value_slice_new_take_boxed</a>     (<em class="parameter"><code><span class="type">GType</span> type</code></em>,
                                                         <em class="parameter"><code><span class="type">gpointer</span> p</code></em>);
<span class="returnvalue">GValue</span> *            <a class="link" href="telepathy-glib-util.html#tp-g-value-slice-new-double" title="tp_g_value_slice_new_double ()">tp_g_value_slice_new_double</a>         (<em class="parameter"><code><span class="type">double</span> d</code></em>);
<span class="returnvalue">GValue</span> *            <a class="link" href="telepathy-glib-util.html#tp-g-value-slice-new-int" title="tp_g_value_slice_new_int ()">tp_g_value_slice_new_int</a>            (<em class="parameter"><code><span class="type">gint</span> n</code></em>);
<span class="returnvalue">GValue</span> *            <a class="link" href="telepathy-glib-util.html#tp-g-value-slice-new-int64" title="tp_g_value_slice_new_int64 ()">tp_g_value_slice_new_int64</a>          (<em class="parameter"><code><span class="type">gint64</span> n</code></em>);
<span class="returnvalue">GValue</span> *            <a class="link" href="telepathy-glib-util.html#tp-g-value-slice-new-string" title="tp_g_value_slice_new_string ()">tp_g_value_slice_new_string</a>         (<em class="parameter"><code>const <span class="type">gchar</span> *string</code></em>);
<span class="returnvalue">GValue</span> *            <a class="link" href="telepathy-glib-util.html#tp-g-value-slice-new-static-string" title="tp_g_value_slice_new_static_string ()">tp_g_value_slice_new_static_string</a>  (<em class="parameter"><code>const <span class="type">gchar</span> *string</code></em>);
<span class="returnvalue">GValue</span> *            <a class="link" href="telepathy-glib-util.html#tp-g-value-slice-new-take-string" title="tp_g_value_slice_new_take_string ()">tp_g_value_slice_new_take_string</a>    (<em class="parameter"><code><span class="type">gchar</span> *string</code></em>);
<span class="returnvalue">GValue</span> *            <a class="link" href="telepathy-glib-util.html#tp-g-value-slice-new-uint" title="tp_g_value_slice_new_uint ()">tp_g_value_slice_new_uint</a>           (<em class="parameter"><code><span class="type">guint</span> n</code></em>);
<span class="returnvalue">GValue</span> *            <a class="link" href="telepathy-glib-util.html#tp-g-value-slice-new-uint64" title="tp_g_value_slice_new_uint64 ()">tp_g_value_slice_new_uint64</a>         (<em class="parameter"><code><span class="type">guint64</span> n</code></em>);
<span class="returnvalue">GValue</span> *            <a class="link" href="telepathy-glib-util.html#tp-g-value-slice-new-byte" title="tp_g_value_slice_new_byte ()">tp_g_value_slice_new_byte</a>           (<em class="parameter"><code><span class="type">guchar</span> n</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="telepathy-glib-util.html#tp-g-value-slice-free" title="tp_g_value_slice_free ()">tp_g_value_slice_free</a>               (<em class="parameter"><code><span class="type">GValue</span> *value</code></em>);
<span class="returnvalue">GValue</span> *            <a class="link" href="telepathy-glib-util.html#tp-g-value-slice-dup" title="tp_g_value_slice_dup ()">tp_g_value_slice_dup</a>                (<em class="parameter"><code>const <span class="type">GValue</span> *value</code></em>);
<span class="returnvalue">gboolean</span>            <a class="link" href="telepathy-glib-util.html#tp-str-empty" title="tp_str_empty ()">tp_str_empty</a>                        (<em class="parameter"><code>const <span class="type">gchar</span> *s</code></em>);
<span class="returnvalue">gboolean</span>            <a class="link" href="telepathy-glib-util.html#tp-strdiff" title="tp_strdiff ()">tp_strdiff</a>                          (<em class="parameter"><code>const <span class="type">gchar</span> *left</code></em>,
                                                         <em class="parameter"><code>const <span class="type">gchar</span> *right</code></em>);
<span class="returnvalue">gpointer</span>            <a class="link" href="telepathy-glib-util.html#tp-mixin-offset-cast" title="tp_mixin_offset_cast ()">tp_mixin_offset_cast</a>                (<em class="parameter"><code><span class="type">gpointer</span> instance</code></em>,
                                                         <em class="parameter"><code><span class="type">guint</span> offset</code></em>);
<span class="returnvalue">guint</span>               <a class="link" href="telepathy-glib-util.html#tp-mixin-class-get-offset" title="tp_mixin_class_get_offset ()">tp_mixin_class_get_offset</a>           (<em class="parameter"><code><span class="type">gpointer</span> klass</code></em>,
                                                         <em class="parameter"><code><span class="type">GQuark</span> quark</code></em>);
<span class="returnvalue">guint</span>               <a class="link" href="telepathy-glib-util.html#tp-mixin-instance-get-offset" title="tp_mixin_instance_get_offset ()">tp_mixin_instance_get_offset</a>        (<em class="parameter"><code><span class="type">gpointer</span> instance</code></em>,
                                                         <em class="parameter"><code><span class="type">GQuark</span> quark</code></em>);
<span class="returnvalue">gchar</span> *             <a class="link" href="telepathy-glib-util.html#tp-escape-as-identifier" title="tp_escape_as_identifier ()">tp_escape_as_identifier</a>             (<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>);
<span class="returnvalue">gboolean</span>            <a class="link" href="telepathy-glib-util.html#tp-strv-contains" title="tp_strv_contains ()">tp_strv_contains</a>                    (<em class="parameter"><code>const <span class="type">gchar</span> * const *strv</code></em>,
                                                         <em class="parameter"><code>const <span class="type">gchar</span> *str</code></em>);
<span class="returnvalue">gint64</span>              <a class="link" href="telepathy-glib-util.html#tp-g-key-file-get-int64" title="tp_g_key_file_get_int64 ()">tp_g_key_file_get_int64</a>             (<em class="parameter"><code><span class="type">GKeyFile</span> *key_file</code></em>,
                                                         <em class="parameter"><code>const <span class="type">gchar</span> *group_name</code></em>,
                                                         <em class="parameter"><code>const <span class="type">gchar</span> *key</code></em>,
                                                         <em class="parameter"><code><span class="type">GError</span> **error</code></em>);
<span class="returnvalue">guint64</span>             <a class="link" href="telepathy-glib-util.html#tp-g-key-file-get-uint64" title="tp_g_key_file_get_uint64 ()">tp_g_key_file_get_uint64</a>            (<em class="parameter"><code><span class="type">GKeyFile</span> *key_file</code></em>,
                                                         <em class="parameter"><code>const <span class="type">gchar</span> *group_name</code></em>,
                                                         <em class="parameter"><code>const <span class="type">gchar</span> *key</code></em>,
                                                         <em class="parameter"><code><span class="type">GError</span> **error</code></em>);
<span class="returnvalue">gulong</span>              <a class="link" href="telepathy-glib-util.html#tp-g-signal-connect-object" title="tp_g_signal_connect_object ()">tp_g_signal_connect_object</a>          (<em class="parameter"><code><span class="type">gpointer</span> instance</code></em>,
                                                         <em class="parameter"><code>const <span class="type">gchar</span> *detailed_signal</code></em>,
                                                         <em class="parameter"><code><span class="type">GCallback</span> c_handler</code></em>,
                                                         <em class="parameter"><code><span class="type">gpointer</span> gobject</code></em>,
                                                         <em class="parameter"><code><span class="type">GConnectFlags</span> connect_flags</code></em>);
<span class="returnvalue">GValueArray</span> *       <a class="link" href="telepathy-glib-util.html#tp-value-array-build" title="tp_value_array_build ()">tp_value_array_build</a>                (<em class="parameter"><code><span class="type">gsize</span> length</code></em>,
                                                         <em class="parameter"><code><span class="type">GType</span> type</code></em>,
                                                         <em class="parameter"><code>...</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="telepathy-glib-util.html#tp-value-array-unpack" title="tp_value_array_unpack ()">tp_value_array_unpack</a>               (<em class="parameter"><code><span class="type">GValueArray</span> *array</code></em>,
                                                         <em class="parameter"><code><span class="type">gsize</span> len</code></em>,
                                                         <em class="parameter"><code>...</code></em>);
                    <a class="link" href="telepathy-glib-util.html#TpWeakRef" title="TpWeakRef">TpWeakRef</a>;
<a class="link" href="telepathy-glib-util.html#TpWeakRef" title="TpWeakRef"><span class="returnvalue">TpWeakRef</span></a> *         <a class="link" href="telepathy-glib-util.html#tp-weak-ref-new" title="tp_weak_ref_new ()">tp_weak_ref_new</a>                     (<em class="parameter"><code><span class="type">gpointer</span> object</code></em>,
                                                         <em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>,
                                                         <em class="parameter"><code><span class="type">GDestroyNotify</span> destroy</code></em>);
<span class="returnvalue">gpointer</span>            <a class="link" href="telepathy-glib-util.html#tp-weak-ref-dup-object" title="tp_weak_ref_dup_object ()">tp_weak_ref_dup_object</a>              (<em class="parameter"><code><a class="link" href="telepathy-glib-util.html#TpWeakRef" title="TpWeakRef"><span class="type">TpWeakRef</span></a> *self</code></em>);
<span class="returnvalue">gpointer</span>            <a class="link" href="telepathy-glib-util.html#tp-weak-ref-get-user-data" title="tp_weak_ref_get_user_data ()">tp_weak_ref_get_user_data</a>           (<em class="parameter"><code><a class="link" href="telepathy-glib-util.html#TpWeakRef" title="TpWeakRef"><span class="type">TpWeakRef</span></a> *self</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="telepathy-glib-util.html#tp-weak-ref-destroy" title="tp_weak_ref_destroy ()">tp_weak_ref_destroy</a>                 (<em class="parameter"><code><a class="link" href="telepathy-glib-util.html#TpWeakRef" title="TpWeakRef"><span class="type">TpWeakRef</span></a> *self</code></em>);
#define             <a class="link" href="telepathy-glib-util.html#tp-clear-pointer" title="tp_clear_pointer()">tp_clear_pointer</a>                    (pp,
                                                         destroy)
#define             <a class="link" href="telepathy-glib-util.html#tp-clear-object" title="tp_clear_object()">tp_clear_object</a>                     (op)
#define             <a class="link" href="telepathy-glib-util.html#tp-clear-boxed" title="tp_clear_boxed()">tp_clear_boxed</a>                      (gtype,
                                                         pp)
<span class="returnvalue">void</span>                <a class="link" href="telepathy-glib-util.html#tp-simple-async-report-success-in-idle" title="tp_simple_async_report_success_in_idle ()">tp_simple_async_report_success_in_idle</a>
                                                        (<em class="parameter"><code><span class="type">GObject</span> *source</code></em>,
                                                         <em class="parameter"><code><span class="type">GAsyncReadyCallback</span> callback</code></em>,
                                                         <em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>,
                                                         <em class="parameter"><code><span class="type">gpointer</span> source_tag</code></em>);
<span class="returnvalue">gint64</span>              <a class="link" href="telepathy-glib-util.html#tp-user-action-time-from-x11" title="tp_user_action_time_from_x11 ()">tp_user_action_time_from_x11</a>        (<em class="parameter"><code><span class="type">guint32</span> x11_time</code></em>);
<span class="returnvalue">gboolean</span>            <a class="link" href="telepathy-glib-util.html#tp-user-action-time-should-present" title="tp_user_action_time_should_present ()">tp_user_action_time_should_present</a>  (<em class="parameter"><code><span class="type">gint64</span> user_action_time</code></em>,
                                                         <em class="parameter"><code><span class="type">guint32</span> *x11_time</code></em>);
<span class="returnvalue">gchar</span> *             <a class="link" href="telepathy-glib-util.html#tp-utf8-make-valid" title="tp_utf8_make_valid ()">tp_utf8_make_valid</a>                  (<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="telepathy-glib-util.description"></a><h2>Description</h2>
<p>
Some utility functions used in telepathy-glib which could have been in
GLib, but aren't.
</p>
</div>
<div class="refsect1">
<a name="telepathy-glib-util.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="tp-verify"></a><h3>tp_verify()</h3>
<pre class="programlisting"># define tp_verify(R) extern int (* tp_verify_function__ (void)) [tp_verify_true (R)]
</pre>
<p>
Make an assertion at compile time, like C++0x's proposed static_assert
keyword. If <em class="parameter"><code>R</code></em> is determined to be true, there is no overhead at runtime;
if <em class="parameter"><code>R</code></em> is determined to be false, compilation will fail.
</p>
<p>
This macro can be used at file scope (it expands to a dummy extern
declaration).
</p>
<p>
(This is gnulib's verify macro, written by Paul Eggert, Bruno Haible and
Jim Meyering.)
</p>
<p>
This macro will be deprecated in a future telepathy-glib release. Please
use GLib 2.20's <code class="function">G_STATIC_ASSERT()</code> macro in new code.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>R</code></em> :</span></p></td>
<td>a requirement (constant expression) to be checked at compile-time</td>
</tr></tbody>
</table></div>
<p class="since">Since 0.7.34</p>
</div>
<hr>
<div class="refsect2">
<a name="tp-verify-true"></a><h3>tp_verify_true()</h3>
<pre class="programlisting">#define             tp_verify_true(R)</pre>
<p>
Make an assertion at compile time, like C++0x's proposed static_assert
keyword. If <em class="parameter"><code>R</code></em> is determined to be true, there is no overhead at runtime,
and the macro evaluates to 1 as an integer constant expression;
if <em class="parameter"><code>R</code></em> is determined to be false, compilation will fail.
</p>
<p>
This macro can be used anywhere that an integer constant expression would
be allowed.
</p>
<p>
(This is gnulib's verify_true macro, written by Paul Eggert, Bruno Haible
and Jim Meyering.)
</p>
<p>
This macro will be deprecated in a future telepathy-glib release. Please
use GLib 2.20's <code class="function">G_STATIC_ASSERT()</code> macro in new code.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>R</code></em> :</span></p></td>
<td>a requirement (constant expression) to be checked at compile-time</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>1</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 0.7.34</p>
</div>
<hr>
<div class="refsect2">
<a name="tp-verify-statement"></a><h3>tp_verify_statement()</h3>
<pre class="programlisting">#define tp_verify_statement(R) ((void) tp_verify_true (R))
</pre>
<p>
Make an assertion at compile time, like C++0x's proposed static_assert
keyword. If <em class="parameter"><code>R</code></em> is determined to be true, there is no overhead at runtime;
if <em class="parameter"><code>R</code></em> is determined to be false, compilation will fail.
</p>
<p>
This macro can be used anywhere that a statement would be allowed; it
is equivalent to ((void) tp_verify_true (R)).
</p>
<p>
This macro will be deprecated in a future telepathy-glib release. Please
use GLib 2.20's <code class="function">G_STATIC_ASSERT()</code> macro in new code.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>R</code></em> :</span></p></td>
<td>a requirement (constant expression) to be checked at compile-time</td>
</tr></tbody>
</table></div>
<p class="since">Since 0.7.34</p>
</div>
<hr>
<div class="refsect2">
<a name="tp-g-hash-table-update"></a><h3>tp_g_hash_table_update ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                tp_g_hash_table_update              (<em class="parameter"><code><span class="type">GHashTable</span> *target</code></em>,
                                                         <em class="parameter"><code><span class="type">GHashTable</span> *source</code></em>,
                                                         <em class="parameter"><code><span class="type">GBoxedCopyFunc</span> key_dup</code></em>,
                                                         <em class="parameter"><code><span class="type">GBoxedCopyFunc</span> value_dup</code></em>);</pre>
<p>
Add each item in <em class="parameter"><code>source</code></em> to <em class="parameter"><code>target</code></em>, replacing any existing item with the
same key. <em class="parameter"><code>key_dup</code></em> and <em class="parameter"><code>value_dup</code></em> are used to duplicate the items; in
principle they could also be used to convert between types.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>target</code></em> :</span></p></td>
<td>The hash table to be updated</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>source</code></em> :</span></p></td>
<td>The hash table to update it with (read-only)</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>key_dup</code></em> :</span></p></td>
<td>function to duplicate a key from <em class="parameter"><code>source</code></em> so it can be be stored
in <em class="parameter"><code>target</code></em>. If NULL, the key is not copied, but is used as-is</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>value_dup</code></em> :</span></p></td>
<td>function to duplicate a value from <em class="parameter"><code>source</code></em> so it can be stored
in <em class="parameter"><code>target</code></em>. If NULL, the value is not copied, but is used as-is</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 0.7.0</p>
</div>
<hr>
<div class="refsect2">
<a name="tp-g-ptr-array-contains"></a><h3>tp_g_ptr_array_contains ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>            tp_g_ptr_array_contains             (<em class="parameter"><code><span class="type">GPtrArray</span> *haystack</code></em>,
                                                         <em class="parameter"><code><span class="type">gpointer</span> needle</code></em>);</pre>
<p>

</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>haystack</code></em> :</span></p></td>
<td>The pointer array to be searched</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>needle</code></em> :</span></p></td>
<td>The pointer to look for</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<code class="literal">TRUE</code> if <em class="parameter"><code>needle</code></em> is one of the elements of <em class="parameter"><code>haystack</code></em>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="tp-g-ptr-array-extend"></a><h3>tp_g_ptr_array_extend ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                tp_g_ptr_array_extend               (<em class="parameter"><code><span class="type">GPtrArray</span> *target</code></em>,
                                                         <em class="parameter"><code><span class="type">GPtrArray</span> *source</code></em>);</pre>
<p>
Appends all elements of <em class="parameter"><code>source</code></em> to <em class="parameter"><code>target</code></em>. Note that this only copies the
pointers from <em class="parameter"><code>source</code></em>; any duplication or reference-incrementing must be
performed by the caller.
</p>
<p>
After this function has been called, it is safe to call
<code class="function">g_ptr_array_free()</code> on <em class="parameter"><code>source</code></em> and also free the actual pointer array,
as long as doing so does not free the data pointed to by the new
items in <em class="parameter"><code>target</code></em>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>target</code></em> :</span></p></td>
<td>a <span class="type">GPtrArray</span> to copy items to</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>source</code></em> :</span></p></td>
<td>a <span class="type">GPtrArray</span> to copy items from</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 0.14.3</p>
</div>
<hr>
<div class="refsect2">
<a name="tp-g-value-slice-new"></a><h3>tp_g_value_slice_new ()</h3>
<pre class="programlisting"><span class="returnvalue">GValue</span> *            tp_g_value_slice_new                (<em class="parameter"><code><span class="type">GType</span> type</code></em>);</pre>
<p>
Slice-allocate an empty <span class="type">GValue</span>. <a class="link" href="telepathy-glib-util.html#tp-g-value-slice-new-boolean" title="tp_g_value_slice_new_boolean ()"><code class="function">tp_g_value_slice_new_boolean()</code></a> and similar
functions are likely to be more convenient to use for the types supported.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
<td>The type desired for the new GValue</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a newly allocated, newly initialized <span class="type">GValue</span>, to be freed with
<a class="link" href="telepathy-glib-util.html#tp-g-value-slice-free" title="tp_g_value_slice_free ()"><code class="function">tp_g_value_slice_free()</code></a> or <code class="function">g_slice_free()</code>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 0.5.14</p>
</div>
<hr>
<div class="refsect2">
<a name="tp-g-value-slice-new-boolean"></a><h3>tp_g_value_slice_new_boolean ()</h3>
<pre class="programlisting"><span class="returnvalue">GValue</span> *            tp_g_value_slice_new_boolean        (<em class="parameter"><code><span class="type">gboolean</span> b</code></em>);</pre>
<p>
Slice-allocate and initialize a <span class="type">GValue</span>. This function is convenient to
use when constructing hash tables from string to <span class="type">GValue</span>, for example.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>b</code></em> :</span></p></td>
<td>a boolean value</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a <span class="type">GValue</span> of type <code class="literal">G_TYPE_BOOLEAN</code> with value <em class="parameter"><code>b</code></em>, to be freed with
<a class="link" href="telepathy-glib-util.html#tp-g-value-slice-free" title="tp_g_value_slice_free ()"><code class="function">tp_g_value_slice_free()</code></a> or <code class="function">g_slice_free()</code>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 0.7.27</p>
</div>
<hr>
<div class="refsect2">
<a name="tp-g-value-slice-new-boxed"></a><h3>tp_g_value_slice_new_boxed ()</h3>
<pre class="programlisting"><span class="returnvalue">GValue</span> *            tp_g_value_slice_new_boxed          (<em class="parameter"><code><span class="type">GType</span> type</code></em>,
                                                         <em class="parameter"><code><span class="type">gconstpointer</span> p</code></em>);</pre>
<p>
Slice-allocate and initialize a <span class="type">GValue</span>. This function is convenient to
use when constructing hash tables from string to <span class="type">GValue</span>, for example.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
<td>a boxed type</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>p</code></em> :</span></p></td>
<td>a pointer of type <em class="parameter"><code>type</code></em>, which will be copied</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a <span class="type">GValue</span> of type <em class="parameter"><code>type</code></em> whose value is a copy of <em class="parameter"><code>p</code></em>,
to be freed with <a class="link" href="telepathy-glib-util.html#tp-g-value-slice-free" title="tp_g_value_slice_free ()"><code class="function">tp_g_value_slice_free()</code></a> or <code class="function">g_slice_free()</code>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 0.7.27</p>
</div>
<hr>
<div class="refsect2">
<a name="tp-g-value-slice-new-static-boxed"></a><h3>tp_g_value_slice_new_static_boxed ()</h3>
<pre class="programlisting"><span class="returnvalue">GValue</span> *            tp_g_value_slice_new_static_boxed   (<em class="parameter"><code><span class="type">GType</span> type</code></em>,
                                                         <em class="parameter"><code><span class="type">gconstpointer</span> p</code></em>);</pre>
<p>
Slice-allocate and initialize a <span class="type">GValue</span>. This function is convenient to
use when constructing hash tables from string to <span class="type">GValue</span>, for example.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
<td>a boxed type</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>p</code></em> :</span></p></td>
<td>a pointer of type <em class="parameter"><code>type</code></em>, which must remain valid forever</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a <span class="type">GValue</span> of type <em class="parameter"><code>type</code></em> whose value is <em class="parameter"><code>p</code></em>,
to be freed with <a class="link" href="telepathy-glib-util.html#tp-g-value-slice-free" title="tp_g_value_slice_free ()"><code class="function">tp_g_value_slice_free()</code></a> or <code class="function">g_slice_free()</code>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 0.7.27</p>
</div>
<hr>
<div class="refsect2">
<a name="tp-g-value-slice-new-take-boxed"></a><h3>tp_g_value_slice_new_take_boxed ()</h3>
<pre class="programlisting"><span class="returnvalue">GValue</span> *            tp_g_value_slice_new_take_boxed     (<em class="parameter"><code><span class="type">GType</span> type</code></em>,
                                                         <em class="parameter"><code><span class="type">gpointer</span> p</code></em>);</pre>
<p>
Slice-allocate and initialize a <span class="type">GValue</span>. This function is convenient to
use when constructing hash tables from string to <span class="type">GValue</span>, for example.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
<td>a boxed type</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>p</code></em> :</span></p></td>
<td>a pointer of type <em class="parameter"><code>type</code></em> which will be freed with <code class="function">g_boxed_free()</code> by the
returned <span class="type">GValue</span> (the caller must own it before calling this function, but
no longer owns it after this function returns)</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a <span class="type">GValue</span> of type <em class="parameter"><code>type</code></em> whose value is <em class="parameter"><code>p</code></em>,
to be freed with <a class="link" href="telepathy-glib-util.html#tp-g-value-slice-free" title="tp_g_value_slice_free ()"><code class="function">tp_g_value_slice_free()</code></a> or <code class="function">g_slice_free()</code>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 0.7.27</p>
</div>
<hr>
<div class="refsect2">
<a name="tp-g-value-slice-new-double"></a><h3>tp_g_value_slice_new_double ()</h3>
<pre class="programlisting"><span class="returnvalue">GValue</span> *            tp_g_value_slice_new_double         (<em class="parameter"><code><span class="type">double</span> d</code></em>);</pre>
<p>
Slice-allocate and initialize a <span class="type">GValue</span>. This function is convenient to
use when constructing hash tables from string to <span class="type">GValue</span>, for example.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>d</code></em> :</span></p></td>
<td>a number</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a <span class="type">GValue</span> of type <code class="literal">G_TYPE_DOUBLE</code> with value <em class="parameter"><code>n</code></em>, to be freed with
<a class="link" href="telepathy-glib-util.html#tp-g-value-slice-free" title="tp_g_value_slice_free ()"><code class="function">tp_g_value_slice_free()</code></a> or <code class="function">g_slice_free()</code>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 0.7.27</p>
</div>
<hr>
<div class="refsect2">
<a name="tp-g-value-slice-new-int"></a><h3>tp_g_value_slice_new_int ()</h3>
<pre class="programlisting"><span class="returnvalue">GValue</span> *            tp_g_value_slice_new_int            (<em class="parameter"><code><span class="type">gint</span> n</code></em>);</pre>
<p>
Slice-allocate and initialize a <span class="type">GValue</span>. This function is convenient to
use when constructing hash tables from string to <span class="type">GValue</span>, for example.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>n</code></em> :</span></p></td>
<td>an integer</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a <span class="type">GValue</span> of type <code class="literal">G_TYPE_INT</code> with value <em class="parameter"><code>n</code></em>, to be freed with
<a class="link" href="telepathy-glib-util.html#tp-g-value-slice-free" title="tp_g_value_slice_free ()"><code class="function">tp_g_value_slice_free()</code></a> or <code class="function">g_slice_free()</code>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 0.7.27</p>
</div>
<hr>
<div class="refsect2">
<a name="tp-g-value-slice-new-int64"></a><h3>tp_g_value_slice_new_int64 ()</h3>
<pre class="programlisting"><span class="returnvalue">GValue</span> *            tp_g_value_slice_new_int64          (<em class="parameter"><code><span class="type">gint64</span> n</code></em>);</pre>
<p>
Slice-allocate and initialize a <span class="type">GValue</span>. This function is convenient to
use when constructing hash tables from string to <span class="type">GValue</span>, for example.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>n</code></em> :</span></p></td>
<td>a 64-bit integer</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a <span class="type">GValue</span> of type <code class="literal">G_TYPE_INT64</code> with value <em class="parameter"><code>n</code></em>, to be freed with
<a class="link" href="telepathy-glib-util.html#tp-g-value-slice-free" title="tp_g_value_slice_free ()"><code class="function">tp_g_value_slice_free()</code></a> or <code class="function">g_slice_free()</code>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 0.7.27</p>
</div>
<hr>
<div class="refsect2">
<a name="tp-g-value-slice-new-string"></a><h3>tp_g_value_slice_new_string ()</h3>
<pre class="programlisting"><span class="returnvalue">GValue</span> *            tp_g_value_slice_new_string         (<em class="parameter"><code>const <span class="type">gchar</span> *string</code></em>);</pre>
<p>
Slice-allocate and initialize a <span class="type">GValue</span>. This function is convenient to
use when constructing hash tables from string to <span class="type">GValue</span>, for example.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>string</code></em> :</span></p></td>
<td>a string to be copied into the value</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a <span class="type">GValue</span> of type <code class="literal">G_TYPE_STRING</code> whose value is a copy of <em class="parameter"><code>string</code></em>,
to be freed with <a class="link" href="telepathy-glib-util.html#tp-g-value-slice-free" title="tp_g_value_slice_free ()"><code class="function">tp_g_value_slice_free()</code></a> or <code class="function">g_slice_free()</code>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 0.7.27</p>
</div>
<hr>
<div class="refsect2">
<a name="tp-g-value-slice-new-static-string"></a><h3>tp_g_value_slice_new_static_string ()</h3>
<pre class="programlisting"><span class="returnvalue">GValue</span> *            tp_g_value_slice_new_static_string  (<em class="parameter"><code>const <span class="type">gchar</span> *string</code></em>);</pre>
<p>
Slice-allocate and initialize a <span class="type">GValue</span>. This function is convenient to
use when constructing hash tables from string to <span class="type">GValue</span>, for example.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>string</code></em> :</span></p></td>
<td>a static string which must remain valid forever, to be pointed to
by the value</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a <span class="type">GValue</span> of type <code class="literal">G_TYPE_STRING</code> whose value is <em class="parameter"><code>string</code></em>,
to be freed with <a class="link" href="telepathy-glib-util.html#tp-g-value-slice-free" title="tp_g_value_slice_free ()"><code class="function">tp_g_value_slice_free()</code></a> or <code class="function">g_slice_free()</code>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 0.7.27</p>
</div>
<hr>
<div class="refsect2">
<a name="tp-g-value-slice-new-take-string"></a><h3>tp_g_value_slice_new_take_string ()</h3>
<pre class="programlisting"><span class="returnvalue">GValue</span> *            tp_g_value_slice_new_take_string    (<em class="parameter"><code><span class="type">gchar</span> *string</code></em>);</pre>
<p>
Slice-allocate and initialize a <span class="type">GValue</span>. This function is convenient to
use when constructing hash tables from string to <span class="type">GValue</span>, for example.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>string</code></em> :</span></p></td>
<td>a string which will be freed with <code class="function">g_free()</code> by the returned <span class="type">GValue</span>
(the caller must own it before calling this function, but no longer owns
it after this function returns)</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a <span class="type">GValue</span> of type <code class="literal">G_TYPE_STRING</code> whose value is <em class="parameter"><code>string</code></em>,
to be freed with <a class="link" href="telepathy-glib-util.html#tp-g-value-slice-free" title="tp_g_value_slice_free ()"><code class="function">tp_g_value_slice_free()</code></a> or <code class="function">g_slice_free()</code>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 0.7.27</p>
</div>
<hr>
<div class="refsect2">
<a name="tp-g-value-slice-new-uint"></a><h3>tp_g_value_slice_new_uint ()</h3>
<pre class="programlisting"><span class="returnvalue">GValue</span> *            tp_g_value_slice_new_uint           (<em class="parameter"><code><span class="type">guint</span> n</code></em>);</pre>
<p>
Slice-allocate and initialize a <span class="type">GValue</span>. This function is convenient to
use when constructing hash tables from string to <span class="type">GValue</span>, for example.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>n</code></em> :</span></p></td>
<td>an unsigned integer</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a <span class="type">GValue</span> of type <code class="literal">G_TYPE_UINT</code> with value <em class="parameter"><code>n</code></em>, to be freed with
<a class="link" href="telepathy-glib-util.html#tp-g-value-slice-free" title="tp_g_value_slice_free ()"><code class="function">tp_g_value_slice_free()</code></a> or <code class="function">g_slice_free()</code>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 0.7.27</p>
</div>
<hr>
<div class="refsect2">
<a name="tp-g-value-slice-new-uint64"></a><h3>tp_g_value_slice_new_uint64 ()</h3>
<pre class="programlisting"><span class="returnvalue">GValue</span> *            tp_g_value_slice_new_uint64         (<em class="parameter"><code><span class="type">guint64</span> n</code></em>);</pre>
<p>
Slice-allocate and initialize a <span class="type">GValue</span>. This function is convenient to
use when constructing hash tables from string to <span class="type">GValue</span>, for example.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>n</code></em> :</span></p></td>
<td>a 64-bit unsigned integer</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a <span class="type">GValue</span> of type <code class="literal">G_TYPE_UINT64</code> with value <em class="parameter"><code>n</code></em>, to be freed with
<a class="link" href="telepathy-glib-util.html#tp-g-value-slice-free" title="tp_g_value_slice_free ()"><code class="function">tp_g_value_slice_free()</code></a> or <code class="function">g_slice_free()</code>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 0.7.27</p>
</div>
<hr>
<div class="refsect2">
<a name="tp-g-value-slice-new-byte"></a><h3>tp_g_value_slice_new_byte ()</h3>
<pre class="programlisting"><span class="returnvalue">GValue</span> *            tp_g_value_slice_new_byte           (<em class="parameter"><code><span class="type">guchar</span> n</code></em>);</pre>
<p>
Slice-allocate and initialize a <span class="type">GValue</span>. This function is convenient to
use when constructing hash tables from string to <span class="type">GValue</span>, for example.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>n</code></em> :</span></p></td>
<td>an unsigned integer</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a <span class="type">GValue</span> of type <code class="literal">G_TYPE_UCHAR</code> with value <em class="parameter"><code>n</code></em>, to be freed with
<a class="link" href="telepathy-glib-util.html#tp-g-value-slice-free" title="tp_g_value_slice_free ()"><code class="function">tp_g_value_slice_free()</code></a> or <code class="function">g_slice_free()</code>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 0.11.0</p>
</div>
<hr>
<div class="refsect2">
<a name="tp-g-value-slice-free"></a><h3>tp_g_value_slice_free ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                tp_g_value_slice_free               (<em class="parameter"><code><span class="type">GValue</span> *value</code></em>);</pre>
<p>
Unset and free a slice-allocated GValue.
</p>
<p>
<code class="literal">(GDestroyNotify) tp_g_value_slice_free</code> can be used
as a destructor for values in a <span class="type">GHashTable</span>, for example.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
<td>A GValue which was allocated with the g_slice API</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="tp-g-value-slice-dup"></a><h3>tp_g_value_slice_dup ()</h3>
<pre class="programlisting"><span class="returnvalue">GValue</span> *            tp_g_value_slice_dup                (<em class="parameter"><code>const <span class="type">GValue</span> *value</code></em>);</pre>
<p>

</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
<td>A GValue</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a newly allocated copy of <em class="parameter"><code>value</code></em>, to be freed with
<a class="link" href="telepathy-glib-util.html#tp-g-value-slice-free" title="tp_g_value_slice_free ()"><code class="function">tp_g_value_slice_free()</code></a> or <code class="function">g_slice_free()</code>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 0.5.14</p>
</div>
<hr>
<div class="refsect2">
<a name="tp-str-empty"></a><h3>tp_str_empty ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>            tp_str_empty                        (<em class="parameter"><code>const <span class="type">gchar</span> *s</code></em>);</pre>
<p>
Return <code class="literal">TRUE</code> if <em class="parameter"><code>s</code></em> is empty, counting <code class="literal">NULL</code> as empty.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>s</code></em> :</span></p></td>
<td>a string. <span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> utf8][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<code class="literal">TRUE</code> if <em class="parameter"><code>s</code></em> is either <code class="literal">NULL</code> or "". <span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> boolean]</span>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 0.11.1</p>
</div>
<hr>
<div class="refsect2">
<a name="tp-strdiff"></a><h3>tp_strdiff ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>            tp_strdiff                          (<em class="parameter"><code>const <span class="type">gchar</span> *left</code></em>,
                                                         <em class="parameter"><code>const <span class="type">gchar</span> *right</code></em>);</pre>
<p>
Return <code class="literal">TRUE</code> if the given strings are different. Unlike <span class="type">strcmp</span> this
function will handle null pointers, treating them as distinct from any
string.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>left</code></em> :</span></p></td>
<td>The first string to compare (may be NULL)</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>right</code></em> :</span></p></td>
<td>The second string to compare (may be NULL)</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<code class="literal">FALSE</code> if <em class="parameter"><code>left</code></em> and <em class="parameter"><code>right</code></em> are both <code class="literal">NULL</code>, or if
neither is <code class="literal">NULL</code> and both have the same contents; <code class="literal">TRUE</code> otherwise</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="tp-mixin-offset-cast"></a><h3>tp_mixin_offset_cast ()</h3>
<pre class="programlisting"><span class="returnvalue">gpointer</span>            tp_mixin_offset_cast                (<em class="parameter"><code><span class="type">gpointer</span> instance</code></em>,
                                                         <em class="parameter"><code><span class="type">guint</span> offset</code></em>);</pre>
<p>
Extend a pointer by an offset, provided the offset is not 0.
This is used to cast from an object instance to one of the telepathy-glib
mixin classes.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>instance</code></em> :</span></p></td>
<td>A pointer to a structure</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>offset</code></em> :</span></p></td>
<td>The offset of a structure member in bytes, which must not be 0</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a pointer <em class="parameter"><code>offset</code></em> bytes beyond <em class="parameter"><code>instance</code></em>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="tp-mixin-class-get-offset"></a><h3>tp_mixin_class_get_offset ()</h3>
<pre class="programlisting"><span class="returnvalue">guint</span>               tp_mixin_class_get_offset           (<em class="parameter"><code><span class="type">gpointer</span> klass</code></em>,
                                                         <em class="parameter"><code><span class="type">GQuark</span> quark</code></em>);</pre>
<p>
If the type of <em class="parameter"><code>klass</code></em>, or any of its ancestor types, has had an offset
attached using qdata with the given <em class="parameter"><code>quark</code></em>, return that offset; if not,
return 0.
</p>
<p>
In older telepathy-glib versions, calling this function on an instance that
did not have the mixin was considered to be a programming error. Since
version 0.13.9, 0 is returned, without error.
</p>
<p>
This is used to implement the telepathy-glib mixin classes.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>klass</code></em> :</span></p></td>
<td>A pointer to a GObjectClass-derived class structure</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>quark</code></em> :</span></p></td>
<td>A quark that was used to store the offset with <code class="function">g_type_set_qdata()</code>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the offset of the mixin class</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="tp-mixin-instance-get-offset"></a><h3>tp_mixin_instance_get_offset ()</h3>
<pre class="programlisting"><span class="returnvalue">guint</span>               tp_mixin_instance_get_offset        (<em class="parameter"><code><span class="type">gpointer</span> instance</code></em>,
                                                         <em class="parameter"><code><span class="type">GQuark</span> quark</code></em>);</pre>
<p>
If the type of <em class="parameter"><code>instance</code></em>, or any of its ancestor types, has had an offset
attached using qdata with the given <em class="parameter"><code>quark</code></em>, return that offset. If not,
return 0.
</p>
<p>
In older telepathy-glib versions, calling this function on an instance that
did not have the mixin was considered to be a programming error. Since
version 0.13.9, 0 is returned, without error.
</p>
<p>
This is used to implement the telepathy-glib mixin classes.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>instance</code></em> :</span></p></td>
<td>A pointer to a GObject-derived instance structure</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>quark</code></em> :</span></p></td>
<td>A quark that was used to store the offset with <code class="function">g_type_set_qdata()</code>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the offset of the mixin</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="tp-escape-as-identifier"></a><h3>tp_escape_as_identifier ()</h3>
<pre class="programlisting"><span class="returnvalue">gchar</span> *             tp_escape_as_identifier             (<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>);</pre>
<p>
Escape an arbitrary string so it follows the rules for a C identifier,
and hence an object path component, interface element component,
bus name component or member name in D-Bus.
</p>
<p>
Unlike g_strcanon this is a reversible encoding, so it preserves
distinctness.
</p>
<p>
The escaping consists of replacing all non-alphanumerics, and the first
character if it's a digit, with an underscore and two lower-case hex
digits:
</p>
<p>
   "0123abc_xyz\x01\xff" -&gt; _30123abc_5fxyz_01_ff
</p>
<p>
i.e. similar to URI encoding, but with _ taking the role of %, and a
smaller allowed set. As a special case, "" is escaped to "_" (just for
completeness, really).
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>The string to be escaped</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the escaped string, which must be freed by
the caller with <span class="type">g_free</span>. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="tp-strv-contains"></a><h3>tp_strv_contains ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>            tp_strv_contains                    (<em class="parameter"><code>const <span class="type">gchar</span> * const *strv</code></em>,
                                                         <em class="parameter"><code>const <span class="type">gchar</span> *str</code></em>);</pre>
<p>

</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>strv</code></em> :</span></p></td>
<td>a NULL-terminated array of strings, or <code class="literal">NULL</code> (which is treated as an
empty strv)</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>str</code></em> :</span></p></td>
<td>a non-NULL string</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>TRUE if <em class="parameter"><code>str</code></em> is an element of <em class="parameter"><code>strv</code></em>, according to <code class="function">strcmp()</code>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 0.7.15</p>
</div>
<hr>
<div class="refsect2">
<a name="tp-g-key-file-get-int64"></a><h3>tp_g_key_file_get_int64 ()</h3>
<pre class="programlisting"><span class="returnvalue">gint64</span>              tp_g_key_file_get_int64             (<em class="parameter"><code><span class="type">GKeyFile</span> *key_file</code></em>,
                                                         <em class="parameter"><code>const <span class="type">gchar</span> *group_name</code></em>,
                                                         <em class="parameter"><code>const <span class="type">gchar</span> *key</code></em>,
                                                         <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<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 <code class="function">g_key_file_get_int64()</code> instead.</p>
</div>
<p>
Returns the value associated with <em class="parameter"><code>key</code></em> under <em class="parameter"><code>group_name</code></em> as a signed
64-bit integer. This is similar to <code class="function">g_key_file_get_integer()</code> but can return
64-bit results without truncation.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>key_file</code></em> :</span></p></td>
<td>a non-<code class="literal">NULL</code> <span class="type">GKeyFile</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>group_name</code></em> :</span></p></td>
<td>a non-<code class="literal">NULL</code> group name</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
<td>a non-<code class="literal">NULL</code> key</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>return location for a <span class="type">GError</span>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the value associated with the key as a signed 64-bit integer, or
0 if the key was not found or could not be parsed.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 0.7.31</p>
</div>
<hr>
<div class="refsect2">
<a name="tp-g-key-file-get-uint64"></a><h3>tp_g_key_file_get_uint64 ()</h3>
<pre class="programlisting"><span class="returnvalue">guint64</span>             tp_g_key_file_get_uint64            (<em class="parameter"><code><span class="type">GKeyFile</span> *key_file</code></em>,
                                                         <em class="parameter"><code>const <span class="type">gchar</span> *group_name</code></em>,
                                                         <em class="parameter"><code>const <span class="type">gchar</span> *key</code></em>,
                                                         <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<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 <code class="function">g_key_file_get_uint64()</code> instead.</p>
</div>
<p>
Returns the value associated with <em class="parameter"><code>key</code></em> under <em class="parameter"><code>group_name</code></em> as an unsigned
64-bit integer. This is similar to <code class="function">g_key_file_get_integer()</code> but can return
large positive results without truncation.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>key_file</code></em> :</span></p></td>
<td>a non-<code class="literal">NULL</code> <span class="type">GKeyFile</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>group_name</code></em> :</span></p></td>
<td>a non-<code class="literal">NULL</code> group name</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
<td>a non-<code class="literal">NULL</code> key</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>return location for a <span class="type">GError</span>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the value associated with the key as an unsigned 64-bit integer,
or 0 if the key was not found or could not be parsed.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 0.7.31</p>
</div>
<hr>
<div class="refsect2">
<a name="tp-g-signal-connect-object"></a><h3>tp_g_signal_connect_object ()</h3>
<pre class="programlisting"><span class="returnvalue">gulong</span>              tp_g_signal_connect_object          (<em class="parameter"><code><span class="type">gpointer</span> instance</code></em>,
                                                         <em class="parameter"><code>const <span class="type">gchar</span> *detailed_signal</code></em>,
                                                         <em class="parameter"><code><span class="type">GCallback</span> c_handler</code></em>,
                                                         <em class="parameter"><code><span class="type">gpointer</span> gobject</code></em>,
                                                         <em class="parameter"><code><span class="type">GConnectFlags</span> connect_flags</code></em>);</pre>
<p>
Connects a <span class="type">GCallback</span> function to a signal for a particular object, as if
with <code class="function">g_signal_connect()</code>. Additionally, arranges for the signal handler to be
disconnected if <em class="parameter"><code>gobject</code></em> is destroyed.
</p>
<p>
This is similar to <code class="function">g_signal_connect_data()</code>, but uses a closure which
ensures that the <em class="parameter"><code>gobject</code></em> stays alive during the call to <em class="parameter"><code>c_handler</code></em>
by temporarily adding a reference count to <em class="parameter"><code>gobject</code></em>.
</p>
<p>
This is similar to <code class="function">g_signal_connect_object()</code>, but doesn't have the
documented bug that everyone is too scared to fix. Also, it does not allow
you to pass in NULL as <em class="parameter"><code>gobject</code></em>
</p>
<p>
This is intended to be a convenient way for objects to use themselves as
user_data for callbacks without having to explicitly disconnect all the
handlers in their finalizers.
</p>
<p>
Changed in 0.10.4 and 0.11.3: <code class="literal">G_CONNECT_AFTER</code> is now respected.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>instance</code></em> :</span></p></td>
<td>the instance to connect to.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>detailed_signal</code></em> :</span></p></td>
<td>a string of the form "signal-name::detail".</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>c_handler</code></em> :</span></p></td>
<td>the <span class="type">GCallback</span> to connect.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>gobject</code></em> :</span></p></td>
<td>the object to pass as data to <em class="parameter"><code>c_handler</code></em>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>connect_flags</code></em> :</span></p></td>
<td>a combination of <span class="type">GConnectFlags</span>. Only
<code class="literal">G_CONNECT_AFTER</code> and <code class="literal">G_CONNECT_SWAPPED</code> are supported by this function.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the handler id</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 0.9.2</p>
</div>
<hr>
<div class="refsect2">
<a name="tp-value-array-build"></a><h3>tp_value_array_build ()</h3>
<pre class="programlisting"><span class="returnvalue">GValueArray</span> *       tp_value_array_build                (<em class="parameter"><code><span class="type">gsize</span> length</code></em>,
                                                         <em class="parameter"><code><span class="type">GType</span> type</code></em>,
                                                         <em class="parameter"><code>...</code></em>);</pre>
<p>
Creates a new <span class="type">GValueArray</span> for use with structs, containing the values
passed in as parameters. The values are copied or reffed as appropriate for
their type.
</p>
<p>
</p>
<div class="example">
<a name="id-1.8.3.5.34.5.1"></a><p class="title"><b>Example 3.  using tp_value_array_build</b></p>
<div class="example-contents"><pre class="programlisting">
GValueArray *array = tp_value_array_build (2,
   G_TYPE_STRING, host,
   G_TYPE_UINT, port,
   G_TYPE_INVALID);
   </pre></div>
</div>
<p><br class="example-break">
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td>
<td>The number of elements that should be in the array</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
<td>The type of the first argument.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
<td>The value of the first item in the struct followed by a list of type,
value pairs terminated by G_TYPE_INVALID.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a newly created <span class="type">GValueArray</span>, free with g_value_array_free.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 0.9.2</p>
</div>
<hr>
<div class="refsect2">
<a name="tp-value-array-unpack"></a><h3>tp_value_array_unpack ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                tp_value_array_unpack               (<em class="parameter"><code><span class="type">GValueArray</span> *array</code></em>,
                                                         <em class="parameter"><code><span class="type">gsize</span> len</code></em>,
                                                         <em class="parameter"><code>...</code></em>);</pre>
<p>
Unpacks a <span class="type">GValueArray</span> into separate variables.
</p>
<p>
The contents of the values aren't copied into the variables, and so become
invalid when <em class="parameter"><code>array</code></em> is freed.
</p>
<p>
</p>
<div class="example">
<a name="id-1.8.3.5.35.6.1"></a><p class="title"><b>Example 4. using tp_value_array_unpack</b></p>
<div class="example-contents"><pre class="programlisting">
const gchar *host;
guint port;

tp_value_array_unpack (array, 2,
   &amp;host,
   &amp;port);
   </pre></div>
</div>
<p><br class="example-break">
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>array</code></em> :</span></p></td>
<td>the array to unpack</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
<td>The number of elements that should be in the array</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
<td>a list of correctly typed pointers to store the values in</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 0.11.0</p>
</div>
<hr>
<div class="refsect2">
<a name="TpWeakRef"></a><h3>TpWeakRef</h3>
<pre class="programlisting">typedef struct _TpWeakRef TpWeakRef;</pre>
<p>
A simple wrapper for a weak reference to a <span class="type">GObject</span>, suitable for use in
asynchronous calls which should only affect the object if it hasn't already
been freed.
</p>
<p>
As well as wrapping a weak reference to an object, this structure can
contain an extra pointer to arbitrary data. This is useful for asynchronous
calls which act on an object and some second piece of data, which are quite
common in practice.
</p>
<p>
If more than one piece of auxiliary data is required, the <em class="parameter"><code>user_data</code></em>
argument to the constructor can be a struct or a <span class="type">GValueArray</span>.
</p>
<p class="since">Since 0.11.3</p>
</div>
<hr>
<div class="refsect2">
<a name="tp-weak-ref-new"></a><h3>tp_weak_ref_new ()</h3>
<pre class="programlisting"><a class="link" href="telepathy-glib-util.html#TpWeakRef" title="TpWeakRef"><span class="returnvalue">TpWeakRef</span></a> *         tp_weak_ref_new                     (<em class="parameter"><code><span class="type">gpointer</span> object</code></em>,
                                                         <em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>,
                                                         <em class="parameter"><code><span class="type">GDestroyNotify</span> destroy</code></em>);</pre>
<p>
Return a new weak reference wrapper for <em class="parameter"><code>object</code></em>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>an object to which to take a weak reference. <span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> GObject.Object]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>optional additional data to store alongside the weak ref</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>destroy</code></em> :</span></p></td>
<td>destructor for <em class="parameter"><code>user_data</code></em>, called when the weak ref
is freed</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a new weak-reference wrapper
Free-function: <a class="link" href="telepathy-glib-util.html#tp-weak-ref-destroy" title="tp_weak_ref_destroy ()"><code class="function">tp_weak_ref_destroy()</code></a>. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 0.11.3</p>
</div>
<hr>
<div class="refsect2">
<a name="tp-weak-ref-dup-object"></a><h3>tp_weak_ref_dup_object ()</h3>
<pre class="programlisting"><span class="returnvalue">gpointer</span>            tp_weak_ref_dup_object              (<em class="parameter"><code><a class="link" href="telepathy-glib-util.html#TpWeakRef" title="TpWeakRef"><span class="type">TpWeakRef</span></a> *self</code></em>);</pre>
<p>
If the weakly referenced object still exists, return a new reference to
it. Otherwise, return <code class="literal">NULL</code>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
<td>a weak reference</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a new reference, or <code class="literal">NULL</code>. <span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> GObject.Object][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 0.11.3</p>
</div>
<hr>
<div class="refsect2">
<a name="tp-weak-ref-get-user-data"></a><h3>tp_weak_ref_get_user_data ()</h3>
<pre class="programlisting"><span class="returnvalue">gpointer</span>            tp_weak_ref_get_user_data           (<em class="parameter"><code><a class="link" href="telepathy-glib-util.html#TpWeakRef" title="TpWeakRef"><span class="type">TpWeakRef</span></a> *self</code></em>);</pre>
<p>
Return the additional data that was passed to <a class="link" href="telepathy-glib-util.html#tp-weak-ref-new" title="tp_weak_ref_new ()"><code class="function">tp_weak_ref_new()</code></a>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
<td>a weak reference</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the additional data supplied in <a class="link" href="telepathy-glib-util.html#tp-weak-ref-new" title="tp_weak_ref_new ()"><code class="function">tp_weak_ref_new()</code></a>, which may be
<code class="literal">NULL</code>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 0.11.3</p>
</div>
<hr>
<div class="refsect2">
<a name="tp-weak-ref-destroy"></a><h3>tp_weak_ref_destroy ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                tp_weak_ref_destroy                 (<em class="parameter"><code><a class="link" href="telepathy-glib-util.html#TpWeakRef" title="TpWeakRef"><span class="type">TpWeakRef</span></a> *self</code></em>);</pre>
<p>
Free a weak reference wrapper. This drops the weak reference to the
object (if it still exists), and frees the user data with the user-supplied
destructor function if one was provided.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
<td>a weak reference. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
</td>
</tr></tbody>
</table></div>
<p class="since">Since 0.11.3</p>
</div>
<hr>
<div class="refsect2">
<a name="tp-clear-pointer"></a><h3>tp_clear_pointer()</h3>
<pre class="programlisting">#define             tp_clear_pointer(pp, destroy)</pre>
<p>
Set a variable holding a pointer to <code class="literal">NULL</code>. If it was not already <code class="literal">NULL</code>,
unref or destroy the object it previously pointed to with <em class="parameter"><code>destroy</code></em>.
</p>
<p>
More precisely, if *<em class="parameter"><code>pp</code></em> is non-<code class="literal">NULL</code>, set *<em class="parameter"><code>pp</code></em> to <code class="literal">NULL</code>, then
call <em class="parameter"><code>destroy</code></em> on the object that *<em class="parameter"><code>pp</code></em> previously pointed to.
</p>
<p>
This is analogous to <code class="function">g_clear_error()</code> for non-error objects, but also
ensures that <em class="parameter"><code>pp</code></em> is already <code class="literal">NULL</code> before the destructor is run.
</p>
<p>
Typical usage is something like this:
</p>
<p>
</p>
<div class="informalexample"><pre class="programlisting">
typedef struct {
  TpConnection *conn;
  GError *error;
  GHashTable *table;
  MyStruct *misc;
} Foo;
Foo *foo;

...

tp_clear_object (&amp;foo-&gt;conn);
g_clear_error (&amp;foo-&gt;error);
tp_clear_boxed (G_TYPE_HASH_TABLE, &amp;foo-&gt;table);
tp_clear_pointer (&amp;foo-&gt;misc, my_struct_destroy);
</pre></div>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>pp</code></em> :</span></p></td>
<td>a pointer to a variable, struct member etc. holding a pointer</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>destroy</code></em> :</span></p></td>
<td>a function to which a gpointer can be passed, to destroy *<em class="parameter"><code>pp</code></em>
(if calling this macro from C++, explicitly casting the function to
<span class="type">GDestroyNotify</span> may be necessary)</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 0.11.7</p>
</div>
<hr>
<div class="refsect2">
<a name="tp-clear-object"></a><h3>tp_clear_object()</h3>
<pre class="programlisting">#define tp_clear_object(op) tp_clear_pointer ((op), g_object_unref)
</pre>
<p>
Set a variable holding a <span class="type">GObject</span> to <code class="literal">NULL</code>. If it was not already <code class="literal">NULL</code>,
unref the object it previously pointed to.
</p>
<p>
This is exactly equivalent to calling <a class="link" href="telepathy-glib-util.html#tp-clear-pointer" title="tp_clear_pointer()"><code class="function">tp_clear_pointer()</code></a> on <em class="parameter"><code>op</code></em>,
with <em class="parameter"><code>destroy</code></em> = <code class="function">g_object_unref()</code>. See <a class="link" href="telepathy-glib-util.html#tp-clear-pointer" title="tp_clear_pointer()"><code class="function">tp_clear_pointer()</code></a> for example usage.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>op</code></em> :</span></p></td>
<td>a pointer to a variable, struct member etc. holding a <span class="type">GObject</span>
</td>
</tr></tbody>
</table></div>
<p class="since">Since 0.11.7</p>
</div>
<hr>
<div class="refsect2">
<a name="tp-clear-boxed"></a><h3>tp_clear_boxed()</h3>
<pre class="programlisting">#define             tp_clear_boxed(gtype, pp)</pre>
<p>
Set a variable holding a boxed object to <code class="literal">NULL</code>. If it was not already <code class="literal">NULL</code>,
destroy the boxed object it previously pointed to, as appropriate for
<em class="parameter"><code>gtype</code></em>.
</p>
<p>
More precisely, if *<em class="parameter"><code>pp</code></em> is non-<code class="literal">NULL</code>, set *<em class="parameter"><code>pp</code></em> to <code class="literal">NULL</code>, then
call <code class="function">g_boxed_free()</code> on the object that *<em class="parameter"><code>pp</code></em> previously pointed to.
</p>
<p>
This is similar to <a class="link" href="telepathy-glib-util.html#tp-clear-pointer" title="tp_clear_pointer()"><code class="function">tp_clear_pointer()</code></a>; see that function's documentation
for typical usage.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>gtype</code></em> :</span></p></td>
<td>the <span class="type">GType</span> of *<em class="parameter"><code>pp</code></em>, e.g. <code class="literal">G_TYPE_HASH_TABLE</code>. <span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> GObject.Type]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>pp</code></em> :</span></p></td>
<td>a pointer to a variable, struct member etc. holding a boxed object</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 0.11.7</p>
</div>
<hr>
<div class="refsect2">
<a name="tp-simple-async-report-success-in-idle"></a><h3>tp_simple_async_report_success_in_idle ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                tp_simple_async_report_success_in_idle
                                                        (<em class="parameter"><code><span class="type">GObject</span> *source</code></em>,
                                                         <em class="parameter"><code><span class="type">GAsyncReadyCallback</span> callback</code></em>,
                                                         <em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>,
                                                         <em class="parameter"><code><span class="type">gpointer</span> source_tag</code></em>);</pre>
<p>
Create a new <span class="type">GSimpleAsyncResult</span> with no operation result, and call
<code class="function">g_simple_async_result_complete_in_idle()</code> on it.
</p>
<p>
This is like a successful version of <code class="function">g_simple_async_report_error_in_idle()</code>,
suitable for asynchronous functions that (conceptually) either succeed and
return nothing, or raise an error, such as <a class="link" href="telepathy-glib-proxy.html#tp-proxy-prepare-async" title="tp_proxy_prepare_async ()"><code class="function">tp_proxy_prepare_async()</code></a>.
</p>
<p>
The corresponding finish function should not call a function that attempts
to get a result, such as <code class="function">g_simple_async_result_get_op_res_gpointer()</code>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>source</code></em> :</span></p></td>
<td>the source object. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
<td>the callback. <span class="annotation">[<acronym title="The callback is valid until first called."><span class="acronym">scope async</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data for <em class="parameter"><code>callback</code></em>. <span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>source_tag</code></em> :</span></p></td>
<td>the source tag for the <span class="type">GSimpleAsyncResult</span>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 0.11.9</p>
</div>
<hr>
<div class="refsect2">
<a name="tp-user-action-time-from-x11"></a><h3>tp_user_action_time_from_x11 ()</h3>
<pre class="programlisting"><span class="returnvalue">gint64</span>              tp_user_action_time_from_x11        (<em class="parameter"><code><span class="type">guint32</span> x11_time</code></em>);</pre>
<p>
Convert an X11 timestamp into a user action time as used in Telepathy.
</p>
<p>
This also works for the timestamps used by GDK 2, GDK 3 and Clutter 1.0;
it may or may not work with other toolkits or versions.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>x11_time</code></em> :</span></p></td>
<td>an X11 timestamp, or 0 to indicate the current time</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a nonzero Telepathy user action time, or
<a class="link" href="telepathy-glib-defs.html#TP-USER-ACTION-TIME-CURRENT-TIME:CAPS" title="TP_USER_ACTION_TIME_CURRENT_TIME"><code class="literal">TP_USER_ACTION_TIME_CURRENT_TIME</code></a>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 0.11.13</p>
</div>
<hr>
<div class="refsect2">
<a name="tp-user-action-time-should-present"></a><h3>tp_user_action_time_should_present ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>            tp_user_action_time_should_present  (<em class="parameter"><code><span class="type">gint64</span> user_action_time</code></em>,
                                                         <em class="parameter"><code><span class="type">guint32</span> *x11_time</code></em>);</pre>
<p>
Interpret a Telepathy user action time to decide whether a Handler should
attempt to gain focus. If <code class="literal">TRUE</code> is returned, it would be appropriate to
call <code class="function">gtk_window_present_with_time()</code> using <em class="parameter"><code>x11_time</code></em> as input, for instance.
</p>
<p>
<em class="parameter"><code>x11_time</code></em> is used to return a timestamp in the right format for X11,
GDK 2, GDK 3 and Clutter 1.0; it may or may not work with other
toolkits or versions.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_action_time</code></em> :</span></p></td>
<td>the Telepathy user action time. <span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> gint64]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>x11_time</code></em> :</span></p></td>
<td>a pointer to guint32 used to
return an X11 timestamp, or 0 to indicate the current time; if
<code class="literal">FALSE</code> is returned, the value placed here is not meaningful. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<code class="literal">TRUE</code> if it would be appropriate to present a window</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 0.11.13</p>
</div>
<hr>
<div class="refsect2">
<a name="tp-utf8-make-valid"></a><h3>tp_utf8_make_valid ()</h3>
<pre class="programlisting"><span class="returnvalue">gchar</span> *             tp_utf8_make_valid                  (<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>);</pre>
<p>
Validate that the provided string is valid UTF8. If not,
replace all invalid bytes with unicode replacement
character (U+FFFD).
</p>
<p>
This method is a verbatim copy of glib's internal
_g_utf8_make_valid() function, and will be deprecated as
soon as the glib one becomes public.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>string to coerce into UTF8</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a new valid UTF8 string. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 0.13.15</p>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.19</div>
</body>
</html>