summaryrefslogtreecommitdiffstats
path: root/dummyresource/resourcefactory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dummyresource/resourcefactory.cpp')
-rw-r--r--dummyresource/resourcefactory.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/dummyresource/resourcefactory.cpp b/dummyresource/resourcefactory.cpp
index 08222c0..da6969a 100644
--- a/dummyresource/resourcefactory.cpp
+++ b/dummyresource/resourcefactory.cpp
@@ -23,6 +23,7 @@
23#include "pipeline.h" 23#include "pipeline.h"
24#include "dummycalendar_generated.h" 24#include "dummycalendar_generated.h"
25#include "metadata_generated.h" 25#include "metadata_generated.h"
26#include "domainadaptor.h"
26#include <QUuid> 27#include <QUuid>
27 28
28/* 29/*
@@ -101,14 +102,13 @@ DummyResource::DummyResource()
101 102
102void DummyResource::configurePipeline(Akonadi2::Pipeline *pipeline) 103void DummyResource::configurePipeline(Akonadi2::Pipeline *pipeline)
103{ 104{
105 auto factory = QSharedPointer<DummyEventAdaptorFactory>::create();
104 //TODO setup preprocessors for each domain type and pipeline type allowing full customization 106 //TODO setup preprocessors for each domain type and pipeline type allowing full customization
105 //Eventually the order should be self configuring, for now it's hardcoded. 107 //Eventually the order should be self configuring, for now it's hardcoded.
106 auto eventIndexer = new SimpleProcessor([](const Akonadi2::PipelineState &state) { 108 auto eventIndexer = new SimpleProcessor([factory](const Akonadi2::PipelineState &state) {
107 //FIXME 109 auto adaptor = factory->createAdaptor(state.entity());
108 // auto adaptor = QSharedPointer<DummyEventAdaptor>::create(); 110 //Here we can plug in generic preprocessors
109 // adaptor->mLocalBuffer = localBuffer; 111 qDebug() << adaptor->getProperty("summary").toString();
110 // adaptor->mResourceBuffer = resourceBuffer;
111 // adaptor->storage = storage;
112 }); 112 });
113 pipeline->setPreprocessors<Akonadi2::Domain::Event>(Akonadi2::Pipeline::NewPipeline, QVector<Akonadi2::Preprocessor*>() << eventIndexer); 113 pipeline->setPreprocessors<Akonadi2::Domain::Event>(Akonadi2::Pipeline::NewPipeline, QVector<Akonadi2::Preprocessor*>() << eventIndexer);
114} 114}