libzypp 17.37.17
RepomdFileCollector.h
Go to the documentation of this file.
1/*---------------------------------------------------------------------\
2| ____ _ __ __ ___ |
3| |__ / \ / / . \ . \ |
4| / / \ V /| _/ _/ |
5| / /__ | | | | | | |
6| /_____||_| |_| |_| |
7| |
8\---------------------------------------------------------------------*/
9
10#ifndef ZYPP_SOURCE_YUM_REPOMDFILECOLLECTOR
11#define ZYPP_SOURCE_YUM_REPOMDFILECOLLECTOR
12
13#include <zypp-core/base/Easy.h>
14#include <zypp-core/OnMediaLocation>
15#include <zypp-core/Pathname.h>
16#include <zypp/Locale.h>
17#include <map>
18#include <string>
19#include <functional>
20
21namespace zypp::repo::yum
22{
23
25 {
28
29 using FinalizeCb = std::function<void ( const OnMediaLocation &file )>;
30
31 RepomdFileCollector( const Pathname & destDir_r );
32 virtual ~RepomdFileCollector();
33
34 bool collect( const OnMediaLocation & loc_r, const std::string & typestr_r );
35
36 void finalize( const FinalizeCb &cb );
37
38 protected:
39 virtual const RepoInfo &repoInfo() const = 0;
40 virtual const Pathname &deltaDir() const = 0;
41
42 private:
43
44 bool wantLocale( const Locale & locale_r ) const;
45 void addWantedLocale( Locale locale_r );
46
47 protected:
49
51 std::map<std::string,OnMediaLocation> _wantedFiles;
52 };
53}
54#endif
'Language[_Country]' codes.
Definition Locale.h:51
Describes a resource file located on a medium.
What is known about a repository.
Definition RepoInfo.h:72
std::unordered_set< Locale > LocaleSet
Definition Locale.h:29
std::map< std::string, OnMediaLocation > _wantedFiles
virtual const Pathname & deltaDir() const =0
bool collect(const OnMediaLocation &loc_r, const std::string &typestr_r)
The callback invoked by the RepomdFileReader.
std::function< void(const OnMediaLocation &file)> FinalizeCb
virtual const RepoInfo & repoInfo() const =0
bool wantLocale(const Locale &locale_r) const
RepomdFileCollector(const Pathname &destDir_r)
LocaleSet _wantedLocales
Locales do download.