libzypp 17.37.10

zypp::repo::yum::RepomdFileCollector Class Referenceabstract

Helper filtering the files offered by a RepomdFileReader. More...

`#include <zypp/repo/yum/RepomdFileCollector.h>`

## Public Types
using | FinalizeCb = std::function<void ( const OnMediaLocation &file )>

## Public Member Functions
| NON_COPYABLE (RepomdFileCollector)
| NON_MOVABLE (RepomdFileCollector)
| RepomdFileCollector (const Pathname &destDir_r)
virtual | ~RepomdFileCollector ()
bool | collect (const OnMediaLocation &loc_r, const std::string &typestr_r)
| The callback invoked by the RepomdFileReader.
void | finalize (const FinalizeCb &cb)

## Protected Member Functions
virtual const RepoInfo & | repoInfo () const =0
virtual const Pathname & | deltaDir () const =0

## Protected Attributes
const Pathname & | _destDir
LocaleSet | _wantedLocales
| Locales do download.
std::map< std::string, OnMediaLocation > | _wantedFiles

## Private Member Functions
bool | wantLocale (const Locale &locale_r) const
void | addWantedLocale (Locale locale_r)

## Detailed Description

Helper filtering the files offered by a RepomdFileReader.

Collected files from repomd.xml: File types: type (plain) type_db (sqlite, ignored by zypp) type_zck (zchunk, preferred) Localized type: susedata.LOCALE

Definition at line 24 of file RepomdFileCollector.h.

## Member Typedef Documentation

## ◆ FinalizeCb

using zypp::repo::yum::RepomdFileCollector::FinalizeCb = std::function<void ( const OnMediaLocation &file )>

Definition at line 29 of file RepomdFileCollector.h.

## Constructor & Destructor Documentation

## ◆ RepomdFileCollector()

zypp::repo::yum::RepomdFileCollector::RepomdFileCollector | ( | const Pathname & | destDir_r | ) |

Definition at line 92 of file RepomdFileCollector.cc.

## ◆ ~RepomdFileCollector()

zypp::repo::yum::RepomdFileCollector::~RepomdFileCollector | ( |  | ) |
| virtual

Definition at line 100 of file RepomdFileCollector.cc.

## Member Function Documentation

## ◆ NON_COPYABLE()

zypp::repo::yum::RepomdFileCollector::NON_COPYABLE | ( | RepomdFileCollector |  | ) |

## ◆ NON_MOVABLE()

zypp::repo::yum::RepomdFileCollector::NON_MOVABLE | ( | RepomdFileCollector |  | ) |

## ◆ collect()

bool zypp::repo::yum::RepomdFileCollector::collect | ( | const OnMediaLocation & | loc_r,
|  | const std::string & | typestr_r )

The callback invoked by the RepomdFileReader.

It's a pity, but in the presence of separate "type" and "type_zck" entries, we have to scan the whole file before deciding what to download....

Definition at line 107 of file RepomdFileCollector.cc.

## ◆ finalize()

void zypp::repo::yum::RepomdFileCollector::finalize | ( | const FinalizeCb & | cb | ) |

Definition at line 143 of file RepomdFileCollector.cc.

## ◆ repoInfo()

virtual const RepoInfo & zypp::repo::yum::RepomdFileCollector::repoInfo | ( |  | ) | const
| protected pure virtual

## ◆ deltaDir()

virtual const Pathname & zypp::repo::yum::RepomdFileCollector::deltaDir | ( |  | ) | const
| protected pure virtual

## ◆ wantLocale()

bool zypp::repo::yum::RepomdFileCollector::wantLocale | ( | const Locale & | locale_r | ) | const
| private

Definition at line 153 of file RepomdFileCollector.cc.

## ◆ addWantedLocale()

void zypp::repo::yum::RepomdFileCollector::addWantedLocale | ( | Locale | locale_r | ) |
| private

Definition at line 156 of file RepomdFileCollector.cc.

## Member Data Documentation

## ◆ _destDir

const Pathname& zypp::repo::yum::RepomdFileCollector::_destDir
| protected

Definition at line 48 of file RepomdFileCollector.h.

## ◆ _wantedLocales

LocaleSet zypp::repo::yum::RepomdFileCollector::_wantedLocales
| protected

Locales do download.

Definition at line 50 of file RepomdFileCollector.h.

## ◆ _wantedFiles

std::map<std::string,OnMediaLocation> zypp::repo::yum::RepomdFileCollector::_wantedFiles
| protected

Definition at line 51 of file RepomdFileCollector.h.

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

- zypp/repo/yum/RepomdFileCollector.h
- zypp/repo/yum/RepomdFileCollector.cc