libzypp 17.37.17
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#include <utility>
15
16#include <zypp/base/Function.h>
18#include <zypp/FileChecker.h>
19
21namespace zypp
22{
31 {
32 public:
34 using ProgressCB = function<bool (int)>;
35
38 { _progressCB = std::move(progressCB_r); return *this; }
39
41 bool progress( int value ) const;
42
43 public:
46 { _fileChecker = std::move(fileChecker_r); return *this; }
47
49 const FileChecker & fileChecker() const
50 { return _fileChecker; }
51
52 private:
55 };
56
57} // namespace zypp
59#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.
function< void(const Pathname &file)> FileChecker
Functor signature used to check files.
Definition FileChecker.h:38