diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-11-28 23:04:59 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-11-28 23:04:59 +0100 |
commit | 3e7b8fe8b8cca75b546c8cac2c09ce231861f21b (patch) | |
tree | 36cf1849ff30a986de56d931d60ce1c88660ec83 /common/genericresource.h | |
parent | 7fdcc36a1a352bb869020ade8a8aa697c3e8b80c (diff) | |
download | sink-3e7b8fe8b8cca75b546c8cac2c09ce231861f21b.tar.gz sink-3e7b8fe8b8cca75b546c8cac2c09ce231861f21b.zip |
Used the CommandProcessor as central place for all command processing.
Diffstat (limited to 'common/genericresource.h')
-rw-r--r-- | common/genericresource.h | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/common/genericresource.h b/common/genericresource.h index 0bc47da..cc73f50 100644 --- a/common/genericresource.h +++ b/common/genericresource.h | |||
@@ -47,9 +47,6 @@ public: | |||
47 | virtual ~GenericResource(); | 47 | virtual ~GenericResource(); |
48 | 48 | ||
49 | virtual void processCommand(int commandId, const QByteArray &data) Q_DECL_OVERRIDE; | 49 | virtual void processCommand(int commandId, const QByteArray &data) Q_DECL_OVERRIDE; |
50 | virtual void processFlushCommand(const QByteArray &data); | ||
51 | virtual KAsync::Job<void> synchronizeWithSource(const Sink::QueryBase &query) Q_DECL_OVERRIDE; | ||
52 | virtual KAsync::Job<void> processAllMessages() Q_DECL_OVERRIDE; | ||
53 | virtual void setLowerBoundRevision(qint64 revision) Q_DECL_OVERRIDE; | 50 | virtual void setLowerBoundRevision(qint64 revision) Q_DECL_OVERRIDE; |
54 | 51 | ||
55 | int error() const; | 52 | int error() const; |
@@ -57,6 +54,9 @@ public: | |||
57 | static void removeFromDisk(const QByteArray &instanceIdentifier); | 54 | static void removeFromDisk(const QByteArray &instanceIdentifier); |
58 | static qint64 diskUsage(const QByteArray &instanceIdentifier); | 55 | static qint64 diskUsage(const QByteArray &instanceIdentifier); |
59 | 56 | ||
57 | KAsync::Job<void> synchronizeWithSource(const Sink::QueryBase &query); | ||
58 | KAsync::Job<void> processAllMessages(); | ||
59 | |||
60 | private slots: | 60 | private slots: |
61 | void updateLowerBoundRevision(); | 61 | void updateLowerBoundRevision(); |
62 | 62 | ||
@@ -69,15 +69,12 @@ protected: | |||
69 | void enqueueCommand(MessageQueue &mq, int commandId, const QByteArray &data); | 69 | void enqueueCommand(MessageQueue &mq, int commandId, const QByteArray &data); |
70 | 70 | ||
71 | ResourceContext mResourceContext; | 71 | ResourceContext mResourceContext; |
72 | MessageQueue mUserQueue; | ||
73 | MessageQueue mSynchronizerQueue; | ||
74 | QSharedPointer<Pipeline> mPipeline; | ||
75 | 72 | ||
76 | private: | 73 | private: |
77 | std::unique_ptr<CommandProcessor> mProcessor; | 74 | QSharedPointer<Pipeline> mPipeline; |
75 | QSharedPointer<CommandProcessor> mProcessor; | ||
78 | QSharedPointer<Synchronizer> mSynchronizer; | 76 | QSharedPointer<Synchronizer> mSynchronizer; |
79 | int mError; | 77 | int mError; |
80 | QTimer mCommitQueueTimer; | ||
81 | qint64 mClientLowerBoundRevision; | 78 | qint64 mClientLowerBoundRevision; |
82 | }; | 79 | }; |
83 | 80 | ||