TargetCallbackReceiver.h

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------\
00002 |                          ____ _   __ __ ___                          |
00003 |                         |__  / \ / / . \ . \                         |
00004 |                           / / \ V /|  _/  _/                         |
00005 |                          / /__ | | | | | |                           |
00006 |                         /_____||_| |_| |_|                           |
00007 |                                                                      |
00008 \---------------------------------------------------------------------*/
00012 #ifndef ZYPP_TARGET_TARGETCALLBACKRECEIVER_H
00013 #define ZYPP_TARGET_TARGETCALLBACKRECEIVER_H
00014 
00015 #include "zypp/ZYppCallbacks.h"
00016 #include "zypp/target/rpm/RpmCallbacks.h"
00017 
00019 namespace zypp
00020 { 
00021 
00022   namespace target
00023   { 
00024 
00025     class RpmInstallPackageReceiver 
00026         : public callback::ReceiveReport<rpm::RpmInstallReport>
00027     {
00028         callback::SendReport <rpm::InstallResolvableReport> _report;
00029         Resolvable::constPtr _resolvable;
00030         target::rpm::InstallResolvableReport::RpmLevel _level;
00031         bool _abort;
00032 
00033       public:
00034 
00035         RpmInstallPackageReceiver (Resolvable::constPtr res);
00036         virtual ~RpmInstallPackageReceiver ();
00037         
00038         virtual void reportbegin();
00039         
00040         virtual void reportend();
00041 
00043         virtual void start( const Pathname & name );
00044         
00045         void tryLevel( target::rpm::InstallResolvableReport::RpmLevel level_r );
00046         
00047         bool aborted() const { return _abort; }
00048 
00053         virtual bool progress( unsigned percent );
00054 
00056         virtual rpm::RpmInstallReport::Action problem( Exception & excpt_r );
00057 
00059         virtual void finish();
00060 
00062         virtual void finish( Exception & excpt_r );
00063     };
00064         
00065     class RpmRemovePackageReceiver 
00066         : public callback::ReceiveReport<rpm::RpmRemoveReport>
00067     {
00068         callback::SendReport <rpm::RemoveResolvableReport> _report;
00069         Resolvable::constPtr _resolvable;
00070 
00071       public:
00072 
00073         RpmRemovePackageReceiver (Resolvable::constPtr res);
00074         virtual ~RpmRemovePackageReceiver ();
00075         
00076         virtual void reportbegin();
00077         
00078         virtual void reportend();
00079 
00081         virtual void start( const std::string & name );
00082         
00087         virtual bool progress( unsigned percent );
00088 
00090         virtual rpm::RpmRemoveReport::Action problem( Exception & excpt_r );
00091 
00093         virtual void finish();
00094 
00096         virtual void finish( Exception & excpt_r );
00097     };
00098         
00100   } // namespace target
00103 } // namespace zypp
00105 #endif // ZYPP_TARGET_TARGETCALLBACKRECEIVER_H

Generated on Thu Jul 6 00:07:28 2006 for zypp by  doxygen 1.4.6