libzypp: zypp::CommitPackagePreloader::PreloadWorker Class Reference

libzypp 17.38.5

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 54 of file commitpackagepreloader.cc.

## Member Enumeration Documentation

## ◆ State

enum zypp::CommitPackagePreloader::PreloadWorker::State

Enumerator
Pending |
SimpleDl |
Finished |

Definition at line 56 of file commitpackagepreloader.cc.

## Constructor & Destructor Documentation

## ◆ PreloadWorker()

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

Definition at line 64 of file commitpackagepreloader.cc.

## Member Function Documentation

## ◆ finished()

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

Definition at line 66 of file commitpackagepreloader.cc.

## ◆ nextJob()

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

Definition at line 70 of file commitpackagepreloader.cc.

## ◆ sigWorkerFinished()

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

Definition at line 172 of file commitpackagepreloader.cc.

## ◆ prepareMirror()

bool zypp::CommitPackagePreloader::PreloadWorker::prepareMirror | ( |  | ) |
| inlineprivate

Definition at line 179 of file commitpackagepreloader.cc.

## ◆ taintCurrentMirror()

bool zypp::CommitPackagePreloader::PreloadWorker::taintCurrentMirror | ( |  | ) |
| inlineprivate

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

Definition at line 204 of file commitpackagepreloader.cc.

## ◆ findUsableMirror()

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

Tries to find a usable mirror.

Definition at line 227 of file commitpackagepreloader.cc.

## ◆ onRequestStarted()

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

Definition at line 255 of file commitpackagepreloader.cc.

## ◆ onRequestProgress()

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

Definition at line 259 of file commitpackagepreloader.cc.

## ◆ onRequestFinished()

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

Definition at line 278 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 )
| inlineprivate

Definition at line 373 of file commitpackagepreloader.cc.

## ◆ makeJobUrl()

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

Definition at line 387 of file commitpackagepreloader.cc.

## Member Data Documentation

## ◆ _s

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

Definition at line 418 of file commitpackagepreloader.cc.

## ◆ _parent

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

Definition at line 419 of file commitpackagepreloader.cc.

## ◆ _req

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

Definition at line 420 of file commitpackagepreloader.cc.

## ◆ _job

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

Definition at line 422 of file commitpackagepreloader.cc.

## ◆ _tmpFile

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

Definition at line 423 of file commitpackagepreloader.cc.

## ◆ _targetPath

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

Definition at line 424 of file commitpackagepreloader.cc.

## ◆ _started

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

Definition at line 425 of file commitpackagepreloader.cc.

## ◆ _firstAuth

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

Definition at line 426 of file commitpackagepreloader.cc.

## ◆ _myMirror

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

Definition at line 427 of file commitpackagepreloader.cc.

## ◆ _lastByteCount

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

Definition at line 428 of file commitpackagepreloader.cc.

## ◆ _currentRepoId

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

Definition at line 429 of file commitpackagepreloader.cc.

## ◆ _notFoundRetry

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

Definition at line 432 of file commitpackagepreloader.cc.

## ◆ _taintedMirrors

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

Definition at line 433 of file commitpackagepreloader.cc.

## ◆ _sigFinished

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

Definition at line 435 of file commitpackagepreloader.cc.

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

- zypp/target/commitpackagepreloader.cc