summaryrefslogtreecommitdiffstats
path: root/tests/storagebenchmark.cpp
diff options
context:
space:
mode:
authorRémi Nicole <nicole@kolabsystems.com>2018-03-27 18:26:11 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2018-03-27 18:26:15 +0200
commit761328989492db9bd603c2d7f1134d20e485d2f6 (patch)
tree0e3b4517dd2000fb1cc2738bbb22a3e54dfffb6f /tests/storagebenchmark.cpp
parent80afd7070f2d8e57cab2fe55fef611623fdb75f0 (diff)
downloadsink-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 'tests/storagebenchmark.cpp')
-rw-r--r--tests/storagebenchmark.cpp11
1 files changed, 4 insertions, 7 deletions
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 @@
1#include <QtTest> 1#include <QtTest>
2 2
3#include "calendar_generated.h" 3#include "event_generated.h"
4 4
5#include "hawd/dataset.h" 5#include "hawd/dataset.h"
6#include "hawd/formatter.h" 6#include "hawd/formatter.h"
@@ -13,7 +13,7 @@
13#include <QString> 13#include <QString>
14#include <QTime> 14#include <QTime>
15 15
16using namespace Calendar; 16using namespace Sink::ApplicationDomain::Buffer;
17using namespace flatbuffers; 17using namespace flatbuffers;
18 18
19static QByteArray createEvent() 19static QByteArray createEvent()
@@ -25,13 +25,10 @@ static QByteArray createEvent()
25 { 25 {
26 uint8_t *rawDataPtr = Q_NULLPTR; 26 uint8_t *rawDataPtr = Q_NULLPTR;
27 auto summary = fbb.CreateString("summary"); 27 auto summary = fbb.CreateString("summary");
28 auto data = fbb.CreateUninitializedVector<uint8_t>(attachmentSize, &rawDataPtr); 28 EventBuilder eventBuilder(fbb);
29 // auto data = fbb.CreateVector(rawData, attachmentSize);
30 Calendar::EventBuilder eventBuilder(fbb);
31 eventBuilder.add_summary(summary); 29 eventBuilder.add_summary(summary);
32 eventBuilder.add_attachment(data);
33 auto eventLocation = eventBuilder.Finish(); 30 auto eventLocation = eventBuilder.Finish();
34 Calendar::FinishEventBuffer(fbb, eventLocation); 31 FinishEventBuffer(fbb, eventLocation);
35 memcpy((void *)rawDataPtr, rawData, attachmentSize); 32 memcpy((void *)rawDataPtr, rawData, attachmentSize);
36 } 33 }
37 34