diff options
Diffstat (limited to 'common/payload.h')
-rw-r--r-- | common/payload.h | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/common/payload.h b/common/payload.h deleted file mode 100644 index fbdcd1d..0000000 --- a/common/payload.h +++ /dev/null @@ -1,49 +0,0 @@ -#ifndef PAYLOAD_H -#define PAYLOAD_H - -#include <utility> -#include <stdint.h> - -namespace Payload { - namespace Types { - //! Payload types. - enum Type { - Undefined, - Hello, - Login, - LoginResponse, - LobbyStatus, - LobbyAction, - GameStart, - Ready, - RoundStart, - RoundState, - RoundAction, - RoundEnd, - GameEnd - }; - } - using Types::Type; - - class Base { - protected: - friend class Message; - - virtual std::pair<uint8_t*, std::size_t> serialize() = 0; - - Base(Type t) : type(t) {} - - public: - const Type type; - }; - - class Hello : public Base { - protected: - virtual std::pair<uint8_t*, std::size_t> serialize(); - - public: - Hello() : Base(Types::Hello) {} - }; -}; - -#endif |