libzypp
17.28.5
Downloader.h
Go to the documentation of this file.
1
/*---------------------------------------------------------------------\
2
| ____ _ __ __ ___ |
3
| |__ / \ / / . \ . \ |
4
| / / \ V /| _/ _/ |
5
| / /__ | | | | | | |
6
| /_____||_| |_| |_| |
7
| |
8
\---------------------------------------------------------------------*/
9
10
#ifndef ZYPP_REPO_DOWNLOADER
11
#define ZYPP_REPO_DOWNLOADER
12
13
#include <zypp/Url.h>
14
#include <zypp/Pathname.h>
15
#include <
zypp/ProgressData.h
>
16
#include <
zypp/RepoStatus.h
>
17
#include <
zypp/MediaSetAccess.h
>
18
#include <
zypp/Fetcher.h
>
19
#include <
zypp/RepoInfo.h
>
20
21
namespace
zypp
22
{
23
namespace
repo
24
{
32
class
Downloader
:
public
Fetcher
33
{
34
public
:
38
Downloader
();
40
Downloader
(
const
RepoInfo
& info);
41
virtual
~Downloader
();
42
50
virtual
void
download
(
MediaSetAccess
&media,
51
const
Pathname
&dest_dir,
52
const
ProgressData::ReceiverFnc
& progress =
ProgressData::ReceiverFnc
() );
56
virtual
RepoStatus
status
(
MediaSetAccess
&media );
57
58
const
RepoInfo
&
repoInfo
()
const
{
return
_repoinfo
; }
59
60
protected
:
62
void
defaultDownloadMasterIndex
(
MediaSetAccess
& media_r,
const
Pathname
& destdir_r,
const
Pathname
& masterIndex_r );
63
64
private
:
65
RepoInfo
_repoinfo
;
66
};
67
}
// ns repo
68
}
// ns zypp
69
70
#endif
zypp::repo::Downloader::defaultDownloadMasterIndex
void defaultDownloadMasterIndex(MediaSetAccess &media_r, const Pathname &destdir_r, const Pathname &masterIndex_r)
Common workflow downloading a (signed) master index file.
Definition:
Downloader.cc:141
zypp::repo::Downloader::_repoinfo
RepoInfo _repoinfo
Definition:
Downloader.h:65
ProgressData.h
Fetcher.h
zypp::RepoInfo
What is known about a repository.
Definition:
RepoInfo.h:71
zypp::ProgressData::ReceiverFnc
function< bool(const ProgressData &)> ReceiverFnc
Most simple version of progress reporting The percentage in most cases.
Definition:
ProgressData.h:139
zypp::repo::Downloader::~Downloader
virtual ~Downloader()
Definition:
Downloader.cc:124
zypp::repo::Downloader::Downloader
Downloader()
Constructor.
Definition:
Downloader.cc:118
RepoStatus.h
zypp::repo::Downloader::repoInfo
const RepoInfo & repoInfo() const
Definition:
Downloader.h:58
MediaSetAccess
zypp::repo::Downloader::download
virtual void download(MediaSetAccess &media, const Pathname &dest_dir, const ProgressData::ReceiverFnc &progress=ProgressData::ReceiverFnc())
Download metadata to a local directory.
Definition:
Downloader.cc:134
MediaSetAccess.h
zypp::RepoStatus
Track changing files or directories.
Definition:
RepoStatus.h:40
zypp::repo::Downloader
Downloader base class.
Definition:
Downloader.h:32
RepoInfo.h
zypp::repo::Downloader::status
virtual RepoStatus status(MediaSetAccess &media)
Status of the remote repository.
Definition:
Downloader.cc:128
zypp::filesystem::Pathname
Pathname.
Definition:
Pathname.h:44
zypp
Easy-to use interface to the ZYPP dependency resolver.
Definition:
CodePitfalls.doc:1
zypp::Fetcher
This class allows to retrieve a group of files in a confortable way, providing some smartness that do...
Definition:
Fetcher.h:105
zypp
repo
Downloader.h
Generated by
1.8.14