vmsBtDownloadManager Class Reference

#include <vmsBtDownloadManager.h>

List of all members.

Public Member Functions

fsString get_RootFolderName ()
UINT64 get_SplittedByteCountAtBeginningOfFile ()
void GetSectionsInfo (std::vector< vmsSectionInfo > &v)
int get_CurrentTaskProgress ()
std::wstring get_FileNameW (int nIndex)
void StopSeeding ()
void EnableSeeding (BOOL bEnable)
BOOL IsStoppedByUser ()
BOOL LoadState (LPBYTE lpBuffer, LPDWORD pdwSize, WORD wVer)
BOOL SaveState (LPBYTE pb, LPDWORD pdwSize)
int get_ConnectionCount ()
void UseDetailedLog (BOOL bUse)
UINT GetTrafficLimit ()
void LimitTraffic (UINT uLimit)
void StopDownloading ()
fsInternetResult StartDownloading ()
BOOL DeleteFile ()
fsInternetResult SetToRestartState ()
fsInternetResult RestartDownloading ()
BOOL IsBtDownloadRunning ()
BOOL IsCantStart ()
BOOL MoveToFolder (LPCSTR pszPath)
UINT GetSpeed ()
int GetDownloadingSectionCount ()
void GetSectionInfo (int nIndex, vmsSectionInfo *sect)
BOOL IsDownloading ()
UINT64 GetDownloadedBytesCount ()
UINT64 GetTotalFilesSize ()
int GetNumberOfSections ()
BOOL IsRunning ()
BOOL IsDone ()
float GetPercentDone ()
fsString get_OutputFilePathName ()
vmsBtDownloadget_BtDownload ()
int get_NextAnnounceInterval ()
vmsBtDownloadPeerInfoListget_PeerInfoList ()
void get_PeersStat (int *pnPeersConnected, int *pnSeedsTotal, int *pnLeechersTotal, int *pnSeedsConnected)
UINT64 get_WastedByteCount ()
double get_ShareRating ()
UINT64 get_TotalUploadedByteCount ()
fsString get_CurrentTracker ()
int get_PieceSize ()
int get_PieceCount ()
int get_FilePercentDone (int nIndex)
UINT64 get_FileSize (int nIndex)
fsString get_FileName (int nIndex)
fsString get_TorrentComment ()
void set_TrackerLogin (LPCSTR pszUser, LPCSTR pszPassword)
void disable_Flags (DWORD dw)
void enable_Flags (DWORD dw)
DWORD get_Flags ()
fsString get_URL ()
void get_TrackerLogin (fsString &strUser, fsString &strPassword)
LPCSTR get_TorrentUrl ()
fsString get_InfoHash ()
void SetEventsHandler (fntBtDownloadManagerEventHandler pfn, LPVOID pData)
LPCSTR get_OutputPath ()
fsString get_OutputFilePathName (int nIndex)
int get_FileCount ()
UINT GetUploadSpeed ()
fsString get_TorrentName ()
vmsBtDownloadStateEx get_State ()
BOOL CreateByTorrentFile (LPCSTR pszTorrentFile, LPCSTR pszOutputPath, LPCSTR pszTorrentUrl)
void DeleteBtDownload ()
 vmsBtDownloadManager ()
virtual ~vmsBtDownloadManager ()

Public Attributes

fsString m_strTrackerStatus

Protected Member Functions

void SaveBtDownloadState_Pieces ()
void RemoveBtDownloadDirectory ()
void RecursiveRemoveDirectory (LPCWSTR pwszPath)
BOOL IsDownloadStatCanBeRead ()
void PostCreateTorrentObject ()
DWORD RaiseEvent (vmsBtDownloadManagerEvent ev, DWORD dw=0)
void SaveBtDownloadState_FileProgress ()
void SaveBtDownloadState ()
void StopThread ()
void ProcessFilePathMacroses (CString &str)
BOOL CreateBtDownload ()

Static Protected Member Functions

static DWORD WINAPI _threadCheckStartSeeding (LPVOID lp)
static DWORD WINAPI _threadBtDownloadManager (LPVOID lp)

Protected Attributes

LONG m_nUsingBtDownload
BOOL m_bStoppedByUser
bool m_bThreadRunning
bool m_bThreadDoJob
bool m_bThreadNeedStop
vmsBtFilem_pTorrent
vmsBtDownloadm_pDownload
fntBtDownloadManagerEventHandler m_pfnEvHandler
LPVOID m_lpEvParam
UINT m_uLowSpeedMaxTime
UINT m_uTrafficLimit
_inc_BtDownloadInfo m_info

Classes

struct  _inc_BtDownloadInfo


Detailed Description

Definition at line 49 of file vmsBtDownloadManager.h.


Constructor & Destructor Documentation

vmsBtDownloadManager::vmsBtDownloadManager (  ) 

vmsBtDownloadManager::~vmsBtDownloadManager (  )  [virtual]


Member Function Documentation

fsString vmsBtDownloadManager::get_RootFolderName (  ) 

UINT64 vmsBtDownloadManager::get_SplittedByteCountAtBeginningOfFile (  ) 

void vmsBtDownloadManager::GetSectionsInfo ( std::vector< vmsSectionInfo > &  v  ) 

int vmsBtDownloadManager::get_CurrentTaskProgress (  ) 

std::wstring vmsBtDownloadManager::get_FileNameW ( int  nIndex  ) 

void vmsBtDownloadManager::StopSeeding (  ) 

void vmsBtDownloadManager::EnableSeeding ( BOOL  bEnable  ) 

BOOL vmsBtDownloadManager::IsStoppedByUser (  ) 

Definition at line 970 of file vmsBtDownloadManager.cpp.

References m_bStoppedByUser.

Referenced by vmsDownloadMgrEx::IsStoppedByUser().

BOOL vmsBtDownloadManager::LoadState ( LPBYTE  lpBuffer,
LPDWORD  pdwSize,
WORD  wVer 
)

BOOL vmsBtDownloadManager::SaveState ( LPBYTE  pb,
LPDWORD  pdwSize 
)

int vmsBtDownloadManager::get_ConnectionCount (  ) 

void vmsBtDownloadManager::UseDetailedLog ( BOOL  bUse  ) 

Definition at line 678 of file vmsBtDownloadManager.cpp.

Referenced by vmsDownloadMgrEx::UseDetailedLog().

UINT vmsBtDownloadManager::GetTrafficLimit (  ) 

void vmsBtDownloadManager::LimitTraffic ( UINT  uLimit  ) 

void vmsBtDownloadManager::StopDownloading (  ) 

Definition at line 656 of file vmsBtDownloadManager.cpp.

References m_bThreadNeedStop, and m_pDownload.

Referenced by vmsDownloadMgrEx::StopDownloading(), and StopThread().

fsInternetResult vmsBtDownloadManager::StartDownloading (  ) 

BOOL vmsBtDownloadManager::DeleteFile (  ) 

fsInternetResult vmsBtDownloadManager::SetToRestartState (  ) 

fsInternetResult vmsBtDownloadManager::RestartDownloading (  ) 

BOOL vmsBtDownloadManager::IsBtDownloadRunning (  ) 

BOOL vmsBtDownloadManager::IsCantStart (  ) 

BOOL vmsBtDownloadManager::MoveToFolder ( LPCSTR  pszPath  ) 

UINT vmsBtDownloadManager::GetSpeed (  ) 

int vmsBtDownloadManager::GetDownloadingSectionCount (  ) 

void vmsBtDownloadManager::GetSectionInfo ( int  nIndex,
vmsSectionInfo sect 
)

BOOL vmsBtDownloadManager::IsDownloading (  ) 

UINT64 vmsBtDownloadManager::GetDownloadedBytesCount (  ) 

UINT64 vmsBtDownloadManager::GetTotalFilesSize (  ) 

int vmsBtDownloadManager::GetNumberOfSections (  ) 

BOOL vmsBtDownloadManager::IsRunning (  ) 

Definition at line 417 of file vmsBtDownloadManager.cpp.

References IsBtDownloadRunning(), and m_bThreadDoJob.

Referenced by vmsDownloadMgrEx::IsRunning().

BOOL vmsBtDownloadManager::IsDone (  ) 

float vmsBtDownloadManager::GetPercentDone (  ) 

fsString vmsBtDownloadManager::get_OutputFilePathName (  ) 

vmsBtDownload * vmsBtDownloadManager::get_BtDownload (  ) 

Definition at line 379 of file vmsBtDownloadManager.cpp.

References m_pDownload.

int vmsBtDownloadManager::get_NextAnnounceInterval (  ) 

vmsBtDownloadPeerInfoList * vmsBtDownloadManager::get_PeerInfoList (  ) 

void vmsBtDownloadManager::get_PeersStat ( int *  pnPeersConnected,
int *  pnSeedsTotal,
int *  pnLeechersTotal,
int *  pnSeedsConnected 
)

UINT64 vmsBtDownloadManager::get_WastedByteCount (  ) 

double vmsBtDownloadManager::get_ShareRating (  ) 

UINT64 vmsBtDownloadManager::get_TotalUploadedByteCount (  ) 

fsString vmsBtDownloadManager::get_CurrentTracker (  ) 

int vmsBtDownloadManager::get_PieceSize (  ) 

int vmsBtDownloadManager::get_PieceCount (  ) 

int vmsBtDownloadManager::get_FilePercentDone ( int  nIndex  ) 

UINT64 vmsBtDownloadManager::get_FileSize ( int  nIndex  ) 

fsString vmsBtDownloadManager::get_FileName ( int  nIndex  ) 

fsString vmsBtDownloadManager::get_TorrentComment (  ) 

void vmsBtDownloadManager::set_TrackerLogin ( LPCSTR  pszUser,
LPCSTR  pszPassword 
)

void vmsBtDownloadManager::disable_Flags ( DWORD  dw  ) 

void vmsBtDownloadManager::enable_Flags ( DWORD  dw  ) 

DWORD vmsBtDownloadManager::get_Flags (  ) 

fsString vmsBtDownloadManager::get_URL (  ) 

Definition at line 215 of file vmsBtDownloadManager.cpp.

References get_TorrentUrl().

Referenced by vmsDownloadMgrEx::get_URL().

void vmsBtDownloadManager::get_TrackerLogin ( fsString strUser,
fsString strPassword 
)

LPCSTR vmsBtDownloadManager::get_TorrentUrl (  ) 

fsString vmsBtDownloadManager::get_InfoHash (  ) 

void vmsBtDownloadManager::SetEventsHandler ( fntBtDownloadManagerEventHandler  pfn,
LPVOID  pData 
)

Definition at line 190 of file vmsBtDownloadManager.cpp.

References m_lpEvParam, and m_pfnEvHandler.

LPCSTR vmsBtDownloadManager::get_OutputPath (  ) 

fsString vmsBtDownloadManager::get_OutputFilePathName ( int  nIndex  ) 

int vmsBtDownloadManager::get_FileCount (  ) 

UINT vmsBtDownloadManager::GetUploadSpeed (  ) 

fsString vmsBtDownloadManager::get_TorrentName (  ) 

vmsBtDownloadStateEx vmsBtDownloadManager::get_State (  ) 

BOOL vmsBtDownloadManager::CreateByTorrentFile ( LPCSTR  pszTorrentFile,
LPCSTR  pszOutputPath,
LPCSTR  pszTorrentUrl 
)

void vmsBtDownloadManager::DeleteBtDownload (  ) 

void vmsBtDownloadManager::SaveBtDownloadState_Pieces (  )  [protected]

DWORD WINAPI vmsBtDownloadManager::_threadCheckStartSeeding ( LPVOID  lp  )  [static, protected]

void vmsBtDownloadManager::RemoveBtDownloadDirectory (  )  [protected]

void vmsBtDownloadManager::RecursiveRemoveDirectory ( LPCWSTR  pwszPath  )  [protected]

Definition at line 1212 of file vmsBtDownloadManager.cpp.

Referenced by RemoveBtDownloadDirectory().

BOOL vmsBtDownloadManager::IsDownloadStatCanBeRead (  )  [protected]

void vmsBtDownloadManager::PostCreateTorrentObject (  )  [protected]

DWORD vmsBtDownloadManager::RaiseEvent ( vmsBtDownloadManagerEvent  ev,
DWORD  dw = 0 
) [protected]

Definition at line 1167 of file vmsBtDownloadManager.cpp.

References m_lpEvParam, m_pfnEvHandler, and NULL.

Referenced by _threadBtDownloadManager(), and _threadCheckStartSeeding().

void vmsBtDownloadManager::SaveBtDownloadState_FileProgress (  )  [protected]

void vmsBtDownloadManager::SaveBtDownloadState (  )  [protected]

void vmsBtDownloadManager::StopThread (  )  [protected]

Definition at line 1102 of file vmsBtDownloadManager.cpp.

References m_bThreadRunning, and StopDownloading().

DWORD WINAPI vmsBtDownloadManager::_threadBtDownloadManager ( LPVOID  lp  )  [static, protected]

void vmsBtDownloadManager::ProcessFilePathMacroses ( CString &  str  )  [protected]

BOOL vmsBtDownloadManager::CreateBtDownload (  )  [protected]


Member Data Documentation

Definition at line 92 of file vmsBtDownloadManager.h.

Referenced by CDownloads_Bittorrent_General::UpdateStat().

Definition at line 134 of file vmsBtDownloadManager.h.

Referenced by IsStoppedByUser(), and vmsBtDownloadManager().

Definition at line 142 of file vmsBtDownloadManager.h.

Referenced by RaiseEvent(), SetEventsHandler(), and vmsBtDownloadManager().

Definition at line 143 of file vmsBtDownloadManager.h.

Referenced by RaiseEvent(), and SetEventsHandler().

Definition at line 145 of file vmsBtDownloadManager.h.

Referenced by LoadState(), SaveState(), and vmsBtDownloadManager().

Definition at line 146 of file vmsBtDownloadManager.h.

Referenced by LoadState(), SaveState(), and vmsBtDownloadManager().


The documentation for this class was generated from the following files:

Generated on Sun May 25 00:21:20 2008 by  doxygen 1.5.6