libzypp 17.31.23
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
17#include <zypp/base/PtrTypes.h>
18
19namespace zypp
20{
21 namespace repo
22 {
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
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:
79 };
80
82 //std::ostream & operator<<( std::ostream & str, const SUSEMediaVerifier & obj );
83
84 } // namespace repo
85} // namespace zypp
86#endif
RepoManager implementation.
Abstract base class for 'physical' MediaHandler like MediaCD, etc.
Definition: MediaHandler.h:51
Interface to implement a media verifier.
Definition: MediaManager.h:48
Implementation of the traditional SUSE media verifier.
const std::string & ident() const
Medias expected ident string.
bool valid() const
Data considered to be valid if we have vendor and ident.
RW_pointer< Impl > _pimpl
Pointer to implementation.
media::MediaNr totalMedia() const
The total number of media in this set (or 0 if not known).
bool isDesiredMedia(const media::MediaHandler &ref_r) const override
Check if \ref_r accesses the desired media.
const std::string & vendor() const
Medias expected vendor string.
friend std::ostream & operator<<(std::ostream &str, const SUSEMediaVerifier &obj)
Implementation class.
media::MediaNr mediaNr() const
Media number expected by this verifier (starts with 1).
String related utilities and Regular expression matching.
unsigned int MediaNr
Definition: MediaManager.h:32
Easy-to use interface to the ZYPP dependency resolver.
Definition: CodePitfalls.doc:2
Wrapper for const correct access via Smart pointer types.
Definition: PtrTypes.h:286