libzypp: zyppng::ProvidePrivate Class Reference

libzypp 17.36.6

Classes | Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
zyppng::ProvidePrivate Class Reference

`#include <zypp-media/ng/private/provide_p.h>`

Inheritance diagram for zyppng::ProvidePrivate:

## Classes
struct | FileCacheItem
struct | QueueItem

## Public Types
enum | ScheduleReason { ProvideStart , QueueIdle , EnqueueItem , EnqueueReq , RestartAttach , FinishReq }

## Public Member Functions
| ProvidePrivate (zypp::Pathname &&workDir, Provide &pub)
void | schedule (ScheduleReason reason)
bool | queueRequest (ProvideRequestRef req)
bool | dequeueRequest (ProvideRequestRef req, std::exception_ptr error)
void | queueItem (ProvideItemRef item)
void | dequeueItem (ProvideItem *item)
std::string | nextMediaId () const
AttachedMediaInfo_Ptr | addMedium (AttachedMediaInfo_Ptr &&medium)
std::string | effectiveScheme (const std::string &scheme) const
void | onPulseTimeout (Timer &)
void | onQueueIdle ()
void | onItemStateChanged (ProvideItem &item)
expected< ProvideQueue::Config > | schemeConfig (const std::string &scheme)
std::optional< zypp::ManagedFile > | addToFileCache (const zypp::Pathname &downloadedFile)
bool | isInCache (const zypp::Pathname &downloadedFile) const
bool | isRunning () const
const zypp::Pathname & | workerPath () const
const std::string | queueName (ProvideQueue &q) const
std::vector< AttachedMediaInfo_Ptr > & | attachedMediaInfos ()
std::list< ProvideItemRef > & | items ()
zypp::media::CredManagerOptions & | credManagerOptions ()
std::vector< zypp::Url > | sanitizeUrls (const std::vector< zypp::Url > &urls)
ProvideStatusRef | log ()
uint32_t | nextRequestId ()
Public Member Functions inherited from zyppng::BasePrivate
| BasePrivate (Base &b)
virtual | ~BasePrivate ()
virtual void | init ()

## Public Attributes
Signal< Provide::MediaChangeAction(const std::string &, const std::string &, const int32_t, const std::vector< std::string > &, const std::optional< std::string > &) > | _sigMediaChange
Signal< std::optional< zypp::media::AuthData >(const zypp::Url &reqUrl, const std::string &triedUsername, const std::map< std::string, std::string > &extraValues) > | _sigAuthRequired
Public Attributes inherited from zyppng::BasePrivate
Base::WeakPtr | parent
std::unordered_set< Base::Ptr > | children
Base * | z_ptr = nullptr
std::thread::id | threadId = std::this_thread::get_id()

## Protected Member Functions
void | doSchedule (Timer &)

## Protected Attributes
std::unordered_map< std::string, std::string > | _workerAlias
bool | _isRunning = false
bool | _isScheduling = false
Timer::Ptr | _pulseTimer = Timer::create()
Timer::Ptr | _scheduleTrigger = Timer::create()
zypp::Pathname | _workDir
std::list< ProvideItemRef > | _items
uint32_t | _nextRequestId = 0
std::deque< QueueItem > | _queues
std::vector< AttachedMediaInfo_Ptr > | _attachedMediaInfos
std::unordered_map< std::string, ProvideQueueRef > | _workerQueues
std::unordered_map< std::string, ProvideQueue::Config > | _schemeConfigs
std::unordered_map< std::string, FileCacheItem > | _fileCache
zypp::Pathname | _workerPath
zypp::media::CredManagerOptions | _credManagerOptions
ProvideStatusRef | _log
Signal< void()> | _sigIdle

## Detailed Description

Definition at line 41 of file provide_p.h.

## Member Enumeration Documentation

## ◆ ScheduleReason

enum zyppng::ProvidePrivate::ScheduleReason

Enumerator
ProvideStart |
QueueIdle |
EnqueueItem |
EnqueueReq |
RestartAttach |
FinishReq |

Definition at line 47 of file provide_p.h.

## Constructor & Destructor Documentation

## ◆ ProvidePrivate()

zyppng::ProvidePrivate::ProvidePrivate | ( | zypp::Pathname && | workDir,
|  | Provide & | pub )

Definition at line 21 of file provide.cc.

## Member Function Documentation

## ◆ schedule()

void zyppng::ProvidePrivate::schedule | ( | ScheduleReason | reason | ) |

Definition at line 38 of file provide.cc.

## ◆ queueRequest()

bool zyppng::ProvidePrivate::queueRequest | ( | ProvideRequestRef | req | ) |

Definition at line 821 of file provide.cc.

## ◆ dequeueRequest()

bool zyppng::ProvidePrivate::dequeueRequest | ( | ProvideRequestRef | req,
|  | std::exception_ptr | error )

Definition at line 837 of file provide.cc.

## ◆ queueItem()

void zyppng::ProvidePrivate::queueItem | ( | ProvideItemRef | item | ) |

Definition at line 785 of file provide.cc.

## ◆ dequeueItem()

void zyppng::ProvidePrivate::dequeueItem | ( | ProvideItem * | item | ) |

Definition at line 791 of file provide.cc.

## ◆ nextMediaId()

std::string zyppng::ProvidePrivate::nextMediaId | ( |  | ) | const

Definition at line 803 of file provide.cc.

## ◆ addMedium()

AttachedMediaInfo_Ptr zyppng::ProvidePrivate::addMedium | ( | AttachedMediaInfo_Ptr && | medium | ) |

Definition at line 809 of file provide.cc.

## ◆ effectiveScheme()

std::string zyppng::ProvidePrivate::effectiveScheme | ( | const std::string & | scheme | ) | const

Definition at line 878 of file provide.cc.

## ◆ onPulseTimeout()

void zyppng::ProvidePrivate::onPulseTimeout | ( | Timer & |  | ) |

Definition at line 887 of file provide.cc.

## ◆ onQueueIdle()

void zyppng::ProvidePrivate::onQueueIdle | ( |  | ) |

Definition at line 915 of file provide.cc.

## ◆ onItemStateChanged()

void zyppng::ProvidePrivate::onItemStateChanged | ( | ProvideItem & | item | ) |

Definition at line 928 of file provide.cc.

## ◆ schemeConfig()

expected< ProvideQueue::Config > zyppng::ProvidePrivate::schemeConfig | ( | const std::string & | scheme | ) |

Definition at line 744 of file provide.cc.

## ◆ addToFileCache()

std::optional< zypp::ManagedFile > zyppng::ProvidePrivate::addToFileCache | ( | const zypp::Pathname & | downloadedFile | ) |

Definition at line 759 of file provide.cc.

## ◆ isInCache()

bool zyppng::ProvidePrivate::isInCache | ( | const zypp::Pathname & | downloadedFile | ) | const

Definition at line 779 of file provide.cc.

## ◆ isRunning()

bool zyppng::ProvidePrivate::isRunning | ( |  | ) | const

Definition at line 873 of file provide.cc.

## ◆ workerPath()

const zypp::Pathname & zyppng::ProvidePrivate::workerPath | ( |  | ) | const

Definition at line 859 of file provide.cc.

## ◆ queueName()

const std::string zyppng::ProvidePrivate::queueName | ( | ProvideQueue & | q | ) | const

Definition at line 864 of file provide.cc.

## ◆ attachedMediaInfos()

std::vector< AttachedMediaInfo_Ptr > & zyppng::ProvidePrivate::attachedMediaInfos | ( |  | ) |

Definition at line 739 of file provide.cc.

## ◆ items()

std::list< ProvideItemRef > & zyppng::ProvidePrivate::items | ( |  | ) |

Definition at line 699 of file provide.cc.

## ◆ credManagerOptions()

zypp::media::CredManagerOptions & zyppng::ProvidePrivate::credManagerOptions | ( |  | ) |

Definition at line 704 of file provide.cc.

## ◆ sanitizeUrls()

std::vector< zypp::Url > zyppng::ProvidePrivate::sanitizeUrls | ( | const std::vector< zypp::Url > & | urls | ) |

Definition at line 709 of file provide.cc.

## ◆ log()

ProvideStatusRef zyppng::ProvidePrivate::log | ( |  | ) |
| inline

Definition at line 90 of file provide_p.h.

## ◆ nextRequestId()

uint32_t zyppng::ProvidePrivate::nextRequestId | ( |  | ) |

Definition at line 946 of file provide.cc.

## ◆ doSchedule()

void zyppng::ProvidePrivate::doSchedule | ( | zyppng::Timer & |  | ) |
| protected

Definition at line 70 of file provide.cc.

## Member Data Documentation

## ◆ _sigMediaChange

Signal< Provide::MediaChangeAction ( const std::string &, const std::string &, const int32_t, const std::vector<std::string> &, const std::optional<std::string> &) > zyppng::ProvidePrivate::_sigMediaChange

Definition at line 96 of file provide_p.h.

## ◆ _sigAuthRequired

Signal< std::optional<zypp::media::AuthData>( const zypp::Url &reqUrl, const std::string &triedUsername, const std::map<std::string, std::string> &extraValues ) > zyppng::ProvidePrivate::_sigAuthRequired

Definition at line 97 of file provide_p.h.

## ◆ _workerAlias

std::unordered_map< std::string, std::string > zyppng::ProvidePrivate::_workerAlias
| protected

Initial value:
{
{"ftp" ,"http"},
{"tftp" ,"http"},
{"https","http"},
{"cifs" ,"smb" },
{"nfs4" ,"nfs" },
{"cd" ,"disc"},
{"dvd" ,"disc"},
{"file" ,"dir" },
{"hd" ,"disk"}
}

Definition at line 103 of file provide_p.h.

## ◆ _isRunning

bool zyppng::ProvidePrivate::_isRunning = false
| protected

Definition at line 115 of file provide_p.h.

## ◆ _isScheduling

bool zyppng::ProvidePrivate::_isScheduling = false
| protected

Definition at line 116 of file provide_p.h.

## ◆ _pulseTimer

Timer::Ptr zyppng::ProvidePrivate::_pulseTimer = Timer::create()
| protected

Definition at line 117 of file provide_p.h.

## ◆ _scheduleTrigger

Timer::Ptr zyppng::ProvidePrivate::_scheduleTrigger = Timer::create()
| protected

Definition at line 118 of file provide_p.h.

## ◆ _workDir

zypp::Pathname zyppng::ProvidePrivate::_workDir
| protected

Definition at line 119 of file provide_p.h.

## ◆ _items

std::list< ProvideItemRef > zyppng::ProvidePrivate::_items
| protected

Definition at line 121 of file provide_p.h.

## ◆ _nextRequestId

uint32_t zyppng::ProvidePrivate::_nextRequestId = 0
| protected

Definition at line 122 of file provide_p.h.

## ◆ _queues

std::deque<QueueItem> zyppng::ProvidePrivate::_queues
| protected

Definition at line 128 of file provide_p.h.

## ◆ _attachedMediaInfos

std::vector< AttachedMediaInfo_Ptr > zyppng::ProvidePrivate::_attachedMediaInfos
| protected

Definition at line 131 of file provide_p.h.

## ◆ _workerQueues

std::unordered_map< std::string, ProvideQueueRef > zyppng::ProvidePrivate::_workerQueues
| protected

Definition at line 133 of file provide_p.h.

## ◆ _schemeConfigs

std::unordered_map< std::string, ProvideQueue::Config > zyppng::ProvidePrivate::_schemeConfigs
| protected

Definition at line 134 of file provide_p.h.

## ◆ _fileCache

std::unordered_map< std::string, FileCacheItem > zyppng::ProvidePrivate::_fileCache
| protected

Definition at line 140 of file provide_p.h.

## ◆ _workerPath

zypp::Pathname zyppng::ProvidePrivate::_workerPath
| protected

Definition at line 142 of file provide_p.h.

## ◆ _credManagerOptions

zypp::media::CredManagerOptions zyppng::ProvidePrivate::_credManagerOptions
| protected

Definition at line 143 of file provide_p.h.

## ◆ _log

ProvideStatusRef zyppng::ProvidePrivate::_log
| protected

Definition at line 145 of file provide_p.h.

## ◆ _sigIdle

Signal<void()> zyppng::ProvidePrivate::_sigIdle
| protected

Definition at line 146 of file provide_p.h.

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

- zypp-media/ng/private/provide_p.h
- zypp-media/ng/provide.cc