libzypp: zypp/repo/PluginRepoverification.h Source File

libzypp 17.38.8

PluginRepoverification.h
Go to the documentation of this file.
1/*---------------------------------------------------------------------\
2| ____ _ __ __ ___ |
3| |__ / \ / / . \ . \ |
4| / / \ V /| _/ _/ |
5| / /__ | | | | | | |
6| /_____||_| |_| |_| |
7| |
8\---------------------------------------------------------------------*/
11#ifndef ZYPP_REPO_PLUGINREPOVERIFICATION_H
12#define ZYPP_REPO_PLUGINREPOVERIFICATION_H
13
14#include <iosfwd>
15
16#include <zypp-core/Globals.h>
17#include <zypp/RepoInfo.h>
18#include <zypp/FileChecker.h>
19#include <zypp-core/base/PtrTypes.h>
20
22namespace zypp_private
23{
24 using namespace zypp;
26 namespace repo
27 {
32 class PluginRepoverificationCheckException : public FileCheckException
33 {
34 public:
35 PluginRepoverificationCheckException( const std::string &msg )
36 : FileCheckException(msg)
37 {}
38 };
39
52 class PluginRepoverification
53 {
54 friend std::ostream & operator<<( std::ostream & str, const PluginRepoverification & obj );
55 friend std::ostream & dumpOn( std::ostream & str, const PluginRepoverification & obj );
56 friend bool operator==( const PluginRepoverification & lhs, const PluginRepoverification & rhs );
57
58 using ExceptionType = PluginRepoverificationCheckException;
59
60 public:
62 PluginRepoverification();
63
65 PluginRepoverification( Pathname plugindir_r, Pathname chroot_r = Pathname() );
66
68 ~PluginRepoverification();
69
70 public:
72 bool isNeeded() const;
73
75 bool checkIfNeeded();
76
77 public:
82 class Checker
83 {
84 public:
85 ~Checker();
86
90 void operator()( const Pathname & file_r ) const;
91
92 public:
93 class Impl;
94 private:
95 friend class PluginRepoverification;
96 Checker( Impl* pimpl );
97 private:
98 RW_pointer<Impl> _pimpl;
99 };
100
101
103 Checker getChecker( Pathname sigpathLocal_r, Pathname keypathLocal_r, RepoInfo repo_r ) const;
104
105 public:
106 class Impl;
107 private:
108 RW_pointer<Impl> _pimpl;
109 };
110
112 std::ostream & operator<<( std::ostream & str, const PluginRepoverification & obj );
113
115 std::ostream & dumOn( std::ostream & str, const PluginRepoverification & obj );
116
118 bool operator==( const PluginRepoverification & lhs, const PluginRepoverification & rhs );
119
121 inline bool operator!=( const PluginRepoverification & lhs, const PluginRepoverification & rhs )
122 { return !( lhs == rhs ); }
123
124 } // namespace repo
126} // namespace zypp
128#endif // ZYPP_REPO_PLUGINREPOVERIFICATION_H
FileChecker.h
Globals.h
Provides API related macros.
PtrTypes.h
RepoInfo.h
zypp::Exception::msg
const std::string & msg() const
Return the message string provided to the ctor.
Definition Exception.h:206
zypp::FileCheckException::FileCheckException
FileCheckException(std::string msg)
Definition filecheckexception.h:20
zypp::RepoInfo
What is known about a repository.
Definition RepoInfo.h:72
zypp::filesystem::Pathname
Pathname.
Definition Pathname.h:48
zypp_private::repo::PluginRepoverificationCheckException
Exceptiontype thrown if a plugins verification fails.
Definition PluginRepoverification.h:33
zypp_private::repo::PluginRepoverificationCheckException::PluginRepoverificationCheckException
PluginRepoverificationCheckException(const std::string &msg)
Definition PluginRepoverification.h:35
zypp_private::repo::PluginRepoverification::Checker::Impl
PluginRepoverification::Checker data storage.
Definition PluginRepoverification.cc:108
zypp_private::repo::PluginRepoverification::Checker
FileChecker checking all repoverification plugins.
Definition PluginRepoverification.h:83
zypp_private::repo::PluginRepoverification::Checker::~Checker
~Checker()
Definition PluginRepoverification.cc:306
zypp_private::repo::PluginRepoverification::Checker::operator()
void operator()(const Pathname &file_r) const
Check the downloaded master index file.
Definition PluginRepoverification.cc:309
zypp_private::repo::PluginRepoverification::Checker::PluginRepoverification
friend class PluginRepoverification
Implementation class.
Definition PluginRepoverification.h:95
zypp_private::repo::PluginRepoverification::Checker::Checker
Checker(Impl *pimpl)
Definition PluginRepoverification.cc:302
zypp_private::repo::PluginRepoverification::Checker::_pimpl
RW_pointer< Impl > _pimpl
Pointer to implementation (ref).
Definition PluginRepoverification.h:98
zypp_private::repo::PluginRepoverification::Impl
PluginRepoverification implementation.
Definition PluginRepoverification.cc:129
zypp_private::repo::PluginRepoverification
Repository metadata verification beyond GPG.
Definition PluginRepoverification.h:53
zypp_private::repo::PluginRepoverification::PluginRepoverification
PluginRepoverification()
Default ctor, do nothing.
Definition PluginRepoverification.cc:266
zypp_private::repo::PluginRepoverification::operator==
friend bool operator==(const PluginRepoverification &lhs, const PluginRepoverification &rhs)
relates: PluginRepoverification
Definition PluginRepoverification.cc:294
zypp_private::repo::PluginRepoverification::isNeeded
bool isNeeded() const
Whether the last checkIfNeeded found plugins to execute at all.
Definition PluginRepoverification.cc:278
zypp_private::repo::PluginRepoverification::operator<<
friend std::ostream & operator<<(std::ostream &str, const PluginRepoverification &obj)
relates: PluginRepoverification Stream output
Definition PluginRepoverification.cc:288
zypp_private::repo::PluginRepoverification::dumpOn
friend std::ostream & dumpOn(std::ostream &str, const PluginRepoverification &obj)
Definition PluginRepoverification.cc:291
zypp_private::repo::PluginRepoverification::checkIfNeeded
bool checkIfNeeded()
Checks whether there are plugins to execute at all.
Definition PluginRepoverification.cc:281
zypp_private::repo::PluginRepoverification::getChecker
Checker getChecker(Pathname sigpathLocal_r, Pathname keypathLocal_r, RepoInfo repo_r) const
FileChecker factory remembering the location of the master index files GPG signature and key.
Definition PluginRepoverification.cc:284
zypp_private::repo::PluginRepoverification::_pimpl
RW_pointer< Impl > _pimpl
Implementation class.
Definition PluginRepoverification.h:108
zypp_private::repo::PluginRepoverification::ExceptionType
PluginRepoverificationCheckException ExceptionType
Definition PluginRepoverification.h:58
zypp_private::repo::PluginRepoverification::~PluginRepoverification
~PluginRepoverification()
Dtor.
Definition PluginRepoverification.cc:274
str
String related utilities and Regular expression matching.
zypp::repo::operator!=
bool operator!=(const RepoInfoBase &lhs, const RepoInfoBase &rhs)
relates: RepoInfoBase
Definition RepoInfoBase.h:177
zypp::repo::operator<<
std::ostream & operator<<(std::ostream &str, const DeltaCandidates::Impl &obj)
relates: DeltaCandidates::Impl Stream output
Definition DeltaCandidates.cc:55
zypp::repo::operator==
bool operator==(const RepoInfoBase &lhs, const RepoInfoBase &rhs)
relates: RepoInfoBase
Definition RepoInfoBase.h:173
zypp_private::repo
Definition PluginRepoverification.cc:31
zypp_private
Definition PluginRepoverification.cc:27
zypp::dumOn
std::ostream & dumOn(std::ostream &str, const OnMediaLocation &obj)
relates: OnMediaLocation Verbose stream output
zypp::RW_pointer
Wrapper for const correct access via Smart pointer types.
Definition PtrTypes.h:293