diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2014-12-21 22:20:31 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2014-12-21 22:20:31 +0100 |
commit | d80ff84c28c0be626c1df4528741cddf5a55f547 (patch) | |
tree | dfa1a3771f52970bfaf7b9e56d8675aeabfc65ef /common/pipeline.cpp | |
parent | d21aa4e35fb96fa3b07888f710cbc3440af8bdd3 (diff) | |
download | sink-d80ff84c28c0be626c1df4528741cddf5a55f547.tar.gz sink-d80ff84c28c0be626c1df4528741cddf5a55f547.zip |
Write-Read loop from clientside.
It's a huge hack but starts to show results.
Most urgently we need:
* reliable command results
* the 3 buffers instead of the 1
* A way to implement storage as preprocessor (or a place to impelement it after the preprocessors).
Diffstat (limited to 'common/pipeline.cpp')
-rw-r--r-- | common/pipeline.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/common/pipeline.cpp b/common/pipeline.cpp index cf508c5..739909d 100644 --- a/common/pipeline.cpp +++ b/common/pipeline.cpp | |||
@@ -31,7 +31,7 @@ class Pipeline::Private | |||
31 | { | 31 | { |
32 | public: | 32 | public: |
33 | Private(const QString &resourceName) | 33 | Private(const QString &resourceName) |
34 | : storage(QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + "/akonadi2/storage", resourceName), | 34 | : storage(QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + "/akonadi2/storage", resourceName, Storage::ReadWrite), |
35 | stepScheduled(false) | 35 | stepScheduled(false) |
36 | { | 36 | { |
37 | } | 37 | } |
@@ -71,6 +71,11 @@ void Pipeline::null() | |||
71 | 71 | ||
72 | void Pipeline::newEntity(const QByteArray &key, flatbuffers::FlatBufferBuilder &entity) | 72 | void Pipeline::newEntity(const QByteArray &key, flatbuffers::FlatBufferBuilder &entity) |
73 | { | 73 | { |
74 | const qint64 newRevision = storage().maxRevision() + 1; | ||
75 | //FIXME this should go into a preprocessor | ||
76 | storage().write(key, key.size(), reinterpret_cast<char*>(entity.GetBufferPointer()), entity.GetSize()); | ||
77 | storage().setMaxRevision(newRevision); | ||
78 | |||
74 | PipelineState state(this, NewPipeline, key, d->newPipeline); | 79 | PipelineState state(this, NewPipeline, key, d->newPipeline); |
75 | d->activePipelines << state; | 80 | d->activePipelines << state; |
76 | state.step(); | 81 | state.step(); |