14#ifndef ZYPP_NG_MEDIA_CURL_PRIVATE_REQUEST_P_H_INCLUDED
15#define ZYPP_NG_MEDIA_CURL_PRIVATE_REQUEST_P_H_INCLUDED
17#include <zypp-core/CheckSum.h>
18#include <zypp-core/zyppng/base/private/base_p.h>
20#include <zypp-media/MediaException>
21#include <zypp-core/zyppng/base/Timer>
22#include <zypp-core/base/Regex.h>
26#include <zypp-core/Digest.h>
27#include <zypp-core/AutoDispose.h>
29#include <boost/optional.hpp>
99 auto ret = curl_easy_setopt(
_easyHandle, opt, data );
133 static int curlProgressCallback (
void *clientp, curl_off_t dltotal, curl_off_t dlnow, curl_off_t ultotal, curl_off_t ulnow );
136 size_t writefunction (
char *ptr, std::optional<off_t> offset,
size_t bytes )
override;
138 std::unique_ptr< curl_slist,
decltype (&curl_slist_free_all) >
_headers;
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
zypp::Pathname _targetFile
void resetActivityTimer()
Signal< void(NetworkRequest &req, zypp::ByteCount count)> _sigBytesDownloaded
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)
std::string errorMessage() const
Signal< void(NetworkRequest &req)> _sigStarted
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, off_t dltotal, off_t dlnow, off_t ultotal, off_t ulnow)> _sigProgress
NetworkRequest::Priority _priority
std::string _lastRedirect
to log/report redirections
NetworkRequest::Options _options
bool prepareToContinue(std::string &errBuf)
void setResult(NetworkRequestError &&err)
std::array< char, CURL_ERROR_SIZE+1 > _errorBuf
virtual ~NetworkRequestPrivate()
bool setupHandle(std::string &errBuf)
TransferSettings _settings
void setCurlOption(CURLoption opt, T data)
zypp::ByteCount _expectedFileSize
Signal< void(NetworkRequest &req, const NetworkRequestError &err)> _sigFinished
std::unique_ptr< curl_slist, decltype(&curl_slist_free_all) > _headers
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
Timer::Ptr _activityTimer
#define ZYPP_THROW(EXCPT)
Drops a logline and throws the Exception.