libzypp  17.28.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  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  void report( const UserData & userData_r ) override;
45 
47  virtual void start( const Pathname & name );
48 
50 
51  bool aborted() const { return _abort; }
52 
57  virtual bool progress( unsigned percent );
58 
60  virtual rpm::RpmInstallReport::Action problem( Exception & excpt_r );
61 
63  virtual void finishInfo( const std::string & info_r );
64 
66  virtual void finish();
67 
69  virtual void finish( Exception & excpt_r );
70  };
71 
73  : public callback::ReceiveReport<rpm::RpmRemoveReport>
74  {
77  bool _abort;
78  std::string _finishInfo;
79 
80  public:
81 
83  virtual ~RpmRemovePackageReceiver ();
84 
85  virtual void reportbegin();
86 
87  virtual void reportend();
88 
91  void report( const UserData & userData_r ) override;
92 
93  virtual void start( const std::string & name );
94 
99  virtual bool progress( unsigned percent );
100 
104  bool aborted() const { return _abort; }
105 
107  virtual rpm::RpmRemoveReport::Action problem( Exception & excpt_r );
108 
110  virtual void finishInfo( const std::string & info_r );
111 
113  virtual void finish();
114 
116  virtual void finish( Exception & excpt_r );
117  };
118 
120  } // namespace target
123 } // namespace zypp
125 #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.
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:59
virtual void start(const std::string &name)
Base class for Exception.
Definition: Exception.h:145
bool aborted() const
Returns true if removing is aborted during progress.
void report(const UserData &userData_r) override
Forwards generic reports.
Easy-to use interface to the ZYPP dependency resolver.
Definition: CodePitfalls.doc:1
RpmInstallPackageReceiver(Resolvable::constPtr res)
void tryLevel(target::rpm::InstallResolvableReport::RpmLevel level_r)
void report(const UserData &userData_r) override
Start the operation.
callback::SendReport< rpm::InstallResolvableReport > _report