Messagelib

objecttreesource.h
1 /*
2  SPDX-FileCopyrightText: 2009 Klarälvdalens Datakonsult AB, a KDAB Group company, [email protected]
3  SPDX-FileCopyrightText: 2009 Andras Mantia <[email protected]>
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 class QTextCodec;
17 
18 namespace MimeTreeParser
19 {
20 class BodyPartFormatterFactory;
21 class MessagePart;
22 using MessagePartPtr = QSharedPointer<MessagePart>;
23 }
24 
25 namespace MimeTreeParser
26 {
27 namespace Interface
28 {
29 /**
30  * Interface for object tree sources.
31  * @author Andras Mantia <[email protected]>
32  */
33 class MIMETREEPARSER_EXPORT ObjectTreeSource
34 {
35 public:
37  virtual ~ObjectTreeSource();
38 
39  /**
40  * Sets the type of mail that is currently displayed. Applications can display this
41  * information to the user, for example KMail displays a HTML status bar.
42  * Note: This is not called when the mode is "Normal".
43  */
44  virtual void setHtmlMode(MimeTreeParser::Util::HtmlMode mode, const QList<MimeTreeParser::Util::HtmlMode> &availableModes) = 0;
45 
46  /** Return the mode that is the preferred to display */
47  virtual MimeTreeParser::Util::HtmlMode preferredMode() const = 0;
48 
49  /** Return true if an encrypted mail should be decrypted */
50  virtual bool decryptMessage() const = 0;
51 
52  /** The override codec that should be used for the mail */
53  virtual const QTextCodec *overrideCodec() = 0;
54 
55  /** should keys be imported automatically **/
56  virtual bool autoImportKeys() const = 0;
57 
58  virtual const BodyPartFormatterFactory *bodyPartFormatterFactory() = 0;
59 
60  virtual const QStringDecoder *overrideDecoderCodec() = 0;
61 
62 private:
63  Q_DISABLE_COPY(ObjectTreeSource)
64 };
65 }
66 }
Interface for object tree sources.
HtmlMode
Describes the type of the displayed message.
The place to obtain BodyPartFormatter candidates for a given mime type.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sat Sep 30 2023 03:53:39 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.