summaryrefslogtreecommitdiffstats
path: root/framework/src/domain/mime/mailcrypto.h
diff options
context:
space:
mode:
Diffstat (limited to 'framework/src/domain/mime/mailcrypto.h')
-rw-r--r--framework/src/domain/mime/mailcrypto.h31
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
33namespace MailCrypto { 33namespace MailCrypto {
34 34
35struct Key { 35Expected<Crypto::Error, std::unique_ptr<KMime::Content>>
36 GpgME::Key key; 36processCrypto(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
39struct Error {
40 GpgME::Error key;
41};
42
43Expected<Error, std::unique_ptr<KMime::Content>>
44processCrypto(std::unique_ptr<KMime::Content> content, const std::vector<Key> &signingKeys,
45 const std::vector<Key> &encryptionKeys, const Key &attachedKey);
46
47std::vector<Key> findKeys(const QStringList &filter, bool findPrivate = false, bool remote = false);
48
49void importKeys(const std::vector<Key> &keys);
50
51struct ImportResult {
52 int considered;
53 int imported;
54 int unchanged;
55};
56
57ImportResult importKey(const QByteArray &key);
58 38
59}; // namespace MailCrypto 39}; // namespace MailCrypto
60 40
61Q_DECLARE_METATYPE(MailCrypto::Key);
62
63QDebug operator<< (QDebug d, const MailCrypto::Key &);