libzypp 17.37.10

downloader.cc
Go to the documentation of this file.
1/*---------------------------------------------------------------------\
2| ____ _ __ __ ___ |
3| |__ / \ / / . \ . \ |
4| / / \ V /| _/ _/ |
5| / /__ | | | | | | |
6| /_____||_| |_| |_| |
7| |
8\---------------------------------------------------------------------*/
9
10#include "downloader.h"
11#include <zypp/ng/workflows/contextfacade.h>
12#include <zypp-core/zyppng/pipelines/MTry>
13#include <zypp-core/zyppng/base/Signals>
14#include <zypp-core/zyppng/pipelines/Wait>
15#include <zypp-core/zyppng/pipelines/Transform>
16#include <zypp-core/fs/PathInfo.h>
17
18#include <zypp/KeyRing.h>
19#include <zypp/ng/Context>
20#include <zypp-media/ng/Provide>
21#include <zypp-media/ng/ProvideSpec>
22
23#include <zypp/parser/yum/RepomdFileReader.h>
24
25 namespace zyppng::repo {
26
27
28 using namespace zyppng::operators;
29
30 template <class ContextRefType>
31 DownloadContext<ContextRefType>::DownloadContext(ContextRefType zyppContext, const zypp::RepoInfo &info, const zypp::Pathname &destDir )
32 : CacheProviderContext<ContextRefType>( typename CacheProviderContext<ContextRefType>::private_constr_t{}, std::move(zyppContext), destDir )
33 , _repoinfo(info)
34 {}
35
36 template <class ContextRefType>
37 const zypp::RepoInfo &DownloadContext<ContextRefType>::repoInfo() const { return _repoinfo; }
38
39 template <class ContextRefType>
40 const zypp::filesystem::Pathname &DownloadContext<ContextRefType>::deltaDir() const { return _deltaDir; }
41
42 template<class ContextRefType>
43 zypp::RepoInfo &DownloadContext<ContextRefType>::repoInfo() { return _repoinfo; }
44
45 template<class ContextRefType>
46 std::vector<zypp::ManagedFile> &DownloadContext<ContextRefType>::files() { return _files; }
47
48 template<class ContextRefType>
49 const std::optional<typename DownloadContext<ContextRefType>::PluginRepoverification> &DownloadContext<ContextRefType>::pluginRepoverification() const
50 { return _pluginRepoverification; }
51
52 template<class ContextRefType>
53 void DownloadContext<ContextRefType>::setDeltaDir(const zypp::Pathname &newDeltaDir)
54 { _deltaDir = newDeltaDir; }
55
56 // explicitely intantiate the template types we want to work with
57 template class DownloadContext<SyncContextRef>;
58 template class DownloadContext<ContextRef>;
59}
KeyRing.h
RepomdFileReader.h
Interface of repomd.xml file reader.
zypp::RepoInfo
What is known about a repository.
Definition RepoInfo.h:72
zypp::filesystem::Pathname
Pathname.
Definition Pathname.h:47
zyppng::CacheProviderContext
Definition downloadwf.h:28
zyppng::CacheProviderContext< ContextRefType >::destDir
const zypp::Pathname & destDir() const
Definition downloadwf.cc:42
zyppng::CacheProviderContext< ContextRefType >::zyppContext
const ContextRefType & zyppContext() const
Definition downloadwf.cc:35
zyppng::CacheProviderContext< ContextRefType >::ContextRefType
ContextRefType ContextRefType
Definition downloadwf.h:32
zyppng::repo::DownloadContext
Definition downloader.h:36
zyppng::repo::DownloadContext::_pluginRepoverification
std::optional< PluginRepoverification > _pluginRepoverification
Definition downloader.h:66
zyppng::repo::DownloadContext::repoInfo
const zypp::RepoInfo & repoInfo() const
Definition downloader.cc:37
zyppng::repo::DownloadContext::pluginRepoverification
const std::optional< PluginRepoverification > & pluginRepoverification() const
Definition downloader.cc:49
zyppng::repo::DownloadContext::setDeltaDir
void setDeltaDir(const zypp::Pathname &newDeltaDir)
Definition downloader.cc:53
zyppng::repo::DownloadContext::files
std::vector< zypp::ManagedFile > & files()
Definition downloader.cc:46
zyppng::repo::DownloadContext::_repoinfo
zypp::RepoInfo _repoinfo
Definition downloader.h:63
zyppng::repo::DownloadContext::deltaDir
const zypp::Pathname & deltaDir() const
Definition downloader.cc:40
zyppng::repo::DownloadContext::_deltaDir
zypp::Pathname _deltaDir
Definition downloader.h:64
zyppng::repo::DownloadContext::DownloadContext
DownloadContext(ContextRefType zyppContext, const zypp::RepoInfo &info, const zypp::Pathname &destDir)
Definition downloader.cc:31
zyppng::repo::DownloadContext::_files
std::vector< zypp::ManagedFile > _files
Files downloaded.
Definition downloader.h:65
contextfacade.h
downloader.h
std
Definition Arch.h:364
zyppng::operators
Definition asyncresult.h:279
zyppng::repo
Definition downloader.cc:25
PathInfo.h