akonadi
itemsync.cpp
144 return mDeliveryDone && mCurrentBatchRemoteItems.isEmpty() && mRemoteItemQueue.isEmpty() && mRemovedRemoteItemQueue.isEmpty() && mCurrentBatchRemovedRemoteItems.isEmpty();
158 if (mTransactionMode == ItemSync::MultipleTransactions || (mDeliveryDone && mRemoteItemQueue.isEmpty())) {
179 // prevent double result emission, can happen since checkDone() is called from all over the place
213 kDebug() << "Received: " << items.count() << "In total: " << d->mTotalItemsProcessed << " Wanted: " << d->mTotalItems;
241 void ItemSync::setIncrementalSyncItems(const Item::List &changedItems, const Item::List &removedItems)
258 kDebug() << "Received: " << changedItems.count() << "Removed: " << removedItems.count() << "In total: " << d->mTotalItemsProcessed << " Wanted: " << d->mTotalItems;
302 QObject::connect(job, SIGNAL(itemsReceived(Akonadi::Item::List)), q, SLOT(slotItemsReceived(Akonadi::Item::List)));
334 return QString::fromLatin1("Collection %1 (%2)").arg(mSyncCollection.id()).arg(mSyncCollection.name());
449 kWarning() << "Creating/updating items from the akonadi database failed:" << job->errorString();
470 //we never want parallel transactions, single transaction just makes one big transaction, and multi transaction uses multiple transaction sequentially
475 QObject::connect(mCurrentTransaction, SIGNAL(result(KJob*)), q, SLOT(slotTransactionResult(KJob*)));
507 // propagate the first error we got but continue, we might still be fed with stuff from a resource
525 d->execute(); // end this in an ordered way, since we have an error set no real change will be done
virtual AKONADI_DEPRECATED bool updateItem(const Item &storedItem, Item &newItem)
Reimplement this method to customize the synchronization algorithm.
Definition: itemsync.cpp:281
void setFullSyncItems(const Item::List &items)
Sets the full item list for the collection.
Definition: itemsync.cpp:196
void setMergeMode(MergeMode mergeMode)
Set what merge method should be used for next ItemSync run.
Definition: itemsync.cpp:552
Use no transaction at all, provides highest responsiveness (might therefore feel faster even when act...
Definition: itemsync.h:173
void setIncrementalSyncItems(const Item::List &changedItems, const Item::List &removedItems)
Sets the item lists for incrementally syncing the collection.
Definition: itemsync.cpp:241
int batchSize() const
Minimum number of items required to start processing in streaming mode.
Definition: itemsync.cpp:534
void setDeliveryOption(DeliveryOptions options)
Sets the mechanisms by which the items should be fetched.
Definition: itemfetchjob.cpp:275
void setDisableAutomaticDeliveryDone(bool disable)
Disables the automatic completion of the item sync, based on the number of delivered items...
Definition: itemsync.cpp:235
void setAutomaticCommittingEnabled(bool enable)
Disable automatic committing.
Definition: transactionsequence.cpp:209
emitted via signal upon reception
Definition: itemfetchjob.h:224
Syncs between items known to a client (usually a resource) and the Akonadi storage.
Definition: itemsync.h:54
Job that deletes items from the Akonadi storage.
Definition: itemdeletejob.h:62
void setFetchScope(ItemFetchScope &fetchScope)
Sets the item fetch scope.
Definition: itemsync.cpp:265
void setFetchRemoteIdentification(bool retrieveRid)
Fetch remote identification for items.
Definition: itemfetchscope.cpp:177
void setIgnoreJobFailure(KJob *job)
Sets which job of the sequence might fail without rolling back the complete transaction.
Definition: transactionsequence.cpp:186
void deliveryDone()
Notify ItemSync that all remote items have been delivered.
Definition: itemsync.cpp:494
ItemSync(const Collection &collection, QObject *parent=0)
Creates a new item synchronizer.
Definition: itemsync.cpp:185
void commit()
Commits the transaction as soon as all pending sub-jobs finished successfully.
Definition: transactionsequence.cpp:154
Definition: itemfetchscope.h:29
Job that creates a new item in the Akonadi storage.
Definition: itemcreatejob.h:73
Specifies which parts of an item should be fetched from the Akonadi storage.
Definition: itemfetchscope.h:69
Use one transaction per chunk of delivered items, good compromise between the other two when using st...
Definition: itemsync.h:172
void setTotalItems(int amount)
Set the amount of items which you are going to return in total by using the setFullSyncItems()/setInc...
Definition: itemsync.cpp:220
Base class for jobs that need to run a sequence of sub-jobs in a transaction.
Definition: transactionsequence.h:69
void rollback()
Aborts the sync process and rolls back all not yet committed transactions.
Definition: itemsync.cpp:517
void setFetchModificationTime(bool retrieveMtime)
Enables retrieval of the item modification time.
Definition: itemfetchscope.cpp:137
Definition: job_p.h:31
QString fromLatin1(const char *str, int size)
void setTransactionMode(TransactionMode mode)
Set the transaction mode to use for this sync.
Definition: itemsync.cpp:528
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
QString arg(qlonglong a, int fieldWidth, int base, const QChar &fillChar) const
Only return the id of the merged/created item.
Definition: itemcreatejob.h:102
void setMerge(MergeOptions options)
Merge this item into an existing one if available.
Definition: itemcreatejob.cpp:248
void setCacheOnly(bool cacheOnly)
Sets whether payload data should be requested from remote sources or just from the local cache...
Definition: itemfetchscope.cpp:109
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:38:03 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:38:03 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.