2013-11-21 13:42:38 +01:00
|
|
|
#include "MessageTest.h"
|
|
|
|
|
|
|
|
using namespace Oyster::Network::Messages;
|
2013-11-21 14:49:30 +01:00
|
|
|
using namespace Oyster::Network::Protocols;
|
2013-11-21 13:42:38 +01:00
|
|
|
|
|
|
|
MessageTest::MessageTest()
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
MessageTest::~MessageTest()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2013-11-22 14:23:08 +01:00
|
|
|
void MessageTest::Translate(ProtocolHeader& header, unsigned char msg[])
|
2013-11-21 13:42:38 +01:00
|
|
|
{
|
2013-11-22 14:23:08 +01:00
|
|
|
MessageHeader::Translate(header, msg);
|
2013-11-21 13:42:38 +01:00
|
|
|
|
2013-11-22 14:23:08 +01:00
|
|
|
AddStr(static_cast<ProtocolTest*>(&header)->textMessage, msg);
|
2013-11-21 13:42:38 +01:00
|
|
|
}
|
|
|
|
|
2013-11-21 14:49:30 +01:00
|
|
|
void MessageTest::Translate(unsigned char message[], ProtocolHeader& header)
|
2013-11-21 13:42:38 +01:00
|
|
|
{
|
2013-11-21 14:49:30 +01:00
|
|
|
MessageHeader::Translate(message, header);
|
2013-11-21 13:42:38 +01:00
|
|
|
|
2013-11-21 14:49:30 +01:00
|
|
|
static_cast<ProtocolTest*>(&header)->textMessage = GetStr(message);
|
2013-11-21 13:42:38 +01:00
|
|
|
}
|