ZYpp.h

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------\
00002 |                          ____ _   __ __ ___                          |
00003 |                         |__  / \ / / . \ . \                         |
00004 |                           / / \ V /|  _/  _/                         |
00005 |                          / /__ | | | | | |                           |
00006 |                         /_____||_| |_| |_|                           |
00007 |                                                                      |
00008 \---------------------------------------------------------------------*/
00012 #ifndef ZYPP_ZYPP_H
00013 #define ZYPP_ZYPP_H
00014 
00015 #include <iosfwd>
00016 
00017 #include "zypp/base/ReferenceCounted.h"
00018 #include "zypp/base/NonCopyable.h"
00019 #include "zypp/base/PtrTypes.h"
00020 
00021 #include "zypp/base/Deprecated.h"
00022 #include "zypp/ZYppCommit.h"
00023 
00024 #include "zypp/Target.h"
00025 #include "zypp/Resolver.h"
00026 #include "zypp/KeyRing.h"
00027 #include "zypp/DiskUsageCounter.h"
00028 
00030 namespace zypp
00031 { 
00032 
00033   namespace zypp_detail
00034   {
00035     class ZYppImpl;
00036   }
00037 
00038   class ZYppFactory;
00039   class ResPool;
00040   class ResPoolProxy;
00041   class SourceFeed_Ref;
00042   class ResStore;
00043   class Locale;
00044   class KeyRing;
00045 
00047   //
00048   //    CLASS NAME : ZYpp
00049   //
00053   class ZYpp : public base::ReferenceCounted, private base::NonCopyable
00054   {
00055   public:
00056 
00057     typedef intrusive_ptr<ZYpp>       Ptr;
00058     typedef intrusive_ptr<const ZYpp> constPtr;
00059 
00060   public:
00061 
00063     ResPool pool() const;
00064 
00069     ResPoolProxy poolProxy() const;
00070 
00072     //SourceFeed_Ref sourceFeed() const;
00073 
00074     void addResolvables (const ResStore& store, bool installed = false);
00075 
00076     void removeResolvables (const ResStore& store);
00077 
00078     DiskUsageCounter::MountPointSet diskUsage();
00079 
00080     void setPartitions(const DiskUsageCounter::MountPointSet &mp);
00081 
00082   public:
00086     Target_Ptr target() const;
00087 
00092     void initializeTarget(const Pathname & root);
00093 
00098     ZYPP_DEPRECATED void initTarget(const Pathname & root, bool commit_only = false);  
00099     
00103     void finishTarget();
00104 
00105 
00106   public:
00107     typedef ZYppCommitResult CommitResult;
00108 
00114     ZYppCommitResult commit( const ZYppCommitPolicy & policy_r );
00115 
00116   public:
00118     Resolver_Ptr resolver() const;
00119     KeyRing_Ptr keyRing() const;
00120   public:
00124     void setTextLocale( const Locale & textLocale_r );
00126     Locale getTextLocale() const;
00127 
00128   public:
00129     typedef std::set<Locale> LocaleSet;
00136     void setRequestedLocales( const LocaleSet & locales_r );
00138     LocaleSet getRequestedLocales() const;
00139 
00145     LocaleSet getAvailableLocales() const;
00146 
00150     void availableLocale( const Locale & locale_r );
00151 
00152   public:
00154     Pathname homePath() const;
00155     
00157     Pathname tmpPath() const;
00158     
00160     void setHomePath( const Pathname & path );
00161 
00163     Arch architecture() const;
00167     void setArchitecture( const Arch & arch );
00168 
00169   protected:
00171     virtual ~ZYpp();
00173     virtual std::ostream & dumpOn( std::ostream & str ) const;
00174   private:
00176     friend class ZYppFactory;
00177 
00179     typedef zypp_detail::ZYppImpl Impl;
00180     typedef shared_ptr<Impl>      Impl_Ptr;
00182     explicit
00183     ZYpp( const Impl_Ptr & impl_r );
00184   private:
00186     RW_pointer<Impl> _pimpl;
00187   };
00189 
00191 } // namespace zypp
00193 #endif // ZYPP_ZYPP_H

Generated on Tue Nov 28 16:49:35 2006 for zypp by  doxygen 1.5.0