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 License licenseToConfirm() const;
83 Pathname plainRpm() const;
85 std::list<PatchRpm> patchRpms() const;
87 std::list<DeltaRpm> deltaRpms() const;
91 Pathname getPlainRpm() const;
95 Pathname getDeltaRpm(BaseVersion & base_r) const;
99 Pathname getPatchRpm(BaseVersion & base_r) const;
101 bool installOnly() const;
102 /** ID of the media */
103 unsigned mediaId() const;
109 Package( const NVRAD & nvrad_r );
114 /** Access implementation */
115 virtual Impl & pimpl() = 0;
116 /** Access implementation */
117 virtual const Impl & pimpl() const = 0;
119 ///////////////////////////////////////////////////////////////////
121 /////////////////////////////////////////////////////////////////
123 ///////////////////////////////////////////////////////////////////
124 #endif // ZYPP_PACKAGE_H