1 #ifndef ZYPP_NG_MEDIA_CURL_REQUEST_H_INCLUDED 2 #define ZYPP_NG_MEDIA_CURL_REQUEST_H_INCLUDED 5 #include <zypp/zyppng/media/network/TransferSettings> 6 #include <zypp/zyppng/base/Base> 7 #include <zypp/zyppng/core/Url> 25 class NetworkRequestDispatcher;
26 class NetworkRequestPrivate;
39 using Ptr = std::shared_ptr<NetworkRequest>;
40 using WeakPtr = std::weak_ptr<NetworkRequest>;
79 void setPriority ( Priority prio );
84 Priority priority ( )
const;
91 void setOptions ( Options opt );
96 Options options ()
const;
104 void setRequestRange ( off_t start = -1, off_t len = 0 );
109 const std::string &lastRedirectInfo()
const;
117 void *nativeHandle ()
const;
123 std::vector<char> peekData ( off_t offset,
size_t count )
const;
134 void setUrl (
const Url &
url );
145 std::string contentType ()
const;
150 off_t downloadOffset ()
const;
156 off_t reportedByteCount ()
const;
162 off_t expectedByteCount ()
const;
167 off_t downloadedByteCount ()
const;
173 void setDigest ( std::shared_ptr<zypp::Digest> dig );
178 std::shared_ptr<zypp::Digest> digest ()
const;
186 void setExpectedChecksum (std::vector<unsigned char>
checksum );
198 State
state ()
const;
209 std::string extendedErrorString()
const;
214 bool hasError ()
const;
220 bool addRequestHeader(
const std::string &header );
241 friend class NetworkRequestDispatcher;
std::weak_ptr< Base > WeakPtr
The NetworkRequestError class Represents a error that occured in.
zypp::media::AuthData AuthData
ZYPP_DECLARE_OPERATORS_FOR_FLAGS(zyppng::NetworkRequest::Options)
#define ZYPP_DECLARE_PRIVATE(Class)
#define ZYPP_DECLARE_FLAGS(Name, Enum)
std::string checksum(const Pathname &file, const std::string &algorithm)
Compute a files checksum.
#define LIBZYPP_NG_EXPORT
Easy-to use interface to the ZYPP dependency resolver.
std::shared_ptr< Base > Ptr