summaryrefslogtreecommitdiffstats
path: root/common/commandprocessor.h
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2016-11-28 19:33:01 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2016-11-28 19:33:01 +0100
commit938554f267193b652478fc12343819fa45d76034 (patch)
tree1c027f97f3209571740377f1d4b7e6721d8de777 /common/commandprocessor.h
parent885f185f55249a2e97e9c7c238f89a5d0d99d1df (diff)
downloadsink-938554f267193b652478fc12343819fa45d76034.tar.gz
sink-938554f267193b652478fc12343819fa45d76034.zip
Moved inspection commands to a separate inspector.
Diffstat (limited to 'common/commandprocessor.h')
-rw-r--r--common/commandprocessor.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/common/commandprocessor.h b/common/commandprocessor.h
index 51d845e..75ae37a 100644
--- a/common/commandprocessor.h
+++ b/common/commandprocessor.h
@@ -24,12 +24,16 @@
24#include <QObject> 24#include <QObject>
25#include <Async/Async> 25#include <Async/Async>
26#include <functional> 26#include <functional>
27
27#include "log.h" 28#include "log.h"
29#include "notification.h"
28 30
29class MessageQueue; 31class MessageQueue;
30 32
31namespace Sink { 33namespace Sink {
32 class Pipeline; 34 class Pipeline;
35 class Inspector;
36 class Synchronizer;
33 class QueuedCommand; 37 class QueuedCommand;
34 38
35/** 39/**
@@ -38,7 +42,6 @@ namespace Sink {
38class CommandProcessor : public QObject 42class CommandProcessor : public QObject
39{ 43{
40 Q_OBJECT 44 Q_OBJECT
41 typedef std::function<KAsync::Job<void>(void const *, size_t)> InspectionFunction;
42 typedef std::function<KAsync::Job<void>(void const *, size_t)> FlushFunction; 45 typedef std::function<KAsync::Job<void>(void const *, size_t)> FlushFunction;
43 SINK_DEBUG_AREA("commandprocessor") 46 SINK_DEBUG_AREA("commandprocessor")
44 47
@@ -47,11 +50,13 @@ public:
47 50
48 void setOldestUsedRevision(qint64 revision); 51 void setOldestUsedRevision(qint64 revision);
49 52
50 void setInspectionCommand(const InspectionFunction &f);
51
52 void setFlushCommand(const FlushFunction &f); 53 void setFlushCommand(const FlushFunction &f);
53 54
55 void setInspector(const QSharedPointer<Inspector> &inspector);
56 void setSynchronizer(const QSharedPointer<Synchronizer> &synchronizer);
57
54signals: 58signals:
59 void notify(Notification);
55 void error(int errorCode, const QString &errorMessage); 60 void error(int errorCode, const QString &errorMessage);
56 61
57private: 62private:
@@ -72,8 +77,9 @@ private:
72 bool mProcessingLock; 77 bool mProcessingLock;
73 // The lowest revision we no longer need 78 // The lowest revision we no longer need
74 qint64 mLowerBoundRevision; 79 qint64 mLowerBoundRevision;
75 InspectionFunction mInspect;
76 FlushFunction mFlush; 80 FlushFunction mFlush;
81 QSharedPointer<Synchronizer> mSynchronizer;
82 QSharedPointer<Inspector> mInspector;
77}; 83};
78 84
79}; 85};