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"
18 #include "zypp/VendorSupportOptions.h"
20 ///////////////////////////////////////////////////////////////////
22 { /////////////////////////////////////////////////////////////////
24 DEFINE_PTR_TYPE(Package);
26 ///////////////////////////////////////////////////////////////////
28 // CLASS NAME : Package
30 /** Package interface.
32 class Package : public ResObject
36 typedef ResTraits<Self> TraitsType;
37 typedef TraitsType::PtrType Ptr;
38 typedef TraitsType::constPtrType constPtr;
41 typedef sat::ArrayAttr<PackageKeyword,IdString> Keywords;
46 * Returns the level of supportability the vendor
47 * gives to this package.
49 * This is one value from \ref VendorSupportOption
51 VendorSupportOption vendorSupport() const;
53 /** Get the package change log */
54 Changelog changelog() const;
56 std::string buildhost() const;
58 std::string distribution() const;
60 std::string license() const;
62 std::string packager() const;
64 std::string group() const;
66 Keywords keywords() const;
67 /** Don't ship it as class Url, because it might be
68 * in fact anything but a legal Url. */
69 std::string url() const;
70 /** Size of corresponding the source package. */
71 ByteCount sourcesize() const;
73 std::list<std::string> authors() const;
75 std::list<std::string> filenames() const;
77 /** Name of the source rpm this package was built from.
79 std::string sourcePkgName() const;
81 /** Edition of the source rpm this package was built from.
83 Edition sourcePkgEdition() const;
86 * Checksum the source says this package should have.
89 CheckSum checksum() const;
91 /** Location of the resolvable in the repository.
92 * \ref OnMediaLocation conatins all information required to
93 * retrieve the packge (url, checksum, etc.).
95 OnMediaLocation location() const;
98 friend Ptr make<Self>( const sat::Solvable & solvable_r );
100 Package( const sat::Solvable & solvable_r );
105 ///////////////////////////////////////////////////////////////////
107 /////////////////////////////////////////////////////////////////
109 ///////////////////////////////////////////////////////////////////
110 #endif // ZYPP_PACKAGE_H