--- /dev/null
+/*---------------------------------------------------------------------\
+| ____ _ __ __ ___ |
+| |__ / \ / / . \ . \ |
+| / / \ V /| _/ _/ |
+| / /__ | | | | | | |
+| /_____||_| |_| |_| |
+| |
+\---------------------------------------------------------------------*/
+/** \file zypp/detail/PackageImplIf.cc
+ *
+*/
+#include "zypp/detail/PackageImplIf.h"
+
+///////////////////////////////////////////////////////////////////
+namespace zypp
+{ /////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////
+ namespace detail
+ { /////////////////////////////////////////////////////////////////
+
+ /////////////////////////////////////////////////////////////////
+ // Default implementation of PackageImplIf attributes,
+ // as far as resonable.
+ /////////////////////////////////////////////////////////////////
+
+ Date PackageImplIf::buildtime() const
+ { return Date(); }
+
+ std::string PackageImplIf::buildhost() const
+ { return std::string(); }
+
+ Date PackageImplIf::installtime() const
+ { return Date(); }
+
+ std::string PackageImplIf::distribution() const
+ { return std::string(); }
+
+ Vendor PackageImplIf::vendor() const
+ { return Vendor(); }
+
+ Label PackageImplIf::license() const
+ { return Label(); }
+
+ std::string PackageImplIf::packager() const
+ { return std::string(); }
+
+ PackageGroup PackageImplIf::group() const
+ { return PackageGroup(); }
+
+ Text PackageImplIf::changelog() const
+ { return Text(); }
+
+ std::string PackageImplIf::url() const
+ { return std::string(); }
+
+ std::string PackageImplIf::os() const
+ { return std::string(); }
+
+ std::list<std::string> PackageImplIf::prein() const
+ { return std::list<std::string>(); }
+
+ std::list<std::string> PackageImplIf::postin() const
+ { return std::list<std::string>(); }
+
+ std::list<std::string> PackageImplIf::preun() const
+ { return std::list<std::string>(); }
+
+ std::list<std::string> PackageImplIf::postun() const
+ { return std::list<std::string>(); }
+
+ FSize PackageImplIf::sourcesize() const
+ { return FSize(); }
+
+ FSize PackageImplIf::archivesize() const
+ { return FSize(); }
+
+ std::list<std::string> PackageImplIf::authors() const
+ { return std::list<std::string>(); }
+
+ std::list<std::string> PackageImplIf::filenames() const
+ { return std::list<std::string>(); }
+
+ License PackageImplIf::licenseToConfirm() const
+ { return License(); }
+
+ /////////////////////////////////////////////////////////////////
+ } // namespace detail
+ ///////////////////////////////////////////////////////////////////
+ /////////////////////////////////////////////////////////////////
+} // namespace zypp
+///////////////////////////////////////////////////////////////////
typedef Package ResType;
public:
-#if 0
- /** */
- virtual std::list<std::string> insnotify() const;
- /** */
- virtual std::list<std::string> delnotify() const;
- /** */
- virtual FSize size() const;
- /** */
- virtual bool providesSources() const;
- /** */
- virtual std::string instSrcLabel() const;
- /** */
- virtual Vendor instSrcVendor() const;
- /** */
- virtual unsigned instSrcRank() const;
- /** */
- virtual PkgSplitSet splitprovides() const;
+ /** \name Rpm Package Attributes. */
+ //@{
/** */
- virtual Date buildtime() const;
+ virtual Date buildtime() const PURE_VIRTUAL;
/** */
- virtual std::string buildhost() const;
+ virtual std::string buildhost() const PURE_VIRTUAL;
/** */
- virtual Date installtime() const;
+ virtual Date installtime() const PURE_VIRTUAL;
/** */
- virtual std::string distribution() const;
+ virtual std::string distribution() const PURE_VIRTUAL;
/** */
- virtual Vendor vendor() const;
+ virtual Vendor vendor() const PURE_VIRTUAL;
/** */
- virtual std::string license() const;
+ virtual Label license() const PURE_VIRTUAL;
/** */
- virtual std::list<std::string> licenseToConfirm() const;
+ virtual std::string packager() const PURE_VIRTUAL;
/** */
- virtual std::string packager() const;
+ virtual PackageGroup group() const PURE_VIRTUAL;
/** */
- virtual std::string group() const;
+ virtual Text changelog() const PURE_VIRTUAL;
+ /** Don't ship it as class Url, because it might be
+ * in fact anything but a legal Url. */
+ virtual std::string url() const PURE_VIRTUAL;
/** */
- virtual YStringTreeItem * group_ptr() const;
+ virtual std::string os() const PURE_VIRTUAL;
/** */
- virtual std::list<std::string> changelog() const;
+ virtual std::list<std::string> prein() const PURE_VIRTUAL;
/** */
- virtual std::string url() const;
+ virtual std::list<std::string> postin() const PURE_VIRTUAL;
/** */
- virtual std::string os() const;
+ virtual std::list<std::string> preun() const PURE_VIRTUAL;
/** */
- virtual std::list<std::string> prein() const;
+ virtual std::list<std::string> postun() const PURE_VIRTUAL;
/** */
- virtual std::list<std::string> postin() const;
+ virtual FSize sourcesize() const PURE_VIRTUAL;
/** */
- virtual std::list<std::string> preun() const;
+ virtual FSize archivesize() const PURE_VIRTUAL;
/** */
- virtual std::list<std::string> postun() const;
+ virtual std::list<std::string> authors() const PURE_VIRTUAL;
/** */
- virtual std::string sourceloc() const;
- /** */
- virtual FSize sourcesize() const;
- /** */
- virtual FSize archivesize() const;
- /** */
- virtual std::list<std::string> authors() const;
- /** */
- virtual std::list<std::string> filenames() const;
- /** */
- virtual std::list<std::string> recommends() const;
- /** */
- virtual std::list<std::string> suggests() const;
+ virtual std::list<std::string> filenames() const PURE_VIRTUAL;
+ //@}
+
+ /** \name Additional Package Attributes.
+ * \todo review what's actually needed here. Maybe worth grouping
+ * all the package rertieval related stuff in a class. Easier to ship
+ * and handle it.
+ */
+ //@{
+ /** */
+ virtual License licenseToConfirm() const PURE_VIRTUAL;
+#if 0
/** */
- virtual std::string location() const;
+ virtual std::string sourceloc() const PURE_VIRTUAL;
/** */
- virtual unsigned int medianr() const;
+ virtual void du( PkgDu & dudata_r ) const PURE_VIRTUAL;
/** */
- virtual std::list<std::string> keywords() const;
+ virtual std::string location() const PURE_VIRTUAL;
/** */
- virtual std::string md5sum() const;
+ virtual unsigned int medianr() const PURE_VIRTUAL;
/** */
- virtual std::string externalUrl() const;
+ virtual PackageKeywords keywords() const PURE_VIRTUAL;
/** */
- virtual std::list<PkgEdition> patchRpmBaseVersions() const;
+ virtual std::string md5sum() const PURE_VIRTUAL;
/** */
- virtual FSize patchRpmSize() const;
+ virtual std::string externalUrl() const PURE_VIRTUAL;
/** */
- virtual bool forceInstall() const;
+ virtual std::list<Edition> patchRpmBaseVersions() const PURE_VIRTUAL;
/** */
- virtual std::string patchRpmMD5() const;
+ virtual FSize patchRpmSize() const PURE_VIRTUAL;
/** */
- virtual bool isRemote() const;
+ virtual bool forceInstall() const PURE_VIRTUAL;
/** */
- virtual PMError providePkgToInstall( Pathname& path_r ) const;
+ virtual std::string patchRpmMD5() const PURE_VIRTUAL;
/** */
- virtual PMError provideSrcPkgToInstall( Pathname& path_r ) const;
+ virtual bool isRemote() const PURE_VIRTUAL;
/** */
- virtual constInstSrcPtr source() const;
+ virtual PMError providePkgToInstall( Pathname& path_r ) const PURE_VIRTUAL;
/** */
- virtual bool prefererCandidate() const;
+ virtual PMError provideSrcPkgToInstall( Pathname& path_r ) const PURE_VIRTUAL;
/** */
- virtual void du( PkgDu & dudata_r ) const;
+ virtual constInstSrcPtr source() const PURE_VIRTUAL;
/** */
- virtual std::list<PMPackageDelta> deltas() const;
+ virtual std::list<PMPackageDelta> deltas() const PURE_VIRTUAL;
#endif
+ //@}
};
///////////////////////////////////////////////////////////////////