Make packages rpovide relevant files
[platform/upstream/libzypp.git] / zypp / target / rpm / RpmPackageImpl.h
1 /*---------------------------------------------------------------------\
2 |                          ____ _   __ __ ___                          |
3 |                         |__  / \ / / . \ . \                         |
4 |                           / / \ V /|  _/  _/                         |
5 |                          / /__ | | | | | |                           |
6 |                         /_____||_| |_| |_|                           |
7 |                                                                      |
8 \---------------------------------------------------------------------*/
9 /** \file zypp/target/rpm/RpmPackageImpl.h
10  *
11 */
12 #ifndef ZYPP_TARGET_RPM_RPMPACKAGEIMPL_H
13 #define ZYPP_TARGET_RPM_RPMPACKAGEIMPL_H
14
15 #include "zypp/detail/PackageImplIf.h"
16 #include "zypp/Changelog.h"
17 #include "zypp/target/rpm/RpmHeader.h"
18
19 ///////////////////////////////////////////////////////////////////
20 namespace zypp
21 { /////////////////////////////////////////////////////////////////
22   ///////////////////////////////////////////////////////////////////
23   namespace target
24   { /////////////////////////////////////////////////////////////////
25     namespace rpm
26     { //////////////////////////////////////////////////////////////
27
28       ///////////////////////////////////////////////////////////////////
29       //
30       //        CLASS NAME : RPMPackageImpl
31       //
32       /** Class representing a package
33       */
34       class RPMPackageImpl : public detail::PackageImplIf
35       {
36       public:
37         /** Default ctor
38         */
39         RPMPackageImpl(
40           const RpmHeader::constPtr data
41         );
42
43         /** Package summary */
44         virtual Label summary() const;
45         /** Package description */
46         virtual Text description() const;
47         virtual Text insnotify() const;
48         virtual Text delnotify() const;
49         virtual ByteCount size() const;
50         virtual bool providesSources() const;
51         virtual Label instSrcLabel() const;
52         virtual Vendor instSrcVendor() const;
53         /** */
54         virtual Date buildtime() const;
55         /** */
56         virtual std::string buildhost() const;
57         /** */
58         virtual Date installtime() const;
59         /** */
60         virtual std::string distribution() const;
61         /** */
62         virtual Vendor vendor() const;
63         /** */
64         virtual Label license() const;
65         /** */
66         virtual std::string packager() const;
67         /** */
68         virtual PackageGroup group() const;
69         /** */
70         virtual Changelog changelog() const;
71         /** Don't ship it as class Url, because it might be
72          * in fact anything but a legal Url. */
73         virtual std::string url() const;
74         /** */
75         virtual std::string os() const;
76         /** */
77         virtual Text prein() const;
78         /** */
79         virtual Text postin() const;
80         /** */
81         virtual Text preun() const;
82         /** */
83         virtual Text postun() const;
84         /** */
85         virtual ByteCount sourcesize() const;
86         /** */
87         virtual ByteCount archivesize() const;
88         /** */
89         virtual Text authors() const;
90         /** */
91         virtual Text filenames() const;
92         /** */
93         virtual License licenseToConfirm() const;
94         /** */
95         virtual std::string type() const;
96         /** */
97         virtual std::list<std::string> keywords() const;
98
99       protected:
100         Label _summary;
101         Text _description;
102         Date _buildtime;
103         std::string _buildhost;
104         std::string _url;
105         Vendor _vendor;
106         Label _license;
107         std::string _packager;
108         PackageGroup _group;
109         Changelog _changelog;
110         std::string _type;
111         License _license_to_confirm;
112         Text _authors;
113         std::list<std::string>_keywords;
114         Text _filenames;
115        };
116       ///////////////////////////////////////////////////////////////////
117     } // namespace rpm
118     /////////////////////////////////////////////////////////////////
119   } // namespace target
120   /////////////////////////////////////////////////////////////////
121 } // namespace zypp
122 ///////////////////////////////////////////////////////////////////
123 #endif // ZYPP_TARGET_RPM_RPMPACKAGEIMPL_H