libzypp  17.25.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  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
zypp::target::RpmRemovePackageReceiver::reportbegin
virtual void reportbegin()
Definition: TargetCallbackReceiver.cc:130
zypp::target::RpmInstallPackageReceiver::_abort
bool _abort
Definition: TargetCallbackReceiver.h:31
zypp::target::RpmRemovePackageReceiver::report
void report(const UserData &userData_r) override
Start the operation.
Definition: TargetCallbackReceiver.cc:139
zypp::target::RpmInstallPackageReceiver::finishInfo
virtual void finishInfo(const std::string &info_r)
Additional rpm output to be reported in finish in case of success.
Definition: TargetCallbackReceiver.cc:92
zypp::Exception
Base class for Exception.
Definition: Exception.h:146
zypp::target::RpmRemovePackageReceiver::finishInfo
virtual void finishInfo(const std::string &info_r)
Additional rpm output to be reported in finish in case of success.
Definition: TargetCallbackReceiver.cc:184
zypp::target::RpmRemovePackageReceiver::_resolvable
Resolvable::constPtr _resolvable
Definition: TargetCallbackReceiver.h:76
zypp::callback::SendReport
Definition: Callback.h:237
zypp::Resolvable::constPtr
TraitsType::constPtrType constPtr
Definition: Resolvable.h:59
zypp::callback::ReceiveReport
Definition: Callback.h:169
zypp::target::RpmInstallPackageReceiver::progress
virtual bool progress(unsigned percent)
Inform about progress Return true on abort.
Definition: TargetCallbackReceiver.cc:63
zypp::target::RpmInstallPackageReceiver::start
virtual void start(const Pathname &name)
Start the operation.
Definition: TargetCallbackReceiver.cc:53
zypp::target::RpmRemovePackageReceiver::RpmRemovePackageReceiver
RpmRemovePackageReceiver(Resolvable::constPtr res)
RpmRemovePackageReceiver.
Definition: TargetCallbackReceiver.cc:119
zypp::target::RpmInstallPackageReceiver::tryLevel
void tryLevel(target::rpm::InstallResolvableReport::RpmLevel level_r)
Definition: TargetCallbackReceiver.cc:109
zypp::target::RpmRemovePackageReceiver::_report
callback::SendReport< rpm::RemoveResolvableReport > _report
Definition: TargetCallbackReceiver.h:75
zypp::target::RpmRemovePackageReceiver::finish
virtual void finish()
Finish operation in case of success.
Definition: TargetCallbackReceiver.cc:190
zypp::target::RpmRemovePackageReceiver::_abort
bool _abort
Definition: TargetCallbackReceiver.h:77
zypp::target::RpmInstallPackageReceiver::reportbegin
virtual void reportbegin()
Definition: TargetCallbackReceiver.cc:37
zypp::target::RpmRemovePackageReceiver::reportend
virtual void reportend()
Definition: TargetCallbackReceiver.cc:134
zypp::target::RpmInstallPackageReceiver::_finishInfo
std::string _finishInfo
Definition: TargetCallbackReceiver.h:32
RpmCallbacks.h
zypp::target::RpmRemovePackageReceiver::~RpmRemovePackageReceiver
virtual ~RpmRemovePackageReceiver()
Definition: TargetCallbackReceiver.cc:126
zypp::target::RpmInstallPackageReceiver::finish
virtual void finish()
Finish operation in case of success.
Definition: TargetCallbackReceiver.cc:98
zypp::target::RpmInstallPackageReceiver
Definition: TargetCallbackReceiver.h:27
ZYppCallbacks.h
zypp::target::RpmInstallPackageReceiver::_report
callback::SendReport< rpm::InstallResolvableReport > _report
Definition: TargetCallbackReceiver.h:28
zypp::target::rpm::InstallResolvableReport::RpmLevel
RpmLevel
Definition: ZYppCallbacks.h:533
zypp
Easy-to use interface to the ZYPP dependency resolver.
Definition: CodePitfalls.doc:2
zypp::target::rpm::RpmInstallReport::Action
Action
Definition: RpmCallbacks.h:73
zypp::target::RpmInstallPackageReceiver::problem
virtual rpm::RpmInstallReport::Action problem(Exception &excpt_r)
inform user about a problem
Definition: TargetCallbackReceiver.cc:70
zypp::target::rpm::RpmRemoveReport::Action
Action
Definition: RpmCallbacks.h:36
zypp::target::RpmInstallPackageReceiver::reportend
virtual void reportend()
Definition: TargetCallbackReceiver.cc:41
zypp::target::RpmInstallPackageReceiver::RpmInstallPackageReceiver
RpmInstallPackageReceiver(Resolvable::constPtr res)
Definition: TargetCallbackReceiver.cc:25
zypp::target::RpmRemovePackageReceiver::progress
virtual bool progress(unsigned percent)
Inform about progress Return true on abort.
Definition: TargetCallbackReceiver.cc:156
zypp::filesystem::Pathname
Pathname.
Definition: Pathname.h:45
zypp::target::RpmRemovePackageReceiver::problem
virtual rpm::RpmRemoveReport::Action problem(Exception &excpt_r)
inform user about a problem
Definition: TargetCallbackReceiver.cc:163
zypp::target::RpmInstallPackageReceiver::report
void report(const UserData &userData_r) override
Forwards generic reports.
Definition: TargetCallbackReceiver.cc:45
zypp::target::RpmRemovePackageReceiver::start
virtual void start(const std::string &name)
Definition: TargetCallbackReceiver.cc:146
zypp::target::RpmRemovePackageReceiver::_finishInfo
std::string _finishInfo
Definition: TargetCallbackReceiver.h:78
zypp::target::RpmRemovePackageReceiver
Definition: TargetCallbackReceiver.h:74
zypp::target::RpmInstallPackageReceiver::_level
target::rpm::InstallResolvableReport::RpmLevel _level
Definition: TargetCallbackReceiver.h:30
zypp::target::RpmInstallPackageReceiver::_resolvable
Resolvable::constPtr _resolvable
Definition: TargetCallbackReceiver.h:29
zypp::target::RpmInstallPackageReceiver::~RpmInstallPackageReceiver
virtual ~RpmInstallPackageReceiver()
Definition: TargetCallbackReceiver.cc:33
zypp::target::RpmRemovePackageReceiver::aborted
bool aborted() const
Returns true if removing is aborted during progress.
Definition: TargetCallbackReceiver.h:104
zypp::target::RpmInstallPackageReceiver::aborted
bool aborted() const
Definition: TargetCallbackReceiver.h:51