1
/*---------------------------------------------------------------------\
3
| |__ / \ / / . \ . \ |
8
\---------------------------------------------------------------------*/
10
#ifndef ZYPP_SOURCE_YUM_DOWNLOADER
11
#define ZYPP_SOURCE_YUM_DOWNLOADER
14
#include "zypp/Pathname.h"
15
#include "zypp/Fetcher.h"
16
#include "zypp/OnMediaLocation.h"
17
#include "zypp/MediaSetAccess.h"
18
#include "zypp/ProgressData.h"
19
#include "zypp/RepoInfo.h"
20
#include "zypp/RepoStatus.h"
21
#include "zypp/repo/Downloader.h"
22
#include "zypp/repo/yum/ResourceType.h"
31
* \short Downloader for YUM (rpm-nmd) repositories
32
* Encapsulates all the knowledge of which files have
33
* to be downloaded to the local disk.
36
* MediaSetAccess media(url);
37
* Downloader yum(path);
38
* yum.download( media, "localdir");
41
class Downloader : public repo::Downloader
46
* \short Constructor from the repository information
48
* The repository information allows more context to be given
49
* to the user when something fails.
51
* \param info Repository information
53
Downloader( const RepoInfo &info , const Pathname &delta_dir = Pathname());
56
* \short Download metadata to a local directory
58
* \param media Media access to the repository url
59
* \param dest_dir Local destination directory
60
* \param progress progress receiver
62
void download( MediaSetAccess &media,
63
const Pathname &dest_dir,
64
const ProgressData::ReceiverFnc & progress = ProgressData::ReceiverFnc() );
67
* \short Status of the remote repository
69
RepoStatus status( MediaSetAccess &media );
72
bool repomd_Callback( const OnMediaLocation &loc, const ResourceType &dtype );
73
bool patches_Callback( const OnMediaLocation &loc, const std::string &id );
77
std::list<OnMediaLocation> _patches_files;
79
MediaSetAccess *_media_ptr;