libzypp 8.13.6
|
00001 /*---------------------------------------------------------------------\ 00002 | ____ _ __ __ ___ | 00003 | |__ / \ / / . \ . \ | 00004 | / / \ V /| _/ _/ | 00005 | / /__ | | | | | | | 00006 | /_____||_| |_| |_| | 00007 | | 00008 \---------------------------------------------------------------------*/ 00009 00010 #ifndef ZYPP_REPO_DELTACANDIDATES_H 00011 #define ZYPP_REPO_DELTACANDIDATES_H 00012 00013 #include <iosfwd> 00014 #include <list> 00015 00016 #include "zypp/base/PtrTypes.h" 00017 #include "zypp/base/Function.h" 00018 #include "zypp/repo/PackageDelta.h" 00019 #include "zypp/Repository.h" 00020 #include "zypp/Package.h" 00021 00023 namespace zypp 00024 { 00025 00026 namespace repo 00027 { 00028 00036 class DeltaCandidates 00037 { 00038 friend std::ostream & operator<<( std::ostream & str, const DeltaCandidates & obj ); 00039 00040 public: 00042 class Impl; 00043 00044 public: 00045 DeltaCandidates(); 00050 DeltaCandidates( const std::list<Repository> & repos, const std::string & pkgname = "" ); 00052 ~DeltaCandidates(); 00053 00054 std::list<packagedelta::DeltaRpm> deltaRpms(const Package::constPtr & package) const; 00055 00056 private: 00058 RWCOW_pointer<Impl> _pimpl; 00059 }; 00061 00063 std::ostream & operator<<( std::ostream & str, const DeltaCandidates & obj ); 00064 00066 00070 template<class RepoIter> 00071 inline DeltaCandidates makeDeltaCandidates( RepoIter begin_r, RepoIter end_r ) 00072 { return DeltaCandidates( std::list<Repository>( begin_r, end_r ) ); } 00073 00077 template<class RepoContainer> 00078 inline DeltaCandidates makeDeltaCandidates( const RepoContainer & cont_r ) 00079 { return makeDeltaCandidates( cont_r.begin(), cont_r.end() ); } 00080 00081 00083 } // namespace repo 00086 } // namespace zypp 00088 #endif // ZYPP_REPO_DELTACANDIDATES_H