libzypp
10.5.0
|
00001 /*---------------------------------------------------------------------\ 00002 | ____ _ __ __ ___ | 00003 | |__ / \ / / . \ . \ | 00004 | / / \ V /| _/ _/ | 00005 | / /__ | | | | | | | 00006 | /_____||_| |_| |_| | 00007 | | 00008 \---------------------------------------------------------------------*/ 00012 #ifndef ZYPP_TARGET_COMMITPACKAGECACHE_H 00013 #define ZYPP_TARGET_COMMITPACKAGECACHE_H 00014 00015 #include <iosfwd> 00016 00017 #include "zypp/base/PtrTypes.h" 00018 #include "zypp/base/Function.h" 00019 00020 #include "zypp/PoolItem.h" 00021 #include "zypp/Pathname.h" 00022 #include "zypp/ManagedFile.h" 00023 00025 namespace zypp 00026 { 00027 00028 namespace target 00029 { 00030 00032 // 00033 // CLASS NAME : CommitPackageCache 00034 // 00037 class CommitPackageCache 00038 { 00039 friend std::ostream & operator<<( std::ostream & str, const CommitPackageCache & obj ); 00040 00041 public: 00042 typedef function<ManagedFile( const PoolItem & pi )> PackageProvider; 00043 00044 public: 00046 CommitPackageCache( const Pathname & rootDir_r, 00047 const PackageProvider & packageProvider_r ); 00048 00050 ~CommitPackageCache(); 00051 00052 public: 00054 void setCommitList( std::vector<sat::Solvable> commitList_r ); 00056 template <class _Iterator> 00057 void setCommitList( _Iterator begin_r, _Iterator end_r ) 00058 { setCommitList( std::vector<sat::Solvable>( begin_r, end_r ) ); } 00059 00061 ManagedFile get( const PoolItem & citem_r ); 00062 00063 public: 00065 class Impl; 00067 explicit CommitPackageCache( Impl * pimpl_r ); 00068 private: 00070 RW_pointer<Impl> _pimpl; 00071 }; 00073 00075 std::ostream & operator<<( std::ostream & str, const CommitPackageCache & obj ); 00076 00078 } // namespace target 00081 } // namespace zypp 00083 #endif // ZYPP_TARGET_COMMITPACKAGECACHE_H