summaryrefslogtreecommitdiffstats
path: root/examples/maildirresource/maildirresource.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/maildirresource/maildirresource.cpp')
-rw-r--r--examples/maildirresource/maildirresource.cpp16
1 files changed, 0 insertions, 16 deletions
diff --git a/examples/maildirresource/maildirresource.cpp b/examples/maildirresource/maildirresource.cpp
index fc77315..fed18c4 100644
--- a/examples/maildirresource/maildirresource.cpp
+++ b/examples/maildirresource/maildirresource.cpp
@@ -28,7 +28,6 @@
28#include "libmaildir/maildir.h" 28#include "libmaildir/maildir.h"
29#include "inspection.h" 29#include "inspection.h"
30#include "synchronizer.h" 30#include "synchronizer.h"
31#include "sourcewriteback.h"
32 31
33#include "facadefactory.h" 32#include "facadefactory.h"
34#include "adaptorfactoryregistry.h" 33#include "adaptorfactoryregistry.h"
@@ -383,18 +382,6 @@ public:
383 return job; 382 return job;
384 } 383 }
385 384
386public:
387 QString mMaildirPath;
388};
389
390class MaildirWriteback : public Sink::SourceWriteBack
391{
392public:
393 MaildirWriteback(const Sink::ResourceContext &resourceContext) : Sink::SourceWriteBack(resourceContext)
394 {
395
396 }
397
398 KAsync::Job<QByteArray> replay(const ApplicationDomain::Mail &mail, Sink::Operation operation, const QByteArray &oldRemoteId, const QList<QByteArray> &changedProperties) Q_DECL_OVERRIDE 385 KAsync::Job<QByteArray> replay(const ApplicationDomain::Mail &mail, Sink::Operation operation, const QByteArray &oldRemoteId, const QList<QByteArray> &changedProperties) Q_DECL_OVERRIDE
399 { 386 {
400 if (operation == Sink::Operation_Creation) { 387 if (operation == Sink::Operation_Creation) {
@@ -453,9 +440,6 @@ MaildirResource::MaildirResource(const Sink::ResourceContext &resourceContext, c
453 auto synchronizer = QSharedPointer<MaildirSynchronizer>::create(resourceContext); 440 auto synchronizer = QSharedPointer<MaildirSynchronizer>::create(resourceContext);
454 synchronizer->mMaildirPath = mMaildirPath; 441 synchronizer->mMaildirPath = mMaildirPath;
455 setupSynchronizer(synchronizer); 442 setupSynchronizer(synchronizer);
456 auto changereplay = QSharedPointer<MaildirWriteback>::create(resourceContext);
457 changereplay->mMaildirPath = mMaildirPath;
458 setupChangereplay(changereplay);
459 443
460 setupPreprocessors(ENTITY_TYPE_MAIL, QVector<Sink::Preprocessor*>() << new SpecialPurposeProcessor(resourceContext.resourceType, resourceContext.instanceId()) << new MaildirMimeMessageMover(resourceContext.instanceId(), mMaildirPath) << new MaildirMailPropertyExtractor); 444 setupPreprocessors(ENTITY_TYPE_MAIL, QVector<Sink::Preprocessor*>() << new SpecialPurposeProcessor(resourceContext.resourceType, resourceContext.instanceId()) << new MaildirMimeMessageMover(resourceContext.instanceId(), mMaildirPath) << new MaildirMailPropertyExtractor);
461 setupPreprocessors(ENTITY_TYPE_FOLDER, QVector<Sink::Preprocessor*>() << new FolderPreprocessor(mMaildirPath)); 445 setupPreprocessors(ENTITY_TYPE_FOLDER, QVector<Sink::Preprocessor*>() << new FolderPreprocessor(mMaildirPath));