libzypp 17.37.17
zyppng::repo::RefreshContext< ZyppContextRefType > Class Template Reference

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

Inheritance diagram for zyppng::repo::RefreshContext< ZyppContextRefType >:

Public Types

using ContextRefType = ZyppContextRefType
using ContextType = typename ZyppContextRefType::element_type
using ProvideType = typename ContextType::ProvideType
using MediaHandle = typename ProvideType::MediaHandle
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 Types inherited from zyppng::MaybeAsyncMixin< std::is_same_v< ZyppContextRefType, ContextRef > >
using MaybeAsyncRef

Public Member Functions

 ZYPP_DECL_PRIVATE_CONSTR_ARGS (RefreshContext, ZyppContextRefType &&zyppContext, zypp::RepoInfo &&info, zypp::Pathname &&rawCachePath, zypp::filesystem::TmpDir &&tempDir, RepoManagerRef< ContextRefType > &&repoManager)
 ~RefreshContext () override
void saveToRawCache ()
const zypp::PathnamerawCachePath () const
zypp::Pathname targetDir () const
const ZyppContextRefType & zyppContext () const
const zypp::RepoInforepoInfo () const
zypp::RepoInforepoInfo ()
const RepoManagerRef< ZyppContextRefType > & repoManager () const
const zypp::RepoManagerOptionsrepoManagerOptions () 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 >, connectionconnectFunc (SenderFunc &&sFun, ReceiverFunc &&rFunc, const Tracker &...trackers)

Static Public Member Functions

static expected< repo::RefreshContextRef< ZyppContextRefType > > create (ZyppContextRefType zyppContext, zypp::RepoInfo info, RepoManagerRef< ContextRefType > 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 ()
 ZYPP_ENABLE_MAYBE_ASYNC_MIXIN ((std::is_same_v< ZyppContextRefType, ContextRef >))

Private Attributes

ZyppContextRefType _zyppContext
RepoManagerRef< ContextRefType_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

Static Public Attributes inherited from zyppng::MaybeAsyncMixin< std::is_same_v< ZyppContextRefType, ContextRef > >
static constexpr bool is_async
Protected Member Functions inherited from zyppng::Base
 Base (BasePrivate &dd)
Protected Member Functions inherited from zyppng::MaybeAsyncMixin< std::is_same_v< ZyppContextRefType, ContextRef > >
auto makeReadyResult (T &&res)
Protected Attributes inherited from zyppng::Base
std::unique_ptr< BasePrivated_ptr

Detailed Description

template<typename ZyppContextRefType>
class zyppng::repo::RefreshContext< ZyppContextRefType >

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 43 of file refresh.h.

Member Typedef Documentation

◆ ContextRefType

template<typename ZyppContextRefType>
using zyppng::repo::RefreshContext< ZyppContextRefType >::ContextRefType = ZyppContextRefType

Definition at line 47 of file refresh.h.

◆ ContextType

template<typename ZyppContextRefType>
using zyppng::repo::RefreshContext< ZyppContextRefType >::ContextType = typename ZyppContextRefType::element_type

Definition at line 48 of file refresh.h.

◆ ProvideType

template<typename ZyppContextRefType>
using zyppng::repo::RefreshContext< ZyppContextRefType >::ProvideType = typename ContextType::ProvideType

Definition at line 49 of file refresh.h.

◆ MediaHandle

template<typename ZyppContextRefType>
using zyppng::repo::RefreshContext< ZyppContextRefType >::MediaHandle = typename ProvideType::MediaHandle

Definition at line 50 of file refresh.h.

◆ PluginRepoverification

template<typename ZyppContextRefType>
using zyppng::repo::RefreshContext< ZyppContextRefType >::PluginRepoverification = zypp_private::repo::PluginRepoverification

Definition at line 51 of file refresh.h.

Constructor & Destructor Documentation

◆ ~RefreshContext()

template<typename ZyppContextRefType>
zyppng::repo::RefreshContext< ZyppContextRefType >::~RefreshContext ( )
override

Definition at line 61 of file refresh.cc.

Member Function Documentation

◆ ZYPP_ADD_PRIVATE_CONSTR_HELPER()

template<typename ZyppContextRefType>
zyppng::repo::RefreshContext< ZyppContextRefType >::ZYPP_ADD_PRIVATE_CONSTR_HELPER ( )
private

◆ ZYPP_ENABLE_MAYBE_ASYNC_MIXIN()

template<typename ZyppContextRefType>
zyppng::repo::RefreshContext< ZyppContextRefType >::ZYPP_ENABLE_MAYBE_ASYNC_MIXIN ( (std::is_same_v< ZyppContextRefType, ContextRef >) )
private

◆ create()

template<typename ZyppContextRefType>
expected< RefreshContextRef< ZyppContextRefType > > zyppng::repo::RefreshContext< ZyppContextRefType >::create ( ZyppContextRefType zyppContext,
zypp::RepoInfo info,
RepoManagerRef< ContextRefType > repoManager )
static

Definition at line 32 of file refresh.cc.

◆ ZYPP_DECL_PRIVATE_CONSTR_ARGS()

template<typename ZyppContextRefType>
zyppng::repo::RefreshContext< ZyppContextRefType >::ZYPP_DECL_PRIVATE_CONSTR_ARGS ( RefreshContext< ZyppContextRefType > ,
ZyppContextRefType && zyppContext,
zypp::RepoInfo && info,
zypp::Pathname && rawCachePath,
zypp::filesystem::TmpDir && tempDir,
RepoManagerRef< ContextRefType > && repoManager )

◆ saveToRawCache()

template<typename ZyppContextRefType>
void zyppng::repo::RefreshContext< ZyppContextRefType >::saveToRawCache ( )

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

Definition at line 67 of file refresh.cc.

◆ rawCachePath()

template<typename ZyppContextRefType>
const zypp::Pathname & zyppng::repo::RefreshContext< ZyppContextRefType >::rawCachePath ( ) const

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

Definition at line 82 of file refresh.cc.

◆ targetDir()

template<typename ZyppContextRefType>
zypp::Pathname zyppng::repo::RefreshContext< ZyppContextRefType >::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 88 of file refresh.cc.

◆ zyppContext()

template<typename ZyppContextRefType>
const ZyppContextRefType & zyppng::repo::RefreshContext< ZyppContextRefType >::zyppContext ( ) const

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

Definition at line 94 of file refresh.cc.

◆ repoInfo() [1/2]

template<typename ZyppContextRefType>
const zypp::RepoInfo & zyppng::repo::RefreshContext< ZyppContextRefType >::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 100 of file refresh.cc.

◆ repoInfo() [2/2]

template<typename ZyppContextRefType>
zypp::RepoInfo & zyppng::repo::RefreshContext< ZyppContextRefType >::repoInfo ( )

Definition at line 106 of file refresh.cc.

◆ repoManager()

template<typename ZyppContextRefType>
const RepoManagerRef< ZyppContextRefType > & zyppng::repo::RefreshContext< ZyppContextRefType >::repoManager ( ) const

Reference to the zyppng::RepoManager that initiated the refresh

Definition at line 112 of file refresh.cc.

◆ repoManagerOptions()

template<typename ZyppContextRefType>
const zypp::RepoManagerOptions & zyppng::repo::RefreshContext< ZyppContextRefType >::repoManagerOptions ( ) const

Definition at line 118 of file refresh.cc.

◆ policy()

template<typename ZyppContextRefType>
repo::RawMetadataRefreshPolicy zyppng::repo::RefreshContext< ZyppContextRefType >::policy ( ) const

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

Definition at line 124 of file refresh.cc.

◆ setPolicy()

template<typename ZyppContextRefType>
void zyppng::repo::RefreshContext< ZyppContextRefType >::setPolicy ( RawMetadataRefreshPolicy newPolicy)

Definition at line 130 of file refresh.cc.

◆ pluginRepoverification()

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

Optional repo verification via a plugin

Definition at line 136 of file refresh.cc.

◆ setPluginRepoverification()

template<typename ZyppContextRefType>
void zyppng::repo::RefreshContext< ZyppContextRefType >::setPluginRepoverification ( std::optional< PluginRepoverification > pluginRepoverification_r)
inline

Definition at line 108 of file refresh.h.

◆ setNoPluginRepoverification()

template<typename ZyppContextRefType>
void zyppng::repo::RefreshContext< ZyppContextRefType >::setNoPluginRepoverification ( )
inline

Disabled plugin based repo verification

Definition at line 114 of file refresh.h.

◆ setProbedType()

template<typename ZyppContextRefType>
void zyppng::repo::RefreshContext< ZyppContextRefType >::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 142 of file refresh.cc.

◆ probedType()

template<typename ZyppContextRefType>
const std::optional< zypp::repo::RepoType > & zyppng::repo::RefreshContext< ZyppContextRefType >::probedType ( ) const

Definition at line 152 of file refresh.cc.

◆ sigProbedTypeChanged()

template<typename ZyppContextRefType>
SignalProxy< void(zypp::repo::RepoType)> zyppng::repo::RefreshContext< ZyppContextRefType >::sigProbedTypeChanged ( )

Definition at line 158 of file refresh.cc.

Member Data Documentation

◆ _zyppContext

template<typename ZyppContextRefType>
ZyppContextRefType zyppng::repo::RefreshContext< ZyppContextRefType >::_zyppContext
private

Definition at line 126 of file refresh.h.

◆ _repoManager

template<typename ZyppContextRefType>
RepoManagerRef<ContextRefType> zyppng::repo::RefreshContext< ZyppContextRefType >::_repoManager
private

Definition at line 127 of file refresh.h.

◆ _repoInfo

template<typename ZyppContextRefType>
zypp::RepoInfo zyppng::repo::RefreshContext< ZyppContextRefType >::_repoInfo
private

Definition at line 128 of file refresh.h.

◆ _rawCachePath

template<typename ZyppContextRefType>
zypp::Pathname zyppng::repo::RefreshContext< ZyppContextRefType >::_rawCachePath
private

Definition at line 129 of file refresh.h.

◆ _tmpDir

template<typename ZyppContextRefType>
zypp::filesystem::TmpDir zyppng::repo::RefreshContext< ZyppContextRefType >::_tmpDir
private

Definition at line 130 of file refresh.h.

◆ _policy

template<typename ZyppContextRefType>
repo::RawMetadataRefreshPolicy zyppng::repo::RefreshContext< ZyppContextRefType >::_policy = RawMetadataRefreshPolicy::RefreshIfNeeded
private

Definition at line 131 of file refresh.h.

◆ _pluginRepoverification

template<typename ZyppContextRefType>
std::optional<PluginRepoverification> zyppng::repo::RefreshContext< ZyppContextRefType >::_pluginRepoverification
private
See also
Repository metadata verification plugin

Definition at line 132 of file refresh.h.

◆ _probedType

template<typename ZyppContextRefType>
std::optional<zypp::repo::RepoType> zyppng::repo::RefreshContext< ZyppContextRefType >::_probedType
private

Definition at line 134 of file refresh.h.

◆ _sigProbedTypeChanged

template<typename ZyppContextRefType>
Signal<void(zypp::repo::RepoType)> zyppng::repo::RefreshContext< ZyppContextRefType >::_sigProbedTypeChanged
private

Definition at line 135 of file refresh.h.


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