libzypp  17.35.14
zyppng::DlMetaLinkInfoState Struct Reference

#include <zypp-curl/ng/network/private/downloaderstates/metalinkinfo_p.h>

Inheritance diagram for zyppng::DlMetaLinkInfoState:

Public Member Functions

 DlMetaLinkInfoState (DownloadPrivate &parent)
 
 DlMetaLinkInfoState (std::shared_ptr< Request > &&prevRequest, DownloadPrivate &parent)
 
SignalProxy< void() > sigFinished ()
 
SignalProxy< void() > sigGotMetadata ()
 
SignalProxy< void() > sigFailed ()
 
std::shared_ptr< FinishedStatetransitionToFinished ()
 
std::shared_ptr< PrepareMultiStatetransitionToPrepareMulti ()
 
bool initializeRequest (std::shared_ptr< Request > &r) override
 
void gotFinished () override
 
- Public Member Functions inherited from zyppng::BasicDownloaderStateBase
 BasicDownloaderStateBase (DownloadPrivate &parent)
 
 BasicDownloaderStateBase (std::shared_ptr< Request > &&req, DownloadPrivate &parent)
 
void enter ()
 
void exit ()
 
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 NetworkRequestErrorerror () 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
 
BasicStateoperator= (BasicState &&) noexcept=default
 
DownloadPrivatestateMachine ()
 
const DownloadPrivatestateMachine () 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 >, connectionconnectFunc (SenderFunc &&sFun, ReceiverFunc &&rFunc, const Tracker &...trackers)
 

Static Public Attributes

static constexpr auto stateId = Download::DlMetaLinkInfo
 
- Static Public Attributes inherited from zyppng::BasicState< DownloadPrivate, false >
static constexpr bool isFinal
 

Protected Member Functions

void handleRequestProgress (NetworkRequest &req, off_t dltotal, off_t dlnow) override
 
- Protected Member Functions inherited from zyppng::BasicDownloaderStateBase
void startWithMirror (MirrorControl::MirrorHandle mirror, const zypp::Url &url, const TransferSettings &set)
 
void startWithoutMirror ()
 
void startRequest ()
 
- Protected Member Functions inherited from zyppng::Base
 Base (BasePrivate &dd)
 

Protected Attributes

MetaDataType _detectedMetaType = MetaDataType::None
 
Signal< void() > _sigGotMetadata
 
- Protected Attributes inherited from zyppng::BasicDownloaderStateBase
NetworkRequestError _error
 
Signal< void() > _sigFinished
 
Signal< void() > _sigFailed
 
- Protected Attributes inherited from zyppng::Base
std::unique_ptr< BasePrivated_ptr
 

Private Attributes

bool _fallbackMilWritten = false
 

Additional Inherited Members

- Public Types inherited from zyppng::BasicDownloaderStateBase
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 >
 
- 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)
 
- Public Attributes inherited from zyppng::BasicDownloaderStateBase
std::shared_ptr< Request_request
 
std::optional< std::string > _chksumtype
 
std::optional< UByteArray_chksumVec
 
- Public Attributes inherited from zyppng::MirrorHandlingStateBase
std::vector< Url_fileMirrors
 

Detailed Description

State to download the actual metalink file, we can however not be 100% sure that we actually will get a metalink file, so we need to check the content type or in bad cases the data we get from the server.

Definition at line 34 of file metalinkinfo_p.h.

Constructor & Destructor Documentation

◆ DlMetaLinkInfoState() [1/2]

zyppng::DlMetaLinkInfoState::DlMetaLinkInfoState ( DownloadPrivate parent)

Definition at line 22 of file metalinkinfo_p.cc.

◆ DlMetaLinkInfoState() [2/2]

zyppng::DlMetaLinkInfoState::DlMetaLinkInfoState ( std::shared_ptr< Request > &&  prevRequest,
DownloadPrivate parent 
)

Definition at line 28 of file metalinkinfo_p.cc.

Member Function Documentation

◆ sigFinished()

SignalProxy< void () > zyppng::DlMetaLinkInfoState::sigFinished ( )
inline

Definition at line 40 of file metalinkinfo_p.h.

◆ sigGotMetadata()

SignalProxy< void () > zyppng::DlMetaLinkInfoState::sigGotMetadata ( )
inline

Definition at line 43 of file metalinkinfo_p.h.

◆ sigFailed()

SignalProxy< void () > zyppng::DlMetaLinkInfoState::sigFailed ( )
inline

Definition at line 46 of file metalinkinfo_p.h.

◆ transitionToFinished()

std::shared_ptr< FinishedState > zyppng::DlMetaLinkInfoState::transitionToFinished ( )

Definition at line 34 of file metalinkinfo_p.cc.

◆ transitionToPrepareMulti()

std::shared_ptr< PrepareMultiState > zyppng::DlMetaLinkInfoState::transitionToPrepareMulti ( )

Definition at line 40 of file metalinkinfo_p.cc.

◆ initializeRequest()

bool zyppng::DlMetaLinkInfoState::initializeRequest ( std::shared_ptr< Request > &  r)
overridevirtual

Reimplemented from zyppng::BasicDownloaderStateBase.

Definition at line 49 of file metalinkinfo_p.cc.

◆ gotFinished()

void zyppng::DlMetaLinkInfoState::gotFinished ( )
overridevirtual

Reimplemented from zyppng::BasicDownloaderStateBase.

Definition at line 56 of file metalinkinfo_p.cc.

◆ handleRequestProgress()

void zyppng::DlMetaLinkInfoState::handleRequestProgress ( NetworkRequest req,
off_t  dltotal,
off_t  dlnow 
)
overrideprotectedvirtual

Reimplemented from zyppng::BasicDownloaderStateBase.

Definition at line 83 of file metalinkinfo_p.cc.

Member Data Documentation

◆ stateId

constexpr auto zyppng::DlMetaLinkInfoState::stateId = Download::DlMetaLinkInfo
static

Definition at line 35 of file metalinkinfo_p.h.

◆ _detectedMetaType

MetaDataType zyppng::DlMetaLinkInfoState::_detectedMetaType = MetaDataType::None
protected

Definition at line 57 of file metalinkinfo_p.h.

◆ _sigGotMetadata

Signal< void () > zyppng::DlMetaLinkInfoState::_sigGotMetadata
protected

Definition at line 58 of file metalinkinfo_p.h.

◆ _fallbackMilWritten

bool zyppng::DlMetaLinkInfoState::_fallbackMilWritten = false
private

Definition at line 63 of file metalinkinfo_p.h.


The documentation for this struct was generated from the following files: