1 /*---------------------------------------------------------------------\
3 | |__ / \ / / . \ . \ |
8 \---------------------------------------------------------------------*/
9 /** \file zypp/zypp_detail/ZYppImpl.h
12 #ifndef ZYPP_ZYPP_DETAIL_ZYPPIMPL_H
13 #define ZYPP_ZYPP_DETAIL_ZYPPIMPL_H
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"
26 using namespace zypp::filesystem;
28 ///////////////////////////////////////////////////////////////////
30 { /////////////////////////////////////////////////////////////////
31 ///////////////////////////////////////////////////////////////////
33 { /////////////////////////////////////////////////////////////////
35 ///////////////////////////////////////////////////////////////////
37 // CLASS NAME : ZYppImpl
42 friend std::ostream & operator<<( std::ostream & str, const ZYppImpl & obj );
53 { return ResPool::instance(); }
55 ResPoolProxy poolProxy() const
56 { return ResPool::instance().proxy(); }
59 KeyRing_Ptr keyRing() const
63 Resolver_Ptr resolver() const
67 /** \todo Signal locale change. */
71 Target_Ptr target() const;
73 /** Same as \ref target but returns NULL if target is not
74 * initialized, instead of throwing.
76 Target_Ptr getTarget() const
81 * true, just init the target, dont populate store or pool
83 void initializeTarget( const Pathname & root, bool doRebuild_r );
90 /** Commit changes and transactions. */
91 ZYppCommitResult commit( const ZYppCommitPolicy & policy_r );
93 /** Install a source package on the Target. */
94 void installSrcPackage( const SrcPackage_constPtr & srcPackage_r );
96 /** Install a source package on the Target. */
97 ManagedFile provideSrcPackage( const SrcPackage_constPtr & srcPackage_r );
100 /** Get the path where zypp related plugins store persistent data and caches */
101 Pathname homePath() const;
103 /** Get the path where zypp related plugins store tmp data */
104 Pathname tmpPath() const;
106 /** set the home, if you need to change it */
107 void setHomePath( const Pathname & path );
110 DiskUsageCounter::MountPointSet diskUsage();
111 void setPartitions(const DiskUsageCounter::MountPointSet &mp);
112 DiskUsageCounter::MountPointSet getPartitions() const;
118 Resolver_Ptr _resolver;
120 KeyRing_Ptr _keyring;
123 /** defined mount points, used for disk usage counting */
124 shared_ptr<DiskUsageCounter> _disk_usage;
126 ///////////////////////////////////////////////////////////////////
128 /** \relates ZYppImpl Stream output */
129 std::ostream & operator<<( std::ostream & str, const ZYppImpl & obj );
131 /////////////////////////////////////////////////////////////////
132 } // namespace zypp_detail
133 ///////////////////////////////////////////////////////////////////
134 /////////////////////////////////////////////////////////////////
136 ///////////////////////////////////////////////////////////////////
137 #endif // ZYPP_ZYPP_DETAIL_ZYPPIMPL_H