26 using namespace zypp::xml;
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" )
102 _id = reader_r->getAttribute(
"id").asString();
105 if ( reader_r->name() ==
"location" )
108 _location.setLocation( reader_r->getAttribute(
"href").asString(), 1 );
111 if ( reader_r->name() ==
"checksum" )
114 string checksum_type = reader_r->getAttribute(
"type").asString() ;
115 string checksum_vaue = reader_r.nodeText().asString();
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
const ProcessCredentials & _callback
boost::noncopyable NonCopyable
Ensure derived classes cannot be copied.
Store and operate on date (time_t).
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
~PatchesFileReader()
DTOR.
OnMediaLocation _location
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...
ProcessResource _callback