libzypp 17.37.17
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/zyppng/base/Base>
13#include <zypp-core/zyppng/pipelines/AsyncResult>
14#include <zypp-core/zyppng/pipelines/Expected>
15#include <zypp-core/Pathname.h>
16#include <zypp-core/OnMediaLocation>
17#include <zypp-core/ByteCount.h>
19#include <zypp-media/ng/ProvideRes>
21#include <zypp/RepoStatus.h>
22#include <zypp/RepoInfo.h>
23
25
26#include <optional>
27
28namespace zyppng {
31}
32
33namespace zyppng::repo {
34 template <class ContextRefType>
35 class DownloadContext : public CacheProviderContext<ContextRefType>
36 {
37 public:
38
40 using ContextType = typename ContextRefType::element_type;
41 using ProvideType = typename ContextType::ProvideType;
42 using MediaHandle = typename ProvideType::MediaHandle;
43
45
46 const zypp::RepoInfo &repoInfo () const;
47 const zypp::Pathname &deltaDir () const;
48
50 std::vector<zypp::ManagedFile> &files();
51
52 const std::optional<PluginRepoverification> &pluginRepoverification() const;
53
54 void setPluginRepoverification( std::optional<PluginRepoverification> pluginRepoverification_r )
55 { _pluginRepoverification = std::move(pluginRepoverification_r); }
56
59
60 void setDeltaDir(const zypp::Pathname &newDeltaDir);
61
62 private:
65 std::vector<zypp::ManagedFile> _files;
66 std::optional<PluginRepoverification> _pluginRepoverification;
67 };
68
73}
74#endif
What is known about a repository.
Definition RepoInfo.h:72
Repository metadata verification beyond GPG.
const zypp::Pathname & destDir() const
const ContextRefType & zyppContext() const
std::optional< PluginRepoverification > _pluginRepoverification
Definition downloader.h:66
const zypp::RepoInfo & repoInfo() const
Definition downloader.cc:37
typename ContextType::ProvideType ProvideType
Definition downloader.h:41
const std::optional< PluginRepoverification > & pluginRepoverification() const
Definition downloader.cc:49
void setPluginRepoverification(std::optional< PluginRepoverification > pluginRepoverification_r)
Definition downloader.h:54
void setDeltaDir(const zypp::Pathname &newDeltaDir)
Definition downloader.cc:53
std::vector< zypp::ManagedFile > & files()
Definition downloader.cc:46
zypp::RepoInfo & repoInfo()
Definition downloader.cc:43
typename ContextRefType::element_type ContextType
Definition downloader.h:40
const zypp::Pathname & deltaDir() const
Definition downloader.cc:40
typename ProvideType::MediaHandle MediaHandle
Definition downloader.h:42
DownloadContext(ContextRefType zyppContext, const zypp::RepoInfo &info, const zypp::Pathname &destDir)
Definition downloader.cc:31
zypp_private::repo::PluginRepoverification PluginRepoverification
Definition downloader.h:39
std::vector< zypp::ManagedFile > _files
Definition downloader.h:65
DownloadContext< SyncContextRef > SyncDownloadContext
Definition downloader.h:69
DownloadContext< ContextRef > AsyncDownloadContext
Definition downloader.h:70
#define ZYPP_FWD_DECL_REFS(T)
Definition zyppglobal.h:119
#define ZYPP_FWD_DECL_TYPE_WITH_REFS(T)
Definition zyppglobal.h:126