libzypp: zypp-media/ng/mediaverifier.h Source File

libzypp 17.36.6

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
30 class MediaDataVerifier
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
zypp::filesystem::Pathname
Pathname.
Definition Pathname.h:47
zyppng::MediaDataVerifier::mediaIdent
virtual const std::string & mediaIdent() const =0
zyppng::MediaDataVerifier::clone
virtual MediaDataVerifierRef clone() const =0
zyppng::MediaDataVerifier::totalMedia
virtual uint totalMedia() const =0
zyppng::MediaDataVerifier::expectedAsUserString
virtual std::string expectedAsUserString(uint mediaNr=1) const =0
zyppng::MediaDataVerifier::valid
virtual bool valid() const =0
Data considered to be valid if we have vendor and ident.
zyppng::MediaDataVerifier::MediaDataVerifier
MediaDataVerifier() noexcept
Definition mediaverifier.cc:116
zyppng::MediaDataVerifier::createVerifier
static MediaDataVerifierRef createVerifier(const std::string &verifierType)
Definition mediaverifier.cc:122
zyppng::MediaDataVerifier::mediaFilePath
virtual zypp::Pathname mediaFilePath(uint mediaNr) const =0
zyppng::MediaDataVerifier::~MediaDataVerifier
virtual ~MediaDataVerifier()
Definition mediaverifier.cc:119
zyppng::MediaDataVerifier::mediaVendor
virtual const std::string & mediaVendor() const =0
zyppng::MediaDataVerifier::load
virtual bool load(const zypp::Pathname &data)=0
zyppng::MediaDataVerifier::toStream
virtual std::ostream & toStream(std::ostream &str) const =0
zyppng::MediaDataVerifier::loadFromMedium
virtual bool loadFromMedium(const zypp::Pathname &data, uint mediaNr)=0
zyppng::MediaDataVerifier::matches
virtual bool matches(const MediaDataVerifierRef &rhs) const =0
Whether rhs belongs to the same media set.
str
String related utilities and Regular expression matching.
zypp::filesystem
Types and functions for filesystem operations.
Definition Glob.cc:24
zypp
Easy-to use interface to the ZYPP dependency resolver.
Definition Application.cc:20
zypp::operator<<
std::ostream & operator<<(std::ostream &str, const SerialNumber &obj)
Definition SerialNumber.cc:52
zyppng
Definition MediaCurl2.h:22