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

CUploads Class Reference

#include <Uploads.h>

List of all members.

Public Member Functions

 CUploads ()
virtual ~CUploads ()
void Clear (BOOL bMessage=TRUE)
int GetCount (CUploadTransfer *pExcept, int nState=-1) const
int GetTorrentCount (int nState) const
BOOL AllowMoreTo (IN_ADDR *pAddress) const
BOOL CanUploadFileTo (IN_ADDR *pAddress, const SHA1 *pSHA1=NULL) const
BOOL EnforcePerHostLimit (CUploadTransfer *pUpload, BOOL bRequest=FALSE)
void SetStable (DWORD nSpeed)
DWORD GetBandwidth () const
void OnRun ()
BOOL OnAccept (CConnection *pConnection, LPCTSTR pszHandshake)
void OnRename (LPCTSTR pszSource, LPCTSTR pszTarget=(LPCTSTR) 1)
void Add (CUploadTransfer *pUpload)
void Remove (CUploadTransfer *pUpload)
POSITION GetIterator () const
CUploadTransferGetNext (POSITION &pos) const
BOOL Check (CUploadTransfer *pUpload) const
int GetTransferCount () const
int GetTorrentTransferCount () const
int GetTorrentUploadCount () const

Public Attributes

DWORD m_nCount
DWORD m_nBandwidth
DWORD m_nTorrentSpeed
BOOL m_bStable
DWORD m_nBestSpeed

Protected Attributes

CPtrList m_pList


Constructor & Destructor Documentation

CUploads::CUploads  ) 
 

Definition at line 55 of file Uploads.cpp.

References m_bStable, m_nBandwidth, m_nBestSpeed, m_nCount, and m_nTorrentSpeed.

CUploads::~CUploads  )  [virtual]
 

Definition at line 64 of file Uploads.cpp.

References Clear().


Member Function Documentation

void CUploads::Add CUploadTransfer pUpload  ) 
 

Definition at line 447 of file Uploads.cpp.

References m_pList, and NULL.

Referenced by CUploadTransfer::CUploadTransfer().

BOOL CUploads::AllowMoreTo IN_ADDR *  pAddress  )  const
 

Definition at line 170 of file Uploads.cpp.

References GetIterator(), GetNext(), CUploadTransfer::m_nState, CConnection::m_pHost, CSettings::sUploads::MaxPerHost, Settings, CSettings::Uploads, upsQueued, and upsUploading.

Referenced by CHandshakes::PushTo().

BOOL CUploads::CanUploadFileTo IN_ADDR *  pAddress,
const SHA1 pSHA1 = NULL
const
 

Definition at line 189 of file Uploads.cpp.

References GetIterator(), GetNext(), CUploadTransfer::m_bSHA1, CUploadTransfer::m_nState, CConnection::m_pHost, CUploadTransfer::m_pSHA1, CSettings::sUploads::MaxPerHost, Settings, CSettings::Uploads, upsQueued, and upsUploading.

Referenced by CUploadTransferHTTP::QueueRequest().

BOOL CUploads::Check CUploadTransfer pUpload  )  const [inline]
 

Definition at line 78 of file Uploads.h.

References m_pList, and NULL.

Referenced by CUploadsWnd::OnUploadsDisconnect().

void CUploads::Clear BOOL  bMessage = TRUE  ) 
 

Definition at line 72 of file Uploads.cpp.

References GetCount(), GetIterator(), GetNext(), and NULL.

Referenced by CShareazaApp::ExitInstance(), and ~CUploads().

BOOL CUploads::EnforcePerHostLimit CUploadTransfer pUpload,
BOOL  bRequest = FALSE
 

Definition at line 214 of file Uploads.cpp.

References CUploadTransfer::Close(), GetIterator(), GetNext(), IDS_UPLOAD_DROPPED_NEWER, IDS_UPLOAD_DROPPED_OLDER, CUploadTransfer::m_bLive, CUploadTransfer::m_nState, CUploadTransfer::m_pBaseFile, CConnection::m_pHost, CConnection::m_sAddress, CConnection::m_tConnected, CSettings::sUploads::MaxPerHost, CShareazaApp::Message(), MSG_ERROR, NULL, Settings, CUploadQueues::StealPosition(), theApp, UploadQueues, CSettings::Uploads, upsPreQueue, upsQueued, and upsUploading.

Referenced by CUploadTransferHTTP::OnHeadersComplete(), CUploadTransfer::OnRead(), and CUploadTransfer::OnWrite().

DWORD CUploads::GetBandwidth  )  const
 

Definition at line 155 of file Uploads.cpp.

References GetIterator(), and GetNext().

int CUploads::GetCount CUploadTransfer pExcept,
int  nState = -1
const
 

Definition at line 85 of file Uploads.cpp.

References GetIterator(), GetNext(), CUploadTransfer::m_nState, m_pList, NULL, and upsNull.

Referenced by Clear(), GetTransferCount(), CUploadsWnd::OnTimer(), CUploadTransferHTTP::RequestHostBrowse(), and CUploadTransferHTTP::RequestPreview().

POSITION CUploads::GetIterator  )  const [inline]
 

Definition at line 68 of file Uploads.h.

References m_pList.

Referenced by AllowMoreTo(), CanUploadFileTo(), Clear(), EnforcePerHostLimit(), GetBandwidth(), GetCount(), GetTorrentCount(), OnAccept(), CPrivateChatFrame::OnChatPriority(), OnRename(), OnRun(), CUploadsWnd::OnTimer(), and CUploadsWnd::OnUploadsClearCompleted().

CUploadTransfer* CUploads::GetNext POSITION &  pos  )  const [inline]
 

Definition at line 73 of file Uploads.h.

References m_pList.

Referenced by AllowMoreTo(), CanUploadFileTo(), Clear(), EnforcePerHostLimit(), GetBandwidth(), GetCount(), GetTorrentCount(), OnAccept(), CPrivateChatFrame::OnChatPriority(), OnRename(), OnRun(), CUploadsWnd::OnTimer(), and CUploadsWnd::OnUploadsClearCompleted().

int CUploads::GetTorrentCount int  nState  )  const
 

Definition at line 115 of file Uploads.cpp.

References GetIterator(), GetNext(), CUploadTransfer::m_nProtocol, CUploadTransfer::m_nState, PROTOCOL_BT, upsNull, and upsUploading.

Referenced by GetTorrentTransferCount(), and GetTorrentUploadCount().

int CUploads::GetTorrentTransferCount  )  const [inline]
 

Definition at line 88 of file Uploads.h.

References GetTorrentCount().

int CUploads::GetTorrentUploadCount  )  const [inline]
 

Definition at line 93 of file Uploads.h.

References GetTorrentCount().

Referenced by CDownloadWithTorrent::RunTorrent().

int CUploads::GetTransferCount  )  const [inline]
 

Definition at line 83 of file Uploads.h.

References GetCount(), and NULL.

Referenced by CTransfers::GetActiveCount().

BOOL CUploads::OnAccept CConnection pConnection,
LPCTSTR  pszHandshake
 

Definition at line 369 of file Uploads.cpp.

References CTransfer::AttachTo(), CSettings::sRemote::Enable, GetIterator(), GetNext(), CUploadTransfer::m_bLive, CConnection::m_pHost, CTransfers::m_pSection, CSettings::sUploads::MaxPerHost, CSettings::Remote, Settings, Transfers, and CSettings::Uploads.

Referenced by CHandshake::OnRead().

void CUploads::OnRename LPCTSTR  pszSource,
LPCTSTR  pszTarget = (LPCTSTR) 1
 

Definition at line 411 of file Uploads.cpp.

References GetIterator(), GetNext(), CShareazaApp::m_pSafeWnd, CShareazaApp::m_pSection, CTransfers::m_pSection, NULL, CMediaWnd::OnFileDelete(), theApp, and Transfers.

Referenced by CDownloadWithFile::DeleteFile(), CFileCopyDlg::ProcessMove(), CDownloadTask::RunCopySimple(), and CDownload::~CDownload().

void CUploads::OnRun  ) 
 

Definition at line 292 of file Uploads.cpp.

References CSettings::Bandwidth, CSettings::sBitTorrent::BandwidthPercentage, CSettings::BitTorrent, CUploadQueues::Check(), CSettings::Connection, GetIterator(), CUploadQueues::GetIterator(), CUploadTransfer::GetMeasuredSpeed(), GetNext(), CUploadQueues::GetNext(), CUploadTransferBT::m_bChoked, CUploadTransferBT::m_bInterested, m_nBandwidth, m_nCount, CUploadQueue::m_nMaxTransfers, CUploadQueue::m_nMeasured, CUploadQueue::m_nMinTransfers, CUploadTransfer::m_nProtocol, CUploadTransfer::m_nState, m_nTorrentSpeed, CUploadTransfer::m_pQueue, CUploadQueues::m_pSection, CUploadQueues::m_pTorrentQueue, NULL, CSettings::sConnection::OutSpeed, PROTOCOL_BT, CSettings::sBandwidth::Request, Settings, UploadQueues, CSettings::sBandwidth::Uploads, upsNull, and upsUploading.

Referenced by CTransfers::OnRun().

void CUploads::Remove CUploadTransfer pUpload  ) 
 

Definition at line 454 of file Uploads.cpp.

References m_pList, and NULL.

Referenced by CUploadTransfer::~CUploadTransfer().

void CUploads::SetStable DWORD  nSpeed  ) 
 

Definition at line 149 of file Uploads.cpp.

References m_bStable, and m_nBestSpeed.

Referenced by CUploadTransferHTTP::OnCompleted().


Member Data Documentation

BOOL CUploads::m_bStable
 

Definition at line 42 of file Uploads.h.

Referenced by CLocalSearch::CreatePacketG1(), CLocalSearch::CreatePacketG2(), CUploads(), SetStable(), and CLocalSearch::WriteTrailerG1().

DWORD CUploads::m_nBandwidth
 

Definition at line 39 of file Uploads.h.

Referenced by CUploads(), CGraphItem::GetValue(), OnRun(), CTransfers::OnRun(), and CTransfers::StopThread().

DWORD CUploads::m_nBestSpeed
 

Definition at line 43 of file Uploads.h.

Referenced by CLocalSearch::CreatePacketG1(), CUploads(), and SetStable().

DWORD CUploads::m_nCount
 

Definition at line 38 of file Uploads.h.

Referenced by CUploads(), CGraphItem::GetValue(), OnRun(), CTransfers::OnRun(), and CTransfers::StopThread().

DWORD CUploads::m_nTorrentSpeed
 

Definition at line 40 of file Uploads.h.

Referenced by CUploads(), CUploadQueue::GetBandwidthLimit(), CUploadTransferBT::OnConnected(), and OnRun().

CPtrList CUploads::m_pList [protected]
 

Definition at line 45 of file Uploads.h.

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


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