libzypp 17.38.3
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
19namespace zypp
20{
22 namespace target
23 {
24
26 : public callback::ReceiveReport<rpm::RpmInstallReport>
27 {
28 callback::SendReport <rpm::InstallResolvableReport> _report;
31 bool _abort;
32 std::string _finishInfo;
33
34 public:
35
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
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 {
75 callback::SendReport <rpm::RemoveResolvableReport> _report;
77 bool _abort;
78 std::string _finishInfo;
79
80 public:
81
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
Base class for Exception.
Definition Exception.h:153
TraitsType::constPtrType constPtr
Definition Resolvable.h:59
void start(const Pathname &name) override
Start the operation.
void tryLevel(target::rpm::InstallResolvableReport::RpmLevel level_r)
void finishInfo(const std::string &info_r) override
Additional rpm output to be reported in finish in case of success.
bool progress(unsigned percent) override
Inform about progress Return true on abort.
void report(const UserData &userData_r) override
Forwards generic reports.
void finish() override
Finish operation in case of success.
target::rpm::InstallResolvableReport::RpmLevel _level
callback::SendReport< rpm::InstallResolvableReport > _report
rpm::RpmInstallReport::Action problem(Exception &excpt_r) override
inform user about a problem
void finish() override
Finish operation in case of success.
void start(const std::string &name) override
RpmRemovePackageReceiver(Resolvable::constPtr res)
RpmRemovePackageReceiver.
void finishInfo(const std::string &info_r) override
Additional rpm output to be reported in finish in case of success.
bool progress(unsigned percent) override
Inform about progress Return true on abort.
bool aborted() const
Returns true if removing is aborted during progress.
void report(const UserData &userData_r) override
Start the operation.
callback::SendReport< rpm::RemoveResolvableReport > _report
rpm::RpmRemoveReport::Action problem(Exception &excpt_r) override
inform user about a problem
Easy-to use interface to the ZYPP dependency resolver.