|
libzypp
17.35.16
|
#include <zypp-curl/ng/network/private/downloaderstates/basicdownloader_p.h>

Public Types | |
| using | Request = DownloadPrivateBase::Request |
Public Types inherited from zyppng::MirrorHandlingStateBase | |
| enum | PrepareResult { Failed, Ok, Delayed } |
Public Types inherited from zyppng::Base | |
| using | Ptr = std::shared_ptr< Base > |
| using | WeakPtr = std::weak_ptr< Base > |
Public Member Functions | |
| BasicDownloaderStateBase (DownloadPrivate &parent) | |
| BasicDownloaderStateBase (std::shared_ptr< Request > &&req, DownloadPrivate &parent) | |
| void | enter () |
| void | exit () |
| virtual bool | initializeRequest (std::shared_ptr< Request > &r) |
| virtual void | gotFinished () |
| virtual void | failed (NetworkRequestError &&err) |
| void | failed (std::string &&str) |
| void | onRequestStarted (NetworkRequest &) |
| void | onRequestProgress (NetworkRequest &, off_t dltotal, off_t dlnow, off_t, off_t) |
| void | onRequestFinished (NetworkRequest &req, const NetworkRequestError &err) |
| const NetworkRequestError & | error () const |
| void | mirrorReceived (MirrorControl::MirrorPick mirror) override |
| void | failedToPrepare () override |
Public Member Functions inherited from zyppng::MirrorHandlingStateBase | |
| MirrorHandlingStateBase (DownloadPrivate &parent) | |
| ~MirrorHandlingStateBase () override | |
| PrepareResult | prepareNextMirror () |
| NetworkRequestError | setupMirror (const MirrorControl::MirrorPick &pick, Url &url, TransferSettings &set) |
Public Member Functions inherited from zyppng::BasicState< DownloadPrivate, false > | |
| BasicState (DownloadPrivate &sm) | |
| BasicState (BasicState &&) noexcept=default | |
| ~BasicState () override | |
| BasicState & | operator= (BasicState &&) noexcept=default |
| DownloadPrivate & | stateMachine () |
| const DownloadPrivate & | stateMachine () const |
Public Member Functions inherited from zyppng::Base | |
| Base () | |
| virtual | ~Base () |
| WeakPtr | parent () const |
| void | addChild (const Base::Ptr &child) |
| void | removeChild (const Ptr &child) |
| const std::unordered_set< Ptr > & | children () const |
| std::thread::id | threadId () const |
| template<typename T > | |
| std::vector< std::weak_ptr< T > > | findChildren () const |
| template<typename T > | |
| std::shared_ptr< T > | shared_this () const |
| template<typename T > | |
| std::shared_ptr< T > | shared_this () |
| template<typename T > | |
| std::weak_ptr< T > | weak_this () const |
| template<typename T > | |
| std::weak_ptr< T > | weak_this () |
| template<typename SenderFunc , typename ReceiverFunc > | |
| auto | connect (SenderFunc &&sFun, typename internal::MemberFunction< ReceiverFunc >::ClassType &recv, ReceiverFunc &&rFunc) |
| template<typename SenderFunc , typename ReceiverFunc , typename ... Tracker> | |
| std::enable_if_t< std::is_member_function_pointer_v< SenderFunc >, connection > | connectFunc (SenderFunc &&sFun, ReceiverFunc &&rFunc, const Tracker &...trackers) |
Public Attributes | |
| std::shared_ptr< Request > | _request |
| std::optional< std::string > | _chksumtype |
| std::optional< UByteArray > | _chksumVec |
Public Attributes inherited from zyppng::MirrorHandlingStateBase | |
| std::vector< Url > | _fileMirrors |
Protected Member Functions | |
| void | startWithMirror (MirrorControl::MirrorHandle mirror, const zypp::Url &url, const TransferSettings &set) |
| void | startWithoutMirror () |
| void | startRequest () |
| virtual void | handleRequestProgress (NetworkRequest &req, off_t dltotal, off_t dlnow) |
Protected Member Functions inherited from zyppng::Base | |
| Base (BasePrivate &dd) | |
Protected Attributes | |
| NetworkRequestError | _error |
| Signal< void() > | _sigFinished |
| Signal< void() > | _sigFailed |
Protected Attributes inherited from zyppng::Base | |
| std::unique_ptr< BasePrivate > | d_ptr |
Additional Inherited Members | |
Static Public Member Functions inherited from zyppng::Base | |
| template<typename Obj , typename Functor > | |
| static decltype(auto) | make_base_slot (Obj *o, Functor &&f) |
| template<typename SenderFunc , typename ReceiverFunc > | |
| static auto | connect (typename internal::MemberFunction< SenderFunc >::ClassType &s, SenderFunc &&sFun, typename internal::MemberFunction< ReceiverFunc >::ClassType &recv, ReceiverFunc &&rFunc) |
| template<typename SenderFunc , typename ReceiverFunc , typename ... Tracker> | |
| static auto | connectFunc (typename internal::MemberFunction< SenderFunc >::ClassType &s, SenderFunc &&sFun, ReceiverFunc &&rFunc, const Tracker &...trackers) |
Static Public Attributes inherited from zyppng::BasicState< DownloadPrivate, false > | |
| static constexpr bool | isFinal |
State implementation for the generic part of a simple file downloader, that knows how to use the mirrors if available.
Definition at line 27 of file basicdownloader_p.h.
Definition at line 29 of file basicdownloader_p.h.
|
inline |
Definition at line 31 of file basicdownloader_p.h.
| zyppng::BasicDownloaderStateBase::BasicDownloaderStateBase | ( | std::shared_ptr< Request > && | req, |
| DownloadPrivate & | parent | ||
| ) |
Definition at line 22 of file basicdownloader_p.cc.
| void zyppng::BasicDownloaderStateBase::enter | ( | ) |
Definition at line 27 of file basicdownloader_p.cc.
| void zyppng::BasicDownloaderStateBase::exit | ( | ) |
Definition at line 51 of file basicdownloader_p.cc.
Reimplemented in zyppng::DlMetaLinkInfoState.
Definition at line 134 of file basicdownloader_p.cc.
|
virtual |
Reimplemented in zyppng::DlMetaLinkInfoState.
Definition at line 139 of file basicdownloader_p.cc.
|
virtual |
Definition at line 149 of file basicdownloader_p.cc.
| void zyppng::BasicDownloaderStateBase::failed | ( | std::string && | str | ) |
Definition at line 144 of file basicdownloader_p.cc.
| void zyppng::BasicDownloaderStateBase::onRequestStarted | ( | NetworkRequest & | ) |
Definition at line 157 of file basicdownloader_p.cc.
| void zyppng::BasicDownloaderStateBase::onRequestProgress | ( | NetworkRequest & | req, |
| off_t | dltotal, | ||
| off_t | dlnow, | ||
| off_t | , | ||
| off_t | |||
| ) |
Definition at line 179 of file basicdownloader_p.cc.
| void zyppng::BasicDownloaderStateBase::onRequestFinished | ( | NetworkRequest & | req, |
| const NetworkRequestError & | err | ||
| ) |
Definition at line 184 of file basicdownloader_p.cc.
|
inline |
Definition at line 46 of file basicdownloader_p.h.
|
overridevirtual |
This is called once a mirror became ready, either directly if a mirror is ready or it was delayed and called asynchronously
Implements zyppng::MirrorHandlingStateBase.
Definition at line 59 of file basicdownloader_p.cc.
|
overridevirtual |
Gets called in case a mirror failed to prepare, probably because none of the mirrors in _fileMirrors is known by MirrorControl
Reimplemented from zyppng::MirrorHandlingStateBase.
Definition at line 73 of file basicdownloader_p.cc.
|
protected |
Definition at line 78 of file basicdownloader_p.cc.
|
protected |
Definition at line 91 of file basicdownloader_p.cc.
|
protected |
Definition at line 104 of file basicdownloader_p.cc.
|
protectedvirtual |
Reimplemented in zyppng::DlMetaLinkInfoState.
Definition at line 168 of file basicdownloader_p.cc.
| std::shared_ptr<Request> zyppng::BasicDownloaderStateBase::_request |
Definition at line 50 of file basicdownloader_p.h.
| std::optional<std::string> zyppng::BasicDownloaderStateBase::_chksumtype |
Definition at line 51 of file basicdownloader_p.h.
| std::optional<UByteArray> zyppng::BasicDownloaderStateBase::_chksumVec |
Definition at line 52 of file basicdownloader_p.h.
|
protected |
Definition at line 63 of file basicdownloader_p.h.
|
protected |
Definition at line 64 of file basicdownloader_p.h.
|
protected |
Definition at line 65 of file basicdownloader_p.h.