libzypp  17.38.7
context.h
Go to the documentation of this file.
1 /*---------------------------------------------------------------------\
2 | ____ _ __ __ ___ |
3 | |__ / \ / / . \ . \ |
4 | / / \ V /| _/ _/ |
5 | / /__ | | | | | | |
6 | /_____||_| |_| |_| |
7 | |
8 \---------------------------------------------------------------------*/
9 #ifndef ZYPP_NG_CONTEXTFACADE_INCLUDED
10 #define ZYPP_NG_CONTEXTFACADE_INCLUDED
11 
12 #include <zypp/Target.h>
13 #include <zypp/ng/media/provide.h>
14 
15 namespace zypp {
17  class ZConfig;
18 }
19 
20 namespace zyppng {
21 
23 
25  using KeyRingRef = zypp::KeyRing_Ptr;
26 
27  class ZYPP_API Context {
28 
30 
31  public:
33 
35  static constexpr auto isAsync = false;
36 
37  static ContextRef defaultContext();
38 
39  ProvideRef provider() const;
40  KeyRingRef keyRing () const;
41  zypp::ZConfig &config();
42  zypp::ResPool pool();
44  zypp::sat::Pool satPool();
45 
46 
47  private:
48  ProvideRef _media;
49  };
50 
51  template<typename T>
52  auto joinPipeline( ContextRef ctx, T &&val ) {
53  return std::forward<T>(val);
54  }
55 }
56 
57 #endif
zypp::KeyRing KeyRing
Definition: context.h:24
auto joinPipeline(ContextRef ctx, T &&val)
Definition: context.h:52
Gpg key handling.
Definition: KeyRing.h:169
#define ZYPP_ADD_CREATE_FUNC(Class)
Definition: zyppglobal.h:198
ResPool::instance().proxy();.
Definition: ResPoolProxy.h:35
zypp::KeyRing_Ptr KeyRingRef
Definition: context.h:25
DEFINE_PTR_TYPE(Application)
Interim helper class to collect global options and settings.
Definition: ZConfig.h:81
#define ZYPP_API
Definition: Globals.h:69
Global ResObject pool.
Definition: ResPool.h:61
#define ZYPP_DECL_PRIVATE_CONSTR(Class)
Definition: zyppglobal.h:214
ZYPP_FWD_DECL_TYPE_WITH_REFS(EventDispatcher)
static ResPoolProxy poolProxy()
Global sat-pool.
Definition: Pool.h:46
ProvideRef _media
Definition: context.h:48
Easy-to use interface to the ZYPP dependency resolver.
Definition: CodePitfalls.doc:1