libzypp 17.37.10

repomanagerwf.h
Go to the documentation of this file.
1/*---------------------------------------------------------------------\
2| ____ _ __ __ ___ |
3| |__ / \ / / . \ . \ |
4| / / \ V /| _/ _/ |
5| / /__ | | | | | | |
6| /_____||_| |_| |_| |
7| |
8\---------------------------------------------------------------------*/
9#ifndef ZYPP_NG_REPOMANAGER_WORKFLOW_INCLUDED
10#define ZYPP_NG_REPOMANAGER_WORKFLOW_INCLUDED
11
12
13#include <zypp-core/zyppng/pipelines/AsyncResult>
14#include <zypp-core/zyppng/pipelines/Expected>
15#include <zypp-media/ng/LazyMediaHandle>
16
17#include <zypp/ng/repomanager.h>
18#include <zypp/RepoManagerFlags.h>
19
20//@ TODO move required types into their own files... e.g. CheckStatus
21#include <zypp/ng/repo/Refresh>
22
23
24 namespace zyppng {
25
26 ZYPP_FWD_DECL_TYPE_WITH_REFS (Context);
27 ZYPP_FWD_DECL_TYPE_WITH_REFS (SyncContext);
28 ZYPP_FWD_DECL_TYPE_WITH_REFS (ProgressObserver);
29
30 class Provide;
31 class MediaSyncFacade;
32
33 using AsyncLazyMediaHandle = LazyMediaHandle<Provide>;
34 using SyncLazyMediaHandle = LazyMediaHandle<MediaSyncFacade>;
35
36 namespace RepoManagerWorkflow {
37
38 AsyncOpRef<expected<zypp::repo::RepoType> > probeRepoType( ContextRef ctx, AsyncLazyMediaHandle medium, zypp::Pathname path, std::optional<zypp::Pathname> targetPath = {} );
39 expected<zypp::repo::RepoType> probeRepoType ( SyncContextRef ctx, SyncLazyMediaHandle medium, zypp::Pathname path, std::optional<zypp::Pathname> targetPath = {} );
40
41 AsyncOpRef<expected<zypp::repo::RepoType> > probeRepoType( ContextRef ctx, RepoInfo repo, std::optional<zypp::Pathname> targetPath = {} );
42 expected<zypp::repo::RepoType> probeRepoType ( SyncContextRef ctx, RepoInfo repo, std::optional<zypp::Pathname> targetPath = {} );
43
44 AsyncOpRef<expected<std::list<RepoInfo>>> readRepoFile( ContextRef ctx, zypp::Url repoFileUrl );
45 expected<std::list<RepoInfo>> readRepoFile( SyncContextRef ctx, zypp::Url repoFileUrl );
46
47 AsyncOpRef<expected<repo::RefreshCheckStatus> > checkIfToRefreshMetadata( repo::AsyncRefreshContextRef refCtx, AsyncLazyMediaHandle medium, ProgressObserverRef progressObserver = nullptr );
48 expected<repo::RefreshCheckStatus> checkIfToRefreshMetadata( repo::SyncRefreshContextRef refCtx, SyncLazyMediaHandle medium, ProgressObserverRef progressObserver = nullptr );
49
50 AsyncOpRef<expected<repo::AsyncRefreshContextRef> > refreshMetadata( repo::AsyncRefreshContextRef refCtx, ProgressObserverRef progressObserver = nullptr );
51 expected<repo::SyncRefreshContextRef> refreshMetadata( repo::SyncRefreshContextRef refCtx, ProgressObserverRef progressObserver = nullptr );
52
53 AsyncOpRef<expected<repo::AsyncRefreshContextRef> > refreshMetadata( repo::AsyncRefreshContextRef refCtx, AsyncLazyMediaHandle medium, ProgressObserverRef progressObserver = nullptr );
54 expected<repo::SyncRefreshContextRef> refreshMetadata( repo::SyncRefreshContextRef refCtx, SyncLazyMediaHandle medium, ProgressObserverRef progressObserver = nullptr );
55
56 AsyncOpRef<expected<repo::AsyncRefreshContextRef> > buildCache( repo::AsyncRefreshContextRef refCtx, zypp::RepoManagerFlags::CacheBuildPolicy policy, ProgressObserverRef progressObserver = nullptr );
57 expected<repo::SyncRefreshContextRef> buildCache( repo::SyncRefreshContextRef refCtx, zypp::RepoManagerFlags::CacheBuildPolicy policy, ProgressObserverRef progressObserver = nullptr );
58
59 AsyncOpRef<expected<RepoInfo>> addRepository( AsyncRepoManagerRef mgr, RepoInfo info, ProgressObserverRef myProgress = nullptr );
60 expected<RepoInfo> addRepository( SyncRepoManagerRef mgr, const RepoInfo &info, ProgressObserverRef myProgress = nullptr );
61
62 AsyncOpRef<expected<void>> addRepositories( AsyncRepoManagerRef mgr, zypp::Url url, ProgressObserverRef myProgress = nullptr );
63 expected<void> addRepositories( SyncRepoManagerRef mgr, zypp::Url url, ProgressObserverRef myProgress = nullptr );
64
65 AsyncOpRef<expected<void>> refreshGeoIPData( ContextRef ctx, RepoInfo::url_set urls );
66 expected<void> refreshGeoIPData( SyncContextRef ctx, RepoInfo::url_set urls );
67
68 AsyncOpRef<expected<void>> refreshGeoIPData( ContextRef ctx, zypp::MirroredOriginSet origins );
69 expected<void> refreshGeoIPData( SyncContextRef ctx, zypp::MirroredOriginSet origins );
70
71 }
72}
73
74
75#endif
RepoManagerFlags.h
zypp::MirroredOriginSet
A smart container that manages a collection of MirroredOrigin objects, automatically grouping endpoin...
Definition MirroredOrigin.h:325
zypp::RepoInfo
What is known about a repository.
Definition RepoInfo.h:72
zypp::RepoInfo::url_set
std::list< Url > url_set
Definition RepoInfo.h:108
zypp::Url
Url manipulation class.
Definition Url.h:93
zyppng::Context
Definition context.h:39
zyppng::LazyMediaHandle
Definition lazymediahandle.h:20
zyppng::MediaSyncFacade
Definition mediafacade.h:49
zyppng::ProgressObserver
Definition progressobserver.h:28
zyppng::Provide
Definition provide.h:116
zyppng::SyncContext
Definition contextfacade.h:27
zyppng::expected
Definition expected.h:27
zypp::RepoManagerFlags::CacheBuildPolicy
CacheBuildPolicy
Definition RepoManagerFlags.h:28
zypp::url
Url details namespace.
Definition UrlBase.cc:58
zyppng::RepoManagerWorkflow
Definition repomanagerwf.cc:37
zyppng::RepoManagerWorkflow::probeRepoType
AsyncOpRef< expected< zypp::repo::RepoType > > probeRepoType(ContextRef ctx, AsyncLazyMediaHandle medium, zypp::Pathname path, std::optional< zypp::Pathname > targetPath)
Definition repomanagerwf.cc:192
zyppng::RepoManagerWorkflow::addRepository
AsyncOpRef< expected< RepoInfo > > addRepository(AsyncRepoManagerRef mgr, RepoInfo info, ProgressObserverRef myProgress)
Definition repomanagerwf.cc:949
zyppng::RepoManagerWorkflow::checkIfToRefreshMetadata
AsyncOpRef< expected< repo::RefreshCheckStatus > > checkIfToRefreshMetadata(repo::AsyncRefreshContextRef refCtx, LazyMediaHandle< Provide > medium, ProgressObserverRef progressObserver)
Definition repomanagerwf.cc:361
zyppng::RepoManagerWorkflow::readRepoFile
AsyncOpRef< expected< std::list< RepoInfo > > > readRepoFile(ContextRef ctx, zypp::Url repoFileUrl)
Definition repomanagerwf.cc:226
zyppng::RepoManagerWorkflow::refreshGeoIPData
AsyncOpRef< expected< void > > refreshGeoIPData(ContextRef ctx, RepoInfo::url_set urls)
Definition repomanagerwf.cc:1230
zyppng::RepoManagerWorkflow::addRepositories
AsyncOpRef< expected< void > > addRepositories(AsyncRepoManagerRef mgr, zypp::Url url, ProgressObserverRef myProgress)
Definition repomanagerwf.cc:1052
zyppng::RepoManagerWorkflow::refreshMetadata
AsyncOpRef< expected< repo::AsyncRefreshContextRef > > refreshMetadata(repo::AsyncRefreshContextRef refCtx, LazyMediaHandle< Provide > medium, ProgressObserverRef progressObserver)
Definition repomanagerwf.cc:473
zyppng::RepoManagerWorkflow::buildCache
AsyncOpRef< expected< repo::AsyncRefreshContextRef > > buildCache(repo::AsyncRefreshContextRef refCtx, zypp::RepoManagerFlags::CacheBuildPolicy policy, ProgressObserverRef progressObserver)
Definition repomanagerwf.cc:870
zyppng
Definition MediaNetworkRequestExecutor.h:16
zyppng::AsyncOpRef
std::shared_ptr< AsyncOp< T > > AsyncOpRef
Definition asyncop.h:255
zyppng::AsyncLazyMediaHandle
LazyMediaHandle< Provide > AsyncLazyMediaHandle
Definition repodownloaderwf.h:33
zyppng::SyncLazyMediaHandle
LazyMediaHandle< MediaSyncFacade > SyncLazyMediaHandle
Definition repodownloaderwf.h:34
zyppng::SyncRepoManagerRef
RepoManagerRef< SyncContextRef > SyncRepoManagerRef
Definition repomanager.h:49
zyppng::RepoInfo
zypp::RepoInfo RepoInfo
Definition repomanager.h:36
zyppng::AsyncRepoManagerRef
RepoManagerRef< ContextRef > AsyncRepoManagerRef
Definition repomanager.h:52
repomanager.h
ZYPP_FWD_DECL_TYPE_WITH_REFS
#define ZYPP_FWD_DECL_TYPE_WITH_REFS(T)
Definition zyppglobal.h:126