libzypp  11.13.5
TargetCallbackReceiver.h
Go to the documentation of this file.
1 /*---------------------------------------------------------------------\
2 | ____ _ __ __ ___ |
3 | |__ / \ / / . \ . \ |
4 | / / \ V /| _/ _/ |
5 | / /__ | | | | | | |
6 | /_____||_| |_| |_| |
7 | |
8 \---------------------------------------------------------------------*/
12 #ifndef ZYPP_TARGET_TARGETCALLBACKRECEIVER_H
13 #define ZYPP_TARGET_TARGETCALLBACKRECEIVER_H
14 
15 #include "zypp/ZYppCallbacks.h"
17 
19 namespace zypp
20 {
21 
22  namespace target
23  {
24 
26  : public callback::ReceiveReport<rpm::RpmInstallReport>
27  {
31  bool _abort;
32  std::string _finishInfo;
33 
34  public:
35 
37  virtual ~RpmInstallPackageReceiver ();
38 
39  virtual void reportbegin();
40 
41  virtual void reportend();
42 
44  virtual void start( const Pathname & name );
45 
47 
48  bool aborted() const { return _abort; }
49 
54  virtual bool progress( unsigned percent );
55 
57  virtual rpm::RpmInstallReport::Action problem( Exception & excpt_r );
58 
60  virtual void finishInfo( const std::string & info_r );
61 
63  virtual void finish();
64 
66  virtual void finish( Exception & excpt_r );
67  };
68 
70  : public callback::ReceiveReport<rpm::RpmRemoveReport>
71  {
74  bool _abort;
75  std::string _finishInfo;
76 
77  public:
78 
80  virtual ~RpmRemovePackageReceiver ();
81 
82  virtual void reportbegin();
83 
84  virtual void reportend();
85 
87  virtual void start( const std::string & name );
88 
93  virtual bool progress( unsigned percent );
94 
98  bool aborted() const { return _abort; }
99 
101  virtual rpm::RpmRemoveReport::Action problem( Exception & excpt_r );
102 
104  virtual void finishInfo( const std::string & info_r );
105 
107  virtual void finish();
108 
110  virtual void finish( Exception & excpt_r );
111  };
112 
114  } // namespace target
117 } // namespace zypp
119 #endif // ZYPP_TARGET_TARGETCALLBACKRECEIVER_H