diff options
Diffstat (limited to 'common/domain')
-rw-r--r-- | common/domain/applicationdomaintype.cpp | 22 | ||||
-rw-r--r-- | common/domain/applicationdomaintype.h | 7 |
2 files changed, 29 insertions, 0 deletions
diff --git a/common/domain/applicationdomaintype.cpp b/common/domain/applicationdomaintype.cpp index 27f94ce..166d3e6 100644 --- a/common/domain/applicationdomaintype.cpp +++ b/common/domain/applicationdomaintype.cpp | |||
@@ -239,6 +239,28 @@ Identity::~Identity() | |||
239 | 239 | ||
240 | } | 240 | } |
241 | 241 | ||
242 | namespace MaildirResource { | ||
243 | SinkResource create(const QByteArray &account) | ||
244 | { | ||
245 | auto &&resource = ApplicationDomainType::createEntity<SinkResource>(); | ||
246 | resource.setProperty("type", "org.kde.maildir"); | ||
247 | resource.setProperty("account", account); | ||
248 | resource.setProperty("capabilities", QVariant::fromValue(QByteArrayList() << "storage" << "drafts")); | ||
249 | return resource; | ||
250 | } | ||
251 | } | ||
252 | |||
253 | namespace MailtransportResource { | ||
254 | SinkResource create(const QByteArray &account) | ||
255 | { | ||
256 | auto &&resource = ApplicationDomainType::createEntity<SinkResource>(); | ||
257 | resource.setProperty("type", "org.kde.mailtransport"); | ||
258 | resource.setProperty("account", account); | ||
259 | resource.setProperty("capabilities", QVariant::fromValue(QByteArrayList() << "transport")); | ||
260 | return resource; | ||
261 | } | ||
262 | } | ||
263 | |||
242 | template<> | 264 | template<> |
243 | QByteArray getTypeName<Event>() | 265 | QByteArray getTypeName<Event>() |
244 | { | 266 | { |
diff --git a/common/domain/applicationdomaintype.h b/common/domain/applicationdomaintype.h index 1486f00..eadad00 100644 --- a/common/domain/applicationdomaintype.h +++ b/common/domain/applicationdomaintype.h | |||
@@ -187,6 +187,13 @@ struct SINK_EXPORT Identity : public ApplicationDomainType { | |||
187 | virtual ~Identity(); | 187 | virtual ~Identity(); |
188 | }; | 188 | }; |
189 | 189 | ||
190 | namespace MaildirResource { | ||
191 | SinkResource SINK_EXPORT create(const QByteArray &account); | ||
192 | }; | ||
193 | namespace MailtransportResource { | ||
194 | SinkResource SINK_EXPORT create(const QByteArray &account); | ||
195 | }; | ||
196 | |||
190 | /** | 197 | /** |
191 | * All types need to be registered here an MUST return a different name. | 198 | * All types need to be registered here an MUST return a different name. |
192 | * | 199 | * |