diff options
author | Rémi Nicole <nicole@kolabsystems.com> | 2018-03-27 18:26:11 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-03-27 18:26:15 +0200 |
commit | 761328989492db9bd603c2d7f1134d20e485d2f6 (patch) | |
tree | 0e3b4517dd2000fb1cc2738bbb22a3e54dfffb6f /common/domain/applicationdomaintype.h | |
parent | 80afd7070f2d8e57cab2fe55fef611623fdb75f0 (diff) | |
download | sink-761328989492db9bd603c2d7f1134d20e485d2f6.tar.gz sink-761328989492db9bd603c2d7f1134d20e485d2f6.zip |
Add CalDAV support
Summary:
Notes:
- Add a `webdavcommon` folder for WebDAV generic resource code
- Move `davresource` to `carddaveresource` and make it use the WebDAV code
- For now it tests the CalDAV resource directly on KolabNow (to be changed)
- Only synchronization, not adding / changing / removing WebDAV collections or items (to be implemented)
- Only events are currently supported (todo, freebusy, etc. are to be implemented but should be straightforward)
Fixes T8224
Reviewers: cmollekopf
Tags: #sink
Maniphest Tasks: T8224
Differential Revision: https://phabricator.kde.org/D11741
Diffstat (limited to 'common/domain/applicationdomaintype.h')
-rw-r--r-- | common/domain/applicationdomaintype.h | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/common/domain/applicationdomaintype.h b/common/domain/applicationdomaintype.h index d05e981..e05acaa 100644 --- a/common/domain/applicationdomaintype.h +++ b/common/domain/applicationdomaintype.h | |||
@@ -389,22 +389,24 @@ struct SINK_EXPORT Contact : public Entity { | |||
389 | SINK_REFERENCE_PROPERTY(Addressbook, Addressbook, addressbook); | 389 | SINK_REFERENCE_PROPERTY(Addressbook, Addressbook, addressbook); |
390 | }; | 390 | }; |
391 | 391 | ||
392 | struct SINK_EXPORT Calendar : public Entity { | ||
393 | SINK_ENTITY(Calendar, calendar); | ||
394 | SINK_PROPERTY(QString, Name, name); | ||
395 | }; | ||
396 | |||
392 | struct SINK_EXPORT Event : public Entity { | 397 | struct SINK_EXPORT Event : public Entity { |
393 | SINK_ENTITY(Event, event); | 398 | SINK_ENTITY(Event, event); |
394 | SINK_PROPERTY(QString, Uid, uid); | 399 | SINK_PROPERTY(QString, Uid, uid); |
395 | SINK_PROPERTY(QString, Summary, summary); | 400 | SINK_PROPERTY(QString, Summary, summary); |
396 | SINK_PROPERTY(QString, Description, description); | 401 | SINK_PROPERTY(QString, Description, description); |
397 | SINK_PROPERTY(QByteArray, Attachment, attachment); | 402 | SINK_PROPERTY(QDateTime, StartTime, startTime); |
403 | SINK_REFERENCE_PROPERTY(Calendar, Calendar, calendar); | ||
398 | }; | 404 | }; |
399 | 405 | ||
400 | struct SINK_EXPORT Todo : public Entity { | 406 | struct SINK_EXPORT Todo : public Entity { |
401 | SINK_ENTITY(Todo, todo); | 407 | SINK_ENTITY(Todo, todo); |
402 | }; | 408 | }; |
403 | 409 | ||
404 | struct SINK_EXPORT Calendar : public Entity { | ||
405 | SINK_ENTITY(Calendar, calendar); | ||
406 | }; | ||
407 | |||
408 | struct SINK_EXPORT Folder : public Entity { | 410 | struct SINK_EXPORT Folder : public Entity { |
409 | SINK_ENTITY(Folder, folder); | 411 | SINK_ENTITY(Folder, folder); |
410 | SINK_REFERENCE_PROPERTY(Folder, Parent, parent); | 412 | SINK_REFERENCE_PROPERTY(Folder, Parent, parent); |
@@ -477,6 +479,10 @@ struct SINK_EXPORT CardDavResource { | |||
477 | static SinkResource create(const QByteArray &account); | 479 | static SinkResource create(const QByteArray &account); |
478 | }; | 480 | }; |
479 | 481 | ||
482 | struct SINK_EXPORT CalDavResource { | ||
483 | static SinkResource create(const QByteArray &account); | ||
484 | }; | ||
485 | |||
480 | namespace ResourceCapabilities { | 486 | namespace ResourceCapabilities { |
481 | namespace Mail { | 487 | namespace Mail { |
482 | static constexpr const char *mail = "mail"; | 488 | static constexpr const char *mail = "mail"; |
@@ -493,6 +499,11 @@ namespace Contact { | |||
493 | static constexpr const char *addressbook = "addressbook"; | 499 | static constexpr const char *addressbook = "addressbook"; |
494 | static constexpr const char *storage = "contact.storage"; | 500 | static constexpr const char *storage = "contact.storage"; |
495 | }; | 501 | }; |
502 | namespace Event { | ||
503 | static constexpr const char *event = "event"; | ||
504 | static constexpr const char *calendar = "calendar"; | ||
505 | static constexpr const char *storage = "event.storage"; | ||
506 | }; | ||
496 | }; | 507 | }; |
497 | 508 | ||
498 | namespace SpecialPurpose { | 509 | namespace SpecialPurpose { |
@@ -522,7 +533,7 @@ bool SINK_EXPORT isGlobalType(const QByteArray &type); | |||
522 | 533 | ||
523 | /** | 534 | /** |
524 | * Type implementation. | 535 | * Type implementation. |
525 | * | 536 | * |
526 | * Needs to be implemented for every application domain type. | 537 | * Needs to be implemented for every application domain type. |
527 | * Contains all non-resource specific, but type-specific code. | 538 | * Contains all non-resource specific, but type-specific code. |
528 | */ | 539 | */ |
@@ -545,6 +556,7 @@ class SINK_EXPORT TypeImplementation; | |||
545 | REGISTER_TYPE(Sink::ApplicationDomain::Contact) \ | 556 | REGISTER_TYPE(Sink::ApplicationDomain::Contact) \ |
546 | REGISTER_TYPE(Sink::ApplicationDomain::Addressbook) \ | 557 | REGISTER_TYPE(Sink::ApplicationDomain::Addressbook) \ |
547 | REGISTER_TYPE(Sink::ApplicationDomain::Event) \ | 558 | REGISTER_TYPE(Sink::ApplicationDomain::Event) \ |
559 | REGISTER_TYPE(Sink::ApplicationDomain::Calendar) \ | ||
548 | REGISTER_TYPE(Sink::ApplicationDomain::Mail) \ | 560 | REGISTER_TYPE(Sink::ApplicationDomain::Mail) \ |
549 | REGISTER_TYPE(Sink::ApplicationDomain::Folder) \ | 561 | REGISTER_TYPE(Sink::ApplicationDomain::Folder) \ |
550 | REGISTER_TYPE(Sink::ApplicationDomain::SinkResource) \ | 562 | REGISTER_TYPE(Sink::ApplicationDomain::SinkResource) \ |