libzypp  13.10.6
zypp::repo::Downloader Class Reference

Downloader base class. More...

#include <Downloader.h>

Inheritance diagram for zypp::repo::Downloader:
zypp::Fetcher zypp::repo::susetags::Downloader zypp::repo::yum::Downloader

Public Member Functions

 Downloader ()
 Constructor. More...
 
 Downloader (const RepoInfo &info)
 C-tor associating the downloader with a RepoInfo. More...
 
virtual ~Downloader ()
 
virtual void download (MediaSetAccess &media, const Pathname &dest_dir, const ProgressData::ReceiverFnc &progress=ProgressData::ReceiverFnc())
 Download metadata to a local directory. More...
 
virtual RepoStatus status (MediaSetAccess &media)
 Status of the remote repository. More...
 
const RepoInforepoInfo () const
 
- Public Member Functions inherited from zypp::Fetcher
 ZYPP_DECLARE_FLAGS (Options, Option)
 
 Fetcher ()
 Default ctor. More...
 
virtual ~Fetcher ()
 Dtor. More...
 
void setOptions (Options options)
 Set the Fetcher options. More...
 
Options options () const
 Get current options. More...
 
void addIndex (const OnMediaLocation &resource)
 Adds an index containing metadata (for example checksums ) that will be retrieved and read before the job processing starts. More...
 
void enqueue (const OnMediaLocation &resource, const FileChecker &checker=FileChecker())
 Enqueue a object for transferal, they will not be transfered until start() is called. More...
 
void enqueueDigested (const OnMediaLocation &resource, const FileChecker &checker=FileChecker(), const Pathname &deltafile=Pathname())
 Enqueue a object for transferal, they will not be transfered until start() is called. More...
 
void enqueueDir (const OnMediaLocation &resource, bool recursive=false, const FileChecker &checker=FileChecker())
 Enqueue a directory. More...
 
void enqueueDigestedDir (const OnMediaLocation &resource, bool recursive=false, const FileChecker &checker=FileChecker())
 Enqueue a directory and always check for checksums. More...
 
void addCachePath (const Pathname &cache_dir)
 adds a directory to the list of directories where to look for cached files More...
 
void reset ()
 Reset the transfer (jobs) list. More...
 
void start (const Pathname &dest_dir, MediaSetAccess &media, const ProgressData::ReceiverFnc &progress=ProgressData::ReceiverFnc())
 start the transfer to a destination directory dest_dir You have to provde a media set access media to get the files from The file tree will be replicated inside this directory More...
 

Private Attributes

RepoInfo _repoinfo
 

Additional Inherited Members

- Public Types inherited from zypp::Fetcher
enum  Option { AutoAddContentFileIndexes = 0x0001, AutoAddChecksumsIndexes = 0x0002, AutoAddIndexes = AutoAddContentFileIndexes | AutoAddChecksumsIndexes }
 Various option flags to change behavior. More...
 

Detailed Description

Downloader base class.

a Downloader encapsulates all the knowledge of which files have to be downloaded to the local disk.

Definition at line 32 of file Downloader.h.

Constructor & Destructor Documentation

zypp::repo::Downloader::Downloader ( )

Constructor.

Definition at line 28 of file Downloader.cc.

zypp::repo::Downloader::Downloader ( const RepoInfo info)

C-tor associating the downloader with a RepoInfo.

Definition at line 31 of file Downloader.cc.

zypp::repo::Downloader::~Downloader ( )
virtual

Definition at line 34 of file Downloader.cc.

Member Function Documentation

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

Download metadata to a local directory.

Parameters
mediaMedia access to the repository url
dest_dirLocal destination directory
progressprogress receiver

Reimplemented in zypp::repo::yum::Downloader, and zypp::repo::susetags::Downloader.

Definition at line 44 of file Downloader.cc.

RepoStatus zypp::repo::Downloader::status ( MediaSetAccess media)
virtual

Status of the remote repository.

Reimplemented in zypp::repo::yum::Downloader, and zypp::repo::susetags::Downloader.

Definition at line 38 of file Downloader.cc.

const RepoInfo& zypp::repo::Downloader::repoInfo ( ) const
inline

Definition at line 58 of file Downloader.h.

Member Data Documentation

RepoInfo zypp::repo::Downloader::_repoinfo
private

Definition at line 61 of file Downloader.h.


The documentation for this class was generated from the following files: