From 1d713d9e2dbaf27de9da087f9270d260dfc40c31 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Mon, 21 Nov 2016 23:13:38 +0100 Subject: Folded the SourceWriteback into the Synchronizer. By concentrating all communication to the source in one place we get rid of several oddities. * Quite a bit of duplication since both need access to the synchronizationStore and the source. * We currently have an akward locking in place because both classes access the ync store. This is not easier to resolve cleanly. * The live of resource implementers becomes easier. * An implementation could elect to not use changereplay and always do a full sync... (maybe?) --- examples/dummyresource/resourcefactory.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'examples/dummyresource') diff --git a/examples/dummyresource/resourcefactory.cpp b/examples/dummyresource/resourcefactory.cpp index 46e67f3..f5ab2d9 100644 --- a/examples/dummyresource/resourcefactory.cpp +++ b/examples/dummyresource/resourcefactory.cpp @@ -126,13 +126,14 @@ class DummySynchronizer : public Sink::Synchronizer { }); } + bool canReplay(const QByteArray &type, const QByteArray &key, const QByteArray &value) Q_DECL_OVERRIDE { return false; } + }; DummyResource::DummyResource(const Sink::ResourceContext &resourceContext, const QSharedPointer &pipeline) : Sink::GenericResource(resourceContext, pipeline) { setupSynchronizer(QSharedPointer::create(resourceContext)); - setupChangereplay(QSharedPointer::create(resourceContext)); setupPreprocessors(ENTITY_TYPE_MAIL, QVector() << new MailPropertyExtractor); setupPreprocessors(ENTITY_TYPE_FOLDER, -- cgit v1.2.3