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

CEDClient Class Reference

#include <EDClient.h>

Inheritance diagram for CEDClient:

CTransfer CConnection List of all members.

Public Member Functions

 CEDClient ()
virtual ~CEDClient ()
BOOL ConnectTo (DWORD nClientID, WORD nClientPort, IN_ADDR *pServerAddress, WORD nServerPort, GGUID *pGUID)
BOOL Equals (CEDClient *pClient)
BOOL Connect ()
void Remove ()
void Merge (CEDClient *pClient)
void Send (CEDPacket *pPacket, BOOL bRelease=TRUE)
void OnRunEx (DWORD tNow)
BOOL AttachDownload (CDownloadTransferED2K *pDownload)
void OnDownloadClose ()
void OnUploadClose ()
CString GetSourceURL ()
void WritePartStatus (CEDPacket *pPacket, CDownload *pDownload)
BOOL SeekNewDownload (CDownloadSource *pExcept=NULL)
void OpenChat ()
BOOL SendCommentsPacket (int nRating, LPCTSTR pszComments)
virtual void AttachTo (CConnection *pConnection)
virtual void Close ()
BOOL OnUdpReask (CEDPacket *pPacket)
BOOL OnUdpReaskAck (CEDPacket *pPacket)
BOOL OnUdpQueueFull (CEDPacket *pPacket)
BOOL OnUdpFileNotFound (CEDPacket *pPacket)
BOOL IsOnline () const

Public Attributes

CEDClientm_pEdPrev
CEDClientm_pEdNext
BOOL m_bGUID
GGUID m_pGUID
DWORD m_nClientID
WORD m_nUDP
SOCKADDR_IN m_pServer
CString m_sNick
int m_nVersion
BOOL m_bEmule
int m_nEmVersion
int m_nEmCompatible
DWORD m_nSoftwareVersion
BOOL m_bEmAICH
BOOL m_bEmUnicode
BOOL m_bEmUDPVersion
BOOL m_bEmDeflate
BOOL m_bEmSecureID
BOOL m_bEmSources
BOOL m_bEmRequest
BOOL m_bEmComments
BOOL m_bEmPeerCache
BOOL m_bEmBrowse
BOOL m_bEmMultiPacket
BOOL m_bEmPreview
BOOL m_bLogin
BOOL m_bUpMD4
MD4 m_pUpMD4
QWORD m_nUpSize
CDownloadTransferED2Km_pDownload
CUploadTransferED2Km_pUpload
BOOL m_bSeeking
DWORD m_nRunExCookie
BOOL m_bOpenChat
BOOL m_bCommentSent

Protected Member Functions

void DeriveSoftwareVersion ()
void DeriveVersion ()
BOOL OnLoggedIn ()
void DetachDownload ()
void DetachUpload ()
void NotifyDropped (BOOL bError=TRUE)
virtual BOOL OnRun ()
virtual BOOL OnConnected ()
virtual void OnDropped (BOOL bError)
virtual BOOL OnWrite ()
virtual BOOL OnRead ()
BOOL OnPacket (CEDPacket *pPacket)
void SendHello (BYTE nType)
BOOL OnHello (CEDPacket *pPacket)
void SendEmuleInfo (BYTE nType)
BOOL OnEmuleInfo (CEDPacket *pPacket)
BOOL OnFileRequest (CEDPacket *pPacket)
BOOL OnFileStatusRequest (CEDPacket *pPacket)
BOOL OnHashsetRequest (CEDPacket *pPacket)
BOOL OnQueueRequest (CEDPacket *pPacket)
BOOL OnSourceRequest (CEDPacket *pPacket)
BOOL OnSourceAnswer (CEDPacket *pPacket)
BOOL OnMessage (CEDPacket *pPacket)

Constructor & Destructor Documentation

CEDClient::CEDClient  ) 
 

Definition at line 58 of file EDClient.cpp.

References CEDClients::Add(), CSettings::Bandwidth, EDClients, m_bCommentSent, m_bEmAICH, m_bEmBrowse, m_bEmComments, m_bEmDeflate, m_bEmMultiPacket, m_bEmPeerCache, m_bEmPreview, m_bEmRequest, m_bEmSecureID, m_bEmSources, m_bEmUDPVersion, m_bEmule, m_bEmUnicode, m_bGUID, m_bLogin, m_bOpenChat, m_bSeeking, m_bUpMD4, CConnection::m_mInput, CConnection::m_mOutput, m_nClientID, m_nEmCompatible, m_nEmVersion, m_nRunExCookie, m_nSoftwareVersion, m_nUDP, m_pDownload, m_pEdNext, m_pEdPrev, m_pGUID, m_pUpload, NULL, TCPBandwidthMeter::pLimit, CSettings::sBandwidth::Request, and Settings.

CEDClient::~CEDClient  )  [virtual]
 

Definition at line 106 of file EDClient.cpp.

References EDClients, CConnection::m_hSocket, m_pDownload, m_pUpload, NULL, and CEDClients::Remove().


Member Function Documentation

BOOL CEDClient::AttachDownload CDownloadTransferED2K pDownload  ) 
 

Definition at line 337 of file EDClient.cpp.

References Connect(), m_bLogin, CConnection::m_hSocket, m_pDownload, NULL, and CDownloadTransferED2K::OnConnected().

Referenced by CDownloadTransferED2K::Initiate().

void CEDClient::AttachTo CConnection pConnection  )  [virtual]
 

Reimplemented from CTransfer.

Definition at line 310 of file EDClient.cpp.

References CTransfer::AttachTo(), IDS_ED2K_CLIENT_ACCEPTED, CConnection::m_hSocket, CConnection::m_sAddress, CShareazaApp::Message(), MSG_DEFAULT, and theApp.

Referenced by CEDClients::OnAccept().

void CEDClient::Close  )  [virtual]
 

Reimplemented from CTransfer.

Definition at line 320 of file EDClient.cpp.

References CTransfer::Close(), dtsDownloading, dtsNull, CConnection::m_bConnected, m_bLogin, CDownloadTransfer::m_nState, m_pDownload, CShareazaApp::Message(), MSG_ERROR, NULL, CDownloadTransfer::SetState(), and theApp.

Referenced by OnDropped(), OnEmuleInfo(), OnHello(), OnRun(), and Remove().

BOOL CEDClient::Connect  ) 
 

Definition at line 166 of file EDClient.cpp.

References CConnection::ConnectTo(), dtsQueued, EDClients, IDS_ED2K_CLIENT_CONNECTING, CEDClients::IsFull(), CEDPacket::IsLowID(), CEDClients::IsOverloaded(), CConnection::m_hSocket, m_nClientID, CDownloadTransfer::m_nState, m_pDownload, CConnection::m_pHost, m_pServer, CConnection::m_sAddress, CConnection::m_tConnected, CShareazaApp::Message(), MSG_DEFAULT, MSG_ERROR, Neighbours, CNeighboursWithED2K::PushDonkey(), and theApp.

Referenced by AttachDownload(), CUploadTransferED2K::CheckRanking(), CChatWindows::OpenPrivate(), CEDClients::PushTo(), CDownloadTransferED2K::RunQueued(), and CChatSession::SendChatMessage().

BOOL CEDClient::ConnectTo DWORD  nClientID,
WORD  nClientPort,
IN_ADDR *  pServerAddress,
WORD  nServerPort,
GGUID pGUID
 

Definition at line 118 of file EDClient.cpp.

References m_bGUID, m_nClientID, m_pGUID, CConnection::m_pHost, m_pServer, and NULL.

Referenced by CEDClients::Connect().

void CEDClient::DeriveSoftwareVersion  )  [protected]
 

Definition at line 1058 of file EDClient.cpp.

References DeriveVersion(), CDownloadSource::m_bClientExtended, m_bEmule, m_nEmCompatible, m_nSoftwareVersion, m_pDownload, CDownloadTransfer::m_pSource, m_pUpload, and CConnection::m_sUserAgent.

Referenced by OnHello().

void CEDClient::DeriveVersion  )  [protected]
 

Definition at line 1142 of file EDClient.cpp.

References _tcsistr(), ED2K_CLIENT_MOD, ED2K_CLIENT_UNKNOWN, CDownloadSource::m_bClientExtended, m_bEmule, m_nEmCompatible, m_nEmVersion, m_nSoftwareVersion, m_nVersion, m_pDownload, m_pGUID, CDownloadTransfer::m_pSource, m_pUpload, m_sNick, CConnection::m_sUserAgent, and GGUID::n.

Referenced by DeriveSoftwareVersion(), and OnEmuleInfo().

void CEDClient::DetachDownload  )  [protected]
 

Definition at line 371 of file EDClient.cpp.

References CDownloadTransferED2K::Close(), m_bSeeking, m_pDownload, NULL, and TS_UNKNOWN.

Referenced by Merge(), and Remove().

void CEDClient::DetachUpload  )  [protected]
 

Definition at line 385 of file EDClient.cpp.

References CUploadTransferED2K::Close(), m_pUpload, and NULL.

Referenced by Merge(), OnQueueRequest(), and Remove().

BOOL CEDClient::Equals CEDClient pClient  ) 
 

Definition at line 146 of file EDClient.cpp.

References CEDPacket::IsLowID(), m_bGUID, m_nClientID, m_pGUID, CConnection::m_pHost, m_pServer, and NULL.

CString CEDClient::GetSourceURL  ) 
 

Definition at line 1587 of file EDClient.cpp.

References CED2K::HashToString(), CEDPacket::IsLowID(), m_bGUID, m_bUpMD4, m_nClientID, m_nUpSize, CConnection::m_pHost, and m_pUpMD4.

Referenced by OnFileStatusRequest().

BOOL CEDClient::IsOnline  )  const [inline]
 

Definition at line 141 of file EDClient.h.

References CConnection::m_bConnected, and m_bLogin.

Referenced by CUploadTransferED2K::CheckRanking(), CUploadTransferED2K::Close(), CUploadTransferED2K::OnQueueKick(), CUploadTransferED2K::OnRunEx(), CDownloadTransferED2K::RunQueued(), CChatSession::SendChatMessage(), and CUploadTransferED2K::ServeRequests().

void CEDClient::Merge CEDClient pClient  ) 
 

Definition at line 219 of file EDClient.cpp.

References CSettings::Bandwidth, DetachDownload(), DetachUpload(), Downloads, m_bCommentSent, m_bEmAICH, m_bEmBrowse, m_bEmComments, m_bEmDeflate, m_bEmMultiPacket, m_bEmPeerCache, m_bEmPreview, m_bEmRequest, m_bEmSecureID, m_bEmSources, m_bEmUDPVersion, m_bEmUnicode, m_bOpenChat, CConnection::m_mInput, CConnection::m_mOutput, m_nEmCompatible, m_nEmVersion, CDownloads::m_nLimitDonkey, m_nSoftwareVersion, CUploadTransferED2K::m_pClient, CDownloadTransferED2K::m_pClient, CDownloadTransfer::m_pDownload, m_pDownload, m_pUpload, NULL, TCPBandwidthMeter::pLimit, CSettings::sBandwidth::Request, and Settings.

void CEDClient::NotifyDropped BOOL  bError = TRUE  )  [protected]
 

Definition at line 490 of file EDClient.cpp.

References m_bSeeking, m_pDownload, m_pUpload, NULL, CUploadTransferED2K::OnDropped(), and CDownloadTransferED2K::OnDropped().

Referenced by OnDropped(), and OnRun().

BOOL CEDClient::OnConnected  )  [protected, virtual]
 

Reimplemented from CConnection.

Definition at line 474 of file EDClient.cpp.

References ED2K_C2C_HELLO, and SendHello().

void CEDClient::OnDownloadClose  ) 
 

Definition at line 350 of file EDClient.cpp.

References CSettings::Bandwidth, CConnection::m_mInput, m_pDownload, CDownloadTransfer::m_pSource, NULL, TCPBandwidthMeter::pLimit, CSettings::sBandwidth::Request, SeekNewDownload(), and Settings.

Referenced by CDownloadTransferED2K::Close().

void CEDClient::OnDropped BOOL  bError  )  [protected, virtual]
 

Reimplemented from CConnection.

Definition at line 483 of file EDClient.cpp.

References Close(), IDS_ED2K_CLIENT_DROPPED, CConnection::m_sAddress, CShareazaApp::Message(), MSG_ERROR, NotifyDropped(), and theApp.

BOOL CEDClient::OnEmuleInfo CEDPacket pPacket  )  [protected]
 

Definition at line 971 of file EDClient.cpp.

References Close(), DeriveVersion(), ED2K_C2C_EMULEINFO, ED2K_C2C_EMULEINFOANSWER, ED2K_CLIENT_MOD, ED2K_CLIENT_UNKNOWN, ED2K_CT_MODVERSION, ED2K_ET_COMMENTS, ED2K_ET_COMPATIBLECLIENT, ED2K_ET_COMPRESSION, ED2K_ET_EXTENDEDREQUEST, ED2K_ET_FEATURES, ED2K_ET_SOURCEEXCHANGE, ED2K_ET_UDPPORT, ED2K_ET_UDPVER, ED2K_TAG_INT, CPacket::GetRemaining(), IDS_ED2K_CLIENT_HANDSHAKE_FAIL, m_bEmComments, m_bEmDeflate, m_bEmRequest, m_bEmSources, m_bEmUDPVersion, m_bEmule, m_nEmCompatible, m_nEmVersion, CEDTag::m_nKey, CEDPacket::m_nType, CEDTag::m_nType, m_nUDP, CEDTag::m_nValue, CConnection::m_sAddress, CShareazaApp::Message(), MSG_DEBUG, MSG_ERROR, CEDTag::Read(), CPacket::ReadByte(), CPacket::ReadLongLE(), SendEmuleInfo(), and theApp.

Referenced by OnPacket().

BOOL CEDClient::OnFileRequest CEDPacket pPacket  )  [protected]
 

Definition at line 1220 of file EDClient.cpp.

References CUploadQueues::CanUpload(), Downloads, ED2K_C2C_FILENOTFOUND, ED2K_C2C_FILEREQANSWER, CDownloads::FindByED2K(), CED2K::HashToString(), IDS_ED2K_CLIENT_BAD_PACKET, IDS_UPLOAD_FILENOTFOUND, CSecurity::IsDenied(), Library, LibraryMaps, CLibraryMaps::LookupFileByED2K(), m_bEmUnicode, m_bUpMD4, CEDPacket::m_nType, CConnection::m_pHost, CLibrary::m_pSection, m_pUpMD4, CConnection::m_sAddress, CShareazaApp::Message(), MSG_ERROR, CEDPacket::New(), PROTOCOL_ED2K, Security, Send(), SendCommentsPacket(), theApp, UploadQueues, CPacket::Write(), and CEDPacket::WriteEDString().

Referenced by OnPacket().

BOOL CEDClient::OnFileStatusRequest CEDPacket pPacket  )  [protected]
 

Definition at line 1288 of file EDClient.cpp.

References Downloads, ED2K_C2C_FILENOTFOUND, ED2K_C2C_FILESTATUS, CDownloads::FindByED2K(), GetSourceURL(), CED2K::HashToString(), IDS_ED2K_CLIENT_BAD_PACKET, IDS_UPLOAD_FILENOTFOUND, CEDPacket::IsLowID(), Library, LibraryMaps, CLibraryMaps::LookupFileByED2K(), m_bUpMD4, m_nClientID, CEDPacket::m_nType, m_nUpSize, m_pGUID, CConnection::m_pHost, CLibrary::m_pSection, m_pServer, m_pUpMD4, CConnection::m_sAddress, CShareazaApp::Message(), MSG_ERROR, CEDPacket::New(), Send(), theApp, CPacket::Write(), CPacket::WriteByte(), WritePartStatus(), and CPacket::WriteShortLE().

Referenced by OnPacket().

BOOL CEDClient::OnHashsetRequest CEDPacket pPacket  )  [protected]
 

Definition at line 1344 of file EDClient.cpp.

References Downloads, ED2K_C2C_FILENOTFOUND, ED2K_C2C_HASHSETANSWER, CDownloads::FindByED2K(), CED2K::GetBlockCount(), CED2K::GetRawPtr(), CED2K::HashToString(), IDS_ED2K_CLIENT_BAD_PACKET, IDS_ED2K_CLIENT_SENT_HASHSET, IDS_UPLOAD_FILENOTFOUND, Library, LibraryMaps, CLibraryMaps::LookupFileByED2K(), CLibrary::m_pSection, CConnection::m_sAddress, CShareazaApp::Message(), MSG_DEFAULT, MSG_ERROR, CEDPacket::New(), NULL, Send(), theApp, CPacket::Write(), and CPacket::WriteShortLE().

Referenced by OnPacket().

BOOL CEDClient::OnHello CEDPacket pPacket  )  [protected]
 

Definition at line 791 of file EDClient.cpp.

References CHostCacheList::Add(), Close(), DeriveSoftwareVersion(), ED2K_C2C_EMULEINFO, ED2K_C2C_HELLO, ED2K_C2C_HELLOANSWER, ED2K_CT_FEATUREVERSIONS, ED2K_CT_MODVERSION, ED2K_CT_MOREFEATUREVERSIONS, ED2K_CT_NAME, ED2K_CT_PORT, ED2K_CT_SOFTWAREVERSION, ED2K_CT_UDPPORTS, ED2K_CT_UNKNOWN1, ED2K_CT_UNKNOWN2, ED2K_CT_UNKNOWN3, ED2K_CT_VERSION, ED2K_SERVER_TCP_UNICODE, ED2K_TAG_INT, ED2K_TAG_STRING, CHostCache::eDonkey, CSettings::eDonkey, CPacket::GetRemaining(), HostCache, IDS_ED2K_CLIENT_HANDSHAKE_FAIL, CNetwork::IsFirewalledAddress(), CSettings::seDonkey::LearnNewServersClient, m_bEmAICH, m_bEmBrowse, m_bEmComments, m_bEmDeflate, m_bEmMultiPacket, m_bEmPeerCache, m_bEmPreview, m_bEmRequest, m_bEmSecureID, m_bEmSources, m_bEmUDPVersion, m_bEmule, m_bEmUnicode, m_bGUID, m_bLogin, m_nClientID, m_nEmCompatible, CEDTag::m_nKey, m_nSoftwareVersion, CEDPacket::m_nType, CEDTag::m_nType, m_nUDP, CEDTag::m_nValue, m_nVersion, m_pGUID, CConnection::m_pHost, m_pServer, CConnection::m_sAddress, CEDTag::m_sKey, m_sNick, CEDTag::m_sValue, CShareazaApp::Message(), MSG_DEBUG, MSG_ERROR, Network, OnLoggedIn(), CEDTag::Read(), CPacket::Read(), CPacket::ReadLongLE(), CPacket::ReadShortLE(), SendEmuleInfo(), SendHello(), Settings, and theApp.

Referenced by OnPacket().

BOOL CEDClient::OnLoggedIn  )  [protected]
 

Definition at line 539 of file EDClient.cpp.

References EDClients, m_bLogin, m_pDownload, m_pUpload, CEDClients::Merge(), NULL, CUploadTransferED2K::OnConnected(), CDownloadTransferED2K::OnConnected(), and SeekNewDownload().

Referenced by OnHello().

BOOL CEDClient::OnMessage CEDPacket pPacket  )  [protected]
 

Definition at line 1432 of file EDClient.cpp.

References CSecurity::Ban(), banSession, CSettings::sCommunity::ChatAllNetworks, ChatCore, CSettings::sCommunity::ChatEnable, CSettings::Community, ED2K_MESSAGE_MAX, CMessageFilter::IsED2KSpam(), CMessageFilter::IsFiltered(), m_bEmUnicode, m_pDownload, CConnection::m_pHost, CConnection::m_sAddress, CShareazaApp::Message(), MessageFilter, MSG_DEFAULT, MSG_ERROR, NULL, CChatCore::OnED2KMessage(), Security, Settings, and theApp.

Referenced by OnPacket().

BOOL CEDClient::OnPacket CEDPacket pPacket  )  [protected]
 

Definition at line 562 of file EDClient.cpp.

References ED2K_C2C_ANSWERSOURCES, ED2K_C2C_COMPRESSEDPART, ED2K_C2C_EMULEINFO, ED2K_C2C_EMULEINFOANSWER, ED2K_C2C_FILEDESC, ED2K_C2C_FILENOTFOUND, ED2K_C2C_FILEREQANSWER, ED2K_C2C_FILEREQUEST, ED2K_C2C_FILESTATUS, ED2K_C2C_FILESTATUSREQUEST, ED2K_C2C_FINISHUPLOAD, ED2K_C2C_HASHSETANSWER, ED2K_C2C_HASHSETREQUEST, ED2K_C2C_HELLO, ED2K_C2C_HELLOANSWER, ED2K_C2C_MESSAGE, ED2K_C2C_QUEUERANK, ED2K_C2C_QUEUERANKING, ED2K_C2C_QUEUERELEASE, ED2K_C2C_QUEUEREQUEST, ED2K_C2C_REQUESTPARTS, ED2K_C2C_REQUESTSOURCES, ED2K_C2C_SENDINGPART, ED2K_C2C_STARTUPLOAD, ED2K_PROTOCOL_EDONKEY, ED2K_PROTOCOL_EMULE, m_pDownload, m_pUpload, CConnection::m_sAddress, CShareazaApp::Message(), MSG_DEBUG, NULL, CDownloadTransferED2K::OnCompressedPart(), OnEmuleInfo(), CDownloadTransferED2K::OnFileComment(), CDownloadTransferED2K::OnFileNotFound(), CDownloadTransferED2K::OnFileReqAnswer(), OnFileRequest(), CDownloadTransferED2K::OnFileStatus(), OnFileStatusRequest(), CDownloadTransferED2K::OnFinishUpload(), CDownloadTransferED2K::OnHashsetAnswer(), OnHashsetRequest(), OnHello(), OnMessage(), CDownloadTransferED2K::OnQueueRank(), CUploadTransferED2K::OnQueueRelease(), OnQueueRequest(), CDownloadTransferED2K::OnRankingInfo(), CUploadTransferED2K::OnRequestParts(), CDownloadTransferED2K::OnSendingPart(), OnSourceAnswer(), OnSourceRequest(), CDownloadTransferED2K::OnStartUpload(), and theApp.

Referenced by OnRead().

BOOL CEDClient::OnQueueRequest CEDPacket pPacket  )  [protected]
 

Definition at line 1410 of file EDClient.cpp.

References DetachUpload(), m_bUpMD4, CUploadTransfer::m_pED2K, m_pUpload, m_pUpMD4, NULL, and CUploadTransferED2K::Request().

Referenced by OnPacket().

BOOL CEDClient::OnRead  )  [protected, virtual]
 

Reimplemented from CConnection.

Definition at line 510 of file EDClient.cpp.

References ED2K_PROTOCOL_EMULE, m_bGUID, CConnection::m_pInput, OnPacket(), CConnection::OnRead(), CEDPacket::ReadBuffer(), and CPacket::Release().

BOOL CEDClient::OnRun  )  [protected, virtual]
 

Reimplemented from CConnection.

Definition at line 394 of file EDClient.cpp.

References ChatCore, CSettings::sCommunity::ChatEnable, Close(), CSettings::Community, CSettings::Connection, dtsDownloading, IDS_ED2K_CLIENT_CLOSED, IDS_ED2K_CLIENT_CONNECT_TIMEOUT, IDS_ED2K_CLIENT_HANDSHAKE_TIMEOUT, CConnection::m_bConnected, m_bLogin, m_bOpenChat, CConnection::m_mInput, CConnection::m_mOutput, CDownloadTransfer::m_nState, m_pDownload, CConnection::m_sAddress, CConnection::m_tConnected, CShareazaApp::Message(), MSG_DEFAULT, MSG_ERROR, NotifyDropped(), NULL, CChatCore::OnED2KMessage(), Settings, theApp, CSettings::sConnection::TimeoutConnect, CSettings::sConnection::TimeoutHandshake, CSettings::sConnection::TimeoutTraffic, and TCPBandwidthMeter::tLast.

void CEDClient::OnRunEx DWORD  tNow  ) 
 

Definition at line 445 of file EDClient.cpp.

References CSettings::Connection, m_bOpenChat, CConnection::m_hSocket, m_pDownload, m_pUpload, CConnection::m_tConnected, NULL, CUploadTransferED2K::OnRunEx(), CDownloadTransferED2K::OnRunEx(), Remove(), Settings, and CSettings::sConnection::TimeoutHandshake.

BOOL CEDClient::OnSourceAnswer CEDPacket pPacket  )  [protected]
 

Definition at line 1535 of file EDClient.cpp.

References Downloads, CDownloads::FindByED2K(), CPacket::GetRemaining(), IDS_ED2K_CLIENT_BAD_PACKET, CSettings::Library, m_bEmSources, CEDPacket::m_nType, CConnection::m_sAddress, CShareazaApp::Message(), MSG_ERROR, CPacket::Read(), CPacket::ReadLongLE(), CPacket::ReadShortLE(), Settings, CSettings::sLibrary::SourceMesh, and theApp.

Referenced by OnPacket().

BOOL CEDClient::OnSourceRequest CEDPacket pPacket  )  [protected]
 

Definition at line 1488 of file EDClient.cpp.

References Downloads, ED2K_C2C_ANSWERSOURCES, ED2K_PROTOCOL_EMULE, CDownloads::FindByED2K(), IDS_ED2K_CLIENT_BAD_PACKET, m_bEmSources, CPacket::m_nLength, CConnection::m_sAddress, CShareazaApp::Message(), MSG_ERROR, CEDPacket::New(), PROTOCOL_ED2K, CPacket::Release(), Send(), theApp, CPacket::Write(), CPacket::WriteGetPointer(), CPacket::WriteLongLE(), and CPacket::WriteShortLE().

Referenced by OnPacket().

BOOL CEDClient::OnUdpFileNotFound CEDPacket pPacket  ) 
 

Definition at line 1697 of file EDClient.cpp.

References CDownloadTransferED2K::Close(), m_pDownload, NULL, and TS_FALSE.

BOOL CEDClient::OnUdpQueueFull CEDPacket pPacket  ) 
 

Definition at line 1686 of file EDClient.cpp.

References CDownloadTransferED2K::Close(), CSettings::eDonkey, m_pDownload, CDownloadTransfer::m_pSource, CDownloadSource::m_tAttempt, NULL, CSettings::seDonkey::ReAskTime, Settings, and TS_UNKNOWN.

BOOL CEDClient::OnUdpReask CEDPacket pPacket  ) 
 

Definition at line 1663 of file EDClient.cpp.

References m_bUpMD4, m_pUpload, m_pUpMD4, NULL, and CUploadTransferED2K::OnReask().

BOOL CEDClient::OnUdpReaskAck CEDPacket pPacket  ) 
 

Definition at line 1675 of file EDClient.cpp.

References m_pDownload, NULL, and CDownloadTransferED2K::SetQueueRank().

void CEDClient::OnUploadClose  ) 
 

Definition at line 379 of file EDClient.cpp.

References CSettings::Bandwidth, CConnection::m_mOutput, m_pUpload, NULL, TCPBandwidthMeter::pLimit, CSettings::sBandwidth::Request, and Settings.

Referenced by CUploadTransferED2K::Close().

BOOL CEDClient::OnWrite  )  [protected, virtual]
 

Reimplemented from CConnection.

Definition at line 501 of file EDClient.cpp.

References CConnection::OnWrite().

Referenced by Send().

void CEDClient::OpenChat  )  [inline]
 

Definition at line 104 of file EDClient.h.

References m_bOpenChat.

Referenced by CChatWindows::OpenPrivate().

void CEDClient::Remove  ) 
 

Definition at line 199 of file EDClient.cpp.

References Close(), CSettings::sGeneral::Debug, CSettings::sGeneral::DebugLog, DetachDownload(), DetachUpload(), CSettings::General, m_bGUID, CShareazaApp::Message(), MSG_DEBUG, NULL, Settings, and theApp.

Referenced by OnRunEx().

BOOL CEDClient::SeekNewDownload CDownloadSource pExcept = NULL  ) 
 

Definition at line 358 of file EDClient.cpp.

References Downloads, m_bSeeking, m_pDownload, NULL, and CDownloads::OnDonkeyCallback().

Referenced by OnDownloadClose(), OnLoggedIn(), and CDownloadSource::PushRequest().

void CEDClient::Send CEDPacket pPacket,
BOOL  bRelease = TRUE
 

Definition at line 285 of file EDClient.cpp.

References ED2K_C2C_EMULEINFO, ED2K_PROTOCOL_EDONKEY, m_bEmule, CConnection::m_hSocket, CConnection::m_pOutput, NULL, OnWrite(), and PROTOCOL_ED2K.

Referenced by CUploadTransferED2K::DispatchNextChunk(), OnFileRequest(), OnFileStatusRequest(), OnHashsetRequest(), OnSourceRequest(), CUploadTransferED2K::Send(), CDownloadTransferED2K::Send(), CChatSession::SendChatMessage(), SendCommentsPacket(), SendEmuleInfo(), and SendHello().

BOOL CEDClient::SendCommentsPacket int  nRating,
LPCTSTR  pszComments
 

Definition at line 671 of file EDClient.cpp.

References ED2K_C2C_FILEDESC, ED2K_COMMENT_MAX, ED2K_PROTOCOL_EMULE, m_bCommentSent, m_bEmComments, m_bEmule, m_bEmUnicode, CConnection::m_sAddress, CShareazaApp::Message(), MSG_DEBUG, CEDPacket::New(), Send(), theApp, CPacket::WriteByte(), and CEDPacket::WriteLongEDString().

Referenced by OnFileRequest().

void CEDClient::SendEmuleInfo BYTE  nType  )  [protected]
 

Definition at line 950 of file EDClient.cpp.

References ED2K_COMPATIBLECLIENT_ID, ED2K_ET_COMMENTS, ED2K_ET_COMPATIBLECLIENT, ED2K_ET_COMPRESSION, ED2K_ET_EXTENDEDREQUEST, ED2K_ET_SOURCEEXCHANGE, ED2K_ET_UDPPORT, ED2K_ET_UDPVER, ED2K_PROTOCOL_EMULE, ED2K_VERSION_COMMENTS, ED2K_VERSION_COMPRESSION, ED2K_VERSION_EXTENDEDREQUEST, ED2K_VERSION_SOURCEEXCHANGE, ED2K_VERSION_UDP, CSettings::eDonkey, CSettings::seDonkey::ExtendedRequest, CNetwork::m_pHost, Network, CEDPacket::New(), Send(), Settings, CPacket::WriteByte(), and CPacket::WriteLongLE().

Referenced by OnEmuleInfo(), and OnHello().

void CEDClient::SendHello BYTE  nType  )  [protected]
 

Definition at line 704 of file EDClient.cpp.

References ED2K_C2C_HELLO, ED2K_COMPATIBLECLIENT_ID, ED2K_CT_FEATUREVERSIONS, ED2K_CT_NAME, ED2K_CT_SOFTWAREVERSION, ED2K_CT_UDPPORTS, ED2K_CT_VERSION, ED2K_SERVER_TCP_UNICODE, ED2K_VERSION, ED2K_VERSION_AICH, ED2K_VERSION_COMMENTS, ED2K_VERSION_COMPRESSION, ED2K_VERSION_EXTENDEDREQUEST, ED2K_VERSION_SECUREID, ED2K_VERSION_SOURCEEXCHANGE, ED2K_VERSION_UDP, CSettings::eDonkey, CSettings::seDonkey::ExtendedRequest, CNeighboursWithED2K::GetDonkeyServer(), CGProfile::GetNick(), CGProfile::GUID, CEDNeighbour::m_nClientID, CShareazaApp::m_nVersion, CConnection::m_pHost, CNetwork::m_pHost, MyProfile, GGUID::n, Neighbours, Network, CEDPacket::New(), NULL, Send(), Settings, CSettings::seDonkey::TagNames, theApp, CPacket::Write(), CPacket::WriteByte(), CPacket::WriteLongLE(), and CPacket::WriteShortLE().

Referenced by OnConnected(), and OnHello().

void CEDClient::WritePartStatus CEDPacket pPacket,
CDownload pDownload
 

Definition at line 1616 of file EDClient.cpp.

References ED2K_PART_SIZE, CDownloadWithFile::IsRangeUseful(), CDownloadBase::m_nSize, NULL, and TS_TRUE.

Referenced by OnFileStatusRequest(), and CDownloadTransferED2K::SendPrimaryRequest().


Member Data Documentation

BOOL CEDClient::m_bCommentSent
 

Definition at line 86 of file EDClient.h.

Referenced by CEDClient(), Merge(), and SendCommentsPacket().

BOOL CEDClient::m_bEmAICH
 

Definition at line 62 of file EDClient.h.

Referenced by CEDClient(), Merge(), and OnHello().

BOOL CEDClient::m_bEmBrowse
 

Definition at line 71 of file EDClient.h.

Referenced by CEDClient(), Merge(), and OnHello().

BOOL CEDClient::m_bEmComments
 

Definition at line 69 of file EDClient.h.

Referenced by CEDClient(), Merge(), OnEmuleInfo(), OnHello(), and SendCommentsPacket().

BOOL CEDClient::m_bEmDeflate
 

Definition at line 65 of file EDClient.h.

Referenced by CEDClient(), Merge(), OnEmuleInfo(), and OnHello().

BOOL CEDClient::m_bEmMultiPacket
 

Definition at line 72 of file EDClient.h.

Referenced by CEDClient(), Merge(), and OnHello().

BOOL CEDClient::m_bEmPeerCache
 

Definition at line 70 of file EDClient.h.

Referenced by CEDClient(), Merge(), and OnHello().

BOOL CEDClient::m_bEmPreview
 

Definition at line 73 of file EDClient.h.

Referenced by CEDClient(), Merge(), and OnHello().

BOOL CEDClient::m_bEmRequest
 

Definition at line 68 of file EDClient.h.

Referenced by CEDClient(), Merge(), OnEmuleInfo(), OnHello(), and CDownloadTransferED2K::SendPrimaryRequest().

BOOL CEDClient::m_bEmSecureID
 

Definition at line 66 of file EDClient.h.

Referenced by CEDClient(), Merge(), and OnHello().

BOOL CEDClient::m_bEmSources
 

Definition at line 67 of file EDClient.h.

Referenced by CEDClient(), Merge(), OnEmuleInfo(), OnHello(), OnSourceAnswer(), and OnSourceRequest().

BOOL CEDClient::m_bEmUDPVersion
 

Definition at line 64 of file EDClient.h.

Referenced by CEDClient(), Merge(), OnEmuleInfo(), and OnHello().

BOOL CEDClient::m_bEmule
 

Definition at line 56 of file EDClient.h.

Referenced by CEDClient(), CUploadTransferED2K::CheckRanking(), DeriveSoftwareVersion(), DeriveVersion(), OnEmuleInfo(), OnHello(), Send(), SendCommentsPacket(), and CDownloadTransferED2K::SendPrimaryRequest().

BOOL CEDClient::m_bEmUnicode
 

Definition at line 63 of file EDClient.h.

Referenced by CEDClient(), Merge(), CDownloadTransferED2K::OnFileComment(), OnFileRequest(), OnHello(), OnMessage(), and SendCommentsPacket().

BOOL CEDClient::m_bGUID
 

Definition at line 48 of file EDClient.h.

Referenced by CEDClient(), CDownloadSource::CheckDonkey(), ConnectTo(), Equals(), GetSourceURL(), OnHello(), OnRead(), and Remove().

BOOL CEDClient::m_bLogin
 

Definition at line 75 of file EDClient.h.

Referenced by AttachDownload(), CEDClient(), Close(), IsOnline(), OnHello(), OnLoggedIn(), and OnRun().

BOOL CEDClient::m_bOpenChat
 

Definition at line 85 of file EDClient.h.

Referenced by CEDClient(), Merge(), OnRun(), OnRunEx(), and OpenChat().

BOOL CEDClient::m_bSeeking
 

Definition at line 82 of file EDClient.h.

Referenced by CEDClient(), DetachDownload(), NotifyDropped(), and SeekNewDownload().

BOOL CEDClient::m_bUpMD4
 

Definition at line 76 of file EDClient.h.

Referenced by CEDClient(), GetSourceURL(), OnFileRequest(), OnFileStatusRequest(), OnQueueRequest(), and OnUdpReask().

DWORD CEDClient::m_nClientID
 

Definition at line 50 of file EDClient.h.

Referenced by CEDClient(), CDownloadSource::CheckDonkey(), Connect(), ConnectTo(), Equals(), GetSourceURL(), OnFileStatusRequest(), and OnHello().

int CEDClient::m_nEmCompatible
 

Definition at line 59 of file EDClient.h.

Referenced by CEDClient(), DeriveSoftwareVersion(), DeriveVersion(), Merge(), OnEmuleInfo(), and OnHello().

int CEDClient::m_nEmVersion
 

Definition at line 58 of file EDClient.h.

Referenced by CEDClient(), DeriveVersion(), Merge(), and OnEmuleInfo().

DWORD CEDClient::m_nRunExCookie
 

Definition at line 83 of file EDClient.h.

Referenced by CEDClient().

DWORD CEDClient::m_nSoftwareVersion
 

Definition at line 60 of file EDClient.h.

Referenced by CEDClient(), DeriveSoftwareVersion(), DeriveVersion(), Merge(), and OnHello().

WORD CEDClient::m_nUDP
 

Definition at line 51 of file EDClient.h.

Referenced by CEDClient(), OnEmuleInfo(), OnHello(), CUploadTransferED2K::OnReask(), and CDownloadTransferED2K::RunQueued().

QWORD CEDClient::m_nUpSize
 

Definition at line 78 of file EDClient.h.

Referenced by GetSourceURL(), and OnFileStatusRequest().

int CEDClient::m_nVersion
 

Definition at line 55 of file EDClient.h.

Referenced by DeriveVersion(), and OnHello().

CDownloadTransferED2K* CEDClient::m_pDownload
 

Definition at line 80 of file EDClient.h.

Referenced by AttachDownload(), CEDClient(), Close(), Connect(), DeriveSoftwareVersion(), DeriveVersion(), DetachDownload(), Merge(), NotifyDropped(), OnDownloadClose(), OnLoggedIn(), OnMessage(), OnPacket(), OnRun(), OnRunEx(), OnUdpFileNotFound(), OnUdpQueueFull(), OnUdpReaskAck(), SeekNewDownload(), and ~CEDClient().

CEDClient* CEDClient::m_pEdNext
 

Definition at line 46 of file EDClient.h.

Referenced by CEDClients::Add(), CEDClient(), CEDClients::GetByGUID(), CEDClients::GetByID(), CEDClients::GetByIP(), CEDClients::IsFull(), CEDClients::IsOverloaded(), CEDClients::Merge(), and CEDClients::Remove().

CEDClient* CEDClient::m_pEdPrev
 

Definition at line 45 of file EDClient.h.

Referenced by CEDClients::Add(), CEDClient(), and CEDClients::Remove().

GGUID CEDClient::m_pGUID
 

Definition at line 49 of file EDClient.h.

Referenced by CEDClient(), CDownloadSource::CheckDonkey(), ConnectTo(), DeriveVersion(), Equals(), CDownloadTransferED2K::OnConnected(), OnFileStatusRequest(), OnHello(), and CChatSession::SendChatMessage().

SOCKADDR_IN CEDClient::m_pServer
 

Definition at line 52 of file EDClient.h.

Referenced by CDownloadSource::CheckDonkey(), Connect(), ConnectTo(), Equals(), OnFileStatusRequest(), and OnHello().

CUploadTransferED2K* CEDClient::m_pUpload
 

Definition at line 81 of file EDClient.h.

Referenced by CEDClient(), DeriveSoftwareVersion(), DeriveVersion(), DetachUpload(), Merge(), NotifyDropped(), OnLoggedIn(), OnPacket(), OnQueueRequest(), OnRunEx(), OnUdpReask(), OnUploadClose(), and ~CEDClient().

MD4 CEDClient::m_pUpMD4
 

Definition at line 77 of file EDClient.h.

Referenced by GetSourceURL(), OnFileRequest(), OnFileStatusRequest(), OnQueueRequest(), and OnUdpReask().

CString CEDClient::m_sNick
 

Definition at line 54 of file EDClient.h.

Referenced by CUploadTransferED2K::CUploadTransferED2K(), DeriveVersion(), CDownloadTransferED2K::OnConnected(), CDownloadTransferED2K::OnFileComment(), and OnHello().


The documentation for this class was generated from the following files:
Generated on Thu Dec 15 10:40:06 2005 for Shareaza 2.2.1.0 by  doxygen 1.4.2