63 bool consumeNode(
Reader & reader_r );
77 PatchesFileReader::Impl::Impl(
const Pathname & patches_file,
81 Reader reader( patches_file );
82 MIL <<
"Reading " << patches_file << endl;
91 std::string data_type;
92 if ( reader_r->
nodeType() == XML_READER_TYPE_ELEMENT )
94 if ( reader_r->
name() ==
"patches" )
99 if ( reader_r->
name() ==
"patch" )
105 if ( reader_r->
name() ==
"location" )
111 if ( reader_r->
name() ==
"checksum" )
116 _location.setChecksum(
CheckSum( checksum_type, checksum_vaue ) );
119 if ( reader_r->
name() ==
"timestamp" )
125 else if ( reader_r->
nodeType() == XML_READER_TYPE_END_ELEMENT )
128 if ( reader_r->
name() ==
"patch" )
std::string _checksum_type
NodeType nodeType() const
Get the node type of the current node.
const ProcessCredentials & _callback
boost::noncopyable NonCopyable
Ensure derived classes cannot be copied.
Store and operate on date (time_t).
XmlString getAttribute(const char *name_r) const
Provides a copy of the attribute value with the specified qualified name.
bool consumeNode(Reader &reader_r)
Callback provided to the XML parser.
Interface of patches.xml file reader.
RW_pointer< Impl, rw_pointer::Scoped< Impl > > _pimpl
XmlString nodeText()
If the current node is not empty, advances the reader to the next node, and returns the value...
std::string asString() const
Explicit conversion to std::string.
bool foreachNode(ProcessNode fnc_r)
~PatchesFileReader()
DTOR.
OnMediaLocation _location
XmlString name() const
The qualified name of the node, equal to Prefix :LocalName.
PatchesFileReader(const Pathname &patches_file, const ProcessResource &callback)
CTOR.
function< bool(const OnMediaLocation &, const std::string &)> ProcessResource
Callback definition first parameter is a OnMediaLocation object with the resource second parameter is...
Easy-to use interface to the ZYPP dependency resolver.
ProcessResource _callback
xmlTextReader based interface to iterate xml streams.