Imported Upstream version 15.21.0
[platform/upstream/libzypp.git] / zypp / ZYpp.cc
1 /*---------------------------------------------------------------------\
2 |                          ____ _   __ __ ___                          |
3 |                         |__  / \ / / . \ . \                         |
4 |                           / / \ V /|  _/  _/                         |
5 |                          / /__ | | | | | |                           |
6 |                         /_____||_| |_| |_|                           |
7 |                                                                      |
8 \---------------------------------------------------------------------*/
9 /** \file       zypp/ZYpp.cc
10  *
11 */
12 #include <iostream>
13 #include "zypp/base/Logger.h"
14
15 #include "zypp/ZYpp.h"
16 #include "zypp/zypp_detail/ZYppImpl.h"
17 #include "zypp/sat/Pool.h"
18 #include "zypp/ManagedFile.h"
19
20 using std::endl;
21
22 ///////////////////////////////////////////////////////////////////
23 namespace zypp
24 { /////////////////////////////////////////////////////////////////
25
26   ZYpp::ZYpp( const Impl_Ptr & impl_r )
27   : _pimpl( impl_r )
28   {}
29
30   ZYpp::~ZYpp()
31   {}
32
33   std::ostream & operator<<( std::ostream & str, const ZYpp & obj )
34   { return str << *obj._pimpl; }
35
36   ///////////////////////////////////////////////////////////////////
37   //
38   // Forward to Impl:
39   //
40   ///////////////////////////////////////////////////////////////////
41
42   ResPool ZYpp::pool() const
43   { return _pimpl->pool(); }
44
45   DiskUsageCounter::MountPointSet ZYpp::diskUsage()
46   { return _pimpl->diskUsage(); }
47
48   void ZYpp::setPartitions(const DiskUsageCounter::MountPointSet &mp)
49   { return _pimpl->setPartitions(mp); }
50
51   DiskUsageCounter::MountPointSet ZYpp::getPartitions() const
52   { return _pimpl->getPartitions(); }
53
54   ResPoolProxy ZYpp::poolProxy() const
55   { return _pimpl->poolProxy(); }
56
57   Resolver_Ptr ZYpp::resolver() const
58   { return _pimpl->resolver(); }
59
60   KeyRing_Ptr ZYpp::keyRing() const
61   { return _pimpl->keyRing(); }
62
63   ///////////////////////////////////////////////////////////////////
64   //
65   // Forward to Impl:
66   //
67   ///////////////////////////////////////////////////////////////////
68
69   Target_Ptr ZYpp::target() const
70   { return _pimpl->target(); }
71
72   Target_Ptr ZYpp::getTarget() const
73   { return _pimpl->getTarget(); }
74
75   void ZYpp::initializeTarget( const Pathname & root, bool doRebuild_r )
76   { _pimpl->initializeTarget( root, doRebuild_r ); }
77
78   void ZYpp::finishTarget()
79   { _pimpl->finishTarget(); }
80
81   ZYppCommitResult ZYpp::commit( const ZYppCommitPolicy & policy_r )
82   { return _pimpl->commit( policy_r ); }
83
84   void ZYpp::installSrcPackage( const SrcPackage_constPtr & srcPackage_r )
85   { _pimpl->installSrcPackage( srcPackage_r ); }
86
87   ManagedFile ZYpp::provideSrcPackage( const SrcPackage_constPtr & srcPackage_r )
88   {return _pimpl->provideSrcPackage( srcPackage_r ); }
89   ///////////////////////////////////////////////////////////////////
90
91   Pathname ZYpp::homePath() const
92   { return _pimpl->homePath(); }
93
94   Pathname ZYpp::tmpPath() const
95   { return _pimpl->tmpPath(); }
96
97   void ZYpp::setHomePath( const Pathname & path )
98   { _pimpl->setHomePath(path); }
99
100   /////////////////////////////////////////////////////////////////
101 } // namespace zypp
102 ///////////////////////////////////////////////////////////////////