Akonadi
resourcebase.h
125 * Once you have handled changes in collectionAdded() and collectionChanged(), call changeCommitted().
215 * Throttling can be used during item retrieval (retrieveItems(Akonadi::Collection)) in streaming mode.
216 * To throttle only deliver itemSyncBatchSize() items, and wait for this signal, then again deliver
219 * By always only providing the number of items required to process the batch, the items don't pile
265 * @see itemsRetrieved( const Item::List& ), itemsRetrievedIncremental(), itemsRetrieved(), currentCollection(), batchSize()
306 AKONADIAGENTBASE_DEPRECATED virtual bool retrieveItem(const Akonadi::Item &item, const QSet<QByteArray> &parts);
434 void collectionsRetrievedIncremental(const Collection::List &changedCollections, const Collection::List &removedCollections);
471 * Call this method to supply the full collection listing from the remote server. Items not present in the list
731 * that should be called to execute this task. The method has to be a slot and take a QVariant as
733 * @param argument A QVariant argument passed to the method specified above. Use this to pass task
739 void scheduleCustomTask(QObject *receiver, const char *method, const QVariant &argument, SchedulePriority priority = Append);
742 * Indicate that the current task is finished. Use this method from the slot called via scheduleCustomTaks().
void error(const QString &message)
This signal shall be used to report errors.
void setScheduleAttributeSyncBeforeItemSync(bool)
Set to true to schedule an attribute sync before every item sync.
Definition resourcebase.cpp:965
void setItemTransactionMode(ItemSync::TransactionMode mode)
Set transaction mode for item sync'ing.
Definition resourcebase.cpp:1472
void invalidateCache(const Collection &collection)
Call this method to invalidate all cached content in collection.
Definition resourcebase.cpp:1130
void setActivitiesEnabled(bool enable)
This method enables or not activities support.
Definition resourcebase.cpp:519
void collectionAttributesRetrieved(const Collection &collection)
Call this method from retrieveCollectionAttributes() once the result is available.
Definition resourcebase.cpp:608
int itemSyncBatchSize() const
Returns the batch size used during the item sync.
Definition resourcebase.cpp:953
void setItemSyncBatchSize(int batchSize)
Set the batch size used during the item sync.
Definition resourcebase.cpp:959
void setDisableAutomaticItemDeliveryDone(bool disable)
Disables the automatic completion of the item sync, based on the number of delivered items.
Definition resourcebase.cpp:1302
void synchronizeCollection(qint64 id)
This method is called whenever the collection with the given id shall be synchronized.
Definition resourcebase.cpp:1232
virtual void retrieveCollections()=0
Retrieve the collection tree from the remote server and supply it via collectionsRetrieved() or colle...
SchedulePriority
Describes the scheduling priority of a task that has been queued for execution.
Definition resourcebase.h:718
@ Prepend
The task will be executed as soon as the current task has finished.
Definition resourcebase.h:719
@ Append
The task will be executed after all tasks currently in the queue are finished.
Definition resourcebase.h:721
@ AfterChangeReplay
The task is scheduled after the last ChangeReplay task in the queue.
Definition resourcebase.h:720
void retrieveNextItemSyncBatch(int remainingBatchSize)
Emitted when the item synchronization processed the current batch and is ready for a new one.
void setKeepLocalCollectionChanges(const QSet< QByteArray > &parts)
Allows to keep locally changed collection parts during the collection sync.
Definition resourcebase.cpp:821
void attributesSynchronized(qlonglong collectionId)
Emitted when a collection attributes synchronization has been completed.
void itemsRetrievalDone()
Call this method to indicate you finished synchronizing the current collection.
Definition resourcebase.cpp:1109
virtual QString dumpResourceToString() const
Dump resource internals, for debugging.
Definition resourcebase.h:342
Item::List currentItems() const
Returns the items that are currently retrieved.
Definition resourcebase.cpp:1154
void setTotalItems(int amount)
Call this method when you want to use the itemsRetrieved() method in streaming mode and indicate the ...
Definition resourcebase.cpp:1292
void setActivities(const QStringList &activities)
This method sets list of activities.
Definition resourcebase.cpp:509
void setAutomaticProgressReporting(bool enabled)
Enable or disable automatic progress reporting.
Definition resourcebase.cpp:1484
void collectionsRetrieved(const Collection::List &collections)
Call this to supply the full folder tree retrieved from the remote server.
Definition resourcebase.cpp:755
void deferTask()
Suspends the execution of the current task and tries again to execute it.
Definition resourcebase.cpp:1217
void setItemStreamingEnabled(bool enable)
Enable item streaming, which is disabled by default.
Definition resourcebase.cpp:1311
void collectionsRetrievalDone()
Call this method to indicate you finished synchronizing the collection tree.
Definition resourcebase.cpp:805
void clearCache()
Call this method to remove all items and collections of the resource from the server cache.
Definition resourcebase.cpp:1124
void collectionsRetrievedIncremental(const Collection::List &changedCollections, const Collection::List &removedCollections)
Call this to supply incrementally retrieved collections from the remote server.
Definition resourcebase.cpp:772
void itemRetrieved(const Item &item)
Call this method from retrieveItem() once the result is available.
Definition resourcebase.cpp:575
virtual AKONADIAGENTBASE_DEPRECATED bool retrieveItem(const Akonadi::Item &item, const QSet< QByteArray > &parts)
Retrieve a single item from the backend.
Definition resourcebase.cpp:1434
void synchronize()
This method is called whenever the resource should start synchronize all data.
Definition resourcebase.cpp:494
void changeCommitted(const Item &item)
Resets the dirty flag of the given item and updates the remote id.
Definition resourcebase.cpp:678
void itemsRetrieved(const Item::List &items)
Call this method to supply the full collection listing from the remote server.
Definition resourcebase.cpp:1320
Collection currentCollection() const
Returns the collection that is currently synchronized.
Definition resourcebase.cpp:1136
void nameChanged(const QString &name)
This signal is emitted whenever the name of the resource has changed.
virtual void retrieveItems(const Akonadi::Collection &collection)=0
Retrieve all (new/changed) items in collection collection.
void cancelTask()
Stops the execution of the current task and continues with the next one.
Definition resourcebase.cpp:1173
void itemsRetrievedIncremental(const Item::List &changedItems, const Item::List &removedItems)
Call this method to supply incrementally retrieved items from the remote server.
Definition resourcebase.cpp:1347
void setItemMergingMode(ItemSync::MergeMode mode)
Set merge mode for item sync'ing.
Definition resourcebase.cpp:1478
void setHierarchicalRemoteIdentifiersEnabled(bool enable)
Indicate the use of hierarchical remote identifiers.
Definition resourcebase.cpp:1405
virtual void retrieveCollectionAttributes(const Akonadi::Collection &collection)
Retrieve the attributes of a single collection from the backend.
Definition resourcebase.cpp:1423
void collectionTreeSynchronized()
Emitted when a collection tree synchronization has been completed.
void setName(const QString &name)
This method is used to set the name of the resource.
Definition resourcebase.cpp:499
void setCollectionStreamingEnabled(bool enable)
Enable collection streaming, that is collections don't have to be delivered at once as result of a re...
Definition resourcebase.cpp:789
void changesCommitted(const Item::List &items)
Resets the dirty flag of all given items and updates remote ids.
Definition resourcebase.cpp:683
virtual void abortActivity()
Abort any activity in progress in the backend.
Definition resourcebase.cpp:1468
void synchronizeCollectionAttributes(qint64 id)
This method is called whenever the collection with the given id shall have its attributes synchronize...
Definition resourcebase.cpp:1271
AKONADIAGENTBASE_DEPRECATED Item currentItem() const
Returns the item that is currently retrieved.
Definition resourcebase.cpp:1145
Helper integration between Akonadi and Qt.
Q_OBJECTQ_OBJECT
Q_SIGNALSQ_SIGNALS
Q_SLOTSQ_SLOTS
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 31 2025 12:07:52 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 31 2025 12:07:52 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.