libzypp 17.31.23
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>
24#include <zypp/ManagedFile.h>
25
27namespace zypp
28{
30 namespace zypp_detail
31 {
32
34 //
35 // CLASS NAME : ZYppImpl
36 //
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
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
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:
111
112 public:
114 void changeTargetTo( Target_Ptr newtarget_r );
115
116 private:
120 Resolver_Ptr _resolver;
121
122 KeyRing_Ptr _keyring;
126 shared_ptr<DiskUsageCounter> _disk_usage;
127 };
129
131 std::ostream & operator<<( std::ostream & str, const ZYppImpl & obj );
132
134 } // namespace zypp_detail
137} // namespace zypp
139#endif // ZYPP_ZYPP_DETAIL_ZYPPIMPL_H
std::set< MountPoint > MountPointSet
ResPool::instance().proxy();.
Definition: ResPoolProxy.h:35
Global ResObject pool.
Definition: ResPool.h:61
static ResPool instance()
Singleton ctor.
Definition: ResPool.cc:37
ResPoolProxy proxy() const
preliminary
Definition: ResPool.cc:58
Options and policies for ZYpp::commit.
Result returned from ZYpp::commit.
DiskUsageCounter::MountPointSet getPartitions() const
Definition: ZYppImpl.cc:103
ResPool pool() const
Definition: ZYppImpl.h:50
Target_Ptr getTarget() const
Same as target but returns NULL if target is not initialized, instead of throwing.
Definition: ZYppImpl.h:74
ZYppImpl()
Default ctor.
Definition: ZYppImpl.cc:67
friend std::ostream & operator<<(std::ostream &str, const ZYppImpl &obj)
Definition: ZYppImpl.cc:228
void setPartitions(const DiskUsageCounter::MountPointSet &mp)
Definition: ZYppImpl.cc:97
Target_Ptr target() const
Definition: ZYppImpl.cc:114
void setHomePath(const Pathname &path)
set the home, if you need to change it
Definition: ZYppImpl.cc:217
ResPoolProxy poolProxy() const
Definition: ZYppImpl.h:53
Resolver_Ptr resolver() const
Definition: ZYppImpl.h:61
Pathname tmpPath() const
Get the path where zypp related plugins store tmp data
Definition: ZYppImpl.cc:220
ZYppCommitResult commit(const ZYppCommitPolicy &policy_r)
Commit changes and transactions.
Definition: ZYppImpl.cc:158
void changeTargetTo(Target_Ptr newtarget_r)
Hook for actions to trigger if the Target changes (initialize/finish)
Definition: ZYppImpl.cc:121
void installSrcPackage(const SrcPackage_constPtr &srcPackage_r)
Install a source package on the Target.
Definition: ZYppImpl.cc:197
shared_ptr< DiskUsageCounter > _disk_usage
defined mount points, used for disk usage counting
Definition: ZYppImpl.h:126
KeyRing_Ptr keyRing() const
Definition: ZYppImpl.h:57
ManagedFile provideSrcPackage(const SrcPackage_constPtr &srcPackage_r)
Install a source package on the Target.
Definition: ZYppImpl.cc:204
Pathname homePath() const
Get the path where zypp related plugins store persistent data and caches
Definition: ZYppImpl.cc:214
DiskUsageCounter::MountPointSet diskUsage()
Definition: ZYppImpl.cc:88
void initializeTarget(const Pathname &root, bool doRebuild_r)
Definition: ZYppImpl.cc:130
String related utilities and Regular expression matching.
std::ostream & operator<<(std::ostream &str, const ZYppImpl &obj)
Definition: ZYppImpl.cc:228
Easy-to use interface to the ZYPP dependency resolver.
Definition: CodePitfalls.doc:2