1 /*---------------------------------------------------------------------\
3 | |__ / \ / / . \ . \ |
8 \---------------------------------------------------------------------*/
9 /** \file zypp/target/rpm/RpmCallbacks.h
13 #ifndef ZYPP_TARGET_RPM_RPMCALLBACKS_H
14 #define ZYPP_TARGET_RPM_RPMCALLBACKS_H
19 #include <zypp/Callback.h>
20 #include <zypp/base/Exception.h>
21 #include <zypp/Pathname.h>
30 ///////////////////////////////////////////////////////////////////
31 // Reporting progress of package removing
32 ///////////////////////////////////////////////////////////////////
33 struct RpmRemoveReport : public callback::ReportBase
37 ABORT, // abort and return error
42 /** Start the operation */
43 virtual void start( const std::string & name )
46 * Inform about progress
47 * Return true on abort
49 virtual bool progress( unsigned percent )
52 virtual Action problem( Exception & excpt_r )
55 /** Additional rpm output to be reported in \ref finish in case of success. */
56 virtual void finishInfo( const std::string & info_r )
59 /** Finish operation in case of success */
62 /** Finish operation in case of fail, report fail exception */
63 virtual void finish( Exception & excpt_r )
67 ///////////////////////////////////////////////////////////////////
68 // Reporting progress of package installation
69 ///////////////////////////////////////////////////////////////////
70 struct RpmInstallReport : public callback::ReportBase
74 ABORT, // abort and return error
79 /** Start the operation */
80 virtual void start( const Pathname & name )
83 * Inform about progress
84 * Return false on abort
86 virtual bool progress( unsigned percent )
89 /** Additional rpm output to be reported in \ref finish in case of success. */
90 virtual void finishInfo( const std::string & info_r )
93 /** Finish operation in case of success */
97 virtual Action problem( Exception & excpt_r )
100 /** Finish operation in case of fail, report fail exception */
101 virtual void finish( Exception & excpt_r )
106 } // namespace target
109 #endif // ZYPP_TARGET_RPM_RPMCALLBACKS_H