diff options
Diffstat (limited to 'protocols/Xfire/src/messagepacket.h')
-rw-r--r-- | protocols/Xfire/src/messagepacket.h | 54 |
1 files changed, 26 insertions, 28 deletions
diff --git a/protocols/Xfire/src/messagepacket.h b/protocols/Xfire/src/messagepacket.h index fe867ef96b..f869161393 100644 --- a/protocols/Xfire/src/messagepacket.h +++ b/protocols/Xfire/src/messagepacket.h @@ -25,39 +25,37 @@ #include "xfirerecvpacketcontent.h" #include "variablevalue.h" -#include <string> #define XFIRE_MESSAGE_ID 133 namespace xfirelib { - class MessagePacket : public XFireRecvPacketContent { - public: - - MessagePacket(); - XFirePacketContent* newPacket() { return new MessagePacket(); } - - int getPacketContent(char *packet); - int getPacketId() { return packetID; } - int getPacketSize() { return 1024; }; - void parseContent(char *buf, int length, int numberOfAtts); - std::string getMessage() {return message; } - int getMessageType(){return msgtype->getValue()[0];} - int getImIndex(){ return imindex->getValue()[0];}//TODO: fix this if we have more than 255 messages - int getPacketAttributeCount(){ return 2; } - char * getSid(){ return sid->getValue(); } - - private: - VariableValue *sid; - VariableValue *peermsg; - VariableValue *msgtype; - VariableValue *imindex; - std::string message; - char buf[150]; - int bufLength; - int packetID;//Special case because we have to answer this packet with id 2 - }; + class MessagePacket : public XFireRecvPacketContent { + public: + + MessagePacket(); + XFirePacketContent* newPacket() { return new MessagePacket(); } + + int getPacketContent(char *packet); + int getPacketId() { return packetID; } + int getPacketSize() { return 1024; }; + void parseContent(char *buf, int length, int numberOfAtts); + std::string getMessage() {return message; } + int getMessageType(){return msgtype->getValue()[0];} + int getImIndex(){ return imindex->getValue()[0];}//TODO: fix this if we have more than 255 messages + int getPacketAttributeCount(){ return 2; } + char * getSid(){ return sid->getValue(); } + + private: + VariableValue *sid; + VariableValue *peermsg; + VariableValue *msgtype; + VariableValue *imindex; + std::string message; + char buf[150]; + int bufLength; + int packetID;//Special case because we have to answer this packet with id 2 + }; }; - #endif |