summaryrefslogtreecommitdiffstats
path: root/framework/src/domain/mime/mimetreeparser/otp/objecttreesource.h
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2017-05-29 16:17:04 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2017-06-04 12:57:04 +0200
commite452707fdfbd61be1e5633b516b653b7337e7865 (patch)
tree1e1d4b48ebf8d381f292436f2ba04b8763edc5de /framework/src/domain/mime/mimetreeparser/otp/objecttreesource.h
parent5a1033bdace740799a6e03389bee30e5a4de5d44 (diff)
downloadkube-e452707fdfbd61be1e5633b516b653b7337e7865.tar.gz
kube-e452707fdfbd61be1e5633b516b653b7337e7865.zip
Reduced the messagetreeparser to aproximately what we actually require
While in a much more managable state it's still not pretty. However, further refactoring can now gradually happen as we need to do further work on it. Things that should happen eventually: * Simplify the logic that creates the messageparts (we don't need the whole formatter plugin complexity) * Get rid of the nodehelper (let the parts hold the necessary data) * Get rid of partmetadata (let the part handleit)
Diffstat (limited to 'framework/src/domain/mime/mimetreeparser/otp/objecttreesource.h')
-rw-r--r--framework/src/domain/mime/mimetreeparser/otp/objecttreesource.h105
1 files changed, 0 insertions, 105 deletions
diff --git a/framework/src/domain/mime/mimetreeparser/otp/objecttreesource.h b/framework/src/domain/mime/mimetreeparser/otp/objecttreesource.h
deleted file mode 100644
index a9e5ddf9..00000000
--- a/framework/src/domain/mime/mimetreeparser/otp/objecttreesource.h
+++ /dev/null
@@ -1,105 +0,0 @@
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;
39}
40}
41
42namespace MimeTreeParser
43{
44namespace Interface
45{
46
47/**
48 * Interface for object tree sources.
49 * @author Andras Mantia <amantia@kdab.net>
50 */
51class ObjectTreeSource
52{
53
54public:
55 virtual ~ObjectTreeSource();
56
57 /**
58 * Sets the type of mail that is currently displayed. Applications can display this
59 * information to the user, for example KMail displays a HTML status bar.
60 * Note: This is not called when the mode is "Normal".
61 */
62 virtual void setHtmlMode(MimeTreeParser::Util::HtmlMode mode, const QList<MimeTreeParser::Util::HtmlMode> &availableModes) = 0;
63
64 /** Return the mode that is the preferred to display */
65 virtual MimeTreeParser::Util::HtmlMode preferredMode() const = 0;
66
67 /** Return true if an encrypted mail should be decrypted */
68 virtual bool decryptMessage() const = 0;
69
70 /** Return true if external sources should be loaded in a html mail */
71 virtual bool htmlLoadExternal() const = 0;
72
73 /** Return true to include the signature details in the generated html */
74 virtual bool showSignatureDetails() const = 0;
75
76 virtual int levelQuote() const = 0;
77
78 /** The override codec that should be used for the mail */
79 virtual const QTextCodec *overrideCodec() = 0;
80
81 virtual QString createMessageHeader(KMime::Message *message) = 0;
82
83 /** Return the wanted attachment startegy */
84 virtual const AttachmentStrategy *attachmentStrategy() = 0;
85
86 /** Return the html write object */
87 virtual HtmlWriter *htmlWriter() = 0;
88
89 /** The source object behind the interface. */
90 virtual QObject *sourceObject() = 0;
91
92 /** should keys be imported automatically **/
93 virtual bool autoImportKeys() const = 0;
94
95 virtual bool showEmoticons() const = 0;
96
97 virtual bool showExpandQuotesMark() const = 0;
98
99 virtual const BodyPartFormatterBaseFactory *bodyPartFormatterFactory() = 0;
100
101 virtual bool isPrinting() const = 0;
102};
103}
104}
105#endif