libzypp  17.7.0
Downloader.h
Go to the documentation of this file.
1 /*---------------------------------------------------------------------\
2 | ____ _ __ __ ___ |
3 | |__ / \ / / . \ . \ |
4 | / / \ V /| _/ _/ |
5 | / /__ | | | | | | |
6 | /_____||_| |_| |_| |
7 | |
8 \---------------------------------------------------------------------*/
9 
10 #ifndef ZYPP_SOURCE_YUM_DOWNLOADER
11 #define ZYPP_SOURCE_YUM_DOWNLOADER
12 
13 #include "zypp/Url.h"
14 #include "zypp/Pathname.h"
15 #include "zypp/Fetcher.h"
16 #include "zypp/OnMediaLocation.h"
17 #include "zypp/MediaSetAccess.h"
18 #include "zypp/ProgressData.h"
19 #include "zypp/RepoInfo.h"
20 #include "zypp/RepoStatus.h"
21 #include "zypp/repo/Downloader.h"
23 
24 namespace zypp
25 {
26  namespace repo
27  {
28  namespace yum
29  {
42  {
43  public:
44 
53  Downloader( const RepoInfo &info , const Pathname &delta_dir = Pathname());
54 
62  void download( MediaSetAccess &media,
63  const Pathname &dest_dir,
65 
70 
71  protected:
72  bool repomd_Callback( const OnMediaLocation &loc, const ResourceType &dtype );
73  bool patches_Callback( const OnMediaLocation &loc, const std::string &id );
74  private:
75  // TODO: Use pimpl to be extensible; but breaks bincompat :(
78  std::list<OnMediaLocation> _patches_files;
79 
81  };
82 
83  } // ns yum
84  } // ns source
85 } // ns zypp
86 
87 #endif
zypp::RepoStatus
Track changing files or directories.
Definition: RepoStatus.h:38
RepoStatus.h
zypp::repo::yum::Downloader::patches_Callback
bool patches_Callback(const OnMediaLocation &loc, const std::string &id)
Definition: Downloader.cc:81
zypp::repo::yum::Downloader
Downloader for YUM (rpm-nmd) repositories Encapsulates all the knowledge of which files have to be do...
Definition: Downloader.h:41
zypp::repo::yum::Downloader::_media_ptr
MediaSetAccess * _media_ptr
Definition: Downloader.h:80
zypp::RepoInfo
What is known about a repository.
Definition: RepoInfo.h:71
zypp::repo::Downloader::Downloader
Downloader()
Constructor.
Definition: Downloader.cc:26
ResourceType.h
zypp::repo::Downloader
Downloader base class.
Definition: Downloader.h:32
zypp::OnMediaLocation
Describes a path on a certain media amongs as the information required to download it,...
Definition: OnMediaLocation.h:39
Pathname.h
OnMediaLocation.h
Url.h
RepoInfo.h
zypp::repo::yum::Downloader::status
RepoStatus status(MediaSetAccess &media)
Status of the remote repository.
Definition: Downloader.cc:38
zypp
Easy-to use interface to the ZYPP dependency resolver.
Definition: CodePitfalls.doc:1
zypp::repo::yum::Downloader::_patches_files
std::list< OnMediaLocation > _patches_files
Definition: Downloader.h:78
zypp::ProgressData::ReceiverFnc
function< bool(const ProgressData &)> ReceiverFnc
Most simple version of progress reporting The percentage in most cases.
Definition: ProgressData.h:139
ProgressData.h
Downloader.h
zypp::repo::yum::Downloader::download
void download(MediaSetAccess &media, const Pathname &dest_dir, const ProgressData::ReceiverFnc &progress=ProgressData::ReceiverFnc())
Download metadata to a local directory.
Definition: Downloader.cc:177
zypp::filesystem::Pathname
Pathname.
Definition: Pathname.h:43
zypp::MediaSetAccess
Media access layer responsible for handling files distributed on a set of media with media change and...
Definition: MediaSetAccess.h:80
zypp::repo::yum::Downloader::_delta_dir
Pathname _delta_dir
Definition: Downloader.h:77
MediaSetAccess.h
Fetcher.h
zypp::repo::yum::Downloader::_dest_dir
Pathname _dest_dir
Definition: Downloader.h:76
zypp::repo::yum::ResourceType
Definition: ResourceType.h:27
zypp::repo::yum::Downloader::repomd_Callback
bool repomd_Callback(const OnMediaLocation &loc, const ResourceType &dtype)
Definition: Downloader.cc:156