2013-11-21 14:49:30 +01:00
|
|
|
#ifndef NETWORK_DEPENDENCIES_TRANSLATOR_H
|
|
|
|
#define NETWORK_DEPENDENCIES_TRANSLATOR_H
|
|
|
|
|
2013-11-25 11:39:38 +01:00
|
|
|
//////////////////////////////////
|
|
|
|
// Created by Sam Svensson 2013 //
|
|
|
|
//////////////////////////////////
|
|
|
|
|
2013-11-21 14:49:30 +01:00
|
|
|
#include "Messages/MessagesInclude.h"
|
|
|
|
#include "Protocols.h"
|
|
|
|
#include "ITranslate.h"
|
|
|
|
|
|
|
|
namespace Oyster
|
|
|
|
{
|
|
|
|
namespace Network
|
|
|
|
{
|
|
|
|
class Translator : public ITranslate
|
|
|
|
{
|
|
|
|
public:
|
2013-11-22 14:23:08 +01:00
|
|
|
Translator () { msg = new unsigned char[256]; };
|
|
|
|
~Translator() { if(msg != NULL) { delete [] this->msg; }};
|
2013-11-21 14:49:30 +01:00
|
|
|
|
|
|
|
unsigned char* Translate (Protocols::ProtocolHeader &header );
|
2013-11-22 11:40:55 +01:00
|
|
|
Protocols::ProtocolSet* Translate (Protocols::ProtocolSet* set, unsigned char msg[] );
|
|
|
|
|
|
|
|
private:
|
2013-11-22 14:23:08 +01:00
|
|
|
unsigned char* msg;
|
2013-11-22 11:40:55 +01:00
|
|
|
|
2013-11-21 14:49:30 +01:00
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|