1 /*---------------------------------------------------------------------\
3 | |__ / \ / / . \ . \ |
8 \---------------------------------------------------------------------*/
9 /** \file zypp/detail/PackageImplIf.h
12 #ifndef ZYPP_DETAIL_PACKAGEIMPLIF_H
13 #define ZYPP_DETAIL_PACKAGEIMPLIF_H
17 #include "zypp/detail/ResObjectImplIf.h"
18 #include "zypp/Edition.h"
19 #include "zypp/Arch.h"
20 #include "zypp/Changelog.h"
21 #include "zypp/PatchRpm.h"
22 #include "zypp/DeltaRpm.h"
24 ///////////////////////////////////////////////////////////////////
26 { /////////////////////////////////////////////////////////////////
30 ///////////////////////////////////////////////////////////////////
32 { /////////////////////////////////////////////////////////////////
34 ///////////////////////////////////////////////////////////////////
36 // CLASS NAME : PackageImplIf
38 /** Abstact Package implementation interface.
40 class PackageImplIf : public ResObjectImplIf
43 typedef Package ResType;
48 * @short Holds Data about file and file type
56 FileData(const std::string &name,
57 const std::string &type)
58 : name(name), type(type)
64 /** \name Rpm Package Attributes. */
67 virtual Date buildtime() const PURE_VIRTUAL;
69 virtual std::string buildhost() const PURE_VIRTUAL;
71 virtual Date installtime() const PURE_VIRTUAL;
73 virtual std::string distribution() const PURE_VIRTUAL;
75 virtual Vendor vendor() const PURE_VIRTUAL;
77 virtual Label license() const PURE_VIRTUAL;
79 virtual std::string packager() const PURE_VIRTUAL;
81 virtual PackageGroup group() const PURE_VIRTUAL;
83 virtual Changelog changelog() const PURE_VIRTUAL;
85 virtual Pathname location() const PURE_VIRTUAL;
86 /** Don't ship it as class Url, because it might be
87 * in fact anything but a legal Url. */
88 virtual std::string url() const PURE_VIRTUAL;
90 virtual std::string os() const PURE_VIRTUAL;
92 virtual Text prein() const PURE_VIRTUAL;
94 virtual Text postin() const PURE_VIRTUAL;
96 virtual Text preun() const PURE_VIRTUAL;
98 virtual Text postun() const PURE_VIRTUAL;
100 virtual ByteCount sourcesize() const PURE_VIRTUAL;
102 virtual ByteCount archivesize() const PURE_VIRTUAL;
104 virtual std::list<std::string> authors() const PURE_VIRTUAL;
106 virtual std::list<std::string> filenames() const PURE_VIRTUAL;
108 virtual std::list<DeltaRpm> deltaRpms() const PURE_VIRTUAL;
110 virtual std::list<PatchRpm> patchRpms() const PURE_VIRTUAL;
112 virtual bool installOnly() const PURE_VIRTUAL;
116 /** \name Additional Package Attributes.
117 * \todo review what's actually needed here. Maybe worth grouping
118 * all the package rertieval related stuff in a class. Easier to ship
123 virtual License licenseToConfirm() const PURE_VIRTUAL;
126 virtual std::string sourceloc() const PURE_VIRTUAL;
128 virtual void du( PkgDu & dudata_r ) const PURE_VIRTUAL;
130 virtual std::string location() const PURE_VIRTUAL;
132 virtual unsigned int medianr() const PURE_VIRTUAL;
134 virtual PackageKeywords keywords() const PURE_VIRTUAL;
136 virtual std::string md5sum() const PURE_VIRTUAL;
138 virtual std::string externalUrl() const PURE_VIRTUAL;
140 virtual std::list<Edition> patchRpmBaseVersions() const PURE_VIRTUAL;
142 virtual ByteCount patchRpmSize() const PURE_VIRTUAL;
144 virtual bool forceInstall() const PURE_VIRTUAL;
146 virtual std::string patchRpmMD5() const PURE_VIRTUAL;
148 virtual bool isRemote() const PURE_VIRTUAL;
150 virtual PMError providePkgToInstall( Pathname& path_r ) const PURE_VIRTUAL;
152 virtual PMError provideSrcPkgToInstall( Pathname& path_r ) const PURE_VIRTUAL;
154 virtual constInstSrcPtr source() const PURE_VIRTUAL;
156 virtual std::list<PMPackageDelta> deltas() const PURE_VIRTUAL;
160 ///////////////////////////////////////////////////////////////////
162 /////////////////////////////////////////////////////////////////
163 } // namespace detail
164 ///////////////////////////////////////////////////////////////////
165 /////////////////////////////////////////////////////////////////
167 ///////////////////////////////////////////////////////////////////
168 #endif // ZYPP_DETAIL_PACKAGEIMPLIF_H