libzypp 17.37.10

zypp::CommitPackagePreloader::PreloadWorker Class Reference
Inheritance diagram for zypp::CommitPackagePreloader::PreloadWorker:

## Public Types
enum | State { Pending , SimpleDl , Finished }
Public Types inherited from zyppng::Base
using | Ptr = std::shared_ptr<Base>
using | WeakPtr = std::weak_ptr<Base>

## Public Member Functions
| PreloadWorker (CommitPackagePreloader &parent)
bool | finished () const
void | nextJob ()
zyppng::SignalProxy< void()> | sigWorkerFinished ()
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)

## Private Member Functions
bool | prepareMirror ()
bool | taintCurrentMirror ()
| Taints the current mirror, returns true if a alternative was found.
RepoUrl * | findUsableMirror (RepoUrl *skip=nullptr, bool allowTainted=true)
| Tries to find a usable mirror.
void | onRequestStarted (zyppng::NetworkRequest &req)
void | onRequestProgress (zyppng::NetworkRequest &req, zypp::ByteCount count)
void | onRequestFinished (zyppng::NetworkRequest &req, const zyppng::NetworkRequestError &err)
void | finishCurrentJob (const zypp::Pathname &localPath, const std::optional< zypp::Url > &url, media::CommitPreloadReport::Error e, const std::optional< std::string > &errorMessage, bool fatal)
void | makeJobUrl (zypp::Url &resultUrl, media::TransferSettings &resultSet)

## Private Attributes
State | _s = Pending
CommitPackagePreloader & | _parent
zyppng::NetworkRequestRef | _req
PoolItem | _job
ManagedFile | _tmpFile
zypp::Pathname | _targetPath
bool | _started = false
bool | _firstAuth = true
RepoUrl * | _myMirror = nullptr
ByteCount | _lastByteCount = 0
Repository::IdType | _currentRepoId = sat::detail::noRepoId
int | _notFoundRetry = 0
std::set< RepoUrl * > | _taintedMirrors
zyppng::Signal< void()> | _sigFinished

## 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)
Protected Member Functions inherited from zyppng::Base
| Base (BasePrivate &dd)
Protected Attributes inherited from zyppng::Base
std::unique_ptr< BasePrivate > | d_ptr

## Detailed Description

Definition at line 53 of file commitpackagepreloader.cc.

## Member Enumeration Documentation

## ◆ State

enum zypp::CommitPackagePreloader::PreloadWorker::State

Enumerator
Pending |
SimpleDl |
Finished |

Definition at line 55 of file commitpackagepreloader.cc.

## Constructor & Destructor Documentation

## ◆ PreloadWorker()

zypp::CommitPackagePreloader::PreloadWorker::PreloadWorker | ( | CommitPackagePreloader & | parent | ) |
| inline

Definition at line 63 of file commitpackagepreloader.cc.

## Member Function Documentation

## ◆ finished()

bool zypp::CommitPackagePreloader::PreloadWorker::finished | ( |  | ) | const
| inline

Definition at line 65 of file commitpackagepreloader.cc.

## ◆ nextJob()

void zypp::CommitPackagePreloader::PreloadWorker::nextJob | ( |  | ) |
| inline

Definition at line 69 of file commitpackagepreloader.cc.

## ◆ sigWorkerFinished()

zyppng::SignalProxy< void()> zypp::CommitPackagePreloader::PreloadWorker::sigWorkerFinished | ( |  | ) |
| inline

Definition at line 162 of file commitpackagepreloader.cc.

## ◆ prepareMirror()

bool zypp::CommitPackagePreloader::PreloadWorker::prepareMirror | ( |  | ) |
| inline private

Definition at line 169 of file commitpackagepreloader.cc.

## ◆ taintCurrentMirror()

bool zypp::CommitPackagePreloader::PreloadWorker::taintCurrentMirror | ( |  | ) |
| inline private

Taints the current mirror, returns true if a alternative was found.

Definition at line 194 of file commitpackagepreloader.cc.

## ◆ findUsableMirror()

RepoUrl * zypp::CommitPackagePreloader::PreloadWorker::findUsableMirror | ( | RepoUrl * | skip = nullptr,
|  | bool | allowTainted = true )
| inline private

Tries to find a usable mirror.

Definition at line 217 of file commitpackagepreloader.cc.

## ◆ onRequestStarted()

void zypp::CommitPackagePreloader::PreloadWorker::onRequestStarted | ( | zyppng::NetworkRequest & | req | ) |
| inline private

Definition at line 245 of file commitpackagepreloader.cc.

## ◆ onRequestProgress()

void zypp::CommitPackagePreloader::PreloadWorker::onRequestProgress | ( | zyppng::NetworkRequest & | req,
|  | zypp::ByteCount | count )
| inline private

Definition at line 249 of file commitpackagepreloader.cc.

## ◆ onRequestFinished()

void zypp::CommitPackagePreloader::PreloadWorker::onRequestFinished | ( | zyppng::NetworkRequest & | req,
|  | const zyppng::NetworkRequestError & | err )
| inline private

Definition at line 268 of file commitpackagepreloader.cc.

## ◆ finishCurrentJob()

void zypp::CommitPackagePreloader::PreloadWorker::finishCurrentJob | ( | const zypp::Pathname & | localPath,
|  | const std::optional< zypp::Url > & | url,
|  | media::CommitPreloadReport::Error | e,
|  | const std::optional< std::string > & | errorMessage,
|  | bool | fatal )
| inline private

Definition at line 353 of file commitpackagepreloader.cc.

## ◆ makeJobUrl()

void zypp::CommitPackagePreloader::PreloadWorker::makeJobUrl | ( | zypp::Url & | resultUrl,
|  | media::TransferSettings & | resultSet )
| inline private

Definition at line 367 of file commitpackagepreloader.cc.

## Member Data Documentation

## ◆ _s

State zypp::CommitPackagePreloader::PreloadWorker::_s = Pending
| private

Definition at line 398 of file commitpackagepreloader.cc.

## ◆ _parent

CommitPackagePreloader& zypp::CommitPackagePreloader::PreloadWorker::_parent
| private

Definition at line 399 of file commitpackagepreloader.cc.

## ◆ _req

zyppng::NetworkRequestRef zypp::CommitPackagePreloader::PreloadWorker::_req
| private

Definition at line 400 of file commitpackagepreloader.cc.

## ◆ _job

PoolItem zypp::CommitPackagePreloader::PreloadWorker::_job
| private

Definition at line 402 of file commitpackagepreloader.cc.

## ◆ _tmpFile

ManagedFile zypp::CommitPackagePreloader::PreloadWorker::_tmpFile
| private

Definition at line 403 of file commitpackagepreloader.cc.

## ◆ _targetPath

zypp::Pathname zypp::CommitPackagePreloader::PreloadWorker::_targetPath
| private

Definition at line 404 of file commitpackagepreloader.cc.

## ◆ _started

bool zypp::CommitPackagePreloader::PreloadWorker::_started = false
| private

Definition at line 405 of file commitpackagepreloader.cc.

## ◆ _firstAuth

bool zypp::CommitPackagePreloader::PreloadWorker::_firstAuth = true
| private

Definition at line 406 of file commitpackagepreloader.cc.

## ◆ _myMirror

RepoUrl* zypp::CommitPackagePreloader::PreloadWorker::_myMirror = nullptr
| private

Definition at line 407 of file commitpackagepreloader.cc.

## ◆ _lastByteCount

ByteCount zypp::CommitPackagePreloader::PreloadWorker::_lastByteCount = 0
| private

Definition at line 408 of file commitpackagepreloader.cc.

## ◆ _currentRepoId

Repository::IdType zypp::CommitPackagePreloader::PreloadWorker::_currentRepoId = sat::detail::noRepoId
| private

Definition at line 409 of file commitpackagepreloader.cc.

## ◆ _notFoundRetry

int zypp::CommitPackagePreloader::PreloadWorker::_notFoundRetry = 0
| private

Definition at line 412 of file commitpackagepreloader.cc.

## ◆ _taintedMirrors

std::set<RepoUrl *> zypp::CommitPackagePreloader::PreloadWorker::_taintedMirrors
| private

Definition at line 413 of file commitpackagepreloader.cc.

## ◆ _sigFinished

zyppng::Signal<void()> zypp::CommitPackagePreloader::PreloadWorker::_sigFinished
| private

Definition at line 415 of file commitpackagepreloader.cc.

The documentation for this class was generated from the following file:

- zypp/target/commitpackagepreloader.cc