libzypp
17.31.31
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 <optional>
14
15
#include <zypp/Url.h>
16
#include <zypp/Pathname.h>
17
#include <zypp-core/ui/ProgressData>
18
#include <
zypp/RepoStatus.h
>
19
#include <
zypp/MediaSetAccess.h
>
20
#include <
zypp/Fetcher.h
>
21
#include <
zypp/RepoInfo.h
>
22
#include <
zypp/repo/PluginRepoverification.h
>
23
24
namespace
zypp
25
{
26
namespace
repo
27
{
28
using
zypp_private::repo::PluginRepoverification
;
29
37
class
Downloader
:
public
Fetcher
38
{
39
public
:
43
Downloader
();
45
Downloader
(
const
RepoInfo
& info);
46
virtual
~Downloader
();
47
55
virtual
void
download
(
MediaSetAccess
&media,
56
const
Pathname
&dest_dir,
57
const
ProgressData::ReceiverFnc
& progress =
ProgressData::ReceiverFnc
() );
61
virtual
RepoStatus
status
(
MediaSetAccess
&media );
62
63
const
RepoInfo
&
repoInfo
()
const
{
return
_repoinfo
; }
64
65
66
void
setPluginRepoverification
( std::optional<PluginRepoverification> pluginRepoverification_r )
67
{
_pluginRepoverification
= std::move(pluginRepoverification_r); }
68
69
void
setNoPluginRepoverification
()
70
{
setPluginRepoverification
( std::nullopt ); }
71
72
protected
:
74
void
defaultDownloadMasterIndex
(
MediaSetAccess
& media_r,
const
Pathname
& destdir_r,
const
Pathname
& masterIndex_r );
75
76
private
:
77
RepoInfo
_repoinfo
;
78
std::optional<PluginRepoverification>
_pluginRepoverification
;
79
};
80
}
// ns repo
81
}
// ns zypp
82
83
#endif
Fetcher.h
MediaSetAccess.h
PluginRepoverification.h
RepoInfo.h
RepoStatus.h
zypp::Fetcher
This class allows to retrieve a group of files in a confortable way, providing some smartness that do...
Definition
Fetcher.h:106
zypp::MediaSetAccess
Media access layer responsible for handling files distributed on a set of media with media change and...
Definition
MediaSetAccess.h:81
zypp::ProgressData::ReceiverFnc
function< bool(const ProgressData &)> ReceiverFnc
Most simple version of progress reporting The percentage in most cases.
Definition
progressdata.h:140
zypp::RepoInfo
What is known about a repository.
Definition
RepoInfo.h:72
zypp::RepoStatus
Track changing files or directories.
Definition
RepoStatus.h:41
zypp::filesystem::Pathname
Pathname.
Definition
Pathname.h:45
zypp::repo::Downloader
Downloader base class.
Definition
Downloader.h:38
zypp::repo::Downloader::_repoinfo
RepoInfo _repoinfo
Definition
Downloader.h:77
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:145
zypp::repo::Downloader::_pluginRepoverification
std::optional< PluginRepoverification > _pluginRepoverification
Definition
Downloader.h:78
zypp::repo::Downloader::repoInfo
const RepoInfo & repoInfo() const
Definition
Downloader.h:63
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:152
zypp::repo::Downloader::status
virtual RepoStatus status(MediaSetAccess &media)
Status of the remote repository.
Definition
Downloader.cc:139
zypp::repo::Downloader::~Downloader
virtual ~Downloader()
Definition
Downloader.cc:135
zypp::repo::Downloader::setPluginRepoverification
void setPluginRepoverification(std::optional< PluginRepoverification > pluginRepoverification_r)
Definition
Downloader.h:66
zypp::repo::Downloader::setNoPluginRepoverification
void setNoPluginRepoverification()
Definition
Downloader.h:69
zypp::repo::Downloader::Downloader
Downloader()
Constructor.
Definition
Downloader.cc:129
zypp_private::repo::PluginRepoverification
Repository metadata verification beyond GPG.
Definition
PluginRepoverification.h:53
zypp
Easy-to use interface to the ZYPP dependency resolver.
Definition
CodePitfalls.doc:2
zypp
repo
Downloader.h
Generated by
1.9.8