diff options
Diffstat (limited to 'examples/dummyresource/resourcefactory.h')
-rw-r--r-- | examples/dummyresource/resourcefactory.h | 22 |
1 files changed, 4 insertions, 18 deletions
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 @@ | |||
19 | 19 | ||
20 | #pragma once | 20 | #pragma once |
21 | 21 | ||
22 | #include "common/resource.h" | 22 | #include "common/genericresource.h" |
23 | #include "async/src/async.h" | 23 | #include "async/src/async.h" |
24 | #include "common/messagequeue.h" | 24 | #include "common/messagequeue.h" |
25 | 25 | ||
@@ -28,26 +28,12 @@ | |||
28 | //TODO: a little ugly to have this in two places, once here and once in Q_PLUGIN_METADATA | 28 | //TODO: a little ugly to have this in two places, once here and once in Q_PLUGIN_METADATA |
29 | #define PLUGIN_NAME "org.kde.dummy" | 29 | #define PLUGIN_NAME "org.kde.dummy" |
30 | 30 | ||
31 | class Processor; | 31 | class DummyResource : public Akonadi2::GenericResource |
32 | |||
33 | class DummyResource : public Akonadi2::Resource | ||
34 | { | 32 | { |
35 | public: | 33 | public: |
36 | DummyResource(); | 34 | DummyResource(); |
37 | Async::Job<void> synchronizeWithSource(Akonadi2::Pipeline *pipeline); | 35 | Async::Job<void> synchronizeWithSource(Akonadi2::Pipeline *pipeline) Q_DECL_OVERRIDE; |
38 | Async::Job<void> processAllMessages(); | 36 | void configurePipeline(Akonadi2::Pipeline *pipeline) Q_DECL_OVERRIDE; |
39 | void processCommand(int commandId, const QByteArray &data, uint size, Akonadi2::Pipeline *pipeline); | ||
40 | void configurePipeline(Akonadi2::Pipeline *pipeline); | ||
41 | int error() const; | ||
42 | |||
43 | private: | ||
44 | void onProcessorError(int errorCode, const QString &errorMessage); | ||
45 | void enqueueCommand(MessageQueue &mq, int commandId, const QByteArray &data); | ||
46 | flatbuffers::FlatBufferBuilder m_fbb; | ||
47 | MessageQueue mUserQueue; | ||
48 | MessageQueue mSynchronizerQueue; | ||
49 | Processor *mProcessor; | ||
50 | int mError; | ||
51 | }; | 37 | }; |
52 | 38 | ||
53 | class DummyResourceFactory : public Akonadi2::ResourceFactory | 39 | class DummyResourceFactory : public Akonadi2::ResourceFactory |