12 #ifndef ZYPP_MEDIAPRODUCTS_H_
13 #define ZYPP_MEDIAPRODUCTS_H_
38 MediaProductEntry(
const Pathname & dir_r =
"/",
const std::string & name_r = std::string() )
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>
95 Pathname products_file = Pathname(
"media.1/products");
99 products_file = media_mgr.
localPath (
id, products_file);
104 MIL <<
"No products description found on the Url" << std::endl;
#define ZYPP_THROW(EXCPT)
Drops a logline and throws the Exception.
Represents an available product in media.
std::string stripFirstWord(std::string &line, const bool ltrim_first)
std::set< MediaProductEntry > MediaProductSet
A set of available products in media.
std::string getline(std::istream &str, const Trim trim_r)
Return stream content up to (but not returning) the next newline.
static void scanProductsFile(const Pathname &file_r, TOutputIterator result)
FIXME: add a comment here...
#define ZYPP_CAUGHT(EXCPT)
Drops a logline telling the Exception was caught (in order to handle it).
Base class for Exception.
MediaProductEntry(const Pathname &dir_r="/", const std::string &name_r=std::string())
Ctor.
bool operator<(const MediaProductEntry &rhs) const
void productsInMedia(const Url &url_r, TOutputIterator result)
Available products in a url location.