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/ResPoolManager.h"
00018 #include "zypp/SourceFeed.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/DiskUsageCounter.h"
00025 
00027 namespace zypp
00028 { 
00029 
00030   namespace zypp_detail
00031   { 
00032 
00034     //
00035     //  CLASS NAME : ZYppImpl
00036     //
00038     class ZYppImpl
00039     {
00040       friend std::ostream & operator<<( std::ostream & str, const ZYppImpl & obj );
00041 
00042     public:
00044       ZYppImpl();
00046       ~ZYppImpl();
00047 
00048     private:
00049       void removeInstalledResolvables ();
00050 
00051     public:
00053       ResPool pool() const
00054       { return _pool.accessor(); }
00055 
00056       ResPoolProxy poolProxy() const
00057       { return _pool.proxy(); }
00058 
00060       SourceFeed_Ref sourceFeed() const
00061       { return _sourceFeed; }
00062 
00064       KeyRing_Ptr keyRing() const
00065       { return _keyring; }
00066 
00067 
00068       Resolver_Ptr resolver() const
00069       { return _resolver; }
00070 
00071       void addResolvables (const ResStore& store, bool installed = false);
00072 
00073       void removeResolvables (const ResStore& store);
00074 
00075     public:
00080       Target_Ptr target() const;
00081 
00086       void initTarget(const Pathname & root, bool commit_only = false);
00087 
00091       void finishTarget();
00092 
00094       ZYppCommitResult commit( const ZYppCommitPolicy & policy_r );
00095 
00096     public:
00098       void setTextLocale( const Locale & textLocale_r )
00099       { _textLocale = textLocale_r; }
00101       Locale getTextLocale() const
00102       { return _textLocale; }
00103     private:
00104       Locale _textLocale;
00105 
00106     public:
00107       typedef std::set<Locale> LocaleSet;
00109       void setRequestedLocales( const LocaleSet & locales_r );
00111       LocaleSet getRequestedLocales() const;
00113       LocaleSet getAvailableLocales() const;
00114 
00116       void availableLocale( const Locale & locale_r );
00117 
00118     public:
00120       Arch architecture() const
00121       { return _architecture; }
00125       void setArchitecture( const Arch & arch );
00126 
00128       Pathname homePath() const;
00130       void setHomePath( const Pathname & path );
00131 
00132     public:
00133       DiskUsageCounter::MountPointSet diskUsage();
00134       void setPartitions(const DiskUsageCounter::MountPointSet &mp);
00135 
00136     private:
00138       ResPoolManager _pool;
00140       SourceFeed_Ref _sourceFeed;
00142       Target_Ptr _target;
00144       Resolver_Ptr _resolver;
00145 
00146       KeyRing_Ptr _keyring;
00148       Arch _architecture;
00150       Pathname _home_path;
00152       DiskUsageCounter _disk_usage;
00153     };
00155 
00157     std::ostream & operator<<( std::ostream & str, const ZYppImpl & obj );
00158 
00160   } // namespace zypp_detail
00163 } // namespace zypp
00165 #endif // ZYPP_ZYPP_DETAIL_ZYPPIMPL_H

Generated on Mon Jun 5 19:10:46 2006 for zypp by  doxygen 1.4.6