libzypp: zypp/ZYpp.h Source File

libzypp 17.25.10

ZYpp.h
Go to the documentation of this file.
1 /*---------------------------------------------------------------------\
2 | ____ _ __ __ ___ |
3 | |__ / \ / / . \ . \ |
4 | / / \ V /| _/ _/ |
5 | / /__ | | | | | | |
6 | /_____||_| |_| |_| |
7 | |
8 \---------------------------------------------------------------------*/
12 #ifndef ZYPP_ZYPP_H
13 #define ZYPP_ZYPP_H
14
15 #include <iosfwd>
16
17 #include <zypp/base/NonCopyable.h>
18 #include <zypp/base/PtrTypes.h>
19 #include <zypp/APIConfig.h>
20
21 #include <zypp/ZConfig.h>
22 #include <zypp/ManagedFile.h>
23
24 #include <zypp/ZYppCommit.h>
25 #include <zypp/ResTraits.h>
26
27 #include <zypp/Target.h>
28 #include <zypp/Resolver.h>
29 #include <zypp/KeyRing.h>
30 #include <zypp/DiskUsageCounter.h>
31
33 namespace zypp
34 {
35
36 namespace zypp_detail
37 {
38 class ZYppImpl;
39 }
40
41 class ZYppFactory;
42 class ResPool;
43 class ResPoolProxy;
44 class KeyRing;
45
47 //
48 // CLASS NAME : ZYpp
49 //
54 class ZYpp : private base::NonCopyable
55 {
56 friend std::ostream & operator<<( std::ostream & str, const ZYpp & obj );
57
58 public:
59 // can't get swig working if shared_ptr is without namespace here
60 typedef ::boost::shared_ptr<ZYpp> Ptr;
61 typedef ::boost::shared_ptr<const ZYpp> constPtr;
62
63 public:
64
69 ResPool pool() const;
70
75 ResPoolProxy poolProxy() const;
76
77 DiskUsageCounter::MountPointSet diskUsage();
78
79 void setPartitions(const DiskUsageCounter::MountPointSet &mp);
80
81 DiskUsageCounter::MountPointSet getPartitions() const;
82
83 public:
87 Target_Ptr target() const;
88
92 Target_Ptr getTarget() const;
93
100 void initializeTarget(const Pathname & root, bool doRebuild_r = false);
101
105 void finishTarget();
106
107
108 public:
109 typedef ZYppCommitResult CommitResult;
110
116 ZYppCommitResult commit( const ZYppCommitPolicy & policy_r );
117
121 void installSrcPackage( const SrcPackage_constPtr & srcPackage_r );
122
126 ManagedFile provideSrcPackage( const SrcPackage_constPtr & srcPackage_r );
127
128 public:
130 Resolver_Ptr resolver() const;
131 KeyRing_Ptr keyRing() const;
132
133 public:
135 Pathname homePath() const;
136
138 Pathname tmpPath() const;
139
141 void setHomePath( const Pathname & path );
142
143 private:
145 friend class ZYppFactory;
146 typedef zypp_detail::ZYppImpl Impl;
147 typedef shared_ptr<Impl> Impl_Ptr;
149 explicit ZYpp( const Impl_Ptr & impl_r );
150 private:
152 friend void ::boost::checked_delete<ZYpp>(ZYpp*); // template<class T> inline void checked_delete(T * x)
154 ~ZYpp();
155 private:
157 RW_pointer<Impl> _pimpl;
158 };
160
162 } // namespace zypp
164 #endif // ZYPP_ZYPP_H
DiskUsageCounter.h
KeyRing.h
ManagedFile.h
NonCopyable.h
PtrTypes.h
ResTraits.h
Resolver.h
Target.h
ZConfig.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::ZYppCommitPolicy
Options and policies for ZYpp::commit.
Definition: ZYppCommitPolicy.h:34
zypp::ZYppCommitResult
Result returned from ZYpp::commit.
Definition: ZYppCommitResult.h:63
zypp::ZYppFactory
ZYpp factory class (Singleton)
Definition: ZYppFactory.h:44
zypp::ZYpp
Definition: ZYpp.h:55
zypp::ZYpp::homePath
Pathname homePath() const
Get the path where zypp related plugins store persistent data and caches
Definition: ZYpp.cc:87
zypp::ZYpp::keyRing
KeyRing_Ptr keyRing() const
Definition: ZYpp.cc:56
zypp::ZYpp::CommitResult
ZYppCommitResult CommitResult
Definition: ZYpp.h:109
zypp::ZYpp::commit
ZYppCommitResult commit(const ZYppCommitPolicy &policy_r)
Commit changes and transactions.
Definition: ZYpp.cc:77
zypp::ZYpp::resolver
Resolver_Ptr resolver() const
Definition: ZYpp.cc:53
zypp::ZYpp::Impl_Ptr
shared_ptr< Impl > Impl_Ptr
Definition: ZYpp.h:147
zypp::ZYpp::Impl
zypp_detail::ZYppImpl Impl
Definition: ZYpp.h:146
zypp::ZYpp::_pimpl
RW_pointer< Impl > _pimpl
Pointer to implementation.
Definition: ZYpp.h:157
zypp::ZYpp::operator<<
friend std::ostream & operator<<(std::ostream &str, const ZYpp &obj)
Definition: ZYpp.cc:29
zypp::ZYpp::diskUsage
DiskUsageCounter::MountPointSet diskUsage()
Definition: ZYpp.cc:41
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:90
zypp::ZYpp::~ZYpp
~ZYpp()
Dtor.
Definition: ZYppFactory.cc:314
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:93
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:80
zypp::ZYpp::ZYpp
ZYpp(const Impl_Ptr &impl_r)
Factory ctor.
Definition: ZYppFactory.cc:307
zypp::ZYpp::constPtr
::boost::shared_ptr< const ZYpp > constPtr
Definition: ZYpp.h:61
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:83
zypp::ZYpp::Ptr
::boost::shared_ptr< ZYpp > Ptr
Definition: ZYpp.h:60
zypp::ZYpp::initializeTarget
void initializeTarget(const Pathname &root, bool doRebuild_r=false)
Definition: ZYpp.cc:71
zypp::filesystem::Pathname
Pathname.
Definition: Pathname.h:45
zypp::zypp_detail::ZYppImpl
Definition: ZYppImpl.h:39
str
String related utilities and Regular expression matching.
zypp::base::NonCopyable
boost::noncopyable NonCopyable
Ensure derived classes cannot be copied.
Definition: NonCopyable.h:26
zypp
Easy-to use interface to the ZYPP dependency resolver.
Definition: CodePitfalls.doc:2
zypp::RW_pointer
Wrapper for const correct access via Smart pointer types.
Definition: PtrTypes.h:286