#include </home/abuild/rpmbuild/BUILD/libzypp-17.31.23/zypp-curl/ng/network/private/request_p.h>
|
| NetworkRequestPrivate (Url &&url, zypp::Pathname &&targetFile, NetworkRequest::FileMode fMode, NetworkRequest &p) |
|
virtual | ~NetworkRequestPrivate () |
|
bool | initialize (std::string &errBuf) |
|
bool | setupHandle (std::string &errBuf) |
|
bool | assertOutputFile () |
|
bool | canRecover () const |
|
bool | prepareToContinue (std::string &errBuf) |
|
bool | prepareNextRangeBatch (std::string &errBuf) |
|
bool | hasMoreWork () const |
|
void | aboutToStart () |
|
void | dequeueNotify () |
|
void | setResult (NetworkRequestError &&err) |
|
void | reset () |
|
void | resetActivityTimer () |
|
void | onActivityTimeout (Timer &) |
|
bool | checkIfRangeChkSumIsValid (const NetworkRequest::Range &rng) |
|
void | validateRange (NetworkRequest::Range &rng) |
|
bool | parseContentRangeHeader (const std::string_view &line, size_t &start, size_t &len) |
|
bool | parseContentTypeMultiRangeHeader (const std::string_view &line, std::string &boundary) |
|
std::string | errorMessage () const |
|
template<typename T > |
void | setCurlOption (CURLoption opt, T data) |
|
size_t | headerCallback (char *ptr, size_t size, size_t nmemb) |
|
size_t | writeCallback (char *ptr, size_t size, size_t nmemb) |
|
|
static int | curlProgressCallback (void *clientp, curl_off_t dltotal, curl_off_t dlnow, curl_off_t ultotal, curl_off_t ulnow) |
|
|
enum zyppng::NetworkRequestPrivate::ProtocolMode | _protocolMode = ProtocolMode::Default |
|
std::array< char, CURL_ERROR_SIZE+1 > | _errorBuf |
|
Url | _url |
|
zypp::Pathname | _targetFile |
|
TransferSettings | _settings |
|
NetworkRequest::Options | _options |
|
zypp::ByteCount | _expectedFileSize |
|
std::vector< NetworkRequest::Range > | _requestedRanges |
| the requested ranges that need to be downloaded
|
|
NetworkRequest::FileMode | _fMode = NetworkRequest::WriteExclusive |
|
NetworkRequest::Priority | _priority = NetworkRequest::Normal |
|
std::string | _lastRedirect |
| to log/report redirections
|
|
const std::string | _currentCookieFile = "/var/lib/YaST2/cookies" |
|
void * | _easyHandle = nullptr |
|
NetworkRequestDispatcher * | _dispatcher = nullptr |
|
Signal< void(NetworkRequest &req)> | _sigStarted |
|
Signal< void(NetworkRequest &req, zypp::ByteCount count)> | _sigBytesDownloaded |
|
Signal< void(NetworkRequest &req, off_t dltotal, off_t dlnow, off_t ultotal, off_t ulnow)> | _sigProgress |
|
Signal< void(NetworkRequest &req, const NetworkRequestError &err)> | _sigFinished |
|
std::unique_ptr< curl_slist, decltype(&curl_slist_free_all) > | _headers |
|
std::variant< pending_t, running_t, prepareNextRangeBatch_t, finished_t > | _runningMode = pending_t() |
|
Definition at line 35 of file request_p.h.
◆ ProtocolMode
◆ NetworkRequestPrivate()
◆ ~NetworkRequestPrivate()
zyppng::NetworkRequestPrivate::~NetworkRequestPrivate |
( |
| ) |
|
|
virtual |
◆ initialize()
bool zyppng::NetworkRequestPrivate::initialize |
( |
std::string & |
errBuf | ) |
|
◆ setupHandle()
bool zyppng::NetworkRequestPrivate::setupHandle |
( |
std::string & |
errBuf | ) |
|
Force IPv4/v6
Connect timeout
Speed limits
Definition at line 137 of file request.cc.
◆ assertOutputFile()
bool zyppng::NetworkRequestPrivate::assertOutputFile |
( |
| ) |
|
◆ canRecover()
bool zyppng::NetworkRequestPrivate::canRecover |
( |
| ) |
const |
◆ prepareToContinue()
bool zyppng::NetworkRequestPrivate::prepareToContinue |
( |
std::string & |
errBuf | ) |
|
Prepares the request before it is queued again currently this is used only for range batching but could be used to recover from other types of errors too
Definition at line 443 of file request.cc.
◆ prepareNextRangeBatch()
bool zyppng::NetworkRequestPrivate::prepareNextRangeBatch |
( |
std::string & |
errBuf | ) |
|
Add the next batch of range descriptions to the curl handle
Definition at line 475 of file request.cc.
◆ hasMoreWork()
bool zyppng::NetworkRequestPrivate::hasMoreWork |
( |
| ) |
const |
◆ aboutToStart()
void zyppng::NetworkRequestPrivate::aboutToStart |
( |
| ) |
|
◆ dequeueNotify()
void zyppng::NetworkRequestPrivate::dequeueNotify |
( |
| ) |
|
◆ setResult()
◆ reset()
void zyppng::NetworkRequestPrivate::reset |
( |
| ) |
|
◆ resetActivityTimer()
void zyppng::NetworkRequestPrivate::resetActivityTimer |
( |
| ) |
|
◆ onActivityTimeout()
void zyppng::NetworkRequestPrivate::onActivityTimeout |
( |
Timer & |
t | ) |
|
◆ checkIfRangeChkSumIsValid()
◆ validateRange()
◆ parseContentRangeHeader()
bool zyppng::NetworkRequestPrivate::parseContentRangeHeader |
( |
const std::string_view & |
line, |
|
|
size_t & |
start, |
|
|
size_t & |
len |
|
) |
| |
◆ parseContentTypeMultiRangeHeader()
bool zyppng::NetworkRequestPrivate::parseContentTypeMultiRangeHeader |
( |
const std::string_view & |
line, |
|
|
std::string & |
boundary |
|
) |
| |
◆ errorMessage()
std::string zyppng::NetworkRequestPrivate::errorMessage |
( |
| ) |
const |
◆ setCurlOption()
template<typename T >
void zyppng::NetworkRequestPrivate::setCurlOption |
( |
CURLoption |
opt, |
|
|
T |
data |
|
) |
| |
|
inline |
◆ curlProgressCallback()
int zyppng::NetworkRequestPrivate::curlProgressCallback |
( |
void * |
clientp, |
|
|
curl_off_t |
dltotal, |
|
|
curl_off_t |
dlnow, |
|
|
curl_off_t |
ultotal, |
|
|
curl_off_t |
ulnow |
|
) |
| |
|
static |
◆ headerCallback()
size_t zyppng::NetworkRequestPrivate::headerCallback |
( |
char * |
ptr, |
|
|
size_t |
size, |
|
|
size_t |
nmemb |
|
) |
| |
◆ writeCallback()
size_t zyppng::NetworkRequestPrivate::writeCallback |
( |
char * |
ptr, |
|
|
size_t |
size, |
|
|
size_t |
nmemb |
|
) |
| |
◆ _protocolMode
◆ _errorBuf
std::array<char, CURL_ERROR_SIZE+1> zyppng::NetworkRequestPrivate::_errorBuf |
◆ _url
Url zyppng::NetworkRequestPrivate::_url |
◆ _targetFile
◆ _settings
◆ _options
NetworkRequest::Options zyppng::NetworkRequestPrivate::_options |
◆ _expectedFileSize
◆ _requestedRanges
the requested ranges that need to be downloaded
Definition at line 120 of file request_p.h.
◆ _fMode
◆ _priority
◆ _lastRedirect
std::string zyppng::NetworkRequestPrivate::_lastRedirect |
to log/report redirections
Definition at line 125 of file request_p.h.
◆ _currentCookieFile
const std::string zyppng::NetworkRequestPrivate::_currentCookieFile = "/var/lib/YaST2/cookies" |
◆ _easyHandle
void* zyppng::NetworkRequestPrivate::_easyHandle = nullptr |
◆ _dispatcher
NetworkRequestDispatcher* zyppng::NetworkRequestPrivate::_dispatcher = nullptr |
◆ _sigStarted
Signal< void ( NetworkRequest &req )> zyppng::NetworkRequestPrivate::_sigStarted |
◆ _sigBytesDownloaded
◆ _sigProgress
Signal< void ( NetworkRequest &req, off_t dltotal, off_t dlnow, off_t ultotal, off_t ulnow )> zyppng::NetworkRequestPrivate::_sigProgress |
◆ _sigFinished
◆ _headers
std::unique_ptr< curl_slist, decltype (&curl_slist_free_all) > zyppng::NetworkRequestPrivate::_headers |
◆ _rangeAttempt
constexpr int zyppng::NetworkRequestPrivate::_rangeAttempt[] |
|
staticconstexpr |
Initial value:= {
255,
127,
63,
15,
5
}
Definition at line 148 of file request_p.h.
◆ _runningMode
The documentation for this class was generated from the following files: