35da351f1f99072cb6ba3c01947db77b0d118101
[platform/upstream/libzypp.git] / zypp / source / yum / YUMScriptImpl.h
1 /*---------------------------------------------------------------------\
2 |                          ____ _   __ __ ___                          |
3 |                         |__  / \ / / . \ . \                         |
4 |                           / / \ V /|  _/  _/                         |
5 |                          / /__ | | | | | |                           |
6 |                         /_____||_| |_| |_|                           |
7 |                                                                      |
8 \---------------------------------------------------------------------*/
9 /** \file zypp/source/yum/YUMScriptImpl.h
10  *
11 */
12 #ifndef ZYPP_SOURCE_YUM_YUMSCRIPTIMPL_H
13 #define ZYPP_SOURCE_YUM_YUMSCRIPTIMPL_H
14
15 #include "zypp/detail/ScriptImpl.h"
16 #include "zypp/parser/yum/YUMParserData.h"
17
18 ///////////////////////////////////////////////////////////////////
19 namespace zypp
20 { /////////////////////////////////////////////////////////////////
21   ///////////////////////////////////////////////////////////////////
22   namespace source
23   { /////////////////////////////////////////////////////////////////
24     namespace yum
25     { //////////////////////////////////////////////////////////////
26
27       ///////////////////////////////////////////////////////////////////
28       //
29       //        CLASS NAME : YUMScriptImpl
30       //
31       /** Class representing an update script */
32       class YUMScriptImpl : public detail::ScriptImplIf
33       {
34       public:
35         /** Default ctor */
36         YUMScriptImpl( const zypp::parser::yum::YUMPatchScript & parsed );
37         /** Get the script to perform the change */
38         virtual std::string do_script() const;
39         /** Get the script to undo the change */
40         virtual std::string undo_script() const;
41         /** Check whether script to undo the change is available */
42         virtual bool undo_available() const;
43
44         virtual Label summary() const;
45         virtual Text description() const;
46         virtual Text insnotify() const;
47         virtual Text delnotify() const;
48         virtual FSize size() const;
49         virtual bool providesSources() const;
50         virtual Label instSrcLabel() const;
51         virtual Vendor instSrcVendor() const;
52
53
54       protected:
55         /** The script to perform the change */
56         std::string _do_script;
57         /** The script to undo the change */
58         std::string _undo_script;
59       };
60       ///////////////////////////////////////////////////////////////////
61     } // namespace yum
62     /////////////////////////////////////////////////////////////////
63   } // namespace source
64   ///////////////////////////////////////////////////////////////////
65   /////////////////////////////////////////////////////////////////
66 } // namespace zypp
67 ///////////////////////////////////////////////////////////////////
68 #endif // ZYPP_SOURCE_YUM_YUMSCRIPTIMPL_H