libzypp  10.5.0
Downloader.h
Go to the documentation of this file.
00001 /*---------------------------------------------------------------------\
00002 |                          ____ _   __ __ ___                          |
00003 |                         |__  / \ / / . \ . \                         |
00004 |                           / / \ V /|  _/  _/                         |
00005 |                          / /__ | | | | | |                           |
00006 |                         /_____||_| |_| |_|                           |
00007 |                                                                      |
00008 \---------------------------------------------------------------------*/
00009 
00010 #ifndef ZYPP_REPO_DOWNLOADER
00011 #define ZYPP_REPO_DOWNLOADER
00012 
00013 #include "zypp/Url.h"
00014 #include "zypp/Pathname.h"
00015 #include "zypp/ProgressData.h"
00016 #include "zypp/RepoStatus.h"
00017 #include "zypp/MediaSetAccess.h"
00018 #include "zypp/Fetcher.h"
00019 #include "zypp/RepoInfo.h"
00020 
00021 namespace zypp
00022 {
00023   namespace repo
00024   {
00032     class Downloader : public Fetcher
00033     {
00034       public:
00038       Downloader();
00040       Downloader(const RepoInfo & info);
00041       virtual ~Downloader();
00042 
00050       virtual void download( MediaSetAccess &media,
00051                               const Pathname &dest_dir,
00052                               const ProgressData::ReceiverFnc & progress = ProgressData::ReceiverFnc() );
00056       virtual RepoStatus status( MediaSetAccess &media );
00057 
00058       const RepoInfo & repoInfo() const { return _repoinfo; }
00059 
00060       private:
00061         RepoInfo _repoinfo;
00062     };
00063   } // ns repo
00064 } // ns zypp
00065 
00066 #endif