summaryrefslogtreecommitdiffstats
path: root/common/domainadaptor.h
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2015-11-21 11:07:47 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2015-11-21 11:07:47 +0100
commit110817a23463c71eacbc986af3ae509462758a3c (patch)
tree9c0b9d9ea67366c131949bcf6cdcafeb79e0b0a6 /common/domainadaptor.h
parentec92f856854a35bd888b883802a1ef618cc9f69c (diff)
downloadsink-110817a23463c71eacbc986af3ae509462758a3c.tar.gz
sink-110817a23463c71eacbc986af3ae509462758a3c.zip
Separated DomainTypeAdaptorFactoryInterface
Diffstat (limited to 'common/domainadaptor.h')
-rw-r--r--common/domainadaptor.h12
1 files changed, 2 insertions, 10 deletions
diff --git a/common/domainadaptor.h b/common/domainadaptor.h
index 620a658..b541e23 100644
--- a/common/domainadaptor.h
+++ b/common/domainadaptor.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014 Christian Mollekopf <chrigi_1@fastmail.fm> 2 * Copyright (C) 2014 Christian Mollekopf <chrigi_1@fastmail.fm>
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify 4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by 5 * it under the terms of the GNU General Public License as published by
@@ -23,6 +23,7 @@
23#include <QByteArray> 23#include <QByteArray>
24#include <functional> 24#include <functional>
25 25
26#include "domaintypeadaptorfactoryinterface.h"
26#include "domain/applicationdomaintype.h" 27#include "domain/applicationdomaintype.h"
27#include "domain/event.h" 28#include "domain/event.h"
28#include "domain/mail.h" 29#include "domain/mail.h"
@@ -124,15 +125,6 @@ public:
124 QSharedPointer<ReadPropertyMapper<ResourceBuffer> > mResourceMapper; 125 QSharedPointer<ReadPropertyMapper<ResourceBuffer> > mResourceMapper;
125}; 126};
126 127
127class DomainTypeAdaptorFactoryInterface
128{
129public:
130 typedef QSharedPointer<DomainTypeAdaptorFactoryInterface> Ptr;
131 virtual ~DomainTypeAdaptorFactoryInterface() {};
132 virtual QSharedPointer<Akonadi2::ApplicationDomain::BufferAdaptor> createAdaptor(const Akonadi2::Entity &entity) = 0;
133 virtual void createBuffer(const Akonadi2::ApplicationDomain::ApplicationDomainType &domainType, flatbuffers::FlatBufferBuilder &fbb, void const *metadataData = 0, size_t metadataSize = 0) = 0;
134};
135
136/** 128/**
137 * The factory should define how to go from an entitybuffer (local + resource buffer), to a domain type adapter. 129 * The factory should define how to go from an entitybuffer (local + resource buffer), to a domain type adapter.
138 * It defines how values are split accross local and resource buffer. 130 * It defines how values are split accross local and resource buffer.