blob: 474b091da762d4e0f4f264a7098cc91b9a92a0ec (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#include "commands.h"
#include <QIODevice>
namespace Akonadi2
{
namespace Commands
{
void write(QIODevice *device, int commandId, flatbuffers::FlatBufferBuilder &fbb)
{
const int dataSize = fbb.GetSize();
device->write((const char*)&commandId, sizeof(int));
device->write((const char*)&dataSize, sizeof(int));
device->write((const char*)fbb.GetBufferPointer(), dataSize);
}
} // namespace Commands
} // namespace Akonadi2
|