11#include <zypp/base/Logger.h>
12#include <zypp/base/Gettext.h>
29 std::ifstream inp( path_r.
c_str() );
31 ERR <<
"Can't setup a SUSEMediaVerifier from file: " << path_r.
asString() << endl;
37 getline( inp, buffer );
43 explicit operator bool()
const
104 str::Format fmt {
_(
"Expected medium %1%/%2% identified by file '%3%' with content:") };
126 : _pimpl { new
Impl( path_r, mediaNr_r ) }
130 : _pimpl { new
Impl( *rhs._pimpl, mediaNr_r ) }
137 {
return _pimpl->smvData().valid(); }
140 {
return _pimpl->smvData()._mediaVendor; }
143 {
return _pimpl->smvData()._mediaIdent; }
146 {
return _pimpl->smvData()._totalMedia; }
149 {
return _pimpl->mediaNr(); }
163 SEC << smvData << endl;
168 DBG <<
"Skipping verification due to downloading medium" << std::endl;
197 ret = smvData.
matches( remote );
199 DBG <<
"expect: " << smvData <<
" medium " <<
mediaNr() << endl;
200 DBG <<
"remote: " << remote << endl;
void addHistory(const std::string &msg_r)
Add some message text to the history.
bool schemeIsDownloading() const
bool schemeIsVolatile() const
const char * c_str() const
String representation.
const std::string & asString() const
String representation.
String related utilities and Regular expression matching.
std::ostream & operator<<(std::ostream &str, const DeltaCandidates &obj)
std::string numstring(char n, int w=0)
TInt strtonum(const C_Str &str)
Parsing numbers from string.
Easy-to use interface to the ZYPP dependency resolver.
Data parsed from a media.1/media file.
SMVData(const Pathname &path_r)
bool valid() const
Data considered to be valid if we have vendor and ident.
media::MediaNr _totalMedia
std::ostream & operator<<(std::ostream &str, const SMVData &obj)
Stream output
bool matches(const SMVData &rhs) const
Whether rhs belongs to the same media set.
Convenient building of std::string via std::ostringstream Basically a std::ostringstream autoconverti...
#define ZYPP_RETHROW(EXCPT)
Drops a logline and rethrows, updating the CodeLocation.
#define ZYPP_CAUGHT(EXCPT)
Drops a logline telling the Exception was caught (in order to handle it).