libzypp: zypp/zypp_detail/ZYppImpl.h Source File

libzypp 17.25.10

ZYppImpl.h
Go to the documentation of this file.
1 /*---------------------------------------------------------------------\
2 | ____ _ __ __ ___ |
3 | |__ / \ / / . \ . \ |
4 | / / \ V /| _/ _/ |
5 | / /__ | | | | | | |
6 | /_____||_| |_| |_| |
7 | |
8 \---------------------------------------------------------------------*/
12 #ifndef ZYPP_ZYPP_DETAIL_ZYPPIMPL_H
13 #define ZYPP_ZYPP_DETAIL_ZYPPIMPL_H
14
15 #include <iosfwd>
16
17 #include <zypp/TmpPath.h>
18 #include <zypp/Target.h>
19 #include <zypp/Resolver.h>
20 #include <zypp/KeyRing.h>
21 #include <zypp/ZYppCommit.h>
22 #include <zypp/ResTraits.h>
23 #include <zypp/DiskUsageCounter.h>
24 #include <zypp/ManagedFile.h>
25
27 namespace zypp
28 {
30 namespace zypp_detail
31 {
32
34 //
35 // CLASS NAME : ZYppImpl
36 //
38 class ZYppImpl
39 {
40 friend std::ostream & operator<<( std::ostream & str, const ZYppImpl & obj );
41
42 public:
44 ZYppImpl();
46 ~ZYppImpl();
47
48 public:
50 ResPool pool() const
51 { return ResPool::instance(); }
52
53 ResPoolProxy poolProxy() const
54 { return ResPool::instance().proxy(); }
55
57 KeyRing_Ptr keyRing() const
58 { return _keyring; }
59
60
61 Resolver_Ptr resolver() const
62 { return _resolver; }
63
64 public:
69 Target_Ptr target() const;
70
74 Target_Ptr getTarget() const
75 { return _target; }
76
81 void initializeTarget( const Pathname & root, bool doRebuild_r );
82
86 void finishTarget();
87
89 ZYppCommitResult commit( const ZYppCommitPolicy & policy_r );
90
92 void installSrcPackage( const SrcPackage_constPtr & srcPackage_r );
93
95 ManagedFile provideSrcPackage( const SrcPackage_constPtr & srcPackage_r );
96
97 public:
99 Pathname homePath() const;
100
102 Pathname tmpPath() const;
103
105 void setHomePath( const Pathname & path );
106
107 public:
108 DiskUsageCounter::MountPointSet diskUsage();
109 void setPartitions(const DiskUsageCounter::MountPointSet &mp);
110 DiskUsageCounter::MountPointSet getPartitions() const;
111
112 private:
114 Target_Ptr _target;
116 Resolver_Ptr _resolver;
117
118 KeyRing_Ptr _keyring;
120 Pathname _home_path;
122 shared_ptr<DiskUsageCounter> _disk_usage;
123 };
125
127 std::ostream & operator<<( std::ostream & str, const ZYppImpl & obj );
128
130 } // namespace zypp_detail
133 } // namespace zypp
135 #endif // ZYPP_ZYPP_DETAIL_ZYPPIMPL_H
DiskUsageCounter.h
KeyRing.h
ManagedFile.h
ResTraits.h
Resolver.h
Target.h
TmpPath.h
ZYppCommit.h
zypp::AutoDispose
Reference counted access to a Tp object calling a custom Dispose function when the last AutoDispose h...
Definition: AutoDispose.h:93
zypp::DiskUsageCounter::MountPointSet
std::set< MountPoint > MountPointSet
Definition: DiskUsageCounter.h:153
zypp::ResPoolProxy
ResPool::instance().proxy();.
Definition: ResPoolProxy.h:35
zypp::ResPool
Global ResObject pool.
Definition: ResPool.h:61
zypp::ResPool::instance
static ResPool instance()
Singleton ctor.
Definition: ResPool.cc:37
zypp::ResPool::proxy
ResPoolProxy proxy() const
preliminary
Definition: ResPool.cc:58
zypp::ZYppCommitPolicy
Options and policies for ZYpp::commit.
Definition: ZYppCommitPolicy.h:34
zypp::ZYppCommitResult
Result returned from ZYpp::commit.
Definition: ZYppCommitResult.h:63
zypp::filesystem::Pathname
Pathname.
Definition: Pathname.h:45
zypp::zypp_detail::ZYppImpl
Definition: ZYppImpl.h:39
zypp::zypp_detail::ZYppImpl::getPartitions
DiskUsageCounter::MountPointSet getPartitions() const
Definition: ZYppImpl.cc:102
zypp::zypp_detail::ZYppImpl::pool
ResPool pool() const
Definition: ZYppImpl.h:50
zypp::zypp_detail::ZYppImpl::operator<<
friend std::ostream & operator<<(std::ostream &str, const ZYppImpl &obj)
Definition: ZYppImpl.cc:219
zypp::zypp_detail::ZYppImpl::getTarget
Target_Ptr getTarget() const
Same as target but returns NULL if target is not initialized, instead of throwing.
Definition: ZYppImpl.h:74
zypp::zypp_detail::ZYppImpl::ZYppImpl
ZYppImpl()
Default ctor.
Definition: ZYppImpl.cc:67
zypp::zypp_detail::ZYppImpl::setPartitions
void setPartitions(const DiskUsageCounter::MountPointSet &mp)
Definition: ZYppImpl.cc:96
zypp::zypp_detail::ZYppImpl::target
Target_Ptr target() const
Definition: ZYppImpl.cc:113
zypp::zypp_detail::ZYppImpl::_keyring
KeyRing_Ptr _keyring
Definition: ZYppImpl.h:118
zypp::zypp_detail::ZYppImpl::setHomePath
void setHomePath(const Pathname &path)
set the home, if you need to change it
Definition: ZYppImpl.cc:208
zypp::zypp_detail::ZYppImpl::~ZYppImpl
~ZYppImpl()
Dtor.
Definition: ZYppImpl.cc:81
zypp::zypp_detail::ZYppImpl::poolProxy
ResPoolProxy poolProxy() const
Definition: ZYppImpl.h:53
zypp::zypp_detail::ZYppImpl::resolver
Resolver_Ptr resolver() const
Definition: ZYppImpl.h:61
zypp::zypp_detail::ZYppImpl::tmpPath
Pathname tmpPath() const
Get the path where zypp related plugins store tmp data
Definition: ZYppImpl.cc:211
zypp::zypp_detail::ZYppImpl::commit
ZYppCommitResult commit(const ZYppCommitPolicy &policy_r)
Commit changes and transactions.
Definition: ZYppImpl.cc:149
zypp::zypp_detail::ZYppImpl::finishTarget
void finishTarget()
Definition: ZYppImpl.cc:136
zypp::zypp_detail::ZYppImpl::installSrcPackage
void installSrcPackage(const SrcPackage_constPtr &srcPackage_r)
Install a source package on the Target.
Definition: ZYppImpl.cc:188
zypp::zypp_detail::ZYppImpl::_home_path
Pathname _home_path
Definition: ZYppImpl.h:120
zypp::zypp_detail::ZYppImpl::_disk_usage
shared_ptr< DiskUsageCounter > _disk_usage
defined mount points, used for disk usage counting
Definition: ZYppImpl.h:122
zypp::zypp_detail::ZYppImpl::keyRing
KeyRing_Ptr keyRing() const
Definition: ZYppImpl.h:57
zypp::zypp_detail::ZYppImpl::provideSrcPackage
ManagedFile provideSrcPackage(const SrcPackage_constPtr &srcPackage_r)
Install a source package on the Target.
Definition: ZYppImpl.cc:195
zypp::zypp_detail::ZYppImpl::homePath
Pathname homePath() const
Get the path where zypp related plugins store persistent data and caches
Definition: ZYppImpl.cc:205
zypp::zypp_detail::ZYppImpl::_resolver
Resolver_Ptr _resolver
Definition: ZYppImpl.h:116
zypp::zypp_detail::ZYppImpl::diskUsage
DiskUsageCounter::MountPointSet diskUsage()
Definition: ZYppImpl.cc:87
zypp::zypp_detail::ZYppImpl::_target
Target_Ptr _target
Definition: ZYppImpl.h:114
zypp::zypp_detail::ZYppImpl::initializeTarget
void initializeTarget(const Pathname &root, bool doRebuild_r)
Definition: ZYppImpl.cc:120
str
String related utilities and Regular expression matching.
zypp::zypp_detail::operator<<
std::ostream & operator<<(std::ostream &str, const ZYppImpl &obj)
Definition: ZYppImpl.cc:219
zypp
Easy-to use interface to the ZYPP dependency resolver.
Definition: CodePitfalls.doc:2