libzypp: zypp::parser::RepoindexFileReader Class Reference

libzypp 17.38.6

zypp::parser::RepoindexFileReader Class Reference

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

`#include <zypp/parser/RepoindexFileReader.h>`

Inheritance diagram for zypp::parser::RepoindexFileReader:

## Classes
class | Impl

## Public Types
using | ProcessResource = function<bool (const RepoInfo &)>
| Callback definition.

## Public Member Functions
| RepoindexFileReader (Pathname repoindexFile, ProcessResource callback)
| CTOR.
| RepoindexFileReader (const InputStream &is, ProcessResource callback)
| Constructor.
| ~RepoindexFileReader ()
| DTOR.
Date::Duration | ttl () const
| Metadata TTL (repoindex.xml:xpath:/repoindex@ttl or 0).

## 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) );
zypp::parser::RepoindexFileReader::RepoindexFileReader
RepoindexFileReader(Pathname repoindexFile, ProcessResource callback)
CTOR.
Definition RepoindexFileReader.cc:332

Definition at line 44 of file RepoindexFileReader.h.

## Member Typedef Documentation

## ◆ ProcessResource

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.

## Constructor & Destructor Documentation

## ◆ RepoindexFileReader() [1/2]

zypp::parser::RepoindexFileReader::RepoindexFileReader | ( | Pathname | repoindexFile,
|  | ProcessResource | callback )

CTOR.

Creates also xml::Reader and starts reading.

Parameters

  repoindexFile | is the repoindex.xml file you want to read
  callback | is a function.

See also
  RepoindexFileReader::ProcessResource

Definition at line 332 of file RepoindexFileReader.cc.

## ◆ RepoindexFileReader() [2/2]

zypp::parser::RepoindexFileReader::RepoindexFileReader | ( | const InputStream & | is,
|  | ProcessResource | callback )

Constructor.

Creates the reader and start reading.

Parameters

  is | a valid input stream
  callback | Callback that will be called for each repository.

See also
  RepoindexFileReader::ProcessResource

Definition at line 336 of file RepoindexFileReader.cc.

## ◆ ~RepoindexFileReader()

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

DTOR.

Definition at line 340 of file RepoindexFileReader.cc.

## Member Function Documentation

## ◆ ttl()

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

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

Definition at line 343 of file RepoindexFileReader.cc.

## Member Data Documentation

## ◆ _pimpl

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

Definition at line 86 of file RepoindexFileReader.h.

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

- zypp/parser/RepoindexFileReader.h
- zypp/parser/RepoindexFileReader.cc