24 #undef ZYPP_BASE_LOGGER_LOGGROUP
25 #define ZYPP_BASE_LOGGER_LOGGROUP "parser::yum"
49 Reader reader( repomd_file );
50 MIL <<
"Reading " << repomd_file << endl;
94 if ( reader_r->
nodeType() == XML_READER_TYPE_ELEMENT )
97 if ( reader_r->
name() ==
"repomd" )
103 if ( reader_r->
name() ==
"data" )
110 if ( reader_r->
name() ==
"location" )
118 if ( reader_r->
name() ==
"checksum" )
125 if ( reader_r->
name() ==
"header-checksum" )
132 if ( reader_r->
name() ==
"timestamp" )
139 if ( reader_r->
name() ==
"size" )
146 if ( reader_r->
name() ==
"header-size" )
155 else if ( reader_r->
nodeType() == XML_READER_TYPE_END_ELEMENT )
158 if ( reader_r->
name() ==
"data" )
Interface of repomd.xml file reader.
Store and operate with byte count.
CheckSum getChecksum(Reader &reader_r)
Retrieve a checksum node.
bool consumeNode(Reader &reader_r)
Callback provided to the XML parser.
Impl(const Pathname &repomd_file, const ProcessResource &callback)
Ctro taking a ProcessResource callback.
ByteCount getSize(Reader &reader_r)
Retrieve a size node.
std::string _typeStr
The resource type string.
OnMediaLocation _location
Location of metadata file.
ProcessResource _callback
Function for processing collected data.
function< bool(OnMediaLocation &&, const std::string &)> ProcessResource
Callback taking OnMediaLocation and the resource type string.
RW_pointer< Impl, rw_pointer::Scoped< Impl > > _pimpl
RepomdFileReader(const Pathname &repomd_file, const ProcessResource &callback)
CTOR.
NodeType nodeType() const
Get the node type of the current node.
XmlString getAttribute(const char *name_r) const
Provides a copy of the attribute value with the specified qualified name.
XmlString name() const
The qualified name of the node, equal to Prefix :LocalName.
xmlTextReader based interface to iterate xml streams.
XmlString nodeText()
If the current node is not empty, advances the reader to the next node, and returns the value.
bool foreachNode(ProcessNode fnc_r)
std::string asString() const
Explicit conversion to std::string.
boost::noncopyable NonCopyable
Ensure derived classes cannot be copied.
Easy-to use interface to the ZYPP dependency resolver.