libzypp  13.10.6
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  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
virtual bool progress(unsigned percent)
Inform about progress Return true on abort.
callback::SendReport< rpm::RemoveResolvableReport > _report
virtual void finish()
Finish operation in case of success.
virtual void finishInfo(const std::string &info_r)
Additional rpm output to be reported in finish in case of success.
target::rpm::InstallResolvableReport::RpmLevel _level
virtual rpm::RpmRemoveReport::Action problem(Exception &excpt_r)
inform user about a problem
virtual rpm::RpmInstallReport::Action problem(Exception &excpt_r)
inform user about a problem
RpmRemovePackageReceiver(Resolvable::constPtr res)
RpmRemovePackageReceiver.
bool aborted() const
Returns true if removing is aborted during progress.
virtual void finishInfo(const std::string &info_r)
Additional rpm output to be reported in finish in case of success.
virtual bool progress(unsigned percent)
Inform about progress Return true on abort.
virtual void start(const Pathname &name)
Start the operation.
virtual void finish()
Finish operation in case of success.
TraitsType::constPtrType constPtr
Definition: Resolvable.h:49
virtual void start(const std::string &name)
Start the operation.
Base class for Exception.
Definition: Exception.h:143
RpmInstallPackageReceiver(Resolvable::constPtr res)
void tryLevel(target::rpm::InstallResolvableReport::RpmLevel level_r)
callback::SendReport< rpm::InstallResolvableReport > _report