- Pass the media set to the Downloaders instead of having one in the object
[platform/upstream/libzypp.git] / zypp / repo / susetags / Downloader.h
1 /*---------------------------------------------------------------------\
2 |                          ____ _   __ __ ___                          |
3 |                         |__  / \ / / . \ . \                         |
4 |                           / / \ V /|  _/  _/                         |
5 |                          / /__ | | | | | |                           |
6 |                         /_____||_| |_| |_|                           |
7 |                                                                      |
8 \---------------------------------------------------------------------*/
9
10 #ifndef ZYPP_SOURCE_SUSETAGS_DOWNLOADER
11 #define ZYPP_SOURCE_SUSETAGS_DOWNLOADER
12
13 #include "zypp/Url.h"
14 #include "zypp/Pathname.h"
15 #include "zypp/ProgressData.h"
16 #include "zypp/RepoStatus.h"
17 #include "zypp/MediaSetAccess.h"
18 #include "zypp/repo/Downloader.h"
19
20 namespace zypp
21 {
22   namespace repo
23   {
24     namespace susetags
25     {
26   
27       /**
28        * \short Downloader for SUSETags (YaST2) repositories
29        * Encapsulates all the knowledge of which files have
30        * to be downloaded to the local disk.
31        */
32       class Downloader : public repo::Downloader
33       {
34        public:
35         /**
36          * \short Constructor
37          *
38          * \param path Path to the repostory from the media
39          */
40         Downloader( const Pathname &path );
41         
42         /**
43          * \short Download metadata to a local directory
44          *
45          * \param media Media access to the repository url
46          * \param dest_dir Local destination directory
47          * \param progress progress receiver
48          */
49         void download( MediaSetAccess &media,
50                        const Pathname &dest_dir,
51                        const ProgressData::ReceiverFnc & progress = ProgressData::ReceiverFnc() );
52         /**
53          * \short Status of the remote repository
54          */
55         RepoStatus status( MediaSetAccess &media );
56        private:
57         Pathname _path;
58       };
59
60     } // ns susetags
61   } // ns source
62 } // ns zypp
63
64 #endif