From 761328989492db9bd603c2d7f1134d20e485d2f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Nicole?= Date: Tue, 27 Mar 2018 18:26:11 +0200 Subject: 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 --- tests/CMakeLists.txt | 1 - tests/calendar.fbs | 12 ------------ tests/domainadaptortest.cpp | 2 -- tests/storagebenchmark.cpp | 11 ++++------- 4 files changed, 4 insertions(+), 22 deletions(-) delete mode 100644 tests/calendar.fbs (limited to 'tests') diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 883a38b..fe7866c 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -58,7 +58,6 @@ auto_tests ( entitystoretest upgradetest ) -generate_flatbuffers(sink_test calendar) target_link_libraries(dummyresourcetest sink_resource_dummy) target_link_libraries(dummyresourcebenchmark sink_resource_dummy) target_link_libraries(dummyresourcewritebenchmark sink_resource_dummy) diff --git a/tests/calendar.fbs b/tests/calendar.fbs deleted file mode 100644 index ef4f112..0000000 --- a/tests/calendar.fbs +++ /dev/null @@ -1,12 +0,0 @@ -// example IDL file - -namespace Calendar; - -table Event { - summary:string; - description:string; - attachment:[ubyte]; -} - -root_type Event; -file_identifier "AKFB"; diff --git a/tests/domainadaptortest.cpp b/tests/domainadaptortest.cpp index 2aed0a9..60d5069 100644 --- a/tests/domainadaptortest.cpp +++ b/tests/domainadaptortest.cpp @@ -76,12 +76,10 @@ private slots: auto summary = m_fbb.CreateString("summary1"); auto description = m_fbb.CreateString("description"); static uint8_t rawData[100]; - auto attachment = m_fbb.CreateVector(rawData, 100); auto builder = Sink::ApplicationDomain::Buffer::EventBuilder(m_fbb); builder.add_summary(summary); builder.add_description(description); - builder.add_attachment(attachment); auto buffer = builder.Finish(); Sink::ApplicationDomain::Buffer::FinishEventBuffer(m_fbb, buffer); diff --git a/tests/storagebenchmark.cpp b/tests/storagebenchmark.cpp index ee336d2..eef360e 100644 --- a/tests/storagebenchmark.cpp +++ b/tests/storagebenchmark.cpp @@ -1,6 +1,6 @@ #include -#include "calendar_generated.h" +#include "event_generated.h" #include "hawd/dataset.h" #include "hawd/formatter.h" @@ -13,7 +13,7 @@ #include #include -using namespace Calendar; +using namespace Sink::ApplicationDomain::Buffer; using namespace flatbuffers; static QByteArray createEvent() @@ -25,13 +25,10 @@ static QByteArray createEvent() { uint8_t *rawDataPtr = Q_NULLPTR; auto summary = fbb.CreateString("summary"); - auto data = fbb.CreateUninitializedVector(attachmentSize, &rawDataPtr); - // auto data = fbb.CreateVector(rawData, attachmentSize); - Calendar::EventBuilder eventBuilder(fbb); + EventBuilder eventBuilder(fbb); eventBuilder.add_summary(summary); - eventBuilder.add_attachment(data); auto eventLocation = eventBuilder.Finish(); - Calendar::FinishEventBuffer(fbb, eventLocation); + FinishEventBuffer(fbb, eventLocation); memcpy((void *)rawDataPtr, rawData, attachmentSize); } -- cgit v1.2.3