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
34 typedef detail::PackageImplIf Impl;
36 typedef ResTraits<Self> TraitsType;
37 typedef TraitsType::PtrType Ptr;
38 typedef TraitsType::constPtrType constPtr;
42 * Checksum the source says this package should have
44 CheckSum checksum() const;
45 /** Time of package installation */
46 Date installtime() const;
47 /** Get the package change log */
48 Changelog changelog() const;
50 Date buildtime() const;
52 std::string buildhost() const;
54 std::string distribution() const;
56 Vendor vendor() const;
58 Label license() const;
60 std::string packager() const;
62 PackageGroup group() const;
63 /** Don't ship it as class Url, because it might be
64 * in fact anything but a legal Url. */
65 std::string url() const;
67 std::string os() const;
77 ByteCount sourcesize() const;
79 ByteCount archivesize() const;
81 std::list<std::string> authors() const;
83 std::list<std::string> filenames() const;
85 /** Disk usage per directory */
86 DiskUsage diskusage() const;
89 License licenseToConfirm() const;
92 bool installOnly() const;
93 /** ID of the media */
94 unsigned mediaId() const;
95 /** location in source */
96 Pathname location() const;
102 Package( const NVRAD & nvrad_r );
107 /** Access implementation */
108 virtual Impl & pimpl() = 0;
109 /** Access implementation */
110 virtual const Impl & pimpl() const = 0;
112 ///////////////////////////////////////////////////////////////////
114 /////////////////////////////////////////////////////////////////
116 ///////////////////////////////////////////////////////////////////
117 #endif // ZYPP_PACKAGE_H