#include <mtdl.h>
Inherited by BazisLib::Network::MultiThreaded::MultiThreadHTTPDownloader.

This class implements the multi-threaded file downloading independently of the exact file type. The exact file types are supported in child classes.
Currently, only MultiThreadHTTPDownloader for downloading HTTP files is implemented.
| typedef std::vector<FileChunkDatabase::PendingChunk> BazisLib::Network::MultiThreaded::MultiThreadDownloaderBase::ChunkList |
| BazisLib::Network::MultiThreaded::MultiThreadDownloaderBase::MultiThreadDownloaderBase | ( | unsigned | ThreadCount = 5 |
) |
| virtual BazisLib::Network::MultiThreaded::MultiThreadDownloaderBase::~MultiThreadDownloaderBase | ( | ) | [virtual] |
| void BazisLib::Network::MultiThreaded::MultiThreadDownloaderBase::AllowFileAppending | ( | bool | FileAppendingAllowed | ) | [inline] |
| ActionStatus BazisLib::Network::MultiThreaded::MultiThreadDownloaderBase::ApplyThreadCount | ( | unsigned | NewThreadCount | ) | [inline] |
Applies new thread count, that will be used after download restart.
This method updates the maximum thread count used by the downloader.
| virtual void BazisLib::Network::MultiThreaded::MultiThreadDownloaderBase::CancelSourceFileIO | ( | const ConstManagedPointer< AIFile > & | pFile | ) | [protected, pure virtual] |
Implemented in BazisLib::Network::MultiThreaded::MultiThreadHTTPDownloader.
| void BazisLib::Network::MultiThreaded::MultiThreadDownloaderBase::CleanupThreadList | ( | ) | [private] |
Deleted previously created thread objects.
| BazisLib::Network::MultiThreaded::MultiThreadDownloaderBase::DECLARE_REFERENCE | ( | AIFragmentFormatDriver | , | |
| m_pFormatDriver | ||||
| ) | [private] |
| ActionStatus BazisLib::Network::MultiThreaded::MultiThreadDownloaderBase::DownloadFileInSingleThread | ( | ManagedPointer< AIFile > & | pFile, | |
| ManagedPointer< AIFile > & | pDestFile | |||
| ) | [protected] |
This method is called by FirstThreadServiceMain() when a file does not support resuming.
| ChunkList BazisLib::Network::MultiThreaded::MultiThreadDownloaderBase::ExtractSortedDoneChunkList | ( | ) | [inline] |

| ActionStatus BazisLib::Network::MultiThreaded::MultiThreadDownloaderBase::FirstThreadService | ( | ManagedPointer< AIFile > * | ppFile | ) | [protected] |
Wrapper for FirstThreadServiceMain().
| ActionStatus BazisLib::Network::MultiThreaded::MultiThreadDownloaderBase::FirstThreadServiceMain | ( | ManagedPointer< AIFile > * | ppFile | ) | [protected] |
Gathers basic information about the file and starts either single- or multi-thread downloading.
| void BazisLib::Network::MultiThreaded::MultiThreadDownloaderBase::FlagAborted | ( | ) | [inline, protected] |

| void BazisLib::Network::MultiThreaded::MultiThreadDownloaderBase::FlagCompleted | ( | ) | [inline, protected] |
| ActionStatus* BazisLib::Network::MultiThreaded::MultiThreadDownloaderBase::FlagErrorAndGetStatusPointer | ( | ) | [inline, protected] |
Sets current download state to Error and returns the status pointer.
This method should be used to retreive status variable pointer for error flagging purposes. It ensures synchronization with the m_CurrentState field.

| unsigned BazisLib::Network::MultiThreaded::MultiThreadDownloaderBase::GetActiveThreads | ( | ) | [inline] |
| virtual unsigned BazisLib::Network::MultiThreaded::MultiThreadDownloaderBase::GetAdditionalErrorCode | ( | const ConstManagedPointer< AIFile > & | pFile, | |
| bool | IgnoreSuccessfulCodes | |||
| ) | [protected, pure virtual] |
Implemented in BazisLib::Network::MultiThreaded::MultiThreadHTTPDownloader.
| unsigned BazisLib::Network::MultiThreaded::MultiThreadDownloaderBase::GetAdditionalStatusCode | ( | ) | [inline] |
| DownloadState BazisLib::Network::MultiThreaded::MultiThreadDownloaderBase::GetCurrentState | ( | ) | [inline] |
| ULONGLONG BazisLib::Network::MultiThreaded::MultiThreadDownloaderBase::GetDoneAtStart | ( | ) | [inline] |
| ULONGLONG BazisLib::Network::MultiThreaded::MultiThreadDownloaderBase::GetDoneSize | ( | ) | [inline] |
| ULONGLONG BazisLib::Network::MultiThreaded::MultiThreadDownloaderBase::GetDownloadingFileSize | ( | ) |
| ULONGLONG BazisLib::Network::MultiThreaded::MultiThreadDownloaderBase::GetFileSize | ( | ) | [inline] |
| FragmentFileFormat BazisLib::Network::MultiThreaded::MultiThreadDownloaderBase::GetFormat | ( | ) | [inline] |
| unsigned BazisLib::Network::MultiThreaded::MultiThreadDownloaderBase::GetMaxThreads | ( | ) | [inline] |
| ActionStatus BazisLib::Network::MultiThreaded::MultiThreadDownloaderBase::GetStatus | ( | ) | [inline] |
| bool BazisLib::Network::MultiThreaded::MultiThreadDownloaderBase::IsDownloading | ( | ) | [inline] |
| virtual ManagedPointer<AIFile> BazisLib::Network::MultiThreaded::MultiThreadDownloaderBase::OpenDestinationFile | ( | ) | [protected, pure virtual] |
Implemented in BazisLib::Network::MultiThreaded::MultiThreadHTTPDownloader.
| virtual ManagedPointer<AIFile> BazisLib::Network::MultiThreaded::MultiThreadDownloaderBase::OpenSourceFile | ( | unsigned | ThreadID | ) | [protected, pure virtual] |
Implemented in BazisLib::Network::MultiThreaded::MultiThreadHTTPDownloader.
| ActionStatus BazisLib::Network::MultiThreaded::MultiThreadDownloaderBase::ResumeDownload | ( | ) | [inline] |
Starts download or resumes a paused/aborted/completed one.

| void BazisLib::Network::MultiThreaded::MultiThreadDownloaderBase::SetProgressHandler | ( | PNETPROGRESSPROC | pHandler, | |
| void * | pContext | |||
| ) | [inline] |
| virtual void BazisLib::Network::MultiThreaded::MultiThreadDownloaderBase::SetTimeout | ( | unsigned | Timeout | ) | [pure virtual] |
Implemented in BazisLib::Network::MultiThreaded::MultiThreadHTTPDownloader.
| ActionStatus BazisLib::Network::MultiThreaded::MultiThreadDownloaderBase::StartMTDownload | ( | ) | [protected] |
Downloads a file in a multi-thread mode.
| void BazisLib::Network::MultiThreaded::MultiThreadDownloaderBase::StopDownload | ( | ) |
Stops current download and waits for threads to terminate.
| bool BazisLib::Network::MultiThreaded::MultiThreadDownloaderBase::WaitForDownloadComplete | ( | unsigned | Timeout = INFINITE |
) |
unsigned BazisLib::Network::MultiThreaded::MultiThreadDownloaderBase::m_AdditionalErrorCode [private] |
Specifies whether an already existing file may fail the operation.
InProcessMutex BazisLib::Network::MultiThreaded::MultiThreadDownloaderBase::m_FastSaveMutex [private] |
ActionStatus BazisLib::Network::MultiThreaded::MultiThreadDownloaderBase::m_LastDownloadStatus [private] |
PNETPROGRESSPROC BazisLib::Network::MultiThreaded::MultiThreadDownloaderBase::m_pHandler [protected] |
FragmentFileFormat BazisLib::Network::MultiThreaded::MultiThreadDownloaderBase::m_PreferredFormat [protected] |
AtomicInt32 BazisLib::Network::MultiThreaded::MultiThreadDownloaderBase::m_RunningThreadCount [private] |
unsigned BazisLib::Network::MultiThreaded::MultiThreadDownloaderBase::m_ThreadCount [private] |
std::list<WorkerThread *> BazisLib::Network::MultiThreaded::MultiThreadDownloaderBase::m_Threads [private] |
InProcessMutex BazisLib::Network::MultiThreaded::MultiThreadDownloaderBase::m_ThreadStopMutex [private] |
Locked when the download is stopped. TryLocked when thread 1 creates other threads.