23 using namespace zypp::xml;
24 using namespace zypp::ws;
36 Impl(
const Pathname &result_file,
42 bool consumeNode( Reader & reader_r );
48 bool WebpinResultFileReader::Impl::consumeNode(Reader & reader_r)
50 if ( reader_r->nodeType() == XML_READER_TYPE_ELEMENT )
53 if ( reader_r->name() ==
"packages" )
59 if ( reader_r->name() ==
"package" )
63 if ( reader_r->name() ==
"name" )
64 {
_result->setName(reader_r.nodeText().asString());}
67 if ( reader_r->name() ==
"version" )
71 if ( reader_r->name() ==
"summary" )
72 {
_result->setSummary(reader_r.nodeText().asString()); }
75 if ( reader_r->name() ==
"repoURL" )
76 {
_result->setRepositoryUrl(
Url(reader_r.nodeText().asString())); }
79 if ( reader_r->name() ==
"checksum" )
82 if ( reader_r->name() ==
"distro" )
83 {
_result->setDistribution(reader_r.nodeText().asString());}
87 else if ( reader_r->nodeType() == XML_READER_TYPE_END_ELEMENT )
90 if ( reader_r->name() ==
"package" )
100 WebpinResultFileReader::Impl::Impl(
const Pathname &result_file,
104 Reader reader( result_file );
105 MIL <<
"Reading " << result_file << endl;
Represents a result from http://api.opensuse-community.org/searchservice/Search web service...
std::ostream & operator<<(std::ostream &str, const WebpinResultFileReader &obj)
function< bool(const zypp::ws::WebpinResult &)> ProcessWebpinResult
Callback definition.
Edition represents [epoch:]version[-release]
shared_ptr< WebpinResult > _result
WebpinResultFileReader(const Pathname &result_file, const ProcessWebpinResult &callback)
Constructor.
const ProcessCredentials & _callback
~WebpinResultFileReader()
Dtor.
ProcessWebpinResult _callback
Read packages and repository search result data from from webpin web search results.
RW_pointer< Impl, rw_pointer::Scoped< Impl > > _pimpl
static CheckSum sha1(const std::string &checksum)
bool consumeNode(Reader &reader_r)
Callback provided to the XML parser.
ZYppCommitResult & _result