libzypp 17.37.17
|
#include <zypp/ng/repo/refresh.h>
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::Pathname & | rawCachePath () const |
zypp::Pathname | targetDir () const |
const ZyppContextRefType & | zyppContext () const |
const zypp::RepoInfo & | repoInfo () const |
zypp::RepoInfo & | repoInfo () |
const RepoManagerRef< ZyppContextRefType > & | 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) |
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< BasePrivate > | d_ptr |
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
using zyppng::repo::RefreshContext< ZyppContextRefType >::ContextRefType = ZyppContextRefType |
using zyppng::repo::RefreshContext< ZyppContextRefType >::ContextType = typename ZyppContextRefType::element_type |
using zyppng::repo::RefreshContext< ZyppContextRefType >::ProvideType = typename ContextType::ProvideType |
using zyppng::repo::RefreshContext< ZyppContextRefType >::MediaHandle = typename ProvideType::MediaHandle |
using zyppng::repo::RefreshContext< ZyppContextRefType >::PluginRepoverification = zypp_private::repo::PluginRepoverification |
|
override |
Definition at line 61 of file refresh.cc.
|
private |
|
private |
|
static |
Definition at line 32 of file refresh.cc.
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 ) |
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.
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.
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.
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.
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.
zypp::RepoInfo & zyppng::repo::RefreshContext< ZyppContextRefType >::repoInfo | ( | ) |
Definition at line 106 of file refresh.cc.
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.
const zypp::RepoManagerOptions & zyppng::repo::RefreshContext< ZyppContextRefType >::repoManagerOptions | ( | ) | const |
Definition at line 118 of file refresh.cc.
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.
void zyppng::repo::RefreshContext< ZyppContextRefType >::setPolicy | ( | RawMetadataRefreshPolicy | newPolicy | ) |
Definition at line 130 of file refresh.cc.
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.
|
inline |
|
inline |
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.
const std::optional< zypp::repo::RepoType > & zyppng::repo::RefreshContext< ZyppContextRefType >::probedType | ( | ) | const |
Definition at line 152 of file refresh.cc.
SignalProxy< void(zypp::repo::RepoType)> zyppng::repo::RefreshContext< ZyppContextRefType >::sigProbedTypeChanged | ( | ) |
Definition at line 158 of file refresh.cc.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |