libzypp  17.14.0
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"
16 #include "zypp/base/Functional.h"
17 #include "zypp/FileChecker.h"
18 
20 namespace 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
const FileChecker & fileChecker() const
The FileCecker.
bool progress(int value) const
Evaluate callback.
Policy for provideFile and RepoMediaAccess.
function< bool(int)> ProgressCB
Progress callback signature.
ProvideFilePolicy & fileChecker(FileChecker fileChecker_r)
Add a FileCecker passed down to the Fetcher.
ProvideFilePolicy & progressCB(ProgressCB progressCB_r)
Set callback.
function< void(const Pathname &file)> FileChecker
Functor signature used to check files.
Definition: FileChecker.h:28
Easy-to use interface to the ZYPP dependency resolver.
Definition: CodePitfalls.doc:1