libzypp: zypp::repo::SUSEMediaVerifier Class Reference

libzypp 17.38.8

zypp::repo::SUSEMediaVerifier Class Reference

Implementation of the traditional SUSE media verifier. More...

`#include <zypp/repo/SUSEMediaVerifier.h>`

Inheritance diagram for zypp::repo::SUSEMediaVerifier:

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

## Private Attributes
RW_pointer< Impl > | _pimpl
| Pointer to implementation.

## Friends
std::ostream & | operator<< (std::ostream &str, const SUSEMediaVerifier &obj)
| Implementation class.

## Detailed Description

Implementation of the traditional SUSE media verifier.

Definition at line 27 of file SUSEMediaVerifier.h.

## Constructor & Destructor Documentation

## ◆ SUSEMediaVerifier() [1/2]

zypp::repo::SUSEMediaVerifier::SUSEMediaVerifier | ( | const Pathname & | path_r,
|  | media::MediaNr | mediaNr_r = 1 )
| explicit

Ctor creating a verifier by parsing media file.

Parameters

  path_r | Path to media.1/media kind file

Definition at line 125 of file SUSEMediaVerifier.cc.

## ◆ SUSEMediaVerifier() [2/2]

zypp::repo::SUSEMediaVerifier::SUSEMediaVerifier | ( | const SUSEMediaVerifier & | rhs,
|  | media::MediaNr | mediaNr_r )

Ctor cloning a verifier for a different mediaNr_r.

Parameters

  path_r | Path to media.1/media kind file

Definition at line 129 of file SUSEMediaVerifier.cc.

## ◆ ~SUSEMediaVerifier()

zypp::repo::SUSEMediaVerifier::~SUSEMediaVerifier | ( |  | ) |
| override

Dtor.

Definition at line 133 of file SUSEMediaVerifier.cc.

## Member Function Documentation

## ◆ operator bool()

zypp::repo::SUSEMediaVerifier::operator bool | ( |  | ) | const
| inlineexplicit

Validate object in a boolean context: valid.

Definition at line 47 of file SUSEMediaVerifier.h.

## ◆ valid()

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.

## ◆ vendor()

const std::string & zypp::repo::SUSEMediaVerifier::vendor | ( |  | ) | const

Medias expected vendor string.

Definition at line 139 of file SUSEMediaVerifier.cc.

## ◆ ident()

const std::string & zypp::repo::SUSEMediaVerifier::ident | ( |  | ) | const

Medias expected ident string.

Definition at line 142 of file SUSEMediaVerifier.cc.

## ◆ totalMedia()

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.

## ◆ mediaNr()

media::MediaNr zypp::repo::SUSEMediaVerifier::mediaNr | ( |  | ) | const

Media number expected by this verifier (starts with 1).

Definition at line 148 of file SUSEMediaVerifier.cc.

## ◆ isDesiredMedia()

bool zypp::repo::SUSEMediaVerifier::isDesiredMedia | ( | const media::MediaHandler & | ref_r | ) | const
| 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.

## Friends And Related Symbol Documentation

## ◆ operator<<

std::ostream & operator<< | ( | std::ostream & | str,
|  | const SUSEMediaVerifier & | obj )
| friend

Implementation class.

Definition at line 205 of file SUSEMediaVerifier.cc.

## Member Data Documentation

## ◆ _pimpl

RW_pointer<Impl> zypp::repo::SUSEMediaVerifier::_pimpl
| private

Pointer to implementation.

Definition at line 78 of file SUSEMediaVerifier.h.

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

- zypp/repo/SUSEMediaVerifier.h
- zypp/repo/SUSEMediaVerifier.cc