libzypp  17.38.7
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  void reportbegin() override;
40 
41  void reportend() override;
42 
44  void report( const UserData & userData_r ) override;
45 
47  void start( const Pathname & name ) override;
48 
50 
51  bool aborted() const { return _abort; }
52 
57  bool progress( unsigned percent ) override;
58 
60  rpm::RpmInstallReport::Action problem( Exception & excpt_r ) override;
61 
63  void finishInfo( const std::string & info_r ) override;
64 
66  void finish() override;
67 
69  void finish( Exception & excpt_r ) override;
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  void reportbegin() override;
86 
87  void reportend() override;
88 
91  void report( const UserData & userData_r ) override;
92 
93  void start( const std::string & name ) override;
94 
99  bool progress( unsigned percent ) override;
100 
104  bool aborted() const { return _abort; }
105 
107  rpm::RpmRemoveReport::Action problem( Exception & excpt_r ) override;
108 
110  void finishInfo( const std::string & info_r ) override;
111 
113  void finish() override;
114 
116  void finish( Exception & excpt_r ) override;
117  };
118 
120  } // namespace target
123 } // namespace zypp
125 #endif // ZYPP_TARGET_TARGETCALLBACKRECEIVER_H
TraitsType::constPtrType constPtr
Definition: Resolvable.h:59
callback::SendReport< rpm::RemoveResolvableReport > _report
bool progress(unsigned percent) override
Inform about progress Return true on abort.
bool progress(unsigned percent) override
Inform about progress Return true on abort.
rpm::RpmInstallReport::Action problem(Exception &excpt_r) override
inform user about a problem
void start(const std::string &name) override
target::rpm::InstallResolvableReport::RpmLevel _level
void finish() override
Finish operation in case of success.
zypp::callback::UserData UserData
Definition: userrequest.h:18
RpmRemovePackageReceiver(Resolvable::constPtr res)
RpmRemovePackageReceiver.
void finish() override
Finish operation in case of success.
Base class for Exception.
Definition: Exception.h:152
rpm::RpmRemoveReport::Action problem(Exception &excpt_r) override
inform user about a problem
bool aborted() const
Returns true if removing is aborted during progress.
void finishInfo(const std::string &info_r) override
Additional rpm output to be reported in finish in case of success.
void report(const UserData &userData_r) override
Forwards generic reports.
void finishInfo(const std::string &info_r) override
Additional rpm output to be reported in finish in case of success.
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
void start(const Pathname &name) override
Start the operation.