zypp::Package Class Reference

Package interface. More...

#include <Package.h>

Inheritance diagram for zypp::Package:
[legend]

List of all members.

Public Types

typedef Package Self
typedef ResTraits< SelfTraitsType
typedef TraitsType::PtrType Ptr
typedef TraitsType::constPtrType constPtr
typedef sat::ArrayAttr
< PackageKeyword, IdString
Keywords
typedef sat::ArrayAttr
< std::string, std::string > 
FileList

Public Member Functions

VendorSupportOption vendorSupport () const
 Returns the level of supportability the vendor gives to this package.
bool maybeUnsupported () const
 True if the vendor support for this package is unknown or explictly unsupported.
Changelog changelog () const
 Get the package change log.
std::string buildhost () const
std::string distribution () const
 The distribution string.
std::string license () const
std::string packager () const
std::string group () const
Keywords keywords () const
std::string url () const
 Don't ship it as class Url, because it might be in fact anything but a legal Url.
ByteCount sourcesize () const
 Size of corresponding the source package.
std::list< std::string > authors () const
FileList filelist () const
 Return the packages filelist (if available).
CheckSum checksum () const
 Checksum the source says this package should have.
OnMediaLocation location () const
 Location of the resolvable in the repository.
Source package handling
std::string sourcePkgName () const
 Name of the source rpm this package was built from.
Edition sourcePkgEdition () const
 Edition of the source rpm this package was built from.
std::string sourcePkgType () const
 The type of the source rpm ("src" or "nosrc").
std::string sourcePkgLongName () const
 The source rpms "name-version-release.type".

Protected Member Functions

 Package (const sat::Solvable &solvable_r)
 Ctor.
virtual ~Package ()
 Dtor.

Friends

Ptr make (const sat::Solvable &solvable_r)
 Directly create a certain kind of ResObject from sat::Solvable.


Detailed Description

Package interface.

Definition at line 32 of file Package.h.


Member Typedef Documentation

Reimplemented from zypp::ResObject.

Definition at line 35 of file Package.h.

Reimplemented from zypp::ResObject.

Definition at line 36 of file Package.h.

Reimplemented from zypp::ResObject.

Definition at line 37 of file Package.h.

Reimplemented from zypp::ResObject.

Definition at line 38 of file Package.h.

Definition at line 41 of file Package.h.

typedef sat::ArrayAttr<std::string,std::string> zypp::Package::FileList

Definition at line 42 of file Package.h.


Constructor & Destructor Documentation

zypp::Package::Package ( const sat::Solvable solvable_r  )  [protected]

Ctor.

Definition at line 33 of file Package.cc.

zypp::Package::~Package (  )  [protected, virtual]

Dtor.

Definition at line 42 of file Package.cc.


Member Function Documentation

VendorSupportOption zypp::Package::vendorSupport (  )  const

bool zypp::Package::maybeUnsupported (  )  const

True if the vendor support for this package is unknown or explictly unsupported.

Definition at line 70 of file Package.cc.

References vendorSupport(), zypp::VendorSupportACC, zypp::VendorSupportUnknown, and zypp::VendorSupportUnsupported.

Changelog zypp::Package::changelog (  )  const

Get the package change log.

Definition at line 79 of file Package.cc.

References ERR, zypp::Resolvable::name(), zypp::ResObject::repository(), and WAR.

std::string zypp::Package::buildhost (  )  const

std::string zypp::Package::distribution (  )  const

The distribution string.

E.g. code-11.

Reimplemented from zypp::ResObject.

Definition at line 101 of file Package.cc.

References zypp::sat::SolvAttr::distribution, and zypp::sat::Solvable::lookupStrAttribute().

std::string zypp::Package::license (  )  const

std::string zypp::Package::packager (  )  const

std::string zypp::Package::group (  )  const

Package::Keywords zypp::Package::keywords (  )  const

Definition at line 113 of file Package.cc.

References zypp::sat::SolvAttr::keywords, and zypp::Resolvable::satSolvable().

Referenced by vendorSupport().

std::string zypp::Package::url (  )  const

Don't ship it as class Url, because it might be in fact anything but a legal Url.

Definition at line 116 of file Package.cc.

References zypp::sat::Solvable::lookupStrAttribute(), and zypp::sat::SolvAttr::url.

ByteCount zypp::Package::sourcesize (  )  const

Size of corresponding the source package.

Definition at line 119 of file Package.cc.

References zypp::sat::Solvable::lookupNumAttribute(), and zypp::sat::SolvAttr::sourcesize.

std::list< std::string > zypp::Package::authors (  )  const

Package::FileList zypp::Package::filelist (  )  const

Return the packages filelist (if available).

The returned FileList appears to be a container of std::string. In fact it is a query, so it does not consume much memory.

Definition at line 129 of file Package.cc.

References zypp::sat::SolvAttr::filelist, and zypp::Resolvable::satSolvable().

std::string zypp::Package::sourcePkgName (  )  const

Name of the source rpm this package was built from.

Definition at line 138 of file Package.cc.

References zypp::sat::Solvable::id(), zypp::sat::Solvable::lookupIdAttribute(), zypp::Resolvable::name(), and zypp::sat::SolvAttr::sourcename.

Referenced by sourcePkgLongName().

Edition zypp::Package::sourcePkgEdition (  )  const

Edition of the source rpm this package was built from.

Definition at line 145 of file Package.cc.

References zypp::Resolvable::edition(), zypp::sat::Solvable::id(), zypp::sat::Solvable::lookupIdAttribute(), and zypp::sat::SolvAttr::sourceevr.

Referenced by sourcePkgLongName().

std::string zypp::Package::sourcePkgType (  )  const

The type of the source rpm ("src" or "nosrc").

Definition at line 152 of file Package.cc.

References zypp::sat::Solvable::lookupStrAttribute(), and zypp::sat::SolvAttr::sourcearch.

Referenced by sourcePkgLongName().

std::string zypp::Package::sourcePkgLongName (  )  const

The source rpms "name-version-release.type".

Definition at line 155 of file Package.cc.

References zypp::str::form(), sourcePkgEdition(), sourcePkgName(), and sourcePkgType().

CheckSum zypp::Package::checksum (  )  const

Checksum the source says this package should have.

See also:
location

Definition at line 132 of file Package.cc.

References zypp::sat::SolvAttr::checksum, and zypp::sat::Solvable::lookupCheckSumAttribute().

OnMediaLocation zypp::Package::location (  )  const

Location of the resolvable in the repository.

OnMediaLocation conatins all information required to retrieve the packge (url, checksum, etc.).

Definition at line 135 of file Package.cc.

References zypp::sat::Solvable::lookupLocation().


Friends And Related Function Documentation

Ptr make ( const sat::Solvable solvable_r  )  [friend]

Directly create a certain kind of ResObject from sat::Solvable.

If the sat::Solvables kind is not appropriate, a NULL pointer is returned.

 sat::Solvable s;
 ResObject::Ptr p( makeResObject( s ) );
 ResObject::Ptr q( make<ResObject>( s ) );
 Package::Ptr   pkg( make<Package>( s ) );

Definition at line 236 of file ResObject.h.


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

doxygen