libzypp  17.28.5
internal::ProgressData Struct Reference

#include <media/CurlHelper.h>

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 (double dltotal=0.0, double dlnow=0.0)
 
int reportProgress () const
 

Public Attributes

CURL * curl
 
zypp::Url url
 
time_t timeout
 
bool reached
 
bool fileSizeExceeded
 
zypp::callback::SendReport< zypp::media::DownloadProgressReport > * report
 
zypp::ByteCount _expectedFileSize
 
time_t _timeStart = 0
 Start total stats. More...
 
time_t _timeLast = 0
 Start last period(~1sec) More...
 
time_t _timeRcv = 0
 Start of no-data timeout. More...
 
time_t _timeNow = 0
 Now. More...
 
double _dnlTotal = 0.0
 Bytes to download or 0 if unknown. More...
 
double _dnlLast = 0.0
 Bytes downloaded at period start. More...
 
double _dnlNow = 0.0
 Bytes downloaded now. More...
 
int _dnlPercent = 0
 Percent completed or 0 if _dnlTotal is unknown. More...
 
double _drateTotal = 0.0
 Download rate so far. More...
 
double _drateLast = 0.0
 Download rate in last period. More...
 
double drate_period
 
double dload_period
 
long secs
 
double drate_avg
 
time_t ltime
 
double dload
 
double uload
 

Detailed Description

Definition at line 52 of file CurlHelper.h.

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 401 of file CurlHelper.cc.

Member Function Documentation

◆ updateStats()

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

Definition at line 411 of file CurlHelper.cc.

◆ reportProgress()

int internal::ProgressData::reportProgress ( ) const

Definition at line 460 of file CurlHelper.cc.

Member Data Documentation

◆ curl

CURL* internal::ProgressData::curl

Definition at line 58 of file CurlHelper.h.

◆ url

zypp::Url internal::ProgressData::url

Definition at line 59 of file CurlHelper.h.

◆ timeout

time_t internal::ProgressData::timeout

Definition at line 60 of file CurlHelper.h.

◆ reached

bool internal::ProgressData::reached

Definition at line 61 of file CurlHelper.h.

◆ fileSizeExceeded

bool internal::ProgressData::fileSizeExceeded

Definition at line 62 of file CurlHelper.h.

◆ report

Definition at line 63 of file CurlHelper.h.

◆ _expectedFileSize

zypp::ByteCount internal::ProgressData::_expectedFileSize

Definition at line 64 of file CurlHelper.h.

◆ _timeStart

time_t internal::ProgressData::_timeStart = 0

Start total stats.

Definition at line 66 of file CurlHelper.h.

◆ _timeLast

time_t internal::ProgressData::_timeLast = 0

Start last period(~1sec)

Definition at line 67 of file CurlHelper.h.

◆ _timeRcv

time_t internal::ProgressData::_timeRcv = 0

Start of no-data timeout.

Definition at line 68 of file CurlHelper.h.

◆ _timeNow

time_t internal::ProgressData::_timeNow = 0

Now.

Definition at line 69 of file CurlHelper.h.

◆ _dnlTotal

double internal::ProgressData::_dnlTotal = 0.0

Bytes to download or 0 if unknown.

Definition at line 71 of file CurlHelper.h.

◆ _dnlLast

double internal::ProgressData::_dnlLast = 0.0

Bytes downloaded at period start.

Definition at line 72 of file CurlHelper.h.

◆ _dnlNow

double internal::ProgressData::_dnlNow = 0.0

Bytes downloaded now.

Definition at line 73 of file CurlHelper.h.

◆ _dnlPercent

int internal::ProgressData::_dnlPercent = 0

Percent completed or 0 if _dnlTotal is unknown.

Definition at line 75 of file CurlHelper.h.

◆ _drateTotal

double internal::ProgressData::_drateTotal = 0.0

Download rate so far.

Definition at line 77 of file CurlHelper.h.

◆ _drateLast

double internal::ProgressData::_drateLast = 0.0

Download rate in last period.

Definition at line 78 of file CurlHelper.h.

◆ drate_period

double internal::ProgressData::drate_period

Definition at line 86 of file CurlHelper.h.

◆ dload_period

double internal::ProgressData::dload_period

Definition at line 88 of file CurlHelper.h.

◆ secs

long internal::ProgressData::secs

Definition at line 90 of file CurlHelper.h.

◆ drate_avg

double internal::ProgressData::drate_avg

Definition at line 92 of file CurlHelper.h.

◆ ltime

time_t internal::ProgressData::ltime

Definition at line 94 of file CurlHelper.h.

◆ dload

double internal::ProgressData::dload

Definition at line 96 of file CurlHelper.h.

◆ uload

double internal::ProgressData::uload

Definition at line 98 of file CurlHelper.h.


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