libzypp: zyppng::AttachedMediaInfo Class Reference

libzypp 17.36.6

Public Member Functions | Public Attributes | Protected Member Functions | List of all members
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.
| ReferenceCounted (const ReferenceCounted &rhs)
| Copy ctor.
virtual | ~ReferenceCounted ()
| Dtor.
ReferenceCounted & | operator= (const ReferenceCounted &)
| Assignment.
unsigned | refCount () const
| Return reference counter value.
void | ref () const
| Add a reference.
void | unref () const
| Release a reference.

## 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.

## 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.
Protected Member Functions inherited from zypp::base::ReferenceCounted
virtual std::ostream & | dumpOn (std::ostream &str) const
| Overload to realize std::ostream & operator<<.
virtual void | unref_to (unsigned) const
| Trigger derived classes after refCount was decreased.

## 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.
static void | release (const ReferenceCounted *ptr_r)
| Called by zypp::intrusive_ptr to add a reference.
Related Symbols inherited from zypp::base::ReferenceCounted
void | intrusive_ptr_add_ref (const ReferenceCounted *ptr_r)
| intrusive_ptr hook to add_ref.
void | intrusive_ptr_release (const ReferenceCounted *ptr_r)
| intrusive_ptr hook to release.
std::ostream & | operator<< (std::ostream &str, const ReferenceCounted &obj)
| Stream output.

## 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:

- zypp-media/ng/private/attachedmediainfo_p.h
- zypp-media/ng/attachedmediainfo.cc