libzypp 17.31.32
TargetCallbackReceiver.cc
Go to the documentation of this file.
1/*---------------------------------------------------------------------\
2| ____ _ __ __ ___ |
3| |__ / \ / / . \ . \ |
4| / / \ V /| _/ _/ |
5| / /__ | | | | | | |
6| /_____||_| |_| |_| |
7| |
8\---------------------------------------------------------------------*/
12#include <iostream>
13
15
17
19namespace zypp
20{
22 namespace target
23 {
24
26 : callback::ReceiveReport<rpm::RpmInstallReport> ()
27 , _resolvable (res)
28 , _level( target::rpm::InstallResolvableReport::RPM )
29 , _abort (false)
30 {
31 }
32
36
40
44
46 {
47 if ( ! userData_r.haskey( "solvable" ) )
48 userData_r.set( "solvable", _resolvable->satSolvable() );
49 _report->report( userData_r );
50 }
51
54 {
55 _report->start( _resolvable );
56 _abort = false;
57 }
58
64 {
65 _abort = ! _report->progress( percent, _resolvable );
66 return _abort;
67 }
68
91
93 {
95 }
96
102
108
113
114
118
120 : callback::ReceiveReport<rpm::RpmRemoveReport> ()
121 , _resolvable (res)
122 , _abort(false)
123 {
124 }
125
129
133
137
140 {
141 if ( ! userData_r.haskey( "solvable" ) )
142 userData_r.set( "solvable", _resolvable->satSolvable() );
143 _report->report( userData_r );
144 }
145
146 void RpmRemovePackageReceiver::start( const std::string & name )
147 {
148 _report->start( _resolvable );
149 _abort = false;
150 }
151
157 {
158 _abort = ! _report->progress( percent, _resolvable );
159 return _abort;
160 }
161
183
185 {
187 }
188
195
201
203 } // namespace target
205
207} // namespace zypp
Reference counted access to a Tp object calling a custom Dispose function when the last AutoDispose h...
Definition AutoDispose.h:94
Base class for Exception.
Definition Exception.h:146
TraitsType::constPtrType constPtr
Definition Resolvable.h:59
virtual void finish()
Finish operation in case of success.
void tryLevel(target::rpm::InstallResolvableReport::RpmLevel level_r)
virtual void finishInfo(const std::string &info_r)
Additional rpm output to be reported in finish in case of success.
virtual void start(const Pathname &name)
Start the operation.
void report(const UserData &userData_r) override
Forwards generic reports.
virtual rpm::RpmInstallReport::Action problem(Exception &excpt_r)
inform user about a problem
target::rpm::InstallResolvableReport::RpmLevel _level
virtual bool progress(unsigned percent)
Inform about progress Return true on abort.
callback::SendReport< rpm::InstallResolvableReport > _report
RpmRemovePackageReceiver(Resolvable::constPtr res)
RpmRemovePackageReceiver.
virtual void start(const std::string &name)
virtual void finish()
Finish operation in case of success.
void report(const UserData &userData_r) override
Start the operation.
callback::SendReport< rpm::RemoveResolvableReport > _report
virtual bool progress(unsigned percent)
Inform about progress Return true on abort.
virtual void finishInfo(const std::string &info_r)
Additional rpm output to be reported in finish in case of success.
virtual rpm::RpmRemoveReport::Action problem(Exception &excpt_r)
inform user about a problem
Easy-to use interface to the ZYPP dependency resolver.
virtual Action problem(Exception &excpt_r)
virtual Action problem(Exception &excpt_r)