00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef InstTargetCallbacks_h
00022 #define InstTargetCallbacks_h
00023
00024 #include <iosfwd>
00025
00026 #include <y2pm/PMCallbacks.h>
00027
00029 namespace InstTargetCallbacks {
00031
00033
00035 struct ScriptExecCallback : public RedirectCallback<ScriptExecCallback> {
00036 virtual void start( const Pathname & pkpath ) = 0;
00042 virtual bool progress( const ProgressData & prg ) = 0;
00043 virtual void stop( PMError error ) = 0;
00044 };
00045
00046 class ScriptExecReport : public Report<ScriptExecCallback> {
00047 virtual void start( const Pathname & pkpath ) {
00048 ScriptExecCallback::start( pkpath );
00049 }
00050 virtual bool progress( const ProgressData & prg ) {
00051 return ScriptExecCallback::progress( prg );
00052 }
00053 virtual void stop( PMError error ) {
00054 ScriptExecCallback::stop( error );
00055 }
00056 };
00057
00058 extern ScriptExecReport scriptExecReport;
00059
00060 #if 0
00061
00062
00064 struct @Callback : public RedirectCallback<@Callback> {
00065 virtual void start() = 0;
00066 virtual void progress( const ProgressData & prg ) = 0;
00067 virtual void stop( PMError error ) = 0;
00068 };
00069
00070 class @Report : public Report<@Callback> {
00071 virtual void start() {
00072 @Callback::start();
00073 }
00074 virtual void progress( const ProgressData & prg ) {
00075 @Callback::progress( prg );
00076 }
00077 virtual void stop( PMError error ) {
00078 @Callback::stop( error );
00079 }
00080 };
00081
00082 extern @Report @Report;
00083 #endif
00084
00086 }
00088
00089 #endif // InstTargetCallbacks_h