From 43c4cd555e4a265d3e484dfeea0aa05da0977cd0 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Mon, 19 Oct 2015 15:01:02 +0200 Subject: Let clients tell the resource when they no longer require a revision. --- common/resourceaccess.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'common/resourceaccess.cpp') 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 @@ #include "common/createentity_generated.h" #include "common/modifyentity_generated.h" #include "common/deleteentity_generated.h" +#include "common/revisionreplayed_generated.h" #include "common/entitybuffer.h" #include "log.h" @@ -325,6 +326,15 @@ KAsync::Job ResourceAccess::sendDeleteCommand(const QByteArray &uid, qint6 return sendCommand(Akonadi2::Commands::DeleteEntityCommand, fbb); } +KAsync::Job ResourceAccess::sendRevisionReplayedCommand(qint64 revision) +{ + flatbuffers::FlatBufferBuilder fbb; + auto location = Akonadi2::Commands::CreateRevisionReplayed(fbb, revision); + Akonadi2::Commands::FinishRevisionReplayedBuffer(fbb, location); + open(); + return sendCommand(Akonadi2::Commands::RevisionReplayedCommand, fbb); +} + void ResourceAccess::open() { if (d->socket && d->socket->isValid()) { -- cgit v1.2.3