From 47f105febcd17d6db1f998a99c6c6c423851573a Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Mon, 20 Apr 2015 22:22:19 +0200 Subject: Moved generic part of resource implementation to GenericResource --- examples/dummyresource/resourcefactory.h | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) (limited to 'examples/dummyresource/resourcefactory.h') diff --git a/examples/dummyresource/resourcefactory.h b/examples/dummyresource/resourcefactory.h index 3b99d5e..7b7783e 100644 --- a/examples/dummyresource/resourcefactory.h +++ b/examples/dummyresource/resourcefactory.h @@ -19,7 +19,7 @@ #pragma once -#include "common/resource.h" +#include "common/genericresource.h" #include "async/src/async.h" #include "common/messagequeue.h" @@ -28,26 +28,12 @@ //TODO: a little ugly to have this in two places, once here and once in Q_PLUGIN_METADATA #define PLUGIN_NAME "org.kde.dummy" -class Processor; - -class DummyResource : public Akonadi2::Resource +class DummyResource : public Akonadi2::GenericResource { public: DummyResource(); - Async::Job synchronizeWithSource(Akonadi2::Pipeline *pipeline); - Async::Job processAllMessages(); - void processCommand(int commandId, const QByteArray &data, uint size, Akonadi2::Pipeline *pipeline); - void configurePipeline(Akonadi2::Pipeline *pipeline); - int error() const; - -private: - void onProcessorError(int errorCode, const QString &errorMessage); - void enqueueCommand(MessageQueue &mq, int commandId, const QByteArray &data); - flatbuffers::FlatBufferBuilder m_fbb; - MessageQueue mUserQueue; - MessageQueue mSynchronizerQueue; - Processor *mProcessor; - int mError; + Async::Job synchronizeWithSource(Akonadi2::Pipeline *pipeline) Q_DECL_OVERRIDE; + void configurePipeline(Akonadi2::Pipeline *pipeline) Q_DECL_OVERRIDE; }; class DummyResourceFactory : public Akonadi2::ResourceFactory -- cgit v1.2.3