1 /*---------------------------------------------------------------------\
3 | |__ / \ / / . \ . \ |
8 \---------------------------------------------------------------------*/
9 /** \file zypp/Package.h
12 #ifndef ZYPP_PACKAGE_H
13 #define ZYPP_PACKAGE_H
15 #include "zypp/ResObject.h"
16 #include "zypp/PackageKeyword.h"
17 #include "zypp/Changelog.h"
19 ///////////////////////////////////////////////////////////////////
21 { /////////////////////////////////////////////////////////////////
23 DEFINE_PTR_TYPE(Package);
25 ///////////////////////////////////////////////////////////////////
27 // CLASS NAME : Package
29 /** Package interface.
31 class Package : public ResObject
35 typedef ResTraits<Self> TraitsType;
36 typedef TraitsType::PtrType Ptr;
37 typedef TraitsType::constPtrType constPtr;
40 typedef sat::ArrayAttr<PackageKeyword,IdString> Keywords;
44 /** Get the package change log */
45 Changelog changelog() const;
47 std::string buildhost() const;
49 std::string distribution() const;
51 std::string license() const;
53 std::string packager() const;
55 std::string group() const;
57 Keywords keywords() const;
58 /** Don't ship it as class Url, because it might be
59 * in fact anything but a legal Url. */
60 std::string url() const;
61 /** Size of corresponding the source package. */
62 ByteCount sourcesize() const;
64 std::list<std::string> authors() const;
66 std::list<std::string> filenames() const;
68 /** Name of the source rpm this package was built from.
70 std::string sourcePkgName() const;
72 /** Edition of the source rpm this package was built from.
74 Edition sourcePkgEdition() const;
77 * Checksum the source says this package should have.
80 CheckSum checksum() const;
82 /** Location of the resolvable in the repository.
83 * \ref OnMediaLocation conatins all information required to
84 * retrieve the packge (url, checksum, etc.).
86 OnMediaLocation location() const;
89 friend Ptr make<Self>( const sat::Solvable & solvable_r );
91 Package( const sat::Solvable & solvable_r );
95 ///////////////////////////////////////////////////////////////////
97 /////////////////////////////////////////////////////////////////
99 ///////////////////////////////////////////////////////////////////
100 #endif // ZYPP_PACKAGE_H