added disk usage data to PackageImplIf interface, provide this info from
[platform/upstream/libzypp.git] / zypp / Package.h
1 /*---------------------------------------------------------------------\
2 |                          ____ _   __ __ ___                          |
3 |                         |__  / \ / / . \ . \                         |
4 |                           / / \ V /|  _/  _/                         |
5 |                          / /__ | | | | | |                           |
6 |                         /_____||_| |_| |_|                           |
7 |                                                                      |
8 \---------------------------------------------------------------------*/
9 /** \file       zypp/Package.h
10  *
11 */
12 #ifndef ZYPP_PACKAGE_H
13 #define ZYPP_PACKAGE_H
14
15 #include "zypp/ResObject.h"
16 #include "zypp/detail/PackageImplIf.h"
17
18 ///////////////////////////////////////////////////////////////////
19 namespace zypp
20 { /////////////////////////////////////////////////////////////////
21
22   ///////////////////////////////////////////////////////////////////
23   //
24   //    CLASS NAME : Package
25   //
26   /** Package interface.
27   */
28   class Package : public ResObject
29   {
30   public:
31     typedef detail::PackageImplIf    Impl;
32     typedef Package                  Self;
33     typedef ResTraits<Self>          TraitsType;
34     typedef TraitsType::PtrType      Ptr;
35     typedef TraitsType::constPtrType constPtr;
36     typedef Impl::DiskUsage          DiskUsage;
37
38   public:
39     /** Time of package installation */
40     Date installtime();
41     /** Get the package change log */
42     Changelog changelog();
43     // data here:
44
45   protected:
46     /** Ctor */
47     Package( const std::string & name_r,
48              const Edition & edition_r,
49              const Arch & arch_r );
50     /** Dtor */
51     virtual ~Package();
52
53   private:
54     /** Access implementation */
55     virtual Impl & pimpl() = 0;
56     /** Access implementation */
57     virtual const Impl & pimpl() const = 0;
58   };
59   ///////////////////////////////////////////////////////////////////
60
61   /////////////////////////////////////////////////////////////////
62 } // namespace zypp
63 ///////////////////////////////////////////////////////////////////
64 #endif // ZYPP_PACKAGE_H