diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-03-15 14:44:06 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-03-15 15:19:41 +0100 |
commit | d838e58a3fd94a04d9db82560f7004433300b77e (patch) | |
tree | e464e72ba3e207c20bf9c5628f2513bf6170a552 /common/domain | |
parent | 3978a0128925081dac0d16c1956328b694796ce6 (diff) | |
download | sink-d838e58a3fd94a04d9db82560f7004433300b77e.tar.gz sink-d838e58a3fd94a04d9db82560f7004433300b77e.zip |
Added support for accounts
Diffstat (limited to 'common/domain')
-rw-r--r-- | common/domain/applicationdomaintype.cpp | 11 | ||||
-rw-r--r-- | common/domain/applicationdomaintype.h | 13 |
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 | ||
144 | SinkAccount::~SinkAccount() | ||
145 | { | ||
146 | |||
147 | } | ||
148 | |||
144 | template<> | 149 | template<> |
145 | QByteArray getTypeName<Event>() | 150 | QByteArray getTypeName<Event>() |
146 | { | 151 | { |
@@ -160,6 +165,12 @@ QByteArray getTypeName<SinkResource>() | |||
160 | } | 165 | } |
161 | 166 | ||
162 | template<> | 167 | template<> |
168 | QByteArray getTypeName<SinkAccount>() | ||
169 | { | ||
170 | return "sinkaccount"; | ||
171 | } | ||
172 | |||
173 | template<> | ||
163 | QByteArray getTypeName<Mail>() | 174 | QByteArray 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 | ||
148 | struct 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<> | |||
163 | QByteArray SINK_EXPORT getTypeName<SinkResource>(); | 169 | QByteArray SINK_EXPORT getTypeName<SinkResource>(); |
164 | 170 | ||
165 | template<> | 171 | template<> |
172 | QByteArray SINK_EXPORT getTypeName<SinkAccount>(); | ||
173 | |||
174 | template<> | ||
166 | QByteArray SINK_EXPORT getTypeName<Mail>(); | 175 | QByteArray SINK_EXPORT getTypeName<Mail>(); |
167 | 176 | ||
168 | template<> | 177 | template<> |
@@ -192,3 +201,5 @@ Q_DECLARE_METATYPE(Sink::ApplicationDomain::Folder) | |||
192 | Q_DECLARE_METATYPE(Sink::ApplicationDomain::Folder::Ptr) | 201 | Q_DECLARE_METATYPE(Sink::ApplicationDomain::Folder::Ptr) |
193 | Q_DECLARE_METATYPE(Sink::ApplicationDomain::SinkResource) | 202 | Q_DECLARE_METATYPE(Sink::ApplicationDomain::SinkResource) |
194 | Q_DECLARE_METATYPE(Sink::ApplicationDomain::SinkResource::Ptr) | 203 | Q_DECLARE_METATYPE(Sink::ApplicationDomain::SinkResource::Ptr) |
204 | Q_DECLARE_METATYPE(Sink::ApplicationDomain::SinkAccount) | ||
205 | Q_DECLARE_METATYPE(Sink::ApplicationDomain::SinkAccount::Ptr) | ||