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;
91 //Pathname plainRpm() const;
93 std::list<PatchRpm> patchRpms() const;
95 std::list<DeltaRpm> deltaRpms() const;
99 //Pathname getPlainRpm() const;
103 Pathname getDeltaRpm(BaseVersion & base_r) const;
107 Pathname getPatchRpm(BaseVersion & base_r) const;
109 bool installOnly() const;
110 /** ID of the media */
111 unsigned mediaId() const;
112 /** location in source */
113 Pathname location() const;
119 Package( const NVRAD & nvrad_r );
124 /** Access implementation */
125 virtual Impl & pimpl() = 0;
126 /** Access implementation */
127 virtual const Impl & pimpl() const = 0;
129 ///////////////////////////////////////////////////////////////////
131 /////////////////////////////////////////////////////////////////
133 ///////////////////////////////////////////////////////////////////
134 #endif // ZYPP_PACKAGE_H