Deepsolver
|
The abstract interface to listen files fetching progress. More...
Public Member Functions | |
AbstractFetchListener () | |
The default constructor. | |
virtual void | onFetchBegin ()=0 |
Notifies fetching task is initiated. | |
virtual void | onFetchIsCompleted ()=0 |
Notifies files fetching process is finished. | |
virtual void | onFetchStatus (unsigned char currentPartPercents, unsigned char totalPercents, size_t partNumber, size_t partCount, size_t currentPartSize, const std::string ¤tPartName)=0 |
Updates a status for each file fetching. | |
virtual void | onFilesReading ()=0 |
Notifies fetched files are being read (occurs only after index fetching) | |
virtual void | onHeadersFetch ()=0 |
Notifies basic headers downloading is in progress (occurs only at index fetching) | |
virtual | ~AbstractFetchListener () |
The destructor. |
This abstract interface receives complete information about files fetching process. This information may be used to let user know what is happening in an arbitrary time moment.
This abstract class is purposed for all files fetching tasks but some its methods used only during repository index downloading. They are marked explicitly.
virtual void AbstractFetchListener::onFetchBegin | ( | ) | [pure virtual] |
Implement this method to catch a moment when fetching process begins.
Implemented in FilesFetchProgress.
virtual void AbstractFetchListener::onFetchIsCompleted | ( | ) | [pure virtual] |
Implement this method to know everything is done.
Implemented in FilesFetchProgress.
virtual void AbstractFetchListener::onFetchStatus | ( | unsigned char | currentPartPercents, |
unsigned char | totalPercents, | ||
size_t | partNumber, | ||
size_t | partCount, | ||
size_t | currentPartSize, | ||
const std::string & | currentPartName | ||
) | [pure virtual] |
This method is called each time new portion of data is obtained and let you know how many total percents of work are completed.
[in] | currentPartPercents | How many percents of current part are passed |
[in] | totalPercents | How many total percents are passed |
[in] | partNumber | A number of current part |
[in] | partCount | Total number of parts |
[in] | currentPartSize | A size of current part in bytes |
[in] | currentPartName | Name of current part (usually URL) |
Implemented in FilesFetchProgress.
virtual void AbstractFetchListener::onFilesReading | ( | ) | [pure virtual] |
Implement this method to know fetched files reading begins.
Implemented in FilesFetchProgress.
virtual void AbstractFetchListener::onHeadersFetch | ( | ) | [pure virtual] |
Implement this method to show notification basic headers come to machine.
Implemented in FilesFetchProgress.