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;
54 * True if the vendor support for this package
55 * is unknown or explictly unsupported.
57 bool maybeUnsupported() const;
59 /** Get the package change log */
60 Changelog changelog() const;
62 std::string buildhost() const;
64 std::string distribution() const;
66 std::string license() const;
68 std::string packager() const;
70 std::string group() const;
72 Keywords keywords() const;
73 /** Don't ship it as class Url, because it might be
74 * in fact anything but a legal Url. */
75 std::string url() const;
76 /** Size of corresponding the source package. */
77 ByteCount sourcesize() const;
79 std::list<std::string> authors() const;
81 std::list<std::string> filenames() const;
83 /** Name of the source rpm this package was built from.
85 std::string sourcePkgName() const;
87 /** Edition of the source rpm this package was built from.
89 Edition sourcePkgEdition() const;
92 * Checksum the source says this package should have.
95 CheckSum checksum() const;
97 /** Location of the resolvable in the repository.
98 * \ref OnMediaLocation conatins all information required to
99 * retrieve the packge (url, checksum, etc.).
101 OnMediaLocation location() const;
104 friend Ptr make<Self>( const sat::Solvable & solvable_r );
106 Package( const sat::Solvable & solvable_r );
111 ///////////////////////////////////////////////////////////////////
113 /////////////////////////////////////////////////////////////////
115 ///////////////////////////////////////////////////////////////////
116 #endif // ZYPP_PACKAGE_H