libzypp
17.32.2
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
16
namespace
zypp
{
17
DEFINE_PTR_TYPE
(KeyRing);
18
class
ZConfig;
19
}
20
21
namespace
zyppng
{
22
23
ZYPP_FWD_DECL_TYPE_WITH_REFS
(
Context
);
24
ZYPP_FWD_DECL_TYPE_WITH_REFS
( ProgressObserver );
25
ZYPP_FWD_DECL_TYPE_WITH_REFS
(
Provide
);
26
ZYPP_FWD_DECL_TYPE_WITH_REFS
( RepoManager );
27
28
using
KeyRing
=
zypp::KeyRing
;
29
using
KeyRingRef
= zypp::KeyRing_Ptr;
30
31
class
ContextPrivate
;
32
33
38
class
Context
:
public
UserInterface
39
{
40
ZYPP_DECLARE_PRIVATE(
Context
)
41
ZYPP_ADD_CREATE_FUNC(
Context
)
42
43
public
:
44
45
using
ProvideType
=
Provide
;
46
47
ZYPP_DECL_PRIVATE_CONSTR
(
Context
);
48
49
template
<
typename
AsyncRes>
50
void
execute
( AsyncOpRef<AsyncRes> op ) {
51
if
( op->isReady () )
52
return
;
53
return
executeImpl
( op );
54
}
55
56
ProvideRef
provider
()
const
;
57
KeyRingRef
keyRing
()
const
;
58
zypp::ZConfig
&
config
();
59
60
private
:
61
void
executeImpl
(
const
AsyncOpBaseRef& op );
62
};
63
64
}
65
66
67
#endif
RepoManager.h
UserInterface
zypp::KeyRing
Gpg key handling.
Definition
KeyRing.h:187
zypp::ZConfig
Interim helper class to collect global options and settings.
Definition
ZConfig.h:64
zyppng::ContextPrivate
Definition
context_p.h:23
zyppng::Context
Definition
context.h:39
zyppng::Context::config
zypp::ZConfig & config()
Definition
context.cc:43
zyppng::Context::execute
void execute(AsyncOpRef< AsyncRes > op)
Definition
context.h:50
zyppng::Context::ZYPP_DECL_PRIVATE_CONSTR
ZYPP_DECL_PRIVATE_CONSTR(Context)
zyppng::Context::executeImpl
void executeImpl(const AsyncOpBaseRef &op)
Definition
context.cc:48
zyppng::Context::provider
ProvideRef provider() const
Definition
context.cc:32
zyppng::Context::keyRing
KeyRingRef keyRing() const
Definition
context.cc:38
zyppng::Provide
Definition
provide.h:111
zypp
Easy-to use interface to the ZYPP dependency resolver.
Definition
CodePitfalls.doc:2
zyppng
Definition
MediaNetwork.h:23
zyppng::ZYPP_FWD_DECL_TYPE_WITH_REFS
ZYPP_FWD_DECL_TYPE_WITH_REFS(Context)
zyppng::KeyRingRef
zypp::KeyRing_Ptr KeyRingRef
Definition
context.h:29
DEFINE_PTR_TYPE
#define DEFINE_PTR_TYPE(NAME)
Forward declaration of Ptr types.
Definition
PtrTypes.h:638
zypp
ng
context.h
Generated by
1.10.0