Fetcher.h

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------\
00002 |                          ____ _   __ __ ___                          |
00003 |                         |__  / \ / / . \ . \                         |
00004 |                           / / \ V /|  _/  _/                         |
00005 |                          / /__ | | | | | |                           |
00006 |                         /_____||_| |_| |_|                           |
00007 |                                                                      |
00008 \---------------------------------------------------------------------*/
00012 #ifndef ZYPP_FETCHER_H
00013 #define ZYPP_FETCHER_H
00014 
00015 #include <iosfwd>
00016 #include <list>
00017 
00018 #include "zypp/base/PtrTypes.h"
00019 #include "zypp/Pathname.h"
00020 #include "zypp/Url.h"
00021 #include "zypp/OnMediaLocation.h"
00022 #include "zypp/Digest.h"
00023 #include "zypp/MediaSetAccess.h"
00024 #include "zypp/FileChecker.h"
00025 #include "zypp/ProgressData.h"
00026 
00028 namespace zypp
00029 { 
00030 
00064   class Fetcher
00065   {
00066     friend std::ostream & operator<<( std::ostream & str,
00067                                       const Fetcher & obj );
00068 
00069   public:
00071     class Impl;
00072   public:
00074     Fetcher();
00076     virtual ~Fetcher();
00077 
00078   public:
00084     void enqueue( const OnMediaLocation &resource,
00085                   const FileChecker &checker = FileChecker() );
00086     
00098     void enqueueDigested( const OnMediaLocation &resource,
00099                           const FileChecker &checker = FileChecker() );
00100     
00105     void addCachePath( const Pathname &cache_dir );
00106     
00111     void reset();
00112     
00122     void start( const Pathname &dest_dir,
00123                 MediaSetAccess &media,
00124                  const ProgressData::ReceiverFnc & progress = ProgressData::ReceiverFnc() );
00125 
00126   private:
00128     RWCOW_pointer<Impl> _pimpl;
00129   };
00131 
00133   std::ostream & operator<<( std::ostream & str, const Fetcher & obj );
00134 
00136 } // namespace zypp
00138 #endif // ZYPP_FETCHER_H

Generated on Tue Oct 21 02:32:57 2008 for libzypp by  doxygen 1.5.3