libzypp
13.10.6
|
Read service data from a .service file. More...
#include <ServiceFileReader.h>
Classes | |
class | Impl |
Public Types | |
typedef function< bool(const ServiceInfo &)> | ProcessService |
Callback definition. More... | |
Public Member Functions | |
ServiceFileReader (const Pathname &serviceFile, const ProcessService &callback) | |
Constructor. More... | |
~ServiceFileReader () | |
Dtor. More... | |
Friends | |
std::ostream & | operator<< (std::ostream &str, const ServiceFileReader &obj) |
Related Functions | |
(Note that these are not member functions.) | |
std::ostream & | operator<< (std::ostream &str, const ServiceFileReader &obj) |
Read service data from a .service file.
After each service is read, a ServiceInfo is prepared and _callback is called with the object passed in.
The _callback is provided on construction.
Definition at line 43 of file ServiceFileReader.h.
typedef function< bool( const ServiceInfo & )> zypp::parser::ServiceFileReader::ProcessService |
Callback definition.
First parameter is a ServiceInfo object with the resource.
Return false from the callback to get a AbortRequestException to be thrown and the processing to be cancelled.
Definition at line 55 of file ServiceFileReader.h.
zypp::parser::ServiceFileReader::ServiceFileReader | ( | const Pathname & | serviceFile, |
const ProcessService & | callback | ||
) |
Constructor.
Creates the reader and start reading.
serviceFile | A valid .repo file |
callback | Callback that will be called for each repository. |
AbortRequestException | If the callback returns false |
Exception | If a error occurs at reading / parsing |
Definition at line 110 of file ServiceFileReader.cc.
zypp::parser::ServiceFileReader::~ServiceFileReader | ( | ) |
Dtor.
Definition at line 118 of file ServiceFileReader.cc.
|
friend |
Definition at line 121 of file ServiceFileReader.cc.
|
related |
Stream output
Definition at line 121 of file ServiceFileReader.cc.