libzypp: zypp::CommitPackagePreloader::PreloadWorker Class Reference

libzypp 17.36.6

Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
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 | failCurrentJob (const zypp::Pathname &localPath, const std::optional< zypp::Url > &url, media::CommitPreloadReport::Error e, const std::optional< std::string > &errorMessage)
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 50 of file commitpackagepreloader.cc.

## Member Enumeration Documentation

## ◆ State

enum zypp::CommitPackagePreloader::PreloadWorker::State

Enumerator
Pending |
SimpleDl |
Finished |

Definition at line 52 of file commitpackagepreloader.cc.

## Constructor & Destructor Documentation

## ◆ PreloadWorker()

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

Definition at line 60 of file commitpackagepreloader.cc.

## Member Function Documentation

## ◆ finished()

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

Definition at line 62 of file commitpackagepreloader.cc.

## ◆ nextJob()

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

Definition at line 66 of file commitpackagepreloader.cc.

## ◆ sigWorkerFinished()

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

Definition at line 168 of file commitpackagepreloader.cc.

## ◆ prepareMirror()

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

Definition at line 175 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 200 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 223 of file commitpackagepreloader.cc.

## ◆ onRequestStarted()

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

Definition at line 251 of file commitpackagepreloader.cc.

## ◆ onRequestProgress()

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

Definition at line 255 of file commitpackagepreloader.cc.

## ◆ onRequestFinished()

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

Definition at line 274 of file commitpackagepreloader.cc.

## ◆ failCurrentJob()

void zypp::CommitPackagePreloader::PreloadWorker::failCurrentJob | ( | const zypp::Pathname & | localPath,
|  | const std::optional< zypp::Url > & | url,
|  | media::CommitPreloadReport::Error | e,
|  | const std::optional< std::string > & | errorMessage )
| inlineprivate

Definition at line 358 of file commitpackagepreloader.cc.

## ◆ makeJobUrl()

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

Definition at line 370 of file commitpackagepreloader.cc.

## Member Data Documentation

## ◆ _s

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

Definition at line 408 of file commitpackagepreloader.cc.

## ◆ _parent

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

Definition at line 409 of file commitpackagepreloader.cc.

## ◆ _req

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

Definition at line 410 of file commitpackagepreloader.cc.

## ◆ _job

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

Definition at line 412 of file commitpackagepreloader.cc.

## ◆ _tmpFile

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

Definition at line 413 of file commitpackagepreloader.cc.

## ◆ _targetPath

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

Definition at line 414 of file commitpackagepreloader.cc.

## ◆ _started

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

Definition at line 415 of file commitpackagepreloader.cc.

## ◆ _firstAuth

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

Definition at line 416 of file commitpackagepreloader.cc.

## ◆ _myMirror

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

Definition at line 417 of file commitpackagepreloader.cc.

## ◆ _lastByteCount

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

Definition at line 418 of file commitpackagepreloader.cc.

## ◆ _currentRepoId

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

Definition at line 419 of file commitpackagepreloader.cc.

## ◆ _notFoundRetry

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

Definition at line 422 of file commitpackagepreloader.cc.

## ◆ _taintedMirrors

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

Definition at line 423 of file commitpackagepreloader.cc.

## ◆ _sigFinished

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

Definition at line 425 of file commitpackagepreloader.cc.

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

- zypp/target/commitpackagepreloader.cc