summaryrefslogtreecommitdiffstats
path: root/common/commands.cpp
diff options
context:
space:
mode:
authorAaron Seigo <aseigo@kde.org>2014-12-04 11:54:25 +0100
committerAaron Seigo <aseigo@kde.org>2014-12-04 11:54:34 +0100
commit66f871ca418e099dbb13614a613e78e556292c0b (patch)
tree4bc80c5a81ba9166e40ddc78d15328e04e75f28e /common/commands.cpp
parent7cf9ad9456b0ef80372b2a4f5b48f06ad390ec59 (diff)
downloadsink-66f871ca418e099dbb13614a613e78e556292c0b.tar.gz
sink-66f871ca418e099dbb13614a613e78e556292c0b.zip
missing file
Diffstat (limited to 'common/commands.cpp')
-rw-r--r--common/commands.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/common/commands.cpp b/common/commands.cpp
new file mode 100644
index 0000000..b5773e7
--- /dev/null
+++ b/common/commands.cpp
@@ -0,0 +1,16 @@
1#include "commands.h"
2
3#include <QIODevice>
4
5namespace Commands
6{
7
8void write(QIODevice *device, int commandId, flatbuffers::FlatBufferBuilder &fbb)
9{
10 const int dataSize = fbb.GetSize();
11 device->write((const char*)&commandId, sizeof(int));
12 device->write((const char*)&dataSize, sizeof(int));
13 device->write((const char*)fbb.GetBufferPointer(), dataSize);
14}
15
16} \ No newline at end of file