libzypp 17.38.3
refresh.h
Go to the documentation of this file.
1/*---------------------------------------------------------------------\
2| ____ _ __ __ ___ |
3| |__ / \ / / . \ . \ |
4| / / \ V /| _/ _/ |
5| / /__ | | | | | | |
6| /_____||_| |_| |_| |
7| |
8\---------------------------------------------------------------------*/
9#ifndef ZYPP_NG_REPO_REFRESH_INCLUDED
10#define ZYPP_NG_REPO_REFRESH_INCLUDED
11
12#include <zypp-core/ng/async/task.h>
13#include <zypp-core/ng/pipelines/Expected>
14#include <zypp-core/ng/base/Signals>
16
17#include <zypp/RepoInfo.h>
20#include <zypp/ng/repomanager.h>
22
23
24namespace zyppng {
27}
28
29namespace zyppng::repo {
30
32
35
42 class RefreshContext : public Base {
44 public:
47
48 static expected<repo::RefreshContextRef> create( ContextRef zyppContext, zypp::RepoInfo info, RepoManagerRef repoManager );
50
51 ~RefreshContext() override;
52
58 void saveToRawCache();
59
63 const zypp::Pathname &rawCachePath() const;
64
71
76 const ContextRef &zyppContext () const;
77
83 const zypp::RepoInfo &repoInfo () const;
85
89 const RepoManagerRef &repoManager() const;
91
96 void setPolicy(RawMetadataRefreshPolicy newPolicy);
97
101 const std::optional<PluginRepoverification> &pluginRepoverification() const;
102
103 void setPluginRepoverification( std::optional<PluginRepoverification> pluginRepoverification_r )
104 { _pluginRepoverification = std::move(pluginRepoverification_r); }
105
111
117 const std::optional<zypp::repo::RepoType> &probedType() const;
119
120 private:
121 ContextRef _zyppContext;
122 RepoManagerRef _repoManager;
126 repo::RawMetadataRefreshPolicy _policy = RawMetadataRefreshPolicy::RefreshIfNeeded;
127 std::optional<PluginRepoverification> _pluginRepoverification;
128
129 std::optional<zypp::repo::RepoType> _probedType;
131
132 };
133}
134#endif
What is known about a repository.
Definition RepoInfo.h:72
Provide a new empty temporary directory and recursively delete it when no longer needed.
Definition TmpPath.h:173
Repository metadata verification beyond GPG.
Provide ProvideType
Definition context.h:34
void setPolicy(RawMetadataRefreshPolicy newPolicy)
Definition refresh.cc:129
RepoManagerRef _repoManager
Definition refresh.h:122
void setPluginRepoverification(std::optional< PluginRepoverification > pluginRepoverification_r)
Definition refresh.h:103
const zypp::Pathname & rawCachePath() const
Definition refresh.cc:81
zypp::Pathname targetDir() const
Definition refresh.cc:87
zypp::RepoInfo _repoInfo
Definition refresh.h:123
zypp::Pathname _rawCachePath
Definition refresh.h:124
const zypp::RepoInfo & repoInfo() const
Definition refresh.cc:99
RawMetadataRefreshPolicy policy() const
Definition refresh.cc:123
ZYPP_DECL_PRIVATE_CONSTR_ARGS(RefreshContext, ContextRef &&zyppContext, zypp::RepoInfo &&info, zypp::Pathname &&rawCachePath, zypp::filesystem::TmpDir &&tempDir, RepoManagerRef &&repoManager)
const std::optional< PluginRepoverification > & pluginRepoverification() const
Definition refresh.cc:135
repo::RawMetadataRefreshPolicy _policy
Definition refresh.h:126
std::optional< zypp::repo::RepoType > _probedType
Definition refresh.h:129
const RepoManagerRef & repoManager() const
Definition refresh.cc:111
typename Context::ProvideType ProvideType
Definition refresh.h:45
std::optional< PluginRepoverification > _pluginRepoverification
Definition refresh.h:127
SignalProxy< void(zypp::repo::RepoType)> sigProbedTypeChanged()
Definition refresh.cc:157
static expected< repo::RefreshContextRef > create(ContextRef zyppContext, zypp::RepoInfo info, RepoManagerRef repoManager)
Definition refresh.cc:31
zypp::filesystem::TmpDir _tmpDir
Definition refresh.h:125
const zypp::RepoManagerOptions & repoManagerOptions() const
Definition refresh.cc:117
void setProbedType(zypp::repo::RepoType rType)
Definition refresh.cc:141
Signal< void(zypp::repo::RepoType)> _sigProbedTypeChanged
Definition refresh.h:130
const ContextRef & zyppContext() const
Definition refresh.cc:93
zypp_private::repo::PluginRepoverification PluginRepoverification
Definition refresh.h:46
const std::optional< zypp::repo::RepoType > & probedType() const
Definition refresh.cc:151
RefreshCheckStatus
Possibly return state of RepoManager::checkIfToRefreshMetadata function.
zypp::RepoManagerFlags::RefreshCheckStatus RefreshCheckStatus
Definition refresh.h:34
zypp::RepoManagerFlags::RawMetadataRefreshPolicy RawMetadataRefreshPolicy
Definition refresh.h:33
Repo manager settings.
Repository type enumeration.
Definition RepoType.h:29
#define ZYPP_FWD_DECL_TYPE_WITH_REFS(T)
Definition zyppglobal.h:126