File indexing completed on 2025-01-19 04:46:49

0001 /*
0002   SPDX-FileCopyrightText: 2016 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.net>
0003 
0004    SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include <MessageViewer/MessagePartRendererBase>
0010 #include <MimeTreeParser/BodyPartFormatter>
0011 
0012 class PgpKeyMessagePart;
0013 
0014 class ApplicationPGPKeyFormatter : public MimeTreeParser::Interface::BodyPartFormatter, public MessageViewer::MessagePartRendererBase
0015 {
0016 public:
0017     ApplicationPGPKeyFormatter() = default;
0018 
0019     MimeTreeParser::MessagePartPtr process(MimeTreeParser::Interface::BodyPart &part) const override;
0020     bool render(const MimeTreeParser::MessagePartPtr &msgPart, MessageViewer::HtmlWriter *htmlWriter, MessageViewer::RenderContext *context) const override;
0021 
0022 private:
0023     [[nodiscard]] QString render(const PgpKeyMessagePart &mp) const;
0024 };