libzypp 17.31.23
internal::ProgressData Struct Reference

Public Member Functions

 ProgressData (CURL *curl, time_t timeout=0, const zypp::Url &url=zypp::Url(), zypp::ByteCount expectedFileSize_r=0, zypp::callback::SendReport< zypp::media::DownloadProgressReport > *_report=nullptr)
 
void updateStats (curl_off_t dltotal=0.0, curl_off_t dlnow=0.0)
 
int reportProgress () const
 
CURL * curl ()
 
bool timeoutReached () const
 
bool fileSizeExceeded () const
 
ByteCount expectedFileSize () const
 
void expectedFileSize (ByteCount newval_r)
 

Private Attributes

CURL * _curl
 
zypp::Url _url
 
time_t _timeout
 
bool _timeoutReached
 
bool _fileSizeExceeded
 
ByteCount _expectedFileSize
 
zypp::callback::SendReport< zypp::media::DownloadProgressReport > * report
 
time_t _timeStart = 0
 Start total stats.
 
time_t _timeLast = 0
 Start last period(~1sec)
 
time_t _timeRcv = 0
 Start of no-data timeout.
 
time_t _timeNow = 0
 Now.
 
curl_off_t _dnlTotal = 0.0
 Bytes to download or 0 if unknown.
 
curl_off_t _dnlLast = 0.0
 Bytes downloaded at period start.
 
curl_off_t _dnlNow = 0.0
 Bytes downloaded now.
 
int _dnlPercent = 0
 Percent completed or 0 if _dnlTotal is unknown.
 
double _drateTotal = 0.0
 Download rate so far.
 
double _drateLast = 0.0
 Download rate in last period.
 

Detailed Description

Definition at line 136 of file MediaCurl.cc.

Constructor & Destructor Documentation

◆ ProgressData()

internal::ProgressData::ProgressData ( CURL *  curl,
time_t  timeout = 0,
const zypp::Url url = zypp::Url(),
zypp::ByteCount  expectedFileSize_r = 0,
zypp::callback::SendReport< zypp::media::DownloadProgressReport > *  _report = nullptr 
)

Definition at line 187 of file MediaCurl.cc.

Member Function Documentation

◆ updateStats()

void internal::ProgressData::updateStats ( curl_off_t  dltotal = 0.0,
curl_off_t  dlnow = 0.0 
)

Definition at line 197 of file MediaCurl.cc.

◆ reportProgress()

int internal::ProgressData::reportProgress ( ) const

Definition at line 240 of file MediaCurl.cc.

◆ curl()

CURL * internal::ProgressData::curl ( )
inline

Definition at line 146 of file MediaCurl.cc.

◆ timeoutReached()

bool internal::ProgressData::timeoutReached ( ) const
inline

Definition at line 149 of file MediaCurl.cc.

◆ fileSizeExceeded()

bool internal::ProgressData::fileSizeExceeded ( ) const
inline

Definition at line 152 of file MediaCurl.cc.

◆ expectedFileSize() [1/2]

ByteCount internal::ProgressData::expectedFileSize ( ) const
inline

Definition at line 155 of file MediaCurl.cc.

◆ expectedFileSize() [2/2]

void internal::ProgressData::expectedFileSize ( ByteCount  newval_r)
inline

Definition at line 158 of file MediaCurl.cc.

Member Data Documentation

◆ _curl

CURL* internal::ProgressData::_curl
private

Definition at line 162 of file MediaCurl.cc.

◆ _url

zypp::Url internal::ProgressData::_url
private

Definition at line 163 of file MediaCurl.cc.

◆ _timeout

time_t internal::ProgressData::_timeout
private

Definition at line 164 of file MediaCurl.cc.

◆ _timeoutReached

bool internal::ProgressData::_timeoutReached
private

Definition at line 165 of file MediaCurl.cc.

◆ _fileSizeExceeded

bool internal::ProgressData::_fileSizeExceeded
private

Definition at line 166 of file MediaCurl.cc.

◆ _expectedFileSize

ByteCount internal::ProgressData::_expectedFileSize
private

Definition at line 167 of file MediaCurl.cc.

◆ report

zypp::callback::SendReport<zypp::media::DownloadProgressReport>* internal::ProgressData::report
private

Definition at line 168 of file MediaCurl.cc.

◆ _timeStart

time_t internal::ProgressData::_timeStart = 0
private

Start total stats.

Definition at line 170 of file MediaCurl.cc.

◆ _timeLast

time_t internal::ProgressData::_timeLast = 0
private

Start last period(~1sec)

Definition at line 171 of file MediaCurl.cc.

◆ _timeRcv

time_t internal::ProgressData::_timeRcv = 0
private

Start of no-data timeout.

Definition at line 172 of file MediaCurl.cc.

◆ _timeNow

time_t internal::ProgressData::_timeNow = 0
private

Now.

Definition at line 173 of file MediaCurl.cc.

◆ _dnlTotal

curl_off_t internal::ProgressData::_dnlTotal = 0.0
private

Bytes to download or 0 if unknown.

Definition at line 175 of file MediaCurl.cc.

◆ _dnlLast

curl_off_t internal::ProgressData::_dnlLast = 0.0
private

Bytes downloaded at period start.

Definition at line 176 of file MediaCurl.cc.

◆ _dnlNow

curl_off_t internal::ProgressData::_dnlNow = 0.0
private

Bytes downloaded now.

Definition at line 177 of file MediaCurl.cc.

◆ _dnlPercent

int internal::ProgressData::_dnlPercent = 0
private

Percent completed or 0 if _dnlTotal is unknown.

Definition at line 179 of file MediaCurl.cc.

◆ _drateTotal

double internal::ProgressData::_drateTotal = 0.0
private

Download rate so far.

Definition at line 181 of file MediaCurl.cc.

◆ _drateLast

double internal::ProgressData::_drateLast = 0.0
private

Download rate in last period.

Definition at line 182 of file MediaCurl.cc.


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