libzypp  15.28.6
ZYpp.cc
Go to the documentation of this file.
1 /*---------------------------------------------------------------------\
2 | ____ _ __ __ ___ |
3 | |__ / \ / / . \ . \ |
4 | / / \ V /| _/ _/ |
5 | / /__ | | | | | | |
6 | /_____||_| |_| |_| |
7 | |
8 \---------------------------------------------------------------------*/
12 #include <iostream>
13 #include "zypp/base/Logger.h"
14 
15 #include "zypp/ZYpp.h"
17 #include "zypp/sat/Pool.h"
18 #include "zypp/ManagedFile.h"
19 
20 using std::endl;
21 
23 namespace zypp
24 {
25 
26  ZYpp::ZYpp( const Impl_Ptr & impl_r )
27  : _pimpl( impl_r )
28  {}
29 
31  {}
32 
33  std::ostream & operator<<( std::ostream & str, const ZYpp & obj )
34  { return str << *obj._pimpl; }
35 
37  //
38  // Forward to Impl:
39  //
41 
43  { return _pimpl->pool(); }
44 
46  { return _pimpl->diskUsage(); }
47 
49  { return _pimpl->setPartitions(mp); }
50 
52  { return _pimpl->getPartitions(); }
53 
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 
64  //
65  // Forward to Impl:
66  //
68 
70  { return _pimpl->target(); }
71 
73  { return _pimpl->getTarget(); }
74 
75  void ZYpp::initializeTarget( const Pathname & root, bool doRebuild_r )
76  { _pimpl->initializeTarget( root, doRebuild_r ); }
77 
79  { _pimpl->finishTarget(); }
80 
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 ); }
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 
101 } // namespace zypp
ResPool pool() const
Access to the global resolvable pool.
Definition: ZYpp.cc:42
Pathname tmpPath() const
Get the path where zypp related plugins store temp data.
Definition: ZYpp.cc:94
Pathname homePath() const
Get the path where zypp related plugins store persistent data and caches.
Definition: ZYpp.cc:91
void setHomePath(const Pathname &path)
set the home, if you need to change it
Definition: ZYppImpl.cc:203
Result returned from ZYpp::commit.
~ZYpp()
Dtor.
Definition: ZYpp.cc:30
ManagedFile provideSrcPackage(const SrcPackage_constPtr &srcPackage_r)
Provides a source package on the Target.
Definition: ZYpp.cc:87
Pathname tmpPath() const
Get the path where zypp related plugins store tmp data.
Definition: ZYppImpl.cc:206
Target_Ptr target() const
Definition: ZYppImpl.cc:112
void installSrcPackage(const SrcPackage_constPtr &srcPackage_r)
Install a source package on the Target.
Definition: ZYpp.cc:84
DiskUsageCounter::MountPointSet diskUsage()
Definition: ZYppImpl.cc:86
shared_ptr< Impl > Impl_Ptr
Definition: ZYpp.h:147
ZYpp(const Impl_Ptr &impl_r)
Factory ctor.
Definition: ZYpp.cc:26
ResPool::instance().proxy();.
Definition: ResPoolProxy.h:34
void initializeTarget(const Pathname &root, bool doRebuild_r)
Definition: ZYppImpl.cc:119
Target_Ptr target() const
Definition: ZYpp.cc:69
std::set< MountPoint > MountPointSet
ZYppCommitResult commit(const ZYppCommitPolicy &policy_r)
Commit changes and transactions.
Definition: ZYppImpl.cc:148
void setPartitions(const DiskUsageCounter::MountPointSet &mp)
Definition: ZYpp.cc:48
void setHomePath(const Pathname &path)
set the home, if you need to change it
Definition: ZYpp.cc:97
std::ostream & operator<<(std::ostream &str, const Exception &obj)
Definition: Exception.cc:120
Options and policies for ZYpp::commit.
KeyRing_Ptr keyRing() const
Definition: ZYppImpl.h:59
ZYppCommitResult commit(const ZYppCommitPolicy &policy_r)
Commit changes and transactions.
Definition: ZYpp.cc:81
DiskUsageCounter::MountPointSet getPartitions() const
Definition: ZYpp.cc:51
void installSrcPackage(const SrcPackage_constPtr &srcPackage_r)
Install a source package on the Target.
Definition: ZYppImpl.cc:183
KeyRing_Ptr keyRing() const
Definition: ZYpp.cc:60
ResPoolProxy poolProxy() const
Definition: ZYppImpl.h:55
void initializeTarget(const Pathname &root, bool doRebuild_r=false)
Definition: ZYpp.cc:75
Global ResObject pool.
Definition: ResPool.h:60
ResPoolProxy poolProxy() const
Pool of ui::Selectable.
Definition: ZYpp.cc:54
Resolver_Ptr resolver() const
Definition: ZYpp.cc:57
DiskUsageCounter::MountPointSet getPartitions() const
Definition: ZYppImpl.cc:101
RW_pointer< Impl > _pimpl
Pointer to implementation.
Definition: ZYpp.h:157
Reference counted access to a Tp object calling a custom Dispose function when the last AutoDispose h...
Definition: AutoDispose.h:92
Target_Ptr getTarget() const
Same as target but returns NULL if target is not initialized, instead of throwing.
Definition: ZYppImpl.h:76
Pathname homePath() const
Get the path where zypp related plugins store persistent data and caches.
Definition: ZYppImpl.cc:200
ResPool pool() const
Definition: ZYppImpl.h:52
Resolver_Ptr resolver() const
Definition: ZYppImpl.h:63
Target_Ptr getTarget() const
Same as target but returns NULL if target is not initialized, instead of throwing.
Definition: ZYpp.cc:72
void setPartitions(const DiskUsageCounter::MountPointSet &mp)
Definition: ZYppImpl.cc:95
DiskUsageCounter::MountPointSet diskUsage()
Definition: ZYpp.cc:45
ManagedFile provideSrcPackage(const SrcPackage_constPtr &srcPackage_r)
Install a source package on the Target.
Definition: ZYppImpl.cc:190
void finishTarget()
Definition: ZYpp.cc:78