summaryrefslogtreecommitdiffstats
path: root/common/pipeline.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'common/pipeline.cpp')
-rw-r--r--common/pipeline.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/common/pipeline.cpp b/common/pipeline.cpp
index e2f23ed..21cf1c5 100644
--- a/common/pipeline.cpp
+++ b/common/pipeline.cpp
@@ -29,7 +29,6 @@
29#include "metadata_generated.h" 29#include "metadata_generated.h"
30#include "createentity_generated.h" 30#include "createentity_generated.h"
31#include "entitybuffer.h" 31#include "entitybuffer.h"
32#include "async/src/async.h"
33#include "log.h" 32#include "log.h"
34 33
35namespace Akonadi2 34namespace Akonadi2
@@ -94,7 +93,7 @@ void Pipeline::null()
94 // state.step(); 93 // state.step();
95} 94}
96 95
97Async::Job<void> Pipeline::newEntity(void const *command, size_t size) 96KAsync::Job<void> Pipeline::newEntity(void const *command, size_t size)
98{ 97{
99 Log() << "Pipeline: New Entity"; 98 Log() << "Pipeline: New Entity";
100 99
@@ -107,7 +106,7 @@ Async::Job<void> Pipeline::newEntity(void const *command, size_t size)
107 flatbuffers::Verifier verifyer(reinterpret_cast<const uint8_t *>(command), size); 106 flatbuffers::Verifier verifyer(reinterpret_cast<const uint8_t *>(command), size);
108 if (!Akonadi2::Commands::VerifyCreateEntityBuffer(verifyer)) { 107 if (!Akonadi2::Commands::VerifyCreateEntityBuffer(verifyer)) {
109 qWarning() << "invalid buffer, not a create entity buffer"; 108 qWarning() << "invalid buffer, not a create entity buffer";
110 return Async::error<void>(); 109 return KAsync::error<void>();
111 } 110 }
112 } 111 }
113 auto createEntity = Akonadi2::Commands::GetCreateEntity(command); 112 auto createEntity = Akonadi2::Commands::GetCreateEntity(command);
@@ -118,7 +117,7 @@ Async::Job<void> Pipeline::newEntity(void const *command, size_t size)
118 flatbuffers::Verifier verifyer(reinterpret_cast<const uint8_t *>(createEntity->delta()->Data()), createEntity->delta()->size()); 117 flatbuffers::Verifier verifyer(reinterpret_cast<const uint8_t *>(createEntity->delta()->Data()), createEntity->delta()->size());
119 if (!Akonadi2::VerifyEntityBuffer(verifyer)) { 118 if (!Akonadi2::VerifyEntityBuffer(verifyer)) {
120 qWarning() << "invalid buffer, not an entity buffer"; 119 qWarning() << "invalid buffer, not an entity buffer";
121 return Async::error<void>(); 120 return KAsync::error<void>();
122 } 121 }
123 } 122 }
124 auto entity = Akonadi2::GetEntity(createEntity->delta()->Data()); 123 auto entity = Akonadi2::GetEntity(createEntity->delta()->Data());
@@ -139,7 +138,7 @@ Async::Job<void> Pipeline::newEntity(void const *command, size_t size)
139 storage().setMaxRevision(newRevision); 138 storage().setMaxRevision(newRevision);
140 Log() << "Pipeline: wrote entity: "<< newRevision; 139 Log() << "Pipeline: wrote entity: "<< newRevision;
141 140
142 return Async::start<void>([this, key, entityType](Async::Future<void> &future) { 141 return KAsync::start<void>([this, key, entityType](KAsync::Future<void> &future) {
143 PipelineState state(this, NewPipeline, key, d->newPipeline[entityType], [&future]() { 142 PipelineState state(this, NewPipeline, key, d->newPipeline[entityType], [&future]() {
144 future.setFinished(); 143 future.setFinished();
145 }); 144 });