libzypp 17.38.3
downloadwf.h
Go to the documentation of this file.
1/*---------------------------------------------------------------------\
2| ____ _ __ __ ___ |
3| |__ / \ / / . \ . \ |
4| / / \ V /| _/ _/ |
5| / /__ | | | | | | |
6| /_____||_| |_| |_| |
7| |
8\---------------------------------------------------------------------*/
9#ifndef ZYPP_NG_WORKFLOWS_DOWNLOAD_INCLUDED
10#define ZYPP_NG_WORKFLOWS_DOWNLOAD_INCLUDED
11
12#include <zypp-core/ng/async/task.h>
14#include <zypp-core/ng/pipelines/Expected>
16
17namespace zyppng {
18
23
25 class ProvideFileSpec;
26
28 {
29 protected:
31 public:
32
34
35 const ContextRef &zyppContext() const;
36 const zypp::Pathname &destDir() const;
37
38 void addCacheDir( const zypp::Pathname &p );
39 const std::vector<zypp::Pathname> &cacheDirs() const;
40
41
42 protected:
43 ContextRef _zyppContext;
45 std::vector<zypp::Pathname> _cacheDirs;
46 };
47
48 namespace DownloadWorkflow {
49 MaybeAwaitable<expected<zypp::ManagedFile>> provideToCacheDir( CacheProviderContextRef cacheContext, ProvideMediaHandle medium, zypp::Pathname file, ProvideFileSpec filespec );
50 }
51
52}
53
54
55#endif // ZYPP_NG_WORKFLOWS_DOWNLOAD_INCLUDED
const zypp::Pathname & destDir() const
Definition downloadwf.cc:38
const ContextRef & zyppContext() const
Definition downloadwf.cc:31
void addCacheDir(const zypp::Pathname &p)
Definition downloadwf.cc:44
std::vector< zypp::Pathname > _cacheDirs
Definition downloadwf.h:45
ZYPP_DECL_PRIVATE_CONSTR_ARGS(CacheProviderContext, ContextRef zyppContext, zypp::Pathname destDir)
const std::vector< zypp::Pathname > & cacheDirs() const
Definition downloadwf.cc:50
MaybeAwaitable< expected< zypp::ManagedFile > > provideToCacheDir(CacheProviderContextRef cacheContext, ProvideMediaHandle medium, zypp::Pathname file, ProvideFileSpec filespec)
#define ZYPP_FWD_DECL_TYPE_WITH_REFS(T)
Definition zyppglobal.h:126