Downloader.h

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------\
00002 |                          ____ _   __ __ ___                          |
00003 |                         |__  / \ / / . \ . \                         |
00004 |                           / / \ V /|  _/  _/                         |
00005 |                          / /__ | | | | | |                           |
00006 |                         /_____||_| |_| |_|                           |
00007 |                                                                      |
00008 \---------------------------------------------------------------------*/
00009 
00010 #ifndef ZYPP_SOURCE_YUM_DOWNLOADER
00011 #define ZYPP_SOURCE_YUM_DOWNLOADER
00012 
00013 #include "zypp/Url.h"
00014 #include "zypp/Pathname.h"
00015 #include "zypp/Fetcher.h"
00016 #include "zypp/OnMediaLocation.h"
00017 #include "zypp/MediaSetAccess.h"
00018 #include "zypp/ProgressData.h"
00019 #include "zypp/RepoStatus.h"
00020 #include "zypp/repo/Downloader.h"
00021 #include "zypp/repo/yum/ResourceType.h"
00022 
00023 namespace zypp
00024 {
00025   namespace repo
00026   {
00027     namespace yum
00028     {
00040       class Downloader : public repo::Downloader
00041       {
00042        public:
00043          
00049         Downloader( const Pathname &path );
00050         
00058         void download( MediaSetAccess &media,
00059                        const Pathname &dest_dir,
00060                        const ProgressData::ReceiverFnc & progress = ProgressData::ReceiverFnc() );
00061         
00065         RepoStatus status( MediaSetAccess &media );
00066         
00067        protected:
00068         bool repomd_Callback( const OnMediaLocation &loc, const ResourceType &dtype );
00069         bool patches_Callback( const OnMediaLocation &loc, const std::string &id );
00070        private:
00071         Pathname _path;
00072         Fetcher _fetcher;
00073         Pathname _dest_dir;
00074         std::list<OnMediaLocation> _patches_files;
00075         
00076         MediaSetAccess *_media_ptr;
00077       };
00078 
00079     } // ns yum
00080   } // ns source
00081 } // ns zypp
00082 
00083 #endif

Generated on Tue Sep 25 19:23:05 2007 for libzypp by  doxygen 1.5.3