libzypp 17.31.23
zyppng::SuseMediaDataVerifier Class Reference
Inheritance diagram for zyppng::SuseMediaDataVerifier:

Public Member Functions

bool valid () const override
 Data considered to be valid if we have vendor and ident.
 
bool matches (const MediaDataVerifierRef &rhs) const override
 Whether rhs belongs to the same media set.
 
const std::string & mediaVendor () const override
 
const std::string & mediaIdent () const override
 
uint totalMedia () const override
 
std::ostream & toStream (std::ostream &str) const override
 
bool load (const zypp::Pathname &data) override
 
bool loadFromMedium (const zypp::filesystem::Pathname &data, uint expectedMediaNr) override
 
zypp::filesystem::Pathname mediaFilePath (uint mediaNr) const override
 
MediaDataVerifierRef clone () const override
 
std::string expectedAsUserString (uint mediaNr) const override
 
- Public Member Functions inherited from zyppng::MediaDataVerifier
 MediaDataVerifier () noexcept
 
virtual ~MediaDataVerifier ()
 
virtual bool valid () const =0
 Data considered to be valid if we have vendor and ident.
 
virtual bool matches (const MediaDataVerifierRef &rhs) const =0
 Whether rhs belongs to the same media set.
 
virtual const std::string & mediaVendor () const =0
 
virtual const std::string & mediaIdent () const =0
 
virtual uint totalMedia () const =0
 
virtual std::ostream & toStream (std::ostream &str) const =0
 
virtual bool load (const zypp::Pathname &data)=0
 
virtual bool loadFromMedium (const zypp::Pathname &data, uint mediaNr)=0
 
virtual zypp::Pathname mediaFilePath (uint mediaNr) const =0
 
virtual MediaDataVerifierRef clone () const =0
 
virtual std::string expectedAsUserString (uint mediaNr=1) const =0
 

Private Attributes

std::string _mediaVendor
 
std::string _mediaIdent
 
uint _totalMedia = 0
 

Additional Inherited Members

- Static Public Member Functions inherited from zyppng::MediaDataVerifier
static MediaDataVerifierRef createVerifier (const std::string &verifierType)
 

Detailed Description

Definition at line 22 of file mediaverifier.cc.

Member Function Documentation

◆ valid()

bool zyppng::SuseMediaDataVerifier::valid ( ) const
overridevirtual

Data considered to be valid if we have vendor and ident.

Implements zyppng::MediaDataVerifier.

Definition at line 55 of file mediaverifier.cc.

◆ matches()

bool zyppng::SuseMediaDataVerifier::matches ( const MediaDataVerifierRef &  rhs) const
overridevirtual

Whether rhs belongs to the same media set.

Implements zyppng::MediaDataVerifier.

Definition at line 58 of file mediaverifier.cc.

◆ mediaVendor()

const std::string & zyppng::SuseMediaDataVerifier::mediaVendor ( ) const
overridevirtual

Returns the media vendor string

Implements zyppng::MediaDataVerifier.

Definition at line 96 of file mediaverifier.cc.

◆ mediaIdent()

const std::string & zyppng::SuseMediaDataVerifier::mediaIdent ( ) const
overridevirtual

Returns the media ident string

Implements zyppng::MediaDataVerifier.

Definition at line 91 of file mediaverifier.cc.

◆ totalMedia()

uint zyppng::SuseMediaDataVerifier::totalMedia ( ) const
overridevirtual

Returns the total number of mediums in this set

Implements zyppng::MediaDataVerifier.

Definition at line 64 of file mediaverifier.cc.

◆ toStream()

std::ostream & zyppng::SuseMediaDataVerifier::toStream ( std::ostream &  str) const
overridevirtual

Writes the mediaverifier data to stream

Implements zyppng::MediaDataVerifier.

Definition at line 69 of file mediaverifier.cc.

◆ load()

bool zyppng::SuseMediaDataVerifier::load ( const zypp::Pathname data)
overridevirtual

Load verification information from a given file, all media data must be storeable in a file so that the controller can store a copy of it somewhere.

Implements zyppng::MediaDataVerifier.

Definition at line 74 of file mediaverifier.cc.

◆ loadFromMedium()

bool zyppng::SuseMediaDataVerifier::loadFromMedium ( const zypp::filesystem::Pathname data,
uint  mediaNr 
)
overridevirtual

Generates the file information from a mounted medium, the path given in data is the mountpoint of the device.

Implements zyppng::MediaDataVerifier.

Definition at line 50 of file mediaverifier.cc.

◆ mediaFilePath()

zypp::Pathname zyppng::SuseMediaDataVerifier::mediaFilePath ( uint  mediaNr) const
overridevirtual

Returns the path of the media identifier file on the medium

Implements zyppng::MediaDataVerifier.

Definition at line 44 of file mediaverifier.cc.

◆ clone()

MediaDataVerifierRef zyppng::SuseMediaDataVerifier::clone ( ) const
overridevirtual

Clones this and returns a reference to the clone

Implements zyppng::MediaDataVerifier.

Definition at line 101 of file mediaverifier.cc.

◆ expectedAsUserString()

std::string zyppng::SuseMediaDataVerifier::expectedAsUserString ( uint  mediaNr) const
overridevirtual

Returns a error string describing the expected medium.

Implements zyppng::MediaDataVerifier.

Definition at line 106 of file mediaverifier.cc.

Member Data Documentation

◆ _mediaVendor

std::string zyppng::SuseMediaDataVerifier::_mediaVendor
private

Definition at line 39 of file mediaverifier.cc.

◆ _mediaIdent

std::string zyppng::SuseMediaDataVerifier::_mediaIdent
private

Definition at line 40 of file mediaverifier.cc.

◆ _totalMedia

uint zyppng::SuseMediaDataVerifier::_totalMedia = 0
private

Definition at line 41 of file mediaverifier.cc.


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