#include <zypp-curl/ng/network/private/request_p.h>
|
| NetworkRequestPrivate (Url &&url, zypp::Pathname &&targetFile, NetworkRequest::FileMode fMode, NetworkRequest &p) |
| ~NetworkRequestPrivate () override |
bool | initialize (std::string &errBuf) |
bool | setupHandle (std::string &errBuf) |
bool | assertOutputFile () |
bool | canRecover () const |
bool | prepareToContinue (std::string &errBuf) |
bool | hasMoreWork () const |
void | aboutToStart () |
void | dequeueNotify () |
void | setResult (NetworkRequestError &&err) |
void | reset () |
void | resetActivityTimer () |
void | onActivityTimeout (Timer &) |
std::string | errorMessage () const |
template<typename T> |
void | setCurlOption (CURLoption opt, T data) |
size_t | headerfunction (char *ptr, size_t bytes) override |
size_t | writefunction (char *ptr, std::optional< off_t > offset, size_t bytes) override |
void | notifyErrorCodeChanged () override |
| BasePrivate (Base &b) |
virtual | ~BasePrivate () |
virtual void | init () |
virtual | ~CurlMultiPartDataReceiver ()=default |
virtual bool | beginRange (off_t range, std::string &cancelReason) |
virtual bool | finishedRange (off_t range, bool validated, std::string &cancelReason) |
|
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
|
std::optional< FileVerifyInfo > | _fileVerification |
| The digest for the full file.
|
NetworkRequest::FileMode | _fMode = NetworkRequest::WriteExclusive |
NetworkRequest::Priority | _priority = NetworkRequest::Normal |
std::string | _lastRedirect |
| to log/report redirections
|
zypp::Pathname | _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() |
Base::WeakPtr | parent |
std::unordered_set< Base::Ptr > | children |
Base * | z_ptr = nullptr |
std::thread::id | threadId = std::this_thread::get_id() |
Definition at line 34 of file request_p.h.
◆ ProtocolMode
◆ NetworkRequestPrivate()
◆ ~NetworkRequestPrivate()
zyppng::NetworkRequestPrivate::~NetworkRequestPrivate |
( |
| ) |
|
|
override |
◆ 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 105 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 414 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 | ) |
|
◆ 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 |
◆ headerfunction()
size_t zyppng::NetworkRequestPrivate::headerfunction |
( |
char * | ptr, |
|
|
size_t | bytes ) |
|
overridevirtual |
◆ writefunction()
size_t zyppng::NetworkRequestPrivate::writefunction |
( |
char * | ptr, |
|
|
std::optional< off_t > | offset, |
|
|
size_t | bytes ) |
|
overridevirtual |
Data callback func, this is called whenever there is actual data to be written to the file. If offset is set, usually when starting to write a new range, it means to continue to write on the current file pointer position, otherwise seek to the given one.
Implements zyppng::CurlMultiPartDataReceiver.
Definition at line 669 of file request.cc.
◆ notifyErrorCodeChanged()
void zyppng::NetworkRequestPrivate::notifyErrorCodeChanged |
( |
| ) |
|
|
overridevirtual |
◆ _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 111 of file request_p.h.
◆ _fileVerification
std::optional<FileVerifyInfo> zyppng::NetworkRequestPrivate::_fileVerification |
The digest for the full file.
Definition at line 117 of file request_p.h.
◆ _fMode
◆ _priority
◆ _lastRedirect
std::string zyppng::NetworkRequestPrivate::_lastRedirect |
to log/report redirections
Definition at line 122 of file request_p.h.
◆ _currentCookieFile
zypp::Pathname zyppng::NetworkRequestPrivate::_currentCookieFile = "/var/lib/YaST2/cookies" |
◆ _easyHandle
void* zyppng::NetworkRequestPrivate::_easyHandle = nullptr |
◆ _dispatcher
NetworkRequestDispatcher* zyppng::NetworkRequestPrivate::_dispatcher = nullptr |
◆ _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 |
◆ _runningMode
The documentation for this class was generated from the following files: