libzypp: internal::ProgressData Struct Reference

libzypp 17.38.11

internal::ProgressData Struct Reference

## Public Member Functions
| ProgressData (AutoFILE file, CURL *curl, time_t timeout=0, 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)
zypp::Url | url () const
FILE * | file ()
size_t | writeBytes (char *ptr, ByteCount bytes)
ByteCount | bytesWritten () const

## Private Attributes
CURL * | _curl
AutoFILE | _file
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.
ByteCount | _bytesWritten = 0
| Bytes actually written into the file.
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 51 of file MediaCurl.cc.

## Constructor & Destructor Documentation

## ◆ ProgressData()

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

Definition at line 117 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 128 of file MediaCurl.cc.

## ◆ reportProgress()

int internal::ProgressData::reportProgress | ( |  | ) | const

Definition at line 168 of file MediaCurl.cc.

## ◆ curl()

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

Definition at line 61 of file MediaCurl.cc.

## ◆ timeoutReached()

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

Definition at line 64 of file MediaCurl.cc.

## ◆ fileSizeExceeded()

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

Definition at line 67 of file MediaCurl.cc.

## ◆ expectedFileSize() [1/2]

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

Definition at line 70 of file MediaCurl.cc.

## ◆ expectedFileSize() [2/2]

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

Definition at line 73 of file MediaCurl.cc.

## ◆ url()

zypp::Url internal::ProgressData::url | ( |  | ) | const
| inline

Definition at line 76 of file MediaCurl.cc.

## ◆ file()

FILE * internal::ProgressData::file | ( |  | ) |
| inline

Definition at line 79 of file MediaCurl.cc.

## ◆ writeBytes()

size_t internal::ProgressData::writeBytes | ( | char * | ptr,
|  | ByteCount | bytes )

Definition at line 179 of file MediaCurl.cc.

## ◆ bytesWritten()

ByteCount internal::ProgressData::bytesWritten | ( |  | ) | const
| inline

Definition at line 84 of file MediaCurl.cc.

## Member Data Documentation

## ◆ _curl

CURL* internal::ProgressData::_curl
| private

Definition at line 89 of file MediaCurl.cc.

## ◆ _file

AutoFILE internal::ProgressData::_file
| private

Definition at line 90 of file MediaCurl.cc.

## ◆ _url

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

Definition at line 91 of file MediaCurl.cc.

## ◆ _timeout

time_t internal::ProgressData::_timeout
| private

Definition at line 92 of file MediaCurl.cc.

## ◆ _timeoutReached

bool internal::ProgressData::_timeoutReached
| private

Definition at line 93 of file MediaCurl.cc.

## ◆ _fileSizeExceeded

bool internal::ProgressData::_fileSizeExceeded
| private

Definition at line 94 of file MediaCurl.cc.

## ◆ _expectedFileSize

ByteCount internal::ProgressData::_expectedFileSize
| private

Definition at line 95 of file MediaCurl.cc.

## ◆ report

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

Definition at line 96 of file MediaCurl.cc.

## ◆ _timeStart

time_t internal::ProgressData::_timeStart = 0
| private

Start total stats.

Definition at line 98 of file MediaCurl.cc.

## ◆ _timeLast

time_t internal::ProgressData::_timeLast = 0
| private

Start last period(~1sec).

Definition at line 99 of file MediaCurl.cc.

## ◆ _timeRcv

time_t internal::ProgressData::_timeRcv = 0
| private

Start of no-data timeout.

Definition at line 100 of file MediaCurl.cc.

## ◆ _timeNow

time_t internal::ProgressData::_timeNow = 0
| private

Now.

Definition at line 101 of file MediaCurl.cc.

## ◆ _dnlTotal

curl_off_t internal::ProgressData::_dnlTotal = 0.0
| private

Bytes to download or 0 if unknown.

Definition at line 103 of file MediaCurl.cc.

## ◆ _dnlLast

curl_off_t internal::ProgressData::_dnlLast = 0.0
| private

Bytes downloaded at period start.

Definition at line 104 of file MediaCurl.cc.

## ◆ _dnlNow

curl_off_t internal::ProgressData::_dnlNow = 0.0
| private

Bytes downloaded now.

Definition at line 105 of file MediaCurl.cc.

## ◆ _bytesWritten

ByteCount internal::ProgressData::_bytesWritten = 0
| private

Bytes actually written into the file.

Definition at line 107 of file MediaCurl.cc.

## ◆ _dnlPercent

int internal::ProgressData::_dnlPercent = 0
| private

Percent completed or 0 if _dnlTotal is unknown.

Definition at line 109 of file MediaCurl.cc.

## ◆ _drateTotal

double internal::ProgressData::_drateTotal = 0.0
| private

Download rate so far.

Definition at line 111 of file MediaCurl.cc.

## ◆ _drateLast

double internal::ProgressData::_drateLast = 0.0
| private

Download rate in last period.

Definition at line 112 of file MediaCurl.cc.

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

- zypp/media/MediaCurl.cc