- Create the cache directly from the schema (installed) file.
[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
18 using std::endl;
19
20 ///////////////////////////////////////////////////////////////////
21 namespace zypp
22 { /////////////////////////////////////////////////////////////////
23
24   ///////////////////////////////////////////////////////////////////
25   //
26   //    METHOD NAME : ZYpp::ZYpp
27   //    METHOD TYPE : Ctor
28   //
29   ZYpp::ZYpp( const Impl_Ptr & impl_r )
30   : _pimpl( impl_r )
31   {}
32
33   ///////////////////////////////////////////////////////////////////
34   //
35   //    METHOD NAME : ZYpp::~ZYpp
36   //    METHOD TYPE : Dtor
37   //
38   ZYpp::~ZYpp()
39   {}
40
41   ///////////////////////////////////////////////////////////////////
42   //
43   //    METHOD NAME : ZYpp::dumpOn
44   //    METHOD TYPE : std::ostream &
45   //
46   std::ostream & ZYpp::dumpOn( std::ostream & str ) const
47   {
48     return str << *_pimpl;
49   }
50
51   ///////////////////////////////////////////////////////////////////
52   //
53   // Forward to Impl:
54   //
55   ///////////////////////////////////////////////////////////////////
56
57   ResPool ZYpp::pool() const
58   { return _pimpl->pool(); }
59
60   DiskUsageCounter::MountPointSet ZYpp::diskUsage()
61   { return _pimpl->diskUsage(); }
62
63   void ZYpp::setPartitions(const DiskUsageCounter::MountPointSet &mp)
64   { return _pimpl->setPartitions(mp); }
65
66   DiskUsageCounter::MountPointSet ZYpp::getPartitions() const
67   { return _pimpl->getPartitions(); }
68
69   ResPoolProxy ZYpp::poolProxy() const
70   { return _pimpl->poolProxy(); }
71
72   Resolver_Ptr ZYpp::resolver() const
73   { return _pimpl->resolver(); }
74
75   KeyRing_Ptr ZYpp::keyRing() const
76   { return _pimpl->keyRing(); }
77
78   ///////////////////////////////////////////////////////////////////
79   //
80   // Forward to Impl:
81   //
82   ///////////////////////////////////////////////////////////////////
83
84   //SourceFeed_Ref ZYpp::sourceFeed() const
85   //{ return _pimpl->sourceFeed(); }
86
87   void ZYpp::addResolvables (const ResStore& store, bool installed)
88   {
89     _pimpl->addResolvables (store, installed);
90   }
91
92   void ZYpp::removeResolvables (const ResStore& store)
93   {
94     _pimpl->removeResolvables (store);
95   }
96
97   ///////////////////////////////////////////////////////////////////
98
99   Target_Ptr ZYpp::target() const
100   { return _pimpl->target(); }
101
102   void ZYpp::initTarget(const Pathname & root, bool commit_only )
103   { _pimpl->initTarget(root, commit_only); }
104   
105   void ZYpp::initializeTarget(const Pathname & root)
106   { _pimpl->initializeTarget(root); }
107
108   void ZYpp::finishTarget()
109   { _pimpl->finishTarget(); }
110
111   ZYppCommitResult ZYpp::commit( const ZYppCommitPolicy & policy_r )
112   { return _pimpl->commit( policy_r ); }
113
114   ///////////////////////////////////////////////////////////////////
115
116   void ZYpp::setTextLocale( const Locale & textLocale_r )
117   { _pimpl->setTextLocale( textLocale_r ); }
118
119   Locale ZYpp::getTextLocale() const
120   { return _pimpl->getTextLocale(); }
121
122   void ZYpp::setRequestedLocales( const LocaleSet & locales_r )
123   { _pimpl->setRequestedLocales( locales_r ); }
124
125   ZYpp::LocaleSet ZYpp::getRequestedLocales() const
126   { return _pimpl->getRequestedLocales(); }
127
128   ZYpp::LocaleSet ZYpp::getAvailableLocales() const
129   { return _pimpl->getAvailableLocales(); }
130
131   void ZYpp::availableLocale( const Locale & locale_r )
132   { _pimpl->availableLocale( locale_r ); }
133
134   Arch ZYpp::architecture() const
135   { return _pimpl->architecture(); }
136
137   void ZYpp::setArchitecture( const Arch & arch )
138   { _pimpl->setArchitecture( arch ); }
139
140   Pathname ZYpp::homePath() const
141   { return _pimpl->homePath(); }
142
143   Pathname ZYpp::tmpPath() const
144   { return _pimpl->tmpPath(); }
145   
146   void ZYpp::setHomePath( const Pathname & path )
147   { _pimpl->setHomePath(path); }
148
149   /////////////////////////////////////////////////////////////////
150 } // namespace zypp
151 ///////////////////////////////////////////////////////////////////