libzypp 17.37.17
userrequest.h
Go to the documentation of this file.
1/*---------------------------------------------------------------------\
2| ____ _ __ __ ___ |
3| |__ / \ / / . \ . \ |
4| / / \ V /| _/ _/ |
5| / /__ | | | | | | |
6| /_____||_| |_| |_| |
7| |
8\---------------------------------------------------------------------*/
9#ifndef ZYPP_NG_USERREQUEST_H_INCLUDED
10#define ZYPP_NG_USERREQUEST_H_INCLUDED
11
12#include <zypp-common/PublicKey.h>
13#include <zypp/KeyContext.h>
14#include <zypp-core/zyppng/ui/UserRequest>
15
16namespace zyppng {
17
28 constexpr std::string_view CTYPE ("digest/accept-no-digest");
29 constexpr std::string_view FILE ("file");
31 }
32
44 constexpr std::string_view CTYPE ("digest/accept-unknown-digest");
45 constexpr std::string_view FILE ("file");
46 constexpr std::string_view NAME ("name");
47 UserData makeData ( const zypp::Pathname &p, const std::string &name );
48 }
49
61 constexpr std::string_view CTYPE ("digest/accept-unknown-digest");
62 constexpr std::string_view FILE ("file");
63 constexpr std::string_view NAME_REQUESTED ("requested");
64 constexpr std::string_view NAME_FOUND ("found");
65 UserData makeData ( const zypp::Pathname &p, const std::string &requested, const std::string &found );
66 }
67
68
71 {
73 public:
99
101
102 void setChoice ( const KeyTrust sel );
103 KeyTrust choice() const;
104
105 const std::string label() const;
106
107 UserRequestType type() const override;
108
109 private:
110 std::string _label;
112 };
113
123 constexpr std::string_view CTYPE ("keyring/accept-key");
124 constexpr std::string_view KEY ("key");
125 constexpr std::string_view KEY_CONTEXT("key-context");
126 UserData makeData ( const zypp::PublicKey &key, const zypp::KeyContext &keycontext = zypp::KeyContext() );
127 }
128
129
138 namespace VerifyInfoEvent {
139 constexpr std::string_view CTYPE ("keyring/info-verify");
140 constexpr std::string_view FILE ("file");
141 constexpr std::string_view KEY_DATA("key-data");
142 constexpr std::string_view KEY_CONTEXT("key-context");
143 UserData makeData ( const std::string & file_r, const zypp::PublicKeyData & keyData_r, const zypp::KeyContext &keycontext = zypp::KeyContext() );
144 }
145
154 constexpr std::string_view CTYPE ("keyring/accept-unsigned-file");
155 constexpr std::string_view FILE ("file");
156 constexpr std::string_view KEY_CONTEXT("key-context");
157 UserData makeData ( const std::string &file, const zypp::KeyContext &keycontext = zypp::KeyContext() );
158 }
159
173 constexpr std::string_view CTYPE ("keyring/accept-unknown-key");
174 constexpr std::string_view KEYID ("keyid");
175 constexpr std::string_view FILE ("file");
176 constexpr std::string_view KEY_CONTEXT("key-context");
177 UserData makeData ( const std::string &file, const std::string &id, const zypp::KeyContext &keycontext = zypp::KeyContext() );
178 }
179
190 constexpr std::string_view CTYPE ("keyring/accept-failed-verification");
191 constexpr std::string_view FILE ("file");
192 constexpr std::string_view KEY ("key");
193 constexpr std::string_view KEY_CONTEXT ("key-context");
194 UserData makeData ( const std::string &file, const zypp::PublicKey &key, const zypp::KeyContext &keycontext = zypp::KeyContext() );
195 }
196
207 constexpr std::string_view CTYPE ("keyring/accept-package-key");
208 constexpr std::string_view KEY ("key");
209 constexpr std::string_view KEY_CONTEXT ("key-context");
210 UserData makeData ( const zypp::PublicKey &key_r, const zypp::KeyContext &keycontext_r = zypp::KeyContext() );
211 }
212
222 constexpr std::string_view CTYPE ("keyring/keys-not-imported");
223 constexpr std::string_view KEYS ("keys");
224 UserData makeData ( const std::set<zypp::Edition> &keys_r );
225 }
226
239 constexpr std::string_view CTYPE ("keyring/auto-import-key-info");
240 constexpr std::string_view KEY_DATA_LIST ("key-data-list");
241 constexpr std::string_view KEY_DATA ("key-data");
242 constexpr std::string_view KEY_CONTEXT ("key-context");
243 UserData makeData ( const std::list<zypp::PublicKeyData> & keyDataList_r,
244 const zypp::PublicKeyData & keySigning_r,
245 const zypp::KeyContext &keyContext_r );
246 }
247
248
249}
250
251#endif // ZYPP_NG_USERREQUEST_H_INCLUDED
ZYPP_DECL_PRIVATE_CONSTR_ARGS(TrustKeyRequest, std::string label, KeyTrust trust=KEY_DONT_TRUST, UserData userData={})
void setChoice(const KeyTrust sel)
@ KEY_DONT_TRUST
User has chosen not to trust the key.
Definition userrequest.h:83
@ KEY_TRUST_AND_IMPORT
Import the key.
Definition userrequest.h:97
@ KEY_TRUST_TEMPORARILY
This basically means, we knew the key, but it was not trusted.
Definition userrequest.h:88
const std::string label() const
KeyTrust choice() const
UserRequestType type() const override
const UserData & userData() const
UserRequest(UserData userData={})
Ask the user to accept a file that is signed but where the signature verification failed.
constexpr std::string_view FILE("file")
constexpr std::string_view KEY_CONTEXT("key-context")
UserData makeData(const std::string &file, const zypp::PublicKey &key, const zypp::KeyContext &keycontext=zypp::KeyContext())
constexpr std::string_view KEY("key")
constexpr std::string_view CTYPE("keyring/accept-failed-verification")
constexpr std::string_view KEY("key")
constexpr std::string_view CTYPE("keyring/accept-key")
UserData makeData(const zypp::PublicKey &key, const zypp::KeyContext &keycontext=zypp::KeyContext())
constexpr std::string_view KEY_CONTEXT("key-context")
UserData makeData(const zypp::Pathname &p)
constexpr std::string_view CTYPE("digest/accept-no-digest")
constexpr std::string_view FILE("file")
Ask user to trust and/or import the package key to trusted keyring.
constexpr std::string_view CTYPE("keyring/accept-package-key")
UserData makeData(const zypp::PublicKey &key_r, const zypp::KeyContext &keycontext_r=zypp::KeyContext())
constexpr std::string_view KEY("key")
constexpr std::string_view KEY_CONTEXT("key-context")
UserData makeData(const zypp::Pathname &p, const std::string &name)
constexpr std::string_view CTYPE("digest/accept-unknown-digest")
constexpr std::string_view NAME("name")
constexpr std::string_view FILE("file")
Ask the user to accept a unknown key.
UserData makeData(const std::string &file, const std::string &id, const zypp::KeyContext &keycontext=zypp::KeyContext())
constexpr std::string_view KEY_CONTEXT("key-context")
constexpr std::string_view FILE("file")
constexpr std::string_view CTYPE("keyring/accept-unknown-key")
constexpr std::string_view KEYID("keyid")
constexpr std::string_view CTYPE("keyring/accept-unsigned-file")
constexpr std::string_view KEY_CONTEXT("key-context")
constexpr std::string_view FILE("file")
UserData makeData(const std::string &file, const zypp::KeyContext &keycontext=zypp::KeyContext())
UserData makeData(const zypp::Pathname &p, const std::string &requested, const std::string &found)
constexpr std::string_view CTYPE("digest/accept-unknown-digest")
constexpr std::string_view NAME_FOUND("found")
constexpr std::string_view NAME_REQUESTED("requested")
constexpr std::string_view FILE("file")
Notify that a repository auto imported new package signing keys.
constexpr std::string_view CTYPE("keyring/auto-import-key-info")
constexpr std::string_view KEY_DATA_LIST("key-data-list")
UserData makeData(const std::list< zypp::PublicKeyData > &keyDataList_r, const zypp::PublicKeyData &keySigning_r, const zypp::KeyContext &keyContext_r)
constexpr std::string_view KEY_DATA("key-data")
constexpr std::string_view KEY_CONTEXT("key-context")
Notify the user about keys that were not imported from the rpm key database into zypp keyring.
constexpr std::string_view KEYS("keys")
constexpr std::string_view CTYPE("keyring/keys-not-imported")
UserData makeData(const std::set< zypp::Edition > &keys_r)
constexpr std::string_view FILE("file")
UserData makeData(const std::string &file_r, const zypp::PublicKeyData &keyData_r, const zypp::KeyContext &keycontext=zypp::KeyContext())
constexpr std::string_view KEY_DATA("key-data")
constexpr std::string_view KEY_CONTEXT("key-context")
constexpr std::string_view CTYPE("keyring/info-verify")
UserRequestType
Definition userrequest.h:34
zypp::callback::UserData UserData
Definition userrequest.h:18
#define ZYPP_ADD_CREATE_FUNC(Class)
Definition zyppglobal.h:205
#define ZYPP_FWD_DECL_TYPE_WITH_REFS(T)
Definition zyppglobal.h:126