summaryrefslogtreecommitdiffstats
path: root/framework/src/domain/mimetreeparser/otp/objecttreesource.h
diff options
context:
space:
mode:
Diffstat (limited to 'framework/src/domain/mimetreeparser/otp/objecttreesource.h')
-rw-r--r--framework/src/domain/mimetreeparser/otp/objecttreesource.h109
1 files changed, 109 insertions, 0 deletions
diff --git a/framework/src/domain/mimetreeparser/otp/objecttreesource.h b/framework/src/domain/mimetreeparser/otp/objecttreesource.h
new file mode 100644
index 00000000..afada4c4
--- /dev/null
+++ b/framework/src/domain/mimetreeparser/otp/objecttreesource.h
@@ -0,0 +1,109 @@
1/*
2 Copyright (C) 2009 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.net
3 Copyright (c) 2009 Andras Mantia <andras@kdab.net>
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License along
16 with this program; if not, write to the Free Software Foundation, Inc.,
17 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18*/
19
20#ifndef __MIMETREEPARSER_OBJECTTREESOURCE_IF_H__
21#define __MIMETREEPARSER_OBJECTTREESOURCE_IF_H__
22
23#include "util.h"
24
25#include <KMime/Message>
26
27#include <QSharedPointer>
28class QTextCodec;
29
30namespace MimeTreeParser
31{
32class HtmlWriter;
33class AttachmentStrategy;
34class BodyPartFormatterBaseFactory;
35namespace Interface
36{
37class MessagePart;
38typedef QSharedPointer<MessagePart> MessagePartPtr;
39class MessagePartRenderer;
40typedef QSharedPointer<MessagePartRenderer> MessagePartRendererPtr;
41}
42}
43
44namespace MimeTreeParser
45{
46namespace Interface
47{
48
49/**
50 * Interface for object tree sources.
51 * @author Andras Mantia <amantia@kdab.net>
52 */
53class ObjectTreeSource
54{
55
56public:
57 virtual ~ObjectTreeSource();
58
59 /**
60 * Sets the type of mail that is currently displayed. Applications can display this
61 * information to the user, for example KMail displays a HTML status bar.
62 * Note: This is not called when the mode is "Normal".
63 */
64 virtual void setHtmlMode(MimeTreeParser::Util::HtmlMode mode, const QList<MimeTreeParser::Util::HtmlMode> &availableModes) = 0;
65
66 /** Return the mode that is the preferred to display */
67 virtual MimeTreeParser::Util::HtmlMode preferredMode() const = 0;
68
69 /** Return true if an encrypted mail should be decrypted */
70 virtual bool decryptMessage() const = 0;
71
72 /** Return true if external sources should be loaded in a html mail */
73 virtual bool htmlLoadExternal() const = 0;
74
75 /** Return true to include the signature details in the generated html */
76 virtual bool showSignatureDetails() const = 0;
77
78 virtual int levelQuote() const = 0;
79
80 /** The override codec that should be used for the mail */
81 virtual const QTextCodec *overrideCodec() = 0;
82
83 virtual QString createMessageHeader(KMime::Message *message) = 0;
84
85 /** Return the wanted attachment startegy */
86 virtual const AttachmentStrategy *attachmentStrategy() = 0;
87
88 /** Return the html write object */
89 virtual HtmlWriter *htmlWriter() = 0;
90
91 /** The source object behind the interface. */
92 virtual QObject *sourceObject() = 0;
93
94 /** should keys be imported automatically **/
95 virtual bool autoImportKeys() const = 0;
96
97 virtual bool showEmoticons() const = 0;
98
99 virtual bool showExpandQuotesMark() const = 0;
100
101 virtual const BodyPartFormatterBaseFactory *bodyPartFormatterFactory() = 0;
102
103 virtual MessagePartRendererPtr messagePartTheme(MessagePartPtr msgPart) = 0;
104
105 virtual bool isPrinting() const = 0;
106};
107}
108}
109#endif