libzypp 8.13.6
|
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 #include <list> 00017 00018 #include "zypp/base/PtrTypes.h" 00019 #include "zypp/base/Function.h" 00020 00021 #include "zypp/PoolItem.h" 00022 #include "zypp/Pathname.h" 00023 #include "zypp/ManagedFile.h" 00024 00026 namespace zypp 00027 { 00028 00029 namespace target 00030 { 00031 00033 // 00034 // CLASS NAME : CommitPackageCache 00035 // 00038 class CommitPackageCache 00039 { 00040 friend std::ostream & operator<<( std::ostream & str, const CommitPackageCache & obj ); 00041 00042 public: 00043 typedef std::list<PoolItem>::const_iterator const_iterator; 00044 typedef function<ManagedFile( const PoolItem & pi )> PackageProvider; 00045 00046 public: 00048 CommitPackageCache( const_iterator begin_r, 00049 const_iterator end_r, 00050 const Pathname & rootDir_r, 00051 const PackageProvider & packageProvider_r ); 00052 00054 ~CommitPackageCache(); 00055 00056 public: 00058 ManagedFile get( const_iterator citem_r ); 00059 00060 public: 00062 class Impl; 00064 explicit CommitPackageCache( Impl * pimpl_r ); 00065 private: 00067 RW_pointer<Impl> _pimpl; 00068 }; 00070 00072 std::ostream & operator<<( std::ostream & str, const CommitPackageCache & obj ); 00073 00075 } // namespace target 00078 } // namespace zypp 00080 #endif // ZYPP_TARGET_COMMITPACKAGECACHE_H