#include <Downloader.h>
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 |
MediaSetAccess media(url); Downloader yum(path); yum.download( media, "localdir");
Definition at line 40 of file Downloader.h.
| zypp::repo::yum::Downloader::Downloader | ( | const Pathname & | path | ) |
Constructor
| path | Path to the repostory from the media |
Definition at line 35 of file Downloader.cc.
| 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
| 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] |
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().
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] |
std::list<OnMediaLocation> zypp::repo::yum::Downloader::_patches_files [private] |
Definition at line 74 of file Downloader.h.
1.5.3