Deepsolver
Public Member Functions
AbstractFetchListener Class Reference

The abstract interface to listen files fetching progress. More...

Inheritance diagram for AbstractFetchListener:
FilesFetchProgress

List of all members.

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 &currentPartName)=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.

Detailed Description

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.

See also:
OperationCore TransactionIterator FilesFetching

Member Function Documentation

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.

Parameters:
[in]currentPartPercentsHow many percents of current part are passed
[in]totalPercentsHow many total percents are passed
[in]partNumberA number of current part
[in]partCountTotal number of parts
[in]currentPartSizeA size of current part in bytes
[in]currentPartNameName 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.