libzypp  13.10.6
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  Pathname _dest_dir;
76  Pathname _delta_dir;
77  std::list<OnMediaLocation> _patches_files;
78 
80  };
81 
82  } // ns yum
83  } // ns source
84 } // ns zypp
85 
86 #endif
RepoStatus status(MediaSetAccess &media)
Status of the remote repository.
Definition: Downloader.cc:42
Describes a path on a certain media amongs as the information required to download it...
bool patches_Callback(const OnMediaLocation &loc, const std::string &id)
Definition: Downloader.cc:84
What is known about a repository.
Definition: RepoInfo.h:66
MediaSetAccess * _media_ptr
Definition: Downloader.h:79
function< bool(const ProgressData &)> ReceiverFnc
Most simple version of progress reporting The percentage in most cases.
Definition: ProgressData.h:144
Downloader()
Constructor.
Definition: Downloader.cc:28
bool repomd_Callback(const OnMediaLocation &loc, const ResourceType &dtype)
Definition: Downloader.cc:93
void download(MediaSetAccess &media, const Pathname &dest_dir, const ProgressData::ReceiverFnc &progress=ProgressData::ReceiverFnc())
Download metadata to a local directory.
Definition: Downloader.cc:129
std::list< OnMediaLocation > _patches_files
Definition: Downloader.h:77
Local facts about a repository This class represents the status of a repository on the system...
Definition: RepoStatus.h:37
Downloader base class.
Definition: Downloader.h:32
Downloader for YUM (rpm-nmd) repositories Encapsulates all the knowledge of which files have to be do...
Definition: Downloader.h:41
Media access layer responsible for handling files distributed on a set of media with media change and...