From: Manuel A. F. M. <ma...@us...> - 2005-10-28 16:26:19
|
Update of /cvsroot/once/oncecode/src/common/netmsg In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30443 Modified Files: occontactlistmsgs.cpp occontactlistmsgs.h Log Message: Small changes for the contacts Index: occontactlistmsgs.h =================================================================== RCS file: /cvsroot/once/oncecode/src/common/netmsg/occontactlistmsgs.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** occontactlistmsgs.h 7 Apr 2005 20:50:49 -0000 1.2 --- occontactlistmsgs.h 28 Oct 2005 16:26:09 -0000 1.3 *************** *** 21,25 **** #define OC_CONTACTLISTMSGS_H - #include "csutil/csstring.h" #include "common/ocidentifier.h" #include "common/ocserialize.h" --- 21,24 ---- *************** *** 47,59 **** public: /// character name ! csString charname; /// type (friend, enemy, other) ! uint32 type; ! /// connected ! bool connected; /// last login ! csString last_login; /// comment ! csString comment; }; --- 46,58 ---- public: /// character name ! std::string charname; /// type (friend, enemy, other) ! char type; ! /// status ! char status; /// last login ! std::string last_login; /// comment ! std::string comment; }; *************** *** 80,88 **** public: /// character name ! csString charname; /// type (friend, enemy, other) ! uint32 type; /// comment ! csString comment; }; --- 79,87 ---- public: /// character name ! std::string charname; /// type (friend, enemy, other) ! char type; /// comment ! std::string comment; }; *************** *** 109,113 **** public: /// character name ! csString charname; }; --- 108,112 ---- public: /// character name ! std::string charname; }; Index: occontactlistmsgs.cpp =================================================================== RCS file: /cvsroot/once/oncecode/src/common/netmsg/occontactlistmsgs.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** occontactlistmsgs.cpp 7 Apr 2005 20:50:49 -0000 1.2 --- occontactlistmsgs.cpp 28 Oct 2005 16:26:09 -0000 1.3 *************** *** 20,26 **** --- 20,28 ---- #include "config.h" #include "common/oclogger.h" + #include "common/ocserialize.h" #include "occontactlistmsgs.h" + //------------------ ocContactStatusMsg ---------------------------- unsigned int ocContactStatusMsg::ocClassID = CLASSTYPE('c','l','s','t'); *************** *** 55,60 **** OCTRACE("ocContactStatusMsg::Serialize"); buf.WriteString(charname); ! buf.WriteUInt32(type); ! buf.WriteBool(connected); buf.WriteString(last_login); buf.WriteString(comment); --- 57,62 ---- OCTRACE("ocContactStatusMsg::Serialize"); buf.WriteString(charname); ! buf.WriteChar(type); ! buf.WriteChar(status); buf.WriteString(last_login); buf.WriteString(comment); *************** *** 65,70 **** OCTRACE("ocContactStatusMsg::Deserialize"); if(!buf.ReadString(me->charname)) return false; ! if(!buf.ReadUInt32(me->type)) return false; ! if(!buf.ReadBool(me->connected)) return false; if(!buf.ReadString(me->last_login)) return false; if(!buf.ReadString(me->comment)) return false; --- 67,72 ---- OCTRACE("ocContactStatusMsg::Deserialize"); if(!buf.ReadString(me->charname)) return false; ! if(!buf.ReadChar(me->type)) return false; ! if(!buf.ReadChar(me->status)) return false; if(!buf.ReadString(me->last_login)) return false; if(!buf.ReadString(me->comment)) return false; *************** *** 111,115 **** OCTRACE("ocContactAddMsg::Serialize"); buf.WriteString(charname); ! buf.WriteUInt32(type); buf.WriteString(comment); } --- 113,117 ---- OCTRACE("ocContactAddMsg::Serialize"); buf.WriteString(charname); ! buf.WriteChar(type); buf.WriteString(comment); } *************** *** 119,123 **** OCTRACE("ocContactAddMsg::Deserialize"); if(!buf.ReadString(me->charname)) return false; ! if(!buf.ReadUInt32(me->type)) return false; if(!buf.ReadString(me->comment)) return false; return true; --- 121,125 ---- OCTRACE("ocContactAddMsg::Deserialize"); if(!buf.ReadString(me->charname)) return false; ! if(!buf.ReadChar(me->type)) return false; if(!buf.ReadString(me->comment)) return false; return true; |