libzypp  9.1.2
Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions
zypp::target::rpm::RpmHeader Class Reference

Wrapper class for rpm header struct. More...

#include <RpmHeader.h>

Inheritance diagram for zypp::target::rpm::RpmHeader:
Inheritance graph
[legend]

List of all members.

Public Types

enum  VERIFICATION { VERIFY = 0x0000, NODIGEST = (1<<0), NOSIGNATURE = (1<<1), NOVERIFY = 0xffff }
 Digest and signature verification flags. More...
typedef intrusive_ptr< RpmHeaderPtr
typedef intrusive_ptr< const
RpmHeader
constPtr

Public Member Functions

 RpmHeader (Header h_r=0)
 RpmHeader (BinHeader::Ptr &rhs)
 Dangerous!<> This one takes the header out of rhs and leaves rhs empty.
virtual ~RpmHeader ()
bool isSrc () const
std::string tag_name () const
Edition::epoch_t tag_epoch () const
std::string tag_version () const
std::string tag_release () const
Edition tag_edition () const
Arch tag_arch () const
Date tag_installtime () const
Date tag_buildtime () const
CapabilitySet tag_provides (std::set< std::string > *freq_r=0) const
 If freq_r is not NULL, file dependencies found are inserted.
CapabilitySet tag_requires (std::set< std::string > *freq_r=0) const
CapabilitySet tag_prerequires (std::set< std::string > *freq_r=0) const
CapabilitySet tag_conflicts (std::set< std::string > *freq_r=0) const
CapabilitySet tag_obsoletes (std::set< std::string > *freq_r=0) const
CapabilitySet tag_enhances (std::set< std::string > *freq_r=0) const
CapabilitySet tag_suggests (std::set< std::string > *freq_r=0) const
CapabilitySet tag_supplements (std::set< std::string > *freq_r=0) const
 Unsupported by rpm.
ByteCount tag_size () const
ByteCount tag_archivesize () const
std::string tag_summary () const
std::string tag_description () const
std::string tag_group () const
std::string tag_vendor () const
std::string tag_distribution () const
std::string tag_license () const
std::string tag_buildhost () const
std::string tag_packager () const
std::string tag_url () const
std::string tag_os () const
std::string tag_prein () const
std::string tag_postin () const
std::string tag_preun () const
std::string tag_postun () const
std::string tag_sourcerpm () const
std::list< std::string > tag_filenames () const
 just the list of names
std::list< FileInfotag_fileinfos () const
 complete information about the files (extended version of tag_filenames())
Changelog tag_changelog () const
DiskUsagetag_du (DiskUsage &dudata_r) const
 Returns reference to arg dudata_r.
virtual std::ostream & dumpOn (std::ostream &str) const
 Overload to realize std::ostream & operator<<.

Static Public Member Functions

static RpmHeader::constPtr readPackage (const Pathname &path, VERIFICATION verification=VERIFY)
 Get an accessible packages data from disk.

Private Member Functions

CapabilitySet PkgRelList_val (tag tag_r, bool pre, std::set< std::string > *freq_r=0) const

Detailed Description

Wrapper class for rpm header struct.

RpmHeader provides methods to query the content of a rpm header struct retrieved from the RPM database or by reading the rpm header of a package on disk.

The rpm header contains all data associated with a package. So you probabely do not want to permanently store too many of them.

NEVER create RpmHeader from a NULL Header!

Definition at line 61 of file RpmHeader.h.


Member Typedef Documentation

Reimplemented from zypp::target::rpm::BinHeader.

Definition at line 64 of file RpmHeader.h.

typedef intrusive_ptr<const RpmHeader> zypp::target::rpm::RpmHeader::constPtr

Reimplemented from zypp::target::rpm::BinHeader.

Definition at line 65 of file RpmHeader.h.


Member Enumeration Documentation

Digest and signature verification flags.

Enumerator:
VERIFY 
NODIGEST 
NOSIGNATURE 
NOVERIFY 

Definition at line 178 of file RpmHeader.h.


Constructor & Destructor Documentation

Definition at line 180 of file RpmHeader.cc.

Referenced by readPackage().

Dangerous!<> This one takes the header out of rhs and leaves rhs empty.

Definition at line 190 of file RpmHeader.cc.

Definition at line 202 of file RpmHeader.cc.


Member Function Documentation

CapabilitySet zypp::target::rpm::RpmHeader::PkgRelList_val ( tag  tag_r,
bool  pre,
std::set< std::string > *  freq_r = 0 
) const [private]

Definition at line 283 of file RpmHeader.cc.

References zypp::target::rpm::BinHeader::has_tag().

Referenced by dumpOn().

Definition at line 296 of file RpmHeader.cc.

References zypp::target::rpm::BinHeader::string_val().

Referenced by dumpOn().

Definition at line 309 of file RpmHeader.cc.

References zypp::target::rpm::BinHeader::int_val().

Referenced by dumpOn(), and tag_edition().

Definition at line 322 of file RpmHeader.cc.

References zypp::target::rpm::BinHeader::string_val().

Referenced by dumpOn(), and tag_edition().

Definition at line 335 of file RpmHeader.cc.

References zypp::target::rpm::BinHeader::string_val().

Referenced by dumpOn(), and tag_edition().

Definition at line 348 of file RpmHeader.cc.

References tag_epoch(), tag_release(), and tag_version().

Definition at line 361 of file RpmHeader.cc.

References zypp::target::rpm::BinHeader::string_val().

Definition at line 374 of file RpmHeader.cc.

References zypp::target::rpm::BinHeader::int_val().

Definition at line 387 of file RpmHeader.cc.

References zypp::target::rpm::BinHeader::int_val().

CapabilitySet zypp::target::rpm::RpmHeader::tag_provides ( std::set< std::string > *  freq_r = 0) const

If freq_r is not NULL, file dependencies found are inserted.

Definition at line 517 of file RpmHeader.cc.

References PkgRelList_val().

CapabilitySet zypp::target::rpm::RpmHeader::tag_requires ( std::set< std::string > *  freq_r = 0) const
See also:
tag_provides

Definition at line 530 of file RpmHeader.cc.

References PkgRelList_val().

CapabilitySet zypp::target::rpm::RpmHeader::tag_prerequires ( std::set< std::string > *  freq_r = 0) const
See also:
tag_provides

Definition at line 543 of file RpmHeader.cc.

References PkgRelList_val().

CapabilitySet zypp::target::rpm::RpmHeader::tag_conflicts ( std::set< std::string > *  freq_r = 0) const
See also:
tag_provides

Definition at line 556 of file RpmHeader.cc.

References PkgRelList_val().

CapabilitySet zypp::target::rpm::RpmHeader::tag_obsoletes ( std::set< std::string > *  freq_r = 0) const
See also:
tag_provides

Definition at line 569 of file RpmHeader.cc.

References PkgRelList_val().

CapabilitySet zypp::target::rpm::RpmHeader::tag_enhances ( std::set< std::string > *  freq_r = 0) const
See also:
tag_provides

Definition at line 582 of file RpmHeader.cc.

References PkgRelList_val().

CapabilitySet zypp::target::rpm::RpmHeader::tag_suggests ( std::set< std::string > *  freq_r = 0) const
See also:
tag_provides

Definition at line 595 of file RpmHeader.cc.

References PkgRelList_val().

CapabilitySet zypp::target::rpm::RpmHeader::tag_supplements ( std::set< std::string > *  freq_r = 0) const [inline]

Unsupported by rpm.

See also:
tag_provides

Definition at line 131 of file RpmHeader.h.

Definition at line 608 of file RpmHeader.cc.

References zypp::target::rpm::BinHeader::int_val().

Definition at line 621 of file RpmHeader.cc.

References zypp::target::rpm::BinHeader::int_val().

Definition at line 634 of file RpmHeader.cc.

References zypp::target::rpm::BinHeader::string_val().

Definition at line 647 of file RpmHeader.cc.

References zypp::target::rpm::BinHeader::string_val().

Definition at line 660 of file RpmHeader.cc.

References zypp::target::rpm::BinHeader::string_val().

Definition at line 673 of file RpmHeader.cc.

References zypp::target::rpm::BinHeader::string_val().

Definition at line 686 of file RpmHeader.cc.

References zypp::target::rpm::BinHeader::string_val().

Definition at line 699 of file RpmHeader.cc.

References zypp::target::rpm::BinHeader::string_val().

Definition at line 712 of file RpmHeader.cc.

References zypp::target::rpm::BinHeader::string_val().

Definition at line 725 of file RpmHeader.cc.

References zypp::target::rpm::BinHeader::string_val().

Definition at line 738 of file RpmHeader.cc.

References zypp::target::rpm::BinHeader::string_val().

std::string zypp::target::rpm::RpmHeader::tag_os ( ) const

Definition at line 751 of file RpmHeader.cc.

References zypp::target::rpm::BinHeader::string_val().

Definition at line 764 of file RpmHeader.cc.

References zypp::target::rpm::BinHeader::string_val().

Definition at line 777 of file RpmHeader.cc.

References zypp::target::rpm::BinHeader::string_val().

Definition at line 790 of file RpmHeader.cc.

References zypp::target::rpm::BinHeader::string_val().

Definition at line 803 of file RpmHeader.cc.

References zypp::target::rpm::BinHeader::string_val().

Definition at line 816 of file RpmHeader.cc.

References zypp::target::rpm::BinHeader::string_val().

std::list< std::string > zypp::target::rpm::RpmHeader::tag_filenames ( ) const
std::ostream & zypp::target::rpm::RpmHeader::dumpOn ( std::ostream &  str) const [virtual]

Overload to realize std::ostream & operator<<.

Reimplemented from zypp::target::rpm::BinHeader.

Definition at line 267 of file RpmHeader.cc.

References isSrc(), tag_epoch(), tag_name(), tag_release(), and tag_version().

RpmHeader::constPtr zypp::target::rpm::RpmHeader::readPackage ( const Pathname &  path,
VERIFICATION  verification = VERIFY 
) [static]

Get an accessible packages data from disk.

Returns NULL on any error.

Definition at line 211 of file RpmHeader.cc.

References ERR, zypp::target::rpm::librpmDb::globalInit(), MIL, NODIGEST, NOSIGNATURE, RpmHeader(), and WAR.

Referenced by zypp::target::rpm::RpmDb::backupPackage().


The documentation for this class was generated from the following files: