libzypp  10.5.0
MediaInfoDownloader.cc
Go to the documentation of this file.
00001 /*---------------------------------------------------------------------\
00002 |                          ____ _   __ __ ___                          |
00003 |                         |__  / \ / / . \ . \                         |
00004 |                           / / \ V /|  _/  _/                         |
00005 |                          / /__ | | | | | |                           |
00006 |                         /_____||_| |_| |_|                           |
00007 |                                                                      |
00008 \---------------------------------------------------------------------*/
00009 
00010 #include <fstream>
00011 #include "zypp/base/String.h"
00012 #include "zypp/base/Logger.h"
00013 #include "zypp/base/Function.h"
00014 
00015 #include "MediaInfoDownloader.h"
00016 #include "zypp/base/UserRequestException.h"
00017 
00018 using namespace std;
00019 
00020 namespace zypp
00021 {
00022 namespace repo
00023 {
00024 
00025 void downloadMediaInfo( const Pathname &dest_dir,
00026                         MediaSetAccess &media,
00027                         const ProgressData::ReceiverFnc & progressrcv )
00028 {
00029   Fetcher fetcher;
00030   fetcher.enqueue( OnMediaLocation("/media.1/media") );
00031   fetcher.start( dest_dir, media, progressrcv );
00032   // ready, go!
00033   fetcher.reset();
00034 }
00035 
00036 }// ns repo 
00037 } // ns zypp
00038 
00039 
00040