diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-09-08 21:08:54 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-09-08 21:08:54 +0200 |
commit | bbbda3fe9444eba6795a5490da0425cdf8f26361 (patch) | |
tree | d558ce110b71278df91135db5ac29c484e588ac5 /common/pipeline.h | |
parent | 43ae43bc74800473aadf9c5c807603cdf8516d36 (diff) | |
download | sink-bbbda3fe9444eba6795a5490da0425cdf8f26361.tar.gz sink-bbbda3fe9444eba6795a5490da0425cdf8f26361.zip |
Added support for mails to akonadi and the dummyresource.
Adding new types definitely needs to become easier.
Diffstat (limited to 'common/pipeline.h')
-rw-r--r-- | common/pipeline.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/common/pipeline.h b/common/pipeline.h index a3b3735..573af73 100644 --- a/common/pipeline.h +++ b/common/pipeline.h | |||
@@ -85,7 +85,7 @@ class AKONADI2COMMON_EXPORT PipelineState | |||
85 | { | 85 | { |
86 | public: | 86 | public: |
87 | PipelineState(); | 87 | PipelineState(); |
88 | PipelineState(Pipeline *pipeline, Pipeline::Type type, const QByteArray &key, const QVector<Preprocessor *> &filters, qint64 revision, const std::function<void()> &callback); | 88 | PipelineState(Pipeline *pipeline, Pipeline::Type type, const QByteArray &key, const QVector<Preprocessor *> &filters, qint64 revision, const std::function<void()> &callback, const QByteArray &bufferType); |
89 | PipelineState(const PipelineState &other); | 89 | PipelineState(const PipelineState &other); |
90 | ~PipelineState(); | 90 | ~PipelineState(); |
91 | 91 | ||
@@ -96,7 +96,7 @@ public: | |||
96 | QByteArray key() const; | 96 | QByteArray key() const; |
97 | Pipeline::Type type() const; | 97 | Pipeline::Type type() const; |
98 | qint64 revision() const; | 98 | qint64 revision() const; |
99 | //TODO expose command | 99 | QByteArray bufferType() const; |
100 | 100 | ||
101 | void step(); | 101 | void step(); |
102 | void processingCompleted(Preprocessor *filter); | 102 | void processingCompleted(Preprocessor *filter); |
@@ -114,7 +114,6 @@ public: | |||
114 | Preprocessor(); | 114 | Preprocessor(); |
115 | virtual ~Preprocessor(); | 115 | virtual ~Preprocessor(); |
116 | 116 | ||
117 | //TODO pass actual command as well, for changerecording | ||
118 | virtual void process(const PipelineState &state, Akonadi2::Storage::Transaction &transaction); | 117 | virtual void process(const PipelineState &state, Akonadi2::Storage::Transaction &transaction); |
119 | //TODO to record progress | 118 | //TODO to record progress |
120 | virtual QString id() const; | 119 | virtual QString id() const; |
@@ -142,7 +141,7 @@ public: | |||
142 | 141 | ||
143 | void process(const PipelineState &state, Akonadi2::Storage::Transaction &transaction) Q_DECL_OVERRIDE | 142 | void process(const PipelineState &state, Akonadi2::Storage::Transaction &transaction) Q_DECL_OVERRIDE |
144 | { | 143 | { |
145 | transaction.openDatabase().scan(state.key(), [this, &state, &transaction](const QByteArray &key, const QByteArray &value) -> bool { | 144 | transaction.openDatabase(state.bufferType() + ".main").scan(state.key(), [this, &state, &transaction](const QByteArray &key, const QByteArray &value) -> bool { |
146 | auto entity = Akonadi2::GetEntity(value); | 145 | auto entity = Akonadi2::GetEntity(value); |
147 | mFunction(state, *entity, transaction); | 146 | mFunction(state, *entity, transaction); |
148 | processingCompleted(state); | 147 | processingCompleted(state); |