Akonadi
collectionsync.cpp
75 for (QStringList::ConstIterator iter = rid.ridChain.constBegin(), end = rid.ridChain.constEnd(); iter != end; ++iter) {
164 QHash<RemoteId, Collection::List> &map = (removed ? removedRemoteCollections : remoteCollections);
166 if (parentCollection.remoteId() == akonadiRootCollection.remoteId() || parentCollection.id() == akonadiRootCollection.id()) {
203 for (auto localIter = localChildren.begin(), localEnd = localChildren.end(); localIter != localEnd;) {
209 for (auto removedIter = removedChildren.begin(), removedEnd = removedChildren.end(); removedIter != removedEnd;) {
237 for (auto remoteIter = remoteChildren.begin(), remoteEnd = remoteChildren.end(); !matched && remoteIter != remoteEnd;) {
248 QList<QPair<Collection /*local*/, Collection /*remote*/>> parents = {{localCollection, remoteCollection}};
260 std::bind(&CollectionSyncPrivate::matchLocalAndRemoteCollection, this, parent.first, std::placeholders::_1));
372 bool collectionNeedsUpdate(const Collection &localCollection, const Collection &remoteCollection) const
387 if (localCollection.parentCollection().remoteId() != remoteCollection.parentCollection().remoteId()) {
429 for (auto iter = remoteCollectionsToCreate.begin(), end = remoteCollectionsToCreate.end(); iter != end;) {
472 for (auto iter = remoteCollectionsToCreate.begin(), end = remoteCollectionsToCreate.end(); iter != end; ++iter) {
555 if (ignoreAttributeChanges(remote, remoteAttr->type()) && local.hasAttribute(remoteAttr->type())) {
575 if (remote.parentCollection().isValid() && remote.parentCollection().id() != local.parentCollection().id()) {
613 Q_ASSERT(!col.remoteId().isEmpty()); // empty RID -> stuff we haven't even written to the remote side yet
711 qCDebug(AKONADICORE_LOG) << "localListDone: " << localListDone << " deliveryDone: " << deliveryDone;
717 Job *parent = (currentTransaction ? static_cast<Job *>(currentTransaction) : static_cast<Job *>(q));
718 auto job = new CollectionFetchJob(akonadiRootCollection, CollectionFetchJob::Recursive, parent);
734 if (remoteCollectionsToCreate.isEmpty() && remoteCollectionsToUpdate.isEmpty() && localCollectionsToRemove.isEmpty()) {
805 void CollectionSync::setRemoteCollections(const Collection::List &changedCollections, const Collection::List &removedCollections)
void append(const T &value)
bool isEmpty() const const
Job that modifies a collection in the Akonadi storage.
Definition: collectionmodifyjob.h:67
void finished(KJob *job)
Attribute::List attributes() const
Returns a list of all attributes of the collection.
Definition: collection.cpp:166
void result(KJob *job)
QVector::iterator begin()
QDebug & nospace()
bool contains(const QString &str, Qt::CaseSensitivity cs) const const
void append(const T &value)
QDataStream & operator<<(QDataStream &out, const KDateTime &dateTime)
QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
KIOCORE_EXPORT MimetypeJob * mimetype(const QUrl &url, JobFlags flags=DefaultFlags)
void remove(int i)
Job that fetches collections from the Akonadi storage.
Definition: collectionfetchjob.h:39
void collectionsReceived(const Akonadi::Collection::List &collections)
This signal is emitted whenever the job has received collections.
Attribute * attribute(const QByteArray &name)
Returns the attribute of the given type name if available, 0 otherwise.
Definition: collection.cpp:176
virtual QByteArray serialized() const =0
Returns a QByteArray representation of the attribute which will be storaged.
T value(int i) const const
int size() const const
bool operator==(const Qt3DRender::QGraphicsApiFilter &reference, const Qt3DRender::QGraphicsApiFilter &sample)
QString i18n(const char *text, const TYPE &arg...)
CachePolicy cachePolicy() const
Returns the cache policy of the collection.
Definition: collection.cpp:336
bool isEmpty() const const
bool hasAttribute(const QByteArray &name) const
Returns true if the collection has an attribute of the given type name, false otherwise.
Definition: collection.cpp:161
const T & at(int i) const const
void push_back(QChar ch)
QueuedConnection
KCALENDARCORE_EXPORT uint qHash(const KCalendarCore::Period &key)
QAction * create(StandardGameAction id, const QObject *recvr, const char *slot, QObject *parent)
Job that moves a collection in the Akonadi storage to a new parent collection.
Definition: collectionmovejob.h:35
bool contains(const T &value) const const
Base class for jobs that need to run a sequence of sub-jobs in a transaction.
Definition: transactionsequence.h:54
Collection parentCollection() const
Returns the parent collection of this object.
Definition: collection.cpp:187
typedef ConstIterator
QVector::iterator end()
Job that deletes a collection in the Akonadi storage.
Definition: collectiondeletejob.h:50
KIOCORE_EXPORT CopyJob * move(const QList< QUrl > &src, const QUrl &dest, JobFlags flags=DefaultFlags)
QString fromLatin1(const char *str, int size)
QVector::iterator erase(QVector::iterator begin, QVector::iterator end)
QSet< QByteArray > keepLocalChanges() const
Returns what parts are only default values.
Definition: collection.cpp:419
int count(const T &value) const const
void setParentCollection(const Collection &parent)
Set the parent collection of this object.
Definition: collection.cpp:204
Job that creates a new collection in the Akonadi storage.
Definition: collectioncreatejob.h:39
int error() const
QFuture< void > map(Sequence &sequence, MapFunctor function)
const QList< QKeySequence > & end()
Bytes
Helper integration between Akonadi and Qt.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon May 8 2023 03:52:15 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon May 8 2023 03:52:15 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.