zypp::repo::yum::Downloader Class Reference

#include <Downloader.h>

Inheritance diagram for zypp::repo::yum::Downloader:
[legend]

List of all members.

Public Member Functions

 Downloader (const Pathname &path)
void download (MediaSetAccess &media, const Pathname &dest_dir, const ProgressData::ReceiverFnc &progress=ProgressData::ReceiverFnc())
RepoStatus status (MediaSetAccess &media)

Protected Member Functions

bool repomd_Callback (const OnMediaLocation &loc, const ResourceType &dtype)
bool patches_Callback (const OnMediaLocation &loc, const std::string &id)

Private Attributes

Pathname _path
Fetcher _fetcher
Pathname _dest_dir
std::list
< OnMediaLocation
_patches_files
MediaSetAccess_media_ptr


Detailed Description

Downloader for YUM (rpm-nmd) repositories Encapsulates all the knowledge of which files have to be downloaded to the local disk.

 MediaSetAccess media(url);
 Downloader yum(path);
 yum.download( media, "localdir");

Definition at line 40 of file Downloader.h.


Constructor & Destructor Documentation

zypp::repo::yum::Downloader::Downloader ( const Pathname &  path  ) 

Constructor

Parameters:
path Path to the repostory from the media

Definition at line 35 of file Downloader.cc.


Member Function Documentation

void zypp::repo::yum::Downloader::download ( MediaSetAccess media,
const Pathname &  dest_dir,
const ProgressData::ReceiverFnc progress = ProgressData::ReceiverFnc() 
) [virtual]

Download metadata to a local directory

Parameters:
media Media access to the repository url
dest_dir Local destination directory
progress progress receiver

Reimplemented from zypp::repo::Downloader.

Definition at line 90 of file Downloader.cc.

References _dest_dir, _media_ptr, _path, zypp::SignatureFileChecker::addPublicKey(), zypp::MediaSetAccess::doesFileExist(), zypp::Fetcher::enqueue(), repomd_Callback(), zypp::Fetcher::reset(), zypp::ProgressData::sendTo(), zypp::Fetcher::start(), zypp::ProgressData::tick(), zypp::ProgressData::toMax(), zypp::ProgressData::toMin(), and ZYPP_THROW.

RepoStatus zypp::repo::yum::Downloader::status ( MediaSetAccess media  )  [virtual]

Status of the remote repository

Reimplemented from zypp::repo::Downloader.

Definition at line 40 of file Downloader.cc.

References _path, and zypp::MediaSetAccess::provideFile().

bool zypp::repo::yum::Downloader::repomd_Callback ( const OnMediaLocation loc,
const ResourceType dtype 
) [protected]

Todo:
do this through a ZConfig call so that it is always in sync with parser

Definition at line 55 of file Downloader.cc.

References _dest_dir, _media_ptr, _path, zypp::Fetcher::enqueueDigested(), zypp::repo::yum::ResourceType::FILELISTS, zypp::OnMediaLocation::filename(), MIL, zypp::repo::yum::ResourceType::OTHER, zypp::repo::yum::ResourceType::PATCHES, patches_Callback(), and zypp::Fetcher::start().

Referenced by download().

bool zypp::repo::yum::Downloader::patches_Callback ( const OnMediaLocation loc,
const std::string &  id 
) [protected]

Referenced by repomd_Callback().


Member Data Documentation

Pathname zypp::repo::yum::Downloader::_path [private]

Definition at line 71 of file Downloader.h.

Referenced by download(), repomd_Callback(), and status().

Fetcher zypp::repo::yum::Downloader::_fetcher [private]

Definition at line 72 of file Downloader.h.

Pathname zypp::repo::yum::Downloader::_dest_dir [private]

Definition at line 73 of file Downloader.h.

Referenced by download(), and repomd_Callback().

std::list<OnMediaLocation> zypp::repo::yum::Downloader::_patches_files [private]

Definition at line 74 of file Downloader.h.

MediaSetAccess* zypp::repo::yum::Downloader::_media_ptr [private]

Definition at line 76 of file Downloader.h.

Referenced by download(), and repomd_Callback().


The documentation for this class was generated from the following files:
Generated on Tue Sep 25 19:23:26 2007 for libzypp by  doxygen 1.5.3