RpmPackageImpl.h

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------\
00002 |                          ____ _   __ __ ___                          |
00003 |                         |__  / \ / / . \ . \                         |
00004 |                           / / \ V /|  _/  _/                         |
00005 |                          / /__ | | | | | |                           |
00006 |                         /_____||_| |_| |_|                           |
00007 |                                                                      |
00008 \---------------------------------------------------------------------*/
00012 #ifndef ZYPP_TARGET_RPM_RPMPACKAGEIMPL_H
00013 #define ZYPP_TARGET_RPM_RPMPACKAGEIMPL_H
00014 
00015 #include "zypp/detail/PackageImplIf.h"
00016 #include "zypp/Changelog.h"
00017 #include "zypp/target/rpm/RpmHeader.h"
00018 
00020 namespace zypp
00021 { 
00022 
00023 namespace target
00024 { 
00025 namespace rpm
00026 { 
00027 
00029 //
00030 //        CLASS NAME : RPMPackageImpl
00031 //
00034 class RPMPackageImpl : public detail::PackageImplIf
00035 {
00036 public:
00039   RPMPackageImpl(
00040     const RpmHeader::constPtr data
00041   );
00042 
00044   virtual TranslatedText summary() const;
00046   virtual TranslatedText description() const;
00048   virtual ByteCount size() const;
00050   virtual Date buildtime() const;
00052   virtual std::string buildhost() const;
00054   virtual Date installtime() const;
00056   virtual std::string distribution() const;
00058   virtual Vendor vendor() const;
00060   virtual Label license() const;
00062   virtual std::string packager() const;
00064   virtual PackageGroup group() const;
00066   virtual Changelog changelog() const;
00067 
00070   virtual std::string url() const;
00072   virtual std::string os() const;
00074   virtual Text prein() const;
00076   virtual Text postin() const;
00078   virtual Text preun() const;
00080   virtual Text postun() const;
00082   virtual ByteCount sourcesize() const;
00084   virtual std::list<std::string> filenames() const;
00086   virtual std::string type() const;
00088   virtual const DiskUsage & diskusage() const;
00090   virtual Repository repository() const;
00091 
00093   void setLocation (const OnMediaLocation &loc)
00094   {
00095     _location = loc;
00096   }
00097 
00098   OnMediaLocation location() const;
00099 
00100   void setRepository (Repository repo)
00101   {
00102     _repository = repo;
00103   }
00104 
00105 protected:
00106   TranslatedText _summary;
00107   TranslatedText _description;
00108   Date _buildtime;
00109   Date _installtime;
00110   std::string _buildhost;
00111   std::string _url;
00112   Vendor _vendor;
00113   Label _license;
00114   std::string _packager;
00115   PackageGroup _group;
00116   Changelog _changelog;
00117   std::string _type;
00118   std::list<std::string> _filenames;
00119   DiskUsage _disk_usage;
00120   ByteCount _size;
00121   Repository _repository;
00122   OnMediaLocation _location;
00123 };
00125 } // namespace rpm
00127 } // namespace target
00129 } // namespace zypp
00131 #endif // ZYPP_TARGET_RPM_RPMPACKAGEIMPL_H

Generated on Tue Sep 25 19:23:09 2007 for libzypp by  doxygen 1.5.3