libzypp: zypp::repo::susetags::Downloader Class Reference

libzypp 17.25.10

Public Member Functions | Private Attributes | List of all members
zypp::repo::susetags::Downloader Class Reference

Downloader for SUSETags (YaST2) repositories Encapsulates all the knowledge of which files have to be downloaded to the local disk. More...

`#include <Downloader.h>`

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

## Public Member Functions
| Downloader (const RepoInfo &info, const Pathname &delta_dir=Pathname())
| Constructor from the repository information. More...
void | download (MediaSetAccess &media, const Pathname &dest_dir, const ProgressData::ReceiverFnc &progress=ProgressData::ReceiverFnc()) override
| Download metadata to a local directory. More...
RepoStatus | status (MediaSetAccess &media) override
| Status of the remote repository. More...
void | consumeIndex (const parser::susetags::RepoIndex_Ptr &data_r)
| Content file parser consumer. More...
Public Member Functions inherited from zypp::repo::Downloader
| Downloader ()
| Constructor. More...
| Downloader (const RepoInfo &info)
| C-tor associating the downloader with a RepoInfo. More...
virtual | ~Downloader ()
const RepoInfo & | repoInfo () 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 transferred 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 transferred 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
parser::susetags::RepoIndex_Ptr | _repoindex
Pathname | _delta_dir

## 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...
Protected Member Functions inherited from zypp::repo::Downloader
void | defaultDownloadMasterIndex (MediaSetAccess &media_r, const Pathname &destdir_r, const Pathname &masterIndex_r)
| Common workflow downloading a (signed) master index file. More...
Related Functions inherited from zypp::Fetcher
std::ostream & | operator<< (std::ostream &str, const Fetcher &obj)
| Stream output. More...

## Detailed Description

Downloader for SUSETags (YaST2) repositories Encapsulates all the knowledge of which files have to be downloaded to the local disk.

Definition at line 34 of file Downloader.h.

## Constructor & Destructor Documentation

## ◆ Downloader()

zypp::repo::susetags::Downloader::Downloader | ( | const RepoInfo & | info,
|  | const Pathname & | delta_dir = `Pathname()`
| ) |  |

Constructor from the repository information.

The repository information allows more context to be given to the user when something fails.

Parameters

  info | Repository information

Definition at line 30 of file Downloader.cc.

## Member Function Documentation

## ◆ download()

void zypp::repo::susetags::Downloader::download | ( | MediaSetAccess & | media,
|  | const Pathname & | dest_dir,
|  | const ProgressData::ReceiverFnc & | progress = `ProgressData::ReceiverFnc()`
| ) |  |
| overridevirtual

Download metadata to a local directory.

Parameters

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

Todo:
  : Downloading/sigcheck of master index shoudl be common in base class

Reimplemented from zypp::repo::Downloader.

Definition at line 55 of file Downloader.cc.

## ◆ status()

RepoStatus zypp::repo::susetags::Downloader::status | ( | MediaSetAccess & | media | ) |
| overridevirtual

Status of the remote repository.

Reimplemented from zypp::repo::Downloader.

Definition at line 35 of file Downloader.cc.

## ◆ consumeIndex()

void zypp::repo::susetags::Downloader::consumeIndex | ( | const parser::susetags::RepoIndex_Ptr & | data_r | ) |

Content file parser consumer.

Definition at line 210 of file Downloader.cc.

## Member Data Documentation

## ◆ _repoindex

parser::susetags::RepoIndex_Ptr zypp::repo::susetags::Downloader::_repoindex
| private

Definition at line 68 of file Downloader.h.

## ◆ _delta_dir

Pathname zypp::repo::susetags::Downloader::_delta_dir
| private

Definition at line 69 of file Downloader.h.

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

- zypp/repo/susetags/Downloader.h
- zypp/repo/susetags/Downloader.cc