1 /*---------------------------------------------------------------------\
3 | |__ / \ / / . \ . \ |
8 \---------------------------------------------------------------------*/
9 /** \file zypp/detail/PackageImplIf.h
12 #ifndef ZYPP_DETAIL_PACKAGEIMPLIF_H
13 #define ZYPP_DETAIL_PACKAGEIMPLIF_H
15 #include "zypp/detail/ResObjectImplIf.h"
17 ///////////////////////////////////////////////////////////////////
19 { /////////////////////////////////////////////////////////////////
23 ///////////////////////////////////////////////////////////////////
25 { /////////////////////////////////////////////////////////////////
27 ///////////////////////////////////////////////////////////////////
29 // CLASS NAME : PackageImplIf
31 /** Abstact Package implementation interface.
33 class PackageImplIf : public ResObjectImplIf
36 typedef Package ResType;
41 CheckSum(std::string type, bool pkgid, std::string checksum) {
42 _type = type; _pkgid = pkgid; _checksum = checksum;
44 std::string type() { return _type; }
45 bool pkgid() { return _pkgid; }
46 std::string checksum() { return _checksum; }
50 std::string _checksum;
53 * @short Holds data about how much space will be needed per directory
58 DirSize(const std::string& path,
59 const std::string& size,
60 const std::string& fileCount)
61 : path(path), sizeKByte(size), fileCount(fileCount)
63 const std::string path;
64 const std::string sizeKByte;
65 const std::string fileCount;
69 * @short Holds Data about file and file type
77 FileData(const std::string &name,
78 const std::string &type)
79 : name(name), type(type)
85 /** \name Rpm Package Attributes. */
88 virtual Date buildtime() const PURE_VIRTUAL;
90 virtual std::string buildhost() const PURE_VIRTUAL;
92 virtual Date installtime() const PURE_VIRTUAL;
94 virtual std::string distribution() const PURE_VIRTUAL;
96 virtual Vendor vendor() const PURE_VIRTUAL;
98 virtual Label license() const PURE_VIRTUAL;
100 virtual std::string packager() const PURE_VIRTUAL;
102 virtual PackageGroup group() const PURE_VIRTUAL;
104 virtual Text changelog() const PURE_VIRTUAL;
105 /** Don't ship it as class Url, because it might be
106 * in fact anything but a legal Url. */
107 virtual std::string url() const PURE_VIRTUAL;
109 virtual std::string os() const PURE_VIRTUAL;
111 virtual Text prein() const PURE_VIRTUAL;
113 virtual Text postin() const PURE_VIRTUAL;
115 virtual Text preun() const PURE_VIRTUAL;
117 virtual Text postun() const PURE_VIRTUAL;
119 virtual FSize sourcesize() const PURE_VIRTUAL;
121 virtual FSize archivesize() const PURE_VIRTUAL;
123 virtual Text authors() const PURE_VIRTUAL;
125 virtual Text filenames() const PURE_VIRTUAL;
128 /** \name Additional Package Attributes.
129 * \todo review what's actually needed here. Maybe worth grouping
130 * all the package rertieval related stuff in a class. Easier to ship
135 virtual License licenseToConfirm() const PURE_VIRTUAL;
138 virtual std::string sourceloc() const PURE_VIRTUAL;
140 virtual void du( PkgDu & dudata_r ) const PURE_VIRTUAL;
142 virtual std::string location() const PURE_VIRTUAL;
144 virtual unsigned int medianr() const PURE_VIRTUAL;
146 virtual PackageKeywords keywords() const PURE_VIRTUAL;
148 virtual std::string md5sum() const PURE_VIRTUAL;
150 virtual std::string externalUrl() const PURE_VIRTUAL;
152 virtual std::list<Edition> patchRpmBaseVersions() const PURE_VIRTUAL;
154 virtual FSize patchRpmSize() const PURE_VIRTUAL;
156 virtual bool forceInstall() const PURE_VIRTUAL;
158 virtual std::string patchRpmMD5() const PURE_VIRTUAL;
160 virtual bool isRemote() const PURE_VIRTUAL;
162 virtual PMError providePkgToInstall( Pathname& path_r ) const PURE_VIRTUAL;
164 virtual PMError provideSrcPkgToInstall( Pathname& path_r ) const PURE_VIRTUAL;
166 virtual constInstSrcPtr source() const PURE_VIRTUAL;
168 virtual std::list<PMPackageDelta> deltas() const PURE_VIRTUAL;
172 ///////////////////////////////////////////////////////////////////
174 /////////////////////////////////////////////////////////////////
175 } // namespace detail
176 ///////////////////////////////////////////////////////////////////
177 /////////////////////////////////////////////////////////////////
179 ///////////////////////////////////////////////////////////////////
180 #endif // ZYPP_DETAIL_PACKAGEIMPLIF_H