13#include <zypp/base/Logger.h>
14#include <zypp/base/Exception.h>
17#include <zypp/PathInfo.h>
50 : _pimpl( allocated_r ? allocated_r : new
Impl )
87 :
_pimpl( allocated_r ? allocated_r : new
Impl )
117 str << endl <<
" " << *it;
129 (obj.
notify() ?
"notify" :
"noNotify") );
170 (*this)[
"upgrades"][
"upgrade"]
195 if ( store_r.empty() ||
_tlocale.empty() )
219 MIL <<
"+++" << input_r << endl;
229 rootNode.
take( reader );
236 ERR <<
"---" << ret <<
" - " << input_r << endl;
245 MIL <<
"---" << ret <<
" - " << input_r << endl;
253 std::list<Pathname> retlist;
257 WAR <<
"scanDir " << dir_r <<
" failed (" << res <<
")" << endl;
262 for_( it, retlist.begin(), retlist.end() )
274 if ( !
PathInfo( file_r ).isFile() )
276 WAR <<
"scanFile " <<
PathInfo( file_r ) <<
" is not a file." << endl;
const char * c_str() const
This is an overloaded member function, provided for convenience. It differs from the above function o...
Integral type with defined initial value when default constructed.
Edition represents [epoch:]version[-release]
Base class for Exception.
const char * c_str() const
Access to the sat-pools string space.
const char * c_str() const
Conversion to const char *
Wrapper class for stat/lstat.
Data returned by ProductFileReader.
std::string summary() const
ProductFileData(Impl *allocated_r=0)
Ctor takes ownership of allocated_r.
const Upgrades & upgrades() const
std::string registerRelease() const
std::string updaterepokey() const
std::string shortName() const
std::string productline() const
std::vector< Upgrade > Upgrades
std::string registerFlavor() const
std::string registerTarget() const
RWCOW_pointer< Impl > _pimpl
Parser for /etc/products.d enries (just relevant entires).
static bool scanDir(const Consumer &consumer_r, const Pathname &dir_r)
Parse all files (no symlinks) in dir_r and call consumer_r for each ProductFileData parsed.
bool parse(const InputStream &input_r=InputStream()) const
Parse the input stream and call _consumer for each parsed section.
static ProductFileData scanFile(const Pathname &file_r)
Parse one file (or symlink) and return the ProductFileData parsed.
function< bool(const ProductFileData &)> Consumer
Callback being invoked for each ProductFileData parsed.
xmlTextReader based interface to Reader's current node.
Define a xml node structure to parse.
void setConsumer(const shared_ptr< ParseDefConsume > &target_r)
Set data consumer.
void take(Reader &reader_r)
Parse the node.
ParseDef(const std::string &name_r, Mode mode_r)
xmlTextReader based interface to iterate xml streams.
String related utilities and Regular expression matching.
int readdir(std::list< std::string > &retlist_r, const Pathname &path_r, bool dots_r)
Return content of directory via retlist.
GetFirst< Tp > getFirst(Tp &result_r)
Convenience function for creating GetFirst.
std::ostream & operator<<(std::ostream &str, const ProductFileData &obj)
std::string form(const char *format,...) __attribute__((format(printf
Printf style construction of std::string.
Easy-to use interface to the ZYPP dependency resolver.
std::string _updaterepokey
std::string _registerRelease
std::string _registerFlavor
std::string _registerTarget
DefaultIntegral< bool, false > _notify
std::string summary() const
std::string product() const
std::string status() const
Upgrade(Impl *allocated_r=0)
Ctor takes ownership of allocated_r.
std::string repository() const
ProductNode(ProductFileData::Impl &pdata_r)
void doneLocalizedDefault(const xml::Node &_node, std::string &store_r)
collect localized data
void done(const xml::Node &_node)
finally
void doneUpgrade(const xml::Node &_node)
collect _upgrade
ProductFileData::Upgrade::Impl _upgrade
ProductFileData::Impl & _pdata
#define for_(IT, BEG, END)
Convenient for-loops using iterator.