libzypp
10.5.0
|
Read packages and repository search result data from from webpin web search results. More...
#include <WebpinResultFileReader.h>
Classes | |
class | Impl |
Public Types | |
typedef function< bool(const zypp::ws::WebpinResult &)> | ProcessWebpinResult |
Callback definition. | |
Public Member Functions | |
WebpinResultFileReader (const Pathname &result_file, const ProcessWebpinResult &callback) | |
Constructor. | |
~WebpinResultFileReader () | |
Dtor. | |
Private Attributes | |
RW_pointer< Impl, rw_pointer::Scoped< Impl > > | _pimpl |
Friends | |
std::ostream & | operator<< (std::ostream &str, const WebpinResultFileReader &obj) |
Related Functions | |
(Note that these are not member functions.) | |
std::ostream & | operator<< (std::ostream &str, const WebpinResultFileReader &obj) |
Read packages and repository search result data from from webpin web search results.
For each result, a WebpinResult is prepared and _callback is called with the object passed in.
The _callback is provided on construction.
WebpinResultFileReader reader(repo_file, bind( &SomeClass::callbackfunc, &SomeClassInstance, _1, _2 ) );
Definition at line 46 of file WebpinResultFileReader.h.
typedef function< bool( const zypp::ws::WebpinResult & )> zypp::parser::ws::WebpinResultFileReader::ProcessWebpinResult |
Callback definition.
First parameter is a WebpinResult object.
Return false from the callback to get a AbortRequestException to be thrown and the processing to be cancelled.
Definition at line 58 of file WebpinResultFileReader.h.
zypp::parser::ws::WebpinResultFileReader::WebpinResultFileReader | ( | const Pathname & | result_file, |
const ProcessWebpinResult & | callback | ||
) |
Constructor.
Creates the reader and start reading.
result_file | Valid result XML file from Webpin |
callback | Callback that will be called for each repository. |
progress | Optional progress function. |
AbortRequestException | If the callback returns false |
Exception | If a error occurs at reading / parsing |
Definition at line 110 of file WebpinResultFileReader.cc.
zypp::parser::ws::WebpinResultFileReader::~WebpinResultFileReader | ( | ) |
Dtor.
Definition at line 116 of file WebpinResultFileReader.cc.
std::ostream& operator<< | ( | std::ostream & | str, |
const WebpinResultFileReader & | obj | ||
) | [friend] |
Definition at line 119 of file WebpinResultFileReader.cc.
std::ostream & operator<< | ( | std::ostream & | str, |
const WebpinResultFileReader & | obj | ||
) | [related] |
Stream output
Definition at line 119 of file WebpinResultFileReader.cc.
RW_pointer<Impl,rw_pointer::Scoped<Impl> > zypp::parser::ws::WebpinResultFileReader::_pimpl [private] |
Definition at line 81 of file WebpinResultFileReader.h.