libzypp  16.15.3
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 
19 namespace zypp
20 {
21 // CLASS NAME : ProvideFilePolicy
23 
28  {
29  public:
31  typedef function<bool ( int )> ProgressCB;
32 
34  ProvideFilePolicy & progressCB( ProgressCB progressCB_r )
35  { _progressCB = progressCB_r; return *this; }
36 
38  bool progress( int value ) const;
39 
40  public:
41  typedef function<bool ()> FailOnChecksumErrorCB;
42  private:
43  FailOnChecksumErrorCB _failOnChecksumErrorCB;
44  ProgressCB _progressCB;
45  };
46 
47 } // namespace zypp
49 #endif // ZYPP_PROVIDEFILEPOLICY_H
FailOnChecksumErrorCB _failOnChecksumErrorCB
Legacy to remain bincompat.
Policy for provideFile.
function< bool(int)> ProgressCB
Progress callback signature.
bool progress(int value) const
Evaluate callback.
function< bool()> FailOnChecksumErrorCB
Legacy to remain bincompat.
ProvideFilePolicy & progressCB(ProgressCB progressCB_r)
Set callback.
Easy-to use interface to the ZYPP dependency resolver.
Definition: CodePitfalls.doc:1