libzypp 17.31.23
zyppng::ProvidePrivate Class Reference

#include </home/abuild/rpmbuild/BUILD/libzypp-17.31.23/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
 
AttachedMediaInfoaddMedium (zypp::proto::Capabilities::WorkerType workerType, const zypp::Url &baseUrl, ProvideMediaSpec &spec)
 
AttachedMediaInfoaddMedium (zypp::proto::Capabilities::WorkerType workerType, ProvideQueueWeakRef backingQueue, const std::string &id, const zypp::Url &baseUrl, ProvideMediaSpec &spec)
 
std::string effectiveScheme (const std::string &scheme) const
 
void onPulseTimeout (Timer &)
 
void onQueueIdle ()
 
void onItemStateChanged (ProvideItem &item)
 
expected< ProvideQueue::ConfigschemeConfig (const std::string &scheme)
 
std::optional< zypp::ManagedFileaddToFileCache (const zypp::Pathname &downloadedFile)
 
bool isInCache (const zypp::Pathname &downloadedFile) const
 
bool isRunning () const
 
const zypp::PathnameworkerPath () const
 
const std::string queueName (ProvideQueue &q) const
 
std::vector< AttachedMediaInfo > & attachedMediaInfos ()
 
std::list< ProvideItemRef > & items ()
 
zypp::media::CredManagerOptionscredManagerOptions ()
 
ProvideStatusRef log ()
 
uint32_t nextRequestId ()
 

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
 

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_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
 

Private Member Functions

 ZYPP_DECLARE_PUBLIC (Provide)
 

Detailed Description

Definition at line 50 of file provide_p.h.

Member Enumeration Documentation

◆ ScheduleReason

Enumerator
ProvideStart 
QueueIdle 
EnqueueItem 
EnqueueReq 
RestartAttach 
FinishReq 

Definition at line 56 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

◆ ZYPP_DECLARE_PUBLIC()

zyppng::ProvidePrivate::ZYPP_DECLARE_PUBLIC ( Provide  )
private

◆ 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 792 of file provide.cc.

◆ dequeueRequest()

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

Definition at line 808 of file provide.cc.

◆ queueItem()

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

Definition at line 753 of file provide.cc.

◆ dequeueItem()

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

Definition at line 759 of file provide.cc.

◆ nextMediaId()

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

Definition at line 771 of file provide.cc.

◆ addMedium() [1/2]

AttachedMediaInfo & zyppng::ProvidePrivate::addMedium ( zypp::proto::Capabilities::WorkerType  workerType,
const zypp::Url baseUrl,
ProvideMediaSpec spec 
)

◆ addMedium() [2/2]

AttachedMediaInfo & zyppng::ProvidePrivate::addMedium ( zypp::proto::Capabilities::WorkerType  workerType,
ProvideQueueWeakRef  backingQueue,
const std::string &  id,
const zypp::Url baseUrl,
ProvideMediaSpec spec 
)

Definition at line 785 of file provide.cc.

◆ effectiveScheme()

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

Definition at line 849 of file provide.cc.

◆ onPulseTimeout()

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

Definition at line 858 of file provide.cc.

◆ onQueueIdle()

void zyppng::ProvidePrivate::onQueueIdle ( )

Definition at line 886 of file provide.cc.

◆ onItemStateChanged()

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

Definition at line 899 of file provide.cc.

◆ schemeConfig()

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

Definition at line 712 of file provide.cc.

◆ addToFileCache()

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

Definition at line 727 of file provide.cc.

◆ isInCache()

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

Definition at line 747 of file provide.cc.

◆ isRunning()

bool zyppng::ProvidePrivate::isRunning ( ) const

Definition at line 844 of file provide.cc.

◆ workerPath()

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

Definition at line 830 of file provide.cc.

◆ queueName()

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

Definition at line 835 of file provide.cc.

◆ attachedMediaInfos()

std::vector< AttachedMediaInfo > & zyppng::ProvidePrivate::attachedMediaInfos ( )

Definition at line 707 of file provide.cc.

◆ items()

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

Definition at line 697 of file provide.cc.

◆ credManagerOptions()

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

Definition at line 702 of file provide.cc.

◆ log()

ProvideStatusRef zyppng::ProvidePrivate::log ( )
inline

Definition at line 98 of file provide_p.h.

◆ nextRequestId()

uint32_t zyppng::ProvidePrivate::nextRequestId ( )

Definition at line 917 of file provide.cc.

◆ doSchedule()

void zyppng::ProvidePrivate::doSchedule ( 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 104 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 105 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 111 of file provide_p.h.

◆ _isRunning

bool zyppng::ProvidePrivate::_isRunning = false
protected

Definition at line 123 of file provide_p.h.

◆ _isScheduling

bool zyppng::ProvidePrivate::_isScheduling = false
protected

Definition at line 124 of file provide_p.h.

◆ _pulseTimer

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

Definition at line 125 of file provide_p.h.

◆ _scheduleTrigger

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

Definition at line 126 of file provide_p.h.

◆ _workDir

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

Definition at line 127 of file provide_p.h.

◆ _items

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

Definition at line 129 of file provide_p.h.

◆ _nextRequestId

uint32_t zyppng::ProvidePrivate::_nextRequestId = 0
protected

Definition at line 130 of file provide_p.h.

◆ _queues

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

Definition at line 136 of file provide_p.h.

◆ _attachedMediaInfos

std::vector< AttachedMediaInfo > zyppng::ProvidePrivate::_attachedMediaInfos
protected

Definition at line 139 of file provide_p.h.

◆ _workerQueues

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

Definition at line 141 of file provide_p.h.

◆ _schemeConfigs

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

Definition at line 142 of file provide_p.h.

◆ _fileCache

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

Definition at line 148 of file provide_p.h.

◆ _workerPath

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

Definition at line 150 of file provide_p.h.

◆ _credManagerOptions

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

Definition at line 151 of file provide_p.h.

◆ _log

ProvideStatusRef zyppng::ProvidePrivate::_log
protected

Definition at line 153 of file provide_p.h.

◆ _sigIdle

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

Definition at line 154 of file provide_p.h.


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