libzypp 17.37.10

RepomdFileReader.h
Go to the documentation of this file.
1/*---------------------------------------------------------------------\
2| ____ _ __ __ ___ |
3| |__ / \ / / . \ . \ |
4| / / \ V /| _/ _/ |
5| / /__ | | | | | | |
6| /_____||_| |_| |_| |
7| |
8\---------------------------------------------------------------------*/
12#ifndef zypp_source_yum_RepomdFileReader_H
13#define zypp_source_yum_RepomdFileReader_H
14
15#include <set>
16
17#include <zypp/base/PtrTypes.h>
18#include <zypp/base/NonCopyable.h>
19#include <zypp/base/Function.h>
20
21#include <zypp-core/OnMediaLocation>
22
23 namespace zypp
24{
25 namespace parser
26 {
27 namespace yum
28 {
29
30
38 class RepomdFileReader : private base::NonCopyable
39 {
40 public:
42 using ProcessResource = function<bool (OnMediaLocation &&, const std::string &)>;
43
52 RepomdFileReader(const Pathname & repomd_file, ProcessResource callback );
54 RepomdFileReader( const Pathname & repomd_file );
55
57 ~RepomdFileReader();
58
59 public:
61 const std::set<std::string> & keywords() const;
62
64 std::vector<std::pair<std::string,std::string>> keyhints() const;
65
66 private:
67 class Impl;
68 RW_pointer<Impl,rw_pointer::Scoped<Impl> > _pimpl;
69 };
70
71
72 } // namespace yum
73 } // namespace parser
74} // namespace zypp
75
76#endif // zypp_source_yum_RepomdFileReader_H
bool
zypp::OnMediaLocation
Describes a resource file located on a medium.
Definition onmedialocation.h:37
zypp::filesystem::Pathname
Pathname.
Definition Pathname.h:47
zypp::parser::yum::RepomdFileReader::Impl
Definition RepomdFileReader.cc:46
zypp::parser::yum::RepomdFileReader::_pimpl
RW_pointer< Impl, rw_pointer::Scoped< Impl > > _pimpl
Definition RepomdFileReader.h:68
zypp::parser::yum::RepomdFileReader::ProcessResource
function< bool(OnMediaLocation &&, const std::string &)> ProcessResource
Callback taking OnMediaLocation and the resource type string.
Definition RepomdFileReader.h:42
zypp::parser::yum::RepomdFileReader::RepomdFileReader
RepomdFileReader(const Pathname &repomd_file, ProcessResource callback)
CTOR.
Definition RepomdFileReader.cc:196
zypp::parser::yum::RepomdFileReader::~RepomdFileReader
~RepomdFileReader()
DTOR.
Definition RepomdFileReader.cc:204
zypp::parser::yum::RepomdFileReader::keywords
const std::set< std::string > & keywords() const
repo keywords parsed on the fly
Definition RepomdFileReader.cc:207
zypp::parser::yum::RepomdFileReader::keyhints
std::vector< std::pair< std::string, std::string > > keyhints() const
gpg key hits shipped in keywords (bsc#1184326)
Definition RepomdFileReader.cc:210
zypp::base::NonCopyable
boost::noncopyable NonCopyable
Ensure derived classes cannot be copied.
Definition NonCopyable.h:26
zypp::callback
Callbacks light.
Definition Callback.h:146
zypp::parser::yum
Definition RepomdFileReader.cc:38
zypp::parser
Definition HistoryLogReader.cc:30
zypp
Easy-to use interface to the ZYPP dependency resolver.
Definition Application.cc:20
zypp::RW_pointer
Wrapper for const correct access via Smart pointer types.
Definition PtrTypes.h:293
Function.h
NonCopyable.h
PtrTypes.h