1 /*---------------------------------------------------------------------\
3 | |__ / \ / / . \ . \ |
8 \---------------------------------------------------------------------*/
10 #ifndef ZYPP_SOURCE_SUSETAGS_DOWNLOADER
11 #define ZYPP_SOURCE_SUSETAGS_DOWNLOADER
14 #include "zypp/Pathname.h"
15 #include "zypp/ProgressData.h"
16 #include "zypp/RepoInfo.h"
17 #include "zypp/RepoStatus.h"
18 #include "zypp/MediaSetAccess.h"
19 #include "zypp/repo/Downloader.h"
20 #include "zypp/parser/susetags/ContentFileReader.h"
30 * \short Downloader for SUSETags (YaST2) repositories
31 * Encapsulates all the knowledge of which files have
32 * to be downloaded to the local disk.
34 class Downloader : public repo::Downloader
38 * \short Constructor from the repository information
40 * The repository information allows more context to be given
41 * to the user when something fails.
43 * \param info Repository information
45 Downloader( const RepoInfo &info, const Pathname &delta_dir = Pathname() );
48 * \short Download metadata to a local directory
50 * \param media Media access to the repository url
51 * \param dest_dir Local destination directory
52 * \param progress progress receiver
54 void download( MediaSetAccess &media,
55 const Pathname &dest_dir,
56 const ProgressData::ReceiverFnc & progress = ProgressData::ReceiverFnc() );
58 * \short Status of the remote repository
60 RepoStatus status( MediaSetAccess &media );
63 * Content file parser consumer
65 void consumeIndex( const parser::susetags::RepoIndex_Ptr & data_r );
68 parser::susetags::RepoIndex_Ptr _repoindex;