libzypp 17.37.10

zyppng::MediaDataVerifier Class Referenceabstract

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

Inheritance diagram for zyppng::MediaDataVerifier:

## Public Member Functions
| 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

## Static Public Member Functions
static MediaDataVerifierRef | createVerifier (const std::string &verifierType)

## Detailed Description

The MediaDataVerifier is used to verify if a specific medium, e.g. a DVD, is the medium we actually need. Each verifier is defined by a verifier type and the data that is used to validate against the medium.

Definition at line 30 of file mediaverifier.h.

## Constructor & Destructor Documentation

## ◆ MediaDataVerifier()

zyppng::MediaDataVerifier::MediaDataVerifier | ( |  | ) |
| noexcept

Definition at line 116 of file mediaverifier.cc.

## ◆ ~MediaDataVerifier()

zyppng::MediaDataVerifier::~MediaDataVerifier | ( |  | ) |
| virtual

Definition at line 119 of file mediaverifier.cc.

## Member Function Documentation

## ◆ createVerifier()

MediaDataVerifierRef zyppng::MediaDataVerifier::createVerifier | ( | const std::string & | verifierType | ) |
| static

Definition at line 122 of file mediaverifier.cc.

## ◆ valid()

virtual bool zyppng::MediaDataVerifier::valid | ( |  | ) | const
| pure virtual

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

Implemented in zyppng::SuseMediaDataVerifier.

## ◆ matches()

virtual bool zyppng::MediaDataVerifier::matches | ( | const MediaDataVerifierRef & | rhs | ) | const
| pure virtual

Whether rhs belongs to the same media set.

Implemented in zyppng::SuseMediaDataVerifier.

## ◆ mediaVendor()

virtual const std::string & zyppng::MediaDataVerifier::mediaVendor | ( |  | ) | const
| pure virtual

Returns the media vendor string

Implemented in zyppng::SuseMediaDataVerifier.

## ◆ mediaIdent()

virtual const std::string & zyppng::MediaDataVerifier::mediaIdent | ( |  | ) | const
| pure virtual

Returns the media ident string

Implemented in zyppng::SuseMediaDataVerifier.

## ◆ totalMedia()

virtual uint zyppng::MediaDataVerifier::totalMedia | ( |  | ) | const
| pure virtual

Returns the total number of mediums in this set

Implemented in zyppng::SuseMediaDataVerifier.

## ◆ toStream()

virtual std::ostream & zyppng::MediaDataVerifier::toStream | ( | std::ostream & | str | ) | const
| pure virtual

Writes the mediaverifier data to stream

Implemented in zyppng::SuseMediaDataVerifier.

## ◆ load()

virtual bool zyppng::MediaDataVerifier::load | ( | const zypp::Pathname & | data | ) |
| pure virtual

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.

Implemented in zyppng::SuseMediaDataVerifier.

## ◆ loadFromMedium()

virtual bool zyppng::MediaDataVerifier::loadFromMedium | ( | const zypp::Pathname & | data,
|  | uint | mediaNr )
| pure virtual

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

Implemented in zyppng::SuseMediaDataVerifier.

## ◆ mediaFilePath()

virtual zypp::Pathname zyppng::MediaDataVerifier::mediaFilePath | ( | uint | mediaNr | ) | const
| pure virtual

Returns the path of the media identifier file on the medium

Implemented in zyppng::SuseMediaDataVerifier.

## ◆ clone()

virtual MediaDataVerifierRef zyppng::MediaDataVerifier::clone | ( |  | ) | const
| pure virtual

Clones this and returns a reference to the clone

Implemented in zyppng::SuseMediaDataVerifier.

## ◆ expectedAsUserString()

virtual std::string zyppng::MediaDataVerifier::expectedAsUserString | ( | uint | mediaNr = 1 | ) | const
| pure virtual

Returns a error string describing the expected medium.

Implemented in zyppng::SuseMediaDataVerifier.

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

- zypp-media/ng/mediaverifier.h
- zypp-media/ng/mediaverifier.cc