libzypp: zyppng::repo::RefreshContext Class Reference

libzypp 17.38.14

zyppng::repo::RefreshContext Class Reference

`#include <zypp/ng/repo/refresh.h>`

Inheritance diagram for zyppng::repo::RefreshContext:

## Public Types
using | ProvideType = typename Context::ProvideType
using | PluginRepoverification = zypp_private::repo::PluginRepoverification
Public Types inherited from zyppng::Base
using | Ptr = std::shared_ptr<Base>
using | WeakPtr = std::weak_ptr<Base>

## Public Member Functions
| ZYPP_DECL_PRIVATE_CONSTR_ARGS (RefreshContext, ContextRef &&zyppContext, zypp::RepoInfo &&info, zypp::Pathname &&rawCachePath, zypp::filesystem::TmpDir &&tempDir, RepoManagerRef &&repoManager)
| ~RefreshContext () override
void | saveToRawCache ()
const zypp::Pathname & | rawCachePath () const
zypp::Pathname | targetDir () const
const ContextRef & | zyppContext () const
const zypp::RepoInfo & | repoInfo () const
zypp::RepoInfo & | repoInfo ()
const RepoManagerRef & | repoManager () const
const zypp::RepoManagerOptions & | repoManagerOptions () const
RawMetadataRefreshPolicy | policy () const
void | setPolicy (RawMetadataRefreshPolicy newPolicy)
const std::optional< PluginRepoverification > & | pluginRepoverification () const
void | setPluginRepoverification (std::optional< PluginRepoverification > pluginRepoverification_r)
void | setNoPluginRepoverification ()
void | setProbedType (zypp::repo::RepoType rType)
const std::optional< zypp::repo::RepoType > & | probedType () const
SignalProxy< void(zypp::repo::RepoType)> | sigProbedTypeChanged ()
Public Member Functions inherited from zyppng::Base
| Base ()
virtual | ~Base ()
WeakPtr | parent () const
void | addChild (const Base::Ptr &child)
void | removeChild (const Ptr &child)
const std::unordered_set< Ptr > & | children () const
std::thread::id | threadId () const
template<typename T>
std::vector< std::weak_ptr< T > > | findChildren () const
template<typename T>
std::shared_ptr< T > | shared_this () const
template<typename T>
std::shared_ptr< T > | shared_this ()
template<typename T>
std::weak_ptr< T > | weak_this () const
template<typename T>
std::weak_ptr< T > | weak_this ()
template<typename SenderFunc, typename ReceiverFunc>
auto | connect (SenderFunc &&sFun, typename internal::MemberFunction< ReceiverFunc >::ClassType &recv, ReceiverFunc &&rFunc)
template<typename SenderFunc, typename ReceiverFunc, typename ... Tracker>
std::enable_if_t< std::is_member_function_pointer_v< SenderFunc >, connection > | connectFunc (SenderFunc &&sFun, ReceiverFunc &&rFunc, const Tracker &...trackers)
void | setData (uint32_t quark, zypp::AutoDispose< void * > data)
void * | data (uint32_t quark)
void | clearData (uint32_t quark)

## Static Public Member Functions
static expected< repo::RefreshContextRef > | create (ContextRef zyppContext, zypp::RepoInfo info, RepoManagerRef repoManager)
Static Public Member Functions inherited from zyppng::Base
template<typename Obj, typename Functor>
static decltype(auto) | make_base_slot (Obj *o, Functor &&f)
template<typename SenderFunc, typename ReceiverFunc>
static auto | connect (typename internal::MemberFunction< SenderFunc >::ClassType &s, SenderFunc &&sFun, typename internal::MemberFunction< ReceiverFunc >::ClassType &recv, ReceiverFunc &&rFunc)
template<typename SenderFunc, typename ReceiverFunc, typename ... Tracker>
static auto | connectFunc (typename internal::MemberFunction< SenderFunc >::ClassType &s, SenderFunc &&sFun, ReceiverFunc &&rFunc, const Tracker &...trackers)

## Private Member Functions
| ZYPP_ADD_PRIVATE_CONSTR_HELPER ()

## Private Attributes
ContextRef | _zyppContext
RepoManagerRef | _repoManager
zypp::RepoInfo | _repoInfo
zypp::Pathname | _rawCachePath
zypp::filesystem::TmpDir | _tmpDir
repo::RawMetadataRefreshPolicy | _policy = RawMetadataRefreshPolicy::RefreshIfNeeded
std::optional< PluginRepoverification > | _pluginRepoverification
std::optional< zypp::repo::RepoType > | _probedType
Signal< void(zypp::repo::RepoType)> | _sigProbedTypeChanged

## Additional Inherited Members
Protected Member Functions inherited from zyppng::Base
| Base (BasePrivate &dd)
Protected Attributes inherited from zyppng::Base
std::unique_ptr< BasePrivate > | d_ptr

## Detailed Description

Context class for all refresh workflow operations of a repo, operating on a local cache and a remote repository, as defined by the zypp::RepoInfo

Definition at line 42 of file refresh.h.

## Member Typedef Documentation

## ◆ ProvideType

using zyppng::repo::RefreshContext::ProvideType = typename Context::ProvideType

Definition at line 45 of file refresh.h.

## ◆ PluginRepoverification

using zyppng::repo::RefreshContext::PluginRepoverification = zypp_private::repo::PluginRepoverification

Definition at line 46 of file refresh.h.

## Constructor & Destructor Documentation

## ◆ ~RefreshContext()

zyppng::repo::RefreshContext::~RefreshContext | ( |  | ) |
| override

Definition at line 60 of file refresh.cc.

## Member Function Documentation

## ◆ ZYPP_ADD_PRIVATE_CONSTR_HELPER()

zyppng::repo::RefreshContext::ZYPP_ADD_PRIVATE_CONSTR_HELPER | ( |  | ) |
| private

## ◆ create()

expected< RefreshContextRef > zyppng::repo::RefreshContext::create | ( | ContextRef | zyppContext,
|  | zypp::RepoInfo | info,
|  | RepoManagerRef | repoManager )
| static

Definition at line 31 of file refresh.cc.

## ◆ ZYPP_DECL_PRIVATE_CONSTR_ARGS()

zyppng::repo::RefreshContext::ZYPP_DECL_PRIVATE_CONSTR_ARGS | ( | RefreshContext | ,
|  | ContextRef && | zyppContext,
|  | zypp::RepoInfo && | info,
|  | zypp::Pathname && | rawCachePath,
|  | zypp::filesystem::TmpDir && | tempDir,
|  | RepoManagerRef && | repoManager )

## ◆ saveToRawCache()

void zyppng::repo::RefreshContext::saveToRawCache | ( |  | ) |

Commits the internal temporary cache into the raw cache of the zypp::RepoInfo this context is currently operating on.

Definition at line 66 of file refresh.cc.

## ◆ rawCachePath()

const zypp::Pathname & zyppng::repo::RefreshContext::rawCachePath | ( |  | ) | const

The raw cache path belonging to this context's zypp::RepoInfo

Definition at line 81 of file refresh.cc.

## ◆ targetDir()

zypp::Pathname zyppng::repo::RefreshContext::targetDir | ( |  | ) | const

The current temporary target dir where the refresh workflow is storing the metadata during operation. Once we have a finished set of metadata and cache we exchange it with the rawCache

Definition at line 87 of file refresh.cc.

## ◆ zyppContext()

const ContextRef & zyppng::repo::RefreshContext::zyppContext | ( |  | ) | const

Current zypp context we are working on, either zyppng::Context or zyppng::SyncContext.

Definition at line 93 of file refresh.cc.

## ◆ repoInfo() [1/2]

const zypp::RepoInfo & zyppng::repo::RefreshContext::repoInfo | ( |  | ) | const

Current zypp::RepoInfo this refresh context is operating with, the workflow is free to change data in this zypp::RepoInfo , so calling code should take care to use it once the workflow has finished.

Definition at line 99 of file refresh.cc.

## ◆ repoInfo() [2/2]

zypp::RepoInfo & zyppng::repo::RefreshContext::repoInfo | ( |  | ) |

Definition at line 105 of file refresh.cc.

## ◆ repoManager()

const RepoManagerRef & zyppng::repo::RefreshContext::repoManager | ( |  | ) | const

Reference to the zyppng::RepoManager that initiated the refresh

Definition at line 111 of file refresh.cc.

## ◆ repoManagerOptions()

const zypp::RepoManagerOptions & zyppng::repo::RefreshContext::repoManagerOptions | ( |  | ) | const

Definition at line 117 of file refresh.cc.

## ◆ policy()

repo::RawMetadataRefreshPolicy zyppng::repo::RefreshContext::policy | ( |  | ) | const

The refresh policy, defines wether a refresh is forced, or only done if needed.

Definition at line 123 of file refresh.cc.

## ◆ setPolicy()

void zyppng::repo::RefreshContext::setPolicy | ( | RawMetadataRefreshPolicy | newPolicy | ) |

Definition at line 129 of file refresh.cc.

## ◆ pluginRepoverification()

const std::optional< typename RefreshContext::PluginRepoverification > & zyppng::repo::RefreshContext::pluginRepoverification | ( |  | ) | const

Optional repo verification via a plugin

Definition at line 135 of file refresh.cc.

## ◆ setPluginRepoverification()

void zyppng::repo::RefreshContext::setPluginRepoverification | ( | std::optional< PluginRepoverification > | pluginRepoverification_r | ) |
| inline

Definition at line 103 of file refresh.h.

## ◆ setNoPluginRepoverification()

void zyppng::repo::RefreshContext::setNoPluginRepoverification | ( |  | ) |
| inline

Disabled plugin based repo verification

Definition at line 109 of file refresh.h.

## ◆ setProbedType()

void zyppng::repo::RefreshContext::setProbedType | ( | zypp::repo::RepoType | rType | ) |

Updated the probed repo type in zypp::RepoInfo, calling code should take care to fetch the updated one at the end of the refresh workflow.

Definition at line 141 of file refresh.cc.

## ◆ probedType()

const std::optional< zypp::repo::RepoType > & zyppng::repo::RefreshContext::probedType | ( |  | ) | const

Definition at line 151 of file refresh.cc.

## ◆ sigProbedTypeChanged()

SignalProxy< void(zypp::repo::RepoType)> zyppng::repo::RefreshContext::sigProbedTypeChanged | ( |  | ) |

Definition at line 157 of file refresh.cc.

## Member Data Documentation

## ◆ _zyppContext

ContextRef zyppng::repo::RefreshContext::_zyppContext
| private

Definition at line 121 of file refresh.h.

## ◆ _repoManager

RepoManagerRef zyppng::repo::RefreshContext::_repoManager
| private

Definition at line 122 of file refresh.h.

## ◆ _repoInfo

zypp::RepoInfo zyppng::repo::RefreshContext::_repoInfo
| private

Definition at line 123 of file refresh.h.

## ◆ _rawCachePath

zypp::Pathname zyppng::repo::RefreshContext::_rawCachePath
| private

Definition at line 124 of file refresh.h.

## ◆ _tmpDir

zypp::filesystem::TmpDir zyppng::repo::RefreshContext::_tmpDir
| private

Definition at line 125 of file refresh.h.

## ◆ _policy

repo::RawMetadataRefreshPolicy zyppng::repo::RefreshContext::_policy = RawMetadataRefreshPolicy::RefreshIfNeeded
| private

Definition at line 126 of file refresh.h.

## ◆ _pluginRepoverification

std::optional<PluginRepoverification> zyppng::repo::RefreshContext::_pluginRepoverification
| private

See also
  Repository metadata verification plugin

Definition at line 127 of file refresh.h.

## ◆ _probedType

std::optional<zypp::repo::RepoType> zyppng::repo::RefreshContext::_probedType
| private

Definition at line 129 of file refresh.h.

## ◆ _sigProbedTypeChanged

Signal<void(zypp::repo::RepoType)> zyppng::repo::RefreshContext::_sigProbedTypeChanged
| private

Definition at line 130 of file refresh.h.

The documentation for this class was generated from the following files:

- zypp/ng/repo/refresh.h
- zypp/ng/repo/refresh.cc