#include <RepoFileReader.h>
Public Types | |
| typedef function < bool(const RepoInfo &)> | ProcessRepo |
| Callback definition. | |
Public Member Functions | |
| RepoFileReader (const Pathname &repo_file, const ProcessRepo &callback, const ProgressData::ReceiverFnc &progress=ProgressData::ReceiverFnc()) | |
| ~RepoFileReader () | |
| Dtor. | |
Private Attributes | |
| ProcessRepo | _callback |
Friends | |
| std::ostream & | operator<< (std::ostream &str, const RepoFileReader &obj) |
| Stream output. | |
The _callback is provided on construction.
RepoFileReader reader(repo_file, bind( &SomeClass::callbackfunc, &SomeClassInstance, _1, _2 ) );
Definition at line 41 of file RepoFileReader.h.
| typedef function< bool( const RepoInfo & )> zypp::parser::RepoFileReader::ProcessRepo |
Callback definition.
First parameter is a RepoInfo object with the resource second parameter is the resource type.
Return false from the callback to get a AbortRequestException to be thrown and the processing to be cancelled.
Definition at line 54 of file RepoFileReader.h.
| zypp::parser::RepoFileReader::RepoFileReader | ( | const Pathname & | repo_file, | |
| const ProcessRepo & | callback, | |||
| const ProgressData::ReceiverFnc & | progress = ProgressData::ReceiverFnc() | |||
| ) |
Constructor. Creates the reader and start reading.
| repo_file | A valid .repo file | |
| 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 90 of file RepoFileReader.cc.
References _callback, and zypp::parser::repositories_in_file().
| zypp::parser::RepoFileReader::~RepoFileReader | ( | ) |
| std::ostream & operator<< | ( | std::ostream & | str, | |
| const RepoFileReader & | obj | |||
| ) | [friend] |
1.5.3