libzypp 17.37.10

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>
16#include <zypp/zypp_detail/ZYppImpl.h>
17#include <zypp/sat/Pool.h>
18#include <zypp/ManagedFile.h>
19
20 using std::endl;
21
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
33 //
34 // Forward to Impl:
35 //
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
60 //
61 // Forward to Impl:
62 //
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 void ZYpp::setShutdownSignal()
78 { zypp_detail::ZYppImpl::setShutdownSignal(); }
79
80 void ZYpp::clearShutdownSignal()
81 { zypp_detail::ZYppImpl::clearShutdownSignal(); }
82
83 ZYppCommitResult ZYpp::commit( const ZYppCommitPolicy & policy_r )
84 { return _pimpl->commit( policy_r ); }
85
86 void ZYpp::installSrcPackage( const SrcPackage_constPtr & srcPackage_r )
87 { _pimpl->installSrcPackage( srcPackage_r ); }
88
89 ManagedFile ZYpp::provideSrcPackage( const SrcPackage_constPtr & srcPackage_r )
90 {return _pimpl->provideSrcPackage( srcPackage_r ); }
91
92
93 Pathname ZYpp::homePath() const
94 { return _pimpl->homePath(); }
95
96 Pathname ZYpp::tmpPath() const
97 { return _pimpl->tmpPath(); }
98
99 void ZYpp::setHomePath( const Pathname & path )
100 { _pimpl->setHomePath(path); }
101
103} // namespace zypp
Pool.h
ZYppImpl.h
ZYpp.h
Target_Ptr
zypp::DiskUsageCounter::MountPointSet
std::set< MountPoint > MountPointSet
Definition DiskUsageCounter.h:154
zypp::ResPoolProxy
ResPool::instance().proxy();.
Definition ResPoolProxy.h:36
zypp::ResPool
Global ResObject pool.
Definition ResPool.h:62
zypp::ZYppCommitPolicy
Options and policies for ZYpp::commit.
Definition ZYppCommitPolicy.h:34
zypp::ZYppCommitResult
Result returned from ZYpp::commit.
Definition ZYppCommitResult.h:64
zypp::ZYpp::homePath
Pathname homePath() const
Get the path where zypp related plugins store persistent data and caches.
Definition ZYpp.cc:93
zypp::ZYpp::keyRing
KeyRing_Ptr keyRing() const
Definition ZYpp.cc:56
zypp::ZYpp::commit
ZYppCommitResult commit(const ZYppCommitPolicy &policy_r)
Commit changes and transactions.
Definition ZYpp.cc:83
zypp::ZYpp::resolver
Resolver_Ptr resolver() const
Definition ZYpp.cc:53
zypp::ZYpp::_pimpl
RW_pointer< Impl > _pimpl
Pointer to implementation.
Definition ZYpp.h:170
zypp::ZYpp::diskUsage
DiskUsageCounter::MountPointSet diskUsage()
Definition ZYpp.cc:41
zypp::ZYpp::clearShutdownSignal
static void clearShutdownSignal()
To be called from zypper code.
Definition ZYpp.cc:80
zypp::ZYpp::setPartitions
void setPartitions(const DiskUsageCounter::MountPointSet &mp)
Definition ZYpp.cc:44
zypp::ZYpp::tmpPath
Pathname tmpPath() const
Get the path where zypp related plugins store temp data.
Definition ZYpp.cc:96
zypp::ZYpp::getPartitions
DiskUsageCounter::MountPointSet getPartitions() const
Definition ZYpp.cc:47
zypp::ZYpp::setHomePath
void setHomePath(const Pathname &path)
set the home, if you need to change it
Definition ZYpp.cc:99
zypp::ZYpp::pool
ResPool pool() const
Access to the global resolvable pool.
Definition ZYpp.cc:38
zypp::ZYpp::installSrcPackage
void installSrcPackage(const SrcPackage_constPtr &srcPackage_r)
Install a source package on the Target.
Definition ZYpp.cc:86
zypp::ZYpp::ZYpp
ZYpp(const Impl_Ptr &impl_r)
Factory ctor.
Definition ZYppFactory.cc:331
zypp::ZYpp::target
Target_Ptr target() const
Definition ZYpp.cc:65
zypp::ZYpp::finishTarget
void finishTarget()
Definition ZYpp.cc:74
zypp::ZYpp::getTarget
Target_Ptr getTarget() const
Same as target but returns NULL if target is not initialized, instead of throwing.
Definition ZYpp.cc:68
zypp::ZYpp::poolProxy
ResPoolProxy poolProxy() const
Pool of ui::Selectable.
Definition ZYpp.cc:50
zypp::ZYpp::provideSrcPackage
ManagedFile provideSrcPackage(const SrcPackage_constPtr &srcPackage_r)
Provides a source package on the Target.
Definition ZYpp.cc:89
zypp::ZYpp::initializeTarget
void initializeTarget(const Pathname &root, bool doRebuild_r=false)
Definition ZYpp.cc:71
zypp::ZYpp::setShutdownSignal
static void setShutdownSignal()
To be called from zyppers signal handlers.
Definition ZYpp.cc:77
zypp::filesystem::Pathname
Pathname.
Definition Pathname.h:47
zypp::zypp_detail::ZYppImpl::setShutdownSignal
static void setShutdownSignal()
Enable the shutdown signal for zypp_poll calls.
Definition ZYppImpl.cc:276
zypp::zypp_detail::ZYppImpl::clearShutdownSignal
static void clearShutdownSignal()
Disable the shutdown signal for zypp_poll calls.
Definition ZYppImpl.cc:288
str
String related utilities and Regular expression matching.
zypp
Easy-to use interface to the ZYPP dependency resolver.
Definition Application.cc:20
zypp::ManagedFile
AutoDispose< const Pathname > ManagedFile
A Pathname plus associated cleanup code to be executed when path is no longer needed.
Definition ManagedFile.h:27
zypp::operator<<
std::ostream & operator<<(std::ostream &str, const SerialNumber &obj)
Definition SerialNumber.cc:52
ManagedFile.h
Logger.h