1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546
|
<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module jabber</title>
</head><body bgcolor="#f0f0f8">
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>jabber</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/kalfa/debian/mypackages/jabber.py/jabber.py-0.5.0/jabber/jabber.py">/home/kalfa/debian/mypackages/jabber.py/jabber.py-0.5.0/jabber/jabber.py</a></font></td></tr></table>
<p><tt>__intro__<br>
<br>
jabber.py is a Python module for the jabber instant messaging protocol.<br>
jabber.py deals with the xml parsing and socket code, leaving the programmer<br>
to concentrate on developing quality jabber based applications with Python.<br>
<br>
The eventual aim is to produce a fully featured easy to use library for<br>
creating both jabber clients and servers.<br>
<br>
jabber.py requires at least python 2.0 and the XML expat parser module<br>
( included in the standard Python distrubution ).<br>
<br>
It is developed on Linux but should run happily on over Unix's and win32.<br>
<br>
__Usage__<br>
<br>
jabber.py basically subclasses the xmlstream classs and provides the<br>
processing of jabber protocol elements into object instances as well<br>
'helper' functions for parts of the protocol such as authentication<br>
and roster management.<br>
<br>
An example of usage for a simple client would be ( only psuedo code !)<br>
<br>
<> Read documentation on jabber.org for the jabber protocol.<br>
<br>
<> Birth a jabber.<a href="#Client">Client</a> object with your jabber servers host<br>
<br>
<> Define callback functions for the protocol elements you want to use<br>
and optionally a disconnection.<br>
<br>
<> Authenticate with the server via auth method, or register via the<br>
reg methods to get an account.<br>
<br>
<> Call requestRoster() and sendPresence()<br>
<br>
<> loop over process(). Send Iqs,messages and presences by birthing<br>
them via there respective clients , manipulating them and using<br>
the <a href="#Client">Client</a>'s send() method.<br>
<br>
<> Respond to incoming elements passed to your callback functions.<br>
<br>
<> Find bugs :)</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom> <br>
<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="debug.html">debug</a><br>
</td><td width="25%" valign=top><a href="sha.html">sha</a><br>
</td><td width="25%" valign=top><a href="time.html">time</a><br>
</td><td width="25%" valign=top><a href="xmlstream.html">xmlstream</a><br>
</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="xmlstream.html#Client">xmlstream.Client</a>(<a href="xmlstream.html#Stream">xmlstream.Stream</a>)
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="jabber.html#Connection">Connection</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="jabber.html#Client">Client</a>
</font></dt><dt><font face="helvetica, arial"><a href="jabber.html#Component">Component</a>
</font></dt></dl>
</dd>
</dl>
</dd>
<dt><font face="helvetica, arial"><a href="exceptions.html#Exception">exceptions.Exception</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="jabber.html#NodeProcessed">NodeProcessed</a>
</font></dt></dl>
</dd>
<dt><font face="helvetica, arial"><a href="jabber.html#JID">JID</a>
</font></dt><dt><font face="helvetica, arial"><a href="xmlstream.html#Node">xmlstream.Node</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="jabber.html#Protocol">Protocol</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="jabber.html#Iq">Iq</a>
</font></dt><dt><font face="helvetica, arial"><a href="jabber.html#Log">Log</a>
</font></dt><dt><font face="helvetica, arial"><a href="jabber.html#Message">Message</a>
</font></dt><dt><font face="helvetica, arial"><a href="jabber.html#Presence">Presence</a>
</font></dt><dt><font face="helvetica, arial"><a href="jabber.html#XDB">XDB</a>
</font></dt></dl>
</dd>
</dl>
</dd>
<dt><font face="helvetica, arial"><a href="jabber.html#Roster">Roster</a>
</font></dt><dt><font face="helvetica, arial"><a href="jabber.html#Server">Server</a>
</font></dt></dl>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="Client">class <strong>Client</strong></a>(<a href="jabber.html#Connection">Connection</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>Class for managing a client connection to a jabber server.<br> </tt></td></tr>
<tr><td> </td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="jabber.html#Client">Client</a></dd>
<dd><a href="jabber.html#Connection">Connection</a></dd>
<dd><a href="xmlstream.html#Client">xmlstream.Client</a></dd>
<dd><a href="xmlstream.html#Stream">xmlstream.Stream</a></dd>
<dd><a href="xmlstream.html#NodeBuilder">xmlstream.NodeBuilder</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="Client-__init__"><strong>__init__</strong></a>(self, host, port<font color="#909090">=5222</font>, debug<font color="#909090">=[]</font>, log<font color="#909090">=0</font>, connection<font color="#909090">=1</font>, hostIP<font color="#909090">=None</font>, proxy<font color="#909090">=None</font>)</dt></dl>
<dl><dt><a name="Client-addRosterItem"><strong>addRosterItem</strong></a>(self, jid)</dt><dd><tt>Send off a request to subscribe to the given jid.</tt></dd></dl>
<dl><dt><a name="Client-auth"><strong>auth</strong></a>(self, username, passwd, resource)</dt><dd><tt>Authenticates and logs in to the specified jabber server<br>
Automatically selects the 'best' authentication method<br>
provided by the server.<br>
Supports plain text, digest and zero-k authentication.<br>
<br>
Returns True if the login was successful, False otherwise.</tt></dd></dl>
<dl><dt><a name="Client-deregister"><strong>deregister</strong></a>(self, agent<font color="#909090">=None</font>)</dt><dd><tt>Send off a request to deregister with the server or with the given<br>
agent. Returns True if successful, else False.<br>
<br>
Note that you must be authorised before attempting to deregister.</tt></dd></dl>
<dl><dt><a name="Client-disconnect"><strong>disconnect</strong></a>(self)</dt><dd><tt>Safely disconnects from the connected server</tt></dd></dl>
<dl><dt><a name="Client-discoverInfo"><strong>discoverInfo</strong></a>(self, jid, node<font color="#909090">=None</font>)</dt><dd><tt>According to JEP-0030:<br>
For identity: category, name is mandatory, type is optional.<br>
For feature: var is mandatory</tt></dd></dl>
<dl><dt><a name="Client-discoverItems"><strong>discoverItems</strong></a>(self, jid, node<font color="#909090">=None</font>)</dt><dd><tt>According to JEP-0030: jid is mandatory, name, node, action is optional.</tt></dd></dl>
<dl><dt><a name="Client-getRegInfo"><strong>getRegInfo</strong></a>(self)</dt><dd><tt>Returns a dictionary of fields requested by the server for a<br>
registration attempt. Each dictionary entry maps from the name of<br>
the field to the field's current value (either as returned by the<br>
server or set programmatically by calling <a href="#Client-setRegInfo">setRegInfo</a>().</tt></dd></dl>
<dl><dt><a name="Client-getRoster"><strong>getRoster</strong></a>(self)</dt><dd><tt>Returns the current <a href="#Roster">Roster</a>() class instance. Does<br>
not contact the server.</tt></dd></dl>
<dl><dt><a name="Client-removeRosterItem"><strong>removeRosterItem</strong></a>(self, jid)</dt><dd><tt>Removes an item with Jabber ID jid from both the<br>
server's roster and the local internal <a href="#Roster">Roster</a>()<br>
instance</tt></dd></dl>
<dl><dt><a name="Client-requestAgents"><strong>requestAgents</strong></a>(self)</dt><dd><tt>Requests a list of available agents. Returns a dictionary<br>
containing information about each agent; each entry in the<br>
dictionary maps the agent's <a href="#JID">JID</a> to a dictionary of attributes<br>
describing what that agent can do (as returned by the<br>
NS_AGENTS query).</tt></dd></dl>
<dl><dt><a name="Client-requestRegInfo"><strong>requestRegInfo</strong></a>(self, agent<font color="#909090">=''</font>)</dt><dd><tt>Requests registration info from the server.<br>
Returns the <a href="#Iq">Iq</a> object received from the server.</tt></dd></dl>
<dl><dt><a name="Client-requestRoster"><strong>requestRoster</strong></a>(self)</dt><dd><tt>Requests the roster from the server and returns a<br>
<a href="#Roster">Roster</a>() class instance.</tt></dd></dl>
<dl><dt><a name="Client-sendInitPresence"><strong>sendInitPresence</strong></a> = <a href="#Client-sendPresence">sendPresence</a>(self, type<font color="#909090">=None</font>, priority<font color="#909090">=None</font>, show<font color="#909090">=None</font>, status<font color="#909090">=None</font>)</dt></dl>
<dl><dt><a name="Client-sendPresence"><strong>sendPresence</strong></a>(self, type<font color="#909090">=None</font>, priority<font color="#909090">=None</font>, show<font color="#909090">=None</font>, status<font color="#909090">=None</font>)</dt><dd><tt>Sends a presence protocol element to the server.<br>
Used to inform the server that you are online</tt></dd></dl>
<dl><dt><a name="Client-sendRegInfo"><strong>sendRegInfo</strong></a>(self, agent<font color="#909090">=None</font>)</dt><dd><tt>Sends the populated registration dictionary back to the server</tt></dd></dl>
<dl><dt><a name="Client-setRegInfo"><strong>setRegInfo</strong></a>(self, key, val)</dt><dd><tt>Sets a name/value attribute. Note: requestRegInfo must be<br>
called before setting.</tt></dd></dl>
<dl><dt><a name="Client-updateRosterItem"><strong>updateRosterItem</strong></a>(self, jid, name<font color="#909090">=None</font>, groups<font color="#909090">=None</font>)</dt><dd><tt>Update the information stored in the roster about a roster item.<br>
<br>
'jid' is the Jabber ID of the roster entry; 'name' is the value to<br>
set the entry's name to, and 'groups' is a list of groups to which<br>
this roster entry can belong. If either 'name' or 'groups' is not<br>
specified, that value is not updated in the roster.</tt></dd></dl>
<hr>
Methods inherited from <a href="jabber.html#Connection">Connection</a>:<br>
<dl><dt><a name="Client-SendAndWaitForResponse"><strong>SendAndWaitForResponse</strong></a>(self, obj, ID<font color="#909090">=None</font>, timeout<font color="#909090">=300</font>)</dt><dd><tt>Sends a protocol element object and blocks until a response with<br>
the same ID is received. The received protocol object is returned<br>
as the function result.</tt></dd></dl>
<dl><dt><a name="Client-dispatch"><strong>dispatch</strong></a>(self, stanza)</dt><dd><tt>Called internally when a 'protocol element' is received.<br>
Builds the relevant jabber.py object and dispatches it<br>
to a relevant function or callback.</tt></dd></dl>
<dl><dt><a name="Client-getAnID"><strong>getAnID</strong></a>(self)</dt><dd><tt>Returns a unique ID</tt></dd></dl>
<dl><dt><a name="Client-header"><strong>header</strong></a>(self)</dt></dl>
<dl><dt><a name="Client-registerHandler"><strong>registerHandler</strong></a>(self, name, handler, type<font color="#909090">=''</font>, ns<font color="#909090">=''</font>, chained<font color="#909090">=0</font>, makefirst<font color="#909090">=0</font>, system<font color="#909090">=0</font>)</dt><dd><tt>Sets the callback func for processing incoming stanzas.<br>
Multiple callback functions can be set which are called in<br>
succession. Callback can optionally raise an <a href="#NodeProcessed">NodeProcessed</a> error to<br>
stop stanza from further processing. A type and namespace attributes can<br>
also be optionally passed so the callback is only called when a stanza of<br>
this type is received. Namespace attribute MUST be omitted if you<br>
registering an <a href="#Iq">Iq</a> processing handler.<br>
<br>
If 'chainOutput' is set to False (the default), the given function<br>
should be defined as follows:<br>
<br>
def myCallback(c, p)<br>
<br>
Where the first parameter is the <a href="#Client">Client</a> object, and the second<br>
parameter is the [ancestor of] <a href="#Protocol">Protocol</a> object representing the stanza<br>
which was received.<br>
<br>
If 'chainOutput' is set to True, the output from the various<br>
handler functions will be chained together. In this case,<br>
the given callback function should be defined like this:<br>
<br>
def myCallback(c, p, output)<br>
<br>
Where 'output' is the value returned by the previous<br>
callback function. For the first callback routine, 'output' will be<br>
set to an empty string.<br>
<br>
'makefirst' argument gives you control over handler prioriy in its type<br>
and namespace scope. Note that handlers for particular type or namespace always<br>
have lower priority that common handlers.</tt></dd></dl>
<dl><dt><a name="Client-registerProtocol"><strong>registerProtocol</strong></a>(self, tag_name, Proto)</dt><dd><tt>Registers a protocol in protocol processing chain. You MUST register<br>
a protocol before you register any handler function for it.<br>
First parameter, that passed to this function is the tag name that<br>
belongs to all protocol elements. F.e.: message, presence, iq, xdb, ...<br>
Second parameter is the [ancestor of] <a href="#Protocol">Protocol</a> class, which instance will<br>
built from the received node with call<br>
<br>
if received_packet.getName()==tag_name:<br>
stanza = Proto(node = received_packet)</tt></dd></dl>
<dl><dt><a name="Client-send"><strong>send</strong></a>(self, what)</dt><dd><tt>Sends a jabber protocol element (<a href="xmlstream.html#Node">Node</a>) to the server</tt></dd></dl>
<dl><dt><a name="Client-setDisconnectHandler"><strong>setDisconnectHandler</strong></a>(self, func)</dt><dd><tt>Set the callback for a disconnect.<br>
The given function will be called with a single parameter (the<br>
connection object) when the connection is broken unexpectedly (eg,<br>
in response to sending badly formed XML). self.<strong>lastErr</strong> and<br>
self.<strong>lastErrCode</strong> will be set to the error which caused the<br>
disconnection, if any.</tt></dd></dl>
<dl><dt><a name="Client-setIqHandler"><strong>setIqHandler</strong></a>(self, func, type<font color="#909090">=''</font>, ns<font color="#909090">=''</font>)</dt><dd><tt>Back compartibility method</tt></dd></dl>
<dl><dt><a name="Client-setMessageHandler"><strong>setMessageHandler</strong></a>(self, func, type<font color="#909090">=''</font>, chainOutput<font color="#909090">=0</font>)</dt><dd><tt>Back compartibility method</tt></dd></dl>
<dl><dt><a name="Client-setPresenceHandler"><strong>setPresenceHandler</strong></a>(self, func, type<font color="#909090">=''</font>, chainOutput<font color="#909090">=0</font>)</dt><dd><tt>Back compartibility method</tt></dd></dl>
<dl><dt><a name="Client-waitForResponse"><strong>waitForResponse</strong></a>(self, ID, timeout<font color="#909090">=300</font>)</dt><dd><tt>Blocks untils a protocol element with the given id is received.<br>
If an error is received, waitForResponse returns None and<br>
self.<strong>lastErr</strong> and self.<strong>lastErrCode</strong> is set to the received error. If<br>
the operation times out (which only happens if a timeout value is<br>
given), waitForResponse will return None and self.<strong>lastErr</strong> will be<br>
set to "Timeout".<br>
Changed default from timeout=0 to timeout=300 to avoid hangs in<br>
scripts and such.<br>
If you _really_ want no timeout, just set it to 0</tt></dd></dl>
<hr>
Methods inherited from <a href="xmlstream.html#Client">xmlstream.Client</a>:<br>
<dl><dt><a name="Client-connect"><strong>connect</strong></a>(self)</dt><dd><tt>Attempt to connect to specified host</tt></dd></dl>
<dl><dt><a name="Client-getSocket"><strong>getSocket</strong></a>(self)</dt></dl>
<hr>
Methods inherited from <a href="xmlstream.html#Stream">xmlstream.Stream</a>:<br>
<dl><dt><a name="Client-disconnectHandler"><strong>disconnectHandler</strong></a>(self, conn)</dt><dd><tt>Called when a Network Error or disconnection occurs.<br>
Designed to be overidden</tt></dd></dl>
<dl><dt><a name="Client-disconnected"><strong>disconnected</strong></a>(self, conn)</dt><dd><tt>Called when a Network Error or disconnection occurs.</tt></dd></dl>
<dl><dt><a name="Client-getIncomingID"><strong>getIncomingID</strong></a>(self)</dt><dd><tt>Returns the streams ID</tt></dd></dl>
<dl><dt><a name="Client-getOutgoingID"><strong>getOutgoingID</strong></a>(self)</dt><dd><tt>Returns the streams ID</tt></dd></dl>
<dl><dt><a name="Client-log"><strong>log</strong></a>(self, data, inout<font color="#909090">=''</font>)</dt><dd><tt>Logs data to the specified filehandle. Data is time stamped<br>
and prefixed with inout</tt></dd></dl>
<dl><dt><a name="Client-process"><strong>process</strong></a>(self, timeout<font color="#909090">=0</font>)</dt><dd><tt>Receives incoming data (if any) and processes it.<br>
Waits for data no more than timeout seconds.</tt></dd></dl>
<dl><dt><a name="Client-read"><strong>read</strong></a>(self)</dt><dd><tt>Reads incoming data. Blocks until done. Calls <a href="#Client-disconnected">disconnected</a>(self) if appropriate.</tt></dd></dl>
<dl><dt><a name="Client-timestampLog"><strong>timestampLog</strong></a>(self, timestamp)</dt><dd><tt>Enable or disable the showing of a timestamp in the log.<br>
By default, timestamping is enabled.</tt></dd></dl>
<dl><dt><a name="Client-write"><strong>write</strong></a>(self, raw_data)</dt><dd><tt>Writes raw outgoing data. Blocks until done.<br>
If supplied data is not unicode string, ENCODING<br>
is used for convertion. Avoid this!<br>
Always send your data as a unicode string.</tt></dd></dl>
<hr>
Methods inherited from <a href="xmlstream.html#NodeBuilder">xmlstream.NodeBuilder</a>:<br>
<dl><dt><a name="Client-DEBUG"><strong>DEBUG</strong></a>(self, dup1, dup2<font color="#909090">=None</font>)</dt></dl>
<dl><dt><a name="Client-getDom"><strong>getDom</strong></a>(self)</dt></dl>
<dl><dt><a name="Client-handle_data"><strong>handle_data</strong></a>(self, data)</dt><dd><tt>XML Parser callback</tt></dd></dl>
<dl><dt><a name="Client-unknown_endtag"><strong>unknown_endtag</strong></a>(self, tag)</dt><dd><tt>XML Parser callback</tt></dd></dl>
<dl><dt><a name="Client-unknown_starttag"><strong>unknown_starttag</strong></a>(self, tag, attrs)</dt><dd><tt>XML Parser callback</tt></dd></dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="Component">class <strong>Component</strong></a>(<a href="jabber.html#Connection">Connection</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>docs to come soon...<br> </tt></td></tr>
<tr><td> </td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="jabber.html#Component">Component</a></dd>
<dd><a href="jabber.html#Connection">Connection</a></dd>
<dd><a href="xmlstream.html#Client">xmlstream.Client</a></dd>
<dd><a href="xmlstream.html#Stream">xmlstream.Stream</a></dd>
<dd><a href="xmlstream.html#NodeBuilder">xmlstream.NodeBuilder</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="Component-__init__"><strong>__init__</strong></a>(self, host, port, connection<font color="#909090">=1</font>, debug<font color="#909090">=[]</font>, log<font color="#909090">=0</font>, ns<font color="#909090">='jabber:component:accept'</font>, hostIP<font color="#909090">=None</font>, proxy<font color="#909090">=None</font>)</dt></dl>
<dl><dt><a name="Component-auth"><strong>auth</strong></a>(self, secret)</dt><dd><tt>will disconnect on failure</tt></dd></dl>
<dl><dt><a name="Component-dispatch"><strong>dispatch</strong></a>(self, root_node)</dt><dd><tt>Catch the <handshake/> here</tt></dd></dl>
<hr>
Methods inherited from <a href="jabber.html#Connection">Connection</a>:<br>
<dl><dt><a name="Component-SendAndWaitForResponse"><strong>SendAndWaitForResponse</strong></a>(self, obj, ID<font color="#909090">=None</font>, timeout<font color="#909090">=300</font>)</dt><dd><tt>Sends a protocol element object and blocks until a response with<br>
the same ID is received. The received protocol object is returned<br>
as the function result.</tt></dd></dl>
<dl><dt><a name="Component-getAnID"><strong>getAnID</strong></a>(self)</dt><dd><tt>Returns a unique ID</tt></dd></dl>
<dl><dt><a name="Component-header"><strong>header</strong></a>(self)</dt></dl>
<dl><dt><a name="Component-registerHandler"><strong>registerHandler</strong></a>(self, name, handler, type<font color="#909090">=''</font>, ns<font color="#909090">=''</font>, chained<font color="#909090">=0</font>, makefirst<font color="#909090">=0</font>, system<font color="#909090">=0</font>)</dt><dd><tt>Sets the callback func for processing incoming stanzas.<br>
Multiple callback functions can be set which are called in<br>
succession. Callback can optionally raise an <a href="#NodeProcessed">NodeProcessed</a> error to<br>
stop stanza from further processing. A type and namespace attributes can<br>
also be optionally passed so the callback is only called when a stanza of<br>
this type is received. Namespace attribute MUST be omitted if you<br>
registering an <a href="#Iq">Iq</a> processing handler.<br>
<br>
If 'chainOutput' is set to False (the default), the given function<br>
should be defined as follows:<br>
<br>
def myCallback(c, p)<br>
<br>
Where the first parameter is the <a href="#Client">Client</a> object, and the second<br>
parameter is the [ancestor of] <a href="#Protocol">Protocol</a> object representing the stanza<br>
which was received.<br>
<br>
If 'chainOutput' is set to True, the output from the various<br>
handler functions will be chained together. In this case,<br>
the given callback function should be defined like this:<br>
<br>
def myCallback(c, p, output)<br>
<br>
Where 'output' is the value returned by the previous<br>
callback function. For the first callback routine, 'output' will be<br>
set to an empty string.<br>
<br>
'makefirst' argument gives you control over handler prioriy in its type<br>
and namespace scope. Note that handlers for particular type or namespace always<br>
have lower priority that common handlers.</tt></dd></dl>
<dl><dt><a name="Component-registerProtocol"><strong>registerProtocol</strong></a>(self, tag_name, Proto)</dt><dd><tt>Registers a protocol in protocol processing chain. You MUST register<br>
a protocol before you register any handler function for it.<br>
First parameter, that passed to this function is the tag name that<br>
belongs to all protocol elements. F.e.: message, presence, iq, xdb, ...<br>
Second parameter is the [ancestor of] <a href="#Protocol">Protocol</a> class, which instance will<br>
built from the received node with call<br>
<br>
if received_packet.getName()==tag_name:<br>
stanza = Proto(node = received_packet)</tt></dd></dl>
<dl><dt><a name="Component-send"><strong>send</strong></a>(self, what)</dt><dd><tt>Sends a jabber protocol element (<a href="xmlstream.html#Node">Node</a>) to the server</tt></dd></dl>
<dl><dt><a name="Component-setDisconnectHandler"><strong>setDisconnectHandler</strong></a>(self, func)</dt><dd><tt>Set the callback for a disconnect.<br>
The given function will be called with a single parameter (the<br>
connection object) when the connection is broken unexpectedly (eg,<br>
in response to sending badly formed XML). self.<strong>lastErr</strong> and<br>
self.<strong>lastErrCode</strong> will be set to the error which caused the<br>
disconnection, if any.</tt></dd></dl>
<dl><dt><a name="Component-setIqHandler"><strong>setIqHandler</strong></a>(self, func, type<font color="#909090">=''</font>, ns<font color="#909090">=''</font>)</dt><dd><tt>Back compartibility method</tt></dd></dl>
<dl><dt><a name="Component-setMessageHandler"><strong>setMessageHandler</strong></a>(self, func, type<font color="#909090">=''</font>, chainOutput<font color="#909090">=0</font>)</dt><dd><tt>Back compartibility method</tt></dd></dl>
<dl><dt><a name="Component-setPresenceHandler"><strong>setPresenceHandler</strong></a>(self, func, type<font color="#909090">=''</font>, chainOutput<font color="#909090">=0</font>)</dt><dd><tt>Back compartibility method</tt></dd></dl>
<dl><dt><a name="Component-waitForResponse"><strong>waitForResponse</strong></a>(self, ID, timeout<font color="#909090">=300</font>)</dt><dd><tt>Blocks untils a protocol element with the given id is received.<br>
If an error is received, waitForResponse returns None and<br>
self.<strong>lastErr</strong> and self.<strong>lastErrCode</strong> is set to the received error. If<br>
the operation times out (which only happens if a timeout value is<br>
given), waitForResponse will return None and self.<strong>lastErr</strong> will be<br>
set to "Timeout".<br>
Changed default from timeout=0 to timeout=300 to avoid hangs in<br>
scripts and such.<br>
If you _really_ want no timeout, just set it to 0</tt></dd></dl>
<hr>
Methods inherited from <a href="xmlstream.html#Client">xmlstream.Client</a>:<br>
<dl><dt><a name="Component-connect"><strong>connect</strong></a>(self)</dt><dd><tt>Attempt to connect to specified host</tt></dd></dl>
<dl><dt><a name="Component-getSocket"><strong>getSocket</strong></a>(self)</dt></dl>
<hr>
Methods inherited from <a href="xmlstream.html#Stream">xmlstream.Stream</a>:<br>
<dl><dt><a name="Component-disconnect"><strong>disconnect</strong></a>(self)</dt><dd><tt>Close the stream and socket</tt></dd></dl>
<dl><dt><a name="Component-disconnectHandler"><strong>disconnectHandler</strong></a>(self, conn)</dt><dd><tt>Called when a Network Error or disconnection occurs.<br>
Designed to be overidden</tt></dd></dl>
<dl><dt><a name="Component-disconnected"><strong>disconnected</strong></a>(self, conn)</dt><dd><tt>Called when a Network Error or disconnection occurs.</tt></dd></dl>
<dl><dt><a name="Component-getIncomingID"><strong>getIncomingID</strong></a>(self)</dt><dd><tt>Returns the streams ID</tt></dd></dl>
<dl><dt><a name="Component-getOutgoingID"><strong>getOutgoingID</strong></a>(self)</dt><dd><tt>Returns the streams ID</tt></dd></dl>
<dl><dt><a name="Component-log"><strong>log</strong></a>(self, data, inout<font color="#909090">=''</font>)</dt><dd><tt>Logs data to the specified filehandle. Data is time stamped<br>
and prefixed with inout</tt></dd></dl>
<dl><dt><a name="Component-process"><strong>process</strong></a>(self, timeout<font color="#909090">=0</font>)</dt><dd><tt>Receives incoming data (if any) and processes it.<br>
Waits for data no more than timeout seconds.</tt></dd></dl>
<dl><dt><a name="Component-read"><strong>read</strong></a>(self)</dt><dd><tt>Reads incoming data. Blocks until done. Calls <a href="#Component-disconnected">disconnected</a>(self) if appropriate.</tt></dd></dl>
<dl><dt><a name="Component-timestampLog"><strong>timestampLog</strong></a>(self, timestamp)</dt><dd><tt>Enable or disable the showing of a timestamp in the log.<br>
By default, timestamping is enabled.</tt></dd></dl>
<dl><dt><a name="Component-write"><strong>write</strong></a>(self, raw_data)</dt><dd><tt>Writes raw outgoing data. Blocks until done.<br>
If supplied data is not unicode string, ENCODING<br>
is used for convertion. Avoid this!<br>
Always send your data as a unicode string.</tt></dd></dl>
<hr>
Methods inherited from <a href="xmlstream.html#NodeBuilder">xmlstream.NodeBuilder</a>:<br>
<dl><dt><a name="Component-DEBUG"><strong>DEBUG</strong></a>(self, dup1, dup2<font color="#909090">=None</font>)</dt></dl>
<dl><dt><a name="Component-getDom"><strong>getDom</strong></a>(self)</dt></dl>
<dl><dt><a name="Component-handle_data"><strong>handle_data</strong></a>(self, data)</dt><dd><tt>XML Parser callback</tt></dd></dl>
<dl><dt><a name="Component-unknown_endtag"><strong>unknown_endtag</strong></a>(self, tag)</dt><dd><tt>XML Parser callback</tt></dd></dl>
<dl><dt><a name="Component-unknown_starttag"><strong>unknown_starttag</strong></a>(self, tag, attrs)</dt><dd><tt>XML Parser callback</tt></dd></dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="Connection">class <strong>Connection</strong></a>(<a href="xmlstream.html#Client">xmlstream.Client</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>Forms the base for both <a href="#Client">Client</a> and <a href="#Component">Component</a> Classes<br> </tt></td></tr>
<tr><td> </td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="jabber.html#Connection">Connection</a></dd>
<dd><a href="xmlstream.html#Client">xmlstream.Client</a></dd>
<dd><a href="xmlstream.html#Stream">xmlstream.Stream</a></dd>
<dd><a href="xmlstream.html#NodeBuilder">xmlstream.NodeBuilder</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="Connection-SendAndWaitForResponse"><strong>SendAndWaitForResponse</strong></a>(self, obj, ID<font color="#909090">=None</font>, timeout<font color="#909090">=300</font>)</dt><dd><tt>Sends a protocol element object and blocks until a response with<br>
the same ID is received. The received protocol object is returned<br>
as the function result.</tt></dd></dl>
<dl><dt><a name="Connection-__init__"><strong>__init__</strong></a>(self, host, port, namespace, debug<font color="#909090">=[]</font>, log<font color="#909090">=0</font>, connection<font color="#909090">=1</font>, hostIP<font color="#909090">=None</font>, proxy<font color="#909090">=None</font>)</dt></dl>
<dl><dt><a name="Connection-dispatch"><strong>dispatch</strong></a>(self, stanza)</dt><dd><tt>Called internally when a 'protocol element' is received.<br>
Builds the relevant jabber.py object and dispatches it<br>
to a relevant function or callback.</tt></dd></dl>
<dl><dt><a name="Connection-getAnID"><strong>getAnID</strong></a>(self)</dt><dd><tt>Returns a unique ID</tt></dd></dl>
<dl><dt><a name="Connection-header"><strong>header</strong></a>(self)</dt></dl>
<dl><dt><a name="Connection-registerHandler"><strong>registerHandler</strong></a>(self, name, handler, type<font color="#909090">=''</font>, ns<font color="#909090">=''</font>, chained<font color="#909090">=0</font>, makefirst<font color="#909090">=0</font>, system<font color="#909090">=0</font>)</dt><dd><tt>Sets the callback func for processing incoming stanzas.<br>
Multiple callback functions can be set which are called in<br>
succession. Callback can optionally raise an <a href="#NodeProcessed">NodeProcessed</a> error to<br>
stop stanza from further processing. A type and namespace attributes can<br>
also be optionally passed so the callback is only called when a stanza of<br>
this type is received. Namespace attribute MUST be omitted if you<br>
registering an <a href="#Iq">Iq</a> processing handler.<br>
<br>
If 'chainOutput' is set to False (the default), the given function<br>
should be defined as follows:<br>
<br>
def myCallback(c, p)<br>
<br>
Where the first parameter is the <a href="#Client">Client</a> object, and the second<br>
parameter is the [ancestor of] <a href="#Protocol">Protocol</a> object representing the stanza<br>
which was received.<br>
<br>
If 'chainOutput' is set to True, the output from the various<br>
handler functions will be chained together. In this case,<br>
the given callback function should be defined like this:<br>
<br>
def myCallback(c, p, output)<br>
<br>
Where 'output' is the value returned by the previous<br>
callback function. For the first callback routine, 'output' will be<br>
set to an empty string.<br>
<br>
'makefirst' argument gives you control over handler prioriy in its type<br>
and namespace scope. Note that handlers for particular type or namespace always<br>
have lower priority that common handlers.</tt></dd></dl>
<dl><dt><a name="Connection-registerProtocol"><strong>registerProtocol</strong></a>(self, tag_name, Proto)</dt><dd><tt>Registers a protocol in protocol processing chain. You MUST register<br>
a protocol before you register any handler function for it.<br>
First parameter, that passed to this function is the tag name that<br>
belongs to all protocol elements. F.e.: message, presence, iq, xdb, ...<br>
Second parameter is the [ancestor of] <a href="#Protocol">Protocol</a> class, which instance will<br>
built from the received node with call<br>
<br>
if received_packet.getName()==tag_name:<br>
stanza = Proto(node = received_packet)</tt></dd></dl>
<dl><dt><a name="Connection-send"><strong>send</strong></a>(self, what)</dt><dd><tt>Sends a jabber protocol element (<a href="xmlstream.html#Node">Node</a>) to the server</tt></dd></dl>
<dl><dt><a name="Connection-setDisconnectHandler"><strong>setDisconnectHandler</strong></a>(self, func)</dt><dd><tt>Set the callback for a disconnect.<br>
The given function will be called with a single parameter (the<br>
connection object) when the connection is broken unexpectedly (eg,<br>
in response to sending badly formed XML). self.<strong>lastErr</strong> and<br>
self.<strong>lastErrCode</strong> will be set to the error which caused the<br>
disconnection, if any.</tt></dd></dl>
<dl><dt><a name="Connection-setIqHandler"><strong>setIqHandler</strong></a>(self, func, type<font color="#909090">=''</font>, ns<font color="#909090">=''</font>)</dt><dd><tt>Back compartibility method</tt></dd></dl>
<dl><dt><a name="Connection-setMessageHandler"><strong>setMessageHandler</strong></a>(self, func, type<font color="#909090">=''</font>, chainOutput<font color="#909090">=0</font>)</dt><dd><tt>Back compartibility method</tt></dd></dl>
<dl><dt><a name="Connection-setPresenceHandler"><strong>setPresenceHandler</strong></a>(self, func, type<font color="#909090">=''</font>, chainOutput<font color="#909090">=0</font>)</dt><dd><tt>Back compartibility method</tt></dd></dl>
<dl><dt><a name="Connection-waitForResponse"><strong>waitForResponse</strong></a>(self, ID, timeout<font color="#909090">=300</font>)</dt><dd><tt>Blocks untils a protocol element with the given id is received.<br>
If an error is received, waitForResponse returns None and<br>
self.<strong>lastErr</strong> and self.<strong>lastErrCode</strong> is set to the received error. If<br>
the operation times out (which only happens if a timeout value is<br>
given), waitForResponse will return None and self.<strong>lastErr</strong> will be<br>
set to "Timeout".<br>
Changed default from timeout=0 to timeout=300 to avoid hangs in<br>
scripts and such.<br>
If you _really_ want no timeout, just set it to 0</tt></dd></dl>
<hr>
Methods inherited from <a href="xmlstream.html#Client">xmlstream.Client</a>:<br>
<dl><dt><a name="Connection-connect"><strong>connect</strong></a>(self)</dt><dd><tt>Attempt to connect to specified host</tt></dd></dl>
<dl><dt><a name="Connection-getSocket"><strong>getSocket</strong></a>(self)</dt></dl>
<hr>
Methods inherited from <a href="xmlstream.html#Stream">xmlstream.Stream</a>:<br>
<dl><dt><a name="Connection-disconnect"><strong>disconnect</strong></a>(self)</dt><dd><tt>Close the stream and socket</tt></dd></dl>
<dl><dt><a name="Connection-disconnectHandler"><strong>disconnectHandler</strong></a>(self, conn)</dt><dd><tt>Called when a Network Error or disconnection occurs.<br>
Designed to be overidden</tt></dd></dl>
<dl><dt><a name="Connection-disconnected"><strong>disconnected</strong></a>(self, conn)</dt><dd><tt>Called when a Network Error or disconnection occurs.</tt></dd></dl>
<dl><dt><a name="Connection-getIncomingID"><strong>getIncomingID</strong></a>(self)</dt><dd><tt>Returns the streams ID</tt></dd></dl>
<dl><dt><a name="Connection-getOutgoingID"><strong>getOutgoingID</strong></a>(self)</dt><dd><tt>Returns the streams ID</tt></dd></dl>
<dl><dt><a name="Connection-log"><strong>log</strong></a>(self, data, inout<font color="#909090">=''</font>)</dt><dd><tt>Logs data to the specified filehandle. Data is time stamped<br>
and prefixed with inout</tt></dd></dl>
<dl><dt><a name="Connection-process"><strong>process</strong></a>(self, timeout<font color="#909090">=0</font>)</dt><dd><tt>Receives incoming data (if any) and processes it.<br>
Waits for data no more than timeout seconds.</tt></dd></dl>
<dl><dt><a name="Connection-read"><strong>read</strong></a>(self)</dt><dd><tt>Reads incoming data. Blocks until done. Calls <a href="#Connection-disconnected">disconnected</a>(self) if appropriate.</tt></dd></dl>
<dl><dt><a name="Connection-timestampLog"><strong>timestampLog</strong></a>(self, timestamp)</dt><dd><tt>Enable or disable the showing of a timestamp in the log.<br>
By default, timestamping is enabled.</tt></dd></dl>
<dl><dt><a name="Connection-write"><strong>write</strong></a>(self, raw_data)</dt><dd><tt>Writes raw outgoing data. Blocks until done.<br>
If supplied data is not unicode string, ENCODING<br>
is used for convertion. Avoid this!<br>
Always send your data as a unicode string.</tt></dd></dl>
<hr>
Methods inherited from <a href="xmlstream.html#NodeBuilder">xmlstream.NodeBuilder</a>:<br>
<dl><dt><a name="Connection-DEBUG"><strong>DEBUG</strong></a>(self, dup1, dup2<font color="#909090">=None</font>)</dt></dl>
<dl><dt><a name="Connection-getDom"><strong>getDom</strong></a>(self)</dt></dl>
<dl><dt><a name="Connection-handle_data"><strong>handle_data</strong></a>(self, data)</dt><dd><tt>XML Parser callback</tt></dd></dl>
<dl><dt><a name="Connection-unknown_endtag"><strong>unknown_endtag</strong></a>(self, tag)</dt><dd><tt>XML Parser callback</tt></dd></dl>
<dl><dt><a name="Connection-unknown_starttag"><strong>unknown_starttag</strong></a>(self, tag, attrs)</dt><dd><tt>XML Parser callback</tt></dd></dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="Iq">class <strong>Iq</strong></a>(<a href="jabber.html#Protocol">Protocol</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>Class for creating and managing jabber <iq> protocol<br>
elements<br> </tt></td></tr>
<tr><td> </td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="jabber.html#Iq">Iq</a></dd>
<dd><a href="jabber.html#Protocol">Protocol</a></dd>
<dd><a href="xmlstream.html#Node">xmlstream.Node</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="Iq-__init__"><strong>__init__</strong></a>(self, to<font color="#909090">=None</font>, type<font color="#909090">=None</font>, query<font color="#909090">=None</font>, attrs<font color="#909090">=None</font>, frm<font color="#909090">=None</font>, payload<font color="#909090">=[]</font>, node<font color="#909090">=None</font>)</dt></dl>
<dl><dt><a name="Iq-getList"><strong>getList</strong></a>(self)</dt><dd><tt>returns the list namespace</tt></dd></dl>
<dl><dt><a name="Iq-getQuery"><strong>getQuery</strong></a>(self)</dt><dd><tt>returns the query namespace</tt></dd></dl>
<dl><dt><a name="Iq-getQueryNode"><strong>getQueryNode</strong></a>(self)</dt><dd><tt>Returns any textual data contained by the query tag</tt></dd></dl>
<dl><dt><a name="Iq-getQueryPayload"><strong>getQueryPayload</strong></a>(self)</dt><dd><tt>Returns the query's payload as a <a href="xmlstream.html#Node">Node</a> list</tt></dd></dl>
<dl><dt><a name="Iq-setList"><strong>setList</strong></a>(self, namespace)</dt></dl>
<dl><dt><a name="Iq-setQuery"><strong>setQuery</strong></a>(self, namespace)</dt><dd><tt>Sets a query's namespace, and inserts a query tag if<br>
one doesn't already exist. The resulting query tag<br>
is returned as the function result.</tt></dd></dl>
<dl><dt><a name="Iq-setQueryNode"><strong>setQueryNode</strong></a>(self, val)</dt><dd><tt>Sets textual data contained by the query tag</tt></dd></dl>
<dl><dt><a name="Iq-setQueryPayload"><strong>setQueryPayload</strong></a>(self, payload, add<font color="#909090">=0</font>)</dt><dd><tt>Sets a <a href="#Iq">Iq</a>'s query payload. 'payload' can be either a <a href="xmlstream.html#Node">Node</a><br>
structure or a valid xml document. The query tag is automatically<br>
inserted if it doesn't already exist.</tt></dd></dl>
<hr>
Methods inherited from <a href="jabber.html#Protocol">Protocol</a>:<br>
<dl><dt><a name="Iq-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
<dl><dt><a name="Iq-asNode"><strong>asNode</strong></a>(self)</dt><dd><tt>Back compartibility method</tt></dd></dl>
<dl><dt><a name="Iq-fromTo"><strong>fromTo</strong></a>(self)</dt><dd><tt>Swaps the element's from and to attributes.<br>
Note that this is only useful for writing components; if you are<br>
writing a Jabber client you shouldn't use this, because the Jabber<br>
server will set the 'from' field automatically.</tt></dd></dl>
<dl><dt><a name="Iq-getError"><strong>getError</strong></a>(self)</dt><dd><tt>Returns the error string, if any</tt></dd></dl>
<dl><dt><a name="Iq-getErrorCode"><strong>getErrorCode</strong></a>(self)</dt><dd><tt>Returns the error code, if any</tt></dd></dl>
<dl><dt><a name="Iq-getFrom"><strong>getFrom</strong></a>(self)</dt><dd><tt>Returns the 'from' attribute as a <a href="#JID">JID</a> object.</tt></dd></dl>
<dl><dt><a name="Iq-getID"><strong>getID</strong></a>(self)</dt><dd><tt>Returns the 'id' attribute of the protocol element.</tt></dd></dl>
<dl><dt><a name="Iq-getTo"><strong>getTo</strong></a>(self)</dt><dd><tt>Returns the 'to' attribute as a <a href="#JID">JID</a> object.</tt></dd></dl>
<dl><dt><a name="Iq-getType"><strong>getType</strong></a>(self)</dt><dd><tt>Returns the 'type' attribute of the protocol element.</tt></dd></dl>
<dl><dt><a name="Iq-getX"><strong>getX</strong></a>(self, index<font color="#909090">=0</font>)</dt><dd><tt>Returns the x namespace, optionally passed an index if there are<br>
multiple tags.</tt></dd></dl>
<dl><dt><a name="Iq-getXNode"><strong>getXNode</strong></a>(self, val<font color="#909090">=None</font>)</dt><dd><tt>Returns the x <a href="xmlstream.html#Node">Node</a> instance. If there are multiple tags<br>
the first <a href="xmlstream.html#Node">Node</a> is returned. For multiple X nodes use getXNodes<br>
or pass an index integer value or namespace string to getXNode<br>
and if a match is found it will be returned.</tt></dd></dl>
<dl><dt><a name="Iq-getXNodes"><strong>getXNodes</strong></a>(self)</dt><dd><tt>Returns a list of X nodes.</tt></dd></dl>
<dl><dt><a name="Iq-getXPayload"><strong>getXPayload</strong></a>(self, val<font color="#909090">=None</font>)</dt><dd><tt>Returns the x tags' payload as a list of <a href="xmlstream.html#Node">Node</a> instances.</tt></dd></dl>
<dl><dt><a name="Iq-setError"><strong>setError</strong></a>(self, val, code)</dt><dd><tt>Sets an error string and code</tt></dd></dl>
<dl><dt><a name="Iq-setFrom"><strong>setFrom</strong></a>(self, val)</dt><dd><tt>Sets the 'from' element to the given <a href="#JID">JID</a>.</tt></dd></dl>
<dl><dt><a name="Iq-setID"><strong>setID</strong></a>(self, val)</dt><dd><tt>Sets the ID of the protocol element</tt></dd></dl>
<dl><dt><a name="Iq-setTo"><strong>setTo</strong></a>(self, val)</dt><dd><tt>Sets the 'to' element to the given <a href="#JID">JID</a>.</tt></dd></dl>
<dl><dt><a name="Iq-setType"><strong>setType</strong></a>(self, val)</dt><dd><tt>Sets the 'type' attribute of the protocol element</tt></dd></dl>
<dl><dt><a name="Iq-setX"><strong>setX</strong></a>(self, namespace, index<font color="#909090">=0</font>)</dt><dd><tt>Sets the name space of the x tag. It also creates the node<br>
if it doesn't already exist.</tt></dd></dl>
<dl><dt><a name="Iq-setXNode"><strong>setXNode</strong></a>(self, val<font color="#909090">=''</font>)</dt><dd><tt>Sets the x tag's data to the given textual value.</tt></dd></dl>
<dl><dt><a name="Iq-setXPayload"><strong>setXPayload</strong></a>(self, payload, namespace<font color="#909090">=''</font>)</dt><dd><tt>Sets the Child of an 'x' tag. Can be a <a href="xmlstream.html#Node">Node</a> instance or an<br>
XML document</tt></dd></dl>
<hr>
Methods inherited from <a href="xmlstream.html#Node">xmlstream.Node</a>:<br>
<dl><dt><a name="Iq-__str__"><strong>__str__</strong></a>(self)</dt></dl>
<dl><dt><a name="Iq-getAttr"><strong>getAttr</strong></a>(self, key)</dt><dd><tt>Get a value for the nodes named attribute.</tt></dd></dl>
<dl><dt><a name="Iq-getChildren"><strong>getChildren</strong></a>(self)</dt><dd><tt>Returns a nodes children</tt></dd></dl>
<dl><dt><a name="Iq-getData"><strong>getData</strong></a>(self)</dt><dd><tt>Return the nodes textual data</tt></dd></dl>
<dl><dt><a name="Iq-getDataAsParts"><strong>getDataAsParts</strong></a>(self)</dt><dd><tt>Return the node data as an array</tt></dd></dl>
<dl><dt><a name="Iq-getName"><strong>getName</strong></a>(self)</dt><dd><tt>Set the nodes tag name.</tt></dd></dl>
<dl><dt><a name="Iq-getNamespace"><strong>getNamespace</strong></a>(self)</dt><dd><tt>Returns the nodes namespace.</tt></dd></dl>
<dl><dt><a name="Iq-getParent"><strong>getParent</strong></a>(self)</dt><dd><tt>return the nodes parent node.</tt></dd></dl>
<dl><dt><a name="Iq-getTag"><strong>getTag</strong></a>(self, name, index<font color="#909090">=None</font>)</dt><dd><tt>Returns a child node with tag name. Returns None<br>
if not found.</tt></dd></dl>
<dl><dt><a name="Iq-getTags"><strong>getTags</strong></a>(self, name)</dt><dd><tt>Like getTag but returns a list with matching child nodes</tt></dd></dl>
<dl><dt><a name="Iq-insertData"><strong>insertData</strong></a>(self, data)</dt><dd><tt>Set the nodes textual data</tt></dd></dl>
<dl><dt><a name="Iq-insertNode"><strong>insertNode</strong></a>(self, node)</dt><dd><tt>Add a child node to the node</tt></dd></dl>
<dl><dt><a name="Iq-insertTag"><strong>insertTag</strong></a>(self, name<font color="#909090">=None</font>, attrs<font color="#909090">={}</font>, payload<font color="#909090">=[]</font>, node<font color="#909090">=None</font>)</dt><dd><tt>Add a child tag of name 'name' to the node.<br>
<br>
Returns the newly created node.</tt></dd></dl>
<dl><dt><a name="Iq-insertXML"><strong>insertXML</strong></a>(self, xml_str)</dt><dd><tt>Add raw xml as a child of the node</tt></dd></dl>
<dl><dt><a name="Iq-putAttr"><strong>putAttr</strong></a>(self, key, val)</dt><dd><tt>Add a name/value attribute to the node.</tt></dd></dl>
<dl><dt><a name="Iq-putData"><strong>putData</strong></a>(self, data)</dt><dd><tt>Set the nodes textual data</tt></dd></dl>
<dl><dt><a name="Iq-removeTag"><strong>removeTag</strong></a>(self, tag)</dt><dd><tt>Pops out specified child and returns it.</tt></dd></dl>
<dl><dt><a name="Iq-setName"><strong>setName</strong></a>(self, val)</dt><dd><tt>Set the nodes tag name.</tt></dd></dl>
<dl><dt><a name="Iq-setNamespace"><strong>setNamespace</strong></a>(self, namespace)</dt><dd><tt>Set the nodes namespace.</tt></dd></dl>
<dl><dt><a name="Iq-setParent"><strong>setParent</strong></a>(self, node)</dt><dd><tt>Set the nodes parent node.</tt></dd></dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="JID">class <strong>JID</strong></a></font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>A Simple class for managing jabber users id's<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="JID-__eq__"><strong>__eq__</strong></a>(self, other)</dt><dd><tt>Returns whether this <a href="#JID">JID</a> is identical to another one.<br>
The "other" can be a <a href="#JID">JID</a> object or a string.</tt></dd></dl>
<dl><dt><a name="JID-__init__"><strong>__init__</strong></a>(self, jid<font color="#909090">=''</font>, node<font color="#909090">=''</font>, domain<font color="#909090">=''</font>, resource<font color="#909090">=''</font>)</dt></dl>
<dl><dt><a name="JID-__repr__"><strong>__repr__</strong></a> = <a href="#JID-__str__">__str__</a>(self)</dt></dl>
<dl><dt><a name="JID-__str__"><strong>__str__</strong></a>(self)</dt></dl>
<dl><dt><a name="JID-getDomain"><strong>getDomain</strong></a>(self)</dt><dd><tt>Returns <a href="#JID">JID</a> domain as string or None if absent</tt></dd></dl>
<dl><dt><a name="JID-getNode"><strong>getNode</strong></a>(self)</dt><dd><tt>Returns <a href="#JID">JID</a> <a href="xmlstream.html#Node">Node</a> as string</tt></dd></dl>
<dl><dt><a name="JID-getResource"><strong>getResource</strong></a>(self)</dt><dd><tt>Returns <a href="#JID">JID</a> resource as string or None if absent</tt></dd></dl>
<dl><dt><a name="JID-getStripped"><strong>getStripped</strong></a>(self)</dt><dd><tt>Returns a <a href="#JID">JID</a> string with no resource</tt></dd></dl>
<dl><dt><a name="JID-setDomain"><strong>setDomain</strong></a>(self, val)</dt><dd><tt>Sets <a href="#JID">JID</a> domain from string</tt></dd></dl>
<dl><dt><a name="JID-setNode"><strong>setNode</strong></a>(self, val)</dt><dd><tt>Sets <a href="#JID">JID</a> <a href="xmlstream.html#Node">Node</a> from string</tt></dd></dl>
<dl><dt><a name="JID-setResource"><strong>setResource</strong></a>(self, val)</dt><dd><tt>Sets <a href="#JID">JID</a> resource from string</tt></dd></dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="Log">class <strong>Log</strong></a>(<a href="jabber.html#Protocol">Protocol</a>)</font></td></tr>
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="jabber.html#Log">Log</a></dd>
<dd><a href="jabber.html#Protocol">Protocol</a></dd>
<dd><a href="xmlstream.html#Node">xmlstream.Node</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="Log-__init__"><strong>__init__</strong></a>(self, attrs<font color="#909090">=None</font>, type<font color="#909090">=None</font>, frm<font color="#909090">=None</font>, to<font color="#909090">=None</font>, payload<font color="#909090">=[]</font>, node<font color="#909090">=None</font>)</dt><dd><tt>## eg: <log type='warn' from='component'>Hello <a href="#Log">Log</a> File</log></tt></dd></dl>
<dl><dt><a name="Log-getBody"><strong>getBody</strong></a>(self)</dt><dd><tt>Returns the log message text.</tt></dd></dl>
<dl><dt><a name="Log-setBody"><strong>setBody</strong></a>(self, val)</dt><dd><tt>Sets the log message text.</tt></dd></dl>
<hr>
Methods inherited from <a href="jabber.html#Protocol">Protocol</a>:<br>
<dl><dt><a name="Log-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
<dl><dt><a name="Log-asNode"><strong>asNode</strong></a>(self)</dt><dd><tt>Back compartibility method</tt></dd></dl>
<dl><dt><a name="Log-fromTo"><strong>fromTo</strong></a>(self)</dt><dd><tt>Swaps the element's from and to attributes.<br>
Note that this is only useful for writing components; if you are<br>
writing a Jabber client you shouldn't use this, because the Jabber<br>
server will set the 'from' field automatically.</tt></dd></dl>
<dl><dt><a name="Log-getError"><strong>getError</strong></a>(self)</dt><dd><tt>Returns the error string, if any</tt></dd></dl>
<dl><dt><a name="Log-getErrorCode"><strong>getErrorCode</strong></a>(self)</dt><dd><tt>Returns the error code, if any</tt></dd></dl>
<dl><dt><a name="Log-getFrom"><strong>getFrom</strong></a>(self)</dt><dd><tt>Returns the 'from' attribute as a <a href="#JID">JID</a> object.</tt></dd></dl>
<dl><dt><a name="Log-getID"><strong>getID</strong></a>(self)</dt><dd><tt>Returns the 'id' attribute of the protocol element.</tt></dd></dl>
<dl><dt><a name="Log-getTo"><strong>getTo</strong></a>(self)</dt><dd><tt>Returns the 'to' attribute as a <a href="#JID">JID</a> object.</tt></dd></dl>
<dl><dt><a name="Log-getType"><strong>getType</strong></a>(self)</dt><dd><tt>Returns the 'type' attribute of the protocol element.</tt></dd></dl>
<dl><dt><a name="Log-getX"><strong>getX</strong></a>(self, index<font color="#909090">=0</font>)</dt><dd><tt>Returns the x namespace, optionally passed an index if there are<br>
multiple tags.</tt></dd></dl>
<dl><dt><a name="Log-getXNode"><strong>getXNode</strong></a>(self, val<font color="#909090">=None</font>)</dt><dd><tt>Returns the x <a href="xmlstream.html#Node">Node</a> instance. If there are multiple tags<br>
the first <a href="xmlstream.html#Node">Node</a> is returned. For multiple X nodes use getXNodes<br>
or pass an index integer value or namespace string to getXNode<br>
and if a match is found it will be returned.</tt></dd></dl>
<dl><dt><a name="Log-getXNodes"><strong>getXNodes</strong></a>(self)</dt><dd><tt>Returns a list of X nodes.</tt></dd></dl>
<dl><dt><a name="Log-getXPayload"><strong>getXPayload</strong></a>(self, val<font color="#909090">=None</font>)</dt><dd><tt>Returns the x tags' payload as a list of <a href="xmlstream.html#Node">Node</a> instances.</tt></dd></dl>
<dl><dt><a name="Log-setError"><strong>setError</strong></a>(self, val, code)</dt><dd><tt>Sets an error string and code</tt></dd></dl>
<dl><dt><a name="Log-setFrom"><strong>setFrom</strong></a>(self, val)</dt><dd><tt>Sets the 'from' element to the given <a href="#JID">JID</a>.</tt></dd></dl>
<dl><dt><a name="Log-setID"><strong>setID</strong></a>(self, val)</dt><dd><tt>Sets the ID of the protocol element</tt></dd></dl>
<dl><dt><a name="Log-setTo"><strong>setTo</strong></a>(self, val)</dt><dd><tt>Sets the 'to' element to the given <a href="#JID">JID</a>.</tt></dd></dl>
<dl><dt><a name="Log-setType"><strong>setType</strong></a>(self, val)</dt><dd><tt>Sets the 'type' attribute of the protocol element</tt></dd></dl>
<dl><dt><a name="Log-setX"><strong>setX</strong></a>(self, namespace, index<font color="#909090">=0</font>)</dt><dd><tt>Sets the name space of the x tag. It also creates the node<br>
if it doesn't already exist.</tt></dd></dl>
<dl><dt><a name="Log-setXNode"><strong>setXNode</strong></a>(self, val<font color="#909090">=''</font>)</dt><dd><tt>Sets the x tag's data to the given textual value.</tt></dd></dl>
<dl><dt><a name="Log-setXPayload"><strong>setXPayload</strong></a>(self, payload, namespace<font color="#909090">=''</font>)</dt><dd><tt>Sets the Child of an 'x' tag. Can be a <a href="xmlstream.html#Node">Node</a> instance or an<br>
XML document</tt></dd></dl>
<hr>
Methods inherited from <a href="xmlstream.html#Node">xmlstream.Node</a>:<br>
<dl><dt><a name="Log-__str__"><strong>__str__</strong></a>(self)</dt></dl>
<dl><dt><a name="Log-getAttr"><strong>getAttr</strong></a>(self, key)</dt><dd><tt>Get a value for the nodes named attribute.</tt></dd></dl>
<dl><dt><a name="Log-getChildren"><strong>getChildren</strong></a>(self)</dt><dd><tt>Returns a nodes children</tt></dd></dl>
<dl><dt><a name="Log-getData"><strong>getData</strong></a>(self)</dt><dd><tt>Return the nodes textual data</tt></dd></dl>
<dl><dt><a name="Log-getDataAsParts"><strong>getDataAsParts</strong></a>(self)</dt><dd><tt>Return the node data as an array</tt></dd></dl>
<dl><dt><a name="Log-getName"><strong>getName</strong></a>(self)</dt><dd><tt>Set the nodes tag name.</tt></dd></dl>
<dl><dt><a name="Log-getNamespace"><strong>getNamespace</strong></a>(self)</dt><dd><tt>Returns the nodes namespace.</tt></dd></dl>
<dl><dt><a name="Log-getParent"><strong>getParent</strong></a>(self)</dt><dd><tt>return the nodes parent node.</tt></dd></dl>
<dl><dt><a name="Log-getTag"><strong>getTag</strong></a>(self, name, index<font color="#909090">=None</font>)</dt><dd><tt>Returns a child node with tag name. Returns None<br>
if not found.</tt></dd></dl>
<dl><dt><a name="Log-getTags"><strong>getTags</strong></a>(self, name)</dt><dd><tt>Like getTag but returns a list with matching child nodes</tt></dd></dl>
<dl><dt><a name="Log-insertData"><strong>insertData</strong></a>(self, data)</dt><dd><tt>Set the nodes textual data</tt></dd></dl>
<dl><dt><a name="Log-insertNode"><strong>insertNode</strong></a>(self, node)</dt><dd><tt>Add a child node to the node</tt></dd></dl>
<dl><dt><a name="Log-insertTag"><strong>insertTag</strong></a>(self, name<font color="#909090">=None</font>, attrs<font color="#909090">={}</font>, payload<font color="#909090">=[]</font>, node<font color="#909090">=None</font>)</dt><dd><tt>Add a child tag of name 'name' to the node.<br>
<br>
Returns the newly created node.</tt></dd></dl>
<dl><dt><a name="Log-insertXML"><strong>insertXML</strong></a>(self, xml_str)</dt><dd><tt>Add raw xml as a child of the node</tt></dd></dl>
<dl><dt><a name="Log-putAttr"><strong>putAttr</strong></a>(self, key, val)</dt><dd><tt>Add a name/value attribute to the node.</tt></dd></dl>
<dl><dt><a name="Log-putData"><strong>putData</strong></a>(self, data)</dt><dd><tt>Set the nodes textual data</tt></dd></dl>
<dl><dt><a name="Log-removeTag"><strong>removeTag</strong></a>(self, tag)</dt><dd><tt>Pops out specified child and returns it.</tt></dd></dl>
<dl><dt><a name="Log-setName"><strong>setName</strong></a>(self, val)</dt><dd><tt>Set the nodes tag name.</tt></dd></dl>
<dl><dt><a name="Log-setNamespace"><strong>setNamespace</strong></a>(self, namespace)</dt><dd><tt>Set the nodes namespace.</tt></dd></dl>
<dl><dt><a name="Log-setParent"><strong>setParent</strong></a>(self, node)</dt><dd><tt>Set the nodes parent node.</tt></dd></dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="Message">class <strong>Message</strong></a>(<a href="jabber.html#Protocol">Protocol</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>Builds on the <a href="#Protocol">Protocol</a> class to provide an interface for sending<br>
message protocol elements<br> </tt></td></tr>
<tr><td> </td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="jabber.html#Message">Message</a></dd>
<dd><a href="jabber.html#Protocol">Protocol</a></dd>
<dd><a href="xmlstream.html#Node">xmlstream.Node</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="Message-__init__"><strong>__init__</strong></a>(self, to<font color="#909090">=None</font>, body<font color="#909090">=None</font>, type<font color="#909090">=None</font>, subject<font color="#909090">=None</font>, attrs<font color="#909090">=None</font>, frm<font color="#909090">=None</font>, payload<font color="#909090">=[]</font>, node<font color="#909090">=None</font>)</dt></dl>
<dl><dt><a name="Message-buildReply"><strong>buildReply</strong></a>(self, reply_txt<font color="#909090">=''</font>)</dt><dd><tt>Returns a new <a href="#Message">Message</a> object as a reply to itself.<br>
The reply message has the 'to', 'type' and 'thread' attributes<br>
automatically set.</tt></dd></dl>
<dl><dt><a name="Message-build_reply"><strong>build_reply</strong></a>(self, reply_txt<font color="#909090">=''</font>)</dt></dl>
<dl><dt><a name="Message-getBody"><strong>getBody</strong></a>(self)</dt><dd><tt>Returns the message body.</tt></dd></dl>
<dl><dt><a name="Message-getSubject"><strong>getSubject</strong></a>(self)</dt><dd><tt>Returns the message's subject.</tt></dd></dl>
<dl><dt><a name="Message-getThread"><strong>getThread</strong></a>(self)</dt><dd><tt>Returns the message's thread ID.</tt></dd></dl>
<dl><dt><a name="Message-getTimestamp"><strong>getTimestamp</strong></a>(self)</dt></dl>
<dl><dt><a name="Message-setBody"><strong>setBody</strong></a>(self, val)</dt><dd><tt>Sets the message body text.</tt></dd></dl>
<dl><dt><a name="Message-setSubject"><strong>setSubject</strong></a>(self, val)</dt><dd><tt>Sets the message subject text.</tt></dd></dl>
<dl><dt><a name="Message-setThread"><strong>setThread</strong></a>(self, val)</dt><dd><tt>Sets the message thread ID.</tt></dd></dl>
<dl><dt><a name="Message-setTimestamp"><strong>setTimestamp</strong></a>(self, val<font color="#909090">=None</font>)</dt></dl>
<hr>
Methods inherited from <a href="jabber.html#Protocol">Protocol</a>:<br>
<dl><dt><a name="Message-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
<dl><dt><a name="Message-asNode"><strong>asNode</strong></a>(self)</dt><dd><tt>Back compartibility method</tt></dd></dl>
<dl><dt><a name="Message-fromTo"><strong>fromTo</strong></a>(self)</dt><dd><tt>Swaps the element's from and to attributes.<br>
Note that this is only useful for writing components; if you are<br>
writing a Jabber client you shouldn't use this, because the Jabber<br>
server will set the 'from' field automatically.</tt></dd></dl>
<dl><dt><a name="Message-getError"><strong>getError</strong></a>(self)</dt><dd><tt>Returns the error string, if any</tt></dd></dl>
<dl><dt><a name="Message-getErrorCode"><strong>getErrorCode</strong></a>(self)</dt><dd><tt>Returns the error code, if any</tt></dd></dl>
<dl><dt><a name="Message-getFrom"><strong>getFrom</strong></a>(self)</dt><dd><tt>Returns the 'from' attribute as a <a href="#JID">JID</a> object.</tt></dd></dl>
<dl><dt><a name="Message-getID"><strong>getID</strong></a>(self)</dt><dd><tt>Returns the 'id' attribute of the protocol element.</tt></dd></dl>
<dl><dt><a name="Message-getTo"><strong>getTo</strong></a>(self)</dt><dd><tt>Returns the 'to' attribute as a <a href="#JID">JID</a> object.</tt></dd></dl>
<dl><dt><a name="Message-getType"><strong>getType</strong></a>(self)</dt><dd><tt>Returns the 'type' attribute of the protocol element.</tt></dd></dl>
<dl><dt><a name="Message-getX"><strong>getX</strong></a>(self, index<font color="#909090">=0</font>)</dt><dd><tt>Returns the x namespace, optionally passed an index if there are<br>
multiple tags.</tt></dd></dl>
<dl><dt><a name="Message-getXNode"><strong>getXNode</strong></a>(self, val<font color="#909090">=None</font>)</dt><dd><tt>Returns the x <a href="xmlstream.html#Node">Node</a> instance. If there are multiple tags<br>
the first <a href="xmlstream.html#Node">Node</a> is returned. For multiple X nodes use getXNodes<br>
or pass an index integer value or namespace string to getXNode<br>
and if a match is found it will be returned.</tt></dd></dl>
<dl><dt><a name="Message-getXNodes"><strong>getXNodes</strong></a>(self)</dt><dd><tt>Returns a list of X nodes.</tt></dd></dl>
<dl><dt><a name="Message-getXPayload"><strong>getXPayload</strong></a>(self, val<font color="#909090">=None</font>)</dt><dd><tt>Returns the x tags' payload as a list of <a href="xmlstream.html#Node">Node</a> instances.</tt></dd></dl>
<dl><dt><a name="Message-setError"><strong>setError</strong></a>(self, val, code)</dt><dd><tt>Sets an error string and code</tt></dd></dl>
<dl><dt><a name="Message-setFrom"><strong>setFrom</strong></a>(self, val)</dt><dd><tt>Sets the 'from' element to the given <a href="#JID">JID</a>.</tt></dd></dl>
<dl><dt><a name="Message-setID"><strong>setID</strong></a>(self, val)</dt><dd><tt>Sets the ID of the protocol element</tt></dd></dl>
<dl><dt><a name="Message-setTo"><strong>setTo</strong></a>(self, val)</dt><dd><tt>Sets the 'to' element to the given <a href="#JID">JID</a>.</tt></dd></dl>
<dl><dt><a name="Message-setType"><strong>setType</strong></a>(self, val)</dt><dd><tt>Sets the 'type' attribute of the protocol element</tt></dd></dl>
<dl><dt><a name="Message-setX"><strong>setX</strong></a>(self, namespace, index<font color="#909090">=0</font>)</dt><dd><tt>Sets the name space of the x tag. It also creates the node<br>
if it doesn't already exist.</tt></dd></dl>
<dl><dt><a name="Message-setXNode"><strong>setXNode</strong></a>(self, val<font color="#909090">=''</font>)</dt><dd><tt>Sets the x tag's data to the given textual value.</tt></dd></dl>
<dl><dt><a name="Message-setXPayload"><strong>setXPayload</strong></a>(self, payload, namespace<font color="#909090">=''</font>)</dt><dd><tt>Sets the Child of an 'x' tag. Can be a <a href="xmlstream.html#Node">Node</a> instance or an<br>
XML document</tt></dd></dl>
<hr>
Methods inherited from <a href="xmlstream.html#Node">xmlstream.Node</a>:<br>
<dl><dt><a name="Message-__str__"><strong>__str__</strong></a>(self)</dt></dl>
<dl><dt><a name="Message-getAttr"><strong>getAttr</strong></a>(self, key)</dt><dd><tt>Get a value for the nodes named attribute.</tt></dd></dl>
<dl><dt><a name="Message-getChildren"><strong>getChildren</strong></a>(self)</dt><dd><tt>Returns a nodes children</tt></dd></dl>
<dl><dt><a name="Message-getData"><strong>getData</strong></a>(self)</dt><dd><tt>Return the nodes textual data</tt></dd></dl>
<dl><dt><a name="Message-getDataAsParts"><strong>getDataAsParts</strong></a>(self)</dt><dd><tt>Return the node data as an array</tt></dd></dl>
<dl><dt><a name="Message-getName"><strong>getName</strong></a>(self)</dt><dd><tt>Set the nodes tag name.</tt></dd></dl>
<dl><dt><a name="Message-getNamespace"><strong>getNamespace</strong></a>(self)</dt><dd><tt>Returns the nodes namespace.</tt></dd></dl>
<dl><dt><a name="Message-getParent"><strong>getParent</strong></a>(self)</dt><dd><tt>return the nodes parent node.</tt></dd></dl>
<dl><dt><a name="Message-getTag"><strong>getTag</strong></a>(self, name, index<font color="#909090">=None</font>)</dt><dd><tt>Returns a child node with tag name. Returns None<br>
if not found.</tt></dd></dl>
<dl><dt><a name="Message-getTags"><strong>getTags</strong></a>(self, name)</dt><dd><tt>Like getTag but returns a list with matching child nodes</tt></dd></dl>
<dl><dt><a name="Message-insertData"><strong>insertData</strong></a>(self, data)</dt><dd><tt>Set the nodes textual data</tt></dd></dl>
<dl><dt><a name="Message-insertNode"><strong>insertNode</strong></a>(self, node)</dt><dd><tt>Add a child node to the node</tt></dd></dl>
<dl><dt><a name="Message-insertTag"><strong>insertTag</strong></a>(self, name<font color="#909090">=None</font>, attrs<font color="#909090">={}</font>, payload<font color="#909090">=[]</font>, node<font color="#909090">=None</font>)</dt><dd><tt>Add a child tag of name 'name' to the node.<br>
<br>
Returns the newly created node.</tt></dd></dl>
<dl><dt><a name="Message-insertXML"><strong>insertXML</strong></a>(self, xml_str)</dt><dd><tt>Add raw xml as a child of the node</tt></dd></dl>
<dl><dt><a name="Message-putAttr"><strong>putAttr</strong></a>(self, key, val)</dt><dd><tt>Add a name/value attribute to the node.</tt></dd></dl>
<dl><dt><a name="Message-putData"><strong>putData</strong></a>(self, data)</dt><dd><tt>Set the nodes textual data</tt></dd></dl>
<dl><dt><a name="Message-removeTag"><strong>removeTag</strong></a>(self, tag)</dt><dd><tt>Pops out specified child and returns it.</tt></dd></dl>
<dl><dt><a name="Message-setName"><strong>setName</strong></a>(self, val)</dt><dd><tt>Set the nodes tag name.</tt></dd></dl>
<dl><dt><a name="Message-setNamespace"><strong>setNamespace</strong></a>(self, namespace)</dt><dd><tt>Set the nodes namespace.</tt></dd></dl>
<dl><dt><a name="Message-setParent"><strong>setParent</strong></a>(self, node)</dt><dd><tt>Set the nodes parent node.</tt></dd></dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="NodeProcessed">class <strong>NodeProcessed</strong></a>(<a href="exceptions.html#Exception">exceptions.Exception</a>)</font></td></tr>
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
<td width="100%">Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
<dl><dt><a name="NodeProcessed-__getitem__"><strong>__getitem__</strong></a>(...)</dt></dl>
<dl><dt><a name="NodeProcessed-__init__"><strong>__init__</strong></a>(...)</dt></dl>
<dl><dt><a name="NodeProcessed-__str__"><strong>__str__</strong></a>(...)</dt></dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="Presence">class <strong>Presence</strong></a>(<a href="jabber.html#Protocol">Protocol</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>Class for creating and managing jabber <presence> protocol<br>
elements<br> </tt></td></tr>
<tr><td> </td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="jabber.html#Presence">Presence</a></dd>
<dd><a href="jabber.html#Protocol">Protocol</a></dd>
<dd><a href="xmlstream.html#Node">xmlstream.Node</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="Presence-__init__"><strong>__init__</strong></a>(self, to<font color="#909090">=None</font>, type<font color="#909090">=None</font>, priority<font color="#909090">=None</font>, show<font color="#909090">=None</font>, status<font color="#909090">=None</font>, attrs<font color="#909090">=None</font>, frm<font color="#909090">=None</font>, payload<font color="#909090">=[]</font>, node<font color="#909090">=None</font>)</dt></dl>
<dl><dt><a name="Presence-getPriority"><strong>getPriority</strong></a>(self)</dt><dd><tt>Returns the presence priority</tt></dd></dl>
<dl><dt><a name="Presence-getShow"><strong>getShow</strong></a>(self)</dt><dd><tt>Returns the presence show</tt></dd></dl>
<dl><dt><a name="Presence-getStatus"><strong>getStatus</strong></a>(self)</dt><dd><tt>Returns the presence status</tt></dd></dl>
<dl><dt><a name="Presence-setPriority"><strong>setPriority</strong></a>(self, val)</dt><dd><tt>Sets the presence priority</tt></dd></dl>
<dl><dt><a name="Presence-setShow"><strong>setShow</strong></a>(self, val)</dt><dd><tt>Sets the presence show</tt></dd></dl>
<dl><dt><a name="Presence-setStatus"><strong>setStatus</strong></a>(self, val)</dt><dd><tt>Sets the presence status</tt></dd></dl>
<hr>
Methods inherited from <a href="jabber.html#Protocol">Protocol</a>:<br>
<dl><dt><a name="Presence-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
<dl><dt><a name="Presence-asNode"><strong>asNode</strong></a>(self)</dt><dd><tt>Back compartibility method</tt></dd></dl>
<dl><dt><a name="Presence-fromTo"><strong>fromTo</strong></a>(self)</dt><dd><tt>Swaps the element's from and to attributes.<br>
Note that this is only useful for writing components; if you are<br>
writing a Jabber client you shouldn't use this, because the Jabber<br>
server will set the 'from' field automatically.</tt></dd></dl>
<dl><dt><a name="Presence-getError"><strong>getError</strong></a>(self)</dt><dd><tt>Returns the error string, if any</tt></dd></dl>
<dl><dt><a name="Presence-getErrorCode"><strong>getErrorCode</strong></a>(self)</dt><dd><tt>Returns the error code, if any</tt></dd></dl>
<dl><dt><a name="Presence-getFrom"><strong>getFrom</strong></a>(self)</dt><dd><tt>Returns the 'from' attribute as a <a href="#JID">JID</a> object.</tt></dd></dl>
<dl><dt><a name="Presence-getID"><strong>getID</strong></a>(self)</dt><dd><tt>Returns the 'id' attribute of the protocol element.</tt></dd></dl>
<dl><dt><a name="Presence-getTo"><strong>getTo</strong></a>(self)</dt><dd><tt>Returns the 'to' attribute as a <a href="#JID">JID</a> object.</tt></dd></dl>
<dl><dt><a name="Presence-getType"><strong>getType</strong></a>(self)</dt><dd><tt>Returns the 'type' attribute of the protocol element.</tt></dd></dl>
<dl><dt><a name="Presence-getX"><strong>getX</strong></a>(self, index<font color="#909090">=0</font>)</dt><dd><tt>Returns the x namespace, optionally passed an index if there are<br>
multiple tags.</tt></dd></dl>
<dl><dt><a name="Presence-getXNode"><strong>getXNode</strong></a>(self, val<font color="#909090">=None</font>)</dt><dd><tt>Returns the x <a href="xmlstream.html#Node">Node</a> instance. If there are multiple tags<br>
the first <a href="xmlstream.html#Node">Node</a> is returned. For multiple X nodes use getXNodes<br>
or pass an index integer value or namespace string to getXNode<br>
and if a match is found it will be returned.</tt></dd></dl>
<dl><dt><a name="Presence-getXNodes"><strong>getXNodes</strong></a>(self)</dt><dd><tt>Returns a list of X nodes.</tt></dd></dl>
<dl><dt><a name="Presence-getXPayload"><strong>getXPayload</strong></a>(self, val<font color="#909090">=None</font>)</dt><dd><tt>Returns the x tags' payload as a list of <a href="xmlstream.html#Node">Node</a> instances.</tt></dd></dl>
<dl><dt><a name="Presence-setError"><strong>setError</strong></a>(self, val, code)</dt><dd><tt>Sets an error string and code</tt></dd></dl>
<dl><dt><a name="Presence-setFrom"><strong>setFrom</strong></a>(self, val)</dt><dd><tt>Sets the 'from' element to the given <a href="#JID">JID</a>.</tt></dd></dl>
<dl><dt><a name="Presence-setID"><strong>setID</strong></a>(self, val)</dt><dd><tt>Sets the ID of the protocol element</tt></dd></dl>
<dl><dt><a name="Presence-setTo"><strong>setTo</strong></a>(self, val)</dt><dd><tt>Sets the 'to' element to the given <a href="#JID">JID</a>.</tt></dd></dl>
<dl><dt><a name="Presence-setType"><strong>setType</strong></a>(self, val)</dt><dd><tt>Sets the 'type' attribute of the protocol element</tt></dd></dl>
<dl><dt><a name="Presence-setX"><strong>setX</strong></a>(self, namespace, index<font color="#909090">=0</font>)</dt><dd><tt>Sets the name space of the x tag. It also creates the node<br>
if it doesn't already exist.</tt></dd></dl>
<dl><dt><a name="Presence-setXNode"><strong>setXNode</strong></a>(self, val<font color="#909090">=''</font>)</dt><dd><tt>Sets the x tag's data to the given textual value.</tt></dd></dl>
<dl><dt><a name="Presence-setXPayload"><strong>setXPayload</strong></a>(self, payload, namespace<font color="#909090">=''</font>)</dt><dd><tt>Sets the Child of an 'x' tag. Can be a <a href="xmlstream.html#Node">Node</a> instance or an<br>
XML document</tt></dd></dl>
<hr>
Methods inherited from <a href="xmlstream.html#Node">xmlstream.Node</a>:<br>
<dl><dt><a name="Presence-__str__"><strong>__str__</strong></a>(self)</dt></dl>
<dl><dt><a name="Presence-getAttr"><strong>getAttr</strong></a>(self, key)</dt><dd><tt>Get a value for the nodes named attribute.</tt></dd></dl>
<dl><dt><a name="Presence-getChildren"><strong>getChildren</strong></a>(self)</dt><dd><tt>Returns a nodes children</tt></dd></dl>
<dl><dt><a name="Presence-getData"><strong>getData</strong></a>(self)</dt><dd><tt>Return the nodes textual data</tt></dd></dl>
<dl><dt><a name="Presence-getDataAsParts"><strong>getDataAsParts</strong></a>(self)</dt><dd><tt>Return the node data as an array</tt></dd></dl>
<dl><dt><a name="Presence-getName"><strong>getName</strong></a>(self)</dt><dd><tt>Set the nodes tag name.</tt></dd></dl>
<dl><dt><a name="Presence-getNamespace"><strong>getNamespace</strong></a>(self)</dt><dd><tt>Returns the nodes namespace.</tt></dd></dl>
<dl><dt><a name="Presence-getParent"><strong>getParent</strong></a>(self)</dt><dd><tt>return the nodes parent node.</tt></dd></dl>
<dl><dt><a name="Presence-getTag"><strong>getTag</strong></a>(self, name, index<font color="#909090">=None</font>)</dt><dd><tt>Returns a child node with tag name. Returns None<br>
if not found.</tt></dd></dl>
<dl><dt><a name="Presence-getTags"><strong>getTags</strong></a>(self, name)</dt><dd><tt>Like getTag but returns a list with matching child nodes</tt></dd></dl>
<dl><dt><a name="Presence-insertData"><strong>insertData</strong></a>(self, data)</dt><dd><tt>Set the nodes textual data</tt></dd></dl>
<dl><dt><a name="Presence-insertNode"><strong>insertNode</strong></a>(self, node)</dt><dd><tt>Add a child node to the node</tt></dd></dl>
<dl><dt><a name="Presence-insertTag"><strong>insertTag</strong></a>(self, name<font color="#909090">=None</font>, attrs<font color="#909090">={}</font>, payload<font color="#909090">=[]</font>, node<font color="#909090">=None</font>)</dt><dd><tt>Add a child tag of name 'name' to the node.<br>
<br>
Returns the newly created node.</tt></dd></dl>
<dl><dt><a name="Presence-insertXML"><strong>insertXML</strong></a>(self, xml_str)</dt><dd><tt>Add raw xml as a child of the node</tt></dd></dl>
<dl><dt><a name="Presence-putAttr"><strong>putAttr</strong></a>(self, key, val)</dt><dd><tt>Add a name/value attribute to the node.</tt></dd></dl>
<dl><dt><a name="Presence-putData"><strong>putData</strong></a>(self, data)</dt><dd><tt>Set the nodes textual data</tt></dd></dl>
<dl><dt><a name="Presence-removeTag"><strong>removeTag</strong></a>(self, tag)</dt><dd><tt>Pops out specified child and returns it.</tt></dd></dl>
<dl><dt><a name="Presence-setName"><strong>setName</strong></a>(self, val)</dt><dd><tt>Set the nodes tag name.</tt></dd></dl>
<dl><dt><a name="Presence-setNamespace"><strong>setNamespace</strong></a>(self, namespace)</dt><dd><tt>Set the nodes namespace.</tt></dd></dl>
<dl><dt><a name="Presence-setParent"><strong>setParent</strong></a>(self, node)</dt><dd><tt>Set the nodes parent node.</tt></dd></dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="Protocol">class <strong>Protocol</strong></a>(<a href="xmlstream.html#Node">xmlstream.Node</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>Base class for jabber 'protocol elements' - messages, presences and iqs.<br>
Implements methods that are common to all these<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="Protocol-__init__"><strong>__init__</strong></a>(self, name<font color="#909090">=None</font>, to<font color="#909090">=None</font>, type<font color="#909090">=None</font>, attrs<font color="#909090">=None</font>, frm<font color="#909090">=None</font>, payload<font color="#909090">=[]</font>, node<font color="#909090">=None</font>)</dt></dl>
<dl><dt><a name="Protocol-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
<dl><dt><a name="Protocol-asNode"><strong>asNode</strong></a>(self)</dt><dd><tt>Back compartibility method</tt></dd></dl>
<dl><dt><a name="Protocol-fromTo"><strong>fromTo</strong></a>(self)</dt><dd><tt>Swaps the element's from and to attributes.<br>
Note that this is only useful for writing components; if you are<br>
writing a Jabber client you shouldn't use this, because the Jabber<br>
server will set the 'from' field automatically.</tt></dd></dl>
<dl><dt><a name="Protocol-getError"><strong>getError</strong></a>(self)</dt><dd><tt>Returns the error string, if any</tt></dd></dl>
<dl><dt><a name="Protocol-getErrorCode"><strong>getErrorCode</strong></a>(self)</dt><dd><tt>Returns the error code, if any</tt></dd></dl>
<dl><dt><a name="Protocol-getFrom"><strong>getFrom</strong></a>(self)</dt><dd><tt>Returns the 'from' attribute as a <a href="#JID">JID</a> object.</tt></dd></dl>
<dl><dt><a name="Protocol-getID"><strong>getID</strong></a>(self)</dt><dd><tt>Returns the 'id' attribute of the protocol element.</tt></dd></dl>
<dl><dt><a name="Protocol-getTo"><strong>getTo</strong></a>(self)</dt><dd><tt>Returns the 'to' attribute as a <a href="#JID">JID</a> object.</tt></dd></dl>
<dl><dt><a name="Protocol-getType"><strong>getType</strong></a>(self)</dt><dd><tt>Returns the 'type' attribute of the protocol element.</tt></dd></dl>
<dl><dt><a name="Protocol-getX"><strong>getX</strong></a>(self, index<font color="#909090">=0</font>)</dt><dd><tt>Returns the x namespace, optionally passed an index if there are<br>
multiple tags.</tt></dd></dl>
<dl><dt><a name="Protocol-getXNode"><strong>getXNode</strong></a>(self, val<font color="#909090">=None</font>)</dt><dd><tt>Returns the x <a href="xmlstream.html#Node">Node</a> instance. If there are multiple tags<br>
the first <a href="xmlstream.html#Node">Node</a> is returned. For multiple X nodes use getXNodes<br>
or pass an index integer value or namespace string to getXNode<br>
and if a match is found it will be returned.</tt></dd></dl>
<dl><dt><a name="Protocol-getXNodes"><strong>getXNodes</strong></a>(self)</dt><dd><tt>Returns a list of X nodes.</tt></dd></dl>
<dl><dt><a name="Protocol-getXPayload"><strong>getXPayload</strong></a>(self, val<font color="#909090">=None</font>)</dt><dd><tt>Returns the x tags' payload as a list of <a href="xmlstream.html#Node">Node</a> instances.</tt></dd></dl>
<dl><dt><a name="Protocol-setError"><strong>setError</strong></a>(self, val, code)</dt><dd><tt>Sets an error string and code</tt></dd></dl>
<dl><dt><a name="Protocol-setFrom"><strong>setFrom</strong></a>(self, val)</dt><dd><tt>Sets the 'from' element to the given <a href="#JID">JID</a>.</tt></dd></dl>
<dl><dt><a name="Protocol-setID"><strong>setID</strong></a>(self, val)</dt><dd><tt>Sets the ID of the protocol element</tt></dd></dl>
<dl><dt><a name="Protocol-setTo"><strong>setTo</strong></a>(self, val)</dt><dd><tt>Sets the 'to' element to the given <a href="#JID">JID</a>.</tt></dd></dl>
<dl><dt><a name="Protocol-setType"><strong>setType</strong></a>(self, val)</dt><dd><tt>Sets the 'type' attribute of the protocol element</tt></dd></dl>
<dl><dt><a name="Protocol-setX"><strong>setX</strong></a>(self, namespace, index<font color="#909090">=0</font>)</dt><dd><tt>Sets the name space of the x tag. It also creates the node<br>
if it doesn't already exist.</tt></dd></dl>
<dl><dt><a name="Protocol-setXNode"><strong>setXNode</strong></a>(self, val<font color="#909090">=''</font>)</dt><dd><tt>Sets the x tag's data to the given textual value.</tt></dd></dl>
<dl><dt><a name="Protocol-setXPayload"><strong>setXPayload</strong></a>(self, payload, namespace<font color="#909090">=''</font>)</dt><dd><tt>Sets the Child of an 'x' tag. Can be a <a href="xmlstream.html#Node">Node</a> instance or an<br>
XML document</tt></dd></dl>
<hr>
Methods inherited from <a href="xmlstream.html#Node">xmlstream.Node</a>:<br>
<dl><dt><a name="Protocol-__str__"><strong>__str__</strong></a>(self)</dt></dl>
<dl><dt><a name="Protocol-getAttr"><strong>getAttr</strong></a>(self, key)</dt><dd><tt>Get a value for the nodes named attribute.</tt></dd></dl>
<dl><dt><a name="Protocol-getChildren"><strong>getChildren</strong></a>(self)</dt><dd><tt>Returns a nodes children</tt></dd></dl>
<dl><dt><a name="Protocol-getData"><strong>getData</strong></a>(self)</dt><dd><tt>Return the nodes textual data</tt></dd></dl>
<dl><dt><a name="Protocol-getDataAsParts"><strong>getDataAsParts</strong></a>(self)</dt><dd><tt>Return the node data as an array</tt></dd></dl>
<dl><dt><a name="Protocol-getName"><strong>getName</strong></a>(self)</dt><dd><tt>Set the nodes tag name.</tt></dd></dl>
<dl><dt><a name="Protocol-getNamespace"><strong>getNamespace</strong></a>(self)</dt><dd><tt>Returns the nodes namespace.</tt></dd></dl>
<dl><dt><a name="Protocol-getParent"><strong>getParent</strong></a>(self)</dt><dd><tt>return the nodes parent node.</tt></dd></dl>
<dl><dt><a name="Protocol-getTag"><strong>getTag</strong></a>(self, name, index<font color="#909090">=None</font>)</dt><dd><tt>Returns a child node with tag name. Returns None<br>
if not found.</tt></dd></dl>
<dl><dt><a name="Protocol-getTags"><strong>getTags</strong></a>(self, name)</dt><dd><tt>Like getTag but returns a list with matching child nodes</tt></dd></dl>
<dl><dt><a name="Protocol-insertData"><strong>insertData</strong></a>(self, data)</dt><dd><tt>Set the nodes textual data</tt></dd></dl>
<dl><dt><a name="Protocol-insertNode"><strong>insertNode</strong></a>(self, node)</dt><dd><tt>Add a child node to the node</tt></dd></dl>
<dl><dt><a name="Protocol-insertTag"><strong>insertTag</strong></a>(self, name<font color="#909090">=None</font>, attrs<font color="#909090">={}</font>, payload<font color="#909090">=[]</font>, node<font color="#909090">=None</font>)</dt><dd><tt>Add a child tag of name 'name' to the node.<br>
<br>
Returns the newly created node.</tt></dd></dl>
<dl><dt><a name="Protocol-insertXML"><strong>insertXML</strong></a>(self, xml_str)</dt><dd><tt>Add raw xml as a child of the node</tt></dd></dl>
<dl><dt><a name="Protocol-putAttr"><strong>putAttr</strong></a>(self, key, val)</dt><dd><tt>Add a name/value attribute to the node.</tt></dd></dl>
<dl><dt><a name="Protocol-putData"><strong>putData</strong></a>(self, data)</dt><dd><tt>Set the nodes textual data</tt></dd></dl>
<dl><dt><a name="Protocol-removeTag"><strong>removeTag</strong></a>(self, tag)</dt><dd><tt>Pops out specified child and returns it.</tt></dd></dl>
<dl><dt><a name="Protocol-setName"><strong>setName</strong></a>(self, val)</dt><dd><tt>Set the nodes tag name.</tt></dd></dl>
<dl><dt><a name="Protocol-setNamespace"><strong>setNamespace</strong></a>(self, namespace)</dt><dd><tt>Set the nodes namespace.</tt></dd></dl>
<dl><dt><a name="Protocol-setParent"><strong>setParent</strong></a>(self, node)</dt><dd><tt>Set the nodes parent node.</tt></dd></dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="Roster">class <strong>Roster</strong></a></font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>A Class for simplifying roster management. Also tracks roster<br>
item availability.<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="Roster-__init__"><strong>__init__</strong></a>(self)</dt></dl>
<dl><dt><a name="Roster-getAsk"><strong>getAsk</strong></a>(self, jid)</dt><dd><tt>Returns the 'ask' status for a <a href="#Roster">Roster</a> item with the given jid.</tt></dd></dl>
<dl><dt><a name="Roster-getGroups"><strong>getGroups</strong></a>(self, jid)</dt><dd><tt>Returns the lsit of groups associated with the given roster item.</tt></dd></dl>
<dl><dt><a name="Roster-getJIDs"><strong>getJIDs</strong></a>(self)</dt><dd><tt>Returns a list of JIDs stored within the roster. Each entry in the<br>
list is a <a href="#JID">JID</a> object.</tt></dd></dl>
<dl><dt><a name="Roster-getName"><strong>getName</strong></a>(self, jid)</dt><dd><tt>Returns the 'name' for a <a href="#Roster">Roster</a> item with the given jid.</tt></dd></dl>
<dl><dt><a name="Roster-getOnline"><strong>getOnline</strong></a>(self, jid)</dt><dd><tt>Returns the 'online' status for a <a href="#Roster">Roster</a> item with the given jid.</tt></dd></dl>
<dl><dt><a name="Roster-getRaw"><strong>getRaw</strong></a>(self)</dt><dd><tt>Returns the internal data representation of the roster.</tt></dd></dl>
<dl><dt><a name="Roster-getShow"><strong>getShow</strong></a>(self, jid)</dt><dd><tt>Returns the 'show' value for a <a href="#Roster">Roster</a> item with the given jid.</tt></dd></dl>
<dl><dt><a name="Roster-getStatus"><strong>getStatus</strong></a>(self, jid)</dt><dd><tt>Returns the 'status' value for a <a href="#Roster">Roster</a> item with the given jid.</tt></dd></dl>
<dl><dt><a name="Roster-getSub"><strong>getSub</strong></a>(self, jid)</dt><dd><tt>Returns the 'subscription' status for a <a href="#Roster">Roster</a> item with the given<br>
jid.</tt></dd></dl>
<dl><dt><a name="Roster-getSummary"><strong>getSummary</strong></a>(self)</dt><dd><tt>Returns a summary of the roster's contents. The returned value is a<br>
dictionary mapping the basic (no resource) JIDs to their current<br>
availability status (online, offline, pending).</tt></dd></dl>
<dl><dt><a name="Roster-isOnline"><strong>isOnline</strong></a>(self, jid)</dt><dd><tt>Returns True if the given jid is online, False if not.</tt></dd></dl>
<dl><dt><a name="Roster-setListener"><strong>setListener</strong></a>(self, listener)</dt><dd><tt>Set a listener function to be called whenever the roster changes.<br>
<br>
The given function will be called whenever the contents of the<br>
roster changes in response to a received <presence> or <iq> packet.<br>
The listener function should be defined as follows:<br>
<br>
def listener(action, jid, info)<br>
<br>
'action' is a string indicating what type of change has occurred:<br>
<br>
"add" A new item has been added to the roster.<br>
"update" An existing roster item has been updated.<br>
"remove" A roster entry has been removed.<br>
<br>
'jid' is the Jabber ID (as a string) of the affected roster entry.<br>
<br>
'info' is a dictionary containing the information that has been<br>
added or updated for this roster entry. This dictionary may<br>
contain any combination of the following:<br>
<br>
"name" The associated name of this roster entry.<br>
"groups" A list of groups associated with this roster entry.<br>
"online" The roster entry's "online" value ("online",<br>
"offline" or "pending").<br>
"sub" The roster entry's subscription value ("none",<br>
"from", "to" or "both").<br>
"ask" The roster entry's ask value, if any (None,<br>
"subscribe", "unsubscribe").<br>
"show" The roster entry's show value, if any (None, "away",<br>
"chat", "dnd", "normal", "xa").<br>
"status" The roster entry's current 'status' value, if<br>
specified.</tt></dd></dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="Server">class <strong>Server</strong></a></font></td></tr>
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
<td width="100%"></td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="XDB">class <strong>XDB</strong></a>(<a href="jabber.html#Protocol">Protocol</a>)</font></td></tr>
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="jabber.html#XDB">XDB</a></dd>
<dd><a href="jabber.html#Protocol">Protocol</a></dd>
<dd><a href="xmlstream.html#Node">xmlstream.Node</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="XDB-__init__"><strong>__init__</strong></a>(self, attrs<font color="#909090">=None</font>, type<font color="#909090">=None</font>, frm<font color="#909090">=None</font>, to<font color="#909090">=None</font>, payload<font color="#909090">=[]</font>, node<font color="#909090">=None</font>)</dt></dl>
<hr>
Methods inherited from <a href="jabber.html#Protocol">Protocol</a>:<br>
<dl><dt><a name="XDB-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
<dl><dt><a name="XDB-asNode"><strong>asNode</strong></a>(self)</dt><dd><tt>Back compartibility method</tt></dd></dl>
<dl><dt><a name="XDB-fromTo"><strong>fromTo</strong></a>(self)</dt><dd><tt>Swaps the element's from and to attributes.<br>
Note that this is only useful for writing components; if you are<br>
writing a Jabber client you shouldn't use this, because the Jabber<br>
server will set the 'from' field automatically.</tt></dd></dl>
<dl><dt><a name="XDB-getError"><strong>getError</strong></a>(self)</dt><dd><tt>Returns the error string, if any</tt></dd></dl>
<dl><dt><a name="XDB-getErrorCode"><strong>getErrorCode</strong></a>(self)</dt><dd><tt>Returns the error code, if any</tt></dd></dl>
<dl><dt><a name="XDB-getFrom"><strong>getFrom</strong></a>(self)</dt><dd><tt>Returns the 'from' attribute as a <a href="#JID">JID</a> object.</tt></dd></dl>
<dl><dt><a name="XDB-getID"><strong>getID</strong></a>(self)</dt><dd><tt>Returns the 'id' attribute of the protocol element.</tt></dd></dl>
<dl><dt><a name="XDB-getTo"><strong>getTo</strong></a>(self)</dt><dd><tt>Returns the 'to' attribute as a <a href="#JID">JID</a> object.</tt></dd></dl>
<dl><dt><a name="XDB-getType"><strong>getType</strong></a>(self)</dt><dd><tt>Returns the 'type' attribute of the protocol element.</tt></dd></dl>
<dl><dt><a name="XDB-getX"><strong>getX</strong></a>(self, index<font color="#909090">=0</font>)</dt><dd><tt>Returns the x namespace, optionally passed an index if there are<br>
multiple tags.</tt></dd></dl>
<dl><dt><a name="XDB-getXNode"><strong>getXNode</strong></a>(self, val<font color="#909090">=None</font>)</dt><dd><tt>Returns the x <a href="xmlstream.html#Node">Node</a> instance. If there are multiple tags<br>
the first <a href="xmlstream.html#Node">Node</a> is returned. For multiple X nodes use getXNodes<br>
or pass an index integer value or namespace string to getXNode<br>
and if a match is found it will be returned.</tt></dd></dl>
<dl><dt><a name="XDB-getXNodes"><strong>getXNodes</strong></a>(self)</dt><dd><tt>Returns a list of X nodes.</tt></dd></dl>
<dl><dt><a name="XDB-getXPayload"><strong>getXPayload</strong></a>(self, val<font color="#909090">=None</font>)</dt><dd><tt>Returns the x tags' payload as a list of <a href="xmlstream.html#Node">Node</a> instances.</tt></dd></dl>
<dl><dt><a name="XDB-setError"><strong>setError</strong></a>(self, val, code)</dt><dd><tt>Sets an error string and code</tt></dd></dl>
<dl><dt><a name="XDB-setFrom"><strong>setFrom</strong></a>(self, val)</dt><dd><tt>Sets the 'from' element to the given <a href="#JID">JID</a>.</tt></dd></dl>
<dl><dt><a name="XDB-setID"><strong>setID</strong></a>(self, val)</dt><dd><tt>Sets the ID of the protocol element</tt></dd></dl>
<dl><dt><a name="XDB-setTo"><strong>setTo</strong></a>(self, val)</dt><dd><tt>Sets the 'to' element to the given <a href="#JID">JID</a>.</tt></dd></dl>
<dl><dt><a name="XDB-setType"><strong>setType</strong></a>(self, val)</dt><dd><tt>Sets the 'type' attribute of the protocol element</tt></dd></dl>
<dl><dt><a name="XDB-setX"><strong>setX</strong></a>(self, namespace, index<font color="#909090">=0</font>)</dt><dd><tt>Sets the name space of the x tag. It also creates the node<br>
if it doesn't already exist.</tt></dd></dl>
<dl><dt><a name="XDB-setXNode"><strong>setXNode</strong></a>(self, val<font color="#909090">=''</font>)</dt><dd><tt>Sets the x tag's data to the given textual value.</tt></dd></dl>
<dl><dt><a name="XDB-setXPayload"><strong>setXPayload</strong></a>(self, payload, namespace<font color="#909090">=''</font>)</dt><dd><tt>Sets the Child of an 'x' tag. Can be a <a href="xmlstream.html#Node">Node</a> instance or an<br>
XML document</tt></dd></dl>
<hr>
Methods inherited from <a href="xmlstream.html#Node">xmlstream.Node</a>:<br>
<dl><dt><a name="XDB-__str__"><strong>__str__</strong></a>(self)</dt></dl>
<dl><dt><a name="XDB-getAttr"><strong>getAttr</strong></a>(self, key)</dt><dd><tt>Get a value for the nodes named attribute.</tt></dd></dl>
<dl><dt><a name="XDB-getChildren"><strong>getChildren</strong></a>(self)</dt><dd><tt>Returns a nodes children</tt></dd></dl>
<dl><dt><a name="XDB-getData"><strong>getData</strong></a>(self)</dt><dd><tt>Return the nodes textual data</tt></dd></dl>
<dl><dt><a name="XDB-getDataAsParts"><strong>getDataAsParts</strong></a>(self)</dt><dd><tt>Return the node data as an array</tt></dd></dl>
<dl><dt><a name="XDB-getName"><strong>getName</strong></a>(self)</dt><dd><tt>Set the nodes tag name.</tt></dd></dl>
<dl><dt><a name="XDB-getNamespace"><strong>getNamespace</strong></a>(self)</dt><dd><tt>Returns the nodes namespace.</tt></dd></dl>
<dl><dt><a name="XDB-getParent"><strong>getParent</strong></a>(self)</dt><dd><tt>return the nodes parent node.</tt></dd></dl>
<dl><dt><a name="XDB-getTag"><strong>getTag</strong></a>(self, name, index<font color="#909090">=None</font>)</dt><dd><tt>Returns a child node with tag name. Returns None<br>
if not found.</tt></dd></dl>
<dl><dt><a name="XDB-getTags"><strong>getTags</strong></a>(self, name)</dt><dd><tt>Like getTag but returns a list with matching child nodes</tt></dd></dl>
<dl><dt><a name="XDB-insertData"><strong>insertData</strong></a>(self, data)</dt><dd><tt>Set the nodes textual data</tt></dd></dl>
<dl><dt><a name="XDB-insertNode"><strong>insertNode</strong></a>(self, node)</dt><dd><tt>Add a child node to the node</tt></dd></dl>
<dl><dt><a name="XDB-insertTag"><strong>insertTag</strong></a>(self, name<font color="#909090">=None</font>, attrs<font color="#909090">={}</font>, payload<font color="#909090">=[]</font>, node<font color="#909090">=None</font>)</dt><dd><tt>Add a child tag of name 'name' to the node.<br>
<br>
Returns the newly created node.</tt></dd></dl>
<dl><dt><a name="XDB-insertXML"><strong>insertXML</strong></a>(self, xml_str)</dt><dd><tt>Add raw xml as a child of the node</tt></dd></dl>
<dl><dt><a name="XDB-putAttr"><strong>putAttr</strong></a>(self, key, val)</dt><dd><tt>Add a name/value attribute to the node.</tt></dd></dl>
<dl><dt><a name="XDB-putData"><strong>putData</strong></a>(self, data)</dt><dd><tt>Set the nodes textual data</tt></dd></dl>
<dl><dt><a name="XDB-removeTag"><strong>removeTag</strong></a>(self, tag)</dt><dd><tt>Pops out specified child and returns it.</tt></dd></dl>
<dl><dt><a name="XDB-setName"><strong>setName</strong></a>(self, val)</dt><dd><tt>Set the nodes tag name.</tt></dd></dl>
<dl><dt><a name="XDB-setNamespace"><strong>setNamespace</strong></a>(self, namespace)</dt><dd><tt>Set the nodes namespace.</tt></dd></dl>
<dl><dt><a name="XDB-setParent"><strong>setParent</strong></a>(self, node)</dt><dd><tt>Set the nodes parent node.</tt></dd></dl>
</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#eeaa77">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
<tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td>
<td width="100%"><dl><dt><a name="-ustr"><strong>ustr</strong></a>(what)</dt><dd><tt>If sending object is already a unicode str, just<br>
return it, otherwise convert it using xmlstream.ENCODING</tt></dd></dl>
</td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td>
<td width="100%"><strong>DBG_ALWAYS</strong> = 'always'<br>
<strong>DBG_DISPATCH</strong> = 'jb-dispatch'<br>
<strong>DBG_INIT</strong> = 'init'<br>
<strong>DBG_NODE</strong> = 'jb-node'<br>
<strong>DBG_NODE_IQ</strong> = 'jb-node-iq'<br>
<strong>DBG_NODE_MESSAGE</strong> = 'jb-node-message'<br>
<strong>DBG_NODE_PRESENCE</strong> = 'jb-node-pressence'<br>
<strong>DBG_NODE_UNKNOWN</strong> = 'jb-node-unknown'<br>
<strong>False</strong> = 0<br>
<strong>NS_AGENT</strong> = 'jabber:iq:agent'<br>
<strong>NS_AGENTS</strong> = 'jabber:iq:agents'<br>
<strong>NS_AUTH</strong> = 'jabber:iq:auth'<br>
<strong>NS_BROWSE</strong> = 'jabber:iq:browse'<br>
<strong>NS_CLIENT</strong> = 'jabber:client'<br>
<strong>NS_COMP_ACCEPT</strong> = 'jabber:component:accept'<br>
<strong>NS_COMP_CONNECT</strong> = 'jabber:component:connect'<br>
<strong>NS_DELAY</strong> = 'jabber:x:delay'<br>
<strong>NS_LAST</strong> = 'jabber:iq:last'<br>
<strong>NS_OOB</strong> = 'jabber:iq:oob'<br>
<strong>NS_PASS</strong> = 'jabber:iq:pass'<br>
<strong>NS_PRIVACY</strong> = 'jabber:iq:privacy'<br>
<strong>NS_P_COMMANDS</strong> = 'http://jabber.org/protocol/commands'<br>
<strong>NS_P_DISC_INFO</strong> = 'http://jabber.org/protocol/disco#info'<br>
<strong>NS_P_DISC_ITEMS</strong> = 'http://jabber.org/protocol/disco#items'<br>
<strong>NS_P_MUC</strong> = 'http://jabber.org/protocol/muc'<br>
<strong>NS_REGISTER</strong> = 'jabber:iq:register'<br>
<strong>NS_ROSTER</strong> = 'jabber:iq:roster'<br>
<strong>NS_RPC</strong> = 'jabber:iq:rpc'<br>
<strong>NS_SERVER</strong> = 'jabber:server'<br>
<strong>NS_TIME</strong> = 'jabber:iq:time'<br>
<strong>NS_VCARD</strong> = 'vcard-temp'<br>
<strong>NS_VERSION</strong> = 'jabber:iq:version'<br>
<strong>NS_XDATA</strong> = 'jabber:x:data'<br>
<strong>NS_XENCRYPTED</strong> = 'jabber:x:encrypted'<br>
<strong>NS_XEVENT</strong> = 'jabber:x:event'<br>
<strong>NS_XEXPIRE</strong> = 'jabber:x:expire'<br>
<strong>NS_XROSTER</strong> = 'jabber:x:roster'<br>
<strong>NS_XSIGNED</strong> = 'jabber:x:signed'<br>
<strong>RS_ASK_SUBSCRIBE</strong> = 1<br>
<strong>RS_ASK_UNSUBSCRIBE</strong> = 0<br>
<strong>RS_EXT_OFFLINE</strong> = 1<br>
<strong>RS_EXT_ONLINE</strong> = 2<br>
<strong>RS_EXT_PENDING</strong> = 0<br>
<strong>RS_SUB_BOTH</strong> = 0<br>
<strong>RS_SUB_FROM</strong> = 1<br>
<strong>RS_SUB_TO</strong> = 2<br>
<strong>True</strong> = 1<br>
<strong>VERSION</strong> = '0.5'<br>
<strong>timeout</strong> = 300</td></tr></table>
</body></html>
|