12#ifndef ZYPP_MEDIAPRODUCTS_H_
13#define ZYPP_MEDIAPRODUCTS_H_
19#include <zypp/base/Logger.h>
21#include <zypp-core/base/UserRequestException>
23#include <zypp-core/ui/ProgressData>
46 return ( res < 0 || ( res == 0 &&
_dir < rhs.
_dir ) );
58 template <
class TOutputIterator>
61 std::ifstream pfile( file_r.
asString().c_str() );
62 while ( pfile.good() ) {
66 ERR <<
"Error parsing " << file_r << std::endl;
88 template <
class TOutputIterator>
99 products_file = media_mgr.
localPath (
id, products_file);
104 MIL <<
"No products description found on the Url" << std::endl;
Base class for Exception.
const std::string & asString() const
String representation.
std::string stripFirstWord(std::string &line, const bool ltrim_first)
std::string getline(std::istream &str, const Trim trim_r)
Return stream content up to (but not returning) the next newline.
Easy-to use interface to the ZYPP dependency resolver.
std::set< MediaProductEntry > MediaProductSet
A set of available products in media.
static void scanProductsFile(const Pathname &file_r, TOutputIterator result)
FIXME: add a comment here...
void productsInMedia(const Url &url_r, TOutputIterator result)
Available products in a url location.
Represents an available product in media.
bool operator<(const MediaProductEntry &rhs) const
MediaProductEntry(const Pathname &dir_r="/", const std::string &name_r=std::string())
Ctor.
#define ZYPP_CAUGHT(EXCPT)
Drops a logline telling the Exception was caught (in order to handle it).
#define ZYPP_THROW(EXCPT)
Drops a logline and throws the Exception.