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/detail/PackageImplIf.h"
18 ///////////////////////////////////////////////////////////////////
20 { /////////////////////////////////////////////////////////////////
22 DEFINE_PTR_TYPE(Package);
24 ///////////////////////////////////////////////////////////////////
26 // CLASS NAME : Package
28 /** Package interface.
30 class Package : public ResObject
33 typedef detail::PackageImplIf Impl;
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 /** Disk usage per directory */
79 DiskUsage diskusage() const;
82 * Checksum the source says this package should have
83 * \deprecated Use location().checksum()
85 ZYPP_DEPRECATED CheckSum checksum() const
86 { return location().checksum(); }
89 * \short Location of the resolvable in the repository
91 OnMediaLocation location() const;
94 Package( const NVRAD & nvrad_r );
99 /** Access implementation */
100 virtual Impl & pimpl() = 0;
101 /** Access implementation */
102 virtual const Impl & pimpl() const = 0;
104 ///////////////////////////////////////////////////////////////////
106 /////////////////////////////////////////////////////////////////
108 ///////////////////////////////////////////////////////////////////
109 #endif // ZYPP_PACKAGE_H