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     
00110     void reset();
00111     
00121     void start( const Pathname &dest_dir,
00122                 MediaSetAccess &media,
00123                  const ProgressData::ReceiverFnc & progress = ProgressData::ReceiverFnc() );
00124 
00125   private:
00127     RWCOW_pointer<Impl> _pimpl;
00128   };
00130 
00132   std::ostream & operator<<( std::ostream & str, const Fetcher & obj );
00133 
00135 } // namespace zypp
00137 #endif // ZYPP_FETCHER_H

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