14#ifndef ZYPP_NG_MEDIA_CURL_PRIVATE_REQUEST_P_H_INCLUDED
15#define ZYPP_NG_MEDIA_CURL_PRIVATE_REQUEST_P_H_INCLUDED
20#include <zypp-media/MediaException>
21#include <zypp-core/zyppng/base/Timer>
29#include <boost/optional.hpp>
Reference counted access to a Tp object calling a custom Dispose function when the last AutoDispose h...
Store and operate with byte count.
Compute Message Digests (MD5, SHA1 etc)
The NetworkRequestError class Represents a error that occured in.
size_t headerfunction(char *ptr, size_t bytes) override
std::optional< FileVerifyInfo > _fileVerification
The digest for the full file.
enum zyppng::NetworkRequestPrivate::ProtocolMode _protocolMode
const std::string _currentCookieFile
void notifyErrorCodeChanged() override
zypp::Pathname _targetFile
void resetActivityTimer()
Signal< void(NetworkRequest &req, off_t dltotal, off_t dlnow, off_t ultotal, off_t ulnow) _sigProgress)
NetworkRequestDispatcher * _dispatcher
std::vector< NetworkRequest::Range > _requestedRanges
the requested ranges that need to be downloaded
size_t writefunction(char *ptr, std::optional< off_t > offset, size_t bytes) override
static int curlProgressCallback(void *clientp, curl_off_t dltotal, curl_off_t dlnow, curl_off_t ultotal, curl_off_t ulnow)
Signal< void(NetworkRequest &req) _sigStarted)
std::string errorMessage() const
NetworkRequest::FileMode _fMode
std::variant< pending_t, running_t, prepareNextRangeBatch_t, finished_t > _runningMode
bool initialize(std::string &errBuf)
void onActivityTimeout(Timer &)
Signal< void(NetworkRequest &req, const NetworkRequestError &err) _sigFinished)
NetworkRequest::Priority _priority
std::string _lastRedirect
to log/report redirections
NetworkRequest::Options _options
bool prepareToContinue(std::string &errBuf)
void setResult(NetworkRequestError &&err)
~NetworkRequestPrivate() override
std::array< char, CURL_ERROR_SIZE+1 > _errorBuf
std::unique_ptr< curl_slist, decltype(&curl_slist_free_all) _headers)
bool setupHandle(std::string &errBuf)
NetworkRequestPrivate(Url &&url, zypp::Pathname &&targetFile, NetworkRequest::FileMode fMode, NetworkRequest &p)
TransferSettings _settings
void setCurlOption(CURLoption opt, T data)
zypp::ByteCount _expectedFileSize
Signal< void(NetworkRequest &req, zypp::ByteCount count) _sigBytesDownloaded)
The Timer class provides repetitive and single-shot timers.
static std::shared_ptr< Timer > create()
Creates a new Timer object, the timer is not started at this point.
std::shared_ptr< Timer > Ptr
AutoDispose<FILE*> calling ::fclose
zypp::CheckSum _fileChecksum
NetworkRequestError _result
zypp::ByteCount _contentLenght
std::unique_ptr< CurlMultiPartHandler > _partialHelper
zypp::ByteCount _contentLenght
std::optional< NetworkRequestError > _cachedResult
std::unique_ptr< CurlMultiPartHandler > _partialHelper
running_t(pending_t &&prevState)
Timer::Ptr _activityTimer
#define ZYPP_THROW(EXCPT)
Drops a logline and throws the Exception.
#define ZYPP_DECLARE_PUBLIC(Class)