summaryrefslogtreecommitdiffstats
path: root/pacman-c++/util.h
diff options
context:
space:
mode:
Diffstat (limited to 'pacman-c++/util.h')
-rw-r--r--pacman-c++/util.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/pacman-c++/util.h b/pacman-c++/util.h
index 8bd03bc..4c0ccb0 100644
--- a/pacman-c++/util.h
+++ b/pacman-c++/util.h
@@ -3,6 +3,9 @@
3 3
4#include "constants.h" 4#include "constants.h"
5#include "actor.h" 5#include "actor.h"
6#include "pacman.pb.h"
7
8class QTcpSocket;
6 9
7namespace Util { 10namespace Util {
8 Transmission::map_t createUninitialisedMap(); 11 Transmission::map_t createUninitialisedMap();
@@ -16,5 +19,11 @@ namespace Util {
16 Transmission::field_t def = -1); 19 Transmission::field_t def = -1);
17 Actor::Movement transmissionMovementToActor(Transmission::field_t field, 20 Actor::Movement transmissionMovementToActor(Transmission::field_t field,
18 Actor::Movement def = Actor::Movement(-1)); 21 Actor::Movement def = Actor::Movement(-1));
22
23 void QByteArrayToStdString(const QByteArray& arr, std::string& str);
24
25 // send packet with error check and flush
26 void sendPacket(const ::google::protobuf::Message& packet, QTcpSocket *socket);
27 void sendPacket(const char *data, unsigned int length, QTcpSocket *socket);
19} 28}
20#endif // UTIL_H 29#endif // UTIL_H