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
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>TpPresenceMixin</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-service-base.html" title="Service-side implementation">
<link rel="prev" href="TpBaseChannel.html" title="TpBaseChannel">
<link rel="next" href="telepathy-glib-TpPropertiesMixin.html" title="TpPropertiesMixin">
<meta name="generator" content="GTK-Doc V1.19 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="TpBaseChannel.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="ch-service-base.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">telepathy-glib API Reference Manual</th>
<td><a accesskey="n" href="telepathy-glib-TpPropertiesMixin.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#telepathy-glib-TpPresenceMixin.synopsis" class="shortcut">Top</a>
|
<a href="#telepathy-glib-TpPresenceMixin.description" class="shortcut">Description</a>
|
<a href="#telepathy-glib-TpPresenceMixin.object-hierarchy" class="shortcut">Object Hierarchy</a>
</td></tr>
</table>
<div class="refentry">
<a name="telepathy-glib-TpPresenceMixin"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="telepathy-glib-TpPresenceMixin.top_of_page"></a>TpPresenceMixin</span></h2>
<p>TpPresenceMixin — a mixin implementation of the Presence connection
interface</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="telepathy-glib-TpPresenceMixin.synopsis"></a><h2>Synopsis</h2>
<a name="TpPresenceStatusSpec"></a><pre class="synopsis">
#include <telepathy-glib/telepathy-glib.h>
struct <a class="link" href="telepathy-glib-TpPresenceMixin.html#TpPresenceStatusOptionalArgumentSpec" title="struct TpPresenceStatusOptionalArgumentSpec">TpPresenceStatusOptionalArgumentSpec</a>;
struct <a class="link" href="telepathy-glib-TpPresenceMixin.html#TpPresenceStatusSpec-struct" title="struct TpPresenceStatusSpec">TpPresenceStatusSpec</a>;
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="telepathy-glib-TpPresenceMixin.html#tp-presence-status-spec-can-set-on-self" title="tp_presence_status_spec_can_set_on_self ()">tp_presence_status_spec_can_set_on_self</a>
(<em class="parameter"><code>const <a class="link" href="telepathy-glib-TpPresenceMixin.html#TpPresenceStatusSpec"><span class="type">TpPresenceStatusSpec</span></a> *self</code></em>);
const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="telepathy-glib-TpPresenceMixin.html#tp-presence-status-spec-get-name" title="tp_presence_status_spec_get_name ()">tp_presence_status_spec_get_name</a> (<em class="parameter"><code>const <a class="link" href="telepathy-glib-TpPresenceMixin.html#TpPresenceStatusSpec"><span class="type">TpPresenceStatusSpec</span></a> *self</code></em>);
<a class="link" href="telepathy-glib-enums.html#TpConnectionPresenceType" title="enum TpConnectionPresenceType"><span class="returnvalue">TpConnectionPresenceType</span></a> <a class="link" href="telepathy-glib-TpPresenceMixin.html#tp-presence-status-spec-get-presence-type" title="tp_presence_status_spec_get_presence_type ()">tp_presence_status_spec_get_presence_type</a>
(<em class="parameter"><code>const <a class="link" href="telepathy-glib-TpPresenceMixin.html#TpPresenceStatusSpec"><span class="type">TpPresenceStatusSpec</span></a> *self</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="telepathy-glib-TpPresenceMixin.html#tp-presence-status-spec-has-message" title="tp_presence_status_spec_has_message ()">tp_presence_status_spec_has_message</a> (<em class="parameter"><code>const <a class="link" href="telepathy-glib-TpPresenceMixin.html#TpPresenceStatusSpec"><span class="type">TpPresenceStatusSpec</span></a> *self</code></em>);
<a class="link" href="telepathy-glib-TpPresenceMixin.html#TpPresenceStatusSpec"><span class="returnvalue">TpPresenceStatusSpec</span></a> * <a class="link" href="telepathy-glib-TpPresenceMixin.html#tp-presence-status-spec-new" title="tp_presence_status_spec_new ()">tp_presence_status_spec_new</a> (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>,
<em class="parameter"><code><a class="link" href="telepathy-glib-enums.html#TpConnectionPresenceType" title="enum TpConnectionPresenceType"><span class="type">TpConnectionPresenceType</span></a> type</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> can_set_on_self</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> has_message</code></em>);
<a class="link" href="telepathy-glib-TpPresenceMixin.html#TpPresenceStatusSpec"><span class="returnvalue">TpPresenceStatusSpec</span></a> * <a class="link" href="telepathy-glib-TpPresenceMixin.html#tp-presence-status-spec-copy" title="tp_presence_status_spec_copy ()">tp_presence_status_spec_copy</a> (<em class="parameter"><code>const <a class="link" href="telepathy-glib-TpPresenceMixin.html#TpPresenceStatusSpec"><span class="type">TpPresenceStatusSpec</span></a> *self</code></em>);
<span class="returnvalue">void</span> <a class="link" href="telepathy-glib-TpPresenceMixin.html#tp-presence-status-spec-free" title="tp_presence_status_spec_free ()">tp_presence_status_spec_free</a> (<em class="parameter"><code><a class="link" href="telepathy-glib-TpPresenceMixin.html#TpPresenceStatusSpec"><span class="type">TpPresenceStatusSpec</span></a> *self</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> (<a class="link" href="telepathy-glib-TpPresenceMixin.html#TpPresenceMixinStatusAvailableFunc" title="TpPresenceMixinStatusAvailableFunc ()">*TpPresenceMixinStatusAvailableFunc</a>)
(<em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *obj</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> which</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Hash-Tables.html#GHashTable"><span class="returnvalue">GHashTable</span></a> * (<a class="link" href="telepathy-glib-TpPresenceMixin.html#TpPresenceMixinGetContactStatusesFunc" title="TpPresenceMixinGetContactStatusesFunc ()">*TpPresenceMixinGetContactStatusesFunc</a>)
(<em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *obj</code></em>,
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Arrays.html#GArray"><span class="type">GArray</span></a> *contacts</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> (<a class="link" href="telepathy-glib-TpPresenceMixin.html#TpPresenceMixinSetOwnStatusFunc" title="TpPresenceMixinSetOwnStatusFunc ()">*TpPresenceMixinSetOwnStatusFunc</a>) (<em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *obj</code></em>,
<em class="parameter"><code>const <a class="link" href="telepathy-glib-TpPresenceMixin.html#TpPresenceStatus" title="struct TpPresenceStatus"><span class="type">TpPresenceStatus</span></a> *status</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> (<a class="link" href="telepathy-glib-TpPresenceMixin.html#TpPresenceMixinGetMaximumStatusMessageLengthFunc" title="TpPresenceMixinGetMaximumStatusMessageLengthFunc ()">*TpPresenceMixinGetMaximumStatusMessageLengthFunc</a>)
(<em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *obj</code></em>);
struct <a class="link" href="telepathy-glib-TpPresenceMixin.html#TpPresenceStatus" title="struct TpPresenceStatus">TpPresenceStatus</a>;
<a class="link" href="telepathy-glib-TpPresenceMixin.html#TpPresenceStatus" title="struct TpPresenceStatus"><span class="returnvalue">TpPresenceStatus</span></a> * <a class="link" href="telepathy-glib-TpPresenceMixin.html#tp-presence-status-new" title="tp_presence_status_new ()">tp_presence_status_new</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> which</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> *optional_arguments</code></em>);
<span class="returnvalue">void</span> <a class="link" href="telepathy-glib-TpPresenceMixin.html#tp-presence-status-free" title="tp_presence_status_free ()">tp_presence_status_free</a> (<em class="parameter"><code><a class="link" href="telepathy-glib-TpPresenceMixin.html#TpPresenceStatus" title="struct TpPresenceStatus"><span class="type">TpPresenceStatus</span></a> *status</code></em>);
<a class="link" href="telepathy-glib-TpPresenceMixin.html#TpPresenceMixin" title="TpPresenceMixin">TpPresenceMixin</a>;
struct <a class="link" href="telepathy-glib-TpPresenceMixin.html#TpPresenceMixinClass" title="struct TpPresenceMixinClass">TpPresenceMixinClass</a>;
<span class="returnvalue">void</span> <a class="link" href="telepathy-glib-TpPresenceMixin.html#tp-presence-mixin-class-init" title="tp_presence_mixin_class_init ()">tp_presence_mixin_class_init</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObjectClass"><span class="type">GObjectClass</span></a> *obj_cls</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#glong"><span class="type">glong</span></a> offset</code></em>,
<em class="parameter"><code><a class="link" href="telepathy-glib-TpPresenceMixin.html#TpPresenceMixinStatusAvailableFunc" title="TpPresenceMixinStatusAvailableFunc ()"><span class="type">TpPresenceMixinStatusAvailableFunc</span></a> status_available</code></em>,
<em class="parameter"><code><a class="link" href="telepathy-glib-TpPresenceMixin.html#TpPresenceMixinGetContactStatusesFunc" title="TpPresenceMixinGetContactStatusesFunc ()"><span class="type">TpPresenceMixinGetContactStatusesFunc</span></a> get_contact_statuses</code></em>,
<em class="parameter"><code><a class="link" href="telepathy-glib-TpPresenceMixin.html#TpPresenceMixinSetOwnStatusFunc" title="TpPresenceMixinSetOwnStatusFunc ()"><span class="type">TpPresenceMixinSetOwnStatusFunc</span></a> set_own_status</code></em>,
<em class="parameter"><code>const <a class="link" href="telepathy-glib-TpPresenceMixin.html#TpPresenceStatusSpec"><span class="type">TpPresenceStatusSpec</span></a> *statuses</code></em>);
<span class="returnvalue">void</span> <a class="link" href="telepathy-glib-TpPresenceMixin.html#tp-presence-mixin-init" title="tp_presence_mixin_init ()">tp_presence_mixin_init</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *obj</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#glong"><span class="type">glong</span></a> offset</code></em>);
<span class="returnvalue">void</span> <a class="link" href="telepathy-glib-TpPresenceMixin.html#tp-presence-mixin-finalize" title="tp_presence_mixin_finalize ()">tp_presence_mixin_finalize</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *obj</code></em>);
<span class="returnvalue">void</span> <a class="link" href="telepathy-glib-TpPresenceMixin.html#tp-presence-mixin-emit-presence-update" title="tp_presence_mixin_emit_presence_update ()">tp_presence_mixin_emit_presence_update</a>
(<em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *obj</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> *contact_presences</code></em>);
<span class="returnvalue">void</span> <a class="link" href="telepathy-glib-TpPresenceMixin.html#tp-presence-mixin-emit-one-presence-update" title="tp_presence_mixin_emit_one_presence_update ()">tp_presence_mixin_emit_one_presence_update</a>
(<em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *obj</code></em>,
<em class="parameter"><code><a class="link" href="telepathy-glib-handle.html#TpHandle" title="TpHandle"><span class="type">TpHandle</span></a> handle</code></em>,
<em class="parameter"><code>const <a class="link" href="telepathy-glib-TpPresenceMixin.html#TpPresenceStatus" title="struct TpPresenceStatus"><span class="type">TpPresenceStatus</span></a> *status</code></em>);
<span class="returnvalue">void</span> <a class="link" href="telepathy-glib-TpPresenceMixin.html#tp-presence-mixin-iface-init" title="tp_presence_mixin_iface_init ()">tp_presence_mixin_iface_init</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> g_iface</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> iface_data</code></em>);
<span class="returnvalue">void</span> <a class="link" href="telepathy-glib-TpPresenceMixin.html#tp-presence-mixin-simple-presence-iface-init" title="tp_presence_mixin_simple_presence_iface_init ()">tp_presence_mixin_simple_presence_iface_init</a>
(<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> g_iface</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> iface_data</code></em>);
<span class="returnvalue">void</span> <a class="link" href="telepathy-glib-TpPresenceMixin.html#tp-presence-mixin-simple-presence-init-dbus-properties" title="tp_presence_mixin_simple_presence_init_dbus_properties ()">tp_presence_mixin_simple_presence_init_dbus_properties</a>
(<em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObjectClass"><span class="type">GObjectClass</span></a> *cls</code></em>);
<span class="returnvalue">void</span> <a class="link" href="telepathy-glib-TpPresenceMixin.html#tp-presence-mixin-simple-presence-register-with-contacts-mixin" title="tp_presence_mixin_simple_presence_register_with_contacts_mixin ()">tp_presence_mixin_simple_presence_register_with_contacts_mixin</a>
(<em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *obj</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="telepathy-glib-TpPresenceMixin.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
GBoxed
+----TpPresenceStatusSpec
</pre>
</div>
<div class="refsect1">
<a name="telepathy-glib-TpPresenceMixin.description"></a><h2>Description</h2>
<p>
This mixin can be added to a <a class="link" href="TpBaseConnection.html" title="TpBaseConnection"><span class="type">TpBaseConnection</span></a> subclass to implement the
SimplePresence and/or Presence interfaces. Implementing both interfaces
(as described below) is recommended. In particular, you must implement the
old-style Presence interface if compatibility with telepathy-glib
versions older than 0.11.13 is required.
</p>
<p>
To use the presence mixin, include a <a class="link" href="telepathy-glib-TpPresenceMixin.html#TpPresenceMixinClass" title="struct TpPresenceMixinClass"><span class="type">TpPresenceMixinClass</span></a> somewhere in your
class structure and a <a class="link" href="telepathy-glib-TpPresenceMixin.html#TpPresenceMixin" title="TpPresenceMixin"><span class="type">TpPresenceMixin</span></a> somewhere in your instance structure,
and call <a class="link" href="telepathy-glib-TpPresenceMixin.html#tp-presence-mixin-class-init" title="tp_presence_mixin_class_init ()"><code class="function">tp_presence_mixin_class_init()</code></a> from your class_init function,
<a class="link" href="telepathy-glib-TpPresenceMixin.html#tp-presence-mixin-init" title="tp_presence_mixin_init ()"><code class="function">tp_presence_mixin_init()</code></a> from your init function or constructor, and
<a class="link" href="telepathy-glib-TpPresenceMixin.html#tp-presence-mixin-finalize" title="tp_presence_mixin_finalize ()"><code class="function">tp_presence_mixin_finalize()</code></a> from your dispose or finalize function.
</p>
<p>
</p>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="id-1.6.12.5.4.1"></a>Implementing SimplePresence</h2></div></div></div>
<p>
Since 0.7.13 this mixin supports the entire SimplePresence interface.
You can implement <a class="link" href="telepathy-glib-svc-connection.html#TpSvcConnectionInterfaceSimplePresence"><span class="type">TpSvcConnectionInterfaceSimplePresence</span></a> as follows:
</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem"><p>use the <a class="link" href="telepathy-glib-TpContactsMixin.html#TpContactsMixin" title="TpContactsMixin"><span class="type">TpContactsMixin</span></a> and
<a class="link" href="telepathy-glib-dbus-properties-mixin.html" title="TpDBusPropertiesMixin">TpDBusPropertiesMixin</a>;</p></li>
<li class="listitem">
<p>pass <a class="link" href="telepathy-glib-TpPresenceMixin.html#tp-presence-mixin-simple-presence-iface-init" title="tp_presence_mixin_simple_presence_iface_init ()"><code class="function">tp_presence_mixin_simple_presence_iface_init()</code></a> as an
argument to <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#G-IMPLEMENT-INTERFACE:CAPS"><code class="function">G_IMPLEMENT_INTERFACE()</code></a>, like so:
</p>
<div class="informalexample">
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="listing_lines" align="right"><pre>1
2
3
4
5
6
7</pre></td>
<td class="listing_code"><pre class="programlisting"><span class="function"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#G-DEFINE-TYPE-WITH-CODE:CAPS">G_DEFINE_TYPE_WITH_CODE</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">MyConnection</span><span class="symbol">,</span><span class="normal"> my_connection</span><span class="symbol">,</span>
<span class="normal"> TP_TYPE_BASE_CONNECTION</span><span class="symbol">,</span>
<span class="normal"> </span><span class="comment">// ...</span>
<span class="normal"> </span><span class="function"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#G-IMPLEMENT-INTERFACE:CAPS">G_IMPLEMENT_INTERFACE</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">TP_TYPE_SVC_CONNECTION_INTERFACE_SIMPLE_PRESENCE</span><span class="symbol">,</span>
<span class="normal"> <a href="telepathy-glib-TpPresenceMixin.html#tp-presence-mixin-simple-presence-iface-init">tp_presence_mixin_simple_presence_iface_init</a></span><span class="symbol">);</span>
<span class="normal"> </span><span class="comment">// ...</span>
<span class="normal"> </span><span class="symbol">)</span></pre></td>
</tr>
</tbody>
</table>
</div>
</li>
<li class="listitem"><p>
call <a class="link" href="telepathy-glib-TpPresenceMixin.html#tp-presence-mixin-simple-presence-init-dbus-properties" title="tp_presence_mixin_simple_presence_init_dbus_properties ()"><code class="function">tp_presence_mixin_simple_presence_init_dbus_properties()</code></a> in the
<a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GTypeInfo"><span class="type">GTypeInfo</span></a> class_init function;
</p></li>
<li class="listitem"><p>
call <a class="link" href="telepathy-glib-TpPresenceMixin.html#tp-presence-mixin-simple-presence-register-with-contacts-mixin" title="tp_presence_mixin_simple_presence_register_with_contacts_mixin ()"><code class="function">tp_presence_mixin_simple_presence_register_with_contacts_mixin()</code></a>
in the <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObjectClass"><span class="type">GObjectClass</span></a> constructed function.
</p></li>
</ul></div>
<p>
</p>
</div>
<p>
</p>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="id-1.6.12.5.4.2"></a>Implementing old-style Presence</h2></div></div></div>
<p>
This mixin also supports a large subset of the deprecated Presence
interface. It does not support protocols where it is possible to set
multiple statuses on yourself at once (all presence statuses will have the
exclusive flag set), or last-activity-time information.
</p>
<p>
To use the presence mixin as the implementation of
<a class="link" href="telepathy-glib-svc-connection.html#TpSvcConnectionInterfacePresence"><span class="type">TpSvcConnectionInterfacePresence</span></a>, use <a class="link" href="telepathy-glib-TpPresenceMixin.html#tp-presence-mixin-iface-init" title="tp_presence_mixin_iface_init ()"><code class="function">tp_presence_mixin_iface_init()</code></a> as
the function you pass to <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#G-IMPLEMENT-INTERFACE:CAPS"><code class="function">G_IMPLEMENT_INTERFACE()</code></a>, as in the following
example. The presence mixin implements all of the D-Bus methods in the
Presence interface.
</p>
<div class="informalexample">
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="listing_lines" align="right"><pre>1
2
3
4
5
6
7</pre></td>
<td class="listing_code"><pre class="programlisting"><span class="function"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#G-DEFINE-TYPE-WITH-CODE:CAPS">G_DEFINE_TYPE_WITH_CODE</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">MyConnection</span><span class="symbol">,</span><span class="normal"> my_connection</span><span class="symbol">,</span>
<span class="normal"> TP_TYPE_BASE_CONNECTION</span><span class="symbol">,</span>
<span class="normal"> </span><span class="comment">// ...</span>
<span class="normal"> </span><span class="function"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#G-IMPLEMENT-INTERFACE:CAPS">G_IMPLEMENT_INTERFACE</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">TP_TYPE_SVC_CONNECTION_INTERFACE_PRESENCE</span><span class="symbol">,</span>
<span class="normal"> <a href="telepathy-glib-TpPresenceMixin.html#tp-presence-mixin-iface-init">tp_presence_mixin_iface_init</a></span><span class="symbol">);</span>
<span class="normal"> </span><span class="comment">// ...</span>
<span class="normal"> </span><span class="symbol">)</span></pre></td>
</tr>
</tbody>
</table>
</div>
<p>
In telepathy-glib versions older than 0.11.13, every connection
that used the <a class="link" href="telepathy-glib-TpPresenceMixin.html#TpPresenceMixin" title="TpPresenceMixin"><span class="type">TpPresenceMixin</span></a> was required to implement
<a class="link" href="telepathy-glib-svc-connection.html#TpSvcConnectionInterfacePresence"><span class="type">TpSvcConnectionInterfacePresence</span></a>; failing to do so would lead to an
assertion failure. Since 0.11.13, this is no longer required.
</p>
</div>
<p>
</p>
</div>
<div class="refsect1">
<a name="telepathy-glib-TpPresenceMixin.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="TpPresenceStatusOptionalArgumentSpec"></a><h3>struct TpPresenceStatusOptionalArgumentSpec</h3>
<pre class="programlisting">struct TpPresenceStatusOptionalArgumentSpec {
const gchar *name;
const gchar *dtype;
};
</pre>
<p>
Structure specifying a supported optional argument for a presence status.
</p>
<p>
In addition to the fields documented here, there are two gpointer fields
which must currently be <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. A meaning may be defined for these in a
future version of telepathy-glib.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="TpPresenceStatusOptionalArgumentSpec.name"></a>name</code></em>;</span></p></td>
<td>Name of the argument as passed over D-Bus</td>
</tr>
<tr>
<td><p><span class="term">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="TpPresenceStatusOptionalArgumentSpec.dtype"></a>dtype</code></em>;</span></p></td>
<td>D-Bus type signature of the argument</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="TpPresenceStatusSpec-struct"></a><h3>struct TpPresenceStatusSpec</h3>
<pre class="programlisting">struct TpPresenceStatusSpec {
const gchar *name;
TpConnectionPresenceType presence_type;
gboolean self;
const TpPresenceStatusOptionalArgumentSpec *optional_arguments;
};
</pre>
<p>
Structure specifying a supported presence status.
</p>
<p>
In addition to the fields documented here, there are two gpointer fields
which must currently be <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. A meaning may be defined for these in a
future version of telepathy-glib.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="TpPresenceStatusSpec-struct.name"></a>name</code></em>;</span></p></td>
<td>String identifier of the presence status</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="telepathy-glib-enums.html#TpConnectionPresenceType" title="enum TpConnectionPresenceType"><span class="type">TpConnectionPresenceType</span></a> <em class="structfield"><code><a name="TpPresenceStatusSpec-struct.presence-type"></a>presence_type</code></em>;</span></p></td>
<td>A type value, as specified by <a class="link" href="telepathy-glib-enums.html#TpConnectionPresenceType" title="enum TpConnectionPresenceType"><span class="type">TpConnectionPresenceType</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> <em class="structfield"><code><a name="TpPresenceStatusSpec-struct.self"></a>self</code></em>;</span></p></td>
<td>Indicates if this status may be set on yourself</td>
</tr>
<tr>
<td><p><span class="term">const <a class="link" href="telepathy-glib-TpPresenceMixin.html#TpPresenceStatusOptionalArgumentSpec" title="struct TpPresenceStatusOptionalArgumentSpec"><span class="type">TpPresenceStatusOptionalArgumentSpec</span></a> *<em class="structfield"><code><a name="TpPresenceStatusSpec-struct.optional-arguments"></a>optional_arguments</code></em>;</span></p></td>
<td>An array of <a class="link" href="telepathy-glib-TpPresenceMixin.html#TpPresenceStatusOptionalArgumentSpec" title="struct TpPresenceStatusOptionalArgumentSpec"><span class="type">TpPresenceStatusOptionalArgumentSpec</span></a>
structures representing the optional arguments for this status, terminated
by a NULL name. If there are no optional arguments for a status, this can
be NULL. In modern Telepathy connection managers, the only optional
argument should be a string (type "s") named "message" on statuses
that have an optional human-readable message. All other optional arguments
are deprecated.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="tp-presence-status-spec-can-set-on-self"></a><h3>tp_presence_status_spec_can_set_on_self ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> tp_presence_status_spec_can_set_on_self
(<em class="parameter"><code>const <a class="link" href="telepathy-glib-TpPresenceMixin.html#TpPresenceStatusSpec"><span class="type">TpPresenceStatusSpec</span></a> *self</code></em>);</pre>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
<td>a presence status specification</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the user can set this presence status on themselves (most
statuses), or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if they cannot directly set it on
themselves (typically used for <a class="link" href="telepathy-glib-enums.html#TP-CONNECTION-PRESENCE-TYPE-OFFLINE:CAPS"><code class="literal">TP_CONNECTION_PRESENCE_TYPE_OFFLINE</code></a>
and <a class="link" href="telepathy-glib-enums.html#TP-CONNECTION-PRESENCE-TYPE-ERROR:CAPS"><code class="literal">TP_CONNECTION_PRESENCE_TYPE_ERROR</code></a>)</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 0.23.1</p>
</div>
<hr>
<div class="refsect2">
<a name="tp-presence-status-spec-get-name"></a><h3>tp_presence_status_spec_get_name ()</h3>
<pre class="programlisting">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * tp_presence_status_spec_get_name (<em class="parameter"><code>const <a class="link" href="telepathy-glib-TpPresenceMixin.html#TpPresenceStatusSpec"><span class="type">TpPresenceStatusSpec</span></a> *self</code></em>);</pre>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
<td>a presence status specification</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the name of this presence status,
such as "available" or "out-to-lunch". <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 0.23.1</p>
</div>
<hr>
<div class="refsect2">
<a name="tp-presence-status-spec-get-presence-type"></a><h3>tp_presence_status_spec_get_presence_type ()</h3>
<pre class="programlisting"><a class="link" href="telepathy-glib-enums.html#TpConnectionPresenceType" title="enum TpConnectionPresenceType"><span class="returnvalue">TpConnectionPresenceType</span></a> tp_presence_status_spec_get_presence_type
(<em class="parameter"><code>const <a class="link" href="telepathy-glib-TpPresenceMixin.html#TpPresenceStatusSpec"><span class="type">TpPresenceStatusSpec</span></a> *self</code></em>);</pre>
<p>
Return the category into which this presence type falls. For instance,
for XMPP's "" (do not disturb) status, this would return
<a class="link" href="telepathy-glib-enums.html#TP-CONNECTION-PRESENCE-TYPE-BUSY:CAPS"><code class="literal">TP_CONNECTION_PRESENCE_TYPE_BUSY</code></a>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
<td>a presence status specification</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a <a class="link" href="telepathy-glib-enums.html#TpConnectionPresenceType" title="enum TpConnectionPresenceType"><span class="type">TpConnectionPresenceType</span></a>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 0.23.1</p>
</div>
<hr>
<div class="refsect2">
<a name="tp-presence-status-spec-has-message"></a><h3>tp_presence_status_spec_has_message ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> tp_presence_status_spec_has_message (<em class="parameter"><code>const <a class="link" href="telepathy-glib-TpPresenceMixin.html#TpPresenceStatusSpec"><span class="type">TpPresenceStatusSpec</span></a> *self</code></em>);</pre>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
<td>a presence status specification</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if this presence status is accompanied by an optional
human-readable message</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 0.23.1</p>
</div>
<hr>
<div class="refsect2">
<a name="tp-presence-status-spec-new"></a><h3>tp_presence_status_spec_new ()</h3>
<pre class="programlisting"><a class="link" href="telepathy-glib-TpPresenceMixin.html#TpPresenceStatusSpec"><span class="returnvalue">TpPresenceStatusSpec</span></a> * tp_presence_status_spec_new (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>,
<em class="parameter"><code><a class="link" href="telepathy-glib-enums.html#TpConnectionPresenceType" title="enum TpConnectionPresenceType"><span class="type">TpConnectionPresenceType</span></a> type</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> can_set_on_self</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> has_message</code></em>);</pre>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>the name of the new presence status</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
<td>the category into which this presence status falls</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>can_set_on_self</code></em> :</span></p></td>
<td>
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the user can set this presence status
on themselves</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>has_message</code></em> :</span></p></td>
<td>
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if this presence status is accompanied by an
optional human-readable message</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a new <a class="link" href="telepathy-glib-TpPresenceMixin.html#TpPresenceStatusSpec"><span class="type">TpPresenceStatusSpec</span></a>. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 0.23.1</p>
</div>
<hr>
<div class="refsect2">
<a name="tp-presence-status-spec-copy"></a><h3>tp_presence_status_spec_copy ()</h3>
<pre class="programlisting"><a class="link" href="telepathy-glib-TpPresenceMixin.html#TpPresenceStatusSpec"><span class="returnvalue">TpPresenceStatusSpec</span></a> * tp_presence_status_spec_copy (<em class="parameter"><code>const <a class="link" href="telepathy-glib-TpPresenceMixin.html#TpPresenceStatusSpec"><span class="type">TpPresenceStatusSpec</span></a> *self</code></em>);</pre>
<p>
Copy a presence status specification.
</p>
<p>
If <em class="parameter"><code>self</code></em> has optional arguments other than a string named "message",
they are not copied. Optional arguments with other names or types
are deprecated.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
<td>a presence status specification</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a new <a class="link" href="telepathy-glib-TpPresenceMixin.html#TpPresenceStatusSpec"><span class="type">TpPresenceStatusSpec</span></a> resembling <em class="parameter"><code>self</code></em>. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 0.23.1</p>
</div>
<hr>
<div class="refsect2">
<a name="tp-presence-status-spec-free"></a><h3>tp_presence_status_spec_free ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> tp_presence_status_spec_free (<em class="parameter"><code><a class="link" href="telepathy-glib-TpPresenceMixin.html#TpPresenceStatusSpec"><span class="type">TpPresenceStatusSpec</span></a> *self</code></em>);</pre>
<p>
Free a presence status specification produced by
<a class="link" href="telepathy-glib-TpPresenceMixin.html#tp-presence-status-spec-new" title="tp_presence_status_spec_new ()"><code class="function">tp_presence_status_spec_new()</code></a> or <a class="link" href="telepathy-glib-TpPresenceMixin.html#tp-presence-status-spec-copy" title="tp_presence_status_spec_copy ()"><code class="function">tp_presence_status_spec_copy()</code></a>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
<td>a presence status specification. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
</td>
</tr></tbody>
</table></div>
<p class="since">Since 0.23.1</p>
</div>
<hr>
<div class="refsect2">
<a name="TpPresenceMixinStatusAvailableFunc"></a><h3>TpPresenceMixinStatusAvailableFunc ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> (*TpPresenceMixinStatusAvailableFunc)
(<em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *obj</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> which</code></em>);</pre>
<p>
Signature of a callback to be used to determine if a given presence
status can be set on the connection. Most users of this mixin do not need to
supply an implementation of this callback: the value of
<span class="type">TpPresenceStatusSpec.self</span> is enough to determine whether this is a
user-settable presence, so <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> should be passed to
<a class="link" href="telepathy-glib-TpPresenceMixin.html#tp-presence-mixin-class-init" title="tp_presence_mixin_class_init ()"><code class="function">tp_presence_mixin_class_init()</code></a> for this callback.
</p>
<p>
One place where this callback may be needed is on XMPP: not all server
implementation support the user becoming invisible. So an XMPP
implementation would implement this function, so that—once connected—the
hidden status is only available if the server supports it. Before the
connection is connected, this callback should return <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> for every status
that might possibly be supported: this allows the user to at least try to
sign in as invisible.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>obj</code></em> :</span></p></td>
<td>An instance of a <a class="link" href="TpBaseConnection.html" title="TpBaseConnection"><span class="type">TpBaseConnection</span></a> subclass implementing the presence
interface with this mixin</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>which</code></em> :</span></p></td>
<td>An index into the array of <a class="link" href="telepathy-glib-TpPresenceMixin.html#TpPresenceStatusSpec"><span class="type">TpPresenceStatusSpec</span></a> provided to
<a class="link" href="telepathy-glib-TpPresenceMixin.html#tp-presence-mixin-class-init" title="tp_presence_mixin_class_init ()"><code class="function">tp_presence_mixin_class_init()</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the status can be set on this connection; <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if not.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="TpPresenceMixinGetContactStatusesFunc"></a><h3>TpPresenceMixinGetContactStatusesFunc ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Hash-Tables.html#GHashTable"><span class="returnvalue">GHashTable</span></a> * (*TpPresenceMixinGetContactStatusesFunc)
(<em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *obj</code></em>,
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Arrays.html#GArray"><span class="type">GArray</span></a> *contacts</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Signature of the callback used to get the stored presence status of
contacts. The returned hash table should have contact handles mapped to
their respective presence statuses in <a class="link" href="telepathy-glib-TpPresenceMixin.html#TpPresenceStatus" title="struct TpPresenceStatus"><span class="type">TpPresenceStatus</span></a> structs.
</p>
<p>
The returned hash table will be freed with g_hash_table_unref. The
callback is responsible for ensuring that this does any cleanup that
may be necessary.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>obj</code></em> :</span></p></td>
<td>An object with this mixin.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>contacts</code></em> :</span></p></td>
<td>An array of <a class="link" href="telepathy-glib-handle.html#TpHandle" title="TpHandle"><span class="type">TpHandle</span></a> for the contacts to get presence status for</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>Used to return a Telepathy D-Bus error if <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> is returned</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The contact presence on success, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> with
error set on error. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="TpPresenceMixinSetOwnStatusFunc"></a><h3>TpPresenceMixinSetOwnStatusFunc ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> (*TpPresenceMixinSetOwnStatusFunc) (<em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *obj</code></em>,
<em class="parameter"><code>const <a class="link" href="telepathy-glib-TpPresenceMixin.html#TpPresenceStatus" title="struct TpPresenceStatus"><span class="type">TpPresenceStatus</span></a> *status</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Signature of the callback used to commit changes to the user's own presence
status in SetStatuses. It is also used in ClearStatus and RemoveStatus to
reset the user's own status back to the "default" one with a <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> status
argument.
</p>
<p>
The optional_arguments hash table in <em class="parameter"><code>status</code></em>, if not NULL, will have been
filtered so it only contains recognised parameters, so the callback
need not (and cannot) check for unrecognised parameters. However, the
types of the parameters are not currently checked, so the callback is
responsible for doing so.
</p>
<p>
The callback is responsible for emitting PresenceUpdate, if appropriate,
by calling <a class="link" href="telepathy-glib-TpPresenceMixin.html#tp-presence-mixin-emit-presence-update" title="tp_presence_mixin_emit_presence_update ()"><code class="function">tp_presence_mixin_emit_presence_update()</code></a>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>obj</code></em> :</span></p></td>
<td>An object with this mixin.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>status</code></em> :</span></p></td>
<td>The status to set, or NULL for whatever the protocol defines as a
"default" status</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>Used to return a Telepathy D-Bus error if <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> is returned</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the operation was successful, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if not.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="TpPresenceMixinGetMaximumStatusMessageLengthFunc"></a><h3>TpPresenceMixinGetMaximumStatusMessageLengthFunc ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> (*TpPresenceMixinGetMaximumStatusMessageLengthFunc)
(<em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *obj</code></em>);</pre>
<p>
Signature of a callback used to determine the maximum length of status
messages. If this callback is provided and returns non-zero, the
<a class="link" href="telepathy-glib-TpPresenceMixin.html#TpPresenceMixinSetOwnStatusFunc" title="TpPresenceMixinSetOwnStatusFunc ()"><span class="type">TpPresenceMixinSetOwnStatusFunc</span></a> implementation is responsible for
truncating the message to fit this limit, if necessary.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>obj</code></em> :</span></p></td>
<td>An object with this mixin.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the maximum number of UTF-8 characters which may appear in a status
message, or 0 if there is no limit.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 0.14.5</p>
</div>
<hr>
<div class="refsect2">
<a name="TpPresenceStatus"></a><h3>struct TpPresenceStatus</h3>
<pre class="programlisting">struct TpPresenceStatus {
guint index;
GHashTable *optional_arguments;
};
</pre>
<p>
Structure representing a presence status.
</p>
<p>
In addition to the fields documented here, there are two gpointer fields
which must currently be <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. A meaning may be defined for these in a
future version of telepathy-glib.
</p>
<p>
In modern Telepathy connection managers, the only optional
argument should be a <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#G-TYPE-STRING:CAPS"><code class="literal">G_TYPE_STRING</code></a> named "message", on statuses
that have an optional human-readable message. All other optional arguments
are deprecated.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> <em class="structfield"><code><a name="TpPresenceStatus.index"></a>index</code></em>;</span></p></td>
<td>Index of the presence status in the provided supported presence
statuses array</td>
</tr>
<tr>
<td><p><span class="term"><a href="http://library.gnome.org/devel/glib/unstable/glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> *<em class="structfield"><code><a name="TpPresenceStatus.optional-arguments"></a>optional_arguments</code></em>;</span></p></td>
<td>A GHashTable mapping of string identifiers to GValues
of the optional status arguments, if any. If there are no optional
arguments, this pointer may be NULL.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="tp-presence-status-new"></a><h3>tp_presence_status_new ()</h3>
<pre class="programlisting"><a class="link" href="telepathy-glib-TpPresenceMixin.html#TpPresenceStatus" title="struct TpPresenceStatus"><span class="returnvalue">TpPresenceStatus</span></a> * tp_presence_status_new (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> which</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> *optional_arguments</code></em>);</pre>
<p>
Construct a presence status structure. You should free the returned
structure with <a class="link" href="telepathy-glib-TpPresenceMixin.html#tp-presence-status-free" title="tp_presence_status_free ()"><span class="type">tp_presence_status_free</span></a>.
</p>
<p>
In modern Telepathy connection managers, the only optional
argument should be a <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#G-TYPE-STRING:CAPS"><code class="literal">G_TYPE_STRING</code></a> named "message", on statuses
that have an optional human-readable message. All other optional arguments
are deprecated.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>which</code></em> :</span></p></td>
<td>Index of the presence status in the provided supported presence
statuses array</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>optional_arguments</code></em> :</span></p></td>
<td>Optional arguments for the presence statuses. Can be
NULL if there are no optional arguments. The presence status object makes a
copy of the hashtable, so you should free the original.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A pointer to the newly allocated presence status structure.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="tp-presence-status-free"></a><h3>tp_presence_status_free ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> tp_presence_status_free (<em class="parameter"><code><a class="link" href="telepathy-glib-TpPresenceMixin.html#TpPresenceStatus" title="struct TpPresenceStatus"><span class="type">TpPresenceStatus</span></a> *status</code></em>);</pre>
<p>
Deallocate all resources associated with a presence status structure.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>status</code></em> :</span></p></td>
<td>A pointer to the presence status structure to free.</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="TpPresenceMixin"></a><h3>TpPresenceMixin</h3>
<pre class="programlisting">typedef struct _TpPresenceMixin TpPresenceMixin;</pre>
<p>
Structure to be included in the instance structure of objects that
use this mixin. Initialize it with <a class="link" href="telepathy-glib-TpPresenceMixin.html#tp-presence-mixin-init" title="tp_presence_mixin_init ()"><code class="function">tp_presence_mixin_init()</code></a>.
</p>
<p>
There are no public fields.
</p>
</div>
<hr>
<div class="refsect2">
<a name="TpPresenceMixinClass"></a><h3>struct TpPresenceMixinClass</h3>
<pre class="programlisting">struct TpPresenceMixinClass {
TpPresenceMixinStatusAvailableFunc status_available;
TpPresenceMixinGetContactStatusesFunc get_contact_statuses;
TpPresenceMixinSetOwnStatusFunc set_own_status;
const TpPresenceStatusSpec *statuses;
TpPresenceMixinGetMaximumStatusMessageLengthFunc get_maximum_status_message_length;
};
</pre>
<p>
Structure to be included in the class structure of objects that
use this mixin. Initialize it with <a class="link" href="telepathy-glib-TpPresenceMixin.html#tp-presence-mixin-class-init" title="tp_presence_mixin_class_init ()"><code class="function">tp_presence_mixin_class_init()</code></a>.
</p>
<p>
If the protocol imposes a limit on the length of status messages, one should
implement <em class="parameter"><code>get_maximum_status_message_length</code></em>. If this callback is not
implemented, it is assumed that there is no limit. The callback function
should be set after calling <a class="link" href="telepathy-glib-TpPresenceMixin.html#tp-presence-mixin-class-init" title="tp_presence_mixin_class_init ()"><code class="function">tp_presence_mixin_class_init()</code></a>, like so:
</p>
<p>
</p>
<div class="informalexample">
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="listing_lines" align="right"><pre>1
2
3
4
5
6
7</pre></td>
<td class="listing_code"><pre class="programlisting"><span class="usertype">TpPresenceMixinClass</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">mixin_class</span><span class="symbol">;</span>
<span class="function"><a href="telepathy-glib-TpPresenceMixin.html#tp-presence-mixin-class-init">tp_presence_mixin_class_init</a></span><span class="normal"> </span><span class="symbol">((</span><span class="normal"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObjectClass">GObjectClass</a> </span><span class="symbol">*)</span><span class="normal"> klass</span><span class="symbol">,</span>
<span class="normal"> </span><span class="function"><a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#G-STRUCT-OFFSET:CAPS">G_STRUCT_OFFSET</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">SomeObjectClass</span><span class="symbol">,</span><span class="normal"> presence_mixin</span><span class="symbol">));</span>
<span class="normal">mixin_class </span><span class="symbol">=</span><span class="normal"> </span><span class="function">TP_PRESENCE_MIXIN_CLASS</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">klass</span><span class="symbol">);</span>
<span class="normal">mixin_class</span><span class="symbol">-></span><span class="normal">get_maximum_status_message_length </span><span class="symbol">=</span>
<span class="normal"> some_object_get_maximum_status_message_length</span><span class="symbol">;</span></pre></td>
</tr>
</tbody>
</table>
</div>
<p>
</p>
<p>
All other fields should be considered read-only.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><a class="link" href="telepathy-glib-TpPresenceMixin.html#TpPresenceMixinStatusAvailableFunc" title="TpPresenceMixinStatusAvailableFunc ()"><span class="type">TpPresenceMixinStatusAvailableFunc</span></a> <em class="structfield"><code><a name="TpPresenceMixinClass.status-available"></a>status_available</code></em>;</span></p></td>
<td>The status-available function that was passed to
<a class="link" href="telepathy-glib-TpPresenceMixin.html#tp-presence-mixin-class-init" title="tp_presence_mixin_class_init ()"><code class="function">tp_presence_mixin_class_init()</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="telepathy-glib-TpPresenceMixin.html#TpPresenceMixinGetContactStatusesFunc" title="TpPresenceMixinGetContactStatusesFunc ()"><span class="type">TpPresenceMixinGetContactStatusesFunc</span></a> <em class="structfield"><code><a name="TpPresenceMixinClass.get-contact-statuses"></a>get_contact_statuses</code></em>;</span></p></td>
<td>The get-contact-statuses function that was passed to
<a class="link" href="telepathy-glib-TpPresenceMixin.html#tp-presence-mixin-class-init" title="tp_presence_mixin_class_init ()"><code class="function">tp_presence_mixin_class_init()</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="telepathy-glib-TpPresenceMixin.html#TpPresenceMixinSetOwnStatusFunc" title="TpPresenceMixinSetOwnStatusFunc ()"><span class="type">TpPresenceMixinSetOwnStatusFunc</span></a> <em class="structfield"><code><a name="TpPresenceMixinClass.set-own-status"></a>set_own_status</code></em>;</span></p></td>
<td>The set-own-status function that was passed to
<a class="link" href="telepathy-glib-TpPresenceMixin.html#tp-presence-mixin-class-init" title="tp_presence_mixin_class_init ()"><code class="function">tp_presence_mixin_class_init()</code></a>
</td>
</tr>
<tr>
<td><p><span class="term">const <a class="link" href="telepathy-glib-TpPresenceMixin.html#TpPresenceStatusSpec"><span class="type">TpPresenceStatusSpec</span></a> *<em class="structfield"><code><a name="TpPresenceMixinClass.statuses"></a>statuses</code></em>;</span></p></td>
<td>The presence statuses array that was passed to
<a class="link" href="telepathy-glib-TpPresenceMixin.html#tp-presence-mixin-class-init" title="tp_presence_mixin_class_init ()"><code class="function">tp_presence_mixin_class_init()</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="telepathy-glib-TpPresenceMixin.html#TpPresenceMixinGetMaximumStatusMessageLengthFunc" title="TpPresenceMixinGetMaximumStatusMessageLengthFunc ()"><span class="type">TpPresenceMixinGetMaximumStatusMessageLengthFunc</span></a> <em class="structfield"><code><a name="TpPresenceMixinClass.get-maximum-status-message-length"></a>get_maximum_status_message_length</code></em>;</span></p></td>
<td>The callback used to discover the
the limit for status messages length, if any. Since: 0.14.5</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="tp-presence-mixin-class-init"></a><h3>tp_presence_mixin_class_init ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> tp_presence_mixin_class_init (<em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObjectClass"><span class="type">GObjectClass</span></a> *obj_cls</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#glong"><span class="type">glong</span></a> offset</code></em>,
<em class="parameter"><code><a class="link" href="telepathy-glib-TpPresenceMixin.html#TpPresenceMixinStatusAvailableFunc" title="TpPresenceMixinStatusAvailableFunc ()"><span class="type">TpPresenceMixinStatusAvailableFunc</span></a> status_available</code></em>,
<em class="parameter"><code><a class="link" href="telepathy-glib-TpPresenceMixin.html#TpPresenceMixinGetContactStatusesFunc" title="TpPresenceMixinGetContactStatusesFunc ()"><span class="type">TpPresenceMixinGetContactStatusesFunc</span></a> get_contact_statuses</code></em>,
<em class="parameter"><code><a class="link" href="telepathy-glib-TpPresenceMixin.html#TpPresenceMixinSetOwnStatusFunc" title="TpPresenceMixinSetOwnStatusFunc ()"><span class="type">TpPresenceMixinSetOwnStatusFunc</span></a> set_own_status</code></em>,
<em class="parameter"><code>const <a class="link" href="telepathy-glib-TpPresenceMixin.html#TpPresenceStatusSpec"><span class="type">TpPresenceStatusSpec</span></a> *statuses</code></em>);</pre>
<p>
Initialize the presence mixin. Should be called from the implementation's
class_init function like so:
</p>
<p>
</p>
<div class="informalexample">
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="listing_lines" align="right"><pre>1
2
3</pre></td>
<td class="listing_code"><pre class="programlisting"><span class="function"><a href="telepathy-glib-TpPresenceMixin.html#tp-presence-mixin-class-init">tp_presence_mixin_class_init</a></span><span class="normal"> </span><span class="symbol">((</span><span class="normal"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObjectClass">GObjectClass</a> </span><span class="symbol">*)</span><span class="normal"> klass</span><span class="symbol">,</span>
<span class="normal"> </span><span class="function"><a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#G-STRUCT-OFFSET:CAPS">G_STRUCT_OFFSET</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">SomeObjectClass</span><span class="symbol">,</span>
<span class="normal"> presence_mixin</span><span class="symbol">));</span></pre></td>
</tr>
</tbody>
</table>
</div>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>obj_cls</code></em> :</span></p></td>
<td>The class of the implementation that uses this mixin</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>offset</code></em> :</span></p></td>
<td>The byte offset of the TpPresenceMixinClass within the class
structure</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>status_available</code></em> :</span></p></td>
<td>A callback to be used to determine if a given presence
status can be set on a particular connection. Should usually be <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, to
consider all statuses with <span class="type">TpPresenceStatusSpec.self</span> set to <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> to be
settable.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>get_contact_statuses</code></em> :</span></p></td>
<td>A callback to be used get the current presence status
for contacts. This is used in implementations of various D-Bus methods and
hence must be provided.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>set_own_status</code></em> :</span></p></td>
<td>A callback to be used to commit changes to the user's own
presence status to the server. This is used in implementations of various
D-Bus methods and hence must be provided.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>statuses</code></em> :</span></p></td>
<td>An array of <a class="link" href="telepathy-glib-TpPresenceMixin.html#TpPresenceStatusSpec"><span class="type">TpPresenceStatusSpec</span></a> structures representing all
presence statuses supported by the protocol, terminated by a NULL name.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="tp-presence-mixin-init"></a><h3>tp_presence_mixin_init ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> tp_presence_mixin_init (<em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *obj</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#glong"><span class="type">glong</span></a> offset</code></em>);</pre>
<p>
Initialize the presence mixin. Should be called from the implementation's
instance init function like so:
</p>
<p>
</p>
<div class="informalexample">
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="listing_lines" align="right"><pre>1
2</pre></td>
<td class="listing_code"><pre class="programlisting"><span class="function"><a href="telepathy-glib-TpPresenceMixin.html#tp-presence-mixin-init">tp_presence_mixin_init</a></span><span class="normal"> </span><span class="symbol">((</span><span class="normal"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a> </span><span class="symbol">*)</span><span class="normal"> self</span><span class="symbol">,</span>
<span class="normal"> </span><span class="function"><a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#G-STRUCT-OFFSET:CAPS">G_STRUCT_OFFSET</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">SomeObject</span><span class="symbol">,</span><span class="normal"> presence_mixin</span><span class="symbol">));</span></pre></td>
</tr>
</tbody>
</table>
</div>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>obj</code></em> :</span></p></td>
<td>An instance of the implementation that uses this mixin</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>offset</code></em> :</span></p></td>
<td>The byte offset of the TpPresenceMixin within the object structure</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="tp-presence-mixin-finalize"></a><h3>tp_presence_mixin_finalize ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> tp_presence_mixin_finalize (<em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *obj</code></em>);</pre>
<p>
Free resources held by the presence mixin.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>obj</code></em> :</span></p></td>
<td>An object with this mixin.</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="tp-presence-mixin-emit-presence-update"></a><h3>tp_presence_mixin_emit_presence_update ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> tp_presence_mixin_emit_presence_update
(<em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *obj</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> *contact_presences</code></em>);</pre>
<p>
Emit the PresenceUpdate signal for multiple contacts. For emitting
PresenceUpdate for a single contact, there is a convenience wrapper called
<a class="link" href="telepathy-glib-TpPresenceMixin.html#tp-presence-mixin-emit-one-presence-update" title="tp_presence_mixin_emit_one_presence_update ()"><span class="type">tp_presence_mixin_emit_one_presence_update</span></a>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>obj</code></em> :</span></p></td>
<td>A connection object with this mixin</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>contact_presences</code></em> :</span></p></td>
<td>A mapping of contact handles to <a class="link" href="telepathy-glib-TpPresenceMixin.html#TpPresenceStatus" title="struct TpPresenceStatus"><span class="type">TpPresenceStatus</span></a>
structures with the presence data to emit</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="tp-presence-mixin-emit-one-presence-update"></a><h3>tp_presence_mixin_emit_one_presence_update ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> tp_presence_mixin_emit_one_presence_update
(<em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *obj</code></em>,
<em class="parameter"><code><a class="link" href="telepathy-glib-handle.html#TpHandle" title="TpHandle"><span class="type">TpHandle</span></a> handle</code></em>,
<em class="parameter"><code>const <a class="link" href="telepathy-glib-TpPresenceMixin.html#TpPresenceStatus" title="struct TpPresenceStatus"><span class="type">TpPresenceStatus</span></a> *status</code></em>);</pre>
<p>
Emit the PresenceUpdate signal for a single contact. This method is just a
convenience wrapper around <a class="link" href="telepathy-glib-TpPresenceMixin.html#tp-presence-mixin-emit-presence-update" title="tp_presence_mixin_emit_presence_update ()"><span class="type">tp_presence_mixin_emit_presence_update</span></a>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>obj</code></em> :</span></p></td>
<td>A connection object with this mixin</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>handle</code></em> :</span></p></td>
<td>The handle of the contact to emit the signal for</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>status</code></em> :</span></p></td>
<td>The new status to emit</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="tp-presence-mixin-iface-init"></a><h3>tp_presence_mixin_iface_init ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> tp_presence_mixin_iface_init (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> g_iface</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> iface_data</code></em>);</pre>
<p>
Fill in the vtable entries needed to implement the presence interface using
this mixin. This function should usually be called via G_IMPLEMENT_INTERFACE.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>g_iface</code></em> :</span></p></td>
<td>A pointer to the <a class="link" href="telepathy-glib-svc-connection.html#TpSvcConnectionInterfacePresenceClass" title="TpSvcConnectionInterfacePresenceClass"><span class="type">TpSvcConnectionInterfacePresenceClass</span></a> in an
object class</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>iface_data</code></em> :</span></p></td>
<td>Ignored</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="tp-presence-mixin-simple-presence-iface-init"></a><h3>tp_presence_mixin_simple_presence_iface_init ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> tp_presence_mixin_simple_presence_iface_init
(<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> g_iface</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> iface_data</code></em>);</pre>
<p>
Fill in the vtable entries needed to implement the simple presence interface
using this mixin. This function should usually be called via
G_IMPLEMENT_INTERFACE.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>g_iface</code></em> :</span></p></td>
<td>A pointer to the <a class="link" href="telepathy-glib-svc-connection.html#TpSvcConnectionInterfaceSimplePresenceClass" title="TpSvcConnectionInterfaceSimplePresenceClass"><span class="type">TpSvcConnectionInterfaceSimplePresenceClass</span></a> in
an object class</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>iface_data</code></em> :</span></p></td>
<td>Ignored</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 0.7.13</p>
</div>
<hr>
<div class="refsect2">
<a name="tp-presence-mixin-simple-presence-init-dbus-properties"></a><h3>tp_presence_mixin_simple_presence_init_dbus_properties ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> tp_presence_mixin_simple_presence_init_dbus_properties
(<em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObjectClass"><span class="type">GObjectClass</span></a> *cls</code></em>);</pre>
<p>
Set up <a class="link" href="telepathy-glib-dbus-properties-mixin.html#TpDBusPropertiesMixinClass" title="TpDBusPropertiesMixinClass"><span class="type">TpDBusPropertiesMixinClass</span></a> to use this mixin's implementation of
the SimplePresence interface's properties.
</p>
<p>
This automatically sets up a list of the supported properties for the
SimplePresence interface.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>cls</code></em> :</span></p></td>
<td>The class of an object with this mixin</td>
</tr></tbody>
</table></div>
<p class="since">Since 0.7.13</p>
</div>
<hr>
<div class="refsect2">
<a name="tp-presence-mixin-simple-presence-register-with-contacts-mixin"></a><h3>tp_presence_mixin_simple_presence_register_with_contacts_mixin ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> tp_presence_mixin_simple_presence_register_with_contacts_mixin
(<em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *obj</code></em>);</pre>
<p>
Register the SimplePresence interface with the Contacts interface to make it
inspectable. The Contacts mixin should be initialized before this function
is called
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>obj</code></em> :</span></p></td>
<td>An instance that of the implementation that uses both the Contacts
mixin and this mixin</td>
</tr></tbody>
</table></div>
</div>
</div>
<div class="refsect1">
<a name="telepathy-glib-TpPresenceMixin.see-also"></a><h2>See Also</h2>
<a class="link" href="telepathy-glib-svc-connection.html#TpSvcConnectionInterfacePresence"><span class="type">TpSvcConnectionInterfacePresence</span></a>
</div>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.19</div>
</body>
</html>
|