libzypp 17.31.23
ProvideFilePolicy.h
Go to the documentation of this file.
1/*---------------------------------------------------------------------\
2| ____ _ __ __ ___ |
3| |__ / \ / / . \ . \ |
4| / / \ V /| _/ _/ |
5| / /__ | | | | | | |
6| /_____||_| |_| |_| |
7| |
8\---------------------------------------------------------------------*/
9
10#ifndef ZYPP_PROVIDEFILEPOLICY_H
11#define ZYPP_PROVIDEFILEPOLICY_H
12
13#include <iosfwd>
14
15#include <zypp/base/Function.h>
17#include <zypp/FileChecker.h>
18
20namespace zypp
21{
30 {
31 public:
33 typedef function<bool ( int )> ProgressCB;
34
37 { _progressCB = progressCB_r; return *this; }
38
40 bool progress( int value ) const;
41
42 public:
45 { _fileChecker = std::move(fileChecker_r); return *this; }
46
48 const FileChecker & fileChecker() const
49 { return _fileChecker; }
50
51 private:
54 };
55
56} // namespace zypp
58#endif // ZYPP_PROVIDEFILEPOLICY_H
Policy for provideFile and RepoMediaAccess.
ProvideFilePolicy & fileChecker(FileChecker fileChecker_r)
Add a FileCecker passed down to the Fetcher.
function< bool(int)> ProgressCB
Progress callback signature.
bool progress(int value) const
Evaluate callback.
ProvideFilePolicy & progressCB(ProgressCB progressCB_r)
Set callback.
const FileChecker & fileChecker() const
The FileCecker.
Easy-to use interface to the ZYPP dependency resolver.
Definition: CodePitfalls.doc:2
function< void(const Pathname &file)> FileChecker
Functor signature used to check files.
Definition: FileChecker.h:38