Imported Upstream version 16.3.2
[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   // class ZYpp:
27   // ctor and dtor implemented in  ZYppFactory.cc
28
29   std::ostream & operator<<( std::ostream & str, const ZYpp & obj )
30   { return str << *obj._pimpl; }
31
32   ///////////////////////////////////////////////////////////////////
33   //
34   // Forward to Impl:
35   //
36   ///////////////////////////////////////////////////////////////////
37
38   ResPool ZYpp::pool() const
39   { return _pimpl->pool(); }
40
41   DiskUsageCounter::MountPointSet ZYpp::diskUsage()
42   { return _pimpl->diskUsage(); }
43
44   void ZYpp::setPartitions(const DiskUsageCounter::MountPointSet &mp)
45   { return _pimpl->setPartitions(mp); }
46
47   DiskUsageCounter::MountPointSet ZYpp::getPartitions() const
48   { return _pimpl->getPartitions(); }
49
50   ResPoolProxy ZYpp::poolProxy() const
51   { return _pimpl->poolProxy(); }
52
53   Resolver_Ptr ZYpp::resolver() const
54   { return _pimpl->resolver(); }
55
56   KeyRing_Ptr ZYpp::keyRing() const
57   { return _pimpl->keyRing(); }
58
59   ///////////////////////////////////////////////////////////////////
60   //
61   // Forward to Impl:
62   //
63   ///////////////////////////////////////////////////////////////////
64
65   Target_Ptr ZYpp::target() const
66   { return _pimpl->target(); }
67
68   Target_Ptr ZYpp::getTarget() const
69   { return _pimpl->getTarget(); }
70
71   void ZYpp::initializeTarget( const Pathname & root, bool doRebuild_r )
72   { _pimpl->initializeTarget( root, doRebuild_r ); }
73
74   void ZYpp::finishTarget()
75   { _pimpl->finishTarget(); }
76
77   ZYppCommitResult ZYpp::commit( const ZYppCommitPolicy & policy_r )
78   { return _pimpl->commit( policy_r ); }
79
80   void ZYpp::installSrcPackage( const SrcPackage_constPtr & srcPackage_r )
81   { _pimpl->installSrcPackage( srcPackage_r ); }
82
83   ManagedFile ZYpp::provideSrcPackage( const SrcPackage_constPtr & srcPackage_r )
84   {return _pimpl->provideSrcPackage( srcPackage_r ); }
85   ///////////////////////////////////////////////////////////////////
86
87   Pathname ZYpp::homePath() const
88   { return _pimpl->homePath(); }
89
90   Pathname ZYpp::tmpPath() const
91   { return _pimpl->tmpPath(); }
92
93   void ZYpp::setHomePath( const Pathname & path )
94   { _pimpl->setHomePath(path); }
95
96   /////////////////////////////////////////////////////////////////
97 } // namespace zypp
98 ///////////////////////////////////////////////////////////////////