libzypp 17.37.17
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
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>
30
31namespace zyppng {
32 class Context;
33}
34
36namespace 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 //
58 {
59 friend std::ostream & operator<<( std::ostream & str, const ZYpp & obj );
60
61 public:
64
65 public:
66
71 ResPool pool() const;
72
77 ResPoolProxy poolProxy() const;
78
80
82
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:
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;
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:
171 };
172
174} // namespace zypp
176#endif // ZYPP_ZYPP_H
std::set< MountPoint > MountPointSet
Gpg key handling.
Definition KeyRing.h:170
ResPool::instance().proxy();.
Global ResObject pool.
Definition ResPool.h:62
Options and policies for ZYpp::commit.
Result returned from ZYpp::commit.
ZYpp factory class (Singleton)
Definition ZYppFactory.h:44
Pathname homePath() const
Get the path where zypp related plugins store persistent data and caches.
Definition ZYpp.cc:93
shared_ptr< const ZYpp > constPtr
Definition ZYpp.h:63
zypp_detail::ZYppImpl Impl
Definition ZYpp.h:159
KeyRing_Ptr keyRing() const
Definition ZYpp.cc:56
ZYppCommitResult commit(const ZYppCommitPolicy &policy_r)
Commit changes and transactions.
Definition ZYpp.cc:83
Resolver_Ptr resolver() const
Definition ZYpp.cc:53
RW_pointer< Impl > _pimpl
Pointer to implementation.
Definition ZYpp.h:170
friend class ZYppFactory
Factory.
Definition ZYpp.h:158
DiskUsageCounter::MountPointSet diskUsage()
Definition ZYpp.cc:41
static void clearShutdownSignal()
To be called from zypper code.
Definition ZYpp.cc:80
void setPartitions(const DiskUsageCounter::MountPointSet &mp)
Definition ZYpp.cc:44
shared_ptr< Impl > Impl_Ptr
Definition ZYpp.h:160
Pathname tmpPath() const
Get the path where zypp related plugins store temp data.
Definition ZYpp.cc:96
DiskUsageCounter::MountPointSet getPartitions() const
Definition ZYpp.cc:47
void setHomePath(const Pathname &path)
set the home, if you need to change it
Definition ZYpp.cc:99
ZYppCommitResult CommitResult
Definition ZYpp.h:122
ResPool pool() const
Access to the global resolvable pool.
Definition ZYpp.cc:38
void installSrcPackage(const SrcPackage_constPtr &srcPackage_r)
Install a source package on the Target.
Definition ZYpp.cc:86
ZYpp(const Impl_Ptr &impl_r)
Factory ctor.
Target_Ptr target() const
Definition ZYpp.cc:65
void finishTarget()
Definition ZYpp.cc:74
Target_Ptr getTarget() const
Same as target but returns NULL if target is not initialized, instead of throwing.
Definition ZYpp.cc:68
ResPoolProxy poolProxy() const
Pool of ui::Selectable.
Definition ZYpp.cc:50
ManagedFile provideSrcPackage(const SrcPackage_constPtr &srcPackage_r)
Provides a source package on the Target.
Definition ZYpp.cc:89
void initializeTarget(const Pathname &root, bool doRebuild_r=false)
Definition ZYpp.cc:71
shared_ptr< ZYpp > Ptr
Definition ZYpp.h:62
static void setShutdownSignal()
To be called from zyppers signal handlers.
Definition ZYpp.cc:77
String related utilities and Regular expression matching.
boost::noncopyable NonCopyable
Ensure derived classes cannot be copied.
Definition NonCopyable.h:26
Easy-to use interface to the ZYPP dependency resolver.
AutoDispose< const Pathname > ManagedFile
A Pathname plus associated cleanup code to be executed when path is no longer needed.
Definition ManagedFile.h:27
std::ostream & operator<<(std::ostream &str, const SerialNumber &obj)
const Arch Arch_armv7hnl Arch_armv7nhl ZYPP_API
Definition Arch.h:247
Wrapper for const correct access via Smart pointer types.
Definition PtrTypes.h:293
Provides API related macros.