29 #undef ZYPP_BASE_LOGGER_LOGGROUP
30 #define ZYPP_BASE_LOGGER_LOGGROUP "parser"
33 using namespace zypp::xml;
58 bool consumeNode(
Reader & reader_r );
73 MIL <<
"Reading " << is.
path() << endl;
92 if ( reader_r->
nodeType() == XML_READER_TYPE_ELEMENT )
95 if ( reader_r->
name() ==
"repoindex" )
101 if ( reader_r->
name() ==
"repo" )
125 if (url_s.empty() && path_s.empty())
128 else if (url_s.empty())
129 info.
setPath(Pathname(
string(
"/repo/") + path_s));
130 else if (path_s.empty())
194 : _pimpl(new
Impl(is, callback))
function< bool(const RepoInfo &)> ProcessResource
Callback definition.
ProcessResource _callback
Function for processing collected data.
void setAutorefresh(bool autorefresh)
enable or disable autorefresh
void setPriority(unsigned newval_r)
Set repository priority for solver.
const xmlChar * get() const
Access the xmlChar *.
void setEnabled(bool enabled)
enable or disable the repository
void setAlias(const std::string &alias)
set the repository alias
What is known about a repository.
void setBaseUrl(const Url &url)
Clears current base URL list and adds url.
Interface of repoindex.xml file reader.
RepoindexFileReader(const zypp::Pathname &repoindexFile, const ProcessResource &callback)
CTOR.
boost::noncopyable NonCopyable
Ensure derived classes cannot be copied.
~RepoindexFileReader()
DTOR.
void setPath(const Pathname &path)
set the product path.
void setType(const repo::RepoType &t)
set the repository type
XmlString name() const
The qualified name of the node, equal to Prefix :LocalName.
#define _(MSG)
Return translated text.
std::string asString() const
Explicit conversion to std::string.
bool strToTrue(const C_Str &str)
Parsing boolean from string.
std::string form(const char *format,...)
Printf style construction of std::string.
XmlString getAttribute(const char *name_r) const
Provides a copy of the attribute value with the specified qualified name.
void setTargetDistribution(const std::string &targetDistribution)
Sets the distribution for which is this repository meant.
bool foreachNode(ProcessNode fnc_r)
void setName(const std::string &name)
set the repository name
bool consumeNode(Reader &reader_r)
Callback provided to the XML parser.
RW_pointer< Impl, rw_pointer::Scoped< Impl > > _pimpl
NodeType nodeType() const
Get the node type of the current node.
Repository type enumeration.
xmlTextReader based interface to iterate xml streams.