libzypp  11.13.5
CommitPackageCache.h
Go to the documentation of this file.
1 /*---------------------------------------------------------------------\
2 | ____ _ __ __ ___ |
3 | |__ / \ / / . \ . \ |
4 | / / \ V /| _/ _/ |
5 | / /__ | | | | | | |
6 | /_____||_| |_| |_| |
7 | |
8 \---------------------------------------------------------------------*/
12 #ifndef ZYPP_TARGET_COMMITPACKAGECACHE_H
13 #define ZYPP_TARGET_COMMITPACKAGECACHE_H
14 
15 #include <iosfwd>
16 
17 #include "zypp/base/PtrTypes.h"
18 #include "zypp/base/Function.h"
19 
20 #include "zypp/PoolItem.h"
21 #include "zypp/Pathname.h"
22 #include "zypp/ManagedFile.h"
23 
25 namespace zypp
26 {
27 
28  namespace target
29  {
30 
32  //
33  // CLASS NAME : CommitPackageCache
34  //
38  {
39  friend std::ostream & operator<<( std::ostream & str, const CommitPackageCache & obj );
40 
41  public:
42  typedef function<ManagedFile( const PoolItem & pi )> PackageProvider;
43 
44  public:
46  CommitPackageCache( const Pathname & rootDir_r,
47  const PackageProvider & packageProvider_r );
48 
51 
52  public:
54  void setCommitList( std::vector<sat::Solvable> commitList_r );
56  template <class _Iterator>
57  void setCommitList( _Iterator begin_r, _Iterator end_r )
58  { setCommitList( std::vector<sat::Solvable>( begin_r, end_r ) ); }
59 
61  ManagedFile get( const PoolItem & citem_r );
62 
63  public:
65  class Impl;
67  explicit CommitPackageCache( Impl * pimpl_r );
68  private:
71  };
73 
75  std::ostream & operator<<( std::ostream & str, const CommitPackageCache & obj );
76 
78  } // namespace target
81 } // namespace zypp
83 #endif // ZYPP_TARGET_COMMITPACKAGECACHE_H