libzypp 17.31.23
zyppng::DlMetalinkState Struct Reference

#include </home/abuild/rpmbuild/BUILD/libzypp-17.31.23/zypp-curl/ng/network/private/downloaderstates/metalink_p.h>

Inheritance diagram for zyppng::DlMetalinkState:

Public Member Functions

 DlMetalinkState (zypp::media::MediaBlockList &&blockList, std::vector< Url > &&mirrors, DownloadPrivate &parent)
 
void enter ()
 
void exit ()
 
virtual void setFinished () override
 
std::shared_ptr< FinishedStatetransitionToFinished ()
 
bool toFinalStateCondition ()
 
bool toSimpleDownloadCondition ()
 
SignalProxy< void() > sigFinished ()
 
SignalProxy< void() > sigFailed ()
 
- Public Member Functions inherited from zyppng::RangeDownloaderBaseState
 RangeDownloaderBaseState (std::vector< Url > &&mirrors, DownloadPrivate &parent)
 
void ensureDownloadsRunning ()
 
void reschedule ()
 
const NetworkRequestErrorerror () const
 
void setFailed (NetworkRequestError &&err)
 
void setFailed (std::string &&reason)
 
virtual void setFinished ()
 
void cancelAll (const NetworkRequestError &err)
 
void onRequestStarted (NetworkRequest &)
 
void onRequestProgress (NetworkRequest &, off_t, off_t, off_t, off_t)
 
void onRequestFinished (NetworkRequest &req, const NetworkRequestError &err)
 
void mirrorReceived (MirrorControl::MirrorPick mirror) override
 
void failedToPrepare () override
 
- Public Member Functions inherited from zyppng::MirrorHandlingStateBase
 MirrorHandlingStateBase (DownloadPrivate &parent)
 
virtual ~MirrorHandlingStateBase ()
 
PrepareResult prepareNextMirror ()
 
NetworkRequestError setupMirror (const MirrorControl::MirrorPick &pick, Url &url, TransferSettings &set)
 
virtual void mirrorReceived (MirrorControl::MirrorPick mirror)=0
 
virtual void failedToPrepare ()
 

Static Public Attributes

static constexpr auto stateId = Download::DlMetalink
 

Private Attributes

zypp::media::MediaBlockList _blockList
 
std::string _fileChecksumType
 
std::optional< std::vector< unsigned char > > _fileChksumVec
 

Additional Inherited Members

- Public Types inherited from zyppng::RangeDownloaderBaseState
using Request = DownloadPrivateBase::Request
 
using Block = DownloadPrivateBase::Block
 
- Public Types inherited from zyppng::MirrorHandlingStateBase
enum  PrepareResult { Failed , Ok , Delayed }
 
- Static Public Member Functions inherited from zyppng::RangeDownloaderBaseState
static zypp::ByteCount makeBlksize (size_t filesize)
 
- Public Attributes inherited from zyppng::MirrorHandlingStateBase
std::vector< Url > _fileMirrors
 
- Protected Attributes inherited from zyppng::RangeDownloaderBaseState
NetworkRequestError _error
 
bool _inEnsureDownloadsRunning = false
 
size_t _fileSize = 0
 
zypp::ByteCount _preferredChunkSize = 0
 
std::list< Block_ranges
 
std::list< Block_failedRanges
 
off_t _downloadedMultiByteCount = 0
 
std::vector< std::shared_ptr< Request > > _runningRequests
 
Signal< void() > _sigFinished
 
Signal< void() > _sigFailed
 

Detailed Description

Metalink download state implementation, this downloads the requested file in metalink ranges.

Definition at line 31 of file metalink_p.h.

Constructor & Destructor Documentation

◆ DlMetalinkState()

zyppng::DlMetalinkState::DlMetalinkState ( zypp::media::MediaBlockList &&  blockList,
std::vector< Url > &&  mirrors,
DownloadPrivate parent 
)

Definition at line 23 of file metalink_p.cc.

Member Function Documentation

◆ enter()

void zyppng::DlMetalinkState::enter ( )

Definition at line 30 of file metalink_p.cc.

◆ exit()

void zyppng::DlMetalinkState::exit ( )

Definition at line 127 of file metalink_p.cc.

◆ setFinished()

void zyppng::DlMetalinkState::setFinished ( )
overridevirtual

Reimplemented from zyppng::RangeDownloaderBaseState.

Definition at line 132 of file metalink_p.cc.

◆ transitionToFinished()

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

Definition at line 159 of file metalink_p.cc.

◆ toFinalStateCondition()

bool zyppng::DlMetalinkState::toFinalStateCondition ( )
inline

Definition at line 44 of file metalink_p.h.

◆ toSimpleDownloadCondition()

bool zyppng::DlMetalinkState::toSimpleDownloadCondition ( )
inline

Definition at line 49 of file metalink_p.h.

◆ sigFinished()

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

Definition at line 53 of file metalink_p.h.

◆ sigFailed()

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

Definition at line 57 of file metalink_p.h.

Member Data Documentation

◆ stateId

constexpr auto zyppng::DlMetalinkState::stateId = Download::DlMetalink
staticconstexpr

Definition at line 33 of file metalink_p.h.

◆ _blockList

zypp::media::MediaBlockList zyppng::DlMetalinkState::_blockList
private

Definition at line 62 of file metalink_p.h.

◆ _fileChecksumType

std::string zyppng::DlMetalinkState::_fileChecksumType
private

Definition at line 63 of file metalink_p.h.

◆ _fileChksumVec

std::optional<std::vector<unsigned char> > zyppng::DlMetalinkState::_fileChksumVec
private

Definition at line 64 of file metalink_p.h.


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