libzypp  17.35.14
zyppng::AttachedMediaInfo Class Reference

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

Inheritance diagram for zyppng::AttachedMediaInfo:

Public Member Functions

 AttachedMediaInfo (const std::string &id, ProvideQueue::Config::WorkerType workerType, const zypp::Url &baseUrl, ProvideMediaSpec &spec)
 
 AttachedMediaInfo (const std::string &id, ProvideQueueWeakRef backingQueue, ProvideQueue::Config::WorkerType workerType, const zypp::Url &baseUrl, const ProvideMediaSpec &mediaSpec, const std::optional< zypp::Pathname > &mnt={})
 
void setName (std::string &&name)
 
const std::string & name () const
 
bool isSameMedium (const std::vector< zypp::Url > &urls, const ProvideMediaSpec &spec)
 
- Public Member Functions inherited from zypp::base::ReferenceCounted
 ReferenceCounted ()
 Default ctor. More...
 
 ReferenceCounted (const ReferenceCounted &rhs)
 Copy ctor. More...
 
virtual ~ReferenceCounted ()
 Dtor. More...
 
ReferenceCountedoperator= (const ReferenceCounted &)
 Assignment. More...
 
unsigned refCount () const
 Return reference counter value. More...
 
void ref () const
 Add a reference. More...
 
void unref () const
 Release a reference. More...
 

Public Attributes

std::string _name
 
ProvideQueueWeakRef _backingQueue
 
ProvideQueue::Config::WorkerType _workerType
 
zypp::Url _attachedUrl
 
ProvideMediaSpec _spec
 
std::optional< zypp::Pathname_localMountPoint
 
std::optional< std::chrono::steady_clock::time_point > _idleSince
 Set if the medium is idle. More...
 

Protected Member Functions

void unref_to (unsigned int refCnt) const override
 
void ref_to (unsigned refCnt) const override
 Trigger derived classes after refCount was increased. More...
 
- Protected Member Functions inherited from zypp::base::ReferenceCounted
virtual std::ostream & dumpOn (std::ostream &str) const
 Overload to realize std::ostream & operator<<. More...
 
virtual void unref_to (unsigned) const
 Trigger derived classes after refCount was decreased. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from zypp::base::ReferenceCounted
static void add_ref (const ReferenceCounted *ptr_r)
 Called by zypp::intrusive_ptr to add a reference. More...
 
static void release (const ReferenceCounted *ptr_r)
 Called by zypp::intrusive_ptr to add a reference. More...
 

Detailed Description

Definition at line 31 of file attachedmediainfo_p.h.

Constructor & Destructor Documentation

◆ AttachedMediaInfo() [1/2]

zyppng::AttachedMediaInfo::AttachedMediaInfo ( const std::string &  id,
ProvideQueue::Config::WorkerType  workerType,
const zypp::Url baseUrl,
ProvideMediaSpec spec 
)

Definition at line 17 of file attachedmediainfo.cc.

◆ AttachedMediaInfo() [2/2]

zyppng::AttachedMediaInfo::AttachedMediaInfo ( const std::string &  id,
ProvideQueueWeakRef  backingQueue,
ProvideQueue::Config::WorkerType  workerType,
const zypp::Url baseUrl,
const ProvideMediaSpec mediaSpec,
const std::optional< zypp::Pathname > &  mnt = {} 
)

Definition at line 21 of file attachedmediainfo.cc.

Member Function Documentation

◆ unref_to()

void zyppng::AttachedMediaInfo::unref_to ( unsigned int  refCnt) const
overrideprotected

Definition at line 43 of file attachedmediainfo.cc.

◆ ref_to()

void zyppng::AttachedMediaInfo::ref_to ( unsigned  ) const
overrideprotectedvirtual

Trigger derived classes after refCount was increased.

Reimplemented from zypp::base::ReferenceCounted.

Definition at line 49 of file attachedmediainfo.cc.

◆ setName()

void zyppng::AttachedMediaInfo::setName ( std::string &&  name)

Definition at line 33 of file attachedmediainfo.cc.

◆ name()

const std::string & zyppng::AttachedMediaInfo::name ( ) const

Definition at line 38 of file attachedmediainfo.cc.

◆ isSameMedium()

bool zyppng::AttachedMediaInfo::isSameMedium ( const std::vector< zypp::Url > &  urls,
const ProvideMediaSpec spec 
)

Returns true if other requests the same medium as this instance

Definition at line 52 of file attachedmediainfo.cc.

Member Data Documentation

◆ _name

std::string zyppng::AttachedMediaInfo::_name

Definition at line 49 of file attachedmediainfo_p.h.

◆ _backingQueue

ProvideQueueWeakRef zyppng::AttachedMediaInfo::_backingQueue

Definition at line 50 of file attachedmediainfo_p.h.

◆ _workerType

ProvideQueue::Config::WorkerType zyppng::AttachedMediaInfo::_workerType

Definition at line 51 of file attachedmediainfo_p.h.

◆ _attachedUrl

zypp::Url zyppng::AttachedMediaInfo::_attachedUrl

Definition at line 52 of file attachedmediainfo_p.h.

◆ _spec

ProvideMediaSpec zyppng::AttachedMediaInfo::_spec

Definition at line 53 of file attachedmediainfo_p.h.

◆ _localMountPoint

std::optional<zypp::Pathname> zyppng::AttachedMediaInfo::_localMountPoint

Definition at line 54 of file attachedmediainfo_p.h.

◆ _idleSince

std::optional<std::chrono::steady_clock::time_point> zyppng::AttachedMediaInfo::_idleSince
mutable

Set if the medium is idle.

Definition at line 55 of file attachedmediainfo_p.h.


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