Messagelib

partnodebodypart.cpp
1 /*
2  partnodebodypart.cpp
3 
4  This file is part of KMail, the KDE mail client.
5  SPDX-FileCopyrightText: 2004 Marc Mutz <[email protected]>
6  SPDX-FileCopyrightText: 2004 Ingo Kloecker <[email protected]>
7 
8  SPDX-License-Identifier: GPL-2.0-or-later
9 */
10 
11 #include "partnodebodypart.h"
12 #include "nodehelper.h"
13 #include "objecttreeparser.h"
14 #include <KMime/Content>
15 
16 using namespace MimeTreeParser;
17 
18 PartNodeBodyPart::PartNodeBodyPart(ObjectTreeParser *otp,
19  ProcessResult *result,
20  KMime::Content *topLevelContent,
21  KMime::Content *content,
22  NodeHelper *nodeHelper)
23  : Interface::BodyPart()
24  , mTopLevelContent(topLevelContent)
25  , mContent(content)
26  , mNodeHelper(nodeHelper)
27  , mObjectTreeParser(otp)
28  , mProcessResult(result)
29 {
30 }
31 
32 Interface::BodyPartMemento *PartNodeBodyPart::memento() const
33 {
34  /*TODO(Andras) Volker suggests to use a ContentIndex->Mememnto mapping
35  Also review if the reader's bodyPartMemento should be returned or the NodeHelper's one
36  */
37  return mNodeHelper->bodyPartMemento(mContent, "__plugin__");
38 }
39 
40 Interface::ObjectTreeSource *PartNodeBodyPart::source() const
41 {
42  return mObjectTreeParser->mSource;
43 }
44 
45 KMime::Content *PartNodeBodyPart::content() const
46 {
47  return mContent;
48 }
49 
50 KMime::Content *PartNodeBodyPart::topLevelContent() const
51 {
52  return mTopLevelContent;
53 }
54 
55 NodeHelper *PartNodeBodyPart::nodeHelper() const
56 {
57  return mNodeHelper;
58 }
59 
60 ObjectTreeParser *PartNodeBodyPart::objectTreeParser() const
61 {
62  return mObjectTreeParser;
63 }
64 
65 ProcessResult *PartNodeBodyPart::processResult() const
66 {
67  return mProcessResult;
68 }
The ProcessResult class.
Parses messages and generates HTML display code out of them.
Interface for object tree sources.
interface of classes that implement status for BodyPartFormatters.
Definition: bodypart.h:33
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Thu Sep 21 2023 03:56:19 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.