This file is indexed.

/usr/share/doc/libtelepathy-glib-doc/telepathy-glib/telepathy-glib-util.html is in libtelepathy-glib-doc 0.24.1-1.1.

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
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
<!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: telepathy-glib API Reference Manual</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.24 (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="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                  <a href="#telepathy-glib-util.description" class="shortcut">Description</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="ch-utilities.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="telepathy-glib-version.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="telepathy-glib-gnio-util.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></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 class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="telepathy-glib-util.functions"></a><h2>Functions</h2>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="telepathy-glib-util.html#tp-verify-statement" title="tp_verify_statement()">tp_verify_statement</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<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> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<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> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<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> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">GValue</span> *
</td>
<td class="function_name">
<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> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">GValue</span> *
</td>
<td class="function_name">
<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> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">GValue</span> *
</td>
<td class="function_name">
<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> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">GValue</span> *
</td>
<td class="function_name">
<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> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">GValue</span> *
</td>
<td class="function_name">
<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> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">GValue</span> *
</td>
<td class="function_name">
<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> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">GValue</span> *
</td>
<td class="function_name">
<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> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">GValue</span> *
</td>
<td class="function_name">
<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> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">GValue</span> *
</td>
<td class="function_name">
<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> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">GValue</span> *
</td>
<td class="function_name">
<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> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">GValue</span> *
</td>
<td class="function_name">
<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> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">GValue</span> *
</td>
<td class="function_name">
<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> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">GValue</span> *
</td>
<td class="function_name">
<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> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">GValue</span> *
</td>
<td class="function_name">
<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> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<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> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">GValue</span> *
</td>
<td class="function_name">
<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> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="telepathy-glib-util.html#tp-str-empty" title="tp_str_empty ()">tp_str_empty</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="telepathy-glib-util.html#tp-strdiff" title="tp_strdiff ()">tp_strdiff</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gpointer</span>
</td>
<td class="function_name">
<a class="link" href="telepathy-glib-util.html#tp-mixin-offset-cast" title="tp_mixin_offset_cast ()">tp_mixin_offset_cast</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">guint</span>
</td>
<td class="function_name">
<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> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">guint</span>
</td>
<td class="function_name">
<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> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gchar</span> *
</td>
<td class="function_name">
<a class="link" href="telepathy-glib-util.html#tp-escape-as-identifier" title="tp_escape_as_identifier ()">tp_escape_as_identifier</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="telepathy-glib-util.html#tp-strv-contains" title="tp_strv_contains ()">tp_strv_contains</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gint64</span>
</td>
<td class="function_name">
<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> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">guint64</span>
</td>
<td class="function_name">
<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> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gulong</span>
</td>
<td class="function_name">
<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> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">GValueArray</span> *
</td>
<td class="function_name">
<a class="link" href="telepathy-glib-util.html#tp-value-array-build" title="tp_value_array_build ()">tp_value_array_build</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="telepathy-glib-util.html#tp-value-array-unpack" title="tp_value_array_unpack ()">tp_value_array_unpack</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="telepathy-glib-util.html#tp-value-array-free" title="tp_value_array_free ()">tp_value_array_free</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="telepathy-glib-util.html#TpWeakRef" title="TpWeakRef"><span class="returnvalue">TpWeakRef</span></a> *
</td>
<td class="function_name">
<a class="link" href="telepathy-glib-util.html#tp-weak-ref-new" title="tp_weak_ref_new ()">tp_weak_ref_new</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gpointer</span>
</td>
<td class="function_name">
<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> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gpointer</span>
</td>
<td class="function_name">
<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> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="telepathy-glib-util.html#tp-weak-ref-destroy" title="tp_weak_ref_destroy ()">tp_weak_ref_destroy</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="telepathy-glib-util.html#tp-clear-pointer" title="tp_clear_pointer()">tp_clear_pointer</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="telepathy-glib-util.html#tp-clear-object" title="tp_clear_object()">tp_clear_object</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="telepathy-glib-util.html#tp-clear-boxed" title="tp_clear_boxed()">tp_clear_boxed</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<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> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gint64</span>
</td>
<td class="function_name">
<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> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<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> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gchar</span> *
</td>
<td class="function_name">
<a class="link" href="telepathy-glib-util.html#tp-utf8-make-valid" title="tp_utf8_make_valid ()">tp_utf8_make_valid</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="telepathy-glib-util.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody><tr>
<td class="datatype_keyword"> </td>
<td class="function_name"><a class="link" href="telepathy-glib-util.html#TpWeakRef" title="TpWeakRef">TpWeakRef</a></td>
</tr></tbody>
</table></div>
</div>
<div class="refsect1">
<a name="telepathy-glib-util.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include &lt;telepathy-glib/telepathy-glib.h&gt;
</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.functions_details"></a><h2>Functions</h2>
<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="refsect3">
<a name="id-1.8.3.7.2.7"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>R</p></td>
<td class="parameter_description"><p>a requirement (constant expression) to be checked at compile-time</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</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>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
<a name="id-1.8.3.7.3.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>target</p></td>
<td class="parameter_description"><p>The hash table to be updated</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>source</p></td>
<td class="parameter_description"><p>The hash table to update it with (read-only)</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>key_dup</p></td>
<td class="parameter_description"><p>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</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>value_dup</p></td>
<td class="parameter_description"><p>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</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</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>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
<a name="id-1.8.3.7.4.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>haystack</p></td>
<td class="parameter_description"><p>The pointer array to be searched</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>needle</p></td>
<td class="parameter_description"><p>The pointer to look for</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.8.3.7.4.7"></a><h4>Returns</h4>
<p> <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>
</p>
</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>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
<a name="id-1.8.3.7.5.7"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>target</p></td>
<td class="parameter_description"><p>a <span class="type">GPtrArray</span> to copy items to</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>source</p></td>
<td class="parameter_description"><p>a <span class="type">GPtrArray</span> to copy items from</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</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>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
<a name="id-1.8.3.7.6.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>type</p></td>
<td class="parameter_description"><p>The type desired for the new GValue</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.8.3.7.6.7"></a><h4>Returns</h4>
<p> 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>.</p>
</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>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
<a name="id-1.8.3.7.7.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>b</p></td>
<td class="parameter_description"><p>a boolean value</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.8.3.7.7.7"></a><h4>Returns</h4>
<p> 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></p>
</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>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
<a name="id-1.8.3.7.8.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>type</p></td>
<td class="parameter_description"><p>a boxed type</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>p</p></td>
<td class="parameter_description"><p>a pointer of type <em class="parameter"><code>type</code></em>
, which will be copied</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.8.3.7.8.7"></a><h4>Returns</h4>
<p> 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></p>
</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>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
<a name="id-1.8.3.7.9.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>type</p></td>
<td class="parameter_description"><p>a boxed type</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>p</p></td>
<td class="parameter_description"><p>a pointer of type <em class="parameter"><code>type</code></em>
, which must remain valid forever</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.8.3.7.9.7"></a><h4>Returns</h4>
<p> 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></p>
</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>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
<a name="id-1.8.3.7.10.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>type</p></td>
<td class="parameter_description"><p>a boxed type</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>p</p></td>
<td class="parameter_description"><p>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)</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.8.3.7.10.7"></a><h4>Returns</h4>
<p> 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></p>
</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>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
<a name="id-1.8.3.7.11.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>d</p></td>
<td class="parameter_description"><p>a number</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.8.3.7.11.7"></a><h4>Returns</h4>
<p> 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></p>
</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>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
<a name="id-1.8.3.7.12.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>n</p></td>
<td class="parameter_description"><p>an integer</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.8.3.7.12.7"></a><h4>Returns</h4>
<p> 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></p>
</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>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
<a name="id-1.8.3.7.13.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>n</p></td>
<td class="parameter_description"><p>a 64-bit integer</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.8.3.7.13.7"></a><h4>Returns</h4>
<p> 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></p>
</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>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
<a name="id-1.8.3.7.14.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>string</p></td>
<td class="parameter_description"><p>a string to be copied into the value</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.8.3.7.14.7"></a><h4>Returns</h4>
<p> 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></p>
</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>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
<a name="id-1.8.3.7.15.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>string</p></td>
<td class="parameter_description"><p>a static string which must remain valid forever, to be pointed to
by the value</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.8.3.7.15.7"></a><h4>Returns</h4>
<p> 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></p>
</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>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
<a name="id-1.8.3.7.16.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>string</p></td>
<td class="parameter_description"><p>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)</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.8.3.7.16.7"></a><h4>Returns</h4>
<p> 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></p>
</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>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
<a name="id-1.8.3.7.17.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>n</p></td>
<td class="parameter_description"><p>an unsigned integer</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.8.3.7.17.7"></a><h4>Returns</h4>
<p> 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></p>
</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>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
<a name="id-1.8.3.7.18.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>n</p></td>
<td class="parameter_description"><p>a 64-bit unsigned integer</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.8.3.7.18.7"></a><h4>Returns</h4>
<p> 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></p>
</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>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
<a name="id-1.8.3.7.19.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>n</p></td>
<td class="parameter_description"><p>an unsigned integer</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.8.3.7.19.7"></a><h4>Returns</h4>
<p> 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></p>
</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>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
<a name="id-1.8.3.7.20.7"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>value</p></td>
<td class="parameter_description"><p>A GValue which was allocated with the g_slice API</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</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>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
<a name="id-1.8.3.7.21.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>value</p></td>
<td class="parameter_description"><p>A GValue</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.8.3.7.21.7"></a><h4>Returns</h4>
<p> 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>.</p>
</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>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
<a name="id-1.8.3.7.22.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>s</p></td>
<td class="parameter_description"><p> a string. </p></td>
<td class="parameter_annotations"><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></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.8.3.7.22.7"></a><h4>Returns</h4>
<p> <code class="literal">TRUE</code> if <em class="parameter"><code>s</code></em>
is either <code class="literal">NULL</code> or "". </p>
<p><span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> boolean]</span></p>
</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>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
<a name="id-1.8.3.7.23.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>left</p></td>
<td class="parameter_description"><p>The first string to compare (may be NULL)</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>right</p></td>
<td class="parameter_description"><p>The second string to compare (may be NULL)</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.8.3.7.23.7"></a><h4>Returns</h4>
<p> <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</p>
</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>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
<a name="id-1.8.3.7.24.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>instance</p></td>
<td class="parameter_description"><p>A pointer to a structure</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>offset</p></td>
<td class="parameter_description"><p>The offset of a structure member in bytes, which must not be 0</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.8.3.7.24.7"></a><h4>Returns</h4>
<p> a pointer <em class="parameter"><code>offset</code></em>
bytes beyond <em class="parameter"><code>instance</code></em>
</p>
</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>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
<a name="id-1.8.3.7.25.8"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>klass</p></td>
<td class="parameter_description"><p>A pointer to a GObjectClass-derived class structure</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>quark</p></td>
<td class="parameter_description"><p>A quark that was used to store the offset with <code class="function">g_type_set_qdata()</code></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.8.3.7.25.9"></a><h4>Returns</h4>
<p> the offset of the mixin class</p>
</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>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
<a name="id-1.8.3.7.26.8"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>instance</p></td>
<td class="parameter_description"><p>A pointer to a GObject-derived instance structure</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>quark</p></td>
<td class="parameter_description"><p>A quark that was used to store the offset with <code class="function">g_type_set_qdata()</code></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.8.3.7.26.9"></a><h4>Returns</h4>
<p> the offset of the mixin</p>
</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="refsect3">
<a name="id-1.8.3.7.27.9"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>name</p></td>
<td class="parameter_description"><p>The string to be escaped</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.8.3.7.27.10"></a><h4>Returns</h4>
<p> the escaped string, which must be freed by
the caller with <span class="type">g_free</span>. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</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>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
<a name="id-1.8.3.7.28.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>strv</p></td>
<td class="parameter_description"><p>a NULL-terminated array of strings, or <code class="literal">NULL</code> (which is treated as an
empty strv)</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>str</p></td>
<td class="parameter_description"><p>a non-NULL string</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.8.3.7.28.7"></a><h4>Returns</h4>
<p> 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>.</p>
</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">
<p><code class="literal">tp_g_key_file_get_int64</code> is deprecated and should not be used in newly-written code.</p>
<p>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>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
<a name="id-1.8.3.7.29.8"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>key_file</p></td>
<td class="parameter_description"><p>a non-<code class="literal">NULL</code> <span class="type">GKeyFile</span></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>group_name</p></td>
<td class="parameter_description"><p>a non-<code class="literal">NULL</code> group name</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>key</p></td>
<td class="parameter_description"><p>a non-<code class="literal">NULL</code> key</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>return location for a <span class="type">GError</span></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.8.3.7.29.9"></a><h4>Returns</h4>
<p> 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.</p>
</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">
<p><code class="literal">tp_g_key_file_get_uint64</code> is deprecated and should not be used in newly-written code.</p>
<p>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>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
<a name="id-1.8.3.7.30.8"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>key_file</p></td>
<td class="parameter_description"><p>a non-<code class="literal">NULL</code> <span class="type">GKeyFile</span></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>group_name</p></td>
<td class="parameter_description"><p>a non-<code class="literal">NULL</code> group name</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>key</p></td>
<td class="parameter_description"><p>a non-<code class="literal">NULL</code> key</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>return location for a <span class="type">GError</span></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.8.3.7.30.9"></a><h4>Returns</h4>
<p> 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.</p>
</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>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
<a name="id-1.8.3.7.31.10"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>instance</p></td>
<td class="parameter_description"><p>the instance to connect to.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>detailed_signal</p></td>
<td class="parameter_description"><p>a string of the form "signal-name::detail".</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>c_handler</p></td>
<td class="parameter_description"><p>the <span class="type">GCallback</span> to connect.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>gobject</p></td>
<td class="parameter_description"><p>the object to pass as data to <em class="parameter"><code>c_handler</code></em>
.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>connect_flags</p></td>
<td class="parameter_description"><p>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.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.8.3.7.31.11"></a><h4>Returns</h4>
<p> the handler id</p>
</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>
<div class="example">
<a name="id-1.8.3.7.32.5"></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>
<br class="example-break"><p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
<a name="id-1.8.3.7.32.7"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>length</p></td>
<td class="parameter_description"><p>The number of elements that should be in the array</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>type</p></td>
<td class="parameter_description"><p>The type of the first argument.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>...</p></td>
<td class="parameter_description"><p>The value of the first item in the struct followed by a list of type,
value pairs terminated by G_TYPE_INVALID.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.8.3.7.32.8"></a><h4>Returns</h4>
<p> a newly created <span class="type">GValueArray</span>, free with <a class="link" href="telepathy-glib-util.html#tp-value-array-free" title="tp_value_array_free ()"><code class="function">tp_value_array_free()</code></a></p>
</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>
<div class="example">
<a name="id-1.8.3.7.33.6"></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>
<br class="example-break"><p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
<a name="id-1.8.3.7.33.8"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>array</p></td>
<td class="parameter_description"><p>the array to unpack</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>len</p></td>
<td class="parameter_description"><p>The number of elements that should be in the array</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>...</p></td>
<td class="parameter_description"><p>a list of correctly typed pointers to store the values in</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 0.11.0</p>
</div>
<hr>
<div class="refsect2">
<a name="tp-value-array-free"></a><h3>tp_value_array_free ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
tp_value_array_free (<em class="parameter"><code><span class="type">GValueArray</span> *va</code></em>);</pre>
<p>Free <em class="parameter"><code>va</code></em>
. This is exactly the same as <code class="function">g_value_array_free()</code>, but does not
provoke deprecation warnings from GLib when used in conjunction with
<a class="link" href="telepathy-glib-util.html#tp-value-array-build" title="tp_value_array_build ()"><code class="function">tp_value_array_build()</code></a> and <a class="link" href="telepathy-glib-util.html#tp-value-array-unpack" title="tp_value_array_unpack ()"><code class="function">tp_value_array_unpack()</code></a>.</p>
<div class="refsect3">
<a name="id-1.8.3.7.34.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>va</p></td>
<td class="parameter_description"><p>a <span class="type">GValueArray</span></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<p class="since">Since: 0.23.0</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>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
<a name="id-1.8.3.7.35.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>object</p></td>
<td class="parameter_description"><p> an object to which to take a weak reference. </p></td>
<td class="parameter_annotations"><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 class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>optional additional data to store alongside the weak ref</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>destroy</p></td>
<td class="parameter_description"><p>destructor for <em class="parameter"><code>user_data</code></em>
, called when the weak ref
is freed</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.8.3.7.35.7"></a><h4>Returns</h4>
<p> a new weak-reference wrapper</p>
<p>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>. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</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>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
<a name="id-1.8.3.7.36.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>self</p></td>
<td class="parameter_description"><p>a weak reference</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.8.3.7.36.7"></a><h4>Returns</h4>
<p> a new reference, or <code class="literal">NULL</code>. </p>
<p><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></p>
</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>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
<a name="id-1.8.3.7.37.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>self</p></td>
<td class="parameter_description"><p>a weak reference</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.8.3.7.37.7"></a><h4>Returns</h4>
<p> 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></p>
</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>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
<a name="id-1.8.3.7.38.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>self</p></td>
<td class="parameter_description"><p> a weak reference. </p></td>
<td class="parameter_annotations"><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>
<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>
<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="refsect3">
<a name="id-1.8.3.7.39.10"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>pp</p></td>
<td class="parameter_description"><p>a pointer to a variable, struct member etc. holding a pointer</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>destroy</p></td>
<td class="parameter_description"><p>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)</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</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="refsect3">
<a name="id-1.8.3.7.40.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>op</p></td>
<td class="parameter_description"><p>a pointer to a variable, struct member etc. holding a <span class="type">GObject</span></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</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="refsect3">
<a name="id-1.8.3.7.41.7"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>gtype</p></td>
<td class="parameter_description"><p> the <span class="type">GType</span> of *<em class="parameter"><code>pp</code></em>
, e.g. <code class="literal">G_TYPE_HASH_TABLE</code>. </p></td>
<td class="parameter_annotations"><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 class="parameter_name"><p>pp</p></td>
<td class="parameter_description"><p>a pointer to a variable, struct member etc. holding a boxed object</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</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="refsect3">
<a name="id-1.8.3.7.42.7"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>source</p></td>
<td class="parameter_description"><p> the source object. </p></td>
<td class="parameter_annotations"><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 class="parameter_name"><p>callback</p></td>
<td class="parameter_description"><p> the callback. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="The callback is valid until first called."><span class="acronym">scope async</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p> user data for <em class="parameter"><code>callback</code></em>
. </p></td>
<td class="parameter_annotations"><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 class="parameter_name"><p>source_tag</p></td>
<td class="parameter_description"><p>the source tag for the <span class="type">GSimpleAsyncResult</span></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</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="refsect3">
<a name="id-1.8.3.7.43.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>x11_time</p></td>
<td class="parameter_description"><p>an X11 timestamp, or 0 to indicate the current time</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.8.3.7.43.7"></a><h4>Returns</h4>
<p> 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></p>
</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="refsect3">
<a name="id-1.8.3.7.44.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>user_action_time</p></td>
<td class="parameter_description"><p> the Telepathy user action time. </p></td>
<td class="parameter_annotations"><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 class="parameter_name"><p>x11_time</p></td>
<td class="parameter_description"><p> 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. </p></td>
<td class="parameter_annotations"><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>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.8.3.7.44.7"></a><h4>Returns</h4>
<p> <code class="literal">TRUE</code> if it would be appropriate to present a window</p>
</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="refsect3">
<a name="id-1.8.3.7.45.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>name</p></td>
<td class="parameter_description"><p>string to coerce into UTF8</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.8.3.7.45.7"></a><h4>Returns</h4>
<p> a new valid UTF8 string. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<p class="since">Since: 0.13.15</p>
</div>
</div>
<div class="refsect1">
<a name="telepathy-glib-util.other_details"></a><h2>Types and Values</h2>
<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>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.24</div>
</body>
</html>