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

CTransfers Class Reference

#include <Transfers.h>

List of all members.

Public Member Functions

 CTransfers ()
virtual ~CTransfers ()
int GetActiveCount () const
BOOL IsConnectedTo (IN_ADDR *pAddress)
BOOL StartThread ()
void StopThread ()
POSITION GetIterator () const
CTransferGetNext (POSITION &pos) const
int GetCount () const
BOOL Check (CTransfer *pTransfer) const

Public Attributes

CMutex m_pSection
DWORD m_nBuffer
BYTE * m_pBuffer

Protected Member Functions

void OnRun ()
void OnRunTransfers ()
void OnCheckExit ()
void Add (CTransfer *pTransfer)
void Remove (CTransfer *pTransfer)

Static Protected Member Functions

static UINT ThreadStart (LPVOID pParam)

Protected Attributes

CPtrList m_pList
HANDLE m_hThread
volatile BOOL m_bThread
CEvent m_pWakeup
DWORD m_nRunCookie

Friends

class CTransfer
class CUpload
class CDownloadWithTransfers

Classes

class  Lock


Constructor & Destructor Documentation

CTransfers::CTransfers  ) 
 

Definition at line 44 of file Transfers.cpp.

References m_bThread, m_hThread, m_nBuffer, m_nRunCookie, m_pBuffer, and NULL.

CTransfers::~CTransfers  )  [virtual]
 

Definition at line 53 of file Transfers.cpp.

References m_pBuffer, and StopThread().


Member Function Documentation

void CTransfers::Add CTransfer pTransfer  )  [protected]
 

Definition at line 131 of file Transfers.cpp.

References CSettings::sGeneral::Debug, CSettings::sGeneral::DebugLog, CSettings::General, CConnection::m_hSocket, m_pList, m_pWakeup, CShareazaApp::Message(), MSG_DEBUG, NULL, Settings, StartThread(), and theApp.

Referenced by CTransfer::AttachTo(), and CTransfer::ConnectTo().

BOOL CTransfers::Check CTransfer pTransfer  )  const [inline]
 

Definition at line 97 of file Transfers.h.

References m_pList, and NULL.

int CTransfers::GetActiveCount  )  const
 

Definition at line 62 of file Transfers.cpp.

References Downloads, CDownloads::GetCount(), CUploads::GetTransferCount(), and Uploads.

Referenced by OnCheckExit(), CMainWnd::OnNetworkAutoClose(), and CMainWnd::OnUpdateNetworkAutoClose().

int CTransfers::GetCount  )  const [inline]
 

Definition at line 92 of file Transfers.h.

References m_pList.

Referenced by OnCheckExit(), and StartThread().

POSITION CTransfers::GetIterator  )  const [inline]
 

Definition at line 82 of file Transfers.h.

References m_pList.

Referenced by IsConnectedTo().

CTransfer* CTransfers::GetNext POSITION &  pos  )  const [inline]
 

Definition at line 87 of file Transfers.h.

References m_pList.

Referenced by IsConnectedTo().

BOOL CTransfers::IsConnectedTo IN_ADDR *  pAddress  ) 
 

Definition at line 67 of file Transfers.cpp.

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

Referenced by CNetwork::IsConnectedTo().

void CTransfers::OnCheckExit  )  [protected]
 

Definition at line 206 of file Transfers.cpp.

References CSettings::sLive::AutoClose, Downloads, GetActiveCount(), CDownloads::GetCount(), GetCount(), CSettings::Live, m_bThread, CShareazaApp::m_pSection, CShareazaApp::SafeMainWnd(), Settings, and theApp.

Referenced by OnRun().

void CTransfers::OnRun  )  [protected]
 

Definition at line 167 of file Transfers.cpp.

References CTransferFiles::CommitDeferred(), Downloads, EDClients, CSettings::General, m_bThread, CUploads::m_nBandwidth, CDownloads::m_nBandwidth, CUploads::m_nCount, CDownloads::m_nTransfers, m_pWakeup, CSettings::sGeneral::MinTransfersRest, OnCheckExit(), CUploads::OnRun(), CDownloads::OnRun(), CEDClients::OnRun(), OnRunTransfers(), Settings, TransferFiles, and Uploads.

Referenced by ThreadStart().

void CTransfers::OnRunTransfers  )  [protected]
 

Definition at line 191 of file Transfers.cpp.

References CConnection::DoRun(), CTransfer::m_nRunCookie, m_nRunCookie, and m_pList.

Referenced by OnRun().

void CTransfers::Remove CTransfer pTransfer  )  [protected]
 

Definition at line 145 of file Transfers.cpp.

References CSettings::sGeneral::Debug, CSettings::sGeneral::DebugLog, CSettings::General, CConnection::m_hSocket, m_pList, m_pWakeup, CShareazaApp::Message(), MSG_DEBUG, Settings, and theApp.

Referenced by CTransfer::Close().

BOOL CTransfers::StartThread  ) 
 

Definition at line 83 of file Transfers.cpp.

References Downloads, CDownloads::GetCount(), GetCount(), m_bThread, m_hThread, NULL, and ThreadStart().

Referenced by Add(), CDownloads::Add(), and CDownloads::Load().

void CTransfers::StopThread  ) 
 

Definition at line 97 of file Transfers.cpp.

References Downloads, m_bThread, m_hThread, CUploads::m_nBandwidth, CDownloads::m_nBandwidth, CUploads::m_nCount, CDownloads::m_nTransfers, m_pWakeup, CShareazaApp::Message(), MSG_DEBUG, NULL, theApp, and Uploads.

Referenced by CShareazaApp::ExitInstance(), CMainWnd::OnClose(), and ~CTransfers().

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

Definition at line 160 of file Transfers.cpp.

References OnRun().

Referenced by StartThread().


Friends And Related Function Documentation

friend class CDownloadWithTransfers [friend]
 

Definition at line 104 of file Transfers.h.

friend class CTransfer [friend]
 

Definition at line 102 of file Transfers.h.

friend class CUpload [friend]
 

Definition at line 103 of file Transfers.h.


Member Data Documentation

volatile BOOL CTransfers::m_bThread [protected]
 

Definition at line 61 of file Transfers.h.

Referenced by CTransfers(), OnCheckExit(), OnRun(), StartThread(), and StopThread().

HANDLE CTransfers::m_hThread [protected]
 

Definition at line 60 of file Transfers.h.

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

DWORD CTransfers::m_nBuffer
 

Definition at line 56 of file Transfers.h.

Referenced by CDownloadWithTiger::ContinueValidation(), CTransfers(), and CUploadTransferHTTP::OnWrite().

DWORD CTransfers::m_nRunCookie [protected]
 

Definition at line 63 of file Transfers.h.

Referenced by CTransfers(), and OnRunTransfers().

BYTE* CTransfers::m_pBuffer
 

Definition at line 57 of file Transfers.h.

Referenced by CDownloadWithTiger::ContinueValidation(), CTransfers(), CUploadTransferHTTP::OnWrite(), and ~CTransfers().

CPtrList CTransfers::m_pList [protected]
 

Definition at line 59 of file Transfers.h.

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

CMutex CTransfers::m_pSection
 

Definition at line 42 of file Transfers.h.

Referenced by CDownloadTask::Abort(), CMatchFile::Add(), CDownloads::Add(), CHostBrowser::Browse(), CQueryHashMaster::Build(), CDownloads::Clear(), CDownloads::ClearCompleted(), CDownloads::ClearPaused(), CDownloads::CloseTransfers(), CDownloadEditDlg::Commit(), CTorrentSeedDlg::CreateDownload(), CUploadsCtrl::DeselectAll(), CDownloadsCtrl::DeselectAll(), CDownloadMonitorDlg::DrawProgressBar(), CDownloadTabBar::DropObjects(), CDownloadsCtrl::DropObjects(), CHomeDownloadsBox::ExecuteDownload(), CLocalSearch::ExecutePartialFiles(), CDownloadsCtrl::GetSelectedCount(), CGraphItem::GetValue(), CEDPartImporter::ImportFile(), IsConnectedTo(), CDownloads::Load(), CMainWnd::LocalSystemChecks(), CTransfers::Lock::Lock(), CDownloads::Move(), CDownloadsCtrl::MoveSelected(), CUploads::OnAccept(), CEDClients::OnAccept(), CBTClients::OnAccept(), CUploadsWnd::OnBrowseLaunch(), CDownloadsWnd::OnBrowseLaunch(), CPrivateChatFrame::OnChatPriority(), CUploadsWnd::OnContextMenu(), CDownloadsWnd::OnContextMenu(), CUploadsWnd::OnCreate(), CDownloadsWnd::OnCreate(), CFilePreviewDlg::OnDestroy(), CDownloadMonitorDlg::OnDestroy(), CDownloads::OnDonkeyCallback(), CTorrentSeedDlg::OnDownload(), CDownloadTabBar::OnDownloadGroupClear(), CDownloadTabBar::OnDownloadGroupNew(), CDownloadTabBar::OnDownloadGroupPause(), CDownloadTabBar::OnDownloadGroupResume(), CDownloadMonitorDlg::OnDownloadLaunch(), CDownloadsWnd::OnDownloadsBoost(), CDownloadsWnd::OnDownloadsClear(), CDownloadsWnd::OnDownloadsClearCompleted(), CDownloadsWnd::OnDownloadsClearIncomplete(), CDownloadsWnd::OnDownloadsCopy(), CDownloadsWnd::OnDownloadsEdit(), CDownloadsWnd::OnDownloadsEnqueue(), CDownloadsWnd::OnDownloadsFileDelete(), CDownloadsWnd::OnDownloadsHelp(), CDownloadsWnd::OnDownloadsLaunch(), CDownloadsWnd::OnDownloadsLaunchCopy(), CDownloadsWnd::OnDownloadsMonitor(), CDownloadsWnd::OnDownloadsPause(), CDownloadsWnd::OnDownloadsRate(), CDownloadsWnd::OnDownloadsResume(), CDownloadsWnd::OnDownloadsShare(), CDownloadsWnd::OnDownloadsSources(), CDownloadMonitorDlg::OnDownloadStop(), CDownloadsWnd::OnDownloadsTorrentInfo(), CDownloadsWnd::OnDownloadsUrl(), CDownloadsWnd::OnDownloadsViewReviews(), CUploadsWnd::OnEditQueue(), CDownloadEditDlg::OnErase(), CDownloadReviewDlg::OnInitDialog(), CDownloadMonitorDlg::OnInitDialog(), CDownloadEditDlg::OnInitDialog(), CUploadsCtrl::OnKeyDown(), CDownloadsCtrl::OnKeyDown(), CUploadsCtrl::OnLButtonDblClk(), CDownloadsCtrl::OnLButtonDblClk(), CUploadsCtrl::OnLButtonDown(), CDownloadsCtrl::OnLButtonDown(), CDownloadEditDlg::OnLButtonUp(), CUploadTipCtrl::OnPaint(), CUploadsCtrl::OnPaint(), CDownloadTipCtrl::OnPaint(), CDownloadsCtrl::OnPaint(), CUploadTipCtrl::OnPrepare(), CDownloadTipCtrl::OnPrepare(), CDownloads::OnPush(), CDownloads::OnQueryHits(), CUploadsSettingsPage::OnQueueDrop(), CUploads::OnRename(), CBaseMatchWnd::OnSearchDownload(), CBaseMatchWnd::OnSearchDownloadNow(), CUploadsWnd::OnSecurityBan(), CUploadsCtrl::OnSize(), CDownloadsCtrl::OnSize(), CDownloadsCtrl::OnSortPanelItems(), CUploadsWnd::OnTimer(), CDownloadsWnd::OnTimer(), CDownloadMonitorDlg::OnTimer(), CUploadTipCtrl::OnTimer(), CDownloadTipCtrl::OnTimer(), CDownloadEditDlg::OnTorrentInfo(), CDownloadsWnd::OnTransfersChat(), CDownloadsWnd::OnTransfersConnect(), CDownloadsWnd::OnTransfersDisconnect(), CDownloadsWnd::OnTransfersForget(), CEDClients::OnUDP(), CUploadsWnd::OnUploadsChat(), CUploadsWnd::OnUploadsClear(), CUploadsWnd::OnUploadsClearCompleted(), CUploadsWnd::OnUploadsDisconnect(), CUploadsWnd::OnUploadsLaunch(), CUploadsWnd::OnUploadsStart(), CURLActionDlg::OnUrlDownload(), CDownloads::OnVerify(), CChatWindows::OpenPrivate(), CDownloads::PauseAll(), CUploadsWnd::Prepare(), CDownloadsWnd::Prepare(), CBTTrackerRequest::Process(), CHandshakes::PushTo(), CDownloads::Reorder(), CDownloads::Save(), CDownloadsWnd::Select(), CDownloadsCtrl::SelectAll(), CUploadsCtrl::SelectTo(), CDownloadsCtrl::SelectTo(), CChatSession::SendChatMessage(), CEDNeighbour::SendSharedFiles(), CHostBrowser::Stop(), CDownloads::Swap(), CHomeDownloadsBox::Update(), CQuerySearch::WriteHashesToEDPacket(), CDownloadTask::~CDownloadTask(), and CTransfers::Lock::~Lock().

CEvent CTransfers::m_pWakeup [protected]
 

Definition at line 62 of file Transfers.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:13 2005 for Shareaza 2.2.1.0 by  doxygen 1.4.2