libzypp  13.10.6
zypp::ProvideFilePolicy Class Reference

Policy for provideFile. More...

#include <ProvideFilePolicy.h>

Public Types

typedef function< bool(int)> ProgressCB
 Progress callback signature. More...
 
typedef function< bool()> FailOnChecksumErrorCB
 FailOnChecksumError callback signature. More...
 

Public Member Functions

ProvideFilePolicyprogressCB (ProgressCB progressCB_r)
 Set callback. More...
 
bool progress (int value) const
 Evaluate callback. More...
 
ProvideFilePolicyfailOnChecksumErrorCB (FailOnChecksumErrorCB failOnChecksumErrorCB_r)
 Set callback. More...
 
ProvideFilePolicyfailOnChecksumErrorCB (bool yesno_r)
 Set callback convenience. More...
 
bool failOnChecksumError () const
 Evaluate callback. More...
 

Private Attributes

FailOnChecksumErrorCB _failOnChecksumErrorCB
 
ProgressCB _progressCB
 

Detailed Description

Policy for provideFile.

Provides callback hooks for e.g progress reporting or behaviour on checksum failure. Provides default implementations if no callback is set.

Definition at line 29 of file ProvideFilePolicy.h.

Member Typedef Documentation

typedef function<bool ( int )> zypp::ProvideFilePolicy::ProgressCB

Progress callback signature.

Definition at line 33 of file ProvideFilePolicy.h.

FailOnChecksumError callback signature.

Definition at line 44 of file ProvideFilePolicy.h.

Member Function Documentation

ProvideFilePolicy& zypp::ProvideFilePolicy::progressCB ( ProgressCB  progressCB_r)
inline

Set callback.

Definition at line 36 of file ProvideFilePolicy.h.

bool zypp::ProvideFilePolicy::progress ( int  value) const

Evaluate callback.

Definition at line 45 of file ProvideFilePolicy.cc.

ProvideFilePolicy& zypp::ProvideFilePolicy::failOnChecksumErrorCB ( FailOnChecksumErrorCB  failOnChecksumErrorCB_r)
inline

Set callback.

Definition at line 47 of file ProvideFilePolicy.h.

ProvideFilePolicy & zypp::ProvideFilePolicy::failOnChecksumErrorCB ( bool  yesno_r)

Set callback convenience.

Let callback return yesno_r.

Definition at line 39 of file ProvideFilePolicy.cc.

bool zypp::ProvideFilePolicy::failOnChecksumError ( ) const

Evaluate callback.

Definition at line 52 of file ProvideFilePolicy.cc.

Member Data Documentation

FailOnChecksumErrorCB zypp::ProvideFilePolicy::_failOnChecksumErrorCB
private

Definition at line 59 of file ProvideFilePolicy.h.

ProgressCB zypp::ProvideFilePolicy::_progressCB
private

Definition at line 60 of file ProvideFilePolicy.h.


The documentation for this class was generated from the following files: