1 /*---------------------------------------------------------------------\
3 | |__ / \ / / . \ . \ |
8 \---------------------------------------------------------------------*/
9 /** \file zypp/detail/ScriptImplIf.h
12 #ifndef ZYPP_DETAIL_SCRIPTIMPLIF_H
13 #define ZYPP_DETAIL_SCRIPTIMPLIF_H
15 #include "zypp/detail/ResObjectImplIf.h"
16 #include "zypp/Pathname.h"
18 ///////////////////////////////////////////////////////////////////
20 { /////////////////////////////////////////////////////////////////
24 ///////////////////////////////////////////////////////////////////
26 { /////////////////////////////////////////////////////////////////
28 ///////////////////////////////////////////////////////////////////
30 // CLASS NAME : ScriptImplIf
32 /** Abstract Script implementation interface.
34 class ScriptImplIf : public ResObjectImplIf
37 typedef Script ResType;
40 /** Overloaded ResObjectImpl attribute.
41 * \return The \ref doScriptLocation media number
42 * or \c 0 if do-script is inlined.
44 virtual unsigned mediaNr() const;
47 /** Check whether a script is available. */
48 virtual bool doAvailable() const;
50 /** Return an inlined script if available.
51 * Otherwise it is available at \ref doScriptLocation.
53 virtual std::string doScriptInlined() const;
55 /** Location of the script, unless it is available inlined.
56 * \see \ref doScriptInlined
58 virtual OnMediaLocation doScriptLocation() const;
60 /** Check whether a script to undo the change is available. */
61 virtual bool undoAvailable() const;
63 /** Return an inlined undo script if available.
64 * Otherwise it is available at \ref undoScriptLocation.
66 virtual std::string undoScriptInlined() const;
68 /** Location of the undo script, unless it is available inlined.
69 * \see \ref undoScriptInlined
71 virtual OnMediaLocation undoScriptLocation() const;
73 ///////////////////////////////////////////////////////////////////
75 /////////////////////////////////////////////////////////////////
77 ///////////////////////////////////////////////////////////////////
78 /////////////////////////////////////////////////////////////////
80 ///////////////////////////////////////////////////////////////////
81 #endif // ZYPP_DETAIL_SCRIPTIMPLIF_H