summaryrefslogtreecommitdiffstats
path: root/common/domain
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2016-03-15 14:44:06 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2016-03-15 15:19:41 +0100
commitd838e58a3fd94a04d9db82560f7004433300b77e (patch)
treee464e72ba3e207c20bf9c5628f2513bf6170a552 /common/domain
parent3978a0128925081dac0d16c1956328b694796ce6 (diff)
downloadsink-d838e58a3fd94a04d9db82560f7004433300b77e.tar.gz
sink-d838e58a3fd94a04d9db82560f7004433300b77e.zip
Added support for accounts
Diffstat (limited to 'common/domain')
-rw-r--r--common/domain/applicationdomaintype.cpp11
-rw-r--r--common/domain/applicationdomaintype.h13
2 files changed, 23 insertions, 1 deletions
diff --git a/common/domain/applicationdomaintype.cpp b/common/domain/applicationdomaintype.cpp
index df10327..462585e 100644
--- a/common/domain/applicationdomaintype.cpp
+++ b/common/domain/applicationdomaintype.cpp
@@ -141,6 +141,11 @@ SinkResource::~SinkResource()
141 141
142} 142}
143 143
144SinkAccount::~SinkAccount()
145{
146
147}
148
144template<> 149template<>
145QByteArray getTypeName<Event>() 150QByteArray getTypeName<Event>()
146{ 151{
@@ -160,6 +165,12 @@ QByteArray getTypeName<SinkResource>()
160} 165}
161 166
162template<> 167template<>
168QByteArray getTypeName<SinkAccount>()
169{
170 return "sinkaccount";
171}
172
173template<>
163QByteArray getTypeName<Mail>() 174QByteArray getTypeName<Mail>()
164{ 175{
165 return "mail"; 176 return "mail";
diff --git a/common/domain/applicationdomaintype.h b/common/domain/applicationdomaintype.h
index 32d8999..d17ad75 100644
--- a/common/domain/applicationdomaintype.h
+++ b/common/domain/applicationdomaintype.h
@@ -135,7 +135,7 @@ struct SINK_EXPORT Folder : public Entity {
135 135
136/** 136/**
137 * Represents an sink resource. 137 * Represents an sink resource.
138 * 138 *
139 * This type is used for configuration of resources, 139 * This type is used for configuration of resources,
140 * and for creating and removing resource instances. 140 * and for creating and removing resource instances.
141 */ 141 */
@@ -145,6 +145,12 @@ struct SINK_EXPORT SinkResource : public ApplicationDomainType {
145 virtual ~SinkResource(); 145 virtual ~SinkResource();
146}; 146};
147 147
148struct SINK_EXPORT SinkAccount : public ApplicationDomainType {
149 typedef QSharedPointer<SinkAccount> Ptr;
150 using ApplicationDomainType::ApplicationDomainType;
151 virtual ~SinkAccount();
152};
153
148/** 154/**
149 * All types need to be registered here an MUST return a different name. 155 * All types need to be registered here an MUST return a different name.
150 * 156 *
@@ -163,6 +169,9 @@ template<>
163QByteArray SINK_EXPORT getTypeName<SinkResource>(); 169QByteArray SINK_EXPORT getTypeName<SinkResource>();
164 170
165template<> 171template<>
172QByteArray SINK_EXPORT getTypeName<SinkAccount>();
173
174template<>
166QByteArray SINK_EXPORT getTypeName<Mail>(); 175QByteArray SINK_EXPORT getTypeName<Mail>();
167 176
168template<> 177template<>
@@ -192,3 +201,5 @@ Q_DECLARE_METATYPE(Sink::ApplicationDomain::Folder)
192Q_DECLARE_METATYPE(Sink::ApplicationDomain::Folder::Ptr) 201Q_DECLARE_METATYPE(Sink::ApplicationDomain::Folder::Ptr)
193Q_DECLARE_METATYPE(Sink::ApplicationDomain::SinkResource) 202Q_DECLARE_METATYPE(Sink::ApplicationDomain::SinkResource)
194Q_DECLARE_METATYPE(Sink::ApplicationDomain::SinkResource::Ptr) 203Q_DECLARE_METATYPE(Sink::ApplicationDomain::SinkResource::Ptr)
204Q_DECLARE_METATYPE(Sink::ApplicationDomain::SinkAccount)
205Q_DECLARE_METATYPE(Sink::ApplicationDomain::SinkAccount::Ptr)