summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/domain/typeimplementations.cpp6
-rw-r--r--common/domain/typeimplementations.h31
-rw-r--r--common/domainadaptor.h12
3 files changed, 17 insertions, 32 deletions
diff --git a/common/domain/typeimplementations.cpp b/common/domain/typeimplementations.cpp
index 38422f4..2bb630c 100644
--- a/common/domain/typeimplementations.cpp
+++ b/common/domain/typeimplementations.cpp
@@ -29,12 +29,6 @@
29#include "mail/threadindexer.h" 29#include "mail/threadindexer.h"
30#include "domainadaptor.h" 30#include "domainadaptor.h"
31 31
32#include "mail_generated.h"
33#include "folder_generated.h"
34#include "event_generated.h"
35#include "contact_generated.h"
36#include "addressbook_generated.h"
37
38using namespace Sink; 32using namespace Sink;
39using namespace Sink::ApplicationDomain; 33using namespace Sink::ApplicationDomain;
40 34
diff --git a/common/domain/typeimplementations.h b/common/domain/typeimplementations.h
index cb63949..37d6ca9 100644
--- a/common/domain/typeimplementations.h
+++ b/common/domain/typeimplementations.h
@@ -20,7 +20,11 @@
20 20
21#include "applicationdomaintype.h" 21#include "applicationdomaintype.h"
22 22
23class QByteArray; 23#include "mail_generated.h"
24#include "folder_generated.h"
25#include "event_generated.h"
26#include "contact_generated.h"
27#include "addressbook_generated.h"
24 28
25template<typename T> 29template<typename T>
26class ReadPropertyMapper; 30class ReadPropertyMapper;
@@ -38,11 +42,6 @@ class TypeIndex;
38namespace Sink { 42namespace Sink {
39namespace ApplicationDomain { 43namespace ApplicationDomain {
40 44
41namespace Buffer {
42 struct Mail;
43 struct MailBuilder;
44}
45
46template<> 45template<>
47class TypeImplementation<Sink::ApplicationDomain::Mail> { 46class TypeImplementation<Sink::ApplicationDomain::Mail> {
48public: 47public:
@@ -54,11 +53,6 @@ public:
54 static void configure(IndexPropertyMapper &indexPropertyMapper); 53 static void configure(IndexPropertyMapper &indexPropertyMapper);
55}; 54};
56 55
57namespace Buffer {
58 struct Folder;
59 struct FolderBuilder;
60}
61
62template<> 56template<>
63class TypeImplementation<Sink::ApplicationDomain::Folder> { 57class TypeImplementation<Sink::ApplicationDomain::Folder> {
64public: 58public:
@@ -70,11 +64,6 @@ public:
70 static void configure(IndexPropertyMapper &indexPropertyMapper); 64 static void configure(IndexPropertyMapper &indexPropertyMapper);
71}; 65};
72 66
73namespace Buffer {
74 struct Contact;
75 struct ContactBuilder;
76}
77
78template<> 67template<>
79class TypeImplementation<Sink::ApplicationDomain::Contact> { 68class TypeImplementation<Sink::ApplicationDomain::Contact> {
80public: 69public:
@@ -86,11 +75,6 @@ public:
86 static void configure(IndexPropertyMapper &indexPropertyMapper); 75 static void configure(IndexPropertyMapper &indexPropertyMapper);
87}; 76};
88 77
89namespace Buffer {
90 struct Addressbook;
91 struct AddressbookBuilder;
92}
93
94template<> 78template<>
95class TypeImplementation<Sink::ApplicationDomain::Addressbook> { 79class TypeImplementation<Sink::ApplicationDomain::Addressbook> {
96public: 80public:
@@ -102,11 +86,6 @@ public:
102 static void configure(IndexPropertyMapper &indexPropertyMapper); 86 static void configure(IndexPropertyMapper &indexPropertyMapper);
103}; 87};
104 88
105namespace Buffer {
106 struct Event;
107 struct EventBuilder;
108}
109
110template<> 89template<>
111class TypeImplementation<Sink::ApplicationDomain::Event> { 90class TypeImplementation<Sink::ApplicationDomain::Event> {
112public: 91public:
diff --git a/common/domainadaptor.h b/common/domainadaptor.h
index 54aa53e..af5d5fc 100644
--- a/common/domainadaptor.h
+++ b/common/domainadaptor.h
@@ -242,3 +242,15 @@ protected:
242 QSharedPointer<WritePropertyMapper<ResourceBuilder>> mResourceWriteMapper; 242 QSharedPointer<WritePropertyMapper<ResourceBuilder>> mResourceWriteMapper;
243 QSharedPointer<IndexPropertyMapper> mIndexMapper; 243 QSharedPointer<IndexPropertyMapper> mIndexMapper;
244}; 244};
245
246/**
247 * A default adaptorfactory implemenation that simply instantiates a generic resource
248 */
249template<typename DomainType>
250class DefaultAdaptorFactory : public DomainTypeAdaptorFactory<DomainType>
251{
252public:
253 DefaultAdaptorFactory() : DomainTypeAdaptorFactory<DomainType>() {}
254 virtual ~DefaultAdaptorFactory(){}
255};
256