ZYppImpl.h

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------\
00002 |                          ____ _   __ __ ___                          |
00003 |                         |__  / \ / / . \ . \                         |
00004 |                           / / \ V /|  _/  _/                         |
00005 |                          / /__ | | | | | |                           |
00006 |                         /_____||_| |_| |_|                           |
00007 |                                                                      |
00008 \---------------------------------------------------------------------*/
00012 #ifndef ZYPP_ZYPP_DETAIL_ZYPPIMPL_H
00013 #define ZYPP_ZYPP_DETAIL_ZYPPIMPL_H
00014 
00015 #include <iosfwd>
00016 
00017 #include "zypp/TmpPath.h"
00018 #include "zypp/ResPoolManager.h"
00019 #include "zypp/Target.h"
00020 #include "zypp/Resolver.h"
00021 #include "zypp/Locale.h"
00022 #include "zypp/KeyRing.h"
00023 #include "zypp/ZYppCommit.h"
00024 #include "zypp/ResTraits.h"
00025 #include "zypp/DiskUsageCounter.h"
00026 
00027 using namespace zypp::filesystem;
00028 
00030 namespace zypp
00031 { 
00032 
00033   namespace zypp_detail
00034   { 
00035 
00037     //
00038     //  CLASS NAME : ZYppImpl
00039     //
00041     class ZYppImpl
00042     {
00043       friend std::ostream & operator<<( std::ostream & str, const ZYppImpl & obj );
00044 
00045     public:
00047       ZYppImpl();
00049       ~ZYppImpl();
00050 
00051     private:
00052       void removeInstalledResolvables ();
00053 
00054     public:
00056       ResPool pool() const
00057       { return _pool.accessor(); }
00058 
00059       ResPoolProxy poolProxy() const
00060       { return _pool.proxy(); }
00061 
00063       KeyRing_Ptr keyRing() const
00064       { return _keyring; }
00065 
00066 
00067       Resolver_Ptr resolver() const
00068       { return _resolver; }
00069 
00070       void addResolvables (const ResStore& store, bool installed = false);
00071 
00072       void removeResolvables (const ResStore& store);
00073 
00074     public:
00079       Target_Ptr target() const;
00080 
00085       void initializeTarget(const Pathname & root);
00086 
00091       ZYPP_DEPRECATED void initTarget(const Pathname & root, bool commit_only);
00092 
00096       void finishTarget();
00097 
00099       ZYppCommitResult commit( const ZYppCommitPolicy & policy_r );
00100 
00102       void installSrcPackage( const SrcPackage_constPtr & srcPackage_r );
00103 
00104     public:
00106       void setTextLocale( const Locale & textLocale_r )
00107       { _textLocale = textLocale_r; }
00109       Locale getTextLocale() const
00110       { return _textLocale; }
00111     private:
00112       Locale _textLocale;
00113 
00114     public:
00115       typedef std::set<Locale> LocaleSet;
00117       void setRequestedLocales( const LocaleSet & locales_r );
00119       LocaleSet getRequestedLocales() const;
00121       LocaleSet getAvailableLocales() const;
00122 
00124       void availableLocale( const Locale & locale_r );
00125 
00126     public:
00128       Arch architecture() const
00129       { return _architecture; }
00133       void setArchitecture( const Arch & arch );
00134 
00136       Pathname homePath() const;
00137 
00139       Pathname tmpPath() const;
00140 
00142       void setHomePath( const Pathname & path );
00143 
00144     public:
00145       DiskUsageCounter::MountPointSet diskUsage();
00146       void setPartitions(const DiskUsageCounter::MountPointSet &mp);
00147       DiskUsageCounter::MountPointSet getPartitions() const;
00148 
00149     public:
00150         
00151       int applyLocks();
00152       
00153     private:
00155       ResPoolManager _pool;
00157       Target_Ptr _target;
00159       Resolver_Ptr _resolver;
00160 
00161       KeyRing_Ptr _keyring;
00163       Arch _architecture;
00165       Pathname _home_path;
00167       shared_ptr<DiskUsageCounter> _disk_usage;
00168     };
00170 
00172     std::ostream & operator<<( std::ostream & str, const ZYppImpl & obj );
00173 
00175   } // namespace zypp_detail
00178 } // namespace zypp
00180 #endif // ZYPP_ZYPP_DETAIL_ZYPPIMPL_H

Generated on Tue Sep 25 19:23:11 2007 for libzypp by  doxygen 1.5.3