libzypp 17.34.1
context.h
Go to the documentation of this file.
1/*---------------------------------------------------------------------\
2| ____ _ __ __ ___ |
3| |__ / \ / / . \ . \ |
4| / / \ V /| _/ _/ |
5| / /__ | | | | | | |
6| /_____||_| |_| |_| |
7| |
8\---------------------------------------------------------------------*/
9#ifndef ZYPP_NG_CONTEXT_INCLUDED
10#define ZYPP_NG_CONTEXT_INCLUDED
11
12#include <zypp-core/zyppng/async/AsyncOp>
13#include <zypp-core/zyppng/ui/UserInterface>
14#include <zypp/RepoManager.h>
15
16namespace zypp {
17 DEFINE_PTR_TYPE(KeyRing);
18 class ZConfig;
19}
20
21namespace zyppng {
22
27
29 using KeyRingRef = zypp::KeyRing_Ptr;
30
31 class ContextPrivate;
32
33
38 class Context : public UserInterface
39 {
42
43 public:
44
46
48
49 template <typename AsyncRes>
51 if ( op->isReady () )
52 return;
53 return executeImpl( op );
54 }
55
56 ProvideRef provider() const;
57 KeyRingRef keyRing () const;
59
60 private:
61 void executeImpl ( const AsyncOpBaseRef& op );
62 };
63
64}
65
66
67#endif
Gpg key handling.
Definition KeyRing.h:187
creates and provides information about known sources.
Definition RepoManager.h:58
Interim helper class to collect global options and settings.
Definition ZConfig.h:64
zypp::ZConfig & config()
Definition context.cc:43
void execute(AsyncOpRef< AsyncRes > op)
Definition context.h:50
ZYPP_DECL_PRIVATE_CONSTR(Context)
void executeImpl(const AsyncOpBaseRef &op)
Definition context.cc:48
ProvideRef provider() const
Definition context.cc:32
KeyRingRef keyRing() const
Definition context.cc:38
Easy-to use interface to the ZYPP dependency resolver.
std::shared_ptr< AsyncOp< T > > AsyncOpRef
Definition asyncop.h:255
zypp::KeyRing_Ptr KeyRingRef
Definition context.h:29
#define DEFINE_PTR_TYPE(NAME)
Forward declaration of Ptr types.
Definition PtrTypes.h:639
#define ZYPP_ADD_CREATE_FUNC(Class)
Definition zyppglobal.h:196
#define ZYPP_DECLARE_PRIVATE(Class)
Definition zyppglobal.h:86
#define ZYPP_FWD_DECL_TYPE_WITH_REFS(T)
Definition zyppglobal.h:117