Messagelib

objecttreesource.h
1/*
2 SPDX-FileCopyrightText: 2009 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.net
3 SPDX-FileCopyrightText: 2009 Andras Mantia <andras@kdab.net>
4
5 SPDX-License-Identifier: GPL-2.0-or-later
6*/
7
8#pragma once
9
10#include "mimetreeparser_export.h"
11#include <MimeTreeParser/Util>
12
13#include <KMime/Message>
14#include <QSharedPointer>
15#include <QStringDecoder>
16
17namespace MimeTreeParser
18{
19class BodyPartFormatterFactory;
20class MessagePart;
21using MessagePartPtr = QSharedPointer<MessagePart>;
22}
23
24namespace MimeTreeParser
25{
26namespace Interface
27{
28/**
29 * Interface for object tree sources.
30 * @author Andras Mantia <amantia@kdab.net>
31 */
32class MIMETREEPARSER_EXPORT ObjectTreeSource
33{
34public:
36 virtual ~ObjectTreeSource();
37
38 /**
39 * Sets the type of mail that is currently displayed. Applications can display this
40 * information to the user, for example KMail displays a HTML status bar.
41 * Note: This is not called when the mode is "Normal".
42 */
44
45 /** Return the mode that is the preferred to display */
47
48 /** Return true if an encrypted mail should be decrypted */
49 [[nodiscard]] virtual bool decryptMessage() const = 0;
50
51 /** The override codec that should be used for the mail */
52 [[nodiscard]] virtual QByteArray overrideCodecName() const = 0;
53
54 /** should keys be imported automatically **/
55 [[nodiscard]] virtual bool autoImportKeys() const = 0;
56
57 virtual const BodyPartFormatterFactory *bodyPartFormatterFactory() = 0;
58
59private:
60 Q_DISABLE_COPY(ObjectTreeSource)
61};
62}
63}
The place to obtain BodyPartFormatter candidates for a given mime type.
Interface for object tree sources.
virtual bool autoImportKeys() const =0
should keys be imported automatically
virtual MimeTreeParser::Util::HtmlMode preferredMode() const =0
Return the mode that is the preferred to display.
virtual bool decryptMessage() const =0
Return true if an encrypted mail should be decrypted.
virtual QByteArray overrideCodecName() const =0
The override codec that should be used for the mail.
virtual void setHtmlMode(MimeTreeParser::Util::HtmlMode mode, const QList< MimeTreeParser::Util::HtmlMode > &availableModes)=0
Sets the type of mail that is currently displayed.
HtmlMode
Describes the type of the displayed message.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:07:25 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.