Messagelib

autocryptutils.h
1 /*
2  SPDX-FileCopyrightText: 2020 Sandro KnauƟ <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #pragma once
8 
9 #include "autocryptrecipient.h"
10 
11 #include "messagecore_export.h"
12 
13 #include <KMime/Headers>
14 #include <MimeTreeParser/MessagePart>
15 #include <MimeTreeParser/NodeHelper>
16 
17 namespace MessageCore
18 {
19 class MESSAGECORE_EXPORT HeaderMixupNodeHelper
20 {
21 public:
22  HeaderMixupNodeHelper(MimeTreeParser::NodeHelper *n, KMime::Content *m);
23 
24  Q_REQUIRED_RESULT bool hasMailHeader(const char *header) const;
25  Q_REQUIRED_RESULT KMime::Headers::Base const *mailHeaderAsBase(const char *header) const;
26  Q_REQUIRED_RESULT QSharedPointer<KMime::Headers::Generics::AddressList> mailHeaderAsAddressList(const char *header) const;
27  Q_REQUIRED_RESULT QDateTime dateHeader() const;
28  Q_REQUIRED_RESULT QVector<MimeTreeParser::MessagePart::Ptr> messagePartsOfMailHeader(const char *header) const;
29  Q_REQUIRED_RESULT QVector<KMime::Headers::Base *> headers(const char *headerType) const;
30 
31 public:
32  KMime::Content *message = nullptr;
33 
34 private:
35  MimeTreeParser::NodeHelper *const mNodeHelper;
36 };
37 
38 Q_REQUIRED_RESULT QHash<QByteArray, QByteArray> MESSAGECORE_EXPORT paramsFromAutocryptHeader(const KMime::Headers::Base *const header);
39 MESSAGECORE_EXPORT void processAutocryptfromMail(const HeaderMixupNodeHelper &mixup);
40 }
41 
KCOREADDONS_EXPORT void message(KMessage::MessageType messageType, const QString &text, const QString &caption=QString())
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Fri Nov 26 2021 23:16:41 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.