b906b62d28434a7abcd70825d811ed354a06b3d1
[platform/upstream/libzypp.git] / zypp / ResObject.cc
1 /*---------------------------------------------------------------------\
2 |                          ____ _   __ __ ___                          |
3 |                         |__  / \ / / . \ . \                         |
4 |                           / / \ V /|  _/  _/                         |
5 |                          / /__ | | | | | |                           |
6 |                         /_____||_| |_| |_|                           |
7 |                                                                      |
8 \---------------------------------------------------------------------*/
9 /** \file       zypp/ResObject.cc
10  *
11 */
12 #include "zypp/ResObject.h"
13 #include "zypp/Repository.h"
14 #include "zypp/detail/ResObjectImplIf.h"
15
16 using namespace std;
17
18 ///////////////////////////////////////////////////////////////////
19 namespace zypp
20 { /////////////////////////////////////////////////////////////////
21
22   IMPL_PTR_TYPE(ResObject);
23
24   ///////////////////////////////////////////////////////////////////
25   //
26   //    METHOD NAME : ResObject::ResObject
27   //    METHOD TYPE : Ctor
28   //
29   ResObject::ResObject( const Kind & kind_r,
30                         const NVRAD & nvrad_r )
31   : Resolvable( kind_r, nvrad_r )
32   {}
33
34   ///////////////////////////////////////////////////////////////////
35   //
36   //    METHOD NAME : ResObject::~ResObject
37   //    METHOD TYPE : Dtor
38   //
39   ResObject::~ResObject()
40   {}
41
42   ///////////////////////////////////////////////////////////////////
43   //
44   //    METHOD NAME : ResObject::dumpOn
45   //    METHOD TYPE : std::ostream &
46   //
47   std::ostream & ResObject::dumpOn( std::ostream & str ) const
48   {
49     str << "[S" << repository().numericId() << ":" << mediaNr() << "]";
50     return Resolvable::dumpOn( str );
51   }
52
53   ///////////////////////////////////////////////////////////////////
54   //
55   //    ResObject interface forwarded to implementation
56   //
57   ///////////////////////////////////////////////////////////////////
58
59   Text ResObject::summary() const
60   { return pimpl().summary().text(); }
61
62   Text ResObject::description() const
63   { return pimpl().description().text(); }
64
65   Text ResObject::insnotify() const
66   { return pimpl().insnotify().text(); }
67
68   Text ResObject::delnotify() const
69   { return pimpl().delnotify().text(); }
70
71   License ResObject::licenseToConfirm() const
72   { return pimpl().licenseToConfirm().text(); }
73
74   Vendor ResObject::vendor() const
75   { return pimpl().vendor(); }
76
77   ByteCount ResObject::size() const
78   { return pimpl().size(); }
79
80   Repository ResObject::repository() const
81   { return pimpl().repository(); }
82
83   ByteCount ResObject::downloadSize() const
84   { return pimpl().downloadSize(); }
85
86   unsigned ResObject::mediaNr() const
87   { return pimpl().mediaNr(); }
88
89   bool ResObject::installOnly() const
90   { return pimpl().installOnly(); }
91
92   Date ResObject::buildtime() const
93   { return pimpl().buildtime(); }
94
95   Date ResObject::installtime() const
96   { return pimpl().installtime(); }
97
98   const DiskUsage & ResObject::diskusage() const
99   { return pimpl().diskusage(); }
100
101   /////////////////////////////////////////////////////////////////
102 } // namespace zypp
103 ///////////////////////////////////////////////////////////////////