|
libzypp 17.31.32
|
#include </builddir/build/BUILD/libzypp-17.31.32/zypp-curl/ng/network/private/downloaderstates/base_p.h>

Public Types | |
| using | Ptr = std::shared_ptr<Request> |
| using | WeakPtr = std::shared_ptr<Request> |
Public Types inherited from zyppng::NetworkRequest | |
| enum | State { Pending , Running , Finished , Error } |
| enum | Priority { Normal , High , Critical = 100 } |
| enum | FileMode { WriteExclusive , WriteShared } |
| enum | OptionBits { Default = 0x00 , HeadRequest = 0x01 , ConnectionTest = 0x02 } |
| using | Ptr = std::shared_ptr<NetworkRequest> |
| using | WeakPtr = std::weak_ptr<NetworkRequest> |
| using | DigestPtr = std::shared_ptr<zypp::Digest> |
| using | CheckSumBytes = UByteArray |
| using | Range = CurlMultiPartHandler::Range |
Public Member Functions | |
| template<typename Receiver > | |
| void | connectSignals (Receiver &dl) |
| void | disconnectSignals () |
| NetworkRequest (Url url, zypp::Pathname targetFile, FileMode fMode=WriteExclusive) | |
Public Member Functions inherited from zyppng::NetworkRequest | |
| ZYPP_DECLARE_FLAGS (Options, OptionBits) | |
| NetworkRequest (Url url, zypp::Pathname targetFile, FileMode fMode=WriteExclusive) | |
| virtual | ~NetworkRequest () |
| void | setExpectedFileSize (zypp::ByteCount expectedFileSize) |
| void | setPriority (Priority prio, bool triggerReschedule=true) |
| Priority | priority () const |
| void | setOptions (Options opt) |
| Options | options () const |
| void | addRequestRange (size_t start, size_t len=0, std::optional< zypp::Digest > &&digest={}, CheckSumBytes expectedChkSum=CheckSumBytes(), std::any userData=std::any(), std::optional< size_t > digestCompareLen={}, std::optional< size_t > chksumpad={}) |
| void | addRequestRange (Range &&range) |
| bool | setExpectedFileChecksum (const zypp::CheckSum &expected) |
| void | resetRequestRanges () |
| std::vector< Range > | failedRanges () const |
| const std::vector< Range > & | requestedRanges () const |
| const std::string & | lastRedirectInfo () const |
| void * | nativeHandle () const |
| std::optional< Timings > | timings () const |
| After the request is finished query the timings that were collected during download. | |
| std::vector< char > | peekData (off_t offset, size_t count) const |
| Url | url () const |
| void | setUrl (const Url &url) |
| This will change the URL of the request. | |
| const zypp::Pathname & | targetFilePath () const |
| Returns the target filename path. | |
| void | setTargetFilePath (const zypp::Pathname &path) |
| Changes the target file path of the download. | |
| FileMode | fileOpenMode () const |
| Returns the currently configured file open mode. | |
| void | setFileOpenMode (FileMode mode) |
| Sets the file open mode to mode. | |
| std::string | contentType () const |
| Returns the content type as reported from the server. | |
| zypp::ByteCount | reportedByteCount () const |
| Returns the number of bytes that are reported from the backend as the full download size, those can be 0 even when the download is already running. | |
| zypp::ByteCount | downloadedByteCount () const |
| Returns the number of already downloaded bytes as reported by the backend. | |
| TransferSettings & | transferSettings () |
| State | state () const |
| Returns the current state the HttpDownloadRequest is in. | |
| NetworkRequestError | error () const |
| Returns the last set Error. | |
| std::string | extendedErrorString () const |
| In some cases, curl can provide extended error information collected at runtime. | |
| bool | hasError () const |
| Checks if there was a error with the request. | |
| bool | addRequestHeader (const std::string &header) |
Public Attributes | |
| time_t | _authTimestamp = 0 |
| Url | _originalUrl |
| MirrorControl::MirrorHandle | _myMirror |
| connection | _sigStartedConn |
| connection | _sigProgressConn |
| connection | _sigFinishedConn |
Public Attributes inherited from zyppng::NetworkRequest | |
| SignalProxy< void(NetworkRequest &req) | sigStarted )() |
| Signals that the dispatcher dequeued the request and actually starts downloading data. | |
| SignalProxy< void(NetworkRequest &req, zypp::ByteCount count) | sigBytesDownloaded )() |
| Signals that new data has been downloaded, this is only the payload and does not include control data bytes. | |
| SignalProxy< void(NetworkRequest &req, off_t dltotal, off_t dlnow, off_t ultotal, off_t ulnow) | sigProgress )() |
| Signals if there was data read from the download. | |
| SignalProxy< void(NetworkRequest &req, const NetworkRequestError &err) | sigFinished )() |
| Signals that the download finished. | |
| using zyppng::DownloadPrivateBase::Request::Ptr = std::shared_ptr<Request> |
| using zyppng::DownloadPrivateBase::Request::WeakPtr = std::shared_ptr<Request> |
|
inline |
| void zyppng::DownloadPrivateBase::Request::disconnectSignals | ( | ) |
Definition at line 104 of file downloader.cc.
| zyppng::NetworkRequest::NetworkRequest | ( | Url | url, |
| zypp::Pathname | targetFile, | ||
| FileMode | fMode = WriteExclusive ) |
| url | The source URL of the download |
| targetFile | The path where the file should be stored |
| fMode | The mode in which the file is opened in. |
Definition at line 92 of file request.cc.
| time_t zyppng::DownloadPrivateBase::Request::_authTimestamp = 0 |
| MirrorControl::MirrorHandle zyppng::DownloadPrivateBase::Request::_myMirror |
| connection zyppng::DownloadPrivateBase::Request::_sigStartedConn |
| connection zyppng::DownloadPrivateBase::Request::_sigProgressConn |
| connection zyppng::DownloadPrivateBase::Request::_sigFinishedConn |