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;
41 /** Time of package installation */
42 Date installtime() const;
43 /** Get the package change log */
44 Changelog changelog() const;
46 Date buildtime() const;
48 std::string buildhost() const;
50 std::string distribution() const;
52 Vendor vendor() const;
54 Label license() const;
56 std::string packager() const;
58 PackageGroup group() const;
59 /** Don't ship it as class Url, because it might be
60 * in fact anything but a legal Url. */
61 std::string url() const;
63 std::string os() const;
73 ByteCount sourcesize() const;
75 ByteCount archivesize() const;
77 std::list<std::string> authors() const;
79 std::list<std::string> filenames() const;
81 /** Disk usage per directory */
82 DiskUsage diskusage() const;
85 License licenseToConfirm() const;
87 Pathname plainRpm() const;
89 std::list<PatchRpm> patchRpms() const;
91 std::list<DeltaRpm> deltaRpms() const;
95 Pathname getPlainRpm() const;
99 Pathname getDeltaRpm(BaseVersion & base_r) const;
103 Pathname getPatchRpm(BaseVersion & base_r) const;
105 bool installOnly() const;
106 /** ID of the media */
107 unsigned mediaId() const;
108 /** location in source */
109 Pathname location() const;
115 Package( const NVRAD & nvrad_r );
120 /** Access implementation */
121 virtual Impl & pimpl() = 0;
122 /** Access implementation */
123 virtual const Impl & pimpl() const = 0;
125 ///////////////////////////////////////////////////////////////////
127 /////////////////////////////////////////////////////////////////
129 ///////////////////////////////////////////////////////////////////
130 #endif // ZYPP_PACKAGE_H