00001 /*---------------------------------------------------------------------\ 00002 | | 00003 | __ __ ____ _____ ____ | 00004 | \ \ / /_ _/ ___|_ _|___ \ | 00005 | \ V / _` \___ \ | | __) | | 00006 | | | (_| |___) || | / __/ | 00007 | |_|\__,_|____/ |_| |_____| | 00008 | | 00009 | core system | 00010 | (C) SuSE GmbH | 00011 \----------------------------------------------------------------------/ 00012 00013 File: RpmHeader.h 00014 00015 Author: Michael Andres <ma@suse.de> 00016 Maintainer: Michael Andres <ma@suse.de> 00017 00018 Purpose: 00019 00020 /-*/ 00021 #ifndef RpmHeader_h 00022 #define RpmHeader_h 00023 00024 #include <iosfwd> 00025 #include <list> 00026 00027 #include <y2pm/RpmHeaderPtr.h> 00028 #include <y2pm/binHeader.h> 00029 00030 #include <y2pm/PMPackage.h> 00031 #include <y2pm/FileDeps.h> 00032 #include <y2pm/PkgChangelog.h> 00033 00034 class PkgDu; 00035 00037 // 00038 // CLASS NAME : RpmHeader 00051 class RpmHeader : public binHeader { 00052 REP_BODY(RpmHeader); // includes no cpoy, no assign 00053 00054 private: 00055 00056 PMSolvable::PkgRelList_type PkgRelList_val( tag tag_r, FileDeps::FileNames * freq_r = 0 ) const; 00057 00058 public: 00059 00063 RpmHeader( Header h_r = 0 ); 00064 00069 RpmHeader( binHeaderPtr & rhs ); 00070 00071 virtual ~RpmHeader(); 00072 00073 bool isSrc() const; 00074 00075 public: 00076 00077 PkgName tag_name() const; 00078 PkgEdition tag_edition() const; 00079 PkgArch tag_arch() const; 00080 00081 Date tag_installtime() const; 00082 Date tag_buildtime() const; 00083 00087 PMSolvable::PkgRelList_type tag_provides ( FileDeps::FileNames * freq_r = 0 ) const; 00091 PMSolvable::PkgRelList_type tag_requires ( FileDeps::FileNames * freq_r = 0 ) const; 00095 PMSolvable::PkgRelList_type tag_conflicts( FileDeps::FileNames * freq_r = 0 ) const; 00099 PMSolvable::PkgRelList_type tag_obsoletes( FileDeps::FileNames * freq_r = 0 ) const; 00100 00101 FSize tag_size() const; 00102 FSize tag_archivesize() const; 00103 00104 std::string tag_summary() const; 00105 std::string tag_description() const; 00106 std::string tag_group() const; 00107 std::string tag_vendor() const; 00108 std::string tag_distribution() const; 00109 std::string tag_license() const; 00110 std::string tag_buildhost() const; 00111 std::string tag_packager() const; 00112 std::string tag_url() const; 00113 std::string tag_os() const; 00114 std::string tag_prein() const; 00115 std::string tag_postin() const; 00116 std::string tag_preun() const; 00117 std::string tag_postun() const; 00118 std::string tag_sourcerpm() const; 00119 00120 std::list<std::string> tag_filenames() const; 00121 00122 PkgChangelog tag_changelog() const; 00123 00127 PkgDu & tag_du( PkgDu & dudata_r ) const; 00128 00129 public: 00130 00131 virtual std::ostream & dumpOn( std::ostream & str ) const; 00132 00133 public: 00134 00139 static constRpmHeaderPtr readPackage( const Pathname & path, bool checkDigest = false ); 00140 }; 00141 00143 00144 #endif // RpmHeader_h 00145