Cupt
Public Member Functions | Protected Member Functions
cupt::download::ConsoleProgress Class Reference

console-based download progress meter More...

#include <cupt/download/progresses/console.hpp>

Inheritance diagram for cupt::download::ConsoleProgress:
cupt::download::Progress

List of all members.

Public Member Functions

 ConsoleProgress ()
 constructor
 ~ConsoleProgress ()
 destructor
- Public Member Functions inherited from cupt::download::Progress
 Progress ()
 constructor
void setShortAliasForUri (const string &uri, const string &alias)
 sets a short alias for URI
void setLongAliasForUri (const string &uri, const string &alias)
 sets a long alias for URI
void setTotalEstimatedSize (uint64_t size)
 sets total download size for the all download progress lifetime
virtual ~Progress ()

Protected Member Functions

virtual void newDownloadHook (const string &uri, const DownloadRecord &)
virtual void finishedDownloadHook (const string &uri, const string &result)
virtual void updateHook (bool immediate)
virtual void finishHook ()
- Protected Member Functions inherited from cupt::download::Progress
string getLongAliasForUri (const string &uri) const
string getShortAliasForUri (const string &uri) const
const std::map< string,
DownloadRecord > & 
getDownloadRecords () const
uint64_t getOverallDownloadedSize () const
uint64_t getOverallEstimatedSize () const
uint64_t getOverallFetchedSize () const
size_t getOverallDownloadTime () const
size_t getOverallEstimatedTime () const
size_t getDownloadSpeed () const

Additional Inherited Members

- Static Public Attributes inherited from cupt::download::Progress
static float speedCalculatingAccuracy
 amount of seconds considered while calculating a download speed

Detailed Description

console-based download progress meter


Member Function Documentation

virtual void cupt::download::ConsoleProgress::finishedDownloadHook ( const string &  uri,
const string &  result 
)
protectedvirtual

This hook is called when some download is finished.

Parameters:
uri
resultdownload exit code, empty string is success, non-empty string is human-readable download error message

Reimplemented from cupt::download::Progress.

virtual void cupt::download::ConsoleProgress::finishHook ( )
protectedvirtual

This hook is called before the end of the download session.

Reimplemented from cupt::download::Progress.

virtual void cupt::download::ConsoleProgress::newDownloadHook ( const string &  uri,
const DownloadRecord downloadRecord 
)
protectedvirtual

This hook is called when new download starts.

Parameters:
uri
downloadRecord

Reimplemented from cupt::download::Progress.

virtual void cupt::download::ConsoleProgress::updateHook ( bool  immediate)
protectedvirtual

This hook is called whenever some download information is updated (including being called after newDownloadHook and finishedDownloadHook).

Parameters:
immediateis update important or not; examples of important updates: new download, finished download, changes of a download state; examples of unimportant updates: number of download bytes changes for some download

Reimplemented from cupt::download::Progress.


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