libzypp
17.35.12
|
Reads through a repoindex.xml file and collects repositories. More...
#include <zypp/parser/RepoindexFileReader.h>
Classes | |
class | Impl |
Public Types | |
using | ProcessResource = function< bool(const RepoInfo &)> |
Callback definition. More... | |
Public Member Functions | |
RepoindexFileReader (Pathname repoindexFile, ProcessResource callback) | |
CTOR. More... | |
RepoindexFileReader (const InputStream &is, ProcessResource callback) | |
Constructor. More... | |
~RepoindexFileReader () | |
DTOR. More... | |
Date::Duration | ttl () const |
Metadata TTL (repoindex.xml:xpath:/repoindex or 0). More... | |
Private Attributes | |
RW_pointer< Impl, rw_pointer::Scoped< Impl > > | _pimpl |
Reads through a repoindex.xml file and collects repositories.
After each repository is read, a RepoInfo is prepared and _callback is called with this object passed in.
The _callback is provided on construction.
Definition at line 44 of file RepoindexFileReader.h.
using zypp::parser::RepoindexFileReader::ProcessResource = function<bool (const RepoInfo &)> |
Callback definition.
First parameter is a RepoInfo object with the resource FIXME return value is ignored
Definition at line 52 of file RepoindexFileReader.h.
zypp::parser::RepoindexFileReader::RepoindexFileReader | ( | Pathname | repoindexFile, |
ProcessResource | callback | ||
) |
CTOR.
Creates also xml::Reader and starts reading.
repoindexFile | is the repoindex.xml file you want to read |
callback | is a function. |
Definition at line 266 of file RepoindexFileReader.cc.
zypp::parser::RepoindexFileReader::RepoindexFileReader | ( | const InputStream & | is, |
ProcessResource | callback | ||
) |
Constructor.
Creates the reader and start reading.
is | a valid input stream |
callback | Callback that will be called for each repository. |
Definition at line 270 of file RepoindexFileReader.cc.
zypp::parser::RepoindexFileReader::~RepoindexFileReader | ( | ) |
DTOR.
Definition at line 274 of file RepoindexFileReader.cc.
Date::Duration zypp::parser::RepoindexFileReader::ttl | ( | ) | const |
Metadata TTL (repoindex.xml:xpath:/repoindex or 0).
Definition at line 277 of file RepoindexFileReader.cc.
|
private |
Definition at line 85 of file RepoindexFileReader.h.