summaryrefslogtreecommitdiffstats
path: root/common/resourceaccess.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2016-05-06 00:03:42 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2016-05-06 00:03:42 +0200
commit7b928b25454311ef5b52639a0a2d5d1afefa7cf8 (patch)
treed87e4a33783f85cbf4bdfec8544229c0ac23f435 /common/resourceaccess.cpp
parentce5facb2daa549de7a46133ddb3a4dce2d6ce56f (diff)
downloadsink-7b928b25454311ef5b52639a0a2d5d1afefa7cf8.tar.gz
sink-7b928b25454311ef5b52639a0a2d5d1afefa7cf8.zip
Support assigining the uid in the client
Diffstat (limited to 'common/resourceaccess.cpp')
-rw-r--r--common/resourceaccess.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/common/resourceaccess.cpp b/common/resourceaccess.cpp
index 33820af..458694f 100644
--- a/common/resourceaccess.cpp
+++ b/common/resourceaccess.cpp
@@ -293,13 +293,14 @@ KAsync::Job<void> ResourceAccess::synchronizeResource(bool sourceSync, bool loca
293 return sendCommand(Commands::SynchronizeCommand, fbb); 293 return sendCommand(Commands::SynchronizeCommand, fbb);
294} 294}
295 295
296KAsync::Job<void> ResourceAccess::sendCreateCommand(const QByteArray &resourceBufferType, const QByteArray &buffer) 296KAsync::Job<void> ResourceAccess::sendCreateCommand(const QByteArray &uid, const QByteArray &resourceBufferType, const QByteArray &buffer)
297{ 297{
298 flatbuffers::FlatBufferBuilder fbb; 298 flatbuffers::FlatBufferBuilder fbb;
299 auto entityId = fbb.CreateString(uid.constData());
299 // This is the resource buffer type and not the domain type 300 // This is the resource buffer type and not the domain type
300 auto type = fbb.CreateString(resourceBufferType.constData()); 301 auto type = fbb.CreateString(resourceBufferType.constData());
301 auto delta = Sink::EntityBuffer::appendAsVector(fbb, buffer.constData(), buffer.size()); 302 auto delta = Sink::EntityBuffer::appendAsVector(fbb, buffer.constData(), buffer.size());
302 auto location = Sink::Commands::CreateCreateEntity(fbb, 0, type, delta); 303 auto location = Sink::Commands::CreateCreateEntity(fbb, entityId, type, delta);
303 Sink::Commands::FinishCreateEntityBuffer(fbb, location); 304 Sink::Commands::FinishCreateEntityBuffer(fbb, location);
304 open(); 305 open();
305 return sendCommand(Sink::Commands::CreateEntityCommand, fbb); 306 return sendCommand(Sink::Commands::CreateEntityCommand, fbb);