diff options
author | Aaron Seigo <aseigo@kde.org> | 2014-12-02 15:19:48 +0100 |
---|---|---|
committer | Aaron Seigo <aseigo@kde.org> | 2014-12-02 15:19:48 +0100 |
commit | 9c31df56c894892f20a30dc336cfe608b14679e0 (patch) | |
tree | 6b6d56d2aa714874daf914344f60ac8b89dbc8de /common | |
parent | 1ff1928f58f860d71210032d5f0a8e69eb482d2a (diff) | |
download | sink-9c31df56c894892f20a30dc336cfe608b14679e0.tar.gz sink-9c31df56c894892f20a30dc336cfe608b14679e0.zip |
consolidate command writing to avoid duplicating those 4 lines everywhere
Diffstat (limited to 'common')
-rw-r--r-- | common/CMakeLists.txt | 1 | ||||
-rw-r--r-- | common/commands.h | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index 6533e28..d409828 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt | |||
@@ -3,6 +3,7 @@ generate_flatbuffers(commands/handshake | |||
3 | commands/revisionupdate) | 3 | commands/revisionupdate) |
4 | 4 | ||
5 | set(command_SRCS | 5 | set(command_SRCS |
6 | commands.cpp | ||
6 | console.cpp | 7 | console.cpp |
7 | ${CMAKE_CURRENT_BINARY_DIR}/commands/handshake_generated.h) | 8 | ${CMAKE_CURRENT_BINARY_DIR}/commands/handshake_generated.h) |
8 | 9 | ||
diff --git a/common/commands.h b/common/commands.h index 68a7c1e..534308d 100644 --- a/common/commands.h +++ b/common/commands.h | |||
@@ -1,5 +1,9 @@ | |||
1 | #pragma once | 1 | #pragma once |
2 | 2 | ||
3 | #include <flatbuffers/flatbuffers.h> | ||
4 | |||
5 | class QIODevice; | ||
6 | |||
3 | namespace Commands | 7 | namespace Commands |
4 | { | 8 | { |
5 | 9 | ||
@@ -10,4 +14,6 @@ enum CommandIds { | |||
10 | CustomCommand = 0xffff | 14 | CustomCommand = 0xffff |
11 | }; | 15 | }; |
12 | 16 | ||
17 | void write(QIODevice *device, int commandId, flatbuffers::FlatBufferBuilder &fbb); | ||
18 | |||
13 | } \ No newline at end of file | 19 | } \ No newline at end of file |