libzypp  17.1.1
zypp::parser::RepoindexFileReader Class Reference

Reads through a repoindex.xml file and collects repositories. More...

#include <RepoindexFileReader.h>

Inheritance diagram for zypp::parser::RepoindexFileReader:


class  Impl

Public Types

typedef function< bool(const RepoInfo &)> ProcessResource
 Callback definition. More...

Public Member Functions

 RepoindexFileReader (const zypp::Pathname &repoindexFile, const ProcessResource &callback)
 CTOR. More...
 RepoindexFileReader (const InputStream &is, const 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

Detailed Description

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.

RepoindexFileReader reader(repoindex_file,
bind( &SomeClass::callbackfunc, &SomeClassInstance, _1) );

Definition at line 44 of file RepoindexFileReader.h.

Member Typedef Documentation

◆ ProcessResource

Callback definition.

First parameter is a RepoInfo object with the resource FIXME return value is ignored

Definition at line 52 of file RepoindexFileReader.h.

Constructor & Destructor Documentation

◆ RepoindexFileReader() [1/2]

zypp::parser::RepoindexFileReader::RepoindexFileReader ( const zypp::Pathname repoindexFile,
const ProcessResource callback 


Creates also xml::Reader and starts reading.

repoindexFileis the repoindex.xml file you want to read
callbackis a function.
See also

Definition at line 265 of file

◆ RepoindexFileReader() [2/2]

zypp::parser::RepoindexFileReader::RepoindexFileReader ( const InputStream is,
const ProcessResource callback 


Creates the reader and start reading.

isa valid input stream
callbackCallback that will be called for each repository.
See also

Definition at line 269 of file

◆ ~RepoindexFileReader()

zypp::parser::RepoindexFileReader::~RepoindexFileReader ( )


Definition at line 273 of file

Member Function Documentation

◆ ttl()

Date::Duration zypp::parser::RepoindexFileReader::ttl ( ) const

Metadata TTL (repoindex.xml:xpath:/repoindex or 0).

Definition at line 276 of file

Member Data Documentation

◆ _pimpl

RW_pointer<Impl,rw_pointer::Scoped<Impl> > zypp::parser::RepoindexFileReader::_pimpl

Definition at line 85 of file RepoindexFileReader.h.

The documentation for this class was generated from the following files: