libzypp 17.38.3
downloader.h
Go to the documentation of this file.
1/*---------------------------------------------------------------------\
2| ____ _ __ __ ___ |
3| |__ / \ / / . \ . \ |
4| / / \ V /| _/ _/ |
5| / /__ | | | | | | |
6| /_____||_| |_| |_| |
7| |
8\---------------------------------------------------------------------*/
9#ifndef ZYPP_NG_REPO_DOWNLOADER_INCLUDED
10#define ZYPP_NG_REPO_DOWNLOADER_INCLUDED
11
12#include <zypp-core/ng/base/Base>
13#include <zypp-core/ng/pipelines/Expected>
14#include <zypp-core/Pathname.h>
15#include <zypp-core/OnMediaLocation>
16#include <zypp-core/ByteCount.h>
18#include <zypp/ng/context.h>
21#include <zypp/RepoStatus.h>
22#include <zypp/RepoInfo.h>
23
25
26#include <optional>
27
28namespace zyppng::repo {
29
31
33 {
34 public:
35
37 using ContextType = typename zyppng::Context;
38 using ProvideType = typename ContextType::ProvideType;
39 using MediaHandle = typename ProvideType::MediaHandle;
40
41 DownloadContext( ContextRef zyppContext, const zypp::RepoInfo &info, const zypp::Pathname &destDir );
42
43 const zypp::RepoInfo &repoInfo () const;
44 const zypp::Pathname &deltaDir () const;
45
47 std::vector<zypp::ManagedFile> &files();
48
49 const std::optional<PluginRepoverification> &pluginRepoverification() const;
50
51 void setPluginRepoverification( std::optional<PluginRepoverification> pluginRepoverification_r )
52 { _pluginRepoverification = std::move(pluginRepoverification_r); }
53
56
57 void setDeltaDir(const zypp::Pathname &newDeltaDir);
58
59 private:
62 std::vector<zypp::ManagedFile> _files;
63 std::optional<PluginRepoverification> _pluginRepoverification;
64 };
65}
66#endif
What is known about a repository.
Definition RepoInfo.h:72
Repository metadata verification beyond GPG.
const zypp::Pathname & destDir() const
Definition downloadwf.cc:38
const ContextRef & zyppContext() const
Definition downloadwf.cc:31
typename ContextType::ProvideType ProvideType
Definition downloader.h:38
DownloadContext(ContextRef zyppContext, const zypp::RepoInfo &info, const zypp::Pathname &destDir)
Definition downloader.cc:28
typename zyppng::Context ContextType
Definition downloader.h:37
void setPluginRepoverification(std::optional< PluginRepoverification > pluginRepoverification_r)
Definition downloader.h:51
zypp_private::repo::PluginRepoverification PluginRepoverification
Definition downloader.h:36
typename ProvideType::MediaHandle MediaHandle
Definition downloader.h:39
std::vector< zypp::ManagedFile > _files
Files downloaded.
Definition downloader.h:62
const zypp::Pathname & deltaDir() const
Definition downloader.cc:35
const std::optional< PluginRepoverification > & pluginRepoverification() const
Definition downloader.cc:41
void setDeltaDir(const zypp::Pathname &newDeltaDir)
Definition downloader.cc:44
const zypp::RepoInfo & repoInfo() const
Definition downloader.cc:33
std::vector< zypp::ManagedFile > & files()
Definition downloader.cc:39
std::optional< PluginRepoverification > _pluginRepoverification
Definition downloader.h:63
#define ZYPP_FWD_DECL_TYPE_WITH_REFS(T)
Definition zyppglobal.h:126