#include <vmsBtDownloadManager.h>
Definition at line 49 of file vmsBtDownloadManager.h.
| vmsBtDownloadManager::vmsBtDownloadManager | ( | ) |
Definition at line 16 of file vmsBtDownloadManager.cpp.
References _App, vmsBtDownloadManager::_inc_BtDownloadInfo::bDone, fsAppSettings::Bittorrent_DisableSeedingByDef(), BTDF_DISABLE_SEEDING, vmsBtDownloadManager::_inc_BtDownloadInfo::dwFastResumeDataSize, vmsBtDownloadManager::_inc_BtDownloadInfo::dwFlags, enable_Flags(), FALSE, vmsBtDownloadManager::_inc_BtDownloadInfo::fPercentDone, vmsBtDownloadManager::_inc_BtDownloadInfo::fShareRating, m_bStoppedByUser, m_bThreadDoJob, m_bThreadNeedStop, m_bThreadRunning, m_info, m_nUsingBtDownload, m_pDownload, m_pfnEvHandler, m_pTorrent, m_uLowSpeedMaxTime, m_uTrafficLimit, vmsBtDownloadManager::_inc_BtDownloadInfo::nDownloadedBytes, fsTicksMgr::Now(), NULL, vmsBtDownloadManager::_inc_BtDownloadInfo::nUploadedBytes, vmsBtDownloadManager::_inc_BtDownloadInfo::nWastedBytes, vmsBtDownloadManager::_inc_BtDownloadInfo::pbFastResumeData, vmsBtDownloadManager::_inc_BtDownloadInfo::pfProgress, and vmsBtDownloadManager::_inc_BtDownloadInfo::timeLastDataStatAccess.
| vmsBtDownloadManager::~vmsBtDownloadManager | ( | ) | [virtual] |
Definition at line 43 of file vmsBtDownloadManager.cpp.
References DeleteBtDownload(), m_info, m_pTorrent, vmsBtDownloadManager::_inc_BtDownloadInfo::pbFastResumeData, vmsBtDownloadManager::_inc_BtDownloadInfo::pfProgress, SAFE_DELETE_ARRAY, and SAFE_RELEASE.
| fsString vmsBtDownloadManager::get_RootFolderName | ( | ) |
Definition at line 1373 of file vmsBtDownloadManager.cpp.
References get_FileCount(), get_FileName(), and MY_MAX_PATH.
Referenced by vmsDownloadMgrEx::Do_OpenFolder(), and CDownloads_Bittorrent_Files::set_ActiveDownload().
| UINT64 vmsBtDownloadManager::get_SplittedByteCountAtBeginningOfFile | ( | ) |
Definition at line 1349 of file vmsBtDownloadManager.cpp.
References GetNumberOfSections(), GetTotalFilesSize(), vmsBtDownload::is_PieceCompleted(), IsDownloadStatCanBeRead(), m_info, m_nUsingBtDownload, m_pDownload, and vmsBtDownloadManager::_inc_BtDownloadInfo::vPieces.
| void vmsBtDownloadManager::GetSectionsInfo | ( | std::vector< vmsSectionInfo > & | v | ) |
Definition at line 1324 of file vmsBtDownloadManager.cpp.
References BOOL, GetNumberOfSections(), GetTotalFilesSize(), vmsBtDownload::is_PieceCompleted(), IsDownloadStatCanBeRead(), m_info, m_nUsingBtDownload, m_pDownload, vmsSectionInfo::uDCurrent, vmsSectionInfo::uDEnd, vmsSectionInfo::uDStart, and vmsBtDownloadManager::_inc_BtDownloadInfo::vPieces.
Referenced by vmsDownloadMgrEx::GetSplittedSectionsList().
| int vmsBtDownloadManager::get_CurrentTaskProgress | ( | ) |
Definition at line 1309 of file vmsBtDownloadManager.cpp.
References vmsBtDownload::get_CurrentTaskProgress(), m_pDownload, and NULL.
Referenced by vmsDownloadMgrEx::get_ReservingDiskSpaceProgress().
| std::wstring vmsBtDownloadManager::get_FileNameW | ( | int | nIndex | ) |
Definition at line 1293 of file vmsBtDownloadManager.cpp.
References ASSERT, vmsBtFile::get_FileName(), LPWSTR, m_pTorrent, MY_MAX_PATH, NULL, and vmsUtf8Unicode().
Referenced by DeleteFile(), MoveToFolder(), and RemoveBtDownloadDirectory().
| void vmsBtDownloadManager::StopSeeding | ( | ) |
Definition at line 1284 of file vmsBtDownloadManager.cpp.
References BTDSE_SEEDING, DeleteBtDownload(), get_State(), and SaveBtDownloadState().
Referenced by EnableSeeding().
| void vmsBtDownloadManager::EnableSeeding | ( | BOOL | bEnable | ) |
Definition at line 1190 of file vmsBtDownloadManager.cpp.
References _threadCheckStartSeeding(), vmsBtDownloadManager::_inc_BtDownloadInfo::bDone, BTDF_DISABLE_SEEDING, CreateBtDownload(), disable_Flags(), enable_Flags(), m_bThreadRunning, m_info, m_pDownload, NULL, and StopSeeding().
Referenced by LoadState().
| BOOL vmsBtDownloadManager::IsStoppedByUser | ( | ) |
Definition at line 970 of file vmsBtDownloadManager.cpp.
References m_bStoppedByUser.
Referenced by vmsDownloadMgrEx::IsStoppedByUser().
Definition at line 847 of file vmsBtDownloadManager.cpp.
References _BT, ASSERT, vmsBtDownloadManager::_inc_BtDownloadInfo::bDone, BTDF_DISABLE_SEEDING, vmsBtSupport::CreateTorrentFileObject(), vmsBtDownloadManager::_inc_BtDownloadInfo::dwFastResumeDataSize, vmsBtDownloadManager::_inc_BtDownloadInfo::dwFlags, EnableSeeding(), FALSE, vmsBtDownloadManager::_inc_BtDownloadInfo::fPercentDone, vmsBtDownloadManager::_inc_BtDownloadInfo::fShareRating, get_FileCount(), vmsBtFile::LoadFromBuffer(), LPDWORD, m_info, m_pTorrent, m_uLowSpeedMaxTime, m_uTrafficLimit, vmsBtDownloadManager::_inc_BtDownloadInfo::nDownloadedBytes, NULL, vmsBtDownloadManager::_inc_BtDownloadInfo::nUploadedBytes, vmsBtDownloadManager::_inc_BtDownloadInfo::nWastedBytes, vmsBtDownloadManager::_inc_BtDownloadInfo::pbFastResumeData, vmsBtDownloadManager::_inc_BtDownloadInfo::pfProgress, PostCreateTorrentObject(), SAFE_DELETE_ARRAY, vmsBtDownloadManager::_inc_BtDownloadInfo::strCurrentTracker, vmsBtDownloadManager::_inc_BtDownloadInfo::strOutputPath, vmsBtDownloadManager::_inc_BtDownloadInfo::strTorrentUrl, vmsBtDownloadManager::_inc_BtDownloadInfo::strTrackerPassword, vmsBtDownloadManager::_inc_BtDownloadInfo::strTrackerUser, TRUE, and vmsBtDownloadManager::_inc_BtDownloadInfo::vPieces.
Referenced by vmsDownloadMgrEx::LoadState().
| BOOL vmsBtDownloadManager::SaveState | ( | LPBYTE | pb, | |
| LPDWORD | pdwSize | |||
| ) |
Definition at line 691 of file vmsBtDownloadManager.cpp.
References vmsBtDownloadManager::_inc_BtDownloadInfo::bDone, CHECK_SIZE, vmsBtDownloadManager::_inc_BtDownloadInfo::dwFastResumeDataSize, vmsBtDownloadManager::_inc_BtDownloadInfo::dwFlags, FALSE, vmsBtDownloadManager::_inc_BtDownloadInfo::fPercentDone, vmsBtDownloadManager::_inc_BtDownloadInfo::fShareRating, get_FileCount(), vmsBtFile::get_TorrentBuffer(), fsString::GetLength(), LPDWORD, m_info, m_pDownload, m_pTorrent, m_uLowSpeedMaxTime, m_uTrafficLimit, vmsBtDownloadManager::_inc_BtDownloadInfo::nDownloadedBytes, NULL, vmsBtDownloadManager::_inc_BtDownloadInfo::nUploadedBytes, vmsBtDownloadManager::_inc_BtDownloadInfo::nWastedBytes, vmsBtDownloadManager::_inc_BtDownloadInfo::pbFastResumeData, vmsBtDownloadManager::_inc_BtDownloadInfo::pfProgress, SaveBtDownloadState(), vmsBtDownloadManager::_inc_BtDownloadInfo::strCurrentTracker, vmsBtDownloadManager::_inc_BtDownloadInfo::strOutputPath, vmsBtDownloadManager::_inc_BtDownloadInfo::strTorrentUrl, vmsBtDownloadManager::_inc_BtDownloadInfo::strTrackerPassword, vmsBtDownloadManager::_inc_BtDownloadInfo::strTrackerUser, TRUE, and vmsBtDownloadManager::_inc_BtDownloadInfo::vPieces.
Referenced by vmsDownloadMgrEx::SaveState().
| int vmsBtDownloadManager::get_ConnectionCount | ( | ) |
Definition at line 683 of file vmsBtDownloadManager.cpp.
References vmsBtDownload::get_ConnectionCount(), m_nUsingBtDownload, and m_pDownload.
Referenced by vmsDownloadMgrEx::GetConnectionCount().
| void vmsBtDownloadManager::UseDetailedLog | ( | BOOL | bUse | ) |
Definition at line 678 of file vmsBtDownloadManager.cpp.
Referenced by vmsDownloadMgrEx::UseDetailedLog().
| UINT vmsBtDownloadManager::GetTrafficLimit | ( | ) |
Definition at line 670 of file vmsBtDownloadManager.cpp.
References vmsBtDownload::GetDownloadLimit(), m_nUsingBtDownload, and m_pDownload.
Referenced by vmsDownloadMgrEx::GetTrafficLimit().
| void vmsBtDownloadManager::LimitTraffic | ( | UINT | uLimit | ) |
Definition at line 662 of file vmsBtDownloadManager.cpp.
References m_nUsingBtDownload, m_pDownload, and vmsBtDownload::SetDownloadLimit().
Referenced by vmsDownloadMgrEx::LimitTraffic().
| 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 | ( | ) |
Definition at line 636 of file vmsBtDownloadManager.cpp.
References _threadBtDownloadManager(), vmsBtDownloadManager::_inc_BtDownloadInfo::bDone, CreateBtDownload(), FALSE, IR_ERROR, IR_S_FALSE, IR_SUCCESS, m_bThreadDoJob, m_bThreadNeedStop, m_bThreadRunning, m_info, m_pDownload, and NULL.
Referenced by RestartDownloading(), and vmsDownloadMgrEx::StartDownloading().
| BOOL vmsBtDownloadManager::DeleteFile | ( | ) |
Definition at line 608 of file vmsBtDownloadManager.cpp.
References DeleteBtDownload(), FALSE, get_FileCount(), get_FileNameW(), m_info, m_pDownload, RemoveBtDownloadDirectory(), SaveBtDownloadState(), and vmsBtDownloadManager::_inc_BtDownloadInfo::strOutputPath.
Referenced by vmsDownloadMgrEx::DeleteFile(), and SetToRestartState().
| fsInternetResult vmsBtDownloadManager::SetToRestartState | ( | ) |
Definition at line 598 of file vmsBtDownloadManager.cpp.
References vmsBtDownloadManager::_inc_BtDownloadInfo::bDone, DeleteFile(), FALSE, IR_ERROR, IR_SUCCESS, and m_info.
Referenced by RestartDownloading(), and vmsDownloadMgrEx::SetToRestartState().
| fsInternetResult vmsBtDownloadManager::RestartDownloading | ( | ) |
Definition at line 588 of file vmsBtDownloadManager.cpp.
References IR_SUCCESS, SetToRestartState(), and StartDownloading().
Referenced by vmsDownloadMgrEx::RestartDownloading().
| BOOL vmsBtDownloadManager::IsBtDownloadRunning | ( | ) |
Definition at line 569 of file vmsBtDownloadManager.cpp.
References b, BOOL, BTDSE_QUEUED, BTDSE_SEEDING, FALSE, vmsBtDownload::GetState(), vmsBtDownload::IsPaused(), m_nUsingBtDownload, m_pDownload, and NULL.
Referenced by _threadBtDownloadManager(), IsCantStart(), and IsRunning().
| BOOL vmsBtDownloadManager::IsCantStart | ( | ) |
Definition at line 561 of file vmsBtDownloadManager.cpp.
References BTDSE_DOWNLOADING, FALSE, get_State(), IsBtDownloadRunning(), m_pDownload, and NULL.
Referenced by vmsDownloadMgrEx::IsCantStart().
| BOOL vmsBtDownloadManager::MoveToFolder | ( | LPCSTR | pszPath | ) |
Definition at line 491 of file vmsBtDownloadManager.cpp.
References FALSE, fsBuildPathToFileW(), get_FileCount(), get_FileNameW(), m_info, m_nUsingBtDownload, m_pDownload, vmsBtDownload::MoveToFolder(), NULL, ProcessFilePathMacroses(), RemoveBtDownloadDirectory(), vmsBtDownloadManager::_inc_BtDownloadInfo::strOutputPath, and TRUE.
Referenced by vmsDownloadMgrEx::MoveToFolder().
| UINT vmsBtDownloadManager::GetSpeed | ( | ) |
Definition at line 483 of file vmsBtDownloadManager.cpp.
References vmsBtDownload::GetDownloadSpeed(), m_nUsingBtDownload, and m_pDownload.
Referenced by _threadBtDownloadManager(), and vmsDownloadMgrEx::GetSpeed().
| int vmsBtDownloadManager::GetDownloadingSectionCount | ( | ) |
Definition at line 475 of file vmsBtDownloadManager.cpp.
References vmsBtDownload::get_DownloadConnectionCount(), m_nUsingBtDownload, and m_pDownload.
Referenced by vmsDownloadMgrEx::GetDownloadingSectionCount().
| void vmsBtDownloadManager::GetSectionInfo | ( | int | nIndex, | |
| vmsSectionInfo * | sect | |||
| ) |
Definition at line 459 of file vmsBtDownloadManager.cpp.
References GetNumberOfSections(), GetTotalFilesSize(), vmsBtDownload::is_PieceCompleted(), IsDownloadStatCanBeRead(), m_info, m_nUsingBtDownload, m_pDownload, vmsSectionInfo::uDCurrent, vmsSectionInfo::uDEnd, vmsSectionInfo::uDStart, and vmsBtDownloadManager::_inc_BtDownloadInfo::vPieces.
Referenced by vmsDownloadMgrEx::GetSectionInfo().
| BOOL vmsBtDownloadManager::IsDownloading | ( | ) |
Definition at line 445 of file vmsBtDownloadManager.cpp.
References b, BOOL, BTDSE_DOWNLOADING, FALSE, get_State(), vmsBtDownload::IsPaused(), m_nUsingBtDownload, m_pDownload, and NULL.
Referenced by vmsDownloadMgrEx::IsDownloading().
| UINT64 vmsBtDownloadManager::GetDownloadedBytesCount | ( | ) |
Definition at line 437 of file vmsBtDownloadManager.cpp.
References vmsBtDownload::get_TotalDownloadedBytesCount(), IsDownloadStatCanBeRead(), m_info, m_nUsingBtDownload, m_pDownload, and vmsBtDownloadManager::_inc_BtDownloadInfo::nDownloadedBytes.
Referenced by vmsDownloadMgrEx::GetBytesLeft(), vmsDownloadMgrEx::GetDownloadedBytesCount(), and SaveBtDownloadState().
| UINT64 vmsBtDownloadManager::GetTotalFilesSize | ( | ) |
Definition at line 431 of file vmsBtDownloadManager.cpp.
References ASSERT, vmsBtFile::get_TotalFilesSize(), m_pTorrent, and NULL.
Referenced by get_SplittedByteCountAtBeginningOfFile(), vmsDownloadMgrEx::GetBytesLeft(), vmsDownloadMgrEx::GetLDFileSize(), GetSectionInfo(), GetSectionsInfo(), and vmsDownloadMgrEx::GetSSFileSize().
| int vmsBtDownloadManager::GetNumberOfSections | ( | ) |
Definition at line 422 of file vmsBtDownloadManager.cpp.
References vmsBtDownload::get_PiecesProgressMap(), IsDownloadStatCanBeRead(), m_info, m_nUsingBtDownload, m_pDownload, NULL, and vmsBtDownloadManager::_inc_BtDownloadInfo::vPieces.
Referenced by get_SplittedByteCountAtBeginningOfFile(), vmsDownloadMgrEx::GetNumberOfSections(), GetSectionInfo(), GetSectionsInfo(), and SaveBtDownloadState_Pieces().
| BOOL vmsBtDownloadManager::IsRunning | ( | ) |
Definition at line 417 of file vmsBtDownloadManager.cpp.
References IsBtDownloadRunning(), and m_bThreadDoJob.
Referenced by vmsDownloadMgrEx::IsRunning().
| BOOL vmsBtDownloadManager::IsDone | ( | ) |
Definition at line 401 of file vmsBtDownloadManager.cpp.
References vmsBtDownloadManager::_inc_BtDownloadInfo::bDone, BTDSE_DOWNLOADING, BTDSE_SEEDING, FALSE, get_State(), GetPercentDone(), IsDownloadStatCanBeRead(), m_info, and TRUE.
Referenced by vmsDownloadMgrEx::IsDone(), and SaveBtDownloadState().
| float vmsBtDownloadManager::GetPercentDone | ( | ) |
Definition at line 393 of file vmsBtDownloadManager.cpp.
References vmsBtDownloadManager::_inc_BtDownloadInfo::fPercentDone, vmsBtDownload::get_PercentDone(), IsDownloadStatCanBeRead(), m_info, m_nUsingBtDownload, and m_pDownload.
Referenced by _threadCheckStartSeeding(), vmsDownloadMgrEx::GetPercentDone(), IsDone(), and SaveBtDownloadState().
| fsString vmsBtDownloadManager::get_OutputFilePathName | ( | ) |
Definition at line 384 of file vmsBtDownloadManager.cpp.
References ASSERT, vmsBtFile::get_FileCount(), get_OutputPath(), m_pTorrent, and NULL.
Referenced by vmsDownloadMgrEx::get_OutputFilePathName().
| vmsBtDownload * vmsBtDownloadManager::get_BtDownload | ( | ) |
| int vmsBtDownloadManager::get_NextAnnounceInterval | ( | ) |
Definition at line 371 of file vmsBtDownloadManager.cpp.
References b, BOOL, vmsBtDownload::get_NextAnnounceInterval(), m_nUsingBtDownload, and m_pDownload.
| vmsBtDownloadPeerInfoList * vmsBtDownloadManager::get_PeerInfoList | ( | ) |
Definition at line 363 of file vmsBtDownloadManager.cpp.
References vmsBtDownload::get_PeerInfoList(), m_nUsingBtDownload, m_pDownload, and NULL.
| void vmsBtDownloadManager::get_PeersStat | ( | int * | pnPeersConnected, | |
| int * | pnSeedsTotal, | |||
| int * | pnLeechersTotal, | |||
| int * | pnSeedsConnected | |||
| ) |
Definition at line 340 of file vmsBtDownloadManager.cpp.
References vmsBtDownload::get_PeersStat(), m_nUsingBtDownload, and m_pDownload.
| UINT64 vmsBtDownloadManager::get_WastedByteCount | ( | ) |
Definition at line 332 of file vmsBtDownloadManager.cpp.
References vmsBtDownload::get_WastedByteCount(), IsDownloadStatCanBeRead(), m_info, m_nUsingBtDownload, m_pDownload, and vmsBtDownloadManager::_inc_BtDownloadInfo::nWastedBytes.
Referenced by SaveBtDownloadState().
| double vmsBtDownloadManager::get_ShareRating | ( | ) |
Definition at line 324 of file vmsBtDownloadManager.cpp.
References vmsBtDownloadManager::_inc_BtDownloadInfo::fShareRating, vmsBtDownload::get_ShareRating(), IsDownloadStatCanBeRead(), m_info, m_nUsingBtDownload, and m_pDownload.
Referenced by SaveBtDownloadState(), and CDownloads_Bittorrent_General::UpdateUploadStat().
| UINT64 vmsBtDownloadManager::get_TotalUploadedByteCount | ( | ) |
Definition at line 316 of file vmsBtDownloadManager.cpp.
References vmsBtDownload::get_TotalUploadedByteCount(), IsDownloadStatCanBeRead(), m_info, m_nUsingBtDownload, m_pDownload, and vmsBtDownloadManager::_inc_BtDownloadInfo::nUploadedBytes.
Referenced by SaveBtDownloadState(), and CDownloads_Bittorrent_General::UpdateUploadStat().
| fsString vmsBtDownloadManager::get_CurrentTracker | ( | ) |
Definition at line 302 of file vmsBtDownloadManager.cpp.
References vmsBtDownload::get_CurrentTracker(), m_info, m_nUsingBtDownload, m_pDownload, NULL, and vmsBtDownloadManager::_inc_BtDownloadInfo::strCurrentTracker.
Referenced by SaveBtDownloadState(), and CDownloads_Bittorrent_General::UpdateStat().
| int vmsBtDownloadManager::get_PieceSize | ( | ) |
Definition at line 296 of file vmsBtDownloadManager.cpp.
References ASSERT, vmsBtFile::get_PieceSize(), m_pTorrent, and NULL.
Referenced by CDownloads_Bittorrent_General::UpdateStat().
| int vmsBtDownloadManager::get_PieceCount | ( | ) |
Definition at line 290 of file vmsBtDownloadManager.cpp.
References ASSERT, vmsBtFile::get_PieceCount(), m_pTorrent, and NULL.
Referenced by PostCreateTorrentObject(), and CDownloads_Bittorrent_General::UpdateStat().
| int vmsBtDownloadManager::get_FilePercentDone | ( | int | nIndex | ) |
Definition at line 276 of file vmsBtDownloadManager.cpp.
References BTDSE_CHECKING_FILES, BTDSE_QUEUED, get_State(), m_info, fsTicksMgr::Now(), NULL, vmsBtDownloadManager::_inc_BtDownloadInfo::pfProgress, SaveBtDownloadState_FileProgress(), and vmsBtDownloadManager::_inc_BtDownloadInfo::timeLastDataStatAccess.
| UINT64 vmsBtDownloadManager::get_FileSize | ( | int | nIndex | ) |
Definition at line 270 of file vmsBtDownloadManager.cpp.
References ASSERT, vmsBtFile::get_FileSize(), m_pTorrent, and NULL.
Referenced by CDownloads_Bittorrent_Files::set_ActiveDownload().
| fsString vmsBtDownloadManager::get_FileName | ( | int | nIndex | ) |
Definition at line 254 of file vmsBtDownloadManager.cpp.
References ASSERT, vmsBtFile::get_FileName(), LPSTR, m_pTorrent, MY_MAX_PATH, NULL, and vmsUtf8ToAscii().
Referenced by get_OutputFilePathName(), get_RootFolderName(), and CDownloads_Bittorrent_Files::set_ActiveDownload().
| fsString vmsBtDownloadManager::get_TorrentComment | ( | ) |
Definition at line 245 of file vmsBtDownloadManager.cpp.
References ASSERT, vmsBtFile::get_TorrentComment(), m_pTorrent, NULL, and vmsUtf8ToAscii().
Referenced by CDownloadsWnd::CreateBtDownloadFromFile(), fsDownloadsMgr::OnDldDone_CheckDownloadIsBittorrent(), and CCreateDownloadFromTorrentFileDlg::OnOK().
Definition at line 235 of file vmsBtDownloadManager.cpp.
References m_info, m_nUsingBtDownload, m_pDownload, vmsBtDownload::set_TrackerLogin(), vmsBtDownloadManager::_inc_BtDownloadInfo::strTrackerPassword, and vmsBtDownloadManager::_inc_BtDownloadInfo::strTrackerUser.
Referenced by CCreateDownloadFromTorrentFileDlg::OnOK().
| void vmsBtDownloadManager::disable_Flags | ( | DWORD | dw | ) |
Definition at line 230 of file vmsBtDownloadManager.cpp.
References vmsBtDownloadManager::_inc_BtDownloadInfo::dwFlags, and m_info.
Referenced by EnableSeeding(), fsDownloadsMgr::OnDldDone_CheckDownloadIsBittorrent(), and vmsDownloadMgrEx::set_LaunchWhenDone().
| void vmsBtDownloadManager::enable_Flags | ( | DWORD | dw | ) |
Definition at line 225 of file vmsBtDownloadManager.cpp.
References vmsBtDownloadManager::_inc_BtDownloadInfo::dwFlags, and m_info.
Referenced by EnableSeeding(), fsDownloadsMgr::OnDldDone_CheckDownloadIsBittorrent(), vmsDownloadMgrEx::set_LaunchWhenDone(), and vmsBtDownloadManager().
| DWORD vmsBtDownloadManager::get_Flags | ( | ) |
Definition at line 220 of file vmsBtDownloadManager.cpp.
References vmsBtDownloadManager::_inc_BtDownloadInfo::dwFlags, and m_info.
Referenced by vmsDownloadMgrEx::IsDescriptionFileShouldBeGenerated(), vmsDownloadMgrEx::IsDontConfirmLaunchWhenDone(), and vmsDownloadMgrEx::IsLaunchWhenDone().
| fsString vmsBtDownloadManager::get_URL | ( | ) |
Definition at line 215 of file vmsBtDownloadManager.cpp.
References get_TorrentUrl().
Referenced by vmsDownloadMgrEx::get_URL().
Definition at line 209 of file vmsBtDownloadManager.cpp.
References m_info, vmsBtDownloadManager::_inc_BtDownloadInfo::strTrackerPassword, and vmsBtDownloadManager::_inc_BtDownloadInfo::strTrackerUser.
| LPCSTR vmsBtDownloadManager::get_TorrentUrl | ( | ) |
Definition at line 204 of file vmsBtDownloadManager.cpp.
References fsString::IsEmpty(), m_info, and vmsBtDownloadManager::_inc_BtDownloadInfo::strTorrentUrl.
Referenced by get_URL().
| fsString vmsBtDownloadManager::get_InfoHash | ( | ) |
Definition at line 196 of file vmsBtDownloadManager.cpp.
References ASSERT, vmsBtFile::get_InfoHash(), m_pTorrent, and NULL.
Referenced by CDownloads_Bittorrent_General::UpdateStat().
| 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 | ( | ) |
Definition at line 185 of file vmsBtDownloadManager.cpp.
References m_info, and vmsBtDownloadManager::_inc_BtDownloadInfo::strOutputPath.
Referenced by get_OutputFilePathName().
| fsString vmsBtDownloadManager::get_OutputFilePathName | ( | int | nIndex | ) |
Definition at line 175 of file vmsBtDownloadManager.cpp.
References ASSERT, get_FileName(), get_OutputPath(), fsString::GetLength(), m_pTorrent, and NULL.
| int vmsBtDownloadManager::get_FileCount | ( | ) |
Definition at line 169 of file vmsBtDownloadManager.cpp.
References ASSERT, vmsBtFile::get_FileCount(), m_pTorrent, and NULL.
Referenced by DeleteFile(), vmsDownloadMgrEx::Do_OpenFolder(), get_RootFolderName(), LoadState(), MoveToFolder(), SaveBtDownloadState_FileProgress(), SaveState(), and CDownloads_Bittorrent_Files::set_ActiveDownload().
| UINT vmsBtDownloadManager::GetUploadSpeed | ( | ) |
Definition at line 161 of file vmsBtDownloadManager.cpp.
References b, BOOL, vmsBtDownload::GetUploadSpeed(), m_nUsingBtDownload, and m_pDownload.
Referenced by CDownloads_Bittorrent_General::UpdateUploadStat().
| fsString vmsBtDownloadManager::get_TorrentName | ( | ) |
Definition at line 152 of file vmsBtDownloadManager.cpp.
References ASSERT, vmsBtFile::get_TorrentName(), m_pTorrent, NULL, and vmsUtf8ToAscii().
| vmsBtDownloadStateEx vmsBtDownloadManager::get_State | ( | ) |
Definition at line 143 of file vmsBtDownloadManager.cpp.
References BTDSE_STOPPED, vmsBtDownload::GetState(), m_nUsingBtDownload, and m_pDownload.
Referenced by _threadBtDownloadManager(), _threadCheckStartSeeding(), get_FilePercentDone(), IsCantStart(), IsDone(), IsDownloading(), IsDownloadStatCanBeRead(), vmsDownloadMgrEx::IsReservingDiskSpace(), SaveBtDownloadState(), and StopSeeding().
| BOOL vmsBtDownloadManager::CreateByTorrentFile | ( | LPCSTR | pszTorrentFile, | |
| LPCSTR | pszOutputPath, | |||
| LPCSTR | pszTorrentUrl | |||
| ) |
Definition at line 51 of file vmsBtDownloadManager.cpp.
References _BT, ASSERT, vmsBtSupport::CreateTorrentFileObject(), FALSE, fsString::GetLength(), vmsBtFile::LoadFromFile(), m_info, m_pTorrent, NULL, PostCreateTorrentObject(), vmsBtFile::Release(), vmsBtDownloadManager::_inc_BtDownloadInfo::strOutputPath, vmsBtDownloadManager::_inc_BtDownloadInfo::strTorrentUrl, and TRUE.
Referenced by CDownloadsWnd::CreateBtDownloadFromFile(), fsDownloadsMgr::OnDldDone_CheckDownloadIsBittorrent(), and CCreateDownloadFromTorrentFileDlg::OnOK().
| void vmsBtDownloadManager::DeleteBtDownload | ( | ) |
Definition at line 131 of file vmsBtDownloadManager.cpp.
References _BT, vmsBtSession::DeleteDownload(), vmsBtSupport::get_Session(), m_nUsingBtDownload, m_pDownload, and NULL.
Referenced by _threadBtDownloadManager(), _threadCheckStartSeeding(), DeleteFile(), StopSeeding(), and ~vmsBtDownloadManager().
| void vmsBtDownloadManager::SaveBtDownloadState_Pieces | ( | ) | [protected] |
Definition at line 1316 of file vmsBtDownloadManager.cpp.
References GetNumberOfSections(), vmsBtDownload::is_PieceCompleted(), m_info, m_pDownload, and vmsBtDownloadManager::_inc_BtDownloadInfo::vPieces.
Referenced by SaveBtDownloadState().
| DWORD WINAPI vmsBtDownloadManager::_threadCheckStartSeeding | ( | LPVOID | lp | ) | [static, protected] |
Definition at line 1259 of file vmsBtDownloadManager.cpp.
References BTDF_DISABLE_SEEDING, BTDME_SEEDING, BTDSE_CHECKING_FILES, BTDSE_CONNECTING_TRACKER, BTDSE_QUEUED, BTDSE_SEEDING, DeleteBtDownload(), vmsBtDownloadManager::_inc_BtDownloadInfo::dwFlags, get_State(), GetPercentDone(), m_bThreadNeedStop, m_bThreadRunning, m_info, m_pDownload, NULL, RaiseEvent(), and simple_client::s.
Referenced by EnableSeeding().
| void vmsBtDownloadManager::RemoveBtDownloadDirectory | ( | ) | [protected] |
Definition at line 1246 of file vmsBtDownloadManager.cpp.
References get_FileNameW(), m_info, RecursiveRemoveDirectory(), and vmsBtDownloadManager::_inc_BtDownloadInfo::strOutputPath.
Referenced by DeleteFile(), and MoveToFolder().
| void vmsBtDownloadManager::RecursiveRemoveDirectory | ( | LPCWSTR | pwszPath | ) | [protected] |
Definition at line 1212 of file vmsBtDownloadManager.cpp.
Referenced by RemoveBtDownloadDirectory().
| BOOL vmsBtDownloadManager::IsDownloadStatCanBeRead | ( | ) | [protected] |
Definition at line 1181 of file vmsBtDownloadManager.cpp.
References b, BOOL, BTDSE_CHECKING_FILES, BTDSE_QUEUED, get_State(), m_nUsingBtDownload, and m_pDownload.
Referenced by get_ShareRating(), get_SplittedByteCountAtBeginningOfFile(), get_TotalUploadedByteCount(), get_WastedByteCount(), GetDownloadedBytesCount(), GetNumberOfSections(), GetPercentDone(), GetSectionInfo(), GetSectionsInfo(), and IsDone().
| void vmsBtDownloadManager::PostCreateTorrentObject | ( | ) | [protected] |
Definition at line 1175 of file vmsBtDownloadManager.cpp.
References get_PieceCount(), m_info, and vmsBtDownloadManager::_inc_BtDownloadInfo::vPieces.
Referenced by CreateByTorrentFile(), and LoadState().
| 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] |
Definition at line 1151 of file vmsBtDownloadManager.cpp.
References get_FileCount(), vmsBtDownload::get_FileProgress(), m_info, m_pDownload, fsTicksMgr::Now(), NULL, vmsBtDownloadManager::_inc_BtDownloadInfo::pfProgress, and vmsBtDownloadManager::_inc_BtDownloadInfo::timeLastDataStatAccess.
Referenced by get_FilePercentDone(), and SaveBtDownloadState().
| void vmsBtDownloadManager::SaveBtDownloadState | ( | ) | [protected] |
Definition at line 1112 of file vmsBtDownloadManager.cpp.
References vmsBtDownloadManager::_inc_BtDownloadInfo::bDone, BTDSE_QUEUED, vmsBtDownloadManager::_inc_BtDownloadInfo::dwFastResumeDataSize, FALSE, vmsBtDownloadManager::_inc_BtDownloadInfo::fPercentDone, vmsBtDownloadManager::_inc_BtDownloadInfo::fShareRating, get_CurrentTracker(), vmsBtDownload::get_FastResumeData(), get_ShareRating(), get_State(), get_TotalUploadedByteCount(), get_WastedByteCount(), GetDownloadedBytesCount(), GetPercentDone(), vmsBtDownload::is_HandleValid(), IsDone(), m_info, m_nUsingBtDownload, m_pDownload, vmsBtDownloadManager::_inc_BtDownloadInfo::nDownloadedBytes, NULL, vmsBtDownloadManager::_inc_BtDownloadInfo::nUploadedBytes, vmsBtDownloadManager::_inc_BtDownloadInfo::nWastedBytes, vmsBtDownloadManager::_inc_BtDownloadInfo::pbFastResumeData, SAFE_DELETE_ARRAY, SaveBtDownloadState_FileProgress(), SaveBtDownloadState_Pieces(), and vmsBtDownloadManager::_inc_BtDownloadInfo::strCurrentTracker.
Referenced by _threadBtDownloadManager(), DeleteFile(), SaveState(), and StopSeeding().
| 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] |
Definition at line 975 of file vmsBtDownloadManager.cpp.
References _DldsMgr, fsDownloadsMgr::AllowStartNewDownloads(), BTDF_DISABLE_SEEDING, BTDME_ALLOCATING, BTDME_CHECKING_FILES, BTDME_DOWNLOAD_STARTED, BTDME_DOWNLOAD_STOPPED_OR_DONE, BTDME_DOWNLOADING, BTDME_SEEDING, BTDSE_ALLOCATING, BTDSE_CHECKING_FILES, BTDSE_DOWNLOADING, BTDSE_QUEUED, BTDSE_SEEDING, CreateBtDownload(), DeleteBtDownload(), vmsBtDownloadManager::_inc_BtDownloadInfo::dwFlags, FALSE, get_State(), GetSpeed(), IsBtDownloadRunning(), LOG_local, m_bThreadDoJob, m_bThreadNeedStop, m_bThreadRunning, m_info, m_pDownload, fsTicksMgr::Now(), NULL, vmsBtDownload::Pause(), fsDownloadsMgr::ProcessDownloads(), RaiseEvent(), and SaveBtDownloadState().
Referenced by StartDownloading().
| void vmsBtDownloadManager::ProcessFilePathMacroses | ( | CString & | str | ) | [protected] |
Definition at line 98 of file vmsBtDownloadManager.cpp.
References ASSERT, fsURL::Crack(), vmsBtFile::get_TrackerUrl(), fsURL::GetHostName(), fsURL::GetPath(), m_pTorrent, and NULL.
Referenced by CreateBtDownload(), and MoveToFolder().
| BOOL vmsBtDownloadManager::CreateBtDownload | ( | ) | [protected] |
Definition at line 76 of file vmsBtDownloadManager.cpp.
References _BT, BTDF_RESERVE_DISK_SPACE, vmsBtSession::CreateDownload(), vmsBtDownloadManager::_inc_BtDownloadInfo::dwFastResumeDataSize, vmsBtDownloadManager::_inc_BtDownloadInfo::dwFlags, FALSE, vmsBtSupport::get_Session(), m_info, m_pDownload, m_pTorrent, NULL, vmsBtDownloadManager::_inc_BtDownloadInfo::pbFastResumeData, ProcessFilePathMacroses(), vmsBtDownloadManager::_inc_BtDownloadInfo::strOutputPath, and TRUE.
Referenced by _threadBtDownloadManager(), EnableSeeding(), and StartDownloading().
Definition at line 92 of file vmsBtDownloadManager.h.
Referenced by CDownloads_Bittorrent_General::UpdateStat().
LONG vmsBtDownloadManager::m_nUsingBtDownload [protected] |
Definition at line 123 of file vmsBtDownloadManager.h.
Referenced by DeleteBtDownload(), get_ConnectionCount(), get_CurrentTracker(), get_NextAnnounceInterval(), get_PeerInfoList(), get_PeersStat(), get_ShareRating(), get_SplittedByteCountAtBeginningOfFile(), get_State(), get_TotalUploadedByteCount(), get_WastedByteCount(), GetDownloadedBytesCount(), GetDownloadingSectionCount(), GetNumberOfSections(), GetPercentDone(), GetSectionInfo(), GetSectionsInfo(), GetSpeed(), GetTrafficLimit(), GetUploadSpeed(), IsBtDownloadRunning(), IsDownloading(), IsDownloadStatCanBeRead(), LimitTraffic(), MoveToFolder(), SaveBtDownloadState(), set_TrackerLogin(), and vmsBtDownloadManager().
BOOL vmsBtDownloadManager::m_bStoppedByUser [protected] |
Definition at line 134 of file vmsBtDownloadManager.h.
Referenced by IsStoppedByUser(), and vmsBtDownloadManager().
bool vmsBtDownloadManager::m_bThreadRunning [protected] |
Definition at line 135 of file vmsBtDownloadManager.h.
Referenced by _threadBtDownloadManager(), _threadCheckStartSeeding(), EnableSeeding(), StartDownloading(), StopThread(), and vmsBtDownloadManager().
bool vmsBtDownloadManager::m_bThreadDoJob [protected] |
Definition at line 135 of file vmsBtDownloadManager.h.
Referenced by _threadBtDownloadManager(), IsRunning(), StartDownloading(), and vmsBtDownloadManager().
bool vmsBtDownloadManager::m_bThreadNeedStop [protected] |
Definition at line 135 of file vmsBtDownloadManager.h.
Referenced by _threadBtDownloadManager(), _threadCheckStartSeeding(), StartDownloading(), StopDownloading(), and vmsBtDownloadManager().
vmsBtFile* vmsBtDownloadManager::m_pTorrent [protected] |
Definition at line 139 of file vmsBtDownloadManager.h.
Referenced by CreateBtDownload(), CreateByTorrentFile(), get_FileCount(), get_FileName(), get_FileNameW(), get_FileSize(), get_InfoHash(), get_OutputFilePathName(), get_PieceCount(), get_PieceSize(), get_TorrentComment(), get_TorrentName(), GetTotalFilesSize(), LoadState(), ProcessFilePathMacroses(), SaveState(), vmsBtDownloadManager(), and ~vmsBtDownloadManager().
vmsBtDownload* vmsBtDownloadManager::m_pDownload [protected] |
Definition at line 140 of file vmsBtDownloadManager.h.
Referenced by _threadBtDownloadManager(), _threadCheckStartSeeding(), CreateBtDownload(), DeleteBtDownload(), DeleteFile(), EnableSeeding(), get_BtDownload(), get_ConnectionCount(), get_CurrentTaskProgress(), get_CurrentTracker(), get_NextAnnounceInterval(), get_PeerInfoList(), get_PeersStat(), get_ShareRating(), get_SplittedByteCountAtBeginningOfFile(), get_State(), get_TotalUploadedByteCount(), get_WastedByteCount(), GetDownloadedBytesCount(), GetDownloadingSectionCount(), GetNumberOfSections(), GetPercentDone(), GetSectionInfo(), GetSectionsInfo(), GetSpeed(), GetTrafficLimit(), GetUploadSpeed(), IsBtDownloadRunning(), IsCantStart(), IsDownloading(), IsDownloadStatCanBeRead(), LimitTraffic(), MoveToFolder(), SaveBtDownloadState(), SaveBtDownloadState_FileProgress(), SaveBtDownloadState_Pieces(), SaveState(), set_TrackerLogin(), StartDownloading(), StopDownloading(), and vmsBtDownloadManager().
Definition at line 142 of file vmsBtDownloadManager.h.
Referenced by RaiseEvent(), SetEventsHandler(), and vmsBtDownloadManager().
LPVOID vmsBtDownloadManager::m_lpEvParam [protected] |
Definition at line 143 of file vmsBtDownloadManager.h.
Referenced by RaiseEvent(), and SetEventsHandler().
UINT vmsBtDownloadManager::m_uLowSpeedMaxTime [protected] |
Definition at line 145 of file vmsBtDownloadManager.h.
Referenced by LoadState(), SaveState(), and vmsBtDownloadManager().
UINT vmsBtDownloadManager::m_uTrafficLimit [protected] |
Definition at line 146 of file vmsBtDownloadManager.h.
Referenced by LoadState(), SaveState(), and vmsBtDownloadManager().
_inc_BtDownloadInfo vmsBtDownloadManager::m_info [protected] |
Definition at line 166 of file vmsBtDownloadManager.h.
Referenced by _threadBtDownloadManager(), _threadCheckStartSeeding(), CreateBtDownload(), CreateByTorrentFile(), DeleteFile(), disable_Flags(), enable_Flags(), EnableSeeding(), get_CurrentTracker(), get_FilePercentDone(), get_Flags(), get_OutputPath(), get_ShareRating(), get_SplittedByteCountAtBeginningOfFile(), get_TorrentUrl(), get_TotalUploadedByteCount(), get_TrackerLogin(), get_WastedByteCount(), GetDownloadedBytesCount(), GetNumberOfSections(), GetPercentDone(), GetSectionInfo(), GetSectionsInfo(), IsDone(), LoadState(), MoveToFolder(), PostCreateTorrentObject(), RemoveBtDownloadDirectory(), SaveBtDownloadState(), SaveBtDownloadState_FileProgress(), SaveBtDownloadState_Pieces(), SaveState(), set_TrackerLogin(), SetToRestartState(), StartDownloading(), vmsBtDownloadManager(), and ~vmsBtDownloadManager().
1.5.6