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

CChatCore Class Reference

#include <ChatCore.h>

List of all members.

Public Member Functions

 CChatCore ()
virtual ~CChatCore ()
POSITION GetIterator () const
CChatSessionGetNext (POSITION &pos) const
int GetCount () const
BOOL Check (CChatSession *pSession) const
void Close ()
void OnAccept (CConnection *pConnection, PROTOCOLID nProtocol=PROTOCOL_NULL)
BOOL OnPush (GGUID *pGUID, CConnection *pConnection)
void OnED2KMessage (CEDClient *pClient, CEDPacket *pPacket)
CChatSessionFindSession (CEDClient *pClient)
void StopThread ()

Public Attributes

CMutex m_pSection

Protected Member Functions

void Add (CChatSession *pSession)
void Remove (CChatSession *pSession)
void StartThread ()
void OnRun ()

Static Protected Member Functions

static UINT ThreadStart (LPVOID pParam)

Protected Attributes

CPtrList m_pSessions
HANDLE m_hThread
BOOL m_bThread
CEvent m_pWakeup

Friends

class CChatSession


Constructor & Destructor Documentation

CChatCore::CChatCore  ) 
 

Definition at line 42 of file ChatCore.cpp.

References m_bThread, m_hThread, and NULL.

CChatCore::~CChatCore  )  [virtual]
 

Definition at line 48 of file ChatCore.cpp.

References Close().


Member Function Documentation

void CChatCore::Add CChatSession pSession  )  [protected]
 

Definition at line 188 of file ChatCore.cpp.

References m_pSection, m_pSessions, m_pWakeup, NULL, and StartThread().

Referenced by CChatSession::AttachTo(), CChatSession::CChatSession(), CChatSession::Connect(), FindSession(), and CChatSession::OnPush().

BOOL CChatCore::Check CChatSession pSession  )  const
 

Definition at line 71 of file ChatCore.cpp.

References m_pSessions, and NULL.

Referenced by CMainWnd::OnOpenChat().

void CChatCore::Close  ) 
 

Definition at line 206 of file ChatCore.cpp.

References GetIterator(), GetNext(), and StopThread().

Referenced by ~CChatCore().

CChatSession * CChatCore::FindSession CEDClient pClient  ) 
 

Definition at line 122 of file ChatCore.cpp.

References Add(), CChatSession, cssActive, GetIterator(), GetNext(), CConnection::m_bConnected, CChatSession::m_bGUID, CChatSession::m_bMustPush, CChatSession::m_bUnicode, CConnection::m_hSocket, CChatSession::m_nClientID, CChatSession::m_nProtocol, CChatSession::m_nState, CChatSession::m_pGUID, CConnection::m_pHost, CConnection::m_pInput, CConnection::m_pOutput, CChatSession::m_pServer, CConnection::m_sAddress, CChatSession::m_sUserAgent, CChatSession::m_sUserNick, CConnection::m_tConnected, and PROTOCOL_ED2K.

Referenced by OnED2KMessage().

int CChatCore::GetCount  )  const
 

Definition at line 66 of file ChatCore.cpp.

References m_pSessions.

Referenced by OnRun(), and StartThread().

POSITION CChatCore::GetIterator  )  const
 

Definition at line 56 of file ChatCore.cpp.

References m_pSessions.

Referenced by Close(), FindSession(), OnPush(), and OnRun().

CChatSession * CChatCore::GetNext POSITION &  pos  )  const
 

Definition at line 61 of file ChatCore.cpp.

References m_pSessions.

Referenced by Close(), FindSession(), OnPush(), and OnRun().

void CChatCore::OnAccept CConnection pConnection,
PROTOCOLID  nProtocol = PROTOCOL_NULL
 

Definition at line 79 of file ChatCore.cpp.

References CChatSession::AttachTo(), CChatSession, CChatSession::m_nProtocol, and m_pSection.

Referenced by CHandshake::OnRead().

void CChatCore::OnED2KMessage CEDClient pClient,
CEDPacket pPacket
 

Definition at line 108 of file ChatCore.cpp.

References FindSession(), m_pSection, NULL, and CChatSession::OnED2KMessage().

Referenced by CEDClient::OnMessage(), and CEDClient::OnRun().

BOOL CChatCore::OnPush GGUID pGUID,
CConnection pConnection
 

Definition at line 91 of file ChatCore.cpp.

References GetIterator(), GetNext(), m_pSection, and CChatSession::OnPush().

Referenced by CHandshake::OnPush().

void CChatCore::OnRun  )  [protected]
 

Definition at line 264 of file ChatCore.cpp.

References GetCount(), GetIterator(), GetNext(), m_bThread, m_pSection, and m_pWakeup.

Referenced by ThreadStart().

void CChatCore::Remove CChatSession pSession  )  [protected]
 

Definition at line 197 of file ChatCore.cpp.

References CConnection::m_hSocket, m_pSection, m_pSessions, m_pWakeup, and NULL.

Referenced by CChatSession::~CChatSession().

void CChatCore::StartThread  )  [protected]
 

Definition at line 219 of file ChatCore.cpp.

References GetCount(), m_bThread, m_hThread, NULL, and ThreadStart().

Referenced by Add().

void CChatCore::StopThread  ) 
 

Definition at line 229 of file ChatCore.cpp.

References m_hThread, m_pWakeup, CShareazaApp::Message(), MSG_DEBUG, NULL, and theApp.

Referenced by Close(), and CMainWnd::OnClose().

UINT CChatCore::ThreadStart LPVOID  pParam  )  [static, protected]
 

Definition at line 257 of file ChatCore.cpp.

References OnRun().

Referenced by StartThread().


Friends And Related Function Documentation

friend class CChatSession [friend]
 

Definition at line 67 of file ChatCore.h.

Referenced by FindSession(), and OnAccept().


Member Data Documentation

BOOL CChatCore::m_bThread [protected]
 

Definition at line 44 of file ChatCore.h.

Referenced by CChatCore(), OnRun(), and StartThread().

HANDLE CChatCore::m_hThread [protected]
 

Definition at line 43 of file ChatCore.h.

Referenced by CChatCore(), StartThread(), and StopThread().

CMutex CChatCore::m_pSection
 

Definition at line 40 of file ChatCore.h.

Referenced by Add(), CChatSession::Close(), CChatSession::Connect(), OnAccept(), CChatFrame::OnDestroy(), CChatSession::OnED2KMessage(), OnED2KMessage(), CMainWnd::OnOpenChat(), OnPush(), OnRun(), Remove(), CChatSession::SendPrivateMessage(), and CChatSession::Setup().

CPtrList CChatCore::m_pSessions [protected]
 

Definition at line 42 of file ChatCore.h.

Referenced by Add(), Check(), GetCount(), GetIterator(), GetNext(), and Remove().

CEvent CChatCore::m_pWakeup [protected]
 

Definition at line 45 of file ChatCore.h.

Referenced by Add(), OnRun(), Remove(), and StopThread().


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