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
|
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Akonadi.ResourceBase</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<link rel="stylesheet" type="text/css" href="../common/doxygen.css" />
<link rel="stylesheet" media="screen" type="text/css" title="KDE Colors" href="../common/kde.css" />
</head>
<body>
<div id="container">
<div id="header">
<div id="header_top">
<div>
<div>
<img alt ="" src="../common/top-kde.jpg"/>
KDE 4.9 PyKDE API Reference
</div>
</div>
</div>
<div id="header_bottom">
<div id="location">
<ul>
<li>KDE's Python API</li>
</ul>
</div>
<div id="menu">
<ul>
<li><a href="../modules.html">Overview</a></li>
<li><a href="http://techbase.kde.org/Development/Languages/Python">PyKDE Home</a></li>
<li><a href="http://kde.org/family/">Sitemap</a></li>
<li><a href="http://kde.org/contact/">Contact Us</a></li>
</ul>
</div>
</div>
</div>
<div id="body_wrapper">
<div id="body">
<div id="right">
<div class="content">
<div id="main">
<div class="clearer"> </div>
<h1>ResourceBase Class Reference</h1>
<code>from PyKDE4.akonadi import *</code>
<p>
Inherits: <a href="../akonadi/Akonadi.AgentBase.html">Akonadi.AgentBase</a> → QObject<br />
Namespace: <a href="../akonadi/Akonadi.html">Akonadi</a><br />
<h2>Detailed Description</h2>
<p>The base class for all Akonadi resources.
</p>
<p>
This class should be used as a base class by all resource agents,
because it encapsulates large parts of the protocol between
resource agent, agent manager and the Akonadi storage.
</p>
<p>
It provides many convenience methods to make implementing a
new Akonadi resource agent as simple as possible.
</p>
<p>
<h4>How to write a resource</h4>
</p>
<p>
The following provides an overview of what you need to do to implement
your own Akonadi resource. In the following, the term 'backend' refers
to the entity the resource connects with Akonadi, be it a single file
or a remote server.
</p>
<p>
To do: Complete this (online/offline state management)
</p>
<p>
<h5>Basic %Resource Framework</h5>
</p>
<p>
The following is needed to create a new resource:
- A new class deriving from Akonadi.ResourceBase, implementing at least all
pure-virtual methods, see below for further details.
- call init() in your main() function.
- a .desktop file similar to the following example
<pre class="fragment">
[Desktop Entry]
Encoding=UTF-8
Name=My Akonadi Resource
Type=AkonadiResource
Exec=akonadi_my_resource
Icon=my-icon
X-Akonadi-MimeTypes=<supported-mimetypes>
X-Akonadi-Capabilities=Resource
X-Akonadi-Identifier=akonadi_my_resource
</pre>
</p>
<p>
<h5>Handling PIM Items</h5>
</p>
<p>
To follow item changes in the backend, the following steps are necessary:
- Implement retrieveItems() to synchronize all items in the given
collection. If the backend supports incremental retrieval,
implementing support for that is recommended to improve performance.
- Convert the items provided by the backend to Akonadi items.
This typically happens either in retrieveItems() if you retrieved
the collection synchronously (not recommended for network backends) or
in the result slot of the asynchronous retrieval job.
Converting means to create Akonadi.Item objects for every retrieved
item. It's very important that every object has its remote identifier set.
- Call itemsRetrieved() or itemsRetrievedIncremental() respectively
with the item objects created above. The Akonadi storage will then be
updated automatically. Note that it is usually not necessary to manipulate
any item in the Akonadi storage manually.
</p>
<p>
To fetch item data on demand, the method retrieveItem() needs to be
reimplemented. Fetch the requested data there and call itemRetrieved()
with the result item.
</p>
<p>
To write local changes back to the backend, you need to re-implement
the following three methods:
- itemAdded()
- itemChanged()
- itemRemoved()
</p>
<p>
Note that these three functions don't get the full payload of the items by default,
you need to change the item fetch scope of the change recorder to fetch the full
payload. This can be expensive with big payloads, though.<br>
Once you have handled changes in these methods, call changeCommitted().
These methods are called whenever a local item related to this resource is
added, modified or deleted. They are only called if the resource is online, otherwise
all changes are recorded and replayed as soon the resource is online again.
</p>
<p>
<h5>Handling Collections</h5>
</p>
<p>
To follow collection changes in the backend, the following steps are necessary:
- Implement retrieveCollections() to retrieve collections from the backend.
If the backend supports incremental collections updates, implementing
support for that is recommended to improve performance.
- Convert the collections of the backend to Akonadi collections.
This typically happens either in retrieveCollections() if you retrieved
the collection synchronously (not recommended for network backends) or
in the result slot of the asynchronous retrieval job.
Converting means to create Akonadi.Collection objects for every retrieved
collection. It's very important that every object has its remote identifier
and its parent remote identifier set.
- Call collectionsRetrieved() or collectionsRetrievedIncremental() respectively
with the collection objects created above. The Akonadi storage will then be
updated automatically. Note that it is usually not necessary to manipulate
any collection in the Akonadi storage manually.
</p>
<p>
To write local collection changes back to the backend, you need to re-implement
the following three methods:
- collectionAdded()
- collectionChanged()
- collectionRemoved()
Once you have handled changes in these methods call changeCommitted().
These methods are called whenever a local collection related to this resource is
added, modified or deleted. They are only called if the resource is online, otherwise
all changes are recorded and replayed as soon the resource is online again.
</p>
<p>
To do: Convenience base class for collection-less resources
</p>
<table border="0" cellpadding="0" cellspacing="0"><tr><td colspan="2"><br><h2>Enumerations</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="#SchedulePriority">SchedulePriority</a> </td><td class="memItemRight" valign="bottom">{ Prepend, AfterChangeReplay, Append }</td></tr>
<tr><td colspan="2"><br><h2>Signals</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#attributesSynchronized">attributesSynchronized</a> (long collectionId)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#collectionTreeSynchronized">collectionTreeSynchronized</a> ()</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#nameChanged">nameChanged</a> (QString name)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#synchronized">synchronized</a> ()</td></tr>
<tr><td colspan="2"><br><h2>Methods</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#ResourceBase">__init__</a> (self, QString id)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#abortActivity">abortActivity</a> (self)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#cancelTask">cancelTask</a> (self)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#cancelTask">cancelTask</a> (self, QString error)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#changeCommitted">changeCommitted</a> (self, <a href="../akonadi/Akonadi.Item.html">Akonadi.Item</a> item)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#changeCommitted">changeCommitted</a> (self, <a href="../akonadi/Akonadi.Collection.html">Akonadi.Collection</a> collection)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#clearCache">clearCache</a> (self)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#collectionAttributesRetrieved">collectionAttributesRetrieved</a> (self, <a href="../akonadi/Akonadi.Collection.html">Akonadi.Collection</a> collection)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#collectionsRetrievalDone">collectionsRetrievalDone</a> (self)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#collectionsRetrieved">collectionsRetrieved</a> (self, [<a href="../akonadi/Akonadi.Collection.html">Akonadi.Collection</a>] collections)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#collectionsRetrievedIncremental">collectionsRetrievedIncremental</a> (self, [<a href="../akonadi/Akonadi.Collection.html">Akonadi.Collection</a>] changedCollections, [<a href="../akonadi/Akonadi.Collection.html">Akonadi.Collection</a>] removedCollections)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a href="../akonadi/Akonadi.Collection.html">Akonadi.Collection</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="#currentCollection">currentCollection</a> (self)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a href="../akonadi/Akonadi.Item.html">Akonadi.Item</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="#currentItem">currentItem</a> (self)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#deferTask">deferTask</a> (self)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#doSetOnline">doSetOnline</a> (self, bool online)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><a class="el" href="#dumpNotificationListToString">dumpNotificationListToString</a> (self)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><a class="el" href="#dumpSchedulerToString">dumpSchedulerToString</a> (self)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#invalidateCache">invalidateCache</a> (self, <a href="../akonadi/Akonadi.Collection.html">Akonadi.Collection</a> collection)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#itemRetrieved">itemRetrieved</a> (self, <a href="../akonadi/Akonadi.Item.html">Akonadi.Item</a> item)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#itemsRetrievalDone">itemsRetrievalDone</a> (self)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#itemsRetrieved">itemsRetrieved</a> (self, [<a href="../akonadi/Akonadi.Item.html">Akonadi.Item</a>] items)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#itemsRetrievedIncremental">itemsRetrievedIncremental</a> (self, [<a href="../akonadi/Akonadi.Item.html">Akonadi.Item</a>] changedItems, [<a href="../akonadi/Akonadi.Item.html">Akonadi.Item</a>] removedItems)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><a class="el" href="#name">name</a> (self)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#retrieveCollectionAttributes">retrieveCollectionAttributes</a> (self, <a href="../akonadi/Akonadi.Collection.html">Akonadi.Collection</a> collection)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#retrieveCollections">retrieveCollections</a> (self)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="#retrieveItem">retrieveItem</a> (self, <a href="../akonadi/Akonadi.Item.html">Akonadi.Item</a> item, QSet<QByteArray> parts)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#retrieveItems">retrieveItems</a> (self, <a href="../akonadi/Akonadi.Collection.html">Akonadi.Collection</a> collection)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#scheduleCustomTask">scheduleCustomTask</a> (self, QObject receiver, QString method, QVariant argument, <a href="../akonadi/Akonadi.ResourceBase.html#SchedulePriority">Akonadi.ResourceBase.SchedulePriority</a> priority)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#setAutomaticProgressReporting">setAutomaticProgressReporting</a> (self, bool enabled)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#setCollectionStreamingEnabled">setCollectionStreamingEnabled</a> (self, bool enable)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#setHierarchicalRemoteIdentifiersEnabled">setHierarchicalRemoteIdentifiersEnabled</a> (self, bool enable)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#setItemStreamingEnabled">setItemStreamingEnabled</a> (self, bool enable)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#setItemSynchronizationFetchScope">setItemSynchronizationFetchScope</a> (self, <a href="../akonadi/Akonadi.ItemFetchScope.html">Akonadi.ItemFetchScope</a> fetchScope)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#setItemTransactionMode">setItemTransactionMode</a> (self, <a href="../akonadi/Akonadi.ItemSync.html#TransactionMode">Akonadi.ItemSync.TransactionMode</a> mode)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#setName">setName</a> (self, QString name)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#setTotalItems">setTotalItems</a> (self, int amount)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#synchronize">synchronize</a> (self)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#synchronizeCollection">synchronizeCollection</a> (self, long id)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#synchronizeCollection">synchronizeCollection</a> (self, long id, bool recursive)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#synchronizeCollectionAttributes">synchronizeCollectionAttributes</a> (self, long id)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#synchronizeCollectionTree">synchronizeCollectionTree</a> (self)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#taskDone">taskDone</a> (self)</td></tr>
</table>
<hr><h2>Signal Documentation</h2><a class="anchor" name="attributesSynchronized"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> attributesSynchronized</td>
<td>(</td>
<td class="paramtype">long </td>
<td class="paramname"><em>collectionId</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Emitted when a collection attributes synchronization has been completed.
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>collectionId</em> </td><td> The identifier of the collection whose attributes got synchronized.
</td></tr> </table></dl>
<p> <dl class="since" compact><dt><b>Since:</b></dt><dd> 4.6
</dd></dl>
</p><dl compact><dt><b>Signal syntax:</b></dt><dd><code>QObject.connect(source, SIGNAL("attributesSynchronized(qlonglong)"), target_slot)</code></dd></dl></div></div><a class="anchor" name="collectionTreeSynchronized"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> collectionTreeSynchronized</td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname">)</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p>Emitted when a collection tree synchronization has been completed.
</p>
<p>
<dl class="since" compact><dt><b>Since:</b></dt><dd> 4.8
</dd></dl>
</p><dl compact><dt><b>Signal syntax:</b></dt><dd><code>QObject.connect(source, SIGNAL("collectionTreeSynchronized()"), target_slot)</code></dd></dl></div></div><a class="anchor" name="nameChanged"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> nameChanged</td>
<td>(</td>
<td class="paramtype">QString </td>
<td class="paramname"><em>name</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>This signal is emitted whenever the name of the resource has changed.
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>name</em> </td><td> The new name of the resource.
</td></tr>
</table></dl>
<p>
</p><dl compact><dt><b>Signal syntax:</b></dt><dd><code>QObject.connect(source, SIGNAL("nameChanged(const QString&)"), target_slot)</code></dd></dl></div></div><a class="anchor" name="synchronized"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> synchronized</td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname">)</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p>Emitted when a full synchronization has been completed.
</p><dl compact><dt><b>Signal syntax:</b></dt><dd><code>QObject.connect(source, SIGNAL("synchronized()"), target_slot)</code></dd></dl></div></div><hr><h2>Method Documentation</h2><a class="anchor" name="ResourceBase"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">__init__</td>
<td>(</td>
<td class="paramtype"> <em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">QString </td>
<td class="paramname"><em>id</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Creates a base resource.
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>id</em> </td><td> The instance id of the resource.
</td></tr>
</table></dl>
<p>
</p></div></div><a class="anchor" name="abortActivity"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> abortActivity</td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname"><em>self</em> )</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p>Abort any activity in progress in the backend. By default this method does nothing.
</p>
<p>
<dl class="since" compact><dt><b>Since:</b></dt><dd> 4.6
</dd></dl>
</p></div></div><a class="anchor" name="cancelTask"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> cancelTask</td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname"><em>self</em> )</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p>Stops the execution of the current task and continues with the next one.
Additionally an error message is emitted.
</p></div></div><a class="anchor" name="cancelTask"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> cancelTask</td>
<td>(</td>
<td class="paramtype"> <em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">QString </td>
<td class="paramname"><em>error</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Stops the execution of the current task and continues with the next one.
Additionally an error message is emitted.
</p></div></div><a class="anchor" name="changeCommitted"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> changeCommitted</td>
<td>(</td>
<td class="paramtype"> <em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="../akonadi/Akonadi.Item.html">Akonadi.Item</a> </td>
<td class="paramname"><em>item</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Call whenever you have successfully handled or ignored a collection
change notification.
</p>
<p>
This will update the remote identifier of <b>collection</b> if necessary,
as well as any other collection attributes.
This implicitly calls changeProcessed().
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>collection</em> </td><td> The collection which changes have been handled.
</td></tr>
</table></dl>
<p>
</p></div></div><a class="anchor" name="changeCommitted"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> changeCommitted</td>
<td>(</td>
<td class="paramtype"> <em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="../akonadi/Akonadi.Collection.html">Akonadi.Collection</a> </td>
<td class="paramname"><em>collection</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Call whenever you have successfully handled or ignored a collection
change notification.
</p>
<p>
This will update the remote identifier of <b>collection</b> if necessary,
as well as any other collection attributes.
This implicitly calls changeProcessed().
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>collection</em> </td><td> The collection which changes have been handled.
</td></tr>
</table></dl>
<p>
</p></div></div><a class="anchor" name="clearCache"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> clearCache</td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname"><em>self</em> )</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p>Call this method to remove all items and collections of the resource from the
server cache.
</p>
<p>
The method should not be used anymore
</p>
<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd> invalidateCache()
</dd></dl> <dl class="since" compact><dt><b>Since:</b></dt><dd> 4.3
</dd></dl>
</p></div></div><a class="anchor" name="collectionAttributesRetrieved"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> collectionAttributesRetrieved</td>
<td>(</td>
<td class="paramtype"> <em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="../akonadi/Akonadi.Collection.html">Akonadi.Collection</a> </td>
<td class="paramname"><em>collection</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Call this method from retrieveCollectionAttributes() once the result is available.
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>item</em> </td><td> The collection whose attributes got retrieved.
</td></tr> </table></dl>
<p> <dl class="since" compact><dt><b>Since:</b></dt><dd> 4.6
</dd></dl>
</p></div></div><a class="anchor" name="collectionsRetrievalDone"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> collectionsRetrievalDone</td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname"><em>self</em> )</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p>Call this method to indicate you finished synchronizing the collection tree.
</p>
<p>
This is not needed if you use the built in syncing without collection streaming
and call collectionsRetrieved() or collectionRetrievedIncremental() instead.
If collection streaming is enabled, call this method once all collections have been delivered
using collectionsRetrieved() or collectionsRetrievedIncremental().
</p></div></div><a class="anchor" name="collectionsRetrieved"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> collectionsRetrieved</td>
<td>(</td>
<td class="paramtype"> <em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">[<a href="../akonadi/Akonadi.Collection.html">Akonadi.Collection</a>] </td>
<td class="paramname"><em>collections</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Call this to supply the full folder tree retrieved from the remote server.
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>collections</em> </td><td> A list of collections.
</td></tr> </table></dl>
<p> <dl class="see" compact><dt><b>See also:</b></dt><dd> collectionsRetrievedIncremental()
</dd></dl>
</p></div></div><a class="anchor" name="collectionsRetrievedIncremental"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> collectionsRetrievedIncremental</td>
<td>(</td>
<td class="paramtype"> <em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">[<a href="../akonadi/Akonadi.Collection.html">Akonadi.Collection</a>] </td>
<td class="paramname"><em>changedCollections</em>, </td>
</tr>
<tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">[<a href="../akonadi/Akonadi.Collection.html">Akonadi.Collection</a>] </td>
<td class="paramname"><em>removedCollections</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Call this to supply incrementally retrieved collections from the remote server.
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>changedCollections</em> </td><td> Collections that have been added or changed.
<tr><td></td><td valign="top"><em>removedCollections</em> </td><td> Collections that have been deleted.
</td></tr> </table></dl>
<p> <dl class="see" compact><dt><b>See also:</b></dt><dd> collectionsRetrieved()
</dd></dl>
</p></div></div><a class="anchor" name="currentCollection"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"><a href="../akonadi/Akonadi.Collection.html">Akonadi.Collection</a> currentCollection</td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname"><em>self</em> )</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p>Returns the collection that is currently synchronized.
<dl class="note" compact><dt><b>Note:</b></dt><dd> Calling this method is only allowed during a collection synchronization task, that
is directly or indirectly from retrieveItems().
</dd></dl>
</p></div></div><a class="anchor" name="currentItem"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"><a href="../akonadi/Akonadi.Item.html">Akonadi.Item</a> currentItem</td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname"><em>self</em> )</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p>Returns the item that is currently retrieved.
<dl class="note" compact><dt><b>Note:</b></dt><dd> Calling this method is only allowed during fetching a single item, that
is directly or indirectly from retrieveItem().
</dd></dl>
</p></div></div><a class="anchor" name="deferTask"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> deferTask</td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname"><em>self</em> )</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p>Stops the execution of the current task and continues with the next one.
The current task will be tried again later.
</p>
<p>
This can be used to delay the task processing until the resource has reached a safe
state, e.g. login to a server succeeded.
</p>
<p>
<dl class="note" compact><dt><b>Note:</b></dt><dd> This does not change the order of tasks so if there is no task with higher priority
e.g. a custom task added with #Prepend the deferred task will be processed again.
</dd></dl> </p>
<p>
<dl class="since" compact><dt><b>Since:</b></dt><dd> 4.3
</dd></dl>
</p></div></div><a class="anchor" name="doSetOnline"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> doSetOnline</td>
<td>(</td>
<td class="paramtype"> <em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">bool </td>
<td class="paramname"><em>online</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Inherited from AgentBase.
</p></div></div><a class="anchor" name="dumpNotificationListToString"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">QString dumpNotificationListToString</td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname"><em>self</em> )</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p>Dump the contents of the current ChangeReplay
<dl class="since" compact><dt><b>Since:</b></dt><dd> 4.8.1
</dd></dl>
</p></div></div><a class="anchor" name="dumpSchedulerToString"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">QString dumpSchedulerToString</td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname"><em>self</em> )</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p>Dump the state of the scheduler
<dl class="since" compact><dt><b>Since:</b></dt><dd> 4.8.1
</dd></dl>
</p></div></div><a class="anchor" name="invalidateCache"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> invalidateCache</td>
<td>(</td>
<td class="paramtype"> <em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="../akonadi/Akonadi.Collection.html">Akonadi.Collection</a> </td>
<td class="paramname"><em>collection</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Call this method to invalidate all cached content in <b>collection.</b>
</p>
<p>
The method should be used when the backend indicated that the cached content
is no longer valid.
</p>
<p>
<dl class="since" compact><dt><b>Since:</b></dt><dd> 4.8
</dd></dl>
</p></div></div><a class="anchor" name="itemRetrieved"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> itemRetrieved</td>
<td>(</td>
<td class="paramtype"> <em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="../akonadi/Akonadi.Item.html">Akonadi.Item</a> </td>
<td class="paramname"><em>item</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Call this method from retrieveItem() once the result is available.
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>item</em> </td><td> The retrieved item.
</td></tr>
</table></dl>
<p>
</p></div></div><a class="anchor" name="itemsRetrievalDone"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> itemsRetrievalDone</td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname"><em>self</em> )</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p>Call this method to indicate you finished synchronizing the current collection.
</p>
<p>
This is not needed if you use the built in syncing without item streaming
and call itemsRetrieved() or itemsRetrievedIncremental() instead.
If item streaming is enabled, call this method once all items have been delivered
using itemsRetrieved() or itemsRetrievedIncremental().
<dl class="see" compact><dt><b>See also:</b></dt><dd> retrieveItems()
</dd></dl>
</p></div></div><a class="anchor" name="itemsRetrieved"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> itemsRetrieved</td>
<td>(</td>
<td class="paramtype"> <em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">[<a href="../akonadi/Akonadi.Item.html">Akonadi.Item</a>] </td>
<td class="paramname"><em>items</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Call this method to supply the full collection listing from the remote server.
</p>
<p>
If the remote server supports incremental listing, it's strongly
recommended to use itemsRetrievedIncremental() instead.
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>items</em> </td><td> A list of items.
</td></tr> </table></dl>
<p> <dl class="see" compact><dt><b>See also:</b></dt><dd> itemsRetrievedIncremental().
</dd></dl>
</p></div></div><a class="anchor" name="itemsRetrievedIncremental"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> itemsRetrievedIncremental</td>
<td>(</td>
<td class="paramtype"> <em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">[<a href="../akonadi/Akonadi.Item.html">Akonadi.Item</a>] </td>
<td class="paramname"><em>changedItems</em>, </td>
</tr>
<tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">[<a href="../akonadi/Akonadi.Item.html">Akonadi.Item</a>] </td>
<td class="paramname"><em>removedItems</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Call this method to supply incrementally retrieved items from the remote server.
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>changedItems</em> </td><td> Items changed in the backend.
<tr><td></td><td valign="top"><em>removedItems</em> </td><td> Items removed from the backend.
</td></tr>
</table></dl>
<p>
</p></div></div><a class="anchor" name="name"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">QString name</td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname"><em>self</em> )</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p>Returns the name of the resource.
</p></div></div><a class="anchor" name="retrieveCollectionAttributes"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> retrieveCollectionAttributes</td>
<td>(</td>
<td class="paramtype"> <em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="../akonadi/Akonadi.Collection.html">Akonadi.Collection</a> </td>
<td class="paramname"><em>collection</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Retrieve the attributes of a single collection from the backend. The
collection to retrieve attributes for is provided as <b>collection.</b>
Add the attributes parts and call collectionAttributesRetrieved()
when done.
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>collection</em> </td><td> The collection whose attributes should be retrieved.
</td></tr> </table></dl>
<p> <dl class="see" compact><dt><b>See also:</b></dt><dd> collectionAttributesRetrieved()
</dd></dl> <dl class="since" compact><dt><b>Since:</b></dt><dd> 4.6
</dd></dl>
</p></div></div><a class="anchor" name="retrieveCollections"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> retrieveCollections</td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname"><em>self</em> )</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><dl compact><dt><b>Abstract method:</b></dt><dd>This method is abstract and can be overridden but not called directly.</dd></dl><p>Retrieve the collection tree from the remote server and supply it via
collectionsRetrieved() or collectionsRetrievedIncremental().
<dl class="see" compact><dt><b>See also:</b></dt><dd> collectionsRetrieved(), collectionsRetrievedIncremental()
</dd></dl>
</p></div></div><a class="anchor" name="retrieveItem"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">bool retrieveItem</td>
<td>(</td>
<td class="paramtype"> <em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="../akonadi/Akonadi.Item.html">Akonadi.Item</a> </td>
<td class="paramname"><em>item</em>, </td>
</tr>
<tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">QSet<QByteArray> </td>
<td class="paramname"><em>parts</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><dl compact><dt><b>Abstract method:</b></dt><dd>This method is abstract and can be overridden but not called directly.</dd></dl><p>Retrieve a single item from the backend. The item to retrieve is provided as <b>item.</b>
Add the requested payload parts and call itemRetrieved() when done.
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>item</em> </td><td> The empty item whose payload should be retrieved. Use this object when delivering
the result instead of creating a new item to ensure conflict detection will work.
<tr><td></td><td valign="top"><em>parts</em> </td><td> The item parts that should be retrieved.
</td></tr> </table></dl>
<p> <dl class="return" compact><dt><b>Returns:</b></dt><dd> false if there is an immediate error when retrieving the item.
</dd></dl> <dl class="see" compact><dt><b>See also:</b></dt><dd> itemRetrieved()
</dd></dl>
</p></div></div><a class="anchor" name="retrieveItems"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> retrieveItems</td>
<td>(</td>
<td class="paramtype"> <em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="../akonadi/Akonadi.Collection.html">Akonadi.Collection</a> </td>
<td class="paramname"><em>collection</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><dl compact><dt><b>Abstract method:</b></dt><dd>This method is abstract and can be overridden but not called directly.</dd></dl><p>Retrieve all (new/changed) items in collection <b>collection.</b>
It is recommended to use incremental retrieval if the backend supports that
and provide the result by calling itemsRetrievedIncremental().
If incremental retrieval is not possible, provide the full listing by calling
itemsRetrieved( const Item.List& ).
In any case, ensure that all items have a correctly set remote identifier
to allow synchronizing with items already existing locally.
In case you don't want to use the built-in item syncing code, store the retrieved
items manually and call itemsRetrieved() once you are done.
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>collection</em> </td><td> The collection whose items to retrieve.
</td></tr> </table></dl>
<p> <dl class="see" compact><dt><b>See also:</b></dt><dd> itemsRetrieved( const Item.List& ), itemsRetrievedIncremental(), itemsRetrieved(), currentCollection()
</dd></dl>
</p></div></div><a class="anchor" name="scheduleCustomTask"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> scheduleCustomTask</td>
<td>(</td>
<td class="paramtype"> <em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">QObject </td>
<td class="paramname"><em>receiver</em>, </td>
</tr>
<tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">QString </td>
<td class="paramname"><em>method</em>, </td>
</tr>
<tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">QVariant </td>
<td class="paramname"><em>argument</em>, </td>
</tr>
<tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="../akonadi/Akonadi.ResourceBase.html#SchedulePriority">Akonadi.ResourceBase.SchedulePriority</a> </td>
<td class="paramname"><em>priority</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Schedules a custom task in the internal scheduler. It will be queued with
all other tasks such as change replays and retrieval requests and eventually
executed by calling the specified method. With the priority parameter the
time of execution of the Task can be influenced. <dl class="see" compact><dt><b>See also:</b></dt><dd> SchedulePriority
</dd></dl> </p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>receiver</em> </td><td> The object the slot should be called on.
<tr><td></td><td valign="top"><em>method</em> </td><td> The name of the method (and only the name, not signature, not SLOT(...) macro),
that should be called to execute this task. The method has to be a slot and take a QVariant as
argument.
<tr><td></td><td valign="top"><em>argument</em> </td><td> A QVariant argument passed to the method specified above. Use this to pass task
parameters.
<tr><td></td><td valign="top"><em>priority</em> </td><td> Priority of the task. Use this to influence the position in
the execution queue.
</td></tr> </table></dl>
<p> <dl class="since" compact><dt><b>Since:</b></dt><dd> 4.4
</dd></dl>
</p></div></div><a class="anchor" name="setAutomaticProgressReporting"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> setAutomaticProgressReporting</td>
<td>(</td>
<td class="paramtype"> <em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">bool </td>
<td class="paramname"><em>enabled</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Enable or disable automatic progress reporting. By default, it is enabled.
When enabled, the resource will automatically emit the signals percent() and status()
while syncing items or collections.
</p>
<p>
The automatic progress reporting is done on a per item / per collection basis, so if a
finer granularity is desired, automatic reporting should be disabled and the subclass should
emit the percent() and status() signals itself.
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>enabled</em> </td><td> Whether or not automatic emission of the signals is enabled.
</td></tr> </table></dl>
<p> <dl class="since" compact><dt><b>Since:</b></dt><dd> 4.7
</dd></dl>
</p></div></div><a class="anchor" name="setCollectionStreamingEnabled"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> setCollectionStreamingEnabled</td>
<td>(</td>
<td class="paramtype"> <em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">bool </td>
<td class="paramname"><em>enable</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Enable collection streaming, that is collections don't have to be delivered at once
as result of a retrieveCollections() call but can be delivered by multiple calls
to collectionsRetrieved() or collectionsRetrievedIncremental(). When all collections
have been retrieved, call collectionsRetrievalDone().
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>enable</em> </td><td> true if collection streaming should be enabled, false by default
</td></tr>
</table></dl>
<p>
</p></div></div><a class="anchor" name="setHierarchicalRemoteIdentifiersEnabled"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> setHierarchicalRemoteIdentifiersEnabled</td>
<td>(</td>
<td class="paramtype"> <em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">bool </td>
<td class="paramname"><em>enable</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Indicate the use of hierarchical remote identifiers.
</p>
<p>
This means that it is possible to have two different items with the same
remoteId in different Collections.
</p>
<p>
This should be called in the resource constructor as needed.
</p>
<p>
<dl class="since" compact><dt><b>Since:</b></dt><dd> 4.4
</dd></dl>
</p></div></div><a class="anchor" name="setItemStreamingEnabled"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> setItemStreamingEnabled</td>
<td>(</td>
<td class="paramtype"> <em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">bool </td>
<td class="paramname"><em>enable</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Enable item streaming.
Item streaming is disabled by default.
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>enable</em> </td><td> true if items are delivered in chunks rather in one big block.
</td></tr>
</table></dl>
<p>
</p></div></div><a class="anchor" name="setItemSynchronizationFetchScope"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> setItemSynchronizationFetchScope</td>
<td>(</td>
<td class="paramtype"> <em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="../akonadi/Akonadi.ItemFetchScope.html">Akonadi.ItemFetchScope</a> </td>
<td class="paramname"><em>fetchScope</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Set the fetch scope applied for item synchronization.
By default, the one set on the changeRecorder() is used. However, it can make sense
to specify a specialized fetch scope for synchronization to improve performance.
The rule of thumb is to remove anything from this fetch scope that does not provide
additional information regarding whether and item has changed or not. This is primarily
relevant for backends not supporting incremental retrieval.
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>fetchScope</em> </td><td> The fetch scope to use by the internal Akonadi.ItemSync instance.
</td></tr> </table></dl>
<p> <dl class="see" compact><dt><b>See also:</b></dt><dd> Akonadi.ItemSync
</dd></dl> <dl class="since" compact><dt><b>Since:</b></dt><dd> 4.6
</dd></dl>
</p></div></div><a class="anchor" name="setItemTransactionMode"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> setItemTransactionMode</td>
<td>(</td>
<td class="paramtype"> <em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="../akonadi/Akonadi.ItemSync.html#TransactionMode">Akonadi.ItemSync.TransactionMode</a> </td>
<td class="paramname"><em>mode</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Set transaction mode for item sync'ing.
<dl class="see" compact><dt><b>See also:</b></dt><dd> Akonadi.ItemSync.TransactionMode
</dd></dl> <dl class="since" compact><dt><b>Since:</b></dt><dd> 4.6
</dd></dl>
</p></div></div><a class="anchor" name="setName"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> setName</td>
<td>(</td>
<td class="paramtype"> <em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">QString </td>
<td class="paramname"><em>name</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>This method is used to set the name of the resource.
</p></div></div><a class="anchor" name="setTotalItems"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> setTotalItems</td>
<td>(</td>
<td class="paramtype"> <em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>amount</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Call this method when you want to use the itemsRetrieved() method
in streaming mode and indicate the amount of items that will arrive
that way.
<dl class="deprecated" compact><dt><b>Deprecated:</b></dt><dd> Use setItemStreamingEnabled( true ) + itemsRetrieved[Incremental]()
+ itemsRetrieved() instead.
</dd></dl>
</p></div></div><a class="anchor" name="synchronize"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> synchronize</td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname"><em>self</em> )</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p>This method is called whenever the resource should start synchronize all data.
</p></div></div><a class="anchor" name="synchronizeCollection"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> synchronizeCollection</td>
<td>(</td>
<td class="paramtype"> <em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">long </td>
<td class="paramname"><em>id</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>This method is called whenever the collection with the given <b>id</b>
shall be synchronized.
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>recursive</em> </td><td> if true, a recursive synchronization is done
</td></tr>
</table></dl>
<p>
</p></div></div><a class="anchor" name="synchronizeCollection"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> synchronizeCollection</td>
<td>(</td>
<td class="paramtype"> <em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">long </td>
<td class="paramname"><em>id</em>, </td>
</tr>
<tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">bool </td>
<td class="paramname"><em>recursive</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>This method is called whenever the collection with the given <b>id</b>
shall be synchronized.
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>recursive</em> </td><td> if true, a recursive synchronization is done
</td></tr>
</table></dl>
<p>
</p></div></div><a class="anchor" name="synchronizeCollectionAttributes"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> synchronizeCollectionAttributes</td>
<td>(</td>
<td class="paramtype"> <em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">long </td>
<td class="paramname"><em>id</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>This method is called whenever the collection with the given <b>id</b>
shall have its attributes synchronized.
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>id</em> </td><td> The id of the collection to synchronize
</td></tr> </table></dl>
<p> <dl class="since" compact><dt><b>Since:</b></dt><dd> 4.6
</dd></dl>
</p></div></div><a class="anchor" name="synchronizeCollectionTree"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> synchronizeCollectionTree</td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname"><em>self</em> )</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p>Refetches the Collections.
</p></div></div><a class="anchor" name="taskDone"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> taskDone</td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname"><em>self</em> )</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p>Indicate that the current task is finished. Use this method from the slot called via scheduleCustomTaks().
As with all the other callbacks, make sure to either call taskDone() or cancelTask()/deferTask() on all
exit paths, otherwise the resource will hang.
<dl class="since" compact><dt><b>Since:</b></dt><dd> 4.4
</dd></dl>
</p></div></div><hr><h2>Enumeration Documentation</h2><a class="anchor" name="SchedulePriority"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr><td class="memname">SchedulePriority</td>
</tr>
</table>
</div>
<div class="memdoc"><p>Describes the scheduling priority of a task that has been queued
for execution.
</p>
<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd> scheduleCustomTask
</dd></dl> <dl class="since" compact><dt><b>Since:</b></dt><dd> 4.4
</dd></dl>
</p><dl compact><dt><b>Enumerator: </b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0"><tr><td valign="top"><em>Prepend</em> </td><td><tr><td valign="top"><em>AfterChangeReplay</em> </td><td><tr><td valign="top"><em>Append</em> </td><td></table>
</dl>
</div></div><p>
</div>
</div>
</div>
<div id="left">
<div class="menu_box">
<div class="nav_list">
<ul>
<li><a href="../allclasses.html">Full Index</a></li>
</ul>
</div>
<a name="cp-menu" /><div class="menutitle"><div>
<h2 id="cp-menu-project">Modules</h2>
</div></div>
<div class="nav_list">
<ul><li><a href="../akonadi/index.html">akonadi</a></li>
<li><a href="../dnssd/index.html">dnssd</a></li>
<li><a href="../kdecore/index.html">kdecore</a></li>
<li><a href="../kdeui/index.html">kdeui</a></li>
<li><a href="../khtml/index.html">khtml</a></li>
<li><a href="../kio/index.html">kio</a></li>
<li><a href="../knewstuff/index.html">knewstuff</a></li>
<li><a href="../kparts/index.html">kparts</a></li>
<li><a href="../kutils/index.html">kutils</a></li>
<li><a href="../nepomuk/index.html">nepomuk</a></li>
<li><a href="../phonon/index.html">phonon</a></li>
<li><a href="../plasma/index.html">plasma</a></li>
<li><a href="../polkitqt/index.html">polkitqt</a></li>
<li><a href="../solid/index.html">solid</a></li>
<li><a href="../soprano/index.html">soprano</a></li>
</ul></div></div>
</div>
</div>
<div class="clearer"/>
</div>
<div id="end_body"></div>
</div>
<div id="footer"><div id="footer_text">
This documentation is maintained by <a href="mailto:simon@simonzone.com">Simon Edwards</a>.<br />
KDE<sup>®</sup> and <a href="../images/kde_gear_black.png">the K Desktop Environment<sup>®</sup> logo</a> are registered trademarks of <a href="http://ev.kde.org/" title="Homepage of the KDE non-profit Organization">KDE e.V.</a> |
<a href="http://www.kde.org/contact/impressum.php">Legal</a>
</div></div>
</body>
</html>
|