Messagelib

autocryptutils.h
1/*
2 SPDX-FileCopyrightText: 2020 Sandro KnauƟ <knauss@kde.org>
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
17namespace MessageCore
18{
19class MESSAGECORE_EXPORT HeaderMixupNodeHelper
20{
21public:
22 HeaderMixupNodeHelper(MimeTreeParser::NodeHelper *n, KMime::Content *m);
23
24 [[nodiscard]] bool hasMailHeader(const char *header) const;
25 [[nodiscard]] KMime::Headers::Base const *mailHeaderAsBase(const char *header) const;
26 [[nodiscard]] QSharedPointer<KMime::Headers::Generics::AddressList> mailHeaderAsAddressList(const char *header) const;
27 [[nodiscard]] QDateTime dateHeader() const;
28 [[nodiscard]] QList<MimeTreeParser::MessagePart::Ptr> messagePartsOfMailHeader(const char *header) const;
29 [[nodiscard]] QList<KMime::Headers::Base *> headers(const char *headerType) const;
30
31public:
32 KMime::Content *message = nullptr;
33
34private:
35 MimeTreeParser::NodeHelper *const mNodeHelper;
36};
37
38[[nodiscard]] QHash<QByteArray, QByteArray> MESSAGECORE_EXPORT paramsFromAutocryptHeader(const KMime::Headers::Base *const header);
39MESSAGECORE_EXPORT void processAutocryptfromMail(const HeaderMixupNodeHelper &mixup);
40}
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Jul 19 2024 11:56:56 by doxygen 1.11.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.