libzypp  17.31.31
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/Globals.h>
17 #include <zypp/RepoInfo.h>
18 #include <zypp/FileChecker.h>
19 #include <zypp/base/PtrTypes.h>
20 
22 namespace zypp_private
23 {
24  using namespace zypp;
26  namespace repo
27  {
33  {
34  public:
35  PluginRepoverificationCheckException( const std::string &msg )
36  : FileCheckException(msg)
37  {}
38  };
39 
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 
59 
60  public:
63 
65  PluginRepoverification( Pathname plugindir_r, Pathname chroot_r = Pathname() );
66 
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:
99  };
101 
103  Checker getChecker( const Pathname & sigpathLocal_r, const Pathname & keypathLocal_r, const RepoInfo & repo_r ) const;
104 
105  public:
106  class Impl;
107  private:
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
Repository metadata verification beyond GPG.
String related utilities and Regular expression matching.
Checker getChecker(const Pathname &sigpathLocal_r, const Pathname &keypathLocal_r, const RepoInfo &repo_r) const
FileChecker factory remembering the location of the master index files GPG signature and key...
What is known about a repository.
Definition: RepoInfo.h:71
friend std::ostream & operator<<(std::ostream &str, const PluginRepoverification &obj)
bool operator==(const SetRelation::Enum &lhs, const SetCompare &rhs)
RW_pointer< Impl > _pimpl
Pointer to implementation (ref).
bool isNeeded() const
Whether the last checkIfNeeded found plugins to execute at all.
void operator()(const Pathname &file_r) const
Check the downloaded master index file.
friend std::ostream & dumpOn(std::ostream &str, const PluginRepoverification &obj)
std::ostream & operator<<(std::ostream &str, const zypp::sat::detail::CDataiterator *obj)
Definition: LookupAttr.cc:807
FileChecker checking all repoverification plugins.
Exceptiontype thrown if a plugins verification fails.
RW_pointer< Impl > _pimpl
Implementation class.
bool operator!=(const PluginRepoverification &lhs, const PluginRepoverification &rhs)
PluginRepoverification::Checker data storage.
Easy-to use interface to the ZYPP dependency resolver.
Definition: CodePitfalls.doc:1
friend bool operator==(const PluginRepoverification &lhs, const PluginRepoverification &rhs)
bool checkIfNeeded()
Checks whether there are plugins to execute at all.