Resolver.h

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------\
00002 |                          ____ _   __ __ ___                          |
00003 |                         |__  / \ / / . \ . \                         |
00004 |                           / / \ V /|  _/  _/                         |
00005 |                          / /__ | | | | | |                           |
00006 |                         /_____||_| |_| |_|                           |
00007 |                                                                      |
00008 \---------------------------------------------------------------------*/
00012 #ifndef ZYPP_RESOLVER_H
00013 #define ZYPP_RESOLVER_H
00014 
00015 #include <iosfwd>
00016 #include <functional>
00017 
00018 #include "zypp/base/ReferenceCounted.h"
00019 #include "zypp/base/PtrTypes.h"
00020 
00021 #include "zypp/ResPool.h"
00022 #include "zypp/UpgradeStatistics.h"
00023 #include "zypp/solver/detail/Resolver.h"
00024 #include "zypp/solver/detail/ResolverContext.h"
00025 #include "zypp/ProblemTypes.h"
00026 
00028 namespace zypp
00029 { 
00030 
00031 
00032 
00034   //
00035   //    CLASS NAME : Resolver
00036   //
00039   class Resolver : public base::ReferenceCounted, private base::NonCopyable
00040   {
00041   public:
00042 
00044     Resolver( const ResPool & pool );
00046     virtual ~Resolver();
00047 
00054     bool verifySystem (void);
00055 
00070     bool establishPool (void);
00071 
00085     bool freshenPool (void);
00086 
00098     bool resolvePool (void);
00099 
00100     /*
00101      * Undo solver changes done in resolvePool()
00102      * Throwing away all ignored dependencies.
00103      */
00104     void undo( void );
00105 
00106     /*
00107      * Get the most recent resolver context
00108      *
00109      * It will be NULL if resolvePool() or establishPool() was never called.
00110      * Depending on the return code of the last resolvePool() call,
00111      * it _either_ points to a valid or an invalid solution.
00112      */
00113     solver::detail::ResolverContext_Ptr context (void) const;
00114 
00128     void doUpgrade( UpgradeStatistics & opt_stats_r );
00129 
00134     std::list<PoolItem_Ref> problematicUpdateItems( void ) const;
00135 
00141     ResolverProblemList problems();
00142 
00147     void applySolutions( const ProblemSolutionList & solutions );
00148 
00149     Arch architecture() const;
00150     void setArchitecture( const Arch & arch);
00151 
00157     void setForceResolve (const bool force);
00158     const bool forceResolve();
00159 
00170     bool transactResObject( ResObject::constPtr robj, bool install = true);
00171 
00182     bool transactResKind( Resolvable::Kind kind );
00183 
00192     void transactReset( ResStatus::TransactByValue causer );
00193 
00194   protected:
00195 
00196   private:
00197     solver::detail::Resolver_Ptr _pimpl;
00198   };
00200 
00202 } // namespace zypp
00204 #endif // ZYPP_RESOLVER_H

Generated on Thu Jul 6 00:07:22 2006 for zypp by  doxygen 1.4.6