summaryrefslogtreecommitdiffstats
path: root/framework/src/domain/mime/objecttreesource.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'framework/src/domain/mime/objecttreesource.cpp')
-rw-r--r--framework/src/domain/mime/objecttreesource.cpp145
1 files changed, 0 insertions, 145 deletions
diff --git a/framework/src/domain/mime/objecttreesource.cpp b/framework/src/domain/mime/objecttreesource.cpp
deleted file mode 100644
index 2193e769..00000000
--- a/framework/src/domain/mime/objecttreesource.cpp
+++ /dev/null
@@ -1,145 +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#include "objecttreesource.h"
21
22#include <otp/attachmentstrategy.h>
23#include <otp/bodypartformatterbasefactory.h>
24#include <otp/messagepart.h>
25
26class ObjectSourcePrivate
27{
28public:
29 ObjectSourcePrivate()
30 : mWriter(0)
31 , mAllowDecryption(true)
32 , mHtmlLoadExternal(true)
33 , mPreferredMode(MimeTreeParser::Util::Html)
34 {
35
36 }
37 MimeTreeParser::HtmlWriter *mWriter;
38 MimeTreeParser::BodyPartFormatterBaseFactory mBodyPartFormatterBaseFactory;
39 bool mAllowDecryption;
40 bool mHtmlLoadExternal;
41 MimeTreeParser::Util::HtmlMode mPreferredMode;
42};
43
44ObjectTreeSource::ObjectTreeSource(MimeTreeParser::HtmlWriter *writer)
45 : MimeTreeParser::Interface::ObjectTreeSource()
46 , d(new ObjectSourcePrivate)
47 {
48 d->mWriter = writer;
49 }
50
51ObjectTreeSource::~ObjectTreeSource()
52{
53 delete d;
54}
55
56void ObjectTreeSource::setAllowDecryption(bool allowDecryption)
57{
58 d->mAllowDecryption = allowDecryption;
59}
60
61MimeTreeParser::HtmlWriter *ObjectTreeSource::htmlWriter()
62{
63 return d->mWriter;
64}
65
66bool ObjectTreeSource::htmlLoadExternal() const
67{
68 return d->mHtmlLoadExternal;
69}
70
71void ObjectTreeSource::setHtmlLoadExternal(bool loadExternal)
72{
73 d->mHtmlLoadExternal = loadExternal;
74}
75
76bool ObjectTreeSource::decryptMessage() const
77{
78 return d->mAllowDecryption;
79}
80
81bool ObjectTreeSource::showSignatureDetails() const
82{
83 return true;
84}
85
86int ObjectTreeSource::levelQuote() const
87{
88 return 1;
89}
90
91const QTextCodec *ObjectTreeSource::overrideCodec()
92{
93 return Q_NULLPTR;
94}
95
96QString ObjectTreeSource::createMessageHeader(KMime::Message *message)
97{
98 return QString();
99}
100
101const MimeTreeParser::AttachmentStrategy *ObjectTreeSource::attachmentStrategy()
102{
103 return MimeTreeParser::AttachmentStrategy::smart();
104}
105
106QObject *ObjectTreeSource::sourceObject()
107{
108 return Q_NULLPTR;
109}
110
111void ObjectTreeSource::setHtmlMode(MimeTreeParser::Util::HtmlMode mode, const QList<MimeTreeParser::Util::HtmlMode> &availableModes)
112{
113 Q_UNUSED(mode);
114 Q_UNUSED(availableModes);
115}
116
117MimeTreeParser::Util::HtmlMode ObjectTreeSource::preferredMode() const
118{
119 return d->mPreferredMode;
120}
121
122bool ObjectTreeSource::autoImportKeys() const
123{
124 return false;
125}
126
127bool ObjectTreeSource::showEmoticons() const
128{
129 return false;
130}
131
132bool ObjectTreeSource::showExpandQuotesMark() const
133{
134 return false;
135}
136
137bool ObjectTreeSource::isPrinting() const
138{
139 return false;
140}
141
142const MimeTreeParser::BodyPartFormatterBaseFactory *ObjectTreeSource::bodyPartFormatterFactory()
143{
144 return &(d->mBodyPartFormatterBaseFactory);
145}