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 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: 00050 DeltaCandidates( const std::list<Repository> & repos ); 00052 ~DeltaCandidates(); 00053 00054 00055 std::list<packagedelta::PatchRpm> patchRpms(const Package::constPtr & package) const; 00056 std::list<packagedelta::DeltaRpm> deltaRpms(const Package::constPtr & package) const; 00057 00058 private: 00060 RWCOW_pointer<Impl> _pimpl; 00061 }; 00063 00065 std::ostream & operator<<( std::ostream & str, const DeltaCandidates & obj ); 00066 00068 00070 template<class RepositoryIter> 00071 inline DeltaCandidates makeDeltaCandidates( RepositoryIter begin_r, RepositoryIter end_r ) 00072 { return DeltaCandidates( std::list<Repository>( begin_r, end_r ) ); } 00073 00075 template<class RepositoryContainer> 00076 inline DeltaCandidates makeDeltaCandidates( const RepositoryContainer & cont_r ) 00077 { return makeDeltaCandidates( cont_r.begin(), cont_r.end() ); } 00078 00079 00081 } // namespace repo 00084 } // namespace zypp 00086 #endif // ZYPP_REPO_DELTACANDIDATES_H
1.5.3