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/Source.h" 00017 #include "zypp/Changelog.h" 00018 #include "zypp/target/rpm/RpmHeader.h" 00019 00021 namespace zypp 00022 { 00023 00024 namespace target 00025 { 00026 namespace rpm 00027 { 00028 00030 // 00031 // CLASS NAME : RPMPackageImpl 00032 // 00035 class RPMPackageImpl : public detail::PackageImplIf 00036 { 00037 public: 00040 RPMPackageImpl( 00041 const RpmHeader::constPtr data 00042 ); 00043 00045 virtual TranslatedText summary() const; 00047 virtual TranslatedText description() const; 00049 virtual ByteCount size() const; 00051 virtual Date buildtime() const; 00053 virtual std::string buildhost() const; 00055 virtual Date installtime() const; 00057 virtual std::string distribution() const; 00059 virtual Vendor vendor() const; 00061 virtual Label license() const; 00063 virtual std::string packager() const; 00065 virtual PackageGroup group() const; 00067 virtual Changelog changelog() const; 00069 virtual Pathname location() const; 00072 virtual std::string url() const; 00074 virtual std::string os() const; 00076 virtual Text prein() const; 00078 virtual Text postin() const; 00080 virtual Text preun() const; 00082 virtual Text postun() const; 00084 virtual ByteCount sourcesize() const; 00086 virtual ByteCount archivesize() const; 00088 virtual std::list<std::string> authors() const; 00090 virtual std::list<std::string> filenames() const; 00092 virtual std::string type() const; 00094 virtual std::list<std::string> keywords() const; 00096 virtual DiskUsage diskUsage() const; 00098 virtual Source_Ref source() const; 00099 00101 void setLocation (const Pathname & pathname) { _location = pathname; } 00102 void setSource (Source_Ref source) { _source = source; } 00103 00104 protected: 00105 TranslatedText _summary; 00106 TranslatedText _description; 00107 Date _buildtime; 00108 Date _installtime; 00109 std::string _buildhost; 00110 std::string _url; 00111 Vendor _vendor; 00112 Label _license; 00113 std::string _packager; 00114 PackageGroup _group; 00115 Changelog _changelog; 00116 Pathname _location; // for 'local' rpms 00117 std::string _type; 00118 std::list<std::string> _authors; 00119 std::list<std::string>_keywords; 00120 std::list<std::string> _filenames; 00121 DiskUsage _disk_usage; 00122 ByteCount _size; 00123 ByteCount _archivesize; 00124 Source_Ref _source; 00125 }; 00127 } // namespace rpm 00129 } // namespace target 00131 } // namespace zypp 00133 #endif // ZYPP_TARGET_RPM_RPMPACKAGEIMPL_H