libzypp  13.10.6
zypp::target::rpm::RpmHeader Class Reference

Wrapper class for rpm header struct. More...

#include <RpmHeader.h>

Inheritance diagram for zypp::target::rpm::RpmHeader:
zypp::target::rpm::BinHeader zypp::base::ReferenceCounted

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 Types inherited from zypp::target::rpm::BinHeader
typedef intrusive_ptr< BinHeaderPtr
 
typedef intrusive_ptr< const
BinHeader
constPtr
 
typedef rpmTag tag
 

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. More...
 
virtual ~RpmHeader ()
 
bool isSrc () const
 
bool isNosrc () 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. More...
 
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. More...
 
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 More...
 
std::list< FileInfotag_fileinfos () const
 complete information about the files (extended version of tag_filenames()) More...
 
Changelog tag_changelog () const
 
DiskUsagetag_du (DiskUsage &dudata_r) const
 Returns reference to arg dudata_r. More...
 
virtual std::ostream & dumpOn (std::ostream &str) const
 Overload to realize std::ostream & operator<<. More...
 
- Public Member Functions inherited from zypp::target::rpm::BinHeader
 BinHeader (Header h_r=0)
 
 BinHeader (BinHeader::Ptr &rhs)
 Dangerous!<> This one takes the header out of rhs and leaves rhs empty. More...
 
virtual ~BinHeader ()
 
bool empty () const
 
bool has_tag (tag tag_r) const
 
unsigned int_list (tag tag_r, intList &lst_r) const
 
unsigned string_list (tag tag_r, stringList &lst_r) const
 
int int_val (tag tag_r) const
 
std::string string_val (tag tag_r) const
 
std::list< std::string > stringList_val (tag tag_r) const
 
- Public Member Functions inherited from zypp::base::ReferenceCounted
 ReferenceCounted ()
 Default ctor. More...
 
 ReferenceCounted (const ReferenceCounted &rhs)
 Copy ctor. More...
 
virtual ~ReferenceCounted ()
 Dtor. More...
 
ReferenceCountedoperator= (const ReferenceCounted &)
 Assignment. More...
 
unsigned refCount () const
 Return reference counter value. More...
 
void ref () const
 Add a reference. More...
 
void unref () const
 Release a reference. More...
 

Static Public Member Functions

static RpmHeader::constPtr readPackage (const Pathname &path, VERIFICATION verification=VERIFY)
 Get an accessible packages data from disk. More...
 
- Static Public Member Functions inherited from zypp::base::ReferenceCounted
static void add_ref (const ReferenceCounted *ptr_r)
 Called by zypp::intrusive_ptr to add a reference. More...
 
static void release (const ReferenceCounted *ptr_r)
 Called by zypp::intrusive_ptr to add a reference. More...
 

Private Member Functions

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

Additional Inherited Members

- Protected Member Functions inherited from zypp::base::ReferenceCounted
virtual void ref_to (unsigned) const
 Trigger derived classes after refCount was increased. More...
 
virtual void unref_to (unsigned) const
 Trigger derived classes after refCount was decreased. More...
 

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

Definition at line 65 of file RpmHeader.h.

Member Enumeration Documentation

Digest and signature verification flags.

Enumerator
VERIFY 
NODIGEST 
NOSIGNATURE 
NOVERIFY 

Definition at line 179 of file RpmHeader.h.

Constructor & Destructor Documentation

zypp::target::rpm::RpmHeader::RpmHeader ( Header  h_r = 0)

Definition at line 180 of file RpmHeader.cc.

zypp::target::rpm::RpmHeader::RpmHeader ( BinHeader::Ptr rhs)

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

Definition at line 190 of file RpmHeader.cc.

zypp::target::rpm::RpmHeader::~RpmHeader ( )
virtual

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 405 of file RpmHeader.cc.

bool zypp::target::rpm::RpmHeader::isSrc ( ) const

Definition at line 283 of file RpmHeader.cc.

bool zypp::target::rpm::RpmHeader::isNosrc ( ) const

Definition at line 288 of file RpmHeader.cc.

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

Definition at line 301 of file RpmHeader.cc.

Edition::epoch_t zypp::target::rpm::RpmHeader::tag_epoch ( ) const

Definition at line 314 of file RpmHeader.cc.

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

Definition at line 327 of file RpmHeader.cc.

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

Definition at line 340 of file RpmHeader.cc.

Edition zypp::target::rpm::RpmHeader::tag_edition ( ) const

Definition at line 353 of file RpmHeader.cc.

Arch zypp::target::rpm::RpmHeader::tag_arch ( ) const

Definition at line 366 of file RpmHeader.cc.

Date zypp::target::rpm::RpmHeader::tag_installtime ( ) const

Definition at line 379 of file RpmHeader.cc.

Date zypp::target::rpm::RpmHeader::tag_buildtime ( ) const

Definition at line 392 of file RpmHeader.cc.

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 522 of file RpmHeader.cc.

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

Definition at line 535 of file RpmHeader.cc.

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

Definition at line 548 of file RpmHeader.cc.

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

Definition at line 561 of file RpmHeader.cc.

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

Definition at line 574 of file RpmHeader.cc.

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

Definition at line 587 of file RpmHeader.cc.

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

Definition at line 600 of file RpmHeader.cc.

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 132 of file RpmHeader.h.

ByteCount zypp::target::rpm::RpmHeader::tag_size ( ) const

Definition at line 613 of file RpmHeader.cc.

ByteCount zypp::target::rpm::RpmHeader::tag_archivesize ( ) const

Definition at line 626 of file RpmHeader.cc.

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

Definition at line 639 of file RpmHeader.cc.

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

Definition at line 652 of file RpmHeader.cc.

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

Definition at line 665 of file RpmHeader.cc.

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

Definition at line 678 of file RpmHeader.cc.

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

Definition at line 691 of file RpmHeader.cc.

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

Definition at line 704 of file RpmHeader.cc.

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

Definition at line 717 of file RpmHeader.cc.

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

Definition at line 730 of file RpmHeader.cc.

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

Definition at line 743 of file RpmHeader.cc.

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

Definition at line 756 of file RpmHeader.cc.

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

Definition at line 769 of file RpmHeader.cc.

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

Definition at line 782 of file RpmHeader.cc.

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

Definition at line 795 of file RpmHeader.cc.

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

Definition at line 808 of file RpmHeader.cc.

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

Definition at line 821 of file RpmHeader.cc.

std::list< std::string > zypp::target::rpm::RpmHeader::tag_filenames ( ) const

just the list of names

Definition at line 834 of file RpmHeader.cc.

std::list< FileInfo > zypp::target::rpm::RpmHeader::tag_fileinfos ( ) const

complete information about the files (extended version of tag_filenames())

Definition at line 862 of file RpmHeader.cc.

Changelog zypp::target::rpm::RpmHeader::tag_changelog ( ) const

Definition at line 943 of file RpmHeader.cc.

DiskUsage & zypp::target::rpm::RpmHeader::tag_du ( DiskUsage dudata_r) const

Returns reference to arg dudata_r.

Definition at line 971 of file RpmHeader.cc.

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.

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.


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