X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=zypp%2FPackage.h;h=2219b8d69e31c82a25b64b1b583c79f6604b67e3;hb=HEAD;hp=1f3a8e194b0550489c15fdc56a8e903bcb9fa17f;hpb=e10120e3a13f6850eaaf6442d5036da538e75c0e;p=platform%2Fupstream%2Flibzypp.git diff --git a/zypp/Package.h b/zypp/Package.h index 1f3a8e1..03ef46f 100644 --- a/zypp/Package.h +++ b/zypp/Package.h @@ -12,9 +12,10 @@ #ifndef ZYPP_PACKAGE_H #define ZYPP_PACKAGE_H -#include "zypp/ResObject.h" -#include "zypp/PackageKeyword.h" -#include "zypp/Changelog.h" +#include +#include +#include +#include /////////////////////////////////////////////////////////////////// namespace zypp @@ -38,9 +39,28 @@ namespace zypp public: typedef sat::ArrayAttr Keywords; + typedef sat::ArrayAttr FileList; public: + /** + * Returns the level of supportability the vendor + * gives to this package. + * + * If the identical package happens to appear in multiple + * repos with different support levels, the maximum + * level is returned. + * + * This is one value from \ref VendorSupportOption. + */ + VendorSupportOption vendorSupport() const; + + /** + * True if the vendor support for this package + * is unknown or explictly unsupported. + */ + bool maybeUnsupported() const; + /** Get the package change log */ Changelog changelog() const; /** */ @@ -62,9 +82,17 @@ namespace zypp ByteCount sourcesize() const; /** */ std::list authors() const; - /** */ - std::list filenames() const; + /** Return the packages filelist (if available). + * The returned \ref FileList appears to be a container of + * \c std::string. In fact it is a query, so it does not + * consume much memory. + */ + FileList filelist() const; + + /** \name Source package handling + */ + //@{ /** Name of the source rpm this package was built from. */ std::string sourcePkgName() const; @@ -73,6 +101,15 @@ namespace zypp */ Edition sourcePkgEdition() const; + /** The type of the source rpm (\c "src" or \c "nosrc"). + */ + std::string sourcePkgType() const; + + /** The source rpms \c "name-version-release.type" + */ + std::string sourcePkgLongName() const; + //@} + /** * Checksum the source says this package should have. * \see \ref location @@ -85,17 +122,12 @@ namespace zypp */ OnMediaLocation location() const; + /** Location of the downloaded package in cache or an empty path. */ + Pathname cachedLocation() const; - /** \deprecated no metadata always empty */ - ZYPP_DEPRECATED std::string os() const { return std::string(); } - /** \deprecated no metadata always empty */ - ZYPP_DEPRECATED std::string prein() const { return std::string(); } - /** \deprecated no metadata always empty */ - ZYPP_DEPRECATED std::string postin() const { return std::string(); } - /** \deprecated no metadata always empty */ - ZYPP_DEPRECATED std::string preun() const { return std::string(); } - /** \deprecated no metadata always empty */ - ZYPP_DEPRECATED std::string postun() const { return std::string(); } + /** Whether the package is cached. */ + bool isCached() const + { return ! cachedLocation().empty(); } protected: friend Ptr make( const sat::Solvable & solvable_r ); @@ -104,6 +136,7 @@ namespace zypp /** Dtor */ virtual ~Package(); }; + /////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////