libzypp  17.36.3
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( Pathname sigpathLocal_r, Pathname keypathLocal_r, 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.
#define ZYPP_API
Definition: Globals.h:69
String related utilities and Regular expression matching.
What is known about a repository.
Definition: RepoInfo.h:71
bool operator==(const SetRelation::Enum &lhs, const SetCompare &rhs)
RW_pointer< Impl > _pimpl
Pointer to implementation (ref).
std::ostream & dumpOn(std::ostream &str, const Capability &obj)
Definition: Capability.cc:580
std::ostream & operator<<(std::ostream &str, const zypp::sat::detail::CDataiterator *obj)
Definition: LookupAttr.cc:808
FileChecker checking all repoverification plugins.
zypp_private::repo::PluginRepoverification PluginRepoverification
Definition: repomanager.h:41
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: Application.cc:19