summaryrefslogtreecommitdiffstats
path: root/dummyresource/resourcefactory.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2015-01-03 00:08:44 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2015-01-03 00:08:44 +0100
commit4067462b0a27984df84b0379c19122d574253dfb (patch)
treee6a413a575b7fd4062da6474907bffd68155706f /dummyresource/resourcefactory.cpp
parent91d915a09b7d52c10edb1d4c1298fc2885b8a257 (diff)
downloadsink-4067462b0a27984df84b0379c19122d574253dfb.tar.gz
sink-4067462b0a27984df84b0379c19122d574253dfb.zip
Shared domain adaptors between resource and facade.
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}