libzypp  11.13.5
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 
22 // CLASS NAME : ProvideFilePolicy
23 
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:
44  typedef function<bool ()> FailOnChecksumErrorCB;
45 
48  { _failOnChecksumErrorCB = failOnChecksumErrorCB_r; return *this; }
49 
53  ProvideFilePolicy & failOnChecksumErrorCB( bool yesno_r );
54 
56  bool failOnChecksumError() const;
57 
58  private:
61  };
62 
63 } // namespace zypp
65 #endif // ZYPP_PROVIDEFILEPOLICY_H