libzypp
17.34.0
FileChecker.h
Go to the documentation of this file.
1
/*---------------------------------------------------------------------\
2
| ____ _ __ __ ___ |
3
| |__ / \ / / . \ . \ |
4
| / / \ V /| _/ _/ |
5
| / /__ | | | | | | |
6
| /_____||_| |_| |_| |
7
| |
8
\---------------------------------------------------------------------*/
12
#ifndef ZYPP_FILECHECKER_H
13
#define ZYPP_FILECHECKER_H
14
15
#include <iosfwd>
16
#include <list>
17
#include <zypp-core/base/DefaultIntegral>
18
#include <zypp-media/FileCheckException>
19
#include <
zypp/base/Exception.h
>
20
#include <
zypp/base/Function.h
>
21
#include <
zypp/PathInfo.h
>
22
#include <
zypp/CheckSum.h
>
23
#include <
zypp/KeyRingContexts.h
>
24
26
namespace
zypp
27
{
28
29
class
PublicKey;
30
38
typedef
function<
void
(
const
Pathname
&file )>
FileChecker
;
39
47
class
ZYPP_TESTS
ChecksumFileChecker
48
{
49
public
:
50
typedef
CheckSumCheckException
ExceptionType
;
55
ChecksumFileChecker
(
CheckSum
checksum );
62
void
operator()(
const
Pathname
&file )
const
;
63
private
:
64
CheckSum
_checksum
;
65
};
66
70
class
ZYPP_TESTS
SignatureFileChecker
71
{
72
public
:
73
typedef
SignatureCheckException
ExceptionType
;
74
75
public
:
81
SignatureFileChecker
();
82
84
SignatureFileChecker
(
Pathname
signature_r
);
85
87
void
addPublicKey(
const
PublicKey
&
publickey_r
);
89
void
addPublicKey(
const
Pathname
&
publickey_r
);
90
102
void
operator()(
const
Pathname
&
file_r
)
const
;
103
104
keyring::VerifyFileContext
&verifyContext();
105
const
keyring::VerifyFileContext
&verifyContext()
const
;
106
107
private
:
108
keyring::VerifyFileContext
_verifyContext
;
109
};
110
115
class
NullFileChecker
116
{
117
public
:
118
void
operator()
(
const
Pathname
&file )
const
;
119
};
120
135
class
CompositeFileChecker
136
{
137
public
:
138
void
add
(
const
FileChecker
&
checker
);
142
void
operator()
(
const
Pathname
&file )
const
;
143
144
int
checkersSize
()
const
{
return
_checkers
.size(); }
145
private
:
146
std::list<FileChecker>
_checkers
;
147
};
148
150
std::ostream &
operator<<
( std::ostream &
str
,
const
FileChecker
&
obj
);
151
153
}
// namespace zypp
155
#endif
// ZYPP_FILECHECKER_H
KeyRingContexts.h
zypp::AutoDispose
Reference counted access to a Tp object calling a custom Dispose function when the last AutoDispose h...
Definition
AutoDispose.h:95
zypp::CheckSumCheckException
Definition
filecheckexception.h:26
zypp::CheckSum
Definition
CheckSum.h:34
zypp::ChecksumFileChecker
Built in file checkers.
Definition
FileChecker.h:48
zypp::ChecksumFileChecker::_checksum
CheckSum _checksum
Definition
FileChecker.h:64
zypp::ChecksumFileChecker::ExceptionType
CheckSumCheckException ExceptionType
Definition
FileChecker.h:50
zypp::CompositeFileChecker
Checker composed of more checkers.
Definition
FileChecker.h:136
zypp::CompositeFileChecker::_checkers
std::list< FileChecker > _checkers
Definition
FileChecker.h:146
zypp::CompositeFileChecker::add
void add(const FileChecker &checker)
Definition
FileChecker.cc:67
zypp::CompositeFileChecker::operator()
void operator()(const Pathname &file) const
Definition
FileChecker.cc:50
zypp::CompositeFileChecker::checkersSize
int checkersSize() const
Definition
FileChecker.h:144
zypp::NullFileChecker
Checks for nothing Used as the default checker.
Definition
FileChecker.h:116
zypp::NullFileChecker::operator()
void operator()(const Pathname &file) const
Definition
FileChecker.cc:44
zypp::PublicKey
Class representing one GPG Public Key (PublicKeyData + ASCII armored in a tempfile).
Definition
PublicKey.h:365
zypp::SignatureCheckException
Definition
filecheckexception.h:34
zypp::SignatureFileChecker
Checks for the validity of a signature.
Definition
FileChecker.h:71
zypp::SignatureFileChecker::_verifyContext
keyring::VerifyFileContext _verifyContext
Definition
FileChecker.h:108
zypp::SignatureFileChecker::ExceptionType
SignatureCheckException ExceptionType
Definition
FileChecker.h:73
zypp::filesystem::Pathname
Pathname.
Definition
Pathname.h:47
zypp::keyring::VerifyFileContext
I/O context for KeyRing::verifyFileSignatureWorkflow.
Definition
KeyRingContexts.h:30
str
String related utilities and Regular expression matching.
zypp
Easy-to use interface to the ZYPP dependency resolver.
Definition
Application.cc:20
zypp::FileChecker
function< void(const Pathname &file) FileChecker)
Functor signature used to check files.
Definition
FileChecker.h:38
zypp::operator<<
std::ostream & operator<<(std::ostream &str, const SerialNumber &obj)
Definition
SerialNumber.cc:52
ZYPP_TESTS
#define ZYPP_TESTS
Definition
Globals.h:60
CheckSum.h
PathInfo.h
Exception.h
Function.h
zypp
FileChecker.h
Generated by
1.10.0