diff options
Diffstat (limited to 'framework/src/domain/mime/mailcrypto.h')
-rw-r--r-- | framework/src/domain/mime/mailcrypto.h | 31 |
1 files changed, 4 insertions, 27 deletions
diff --git a/framework/src/domain/mime/mailcrypto.h b/framework/src/domain/mime/mailcrypto.h index c9247859..6f19063d 100644 --- a/framework/src/domain/mime/mailcrypto.h +++ b/framework/src/domain/mime/mailcrypto.h | |||
@@ -22,42 +22,19 @@ | |||
22 | #include "framework/src/errors.h" | 22 | #include "framework/src/errors.h" |
23 | 23 | ||
24 | #include <KMime/Message> | 24 | #include <KMime/Message> |
25 | #include <gpgme++/key.h> | ||
26 | 25 | ||
27 | #include <QByteArray> | 26 | #include <QByteArray> |
28 | #include <QVariant> | 27 | #include <QVariant> |
29 | 28 | ||
30 | #include <functional> | 29 | #include <functional> |
31 | #include <memory> | 30 | #include <memory> |
31 | #include "crypto.h" | ||
32 | 32 | ||
33 | namespace MailCrypto { | 33 | namespace MailCrypto { |
34 | 34 | ||
35 | struct Key { | 35 | Expected<Crypto::Error, std::unique_ptr<KMime::Content>> |
36 | GpgME::Key key; | 36 | processCrypto(std::unique_ptr<KMime::Content> content, const std::vector<Crypto::Key> &signingKeys, |
37 | }; | 37 | const std::vector<Crypto::Key> &encryptionKeys, const Crypto::Key &attachedKey); |
38 | |||
39 | struct Error { | ||
40 | GpgME::Error key; | ||
41 | }; | ||
42 | |||
43 | Expected<Error, std::unique_ptr<KMime::Content>> | ||
44 | processCrypto(std::unique_ptr<KMime::Content> content, const std::vector<Key> &signingKeys, | ||
45 | const std::vector<Key> &encryptionKeys, const Key &attachedKey); | ||
46 | |||
47 | std::vector<Key> findKeys(const QStringList &filter, bool findPrivate = false, bool remote = false); | ||
48 | |||
49 | void importKeys(const std::vector<Key> &keys); | ||
50 | |||
51 | struct ImportResult { | ||
52 | int considered; | ||
53 | int imported; | ||
54 | int unchanged; | ||
55 | }; | ||
56 | |||
57 | ImportResult importKey(const QByteArray &key); | ||
58 | 38 | ||
59 | }; // namespace MailCrypto | 39 | }; // namespace MailCrypto |
60 | 40 | ||
61 | Q_DECLARE_METATYPE(MailCrypto::Key); | ||
62 | |||
63 | QDebug operator<< (QDebug d, const MailCrypto::Key &); | ||