libzypp: zypp/ng/workflows/downloadwf.h Source File

libzypp 17.38.8

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>
13#include <zypp-core/ng/base/base.h>
14#include <zypp-core/ng/pipelines/Expected>
15#include <zypp-core/ManagedFile.h>
16
17namespace zyppng {
18
19 ZYPP_FWD_DECL_TYPE_WITH_REFS (Context);
20 ZYPP_FWD_DECL_TYPE_WITH_REFS (Provide);
21 ZYPP_FWD_DECL_TYPE_WITH_REFS (ProgressObserver);
22 ZYPP_FWD_DECL_TYPE_WITH_REFS (CacheProviderContext);
23
24 class ProvideMediaHandle;
25 class ProvideFileSpec;
26
27 class CacheProviderContext : public Base
28 {
29 protected:
30 ZYPP_ADD_PRIVATE_CONSTR_HELPER();
31 public:
32
33 ZYPP_DECL_PRIVATE_CONSTR_ARGS(CacheProviderContext, ContextRef zyppContext, zypp::Pathname destDir );
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;
44 zypp::Pathname _destDir;
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
base.h
zypp::filesystem::Pathname
Pathname.
Definition Pathname.h:48
zyppng::Base::Base
Base()
Definition base.cc:20
zyppng::CacheProviderContext
Definition downloadwf.h:28
zyppng::CacheProviderContext::destDir
const zypp::Pathname & destDir() const
Definition downloadwf.cc:38
zyppng::CacheProviderContext::ZYPP_ADD_PRIVATE_CONSTR_HELPER
ZYPP_ADD_PRIVATE_CONSTR_HELPER()
zyppng::CacheProviderContext::zyppContext
const ContextRef & zyppContext() const
Definition downloadwf.cc:31
zyppng::CacheProviderContext::addCacheDir
void addCacheDir(const zypp::Pathname &p)
Definition downloadwf.cc:44
zyppng::CacheProviderContext::_destDir
zypp::Pathname _destDir
Definition downloadwf.h:44
zyppng::CacheProviderContext::_cacheDirs
std::vector< zypp::Pathname > _cacheDirs
Definition downloadwf.h:45
zyppng::CacheProviderContext::ZYPP_DECL_PRIVATE_CONSTR_ARGS
ZYPP_DECL_PRIVATE_CONSTR_ARGS(CacheProviderContext, ContextRef zyppContext, zypp::Pathname destDir)
zyppng::CacheProviderContext::cacheDirs
const std::vector< zypp::Pathname > & cacheDirs() const
Definition downloadwf.cc:50
zyppng::CacheProviderContext::_zyppContext
ContextRef _zyppContext
Definition downloadwf.h:43
zyppng::Context
Definition context.h:27
zyppng::ProgressObserver
Definition progressobserver.h:28
zyppng::ProvideFileSpec
Definition providespec.h:95
zyppng::ProvideMediaHandle
Definition provide.h:27
zyppng::Provide
Definition provide.h:103
zyppng::DownloadWorkflow
Definition downloadwf.cc:190
zyppng::DownloadWorkflow::provideToCacheDir
MaybeAwaitable< expected< zypp::ManagedFile > > provideToCacheDir(CacheProviderContextRef cacheContext, ProvideMediaHandle medium, zypp::Pathname file, ProvideFileSpec filespec)
Definition downloadwf.cc:192
zyppng
Definition MediaNetworkRequestExecutor.h:16
ManagedFile.h
ZYPP_FWD_DECL_TYPE_WITH_REFS
#define ZYPP_FWD_DECL_TYPE_WITH_REFS(T)
Definition zyppglobal.h:119