libzypp 17.31.23
|
Implementation of the traditional SUSE media verifier. More...
#include <repo/SUSEMediaVerifier.h>
Classes | |
class | Impl |
SUSEMediaVerifier::Impl. More... | |
Public Member Functions | |
SUSEMediaVerifier (const Pathname &path_r, media::MediaNr mediaNr_r=1) | |
Ctor creating a verifier by parsing media file. | |
SUSEMediaVerifier (const SUSEMediaVerifier &rhs, media::MediaNr mediaNr_r) | |
Ctor cloning a verifier for a different mediaNr_r. | |
~SUSEMediaVerifier () override | |
Dtor. | |
operator bool () const | |
Validate object in a boolean context: valid. | |
bool | valid () const |
Data considered to be valid if we have vendor and ident. | |
const std::string & | vendor () const |
Medias expected vendor string. | |
const std::string & | ident () const |
Medias expected ident string. | |
media::MediaNr | totalMedia () const |
The total number of media in this set (or 0 if not known). | |
media::MediaNr | mediaNr () const |
Media number expected by this verifier (starts with 1). | |
bool | isDesiredMedia (const media::MediaHandler &ref_r) const override |
Check if \ref_r accesses the desired media. | |
Public Member Functions inherited from zypp::media::MediaVerifierBase | |
MediaVerifierBase () | |
virtual | ~MediaVerifierBase () |
virtual std::string | info () const |
Returns a string with some info about the verifier. | |
virtual bool | isDesiredMedia (const MediaHandler &ref) const =0 |
Private Attributes | |
RW_pointer< Impl > | _pimpl |
Pointer to implementation. | |
Friends | |
std::ostream & | operator<< (std::ostream &str, const SUSEMediaVerifier &obj) |
Implementation class. | |
Implementation of the traditional SUSE media verifier.
Definition at line 27 of file SUSEMediaVerifier.h.
|
explicit |
Ctor creating a verifier by parsing media file.
path_r | Path to media.1/media kind file |
Definition at line 125 of file SUSEMediaVerifier.cc.
zypp::repo::SUSEMediaVerifier::SUSEMediaVerifier | ( | const SUSEMediaVerifier & | rhs, |
media::MediaNr | mediaNr_r | ||
) |
Ctor cloning a verifier for a different mediaNr_r.
path_r | Path to media.1/media kind file |
Definition at line 129 of file SUSEMediaVerifier.cc.
|
override |
Dtor.
Definition at line 133 of file SUSEMediaVerifier.cc.
|
inlineexplicit |
Validate object in a boolean context: valid.
Definition at line 47 of file SUSEMediaVerifier.h.
bool zypp::repo::SUSEMediaVerifier::valid | ( | ) | const |
Data considered to be valid if we have vendor and ident.
Definition at line 136 of file SUSEMediaVerifier.cc.
const std::string & zypp::repo::SUSEMediaVerifier::vendor | ( | ) | const |
Medias expected vendor string.
Definition at line 139 of file SUSEMediaVerifier.cc.
const std::string & zypp::repo::SUSEMediaVerifier::ident | ( | ) | const |
Medias expected ident string.
Definition at line 142 of file SUSEMediaVerifier.cc.
media::MediaNr zypp::repo::SUSEMediaVerifier::totalMedia | ( | ) | const |
The total number of media in this set (or 0 if not known).
Definition at line 145 of file SUSEMediaVerifier.cc.
media::MediaNr zypp::repo::SUSEMediaVerifier::mediaNr | ( | ) | const |
Media number expected by this verifier (starts with 1).
Definition at line 148 of file SUSEMediaVerifier.cc.
|
overridevirtual |
Check if \ref_r accesses the desired media.
The check is optimistic. If we can't get reliable data from the server, we nevertheless assume the media is valid. File downloads will fail if this was not true.
Implements zypp::media::MediaVerifierBase.
Definition at line 152 of file SUSEMediaVerifier.cc.
|
friend |
Implementation class.
Definition at line 205 of file SUSEMediaVerifier.cc.
|
private |
Pointer to implementation.
Definition at line 78 of file SUSEMediaVerifier.h.