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
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>TpProxy subclasses and mixins: telepathy-glib API Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="telepathy-glib API Reference Manual">
<link rel="up" href="ch-dbus.html" title="General D-Bus support">
<link rel="prev" href="telepathy-glib-vardict.html" title="Manipulating a{sv} mappings">
<link rel="next" href="ch-protocol.html" title="The Telepathy protocol">
<meta name="generator" content="GTK-Doc V1.32 (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-proxy-subclass.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-dbus.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="telepathy-glib-vardict.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="ch-protocol.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="telepathy-glib-proxy-subclass"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="telepathy-glib-proxy-subclass.top_of_page"></a>TpProxy subclasses and mixins</span></h2>
<p>TpProxy subclasses and mixins — Providing extra functionality for a <a class="link" href="telepathy-glib-proxy.html#TpProxy"><span class="type">TpProxy</span></a> or
subclass, or subclassing it</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="telepathy-glib-proxy-subclass.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_proto_type">
<col class="functions_proto_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/dbus-glib/dbus-glib-DBusGProxy.html#DBusGProxy"><span class="returnvalue">DBusGProxy</span></a> *
</td>
<td class="function_name">
<a class="link" href="telepathy-glib-proxy-subclass.html#tp-proxy-add-interface-by-id" title="tp_proxy_add_interface_by_id ()">tp_proxy_add_interface_by_id</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-proxy-subclass.html#tp-proxy-add-interfaces" title="tp_proxy_add_interfaces ()">tp_proxy_add_interfaces</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/dbus-glib/dbus-glib-DBusGProxy.html#DBusGProxy"><span class="returnvalue">DBusGProxy</span></a> *
</td>
<td class="function_name">
<a class="link" href="telepathy-glib-proxy-subclass.html#tp-proxy-borrow-interface-by-id" title="tp_proxy_borrow_interface_by_id ()">tp_proxy_borrow_interface_by_id</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/dbus-glib/dbus-glib-DBusGProxy.html#DBusGProxy"><span class="returnvalue">DBusGProxy</span></a> *
</td>
<td class="function_name">
<a class="link" href="telepathy-glib-proxy-subclass.html#tp-proxy-get-interface-by-id" title="tp_proxy_get_interface_by_id ()">tp_proxy_get_interface_by_id</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-proxy-subclass.html#tp-proxy-invalidate" title="tp_proxy_invalidate ()">tp_proxy_invalidate</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<span class="c_punctuation">(</span><a class="link" href="telepathy-glib-proxy-subclass.html#TpProxyInterfaceAddedCb" title="TpProxyInterfaceAddedCb ()">*TpProxyInterfaceAddedCb</a><span class="c_punctuation">)</span> <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-proxy-subclass.html#tp-proxy-or-subclass-hook-on-interface-add" title="tp_proxy_or_subclass_hook_on_interface_add ()">tp_proxy_or_subclass_hook_on_interface_add</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-proxy-subclass.html#tp-proxy-init-known-interfaces" title="tp_proxy_init_known_interfaces ()">tp_proxy_init_known_interfaces</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-proxy-subclass.html#tp-proxy-subclass-add-error-mapping" title="tp_proxy_subclass_add_error_mapping ()">tp_proxy_subclass_add_error_mapping</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-proxy-subclass.html#tp-proxy-dbus-g-proxy-claim-for-signal-adding" title="tp_proxy_dbus_g_proxy_claim_for_signal_adding ()">tp_proxy_dbus_g_proxy_claim_for_signal_adding</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<span class="c_punctuation">(</span><a class="link" href="telepathy-glib-proxy-subclass.html#TpProxyInvokeFunc" title="TpProxyInvokeFunc ()">*TpProxyInvokeFunc</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="telepathy-glib-proxy.html#TpProxyPendingCall" title="TpProxyPendingCall"><span class="returnvalue">TpProxyPendingCall</span></a> *
</td>
<td class="function_name">
<a class="link" href="telepathy-glib-proxy-subclass.html#tp-proxy-pending-call-v0-new" title="tp_proxy_pending_call_v0_new ()">tp_proxy_pending_call_v0_new</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-proxy-subclass.html#tp-proxy-pending-call-v0-completed" title="tp_proxy_pending_call_v0_completed ()">tp_proxy_pending_call_v0_completed</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-proxy-subclass.html#tp-proxy-pending-call-v0-take-pending-call" title="tp_proxy_pending_call_v0_take_pending_call ()">tp_proxy_pending_call_v0_take_pending_call</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-proxy-subclass.html#tp-proxy-pending-call-v0-take-results" title="tp_proxy_pending_call_v0_take_results ()">tp_proxy_pending_call_v0_take_results</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="telepathy-glib-proxy.html#TpProxySignalConnection" title="TpProxySignalConnection"><span class="returnvalue">TpProxySignalConnection</span></a> *
</td>
<td class="function_name">
<a class="link" href="telepathy-glib-proxy-subclass.html#tp-proxy-signal-connection-v0-new" title="tp_proxy_signal_connection_v0_new ()">tp_proxy_signal_connection_v0_new</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-proxy-subclass.html#tp-proxy-signal-connection-v0-take-results" title="tp_proxy_signal_connection_v0_take_results ()">tp_proxy_signal_connection_v0_take_results</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="telepathy-glib-proxy-subclass.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include <telepathy-glib/proxy-subclass.h>
</pre>
</div>
<div class="refsect1">
<a name="telepathy-glib-proxy-subclass.description"></a><h2>Description</h2>
<p>The implementations of <a class="link" href="telepathy-glib-proxy.html#TpProxy"><span class="type">TpProxy</span></a> subclasses and "mixin" functions need
access to the underlying dbus-glib objects used to implement the
<a class="link" href="telepathy-glib-proxy.html#TpProxy"><span class="type">TpProxy</span></a> API.</p>
<p>Mixin functions to implement particular D-Bus interfaces should usually
be auto-generated, by copying tools/glib-client-gen.py from telepathy-glib.</p>
</div>
<div class="refsect1">
<a name="telepathy-glib-proxy-subclass.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="tp-proxy-add-interface-by-id"></a><h3>tp_proxy_add_interface_by_id ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/dbus-glib/dbus-glib-DBusGProxy.html#DBusGProxy"><span class="returnvalue">DBusGProxy</span></a> *
tp_proxy_add_interface_by_id (<em class="parameter"><code><a class="link" href="telepathy-glib-proxy.html#TpProxy"><span class="type">TpProxy</span></a> *self</code></em>,
<em class="parameter"><code><span class="type">GQuark</span> iface</code></em>);</pre>
<p>Declare that this proxy supports a given interface.</p>
<p>To use methods and signals of that interface, either call
<a class="link" href="telepathy-glib-proxy-subclass.html#tp-proxy-get-interface-by-id" title="tp_proxy_get_interface_by_id ()"><code class="function">tp_proxy_get_interface_by_id()</code></a> to get the <a href="/usr/share/gtk-doc/html/dbus-glib/dbus-glib-DBusGProxy.html#DBusGProxy"><span class="type">DBusGProxy</span></a>, or use the
tp_cli_* wrapper functions (strongly recommended).</p>
<p>If the interface is the proxy's "main interface", or has already been
added, then do nothing.</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="tp-proxy-add-interface-by-id.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>the TpProxy, which must not have become <a class="link" href="telepathy-glib-proxy.html#TpProxy-invalidated" title="The “invalidated” signal"><span class="type">“invalidated”</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>iface</p></td>
<td class="parameter_description"><p>quark representing the interface to be added</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="tp-proxy-add-interface-by-id.returns"></a><h4>Returns</h4>
<p> either <code class="literal">NULL</code> or a borrowed <a href="/usr/share/gtk-doc/html/dbus-glib/dbus-glib-DBusGProxy.html#DBusGProxy"><span class="type">DBusGProxy</span></a> corresponding to <em class="parameter"><code>iface</code></em>
,
depending on implementation details. To reliably borrow the <a href="/usr/share/gtk-doc/html/dbus-glib/dbus-glib-DBusGProxy.html#DBusGProxy"><span class="type">DBusGProxy</span></a>, use
<a class="link" href="telepathy-glib-proxy-subclass.html#tp-proxy-get-interface-by-id" title="tp_proxy_get_interface_by_id ()"><code class="function">tp_proxy_get_interface_by_id()</code></a>. (This method should probably have
returned void; sorry.)</p>
</div>
<p class="since">Since: 0.7.1</p>
</div>
<hr>
<div class="refsect2">
<a name="tp-proxy-add-interfaces"></a><h3>tp_proxy_add_interfaces ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
tp_proxy_add_interfaces (<em class="parameter"><code><a class="link" href="telepathy-glib-proxy.html#TpProxy"><span class="type">TpProxy</span></a> *self</code></em>,
<em class="parameter"><code>const <span class="type">gchar</span> * const *interfaces</code></em>);</pre>
<p>Declare that this proxy supports the given interfaces. Equivalent to calling
<code class="function">g_quark_from_string()</code> followed by <a class="link" href="telepathy-glib-proxy-subclass.html#tp-proxy-add-interface-by-id" title="tp_proxy_add_interface_by_id ()"><code class="function">tp_proxy_add_interface_by_id()</code></a> for each
of the interface names.</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="tp-proxy-add-interfaces.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>the TpProxy, which must not have become <a class="link" href="telepathy-glib-proxy.html#TpProxy-invalidated" title="The “invalidated” signal"><span class="type">“invalidated”</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>interfaces</p></td>
<td class="parameter_description"><p>the names of the interfaces to be added</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 0.14.4</p>
</div>
<hr>
<div class="refsect2">
<a name="tp-proxy-borrow-interface-by-id"></a><h3>tp_proxy_borrow_interface_by_id ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/dbus-glib/dbus-glib-DBusGProxy.html#DBusGProxy"><span class="returnvalue">DBusGProxy</span></a> *
tp_proxy_borrow_interface_by_id (<em class="parameter"><code><a class="link" href="telepathy-glib-proxy.html#TpProxy"><span class="type">TpProxy</span></a> *self</code></em>,
<em class="parameter"><code><span class="type">GQuark</span> iface</code></em>,
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<div class="warning">
<p><code class="literal">tp_proxy_borrow_interface_by_id</code> is deprecated and should not be used in newly-written code.</p>
<p>Since 0.19.9. New code should use
<a class="link" href="telepathy-glib-proxy-subclass.html#tp-proxy-get-interface-by-id" title="tp_proxy_get_interface_by_id ()"><code class="function">tp_proxy_get_interface_by_id()</code></a> instead.</p>
</div>
<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="tp-proxy-borrow-interface-by-id.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>the TpProxy</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>iface</p></td>
<td class="parameter_description"><p>quark representing the interface required</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>used to raise an error in the <a class="link" href="telepathy-glib-proxy.html#TP-DBUS-ERRORS:CAPS" title="TP_DBUS_ERRORS"><span class="type">TP_DBUS_ERRORS</span></a> domain if <em class="parameter"><code>iface</code></em>
is invalid, <em class="parameter"><code>self</code></em>
has been invalidated or <em class="parameter"><code>self</code></em>
does not implement
<em class="parameter"><code>iface</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="tp-proxy-borrow-interface-by-id.returns"></a><h4>Returns</h4>
<p> a borrowed reference to a <a href="/usr/share/gtk-doc/html/dbus-glib/dbus-glib-DBusGProxy.html#DBusGProxy"><span class="type">DBusGProxy</span></a>
for which the bus name and object path are the same as for <em class="parameter"><code>self</code></em>
, but the
interface is as given (or <code class="literal">NULL</code> if an <em class="parameter"><code>error</code></em>
is raised).
The reference is only valid as long as <em class="parameter"><code>self</code></em>
is.</p>
</div>
<p class="since">Since: 0.7.1</p>
</div>
<hr>
<div class="refsect2">
<a name="tp-proxy-get-interface-by-id"></a><h3>tp_proxy_get_interface_by_id ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/dbus-glib/dbus-glib-DBusGProxy.html#DBusGProxy"><span class="returnvalue">DBusGProxy</span></a> *
tp_proxy_get_interface_by_id (<em class="parameter"><code><a class="link" href="telepathy-glib-proxy.html#TpProxy"><span class="type">TpProxy</span></a> *self</code></em>,
<em class="parameter"><code><span class="type">GQuark</span> iface</code></em>,
<em class="parameter"><code><span class="type">GError</span> **error</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="tp-proxy-get-interface-by-id.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>the TpProxy</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>iface</p></td>
<td class="parameter_description"><p>quark representing the interface required</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>used to raise an error in the <a class="link" href="telepathy-glib-proxy.html#TP-DBUS-ERRORS:CAPS" title="TP_DBUS_ERRORS"><span class="type">TP_DBUS_ERRORS</span></a> domain if <em class="parameter"><code>iface</code></em>
is invalid, <em class="parameter"><code>self</code></em>
has been invalidated or <em class="parameter"><code>self</code></em>
does not implement
<em class="parameter"><code>iface</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="tp-proxy-get-interface-by-id.returns"></a><h4>Returns</h4>
<p> a borrowed reference to a <a href="/usr/share/gtk-doc/html/dbus-glib/dbus-glib-DBusGProxy.html#DBusGProxy"><span class="type">DBusGProxy</span></a>
for which the bus name and object path are the same as for <em class="parameter"><code>self</code></em>
, but the
interface is as given (or <code class="literal">NULL</code> if an <em class="parameter"><code>error</code></em>
is raised).
The reference is only valid as long as <em class="parameter"><code>self</code></em>
is.</p>
</div>
<p class="since">Since: 0.19.9</p>
</div>
<hr>
<div class="refsect2">
<a name="tp-proxy-invalidate"></a><h3>tp_proxy_invalidate ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
tp_proxy_invalidate (<em class="parameter"><code><a class="link" href="telepathy-glib-proxy.html#TpProxy"><span class="type">TpProxy</span></a> *self</code></em>,
<em class="parameter"><code>const <span class="type">GError</span> *error</code></em>);</pre>
<p>Mark <em class="parameter"><code>self</code></em>
as having been invalidated - no further calls will work, and
if not already invalidated, the <a class="link" href="telepathy-glib-proxy.html#TpProxy-invalidated" title="The “invalidated” signal"><span class="type">“invalidated”</span></a> signal will be emitted
with the given error.</p>
<div class="refsect3">
<a name="tp-proxy-invalidate.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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 proxy</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>an error causing the invalidation</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 0.7.1</p>
</div>
<hr>
<div class="refsect2">
<a name="TpProxyInterfaceAddedCb"></a><h3>TpProxyInterfaceAddedCb ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
<span class="c_punctuation">(</span>*TpProxyInterfaceAddedCb<span class="c_punctuation">)</span> (<em class="parameter"><code><a class="link" href="telepathy-glib-proxy.html#TpProxy"><span class="type">TpProxy</span></a> *self</code></em>,
<em class="parameter"><code><span class="type">guint</span> quark</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/dbus-glib/dbus-glib-DBusGProxy.html#DBusGProxy"><span class="type">DBusGProxy</span></a> *proxy</code></em>,
<em class="parameter"><code><span class="type">gpointer</span> unused</code></em>);</pre>
<p>The signature of a <a class="link" href="telepathy-glib-proxy.html#TpProxy-interface-added" title="The “interface-added” signal"><span class="type">“interface-added”</span></a> signal callback.</p>
<div class="refsect3">
<a name="TpProxyInterfaceAddedCb.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>the proxy</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>quark</p></td>
<td class="parameter_description"><p>a quark whose string value is the interface being added</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>proxy</p></td>
<td class="parameter_description"><p>the <a href="/usr/share/gtk-doc/html/dbus-glib/dbus-glib-DBusGProxy.html#DBusGProxy"><span class="type">DBusGProxy</span></a> for the added interface</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>unused</p></td>
<td class="parameter_description"><p>unused</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 0.7.1</p>
</div>
<hr>
<div class="refsect2">
<a name="tp-proxy-or-subclass-hook-on-interface-add"></a><h3>tp_proxy_or_subclass_hook_on_interface_add ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
tp_proxy_or_subclass_hook_on_interface_add
(<em class="parameter"><code><span class="type">GType</span> proxy_or_subclass</code></em>,
<em class="parameter"><code><a class="link" href="telepathy-glib-proxy-subclass.html#TpProxyInterfaceAddedCb" title="TpProxyInterfaceAddedCb ()"><span class="type">TpProxyInterfaceAddedCb</span></a> callback</code></em>);</pre>
<p>Arrange for <em class="parameter"><code>callback</code></em>
to be connected to <a class="link" href="telepathy-glib-proxy.html#TpProxy-interface-added" title="The “interface-added” signal"><span class="type">“interface-added”</span></a>
during the <a class="link" href="telepathy-glib-proxy.html#TpProxy"><span class="type">TpProxy</span></a> constructor. This is done sufficiently early that
it will see the signal for the default interface (<em class="parameter"><code>interface</code></em>
member of
<a class="link" href="telepathy-glib-proxy.html#TpProxyClass" title="struct TpProxyClass"><span class="type">TpProxyClass</span></a>), if any, being added. The intended use is for the callback
to call <a href="/usr/share/gtk-doc/html/dbus-glib/dbus-glib-DBusGProxy.html#dbus-g-proxy-add-signal"><code class="function">dbus_g_proxy_add_signal()</code></a> on the new <a href="/usr/share/gtk-doc/html/dbus-glib/dbus-glib-DBusGProxy.html#DBusGProxy"><span class="type">DBusGProxy</span></a>.</p>
<p>Since 0.7.6, to ensure correct overriding of interfaces that might be
added to telepathy-glib, before calling this function you should
call tp_proxy_init_known_interfaces, tp_connection_init_known_interfaces,
tp_channel_init_known_interfaces etc. as appropriate for the subclass.</p>
<div class="refsect3">
<a name="tp-proxy-or-subclass-hook-on-interface-add.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>proxy_or_subclass</p></td>
<td class="parameter_description"><p>The <span class="type">GType</span> of <a class="link" href="telepathy-glib-proxy.html#TpProxy"><span class="type">TpProxy</span></a> or a subclass</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>callback</p></td>
<td class="parameter_description"><p>A signal handler for <a class="link" href="telepathy-glib-proxy.html#TpProxy-interface-added" title="The “interface-added” signal"><span class="type">“interface-added”</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 0.7.1</p>
</div>
<hr>
<div class="refsect2">
<a name="tp-proxy-init-known-interfaces"></a><h3>tp_proxy_init_known_interfaces ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
tp_proxy_init_known_interfaces (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Ensure that the known interfaces for TpProxy have been set up.
This is done automatically when necessary, but for correct
overriding of library interfaces by local extensions, you should
call this function before calling
<a class="link" href="telepathy-glib-proxy-subclass.html#tp-proxy-or-subclass-hook-on-interface-add" title="tp_proxy_or_subclass_hook_on_interface_add ()"><code class="function">tp_proxy_or_subclass_hook_on_interface_add()</code></a>.</p>
<p>Functions like tp_connection_init_known_interfaces and
tp_channel_init_known_interfaces do this automatically.</p>
<p class="since">Since: 0.7.6</p>
</div>
<hr>
<div class="refsect2">
<a name="tp-proxy-subclass-add-error-mapping"></a><h3>tp_proxy_subclass_add_error_mapping ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
tp_proxy_subclass_add_error_mapping (<em class="parameter"><code><span class="type">GType</span> proxy_subclass</code></em>,
<em class="parameter"><code>const <span class="type">gchar</span> *static_prefix</code></em>,
<em class="parameter"><code><span class="type">GQuark</span> domain</code></em>,
<em class="parameter"><code><span class="type">GType</span> code_enum_type</code></em>);</pre>
<p>Register a mapping from D-Bus errors received from the given proxy
subclass to <span class="type">GError</span> instances.</p>
<p>When a D-Bus error is received, the <a class="link" href="telepathy-glib-proxy.html#TpProxy"><span class="type">TpProxy</span></a> code checks for error
mappings registered for the class of the proxy receiving the error,
then for all of its parent classes.</p>
<p>If there is an error mapping for which the D-Bus error name
starts with the mapping's <em class="parameter"><code>static_prefix</code></em>
, the proxy will check the
corresponding <em class="parameter"><code>code_enum_type</code></em>
for a value whose <em class="parameter"><code>value_nick</code></em>
is
the rest of the D-Bus error name (with the leading dot removed). If there
isn't such a value, it will continue to try other error mappings.</p>
<p>If a suitable error mapping and code are found, the <span class="type">GError</span> that is raised
will have its error domain set to the <em class="parameter"><code>domain</code></em>
from the error mapping,
and its error code taken from the enum represented by the <em class="parameter"><code>code_enum_type</code></em>
.</p>
<p>If no suitable error mapping or code is found, the <span class="type">GError</span> will have
error domain <a class="link" href="telepathy-glib-proxy.html#TP-DBUS-ERRORS:CAPS" title="TP_DBUS_ERRORS"><code class="literal">TP_DBUS_ERRORS</code></a> and error code
<a class="link" href="telepathy-glib-proxy.html#TP-DBUS-ERROR-UNKNOWN-REMOTE-ERROR:CAPS"><code class="literal">TP_DBUS_ERROR_UNKNOWN_REMOTE_ERROR</code></a>.</p>
<div class="refsect3">
<a name="tp-proxy-subclass-add-error-mapping.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>proxy_subclass</p></td>
<td class="parameter_description"><p>The <span class="type">GType</span> of a subclass of <a class="link" href="telepathy-glib-proxy.html#TpProxy"><span class="type">TpProxy</span></a> (which must not be
<a class="link" href="telepathy-glib-proxy.html#TpProxy"><span class="type">TpProxy</span></a> itself)</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>static_prefix</p></td>
<td class="parameter_description"><p>A prefix for D-Bus error names, not including the trailing
dot (which must remain valid forever, and should usually be in static
storage)</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>domain</p></td>
<td class="parameter_description"><p>A quark representing the corresponding <span class="type">GError</span> domain</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>code_enum_type</p></td>
<td class="parameter_description"><p>The type of a subclass of <span class="type">GEnumClass</span></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 0.7.1</p>
</div>
<hr>
<div class="refsect2">
<a name="tp-proxy-dbus-g-proxy-claim-for-signal-adding"></a><h3>tp_proxy_dbus_g_proxy_claim_for_signal_adding ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
tp_proxy_dbus_g_proxy_claim_for_signal_adding
(<em class="parameter"><code><a href="/usr/share/gtk-doc/html/dbus-glib/dbus-glib-DBusGProxy.html#DBusGProxy"><span class="type">DBusGProxy</span></a> *proxy</code></em>);</pre>
<p>Attempt to "claim" a <a href="/usr/share/gtk-doc/html/dbus-glib/dbus-glib-DBusGProxy.html#DBusGProxy"><span class="type">DBusGProxy</span></a> for addition of signal signatures.
If this function has not been called on <em class="parameter"><code>proxy</code></em>
before, <code class="literal">TRUE</code> is
returned, and the caller may safely call <a href="/usr/share/gtk-doc/html/dbus-glib/dbus-glib-DBusGProxy.html#dbus-g-proxy-add-signal"><code class="function">dbus_g_proxy_add_signal()</code></a>
on <em class="parameter"><code>proxy</code></em>
. If this function has already been caled, <code class="literal">FALSE</code> is
returned, and the caller may not safely call <a href="/usr/share/gtk-doc/html/dbus-glib/dbus-glib-DBusGProxy.html#dbus-g-proxy-add-signal"><code class="function">dbus_g_proxy_add_signal()</code></a>.</p>
<p>This is intended for use by auto-generated signal-adding functions,
to allow interfaces provided as local extensions to override those in
telepathy-glib without causing assertion failures.</p>
<div class="refsect3">
<a name="tp-proxy-dbus-g-proxy-claim-for-signal-adding.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>proxy</p></td>
<td class="parameter_description"><p>a <a href="/usr/share/gtk-doc/html/dbus-glib/dbus-glib-DBusGProxy.html#DBusGProxy"><span class="type">DBusGProxy</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="tp-proxy-dbus-g-proxy-claim-for-signal-adding.returns"></a><h4>Returns</h4>
<p> <code class="literal">TRUE</code> if it is safe to call <a href="/usr/share/gtk-doc/html/dbus-glib/dbus-glib-DBusGProxy.html#dbus-g-proxy-add-signal"><code class="function">dbus_g_proxy_add_signal()</code></a></p>
</div>
<p class="since">Since: 0.7.6</p>
</div>
<hr>
<div class="refsect2">
<a name="TpProxyInvokeFunc"></a><h3>TpProxyInvokeFunc ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
<span class="c_punctuation">(</span>*TpProxyInvokeFunc<span class="c_punctuation">)</span> (<em class="parameter"><code><a class="link" href="telepathy-glib-proxy.html#TpProxy"><span class="type">TpProxy</span></a> *self</code></em>,
<em class="parameter"><code><span class="type">GError</span> *error</code></em>,
<em class="parameter"><code><span class="type">GValueArray</span> *args</code></em>,
<em class="parameter"><code><span class="type">GCallback</span> callback</code></em>,
<em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>,
<em class="parameter"><code><span class="type">GObject</span> *weak_object</code></em>);</pre>
<p>Signature of a callback invoked by the <a class="link" href="telepathy-glib-proxy.html#TpProxy"><span class="type">TpProxy</span></a> machinery after a D-Bus
method call has succeeded or failed. It is responsible for calling the
user-supplied callback.</p>
<p>Because parts of dbus-glib aren't reentrant, this callback may be called
from an idle handler shortly after the method call reply is received,
rather than from the callback for the reply.</p>
<p>At most one of <em class="parameter"><code>args</code></em>
and <em class="parameter"><code>error</code></em>
can be non-<code class="literal">NULL</code> (implementations may
assert this). <em class="parameter"><code>args</code></em>
and <em class="parameter"><code>error</code></em>
may both be <code class="literal">NULL</code> if a method with no
"out" arguments (i.e. a method that returns nothing) was called
successfully.</p>
<p>The <a class="link" href="telepathy-glib-proxy-subclass.html#TpProxyInvokeFunc" title="TpProxyInvokeFunc ()"><span class="type">TpProxyInvokeFunc</span></a> must call callback with <em class="parameter"><code>user_data</code></em>
, <em class="parameter"><code>weak_object</code></em>
,
and appropriate arguments derived from <em class="parameter"><code>error</code></em>
and <em class="parameter"><code>args</code></em>
. It is responsible
for freeing <em class="parameter"><code>error</code></em>
and <em class="parameter"><code>args</code></em>
, if their ownership has not been transferred.</p>
<div class="refsect3">
<a name="TpProxyInvokeFunc.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>the <a class="link" href="telepathy-glib-proxy.html#TpProxy"><span class="type">TpProxy</span></a> on which the D-Bus method was invoked</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p><code class="literal">NULL</code> if the method call succeeded, or a non-<code class="literal">NULL</code> error if the
method call failed</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>args</p></td>
<td class="parameter_description"><p>array of "out" arguments (return values) for the D-Bus method,
or <code class="literal">NULL</code> if an error occurred or if there were no "out" arguments</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>callback</p></td>
<td class="parameter_description"><p>the callback that should be invoked, as passed to
<a class="link" href="telepathy-glib-proxy-subclass.html#tp-proxy-pending-call-v0-new" title="tp_proxy_pending_call_v0_new ()"><code class="function">tp_proxy_pending_call_v0_new()</code></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>user-supplied data to pass to the callback, as passed to
<a class="link" href="telepathy-glib-proxy-subclass.html#tp-proxy-pending-call-v0-new" title="tp_proxy_pending_call_v0_new ()"><code class="function">tp_proxy_pending_call_v0_new()</code></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>weak_object</p></td>
<td class="parameter_description"><p>user-supplied object to pass to the callback, as passed to
<a class="link" href="telepathy-glib-proxy-subclass.html#tp-proxy-pending-call-v0-new" title="tp_proxy_pending_call_v0_new ()"><code class="function">tp_proxy_pending_call_v0_new()</code></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 0.7.1</p>
</div>
<hr>
<div class="refsect2">
<a name="tp-proxy-pending-call-v0-new"></a><h3>tp_proxy_pending_call_v0_new ()</h3>
<pre class="programlisting"><a class="link" href="telepathy-glib-proxy.html#TpProxyPendingCall" title="TpProxyPendingCall"><span class="returnvalue">TpProxyPendingCall</span></a> *
tp_proxy_pending_call_v0_new (<em class="parameter"><code><a class="link" href="telepathy-glib-proxy.html#TpProxy"><span class="type">TpProxy</span></a> *self</code></em>,
<em class="parameter"><code><span class="type">GQuark</span> iface</code></em>,
<em class="parameter"><code>const <span class="type">gchar</span> *member</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/dbus-glib/dbus-glib-DBusGProxy.html#DBusGProxy"><span class="type">DBusGProxy</span></a> *iface_proxy</code></em>,
<em class="parameter"><code><a class="link" href="telepathy-glib-proxy-subclass.html#TpProxyInvokeFunc" title="TpProxyInvokeFunc ()"><span class="type">TpProxyInvokeFunc</span></a> invoke_callback</code></em>,
<em class="parameter"><code><span class="type">GCallback</span> callback</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>,
<em class="parameter"><code><span class="type">GObject</span> *weak_object</code></em>,
<em class="parameter"><code><span class="type">gboolean</span> cancel_must_raise</code></em>);</pre>
<p>Allocate a new pending call structure. After calling this function, the
caller must start an asynchronous D-Bus call and give the resulting
DBusGProxyCall to the pending call object using
<a class="link" href="telepathy-glib-proxy-subclass.html#tp-proxy-pending-call-v0-take-pending-call" title="tp_proxy_pending_call_v0_take_pending_call ()"><code class="function">tp_proxy_pending_call_v0_take_pending_call()</code></a>.</p>
<p>If dbus-glib gets a reply to the call before it's cancelled, the caller
must arrange for <a class="link" href="telepathy-glib-proxy-subclass.html#tp-proxy-pending-call-v0-take-results" title="tp_proxy_pending_call_v0_take_results ()"><code class="function">tp_proxy_pending_call_v0_take_results()</code></a> to be called
with the results (the intention is for this to be done immediately
after dbus_g_proxy_end_call in the callback supplied to dbus-glib).</p>
<p>When dbus-glib discards its reference to the user_data supplied in the
asynchronous D-Bus call (i.e. after the call is cancelled or a reply
arrives), tp_proxy_pending_call_v0_completed must be called (the intention
is for the <a class="link" href="telepathy-glib-proxy.html#TpProxyPendingCall" title="TpProxyPendingCall"><span class="type">TpProxyPendingCall</span></a> to be the <em class="parameter"><code>user_data</code></em>
in the async call,
and for tp_proxy_pending_call_v0_completed to be the <span class="type">GDestroyNotify</span>
passed to the same async call).</p>
<p>This function is for use by <a class="link" href="telepathy-glib-proxy.html#TpProxy"><span class="type">TpProxy</span></a> subclass implementations only, and
should usually only be called from code generated by
tools/glib-client-gen.py.</p>
<div class="refsect3">
<a name="tp-proxy-pending-call-v0-new.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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 proxy</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>iface</p></td>
<td class="parameter_description"><p>a quark whose string value is the D-Bus interface</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>member</p></td>
<td class="parameter_description"><p>the name of the method being called</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>iface_proxy</p></td>
<td class="parameter_description"><p>the interface-specific <a href="/usr/share/gtk-doc/html/dbus-glib/dbus-glib-DBusGProxy.html#DBusGProxy"><span class="type">DBusGProxy</span></a> for <em class="parameter"><code>iface</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>invoke_callback</p></td>
<td class="parameter_description"><p>an implementation of <a class="link" href="telepathy-glib-proxy-subclass.html#TpProxyInvokeFunc" title="TpProxyInvokeFunc ()"><span class="type">TpProxyInvokeFunc</span></a> which will
invoke <em class="parameter"><code>callback</code></em>
with appropriate arguments</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>callback</p></td>
<td class="parameter_description"><p>a callback to be called when the call completes</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>user-supplied data for the callback</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>destroy</p></td>
<td class="parameter_description"><p>user-supplied destructor for the data</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>weak_object</p></td>
<td class="parameter_description"><p>if not <code class="literal">NULL</code>, a <span class="type">GObject</span> which will be weakly referenced by
the signal connection - if it is destroyed, the pending call will
automatically be cancelled</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>cancel_must_raise</p></td>
<td class="parameter_description"><p>if <code class="literal">TRUE</code>, the <em class="parameter"><code>invoke_callback</code></em>
will be run with
error <a class="link" href="telepathy-glib-proxy.html#TP-DBUS-ERROR-CANCELLED:CAPS"><code class="literal">TP_DBUS_ERROR_CANCELLED</code></a> if the call is cancelled by a call to
<a class="link" href="telepathy-glib-proxy.html#tp-proxy-pending-call-cancel" title="tp_proxy_pending_call_cancel ()"><code class="function">tp_proxy_pending_call_cancel()</code></a> or by destruction of the <em class="parameter"><code>weak_object</code></em>
;
if <code class="literal">FALSE</code>, the <em class="parameter"><code>invoke_callback</code></em>
will not be run at all in these cases</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="tp-proxy-pending-call-v0-new.returns"></a><h4>Returns</h4>
<p> a new pending call structure</p>
</div>
<p class="since">Since: 0.7.1</p>
</div>
<hr>
<div class="refsect2">
<a name="tp-proxy-pending-call-v0-completed"></a><h3>tp_proxy_pending_call_v0_completed ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
tp_proxy_pending_call_v0_completed (<em class="parameter"><code><span class="type">gpointer</span> p</code></em>);</pre>
<p>Indicate that dbus-glib has finished with this pending call, and therefore
either <a class="link" href="telepathy-glib-proxy-subclass.html#tp-proxy-pending-call-v0-take-results" title="tp_proxy_pending_call_v0_take_results ()"><code class="function">tp_proxy_pending_call_v0_take_results()</code></a> has already been called,
or it will never be called. See <a class="link" href="telepathy-glib-proxy-subclass.html#tp-proxy-pending-call-v0-new" title="tp_proxy_pending_call_v0_new ()"><code class="function">tp_proxy_pending_call_v0_new()</code></a>.</p>
<p>The signature is chosen to match <span class="type">GDestroyNotify</span>.</p>
<p>This function is for use by <a class="link" href="telepathy-glib-proxy.html#TpProxy"><span class="type">TpProxy</span></a> subclass implementations only, and
should usually only be called from code generated by
tools/glib-client-gen.py.</p>
<div class="refsect3">
<a name="tp-proxy-pending-call-v0-completed.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>p</p></td>
<td class="parameter_description"><p>a <a class="link" href="telepathy-glib-proxy.html#TpProxyPendingCall" title="TpProxyPendingCall"><span class="type">TpProxyPendingCall</span></a> allocated with <a class="link" href="telepathy-glib-proxy-subclass.html#tp-proxy-pending-call-v0-new" title="tp_proxy_pending_call_v0_new ()"><code class="function">tp_proxy_pending_call_v0_new()</code></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<p class="since">Since: 0.7.1</p>
</div>
<hr>
<div class="refsect2">
<a name="tp-proxy-pending-call-v0-take-pending-call"></a><h3>tp_proxy_pending_call_v0_take_pending_call ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
tp_proxy_pending_call_v0_take_pending_call
(<em class="parameter"><code><a class="link" href="telepathy-glib-proxy.html#TpProxyPendingCall" title="TpProxyPendingCall"><span class="type">TpProxyPendingCall</span></a> *pc</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/dbus-glib/dbus-glib-DBusGProxy.html#DBusGProxyCall"><span class="type">DBusGProxyCall</span></a> *pending_call</code></em>);</pre>
<p>Set the underlying pending call to be used by this object.
See also <a class="link" href="telepathy-glib-proxy-subclass.html#tp-proxy-pending-call-v0-new" title="tp_proxy_pending_call_v0_new ()"><code class="function">tp_proxy_pending_call_v0_new()</code></a>.</p>
<p>This function is for use by <a class="link" href="telepathy-glib-proxy.html#TpProxy"><span class="type">TpProxy</span></a> subclass implementations only, and
should usually only be called from code generated by
tools/glib-client-gen.py.</p>
<div class="refsect3">
<a name="tp-proxy-pending-call-v0-take-pending-call.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>pc</p></td>
<td class="parameter_description"><p>A pending call on which this function has not yet been called</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>pending_call</p></td>
<td class="parameter_description"><p>The underlying dbus-glib pending call</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 0.7.1</p>
</div>
<hr>
<div class="refsect2">
<a name="tp-proxy-pending-call-v0-take-results"></a><h3>tp_proxy_pending_call_v0_take_results ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
tp_proxy_pending_call_v0_take_results (<em class="parameter"><code><a class="link" href="telepathy-glib-proxy.html#TpProxyPendingCall" title="TpProxyPendingCall"><span class="type">TpProxyPendingCall</span></a> *pc</code></em>,
<em class="parameter"><code><span class="type">GError</span> *error</code></em>,
<em class="parameter"><code><span class="type">GValueArray</span> *args</code></em>);</pre>
<p>Set the "out" arguments (return values) from this pending call.
See also <a class="link" href="telepathy-glib-proxy-subclass.html#tp-proxy-pending-call-v0-new" title="tp_proxy_pending_call_v0_new ()"><code class="function">tp_proxy_pending_call_v0_new()</code></a>.</p>
<p>This function is for use by <a class="link" href="telepathy-glib-proxy.html#TpProxy"><span class="type">TpProxy</span></a> subclass implementations only, and
should usually only be called from code generated by
tools/glib-client-gen.py.</p>
<div class="refsect3">
<a name="tp-proxy-pending-call-v0-take-results.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>pc</p></td>
<td class="parameter_description"><p>A pending call on which this function has not yet been called</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p><code class="literal">NULL</code> if the call was successful, or an error (whose ownership
is taken over by the pending call object). Because of dbus-glib
idiosyncrasies, this must be the error produced by dbus-glib, not a copy.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>args</p></td>
<td class="parameter_description"><p><code class="literal">NULL</code> if the call failed or had no "out" arguments, or an array
of "out" arguments (whose ownership is taken over by the pending call
object)</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 0.7.1</p>
</div>
<hr>
<div class="refsect2">
<a name="tp-proxy-signal-connection-v0-new"></a><h3>tp_proxy_signal_connection_v0_new ()</h3>
<pre class="programlisting"><a class="link" href="telepathy-glib-proxy.html#TpProxySignalConnection" title="TpProxySignalConnection"><span class="returnvalue">TpProxySignalConnection</span></a> *
tp_proxy_signal_connection_v0_new (<em class="parameter"><code><a class="link" href="telepathy-glib-proxy.html#TpProxy"><span class="type">TpProxy</span></a> *self</code></em>,
<em class="parameter"><code><span class="type">GQuark</span> iface</code></em>,
<em class="parameter"><code>const <span class="type">gchar</span> *member</code></em>,
<em class="parameter"><code>const <span class="type">GType</span> *expected_types</code></em>,
<em class="parameter"><code><span class="type">GCallback</span> collect_args</code></em>,
<em class="parameter"><code><a class="link" href="telepathy-glib-proxy-subclass.html#TpProxyInvokeFunc" title="TpProxyInvokeFunc ()"><span class="type">TpProxyInvokeFunc</span></a> invoke_callback</code></em>,
<em class="parameter"><code><span class="type">GCallback</span> callback</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>,
<em class="parameter"><code><span class="type">GObject</span> *weak_object</code></em>,
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>Allocate a new structure representing a signal connection, and connect to
the signal, arranging for <em class="parameter"><code>invoke_callback</code></em>
to be called when it arrives.</p>
<p>This function is for use by <a class="link" href="telepathy-glib-proxy.html#TpProxy"><span class="type">TpProxy</span></a> subclass implementations only, and
should usually only be called from code generated by
tools/glib-client-gen.py.</p>
<div class="refsect3">
<a name="tp-proxy-signal-connection-v0-new.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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 proxy</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>iface</p></td>
<td class="parameter_description"><p>a quark whose string value is the D-Bus interface</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>member</p></td>
<td class="parameter_description"><p>the name of the signal to which we're connecting</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>expected_types</p></td>
<td class="parameter_description"><p>an array of expected GTypes for the arguments, terminated
by <code class="literal">G_TYPE_INVALID</code></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>collect_args</p></td>
<td class="parameter_description"><p>a callback to be given to <a href="/usr/share/gtk-doc/html/dbus-glib/dbus-glib-DBusGProxy.html#dbus-g-proxy-connect-signal"><code class="function">dbus_g_proxy_connect_signal()</code></a>,
which must marshal the arguments into a <span class="type">GValueArray</span> and use them to call
<a class="link" href="telepathy-glib-proxy-subclass.html#tp-proxy-signal-connection-v0-take-results" title="tp_proxy_signal_connection_v0_take_results ()"><code class="function">tp_proxy_signal_connection_v0_take_results()</code></a>; this callback is not
guaranteed to be called by future versions of telepathy-glib, which might
be able to implement its functionality internally. If no arguments are
expected at all (expected_types = { G_TYPE_INVALID }) then this callback
should instead be <code class="literal">NULL</code></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>invoke_callback</p></td>
<td class="parameter_description"><p>a function which will be called with <em class="parameter"><code>error</code></em>
= <code class="literal">NULL</code>,
which should invoke <em class="parameter"><code>callback</code></em>
with <em class="parameter"><code>user_data</code></em>
, <em class="parameter"><code>weak_object</code></em>
and other
appropriate arguments taken from <em class="parameter"><code>args</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>callback</p></td>
<td class="parameter_description"><p>user callback to be invoked by <em class="parameter"><code>invoke_callback</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>user-supplied data for the callback</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>destroy</p></td>
<td class="parameter_description"><p>user-supplied destructor for the data, which will be called
when the signal connection is disconnected for any reason,
or will be called before this function returns if an error occurs</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>weak_object</p></td>
<td class="parameter_description"><p>if not <code class="literal">NULL</code>, a <span class="type">GObject</span> which will be weakly referenced by
the signal connection - if it is destroyed, the signal connection will
automatically be disconnected</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>If not <code class="literal">NULL</code>, used to raise an error if <code class="literal">NULL</code> is returned</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="tp-proxy-signal-connection-v0-new.returns"></a><h4>Returns</h4>
<p> a signal connection structure, or <code class="literal">NULL</code> if the proxy does not
have the desired interface or has become invalid</p>
</div>
<p class="since">Since: 0.7.1</p>
</div>
<hr>
<div class="refsect2">
<a name="tp-proxy-signal-connection-v0-take-results"></a><h3>tp_proxy_signal_connection_v0_take_results ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
tp_proxy_signal_connection_v0_take_results
(<em class="parameter"><code><a class="link" href="telepathy-glib-proxy.html#TpProxySignalConnection" title="TpProxySignalConnection"><span class="type">TpProxySignalConnection</span></a> *sc</code></em>,
<em class="parameter"><code><span class="type">GValueArray</span> *args</code></em>);</pre>
<p>Feed the results of a signal invocation back into the signal connection
machinery.</p>
<p>This method should only be called from <a class="link" href="telepathy-glib-proxy.html#TpProxy"><span class="type">TpProxy</span></a> subclass implementations,
in the callback that implements <em class="parameter"><code>collect_args</code></em>
.</p>
<div class="refsect3">
<a name="tp-proxy-signal-connection-v0-take-results.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>sc</p></td>
<td class="parameter_description"><p>The signal connection</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>args</p></td>
<td class="parameter_description"><p>The arguments of the signal</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 0.7.1</p>
</div>
</div>
<div class="refsect1">
<a name="telepathy-glib-proxy-subclass.see-also"></a><h2>See Also</h2>
<p><a class="link" href="telepathy-glib-proxy.html#TpProxy"><span class="type">TpProxy</span></a></p>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.32</div>
</body>
</html>
|