akonadi
collectionsync.cpp
225 // the restriction on empty RIDs can possibly removed, but for now I only understand the implication for this case
245 if (collection.id() == Collection::root().id() || collection.remoteId() == Collection::root().remoteId()) {
249 if (collection.parentCollection().id() < 0 && collection.parentCollection().remoteId().isEmpty()) {
253 if (collection.parentCollection().id() == Collection::root().id() || collection.parentCollection().remoteId() == Collection::root().remoteId()) {
264 // we would get an error if we don't do this anyway, as we'd try to create two sibling nodes with the same name
266 kDebug() << "Recovering collection with lost RID:" << collection << recoveredLocalNode->collection;
290 if (collection.parentCollection().id() < 0 && collection.parentCollection().remoteId().isEmpty()) {
365 q->setErrorText(i18n("Remote collection without root-terminated ancestor chain provided, resource is broken."));
373 for (QHash<LocalNode *, QList<RemoteNode *> >::const_iterator it = pendingCreations.constBegin();
400 if (localCollection.parentCollection().remoteId() != remoteCollection.parentCollection().remoteId()) {
444 if (keepLocalChanges.contains(remoteAttr->type()) && localNode->collection.hasAttribute(remoteAttr->type())) {
470 CollectionMoveJob *move = new CollectionMoveJob(upd, newParent->collection, currentTransaction);
598 Q_ASSERT(!col.remoteId().isEmpty()); // empty RID -> stuff we haven't even written to the remote side yet
633 // Since there are differences with the remote collections we need to sync. Start a transaction here.
658 kDebug() << Q_FUNC_INFO << "localListDone: " << localListDone << " deliveryDone: " << deliveryDone;
799 void CollectionSync::setRemoteCollections(const Collection::List &changedCollections, const Collection::List &removedCollections)
817 Job *parent = (d->currentTransaction ? static_cast<Job *>(d->currentTransaction) : static_cast<Job *>(this));
818 CollectionFetchJob *job = new CollectionFetchJob(Collection::root(), CollectionFetchJob::Recursive, parent);
void retrievalDone()
Indicate that all collections have been retrieved in streaming mode.
Definition: collectionsync.cpp:832
Job that modifies a collection in the Akonadi storage.
Definition: collectionmodifyjob.h:82
CollectionFetchScope & fetchScope()
Returns the collection fetch scope.
Definition: collectionfetchjob.cpp:439
Collection parentCollection() const
Returns the parent collection of this object.
Definition: entity.cpp:177
CollectionSync(const QString &resourceId, QObject *parent=0)
Creates a new collection synchronzier.
Definition: collectionsync.cpp:773
void setKeepLocalChanges(const QSet< QByteArray > &parts)
Allows to specify parts of the collection that should not be changed if locally available.
Definition: collectionsync.cpp:850
void setHierarchicalRemoteIds(bool hierarchical)
Indicate whether the resource supplies collections with hierarchical or global remote identifiers.
Definition: collectionsync.cpp:838
void setRemoteCollections(const Collection::List &remoteCollections)
Sets the result of a full remote collection listing.
Definition: collectionsync.cpp:786
Attribute::List attributes() const
Returns a list of all attributes of the entity.
Definition: entity.cpp:153
Job that fetches collections from the Akonadi storage.
Definition: collectionfetchjob.h:53
virtual QByteArray serialized() const =0
Returns a QByteArray representation of the attribute which will be storaged.
CachePolicy cachePolicy() const
Returns the cache policy of the collection.
Definition: collection.cpp:249
Attribute * attribute(const QByteArray &name) const
Returns the attribute of the given type name if available, 0 otherwise.
Definition: entity.cpp:167
void setResource(const QString &resource)
Sets a resource filter, that is only collections owned by the specified resource are retrieved.
Definition: collectionfetchscope.cpp:118
Job that moves a collection in the Akonadi storage to a new parent collection.
Definition: collectionmovejob.h:50
Base class for jobs that need to run a sequence of sub-jobs in a transaction.
Definition: transactionsequence.h:69
void setParentCollection(const Collection &parent)
Set the parent collection of this object.
Definition: entity.cpp:194
Job that deletes a collection in the Akonadi storage.
Definition: collectiondeletejob.h:63
QStringList contentMimeTypes() const
Returns a list of possible content mimetypes, e.g.
Definition: collection.cpp:115
void setStreamingEnabled(bool streaming)
Enables streaming, that is not all collections are delivered at once.
Definition: collectionsync.cpp:827
Job that creates a new collection in the Akonadi storage.
Definition: collectioncreatejob.h:52
void setAncestorRetrieval(AncestorRetrieval ancestorDepth)
Sets how many levels of ancestor collections should be included in the retrieval.
Definition: collectionfetchscope.cpp:138
AKONADI_DEPRECATED void setIncludeUnsubscribed(bool include)
Sets whether unsubscribed collections should be included in the collection listing.
Definition: collectionfetchscope.cpp:94
void doStart()
This method must be reimplemented in the concrete jobs.
Definition: collectionsync.cpp:814
Definition: collectionsync_p.h:53
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Wed Jan 29 2020 00:00:00 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Wed Jan 29 2020 00:00:00 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.