File indexing completed on 2024-12-22 05:05:20

0001 // SPDX-FileCopyrightText: 2016 Sandro Knauß <sknauss@kde.org>
0002 // SPDX-FileCopyrightText: 2023 g10 Code GmbH
0003 // SPDX-FileContributor: Carl Schwan <carl.schwan@gnupg.com>
0004 // SPDX-License-Identifier: LGPL-2.0-or-later
0005 
0006 #pragma once
0007 
0008 #include <KMime/Content>
0009 
0010 #include <QGpgME/Protocol>
0011 #include <gpgme++/decryptionresult.h>
0012 #include <gpgme++/key.h>
0013 #include <libkleo/dn.h>
0014 
0015 #include <vector>
0016 
0017 #include "mimetreeparser_core_export.h"
0018 
0019 namespace MimeTreeParser
0020 {
0021 KMime::Content *findTypeInDirectChildren(KMime::Content *content, const QByteArray &mimeType);
0022 
0023 /// Convert a list of recipients to an html list
0024 MIMETREEPARSER_CORE_EXPORT QString decryptRecipientsToHtml(const std::vector<std::pair<GpgME::DecryptionResult::Recipient, GpgME::Key>> &recipients,
0025                                                            const QGpgME::Protocol *cryptoProto);
0026 
0027 /// Convert a DN to a more compact display name (usually just Common name + organization name)
0028 MIMETREEPARSER_CORE_EXPORT QString dnToDisplayName(const Kleo::DN &dn);
0029 }