summaryrefslogtreecommitdiff
path: root/common/payload.h
diff options
context:
space:
mode:
authorVegard Storheil Eriksen <zyp@jvnv.net>2010-11-15 04:58:54 +0100
committerVegard Storheil Eriksen <zyp@jvnv.net>2010-11-15 04:58:54 +0100
commitbe08c29dd5e18c41b5c2f05b7178bab90f04e026 (patch)
tree98ad4c1bb0884df8345fa2f6ef0426b0929f9a54 /common/payload.h
parentc9b9d15a585df8f01b49510e4ff0dfb53ee7b9ef (diff)
Changed Message-API. Implemented Hello, Login, LoginResponse.
Diffstat (limited to 'common/payload.h')
-rw-r--r--common/payload.h49
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