summaryrefslogtreecommitdiffstats
path: root/common/resourceaccess.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2015-10-19 15:01:02 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2015-10-19 15:01:37 +0200
commit43c4cd555e4a265d3e484dfeea0aa05da0977cd0 (patch)
tree359fe5ffc5d4e3e2e45cd3dc33eabe6dd30ce149 /common/resourceaccess.cpp
parent7ea7a77aab64ea61d9966caee2b8e7d33d0f5526 (diff)
downloadsink-43c4cd555e4a265d3e484dfeea0aa05da0977cd0.tar.gz
sink-43c4cd555e4a265d3e484dfeea0aa05da0977cd0.zip
Let clients tell the resource when they no longer require a revision.
Diffstat (limited to 'common/resourceaccess.cpp')
-rw-r--r--common/resourceaccess.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/common/resourceaccess.cpp b/common/resourceaccess.cpp
index 84bc4ea..7f9306b 100644
--- a/common/resourceaccess.cpp
+++ b/common/resourceaccess.cpp
@@ -29,6 +29,7 @@
29#include "common/createentity_generated.h" 29#include "common/createentity_generated.h"
30#include "common/modifyentity_generated.h" 30#include "common/modifyentity_generated.h"
31#include "common/deleteentity_generated.h" 31#include "common/deleteentity_generated.h"
32#include "common/revisionreplayed_generated.h"
32#include "common/entitybuffer.h" 33#include "common/entitybuffer.h"
33#include "log.h" 34#include "log.h"
34 35
@@ -325,6 +326,15 @@ KAsync::Job<void> ResourceAccess::sendDeleteCommand(const QByteArray &uid, qint6
325 return sendCommand(Akonadi2::Commands::DeleteEntityCommand, fbb); 326 return sendCommand(Akonadi2::Commands::DeleteEntityCommand, fbb);
326} 327}
327 328
329KAsync::Job<void> ResourceAccess::sendRevisionReplayedCommand(qint64 revision)
330{
331 flatbuffers::FlatBufferBuilder fbb;
332 auto location = Akonadi2::Commands::CreateRevisionReplayed(fbb, revision);
333 Akonadi2::Commands::FinishRevisionReplayedBuffer(fbb, location);
334 open();
335 return sendCommand(Akonadi2::Commands::RevisionReplayedCommand, fbb);
336}
337
328void ResourceAccess::open() 338void ResourceAccess::open()
329{ 339{
330 if (d->socket && d->socket->isValid()) { 340 if (d->socket && d->socket->isValid()) {