libzypp 17.31.23
|
Public Types | |
enum | PrepareResult { Failed , Ok , Delayed } |
Public Member Functions | |
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 () |
Public Attributes | |
std::vector< Url > | _fileMirrors |
Private Attributes | |
connection | _sigMirrorsReadyConn |
superclass state implementation for all states that need to handle async mirror requests
Definition at line 25 of file mirrorhandling_p.h.
Enumerator | |
---|---|
Failed | |
Ok | |
Delayed |
Definition at line 30 of file mirrorhandling_p.h.
zyppng::MirrorHandlingStateBase::MirrorHandlingStateBase | ( | DownloadPrivate & | parent | ) |
Definition at line 17 of file mirrorhandling_p.cc.
|
virtual |
Definition at line 21 of file mirrorhandling_p.cc.
MirrorHandlingStateBase::PrepareResult zyppng::MirrorHandlingStateBase::prepareNextMirror | ( | ) |
Request a new mirror, the PrepareResult shows if setupMirror was already called or if the request was Delayed.
Definition at line 26 of file mirrorhandling_p.cc.
NetworkRequestError zyppng::MirrorHandlingStateBase::setupMirror | ( | const MirrorControl::MirrorPick & | pick, |
Url & | url, | ||
TransferSettings & | set | ||
) |
Common code to setup a mirror after it was received, can result in errors if the mirror url contains settings that are invalid. Will return settings and url via parameters.
Definition at line 45 of file mirrorhandling_p.cc.
|
pure virtual |
This is called once a mirror became ready, either directly if a mirror is ready or it was delayed and called asynchronously
Implemented in zyppng::BasicDownloaderStateBase, and zyppng::RangeDownloaderBaseState.
|
inlinevirtual |
Gets called in case a mirror failed to prepare, probably because none of the mirrors in _fileMirrors is known by MirrorControl
Reimplemented in zyppng::BasicDownloaderStateBase, and zyppng::RangeDownloaderBaseState.
Definition at line 60 of file mirrorhandling_p.h.
std::vector<Url> zyppng::MirrorHandlingStateBase::_fileMirrors |
Definition at line 62 of file mirrorhandling_p.h.
|
private |
Definition at line 65 of file mirrorhandling_p.h.