summaryrefslogtreecommitdiffstats
path: root/common/resourceaccess.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2016-06-03 15:50:06 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2016-06-03 15:50:06 +0200
commit5c08ecda71cdbfd8951f9aab657cd2e2697ad0b3 (patch)
tree3178694224cd12b99111eddb1ba1b61d90ec8d60 /common/resourceaccess.cpp
parent77562cdae63e0ec7b09e8ece6af97165ba9e48dd (diff)
downloadsink-5c08ecda71cdbfd8951f9aab657cd2e2697ad0b3.tar.gz
sink-5c08ecda71cdbfd8951f9aab657cd2e2697ad0b3.zip
Track modified properties to detect necessary replay changes
Diffstat (limited to 'common/resourceaccess.cpp')
-rw-r--r--common/resourceaccess.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/common/resourceaccess.cpp b/common/resourceaccess.cpp
index 3696a93..5ad2018 100644
--- a/common/resourceaccess.cpp
+++ b/common/resourceaccess.cpp
@@ -316,16 +316,16 @@ KAsync::Job<void> ResourceAccess::sendCreateCommand(const QByteArray &uid, const
316} 316}
317 317
318KAsync::Job<void> 318KAsync::Job<void>
319ResourceAccess::sendModifyCommand(const QByteArray &uid, qint64 revision, const QByteArray &resourceBufferType, const QByteArrayList &deletedProperties, const QByteArray &buffer) 319ResourceAccess::sendModifyCommand(const QByteArray &uid, qint64 revision, const QByteArray &resourceBufferType, const QByteArrayList &deletedProperties, const QByteArray &buffer, const QByteArrayList &changedProperties)
320{ 320{
321 flatbuffers::FlatBufferBuilder fbb; 321 flatbuffers::FlatBufferBuilder fbb;
322 auto entityId = fbb.CreateString(uid.constData()); 322 auto entityId = fbb.CreateString(uid.constData());
323 // This is the resource buffer type and not the domain type 323 // This is the resource buffer type and not the domain type
324 auto type = fbb.CreateString(resourceBufferType.constData()); 324 auto type = fbb.CreateString(resourceBufferType.constData());
325 // FIXME 325 auto modifiedProperties = BufferUtils::toVector(fbb, changedProperties);
326 auto deletions = 0; 326 auto deletions = BufferUtils::toVector(fbb, deletedProperties);
327 auto delta = Sink::EntityBuffer::appendAsVector(fbb, buffer.constData(), buffer.size()); 327 auto delta = Sink::EntityBuffer::appendAsVector(fbb, buffer.constData(), buffer.size());
328 auto location = Sink::Commands::CreateModifyEntity(fbb, revision, entityId, deletions, type, delta); 328 auto location = Sink::Commands::CreateModifyEntity(fbb, revision, entityId, deletions, type, delta, true, modifiedProperties);
329 Sink::Commands::FinishModifyEntityBuffer(fbb, location); 329 Sink::Commands::FinishModifyEntityBuffer(fbb, location);
330 open(); 330 open();
331 return sendCommand(Sink::Commands::ModifyEntityCommand, fbb); 331 return sendCommand(Sink::Commands::ModifyEntityCommand, fbb);