Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

OutPacket Class Reference

#include <evapacket.h>

Inherits Packet.

Inherited by AddFriendAuthPacket, AddFriendPacket, ChangeStatusPacket, DeleteFriendPacket, DeleteMePacket, DownloadGroupFriendPacket, EvaGetLevelPacket, EvaMemoPacket, EvaRequestKeyPacket, GetFriendListPacket, GetOnlineFriendsPacket, GetUserInfoPacket, GroupNameOpPacket, KeepAlivePacket, LoginPacket, LogoutPacket, ModifyInfoPacket, QunPacket, ReceiveIMReplyPacket, RequestExtraInfoPacket, RequestLoginTokenPacket, SearchUserPacket, SendIM, SignaturePacket, and UploadGroupFriendPacket.

Inheritance diagram for OutPacket:

Inheritance graph
[legend]
Collaboration diagram for OutPacket:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 OutPacket ()
 OutPacket (const short command, const bool needAck)
 OutPacket (const OutPacket &rhs)
virtual ~OutPacket ()
const int getResendCount () const
bool fill (unsigned char *buf, int *len)
bool needAck () const
const bool needResend ()
OutPacketoperator= (const OutPacket &rhs)

Protected Member Functions

virtual int putBody (unsigned char *buf)

Private Member Functions

int putHead (unsigned char *buf)
void encryptBody (unsigned char *b, int length, unsigned char *decryptedBody, int *bodyLen)

Private Attributes

bool mNeedAck
int resendCount

Static Private Attributes

static short startSequenceNum = 5

Detailed Description

Definition at line 110 of file evapacket.h.


Constructor & Destructor Documentation

OutPacket::OutPacket  )  [inline]
 

Definition at line 112 of file evapacket.h.

OutPacket::OutPacket const short  command,
const bool  needAck
 

Definition at line 225 of file evapacket.cpp.

References mNeedAck, and resendCount.

OutPacket::OutPacket const OutPacket rhs  ) 
 

Definition at line 232 of file evapacket.cpp.

References getResendCount(), mNeedAck, needAck(), and resendCount.

Here is the call graph for this function:

virtual OutPacket::~OutPacket  )  [inline, virtual]
 

Definition at line 115 of file evapacket.h.


Member Function Documentation

void OutPacket::encryptBody unsigned char *  b,
int  length,
unsigned char *  decryptedBody,
int *  bodyLen
[private]
 

Definition at line 309 of file evapacket.cpp.

References Packet::command, EvaCrypt::encrypt(), Packet::getSessionKey(), QQ_CMD_LOGIN, QQ_CMD_REQUEST_LOGIN_TOKEN, and Packet::sessionKey.

Referenced by fill().

Here is the call graph for this function:

bool OutPacket::fill unsigned char *  buf,
int *  len
 

Definition at line 239 of file evapacket.cpp.

References encryptBody(), Packet::isUDP(), MAX_PACKET_SIZE, putBody(), putHead(), and QQ_PACKET_TAIL.

Here is the call graph for this function:

const int OutPacket::getResendCount  )  const [inline]
 

Definition at line 117 of file evapacket.h.

References resendCount.

Referenced by operator=(), and OutPacket().

bool OutPacket::needAck  )  const [inline]
 

Definition at line 120 of file evapacket.h.

References mNeedAck.

Referenced by operator=(), and OutPacket().

const bool OutPacket::needResend  )  [inline]
 

Definition at line 121 of file evapacket.h.

References resendCount.

OutPacket & OutPacket::operator= const OutPacket rhs  ) 
 

Definition at line 266 of file evapacket.cpp.

References getResendCount(), mNeedAck, needAck(), and resendCount.

Here is the call graph for this function:

int OutPacket::putBody unsigned char *  buf  )  [protected, virtual]
 

Reimplemented in AddFriendPacket, AddFriendAuthPacket, DeleteFriendPacket, DeleteMePacket, RequestExtraInfoPacket, SignaturePacket, GetFriendListPacket, GroupNameOpPacket, DownloadGroupFriendPacket, UploadGroupFriendPacket, ReceiveIMReplyPacket, SendIM, EvaRequestKeyPacket, EvaGetLevelPacket, LoginPacket, LogoutPacket, KeepAlivePacket, RequestLoginTokenPacket, EvaMemoPacket, GetOnlineFriendsPacket, ChangeStatusPacket, QunGetInfoPacket, QunGetMemberInfoPacket, QunGetOnlineMemberPacket, QunActivatePacket, QunAuthPacket, QunSendIMPacket, QunSendIMExPacket, QunSearchPacket, QunJoinPacket, QunModifyPacket, QunRequestCardPacket, QunModifyCardPacket, QunAdminOpPacket, QunTransferPacket, QunModifyMemberPacket, QunExitPacket, QunCreatePacket, QunActivePacket, QunRequestAllRealNames, SearchUserPacket, GetUserInfoPacket, and ModifyInfoPacket.

Definition at line 274 of file evapacket.cpp.

Referenced by fill().

int OutPacket::putHead unsigned char *  buf  )  [private]
 

Definition at line 281 of file evapacket.cpp.

References Packet::command, Packet::getQQ(), Packet::isUDP(), QQ_PACKET_TAG, Packet::sequence, and Packet::version.

Referenced by fill().

Here is the call graph for this function:


Member Data Documentation

bool OutPacket::mNeedAck [private]
 

Definition at line 129 of file evapacket.h.

Referenced by needAck(), operator=(), and OutPacket().

int OutPacket::resendCount [private]
 

Definition at line 130 of file evapacket.h.

Referenced by getResendCount(), needResend(), operator=(), and OutPacket().

short OutPacket::startSequenceNum = 5 [static, private]
 

Definition at line 128 of file evapacket.h.


The documentation for this class was generated from the following files:
Generated on Mon May 15 20:51:41 2006 for libeva by  doxygen 1.4.4