RepoImpl.h

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------\
00002 |                          ____ _   __ __ ___                          |
00003 |                         |__  / \ / / . \ . \                         |
00004 |                           / / \ V /|  _/  _/                         |
00005 |                          / /__ | | | | | |                           |
00006 |                         /_____||_| |_| |_|                           |
00007 |                                                                      |
00008 \---------------------------------------------------------------------*/
00009 
00010 #ifndef ZYPP_RepoImpl_H
00011 #define ZYPP_RepoImpl_H
00012 
00013 #include <iosfwd>
00014 #include <map>
00015 #include <utility>
00016 #include "zypp/Arch.h"
00017 #include "zypp/Rel.h"
00018 #include "zypp/Pathname.h"
00019 #include "zypp/ProgressData.h"
00020 #include "zypp/data/RecordId.h"
00021 #include "zypp/repo/RepositoryImpl.h"
00022 #include "zypp/ResStore.h"
00023 #include "zypp/cache/sqlite3x/sqlite3x.hpp"
00024 #include "zypp/cache/CacheTypes.h"
00025 #include "zypp/cache/ResolvableQuery.h"
00026 #include "zypp/RepoInfo.h"
00027 
00029 namespace zypp
00030 { 
00031 
00032   namespace repo
00033   { 
00034 
00035     namespace cached
00036     { 
00037 
00038       struct RepoOptions
00039       {
00040         RepoOptions( const RepoInfo &repoinfo_,
00041                      const Pathname &dbdir_,
00042                      const data::RecordId &repository_id_ )
00043 
00044           : repoinfo(repoinfo_)
00045           , dbdir(dbdir_)
00046           , repository_id(repository_id_)
00047         {}
00048 
00049 
00050         ProgressData::ReceiverFnc readingResolvablesProgress;
00051         ProgressData::ReceiverFnc readingPatchDeltasProgress;
00052         RepoInfo repoinfo;
00053         Pathname dbdir;
00054         data::RecordId repository_id;
00055       };
00056 
00062       class RepoImpl : public repo::RepositoryImpl
00063       {
00064       public:
00065         typedef intrusive_ptr<RepoImpl>       Ptr;
00066         typedef intrusive_ptr<const RepoImpl> constPtr;
00067 
00068       public:
00070         RepoImpl( const RepoOptions &opts );
00072         ~RepoImpl();
00073 
00074       public:
00075         virtual void createResolvables();
00076         virtual void createPatchAndDeltas();
00077 
00078         cache::ResolvableQuery resolvableQuery();
00079       private:
00080         void read_capabilities( sqlite3x::sqlite3_connection &con,
00081                                 data::RecordId repo_id,
00082                                 std::map<data::RecordId, std::pair<Resolvable::Kind, NVRAD> > &nvras,
00083                                 ProgressData &ticks );
00084         cache::CacheTypes _type_cache;
00085         cache::ResolvableQuery _rquery;
00086         RepoOptions _options;
00087       public:
00088       };
00090 
00092     } // namespace cached
00094 
00095     using cached::RepoImpl;
00096 
00098   } // namespace source
00101 } // namespace zypp
00103 #endif // ZYPP_SOURCE_PLAINDIR_PLAINDIRIMPL_H
00104 

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