Changeset 4715
- Timestamp:
- 10/18/06 19:55:29 (2 years ago)
- Location:
- trunk/licq
- Files:
-
- 2 modified
-
include/licq_packets.h (modified) (29 diffs)
-
src/icqpacket.cpp (modified) (16 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/licq/include/licq_packets.h
r4714 r4715 43 43 { 44 44 public: 45 CPX_FileTransfer(ConstFileList &lFileList, const char *szFileName); 46 47 virtual ~CPX_FileTransfer(); 48 49 bool IsValid() { return m_bValid; } 50 ConstFileList GetFileList() { return m_lFileList; } 51 const char *GetFilename() { return m_szFilename; } 52 const char *GetDescription() { return m_szDesc; } 53 unsigned long GetFileSize() { return m_nFileSize; } 54 55 protected: 56 CPX_FileTransfer(); 57 58 bool m_bValid; 59 char *m_szDesc; 60 char *m_szFilename; 61 ConstFileList m_lFileList; 62 unsigned long m_nFileSize; 45 CPX_FileTransfer(ConstFileList &lFileList, const char *szFileName); 46 virtual ~CPX_FileTransfer(); 47 48 bool IsValid() { return m_bValid; } 49 ConstFileList GetFileList() { return m_lFileList; } 50 const char *GetFilename() { return m_szFilename; } 51 const char *GetDescription() { return m_szDesc; } 52 unsigned long GetFileSize() { return m_nFileSize; } 53 54 protected: 55 CPX_FileTransfer(); 56 57 bool m_bValid; 58 char *m_szDesc; 59 char *m_szFilename; 60 ConstFileList m_lFileList; 61 unsigned long m_nFileSize; 63 62 }; 64 63 … … 70 69 { 71 70 public: 72 virtual ~CPacket() { if (buffer != NULL) delete buffer; }71 virtual ~CPacket(); 73 72 74 73 CBuffer *getBuffer() { return buffer; }; … … 96 95 97 96 protected: 98 CPacket() { buffer = NULL; };97 CPacket(); 99 98 100 99 CBuffer *buffer; … … 114 113 { 115 114 public: 115 virtual ~CSrvPacketTcp(); 116 116 117 // Packet details 117 118 virtual const unsigned char Channel() { return m_nChannel; } … … 155 156 { 156 157 public: 158 virtual ~CPacketUdp(); 159 157 160 virtual CBuffer *Finalize(INetSocket *); 158 161 virtual const unsigned short Sequence() { return m_nSequence; } … … 199 202 public: 200 203 CPU_Logon(const char *_szPassword, const char *_szUin, unsigned short _nLogonStatus); 204 virtual ~CPU_Logon(); 201 205 protected: 202 206 unsigned long m_nLogonStatus; … … 209 213 public: 210 214 CPU_Logoff(); 215 virtual ~CPU_Logoff(); 211 216 }; 212 217 … … 216 221 public: 217 222 CPU_SendCookie(const char *, int len); 223 virtual ~CPU_SendCookie(); 218 224 }; 219 225 … … 223 229 public: 224 230 CPU_CommonFamily(unsigned short Family, unsigned short SubType); 231 virtual ~CPU_CommonFamily(); 225 232 226 233 protected: … … 231 238 { 232 239 public: 233 CPU_GenericFamily(unsigned short Family, unsigned short SubType);234 240 CPU_GenericFamily(unsigned short Family, unsigned short SubType); 241 virtual ~CPU_GenericFamily(); 235 242 }; 236 243 … … 268 275 public: 269 276 CPU_Register(const char *_szPasswd); 277 virtual ~CPU_Register(); 270 278 }; 271 279 #elif ICQ_VERSION > 6 … … 274 282 public: 275 283 CPU_RegisterFirst(); 284 virtual ~CPU_RegisterFirst(); 276 285 }; 277 286 … … 280 289 public: 281 290 CPU_Register(const char *_szPasswd); 291 virtual ~CPU_Register(); 282 292 }; 283 293 #endif … … 288 298 public: 289 299 CPU_VerifyRegistration(); 300 virtual ~CPU_VerifyRegistration(); 290 301 }; 291 302 … … 295 306 public: 296 307 CPU_SendVerification(const char *, const char *); 308 virtual ~CPU_SendVerification(); 297 309 }; 298 310 … … 371 383 public: 372 384 CPU_AddPDINFOToServerList(); 373 385 374 386 unsigned short GetSID() { return m_nSID; } 375 387 unsigned short GetGSID() { return m_nGSID; } 376 388 377 389 protected: 378 390 unsigned short m_nSID, … … 390 402 unsigned short GetSID() { return m_nSID; } 391 403 unsigned short GetGSID() { return m_nGSID; } 392 404 393 405 protected: 394 406 unsigned short m_nSID, … … 407 419 class CPU_ClearServerList : public CPU_CommonFamily 408 420 { 409 public:421 public: 410 422 CPU_ClearServerList(UserStringList &, unsigned short); 411 423 }; … … 430 442 { 431 443 public: 432 CPU_SetStatus(unsigned long _nNewStatus);444 CPU_SetStatus(unsigned long _nNewStatus); 433 445 434 446 private: 435 unsigned long m_nNewStatus;447 unsigned long m_nNewStatus; 436 448 }; 437 449 … … 439 451 { 440 452 public: 441 CPU_SetStatusFamily();442 443 protected: 444 void InitBuffer();445 unsigned long m_nNewStatus;453 CPU_SetStatusFamily(); 454 455 protected: 456 void InitBuffer(); 457 unsigned long m_nNewStatus; 446 458 }; 447 459 … … 752 764 public: 753 765 CPU_FileTransfer(ICQUser *, ConstFileList &lFileList, const char *_szFile, 754 const char *_szDesc, unsigned short nLevel, bool bICBM);766 const char *_szDesc, unsigned short nLevel, bool bICBM); 755 767 }; 756 768 … … 837 849 CPU_InfoPluginListResp(ICQUser *u, unsigned long nMsgID1, 838 850 unsigned long nMsgID2, unsigned short nSequence); 839 840 851 }; 841 852 … … 1102 1113 public: 1103 1114 CPU_Meta_SetAbout(const char *szAbout); 1104 ~CPU_Meta_SetAbout();1115 virtual ~CPU_Meta_SetAbout(); 1105 1116 virtual const unsigned short SubCommand() { return m_nMetaCommand; } 1106 1117 protected: … … 1135 1146 protected: 1136 1147 unsigned short m_nMetaCommand; 1137 1138 char *m_szPassword; 1139 1148 char *m_szPassword; 1149 1140 1150 friend class CICQDaemon; 1141 1151 }; … … 1167 1177 public: 1168 1178 CPU_Meta_RequestAllInfo(const char *_szId); 1169 virtual ~CPU_Meta_RequestAllInfo() { free(m_szId); }1179 virtual ~CPU_Meta_RequestAllInfo(); 1170 1180 virtual const unsigned short SubCommand() { return m_nMetaCommand; } 1171 1181 const char *Id() { return m_szId; } … … 1181 1191 public: 1182 1192 CPU_Meta_RequestBasicInfo(const char *_szId); 1183 virtual ~CPU_Meta_RequestBasicInfo() { free(m_szId); }1193 virtual ~CPU_Meta_RequestBasicInfo(); 1184 1194 virtual const unsigned short SubCommand() { return m_nMetaCommand; } 1185 1195 const char *Id() { return m_szId; } … … 1277 1287 unsigned long SessionId() { return m_nSessionId; } 1278 1288 unsigned long Id() { return m_nId; } 1279 1289 1280 1290 protected: 1281 1291 char m_nHandshake; … … 1353 1363 bool m_bPluginReq; 1354 1364 size_t m_nMsgLen; 1355 1365 1356 1366 char *m_szLocalPortOffset; 1357 1367 unsigned short m_nLevel; … … 1453 1463 CPT_Ack(unsigned short _nSubCommand, unsigned short _nSequence, 1454 1464 bool _bAccept, bool _bUrgent, ICQUser *_cUser); 1465 virtual ~CPT_Ack(); 1455 1466 }; 1456 1467 -
trunk/licq/src/icqpacket.cpp
r4714 r4715 287 287 } 288 288 289 CSrvPacketTcp::~CSrvPacketTcp() 290 { 291 // Empty 292 } 293 289 294 CBuffer *CSrvPacketTcp::Finalize(INetSocket *) 290 295 { … … 499 504 unsigned short CPacket::s_nLocalPort = 0; 500 505 char CPacket::s_nMode = MODE_DIRECT; 506 507 CPacket::CPacket() : buffer(NULL) 508 { 509 // Empty 510 } 511 512 CPacket::~CPacket() 513 { 514 delete buffer; 515 } 501 516 502 517 //----SetIps----------------------------------------------------------------- … … 574 589 } 575 590 591 CPacketUdp::~CPacketUdp() 592 { 593 // Empty 594 } 576 595 577 596 void CPacketUdp::InitBuffer() … … 655 674 } 656 675 676 CPU_Register::~CPU_Register() 677 { 678 // Empty 679 } 680 657 681 #elif ICQ_VERSION >= 7 658 682 … … 671 695 672 696 buffer->PackUnsignedLongBE(1); 697 } 698 699 CPU_RegisterFirst::~CPU_RegisterFirst() 700 { 701 // Empty 673 702 } 674 703 … … 695 724 } 696 725 726 CPU_Register::~CPU_Register() 727 { 728 // Empty 729 } 730 697 731 #endif 698 732 … … 703 737 704 738 InitBuffer(); 739 } 740 741 CPU_VerifyRegistration::~CPU_VerifyRegistration() 742 { 743 // Empty 705 744 } 706 745 … … 732 771 } 733 772 773 CPU_SendVerification::~CPU_SendVerification() 774 { 775 // Empty 776 } 777 734 778 //-----Logon-------------------------------------------------------------------- 735 779 CPU_Logon::CPU_Logon(const char *szPassword, const char *szUin, unsigned short _nLogonStatus) … … 798 842 } 799 843 844 CPU_Logon::~CPU_Logon() 845 { 846 // Empty 847 } 848 800 849 //-----SendCookie------------------------------------------------------------ 801 850 CPU_SendCookie::CPU_SendCookie(const char *szCookie, int nLen) … … 811 860 buffer->PackUnsignedLongBE(0x00000001); 812 861 buffer->PackTLV(0x0006, nLen, szCookie); 862 } 863 864 CPU_SendCookie::~CPU_SendCookie() 865 { 866 // Empty 813 867 } 814 868 … … 1157 1211 } 1158 1212 1213 CPU_GenericFamily::~CPU_GenericFamily() 1214 { 1215 // Empty 1216 } 1217 1159 1218 CPU_CommonFamily::CPU_CommonFamily(unsigned short Family, unsigned short SubType) 1160 1219 : CSrvPacketTcp(ICQ_CHNxDATA) … … 1164 1223 m_nFamily = Family; 1165 1224 m_nSubType = SubType; 1225 } 1226 1227 CPU_CommonFamily::~CPU_CommonFamily() 1228 { 1229 // Empty 1166 1230 } 1167 1231 … … 2504 2568 } 2505 2569 2570 CPU_Logoff::~CPU_Logoff() 2571 { 2572 // Empty 2573 } 2574 2506 2575 //-----RequestList-------------------------------------------------------------- 2507 2576 CPU_RequestList::CPU_RequestList() … … 4009 4078 } 4010 4079 4080 CPU_Meta_RequestAllInfo::~CPU_Meta_RequestAllInfo() 4081 { 4082 free(m_szId); 4083 } 4011 4084 4012 4085 //-----Meta_RequestInfo------------------------------------------------------ … … 4028 4101 buffer->PackUnsignedShort(m_nSubSequence); 4029 4102 buffer->PackUnsignedLong(strtoul(m_szId, (char **)NULL, 10)); 4103 } 4104 4105 CPU_Meta_RequestBasicInfo::~CPU_Meta_RequestBasicInfo() 4106 { 4107 free(m_szId); 4030 4108 } 4031 4109 … … 4923 5001 } 4924 5002 5003 CPT_Ack::~CPT_Ack() 5004 { 5005 // Empty 5006 } 4925 5007 4926 5008 //-----AckGeneral---------------------------------------------------------------
