gnupgwksformatter.h 1002 Bytes
Newer Older
1
/*
2
3
4
  SPDX-FileCopyrightText: 2016 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.net>

   SPDX-License-Identifier: LGPL-2.0-or-later
5
6
7
8
9
*/

#ifndef GNUPGWKSFORMATTER_H_
#define GNUPGWKSFORMATTER_H_

10
#include <MessageViewer/MessagePartRendererBase>
11
12
13
14
15
#include <MimeTreeParser/BodyPartFormatter>

class GnuPGWKSMessagePart;
class GnuPGWKSMemento;

Laurent Montel's avatar
Laurent Montel committed
16
class ApplicationGnuPGWKSFormatter : public MimeTreeParser::Interface::BodyPartFormatter, public MessageViewer::MessagePartRendererBase
17
18
19
20
{
public:
    ApplicationGnuPGWKSFormatter() = default;

Volker Krause's avatar
Volker Krause committed
21
    MimeTreeParser::MessagePartPtr process(MimeTreeParser::Interface::BodyPart &part) const override;
22
    bool render(const MimeTreeParser::MessagePartPtr &msgPart, MessageViewer::HtmlWriter *htmlWriter, MessageViewer::RenderContext *context) const override;
23
24
25
26
27
28
29
30
31
32
33
34

private:
    enum WKSStatus {
        CheckingPublishing,
        NotPublished,
        Published
    };

    QString render(const GnuPGWKSMessagePart &mp, WKSStatus status) const;
};

#endif