summaryrefslogtreecommitdiffstats
path: root/common/domain
diff options
context:
space:
mode:
Diffstat (limited to 'common/domain')
-rw-r--r--common/domain/applicationdomaintype.cpp22
-rw-r--r--common/domain/applicationdomaintype.h7
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
242namespace 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
253namespace 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
242template<> 264template<>
243QByteArray getTypeName<Event>() 265QByteArray 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
190namespace MaildirResource {
191 SinkResource SINK_EXPORT create(const QByteArray &account);
192};
193namespace 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 *