diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/domain/applicationdomaintype.cpp | 6 | ||||
-rw-r--r-- | common/domain/applicationdomaintype.h | 10 |
2 files changed, 13 insertions, 3 deletions
diff --git a/common/domain/applicationdomaintype.cpp b/common/domain/applicationdomaintype.cpp index a57a50b..d9b0c92 100644 --- a/common/domain/applicationdomaintype.cpp +++ b/common/domain/applicationdomaintype.cpp | |||
@@ -251,7 +251,7 @@ namespace MaildirResource { | |||
251 | auto &&resource = ApplicationDomainType::createEntity<SinkResource>(); | 251 | auto &&resource = ApplicationDomainType::createEntity<SinkResource>(); |
252 | resource.setProperty("type", "org.kde.maildir"); | 252 | resource.setProperty("type", "org.kde.maildir"); |
253 | resource.setProperty("account", account); | 253 | resource.setProperty("account", account); |
254 | resource.setProperty("capabilities", QVariant::fromValue(QByteArrayList() << "storage" << "drafts" << "-folder.rename")); | 254 | resource.setProperty("capabilities", QVariant::fromValue(QByteArrayList() << ResourceCapabilities::Mail::storage << ResourceCapabilities::Mail::drafts << "-folder.rename")); |
255 | return resource; | 255 | return resource; |
256 | } | 256 | } |
257 | } | 257 | } |
@@ -262,7 +262,7 @@ namespace MailtransportResource { | |||
262 | auto &&resource = ApplicationDomainType::createEntity<SinkResource>(); | 262 | auto &&resource = ApplicationDomainType::createEntity<SinkResource>(); |
263 | resource.setProperty("type", "org.kde.mailtransport"); | 263 | resource.setProperty("type", "org.kde.mailtransport"); |
264 | resource.setProperty("account", account); | 264 | resource.setProperty("account", account); |
265 | resource.setProperty("capabilities", QVariant::fromValue(QByteArrayList() << "transport")); | 265 | resource.setProperty("capabilities", QVariant::fromValue(QByteArrayList() << ResourceCapabilities::Mail::transport)); |
266 | return resource; | 266 | return resource; |
267 | } | 267 | } |
268 | } | 268 | } |
@@ -273,7 +273,7 @@ namespace ImapResource { | |||
273 | auto &&resource = ApplicationDomainType::createEntity<SinkResource>(); | 273 | auto &&resource = ApplicationDomainType::createEntity<SinkResource>(); |
274 | resource.setProperty("type", "org.kde.imap"); | 274 | resource.setProperty("type", "org.kde.imap"); |
275 | resource.setProperty("account", account); | 275 | resource.setProperty("account", account); |
276 | resource.setProperty("capabilities", QVariant::fromValue(QByteArrayList() << "storage" << "folder.hierarchy")); | 276 | resource.setProperty("capabilities", QVariant::fromValue(QByteArrayList() << ResourceCapabilities::Mail::storage << ResourceCapabilities::Mail::drafts << ResourceCapabilities::Mail::folderhierarchy)); |
277 | return resource; | 277 | return resource; |
278 | } | 278 | } |
279 | } | 279 | } |
diff --git a/common/domain/applicationdomaintype.h b/common/domain/applicationdomaintype.h index b011eb5..72ac480 100644 --- a/common/domain/applicationdomaintype.h +++ b/common/domain/applicationdomaintype.h | |||
@@ -252,6 +252,16 @@ namespace ImapResource { | |||
252 | SinkResource SINK_EXPORT create(const QByteArray &account); | 252 | SinkResource SINK_EXPORT create(const QByteArray &account); |
253 | }; | 253 | }; |
254 | 254 | ||
255 | namespace ResourceCapabilities { | ||
256 | namespace Mail { | ||
257 | static constexpr const char *storage = "mail.storage"; | ||
258 | static constexpr const char *drafts = "mail.drafts"; | ||
259 | static constexpr const char *trash = "mail.trash"; | ||
260 | static constexpr const char *transport = "mail.transport"; | ||
261 | static constexpr const char *folderhierarchy = "mail.folderhierarchy"; | ||
262 | }; | ||
263 | }; | ||
264 | |||
255 | /** | 265 | /** |
256 | * All types need to be registered here an MUST return a different name. | 266 | * All types need to be registered here an MUST return a different name. |
257 | * | 267 | * |