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 GnuPGWKSMessagePart; 0013 0014 class ApplicationGnuPGWKSFormatter : public MimeTreeParser::Interface::BodyPartFormatter, public MessageViewer::MessagePartRendererBase 0015 { 0016 public: 0017 ApplicationGnuPGWKSFormatter() = 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 enum WKSStatus { 0024 CheckingPublishing, 0025 NotPublished, 0026 Published, 0027 }; 0028 0029 [[nodiscard]] QString render(const GnuPGWKSMessagePart &mp, WKSStatus status) const; 0030 };