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; 00048 virtual ByteCount size() const; 00049 virtual bool providesSources() const; 00050 virtual Label instSrcLabel() const; 00051 virtual Vendor instSrcVendor() const; 00053 virtual Date buildtime() const; 00055 virtual std::string buildhost() const; 00057 virtual Date installtime() const; 00059 virtual std::string distribution() const; 00061 virtual Vendor vendor() const; 00063 virtual Label license() const; 00065 virtual std::string packager() const; 00067 virtual PackageGroup group() const; 00069 virtual Changelog changelog() const; 00071 virtual Pathname location() const; 00074 virtual std::string url() const; 00076 virtual std::string os() const; 00078 virtual Text prein() const; 00080 virtual Text postin() const; 00082 virtual Text preun() const; 00084 virtual Text postun() const; 00086 virtual ByteCount sourcesize() const; 00088 virtual ByteCount archivesize() const; 00090 virtual std::list<std::string> authors() const; 00092 virtual std::list<std::string> filenames() const; 00094 virtual License licenseToConfirm() const; 00096 virtual std::string type() const; 00098 virtual std::list<std::string> keywords() const; 00100 virtual DiskUsage diskUsage() const; 00102 virtual Source_Ref source() const; 00103 00105 void setLocation (const Pathname & pathname) { _location = pathname; } 00106 void setSource (Source_Ref source) { _source = source; } 00107 00108 protected: 00109 TranslatedText _summary; 00110 TranslatedText _description; 00111 Date _buildtime; 00112 std::string _buildhost; 00113 std::string _url; 00114 Vendor _vendor; 00115 Label _license; 00116 std::string _packager; 00117 PackageGroup _group; 00118 Changelog _changelog; 00119 Pathname _location; // for 'local' rpms 00120 std::string _type; 00121 License _license_to_confirm; 00122 std::list<std::string> _authors; 00123 std::list<std::string>_keywords; 00124 std::list<std::string> _filenames; 00125 DiskUsage _disk_usage; 00126 ByteCount _size; 00127 ByteCount _archivesize; 00128 Source_Ref _source; 00129 }; 00131 } // namespace rpm 00133 } // namespace target 00135 } // namespace zypp 00137 #endif // ZYPP_TARGET_RPM_RPMPACKAGEIMPL_H
1.4.6