- Create the cache directly from the schema (installed) file.
[platform/upstream/libzypp.git] / zypp / Package.cc
1 /*---------------------------------------------------------------------\
2 |                          ____ _   __ __ ___                          |
3 |                         |__  / \ / / . \ . \                         |
4 |                           / / \ V /|  _/  _/                         |
5 |                          / /__ | | | | | |                           |
6 |                         /_____||_| |_| |_|                           |
7 |                                                                      |
8 \---------------------------------------------------------------------*/
9 /** \file       zypp/Package.cc
10  *
11 */
12 #include "zypp/Package.h"
13 #include "zypp/source/SourceImpl.h"
14 #include "zypp/base/Exception.h"
15
16 using namespace std;
17
18 ///////////////////////////////////////////////////////////////////
19 namespace zypp
20 { /////////////////////////////////////////////////////////////////
21
22   IMPL_PTR_TYPE(Package);
23
24   ///////////////////////////////////////////////////////////////////
25   //
26   //    METHOD NAME : Package::Package
27   //    METHOD TYPE : Ctor
28   //
29   Package::Package( const NVRAD & nvrad_r )
30   : ResObject( TraitsType::kind, nvrad_r )
31   {}
32
33   ///////////////////////////////////////////////////////////////////
34   //
35   //    METHOD NAME : Package::~Package
36   //    METHOD TYPE : Dtor
37   //
38   Package::~Package()
39   {}
40
41   ///////////////////////////////////////////////////////////////////
42   //
43   //    Package interface forwarded to implementation
44   //
45   ///////////////////////////////////////////////////////////////////
46
47   Changelog Package::changelog() const
48   { return pimpl().changelog(); }
49
50   /** */
51   std::string Package::buildhost() const
52   { return pimpl().buildhost(); }
53
54   CheckSum Package::checksum() const
55   { return pimpl().checksum(); }
56
57   /** */
58   std::string Package::distribution() const
59   { return pimpl().distribution(); }
60
61   /** */
62   Label Package::license() const
63   { return pimpl().license(); }
64
65   /** */
66   std::string Package::packager() const
67   { return pimpl().packager(); }
68
69   /** */
70   PackageGroup Package::group() const
71   { return pimpl().group(); }
72
73
74   /** Don't ship it as class Url, because it might be
75    * in fact anything but a legal Url. */
76   std::string Package::url() const
77   { return pimpl().url(); }
78
79   /** */
80   std::string Package::os() const
81   { return pimpl().os(); }
82
83   /** */
84   Text Package::prein() const
85   { return pimpl().prein(); }
86
87   /** */
88   Text Package::postin() const
89   { return pimpl().postin(); }
90
91   /** */
92   Text Package::preun() const
93   { return pimpl().preun(); }
94
95   /** */
96   Text Package::postun() const
97   { return pimpl().postun(); }
98
99   /** */
100   ByteCount Package::sourcesize() const
101   { return pimpl().sourcesize(); }
102
103   DiskUsage Package::diskusage() const
104   { return pimpl().diskusage(); }
105
106   /** */
107   std::list<std::string> Package::authors() const
108   { return pimpl().authors(); }
109
110   /** */
111   std::list<std::string> Package::filenames() const
112   { return pimpl().filenames(); }
113
114   Pathname Package::location() const
115   { return pimpl().location(); }
116
117   /////////////////////////////////////////////////////////////////
118 } // namespace zypp
119 ///////////////////////////////////////////////////////////////////