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 std::set<PackageKeyword> Keywords;
44 /** Get the package change log */
45 Changelog changelog() const;
47 std::string buildhost() const;
49 std::string distribution() const;
51 Label license() const;
53 std::string packager() const;
55 PackageGroup 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;
62 std::string os() const;
72 ByteCount sourcesize() const;
74 std::list<std::string> authors() const;
76 std::list<std::string> filenames() const;
78 /** Name of the source rpm this package was built from.
81 std::string sourcePkgName() const;
83 /** Edition of the source rpm this package was built from.
86 Edition sourcePkgEdition() const;
89 * Checksum the source says this package should have
90 * \deprecated Use location().checksum()
92 ZYPP_DEPRECATED CheckSum checksum() const
93 { return location().checksum(); }
96 * \short Location of the resolvable in the repository
98 OnMediaLocation location() const;
101 Package( const sat::Solvable & solvable_r );
105 ///////////////////////////////////////////////////////////////////
107 /////////////////////////////////////////////////////////////////
109 ///////////////////////////////////////////////////////////////////
110 #endif // ZYPP_PACKAGE_H