Messagelib

texthtml.cpp
1/*
2 SPDX-FileCopyrightText: 2016 Sandro Knauß <sknauss@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#include "texthtml.h"
8
9#include "messagepart.h"
10#include "objecttreeparser.h"
11
12#include <KMime/Content>
13
14using namespace MimeTreeParser;
15
16const TextHtmlBodyPartFormatter *TextHtmlBodyPartFormatter::self;
17
18const Interface::BodyPartFormatter *TextHtmlBodyPartFormatter::create()
19{
20 if (!self) {
21 self = new TextHtmlBodyPartFormatter();
22 }
23 return self;
24}
25
26MessagePart::Ptr TextHtmlBodyPartFormatter::process(Interface::BodyPart &part) const
27{
28 KMime::Content *node = part.content();
29 HtmlMessagePart::Ptr mp(new HtmlMessagePart(part.objectTreeParser(), node, part.source()));
30 return mp;
31}
interface of message body parts.
Definition bodypart.h:45
virtual MimeTreeParser::ObjectTreeParser * objectTreeParser() const =0
For making it easier to refactor, add objectTreeParser.
virtual KMime::Content * content() const =0
Returns the KMime::Content node represented here.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:59:13 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.