1cac3c7815
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/hilnius@12870 178a84e3-b1eb-0310-8ba1-8eac791a3b58
36 lines
730 B
C++
36 lines
730 B
C++
#ifndef PROTOCOL_HPP
|
|
#define PROTOCOL_HPP
|
|
|
|
#include "protocol_manager.hpp"
|
|
#include "callback_object.hpp"
|
|
|
|
#include <stdint.h>
|
|
|
|
enum PROTOCOL_TYPE
|
|
{
|
|
GET_PUBLIC_ADDRESS = 0
|
|
};
|
|
|
|
class Protocol
|
|
{
|
|
public:
|
|
Protocol(CallbackObject* callbackObject);
|
|
virtual ~Protocol();
|
|
|
|
virtual void messageReceived(uint8_t* data) = 0;
|
|
|
|
void setListener(ProtocolManager* listener);
|
|
|
|
virtual void setup() = 0;
|
|
virtual void start() = 0;
|
|
virtual void update() = 0;
|
|
|
|
PROTOCOL_TYPE getProtocolType();
|
|
protected:
|
|
ProtocolManager* m_listener;
|
|
PROTOCOL_TYPE m_type;
|
|
CallbackObject* m_callbackObject;
|
|
};
|
|
|
|
#endif // PROTOCOL_HPP
|