libzypp 17.31.23
mediaverifier.h
Go to the documentation of this file.
1/*---------------------------------------------------------------------\
2| ____ _ __ __ ___ |
3| |__ / \ / / . \ . \ |
4| / / \ V /| _/ _/ |
5| / /__ | | | | | | |
6| /_____||_| |_| |_| |
7| |
8\---------------------------------------------------------------------*/
9#ifndef ZYPP_MEDIA_NG_MEDIAVERIFIER_H_INCLUDED
10#define ZYPP_MEDIA_NG_MEDIAVERIFIER_H_INCLUDED
11
12#include <string>
13#include <zypp-core/zyppng/core/ByteArray>
14#include <zypp-media/ng/ProvideFwd>
15
16namespace zypp {
17 namespace filesystem {
18 class Pathname;
19 }
20 using filesystem::Pathname;
21}
22
23namespace zyppng {
24
31 {
32 public:
33
34 MediaDataVerifier() noexcept;
35 virtual ~MediaDataVerifier();
36
37 static MediaDataVerifierRef createVerifier ( const std::string &verifierType );
38
40 virtual bool valid() const = 0;
41
43 virtual bool matches( const MediaDataVerifierRef & rhs ) const = 0;
44
48 virtual const std::string &mediaVendor() const = 0;
49
53 virtual const std::string &mediaIdent() const = 0;
54
58 virtual uint totalMedia() const = 0;
59
63 virtual std::ostream & toStream ( std::ostream & str ) const = 0;
64
69 virtual bool load( const zypp::Pathname &data ) = 0;
70
75 virtual bool loadFromMedium( const zypp::Pathname &data, uint mediaNr ) = 0;
76
80 virtual zypp::Pathname mediaFilePath ( uint mediaNr ) const = 0;
81
85 virtual MediaDataVerifierRef clone () const = 0;
86
90 virtual std::string expectedAsUserString( uint mediaNr = 1 ) const = 0;
91 };
92
94 std::ostream & operator<<( std::ostream & str, const MediaDataVerifierRef & obj );
95
96
97
98}
99
100#endif
virtual const std::string & mediaIdent() const =0
virtual MediaDataVerifierRef clone() const =0
virtual uint totalMedia() const =0
virtual std::string expectedAsUserString(uint mediaNr=1) const =0
virtual bool valid() const =0
Data considered to be valid if we have vendor and ident.
static MediaDataVerifierRef createVerifier(const std::string &verifierType)
virtual zypp::Pathname mediaFilePath(uint mediaNr) const =0
virtual const std::string & mediaVendor() const =0
virtual bool load(const zypp::Pathname &data)=0
virtual std::ostream & toStream(std::ostream &str) const =0
virtual bool loadFromMedium(const zypp::Pathname &data, uint mediaNr)=0
virtual bool matches(const MediaDataVerifierRef &rhs) const =0
Whether rhs belongs to the same media set.
String related utilities and Regular expression matching.
Easy-to use interface to the ZYPP dependency resolver.
Definition: CodePitfalls.doc:2
std::ostream & operator<<(std::ostream &str, const MediaDataVerifierRef &obj)