libzypp 17.37.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#include <iosfwd>
15
16#include <zypp/base/NonCopyable.h>
17#include <zypp/base/PtrTypes.h>
18#include <zypp-core/Globals.h>
19
20#include <zypp/ZConfig.h>
21#include <zypp/ManagedFile.h>
22
23#include <zypp/ZYppCommit.h>
24#include <zypp/ResTraits.h>
25
26#include <zypp/Target.h>
27#include <zypp/Resolver.h>
28#include <zypp/KeyRing.h>
29#include <zypp/DiskUsageCounter.h>
30
31 namespace zyppng {
32 class Context;
33}
34
36 namespace zypp
37{
38
39 namespace zypp_detail
40 {
41 class ZYppImpl;
42 }
43
44 class ZYppFactory;
45 class ResPool;
46 class ResPoolProxy;
47 class KeyRing;
48
50 //
51 // CLASS NAME : ZYpp
52 //
57 class ZYPP_API ZYpp : private base::NonCopyable
58 {
59 friend std::ostream & operator<<( std::ostream & str, const ZYpp & obj );
60
61 public:
62 using Ptr = shared_ptr<ZYpp>;
63 using constPtr = shared_ptr<const ZYpp>;
64
65 public:
66
71 ResPool pool() const;
72
77 ResPoolProxy poolProxy() const;
78
79 DiskUsageCounter::MountPointSet diskUsage();
80
81 void setPartitions(const DiskUsageCounter::MountPointSet &mp);
82
83 DiskUsageCounter::MountPointSet getPartitions() const;
84
85 public:
89 Target_Ptr target() const;
90
94 Target_Ptr getTarget() const;
95
102 void initializeTarget(const Pathname & root, bool doRebuild_r = false);
103
107 void finishTarget();
108
113 static void setShutdownSignal();
114
119 static void clearShutdownSignal();
120
121 public:
122 using CommitResult = ZYppCommitResult;
123
129 ZYppCommitResult commit( const ZYppCommitPolicy & policy_r );
130
134 void installSrcPackage( const SrcPackage_constPtr & srcPackage_r );
135
139 ManagedFile provideSrcPackage( const SrcPackage_constPtr & srcPackage_r );
140
141 public:
143 Resolver_Ptr resolver() const;
144 KeyRing_Ptr keyRing() const;
145
146 public:
148 Pathname homePath() const;
149
151 Pathname tmpPath() const;
152
154 void setHomePath( const Pathname & path );
155
156 private:
158 friend class ZYppFactory;
159 using Impl = zypp_detail::ZYppImpl;
160 using Impl_Ptr = shared_ptr<Impl>;
162 explicit ZYpp( const Impl_Ptr & impl_r );
163 private:
165 friend void ::boost::checked_delete<ZYpp>(ZYpp*) BOOST_NOEXCEPT; // template<class T> inline void checked_delete(T * x)
167 ~ZYpp();
168 private:
170 RW_pointer<Impl> _pimpl;
171 };
172
174} // namespace zypp
176#endif // ZYPP_ZYPP_H
DiskUsageCounter.h
KeyRing.h
ResTraits.h
Resolver.h
Target.h
ZConfig.h
ZYppCommit.h
Target_Ptr
shared_ptr
zypp::DiskUsageCounter::MountPointSet
std::set< MountPoint > MountPointSet
Definition DiskUsageCounter.h:154
zypp::KeyRing
Gpg key handling.
Definition KeyRing.h:170
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::ZYppFactory
ZYpp factory class (Singleton)
Definition ZYppFactory.h:44
zypp::ZYpp::homePath
Pathname homePath() const
Get the path where zypp related plugins store persistent data and caches.
Definition ZYpp.cc:93
zypp::ZYpp::constPtr
shared_ptr< const ZYpp > constPtr
Definition ZYpp.h:63
zypp::ZYpp::Impl
zypp_detail::ZYppImpl Impl
Definition ZYpp.h:159
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::ZYppFactory
friend class ZYppFactory
Factory.
Definition ZYpp.h:158
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::Impl_Ptr
shared_ptr< Impl > Impl_Ptr
Definition ZYpp.h:160
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::CommitResult
ZYppCommitResult CommitResult
Definition ZYpp.h:122
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::Ptr
shared_ptr< ZYpp > Ptr
Definition ZYpp.h:62
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
Definition ZYppImpl.h:41
zyppng::Context
Definition context.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::zypp_detail
Definition Target.h:38
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
zypp::ZYPP_API
const Arch Arch_armv7hnl Arch_armv7nhl ZYPP_API
Definition Arch.h:247
zyppng
Definition MediaNetworkRequestExecutor.h:16
zypp::RW_pointer
Wrapper for const correct access via Smart pointer types.
Definition PtrTypes.h:293
Globals.h
Provides API related macros.
ManagedFile.h
NonCopyable.h
PtrTypes.h