From 84957496800a862aa88bb2e88da0a9b2c4e19dc2 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Wed, 30 Dec 2015 10:34:57 +0100 Subject: Moved all generic synchronization code to the base class. --- examples/maildirresource/maildirresource.h | 35 ------------------------------ 1 file changed, 35 deletions(-) (limited to 'examples/maildirresource/maildirresource.h') diff --git a/examples/maildirresource/maildirresource.h b/examples/maildirresource/maildirresource.h index 9c205c8..48eac67 100644 --- a/examples/maildirresource/maildirresource.h +++ b/examples/maildirresource/maildirresource.h @@ -40,41 +40,6 @@ public: private: KAsync::Job replay(const QByteArray &type, const QByteArray &key, const QByteArray &value) Q_DECL_OVERRIDE; - /** - * Records a localId to remoteId mapping - */ - void recordRemoteId(const QByteArray &bufferType, const QByteArray &localId, const QByteArray &remoteId, Akonadi2::Storage::Transaction &transaction); - void removeRemoteId(const QByteArray &bufferType, const QByteArray &localId, const QByteArray &remoteId, Akonadi2::Storage::Transaction &transaction); - - /** - * Tries to find a local id for the remote id, and creates a new local id otherwise. - * - * The new local id is recorded in the local to remote id mapping. - */ - QString resolveRemoteId(const QByteArray &type, const QString &remoteId, Akonadi2::Storage::Transaction &transaction); - - /** - * Tries to find a remote id for a local id. - * - * This can fail if the entity hasn't been written back to the server yet. - */ - QString resolveLocalId(const QByteArray &bufferType, const QByteArray &localId, Akonadi2::Storage::Transaction &transaction); - - /** - * An algorithm to remove entities that are no longer existing. - * - * This algorithm calls @param exists for every entity of type @param type, with its remoteId. For every entity where @param exists returns false, - * an entity delete command is enqueued. - */ - void scanForRemovals(Akonadi2::Storage::Transaction &transaction, Akonadi2::Storage::Transaction &synchronizationTransaction, const QByteArray &bufferType, std::function exists); - - /** - * An algorithm to create or modify the entity. - * - * Depending on whether the entity is locally available, or has changed. - */ - void createOrModify(Akonadi2::Storage::Transaction &transaction, Akonadi2::Storage::Transaction &synchronizationTransaction, DomainTypeAdaptorFactoryInterface &adaptorFactory, const QByteArray &bufferType, const QByteArray &remoteId, const Akonadi2::ApplicationDomain::ApplicationDomainType &entity); - void synchronizeFolders(Akonadi2::Storage::Transaction &transaction, Akonadi2::Storage::Transaction &synchronizationTransaction); void synchronizeMails(Akonadi2::Storage::Transaction &transaction, Akonadi2::Storage::Transaction &synchronizationTransaction, const QString &folder); QStringList listAvailableFolders(); -- cgit v1.2.3