diff options
author | George Hazan <george.hazan@gmail.com> | 2015-08-11 13:33:42 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-08-11 13:33:42 +0000 |
commit | 85bd008c039eb1d93894e94fba9d158a42a71a12 (patch) | |
tree | 2d72d10759f6928e9e4b960175d2de01b5cf7e12 /protocols/Xfire/src/messageackpacket.cpp | |
parent | 222802c2986dcaf029fdfb828b7679bdabfa7bb2 (diff) |
massive code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@14910 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Xfire/src/messageackpacket.cpp')
-rw-r--r-- | protocols/Xfire/src/messageackpacket.cpp | 73 |
1 files changed, 38 insertions, 35 deletions
diff --git a/protocols/Xfire/src/messageackpacket.cpp b/protocols/Xfire/src/messageackpacket.cpp index 178e2c9717..c797404c50 100644 --- a/protocols/Xfire/src/messageackpacket.cpp +++ b/protocols/Xfire/src/messageackpacket.cpp @@ -28,48 +28,51 @@ #include "variablevalue.h" #include <iostream> -namespace xfirelib { +namespace xfirelib +{ + MessageACKPacket::MessageACKPacket() + { + memset(sid, 0, 16); + imindex = -1; + } - MessageACKPacket::MessageACKPacket() { - memset( sid, 0, 16 ); - imindex = -1; - } - MessageACKPacket::~MessageACKPacket() { - } + MessageACKPacket::~MessageACKPacket() + { + } - int MessageACKPacket::getPacketContent(char *buf) { - int index = 0; - VariableValue val; - val.setName("sid"); - val.setValue(sid,16); + int MessageACKPacket::getPacketContent(char *buf) + { + int index = 0; + VariableValue val; + val.setName("sid"); + val.setValue(sid, 16); - index += val.writeName(buf,index); - buf[index++] = 3; - index += val.writeValue(buf,index); + index += val.writeName(buf, index); + buf[index++] = 3; + index += val.writeValue(buf, index); - val.setName("peermsg"); - index += val.writeName(buf,index); - buf[index++] = 5; - buf[index++] = 2; + val.setName("peermsg"); + index += val.writeName(buf, index); + buf[index++] = 5; + buf[index++] = 2; - val.setName("msgtype"); - val.setValueFromLong(1,4); - index += val.writeName(buf,index); - buf[index++] = 2; - index += val.writeValue(buf,index); + val.setName("msgtype"); + val.setValueFromLong(1, 4); + index += val.writeName(buf, index); + buf[index++] = 2; + index += val.writeValue(buf, index); - val.setName("imindex"); - val.setValueFromLong(imindex,4); - index += val.writeName(buf,index); - buf[index++] = 02; - index += val.writeValue(buf,index); - - return index; - } - - void MessageACKPacket::parseContent(char *buf, int length, int numberOfAtts) { - } + val.setName("imindex"); + val.setValueFromLong(imindex, 4); + index += val.writeName(buf, index); + buf[index++] = 02; + index += val.writeValue(buf, index); + return index; + } + void MessageACKPacket::parseContent(char*, int, int) + { + } }; |