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 class QTextCodec;
16 
17 namespace MimeTreeParser
18 {
19 class BodyPartFormatterFactory;
20 class MessagePart;
21 typedef QSharedPointer<MessagePart> MessagePartPtr;
22 }
23 
24 namespace MimeTreeParser
25 {
26 namespace Interface
27 {
28 /**
29  * Interface for object tree sources.
30  * @author Andras Mantia <[email protected]>
31  */
32 class MIMETREEPARSER_EXPORT ObjectTreeSource
33 {
34 public:
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  */
43  virtual void setHtmlMode(MimeTreeParser::Util::HtmlMode mode, const QList<MimeTreeParser::Util::HtmlMode> &availableModes) = 0;
44 
45  /** Return the mode that is the preferred to display */
46  virtual MimeTreeParser::Util::HtmlMode preferredMode() const = 0;
47 
48  /** Return true if an encrypted mail should be decrypted */
49  virtual bool decryptMessage() const = 0;
50 
51  /** The override codec that should be used for the mail */
52  virtual const QTextCodec *overrideCodec() = 0;
53 
54  /** should keys be imported automatically **/
55  virtual bool autoImportKeys() const = 0;
56 
57  virtual const BodyPartFormatterFactory *bodyPartFormatterFactory() = 0;
58 
59 private:
60  Q_DISABLE_COPY(ObjectTreeSource)
61 };
62 }
63 }
HtmlMode
Describes the type of the displayed message.
The place to obtain BodyPartFormatter candidates for a given mime type.
Interface for object tree sources.
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Fri Apr 9 2021 23:13:54 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.