libzypp: zypp/repo/SUSEMediaVerifier.h Source File

libzypp 17.38.11

SUSEMediaVerifier.h
Go to the documentation of this file.
1/*---------------------------------------------------------------------\
2| ____ _ __ __ ___ |
3| |__ / \ / / . \ . \ |
4| / / \ V /| _/ _/ |
5| / /__ | | | | | | |
6| /_____||_| |_| |_| |
7| |
8\---------------------------------------------------------------------*/
9
10#ifndef ZYPP_SUSE_MEDIAVERIFIER_H
11#define ZYPP_SUSE_MEDIAVERIFIER_H
12
13#include <iosfwd>
14
15#include <zypp/media/MediaManager.h>
16#include <zypp/media/MediaHandler.h>
17#include <zypp-core/base/PtrTypes.h>
18
19namespace zypp
20{
21 namespace repo
22 {
27 class SUSEMediaVerifier : public media::MediaVerifierBase
28 {
29 public:
34 explicit SUSEMediaVerifier( const Pathname & path_r, media::MediaNr mediaNr_r = 1 );
35
40 SUSEMediaVerifier( const SUSEMediaVerifier & rhs, media::MediaNr mediaNr_r );
41
43 ~SUSEMediaVerifier() override;
44
45 public:
47 explicit operator bool() const
48 { return valid(); }
49
51 bool valid() const;
52
54 const std::string & vendor() const;
55
57 const std::string & ident() const;
58
60 media::MediaNr totalMedia() const;
61
63 media::MediaNr mediaNr() const;
64
65 public:
72 bool isDesiredMedia( const media::MediaHandler & ref_r ) const override;
73
74 public:
75 class Impl;
76 friend std::ostream & operator<<( std::ostream & str, const SUSEMediaVerifier & obj );
77 private:
78 RW_pointer<Impl> _pimpl;
79 };
80
82 //std::ostream & operator<<( std::ostream & str, const SUSEMediaVerifier & obj );
83
84 } // namespace repo
85} // namespace zypp
86#endif
MediaHandler.h
MediaManager.h
PtrTypes.h
Impl
bool
zypp::filesystem::Pathname
Pathname.
Definition Pathname.h:48
zypp::media::MediaHandler
Abstract base class for 'physical' MediaHandler like MediaCD, etc.
Definition MediaHandler.h:50
zypp::media::MediaVerifierBase
Interface to implement a media verifier.
Definition MediaManager.h:48
zypp::repo::SUSEMediaVerifier
Implementation of the traditional SUSE media verifier.
Definition SUSEMediaVerifier.h:28
zypp::repo::SUSEMediaVerifier::ident
const std::string & ident() const
Medias expected ident string.
Definition SUSEMediaVerifier.cc:142
zypp::repo::SUSEMediaVerifier::SUSEMediaVerifier
SUSEMediaVerifier(const Pathname &path_r, media::MediaNr mediaNr_r=1)
Ctor creating a verifier by parsing media file.
Definition SUSEMediaVerifier.cc:125
zypp::repo::SUSEMediaVerifier::valid
bool valid() const
Data considered to be valid if we have vendor and ident.
Definition SUSEMediaVerifier.cc:136
zypp::repo::SUSEMediaVerifier::_pimpl
RW_pointer< Impl > _pimpl
Pointer to implementation.
Definition SUSEMediaVerifier.h:78
zypp::repo::SUSEMediaVerifier::totalMedia
media::MediaNr totalMedia() const
The total number of media in this set (or 0 if not known).
Definition SUSEMediaVerifier.cc:145
zypp::repo::SUSEMediaVerifier::isDesiredMedia
bool isDesiredMedia(const media::MediaHandler &ref_r) const override
Check if \ref_r accesses the desired media.
Definition SUSEMediaVerifier.cc:152
zypp::repo::SUSEMediaVerifier::vendor
const std::string & vendor() const
Medias expected vendor string.
Definition SUSEMediaVerifier.cc:139
zypp::repo::SUSEMediaVerifier::operator<<
friend std::ostream & operator<<(std::ostream &str, const SUSEMediaVerifier &obj)
Implementation class.
Definition SUSEMediaVerifier.cc:205
zypp::repo::SUSEMediaVerifier::~SUSEMediaVerifier
~SUSEMediaVerifier() override
Dtor.
Definition SUSEMediaVerifier.cc:133
zypp::repo::SUSEMediaVerifier::mediaNr
media::MediaNr mediaNr() const
Media number expected by this verifier (starts with 1).
Definition SUSEMediaVerifier.cc:148
str
String related utilities and Regular expression matching.
zypp::media::MediaNr
unsigned int MediaNr
Definition MediaManager.h:32
zypp::repo
Definition DeltaCandidates.cc:30
zypp
Easy-to use interface to the ZYPP dependency resolver.
Definition CodePitfalls.doc:2
zypp::RW_pointer
Wrapper for const correct access via Smart pointer types.
Definition PtrTypes.h:293