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 "mimetreeparser_debug.h"
13 #include "nodehelper.h"
14 #include "objecttreeparser.h"
15 #include <KMime/Content>
16 
17 using namespace MimeTreeParser;
18 
19 PartNodeBodyPart::PartNodeBodyPart(ObjectTreeParser *otp,
20  ProcessResult *result,
21  KMime::Content *topLevelContent,
22  KMime::Content *content,
23  NodeHelper *nodeHelper)
24  : Interface::BodyPart()
25  , mTopLevelContent(topLevelContent)
26  , mContent(content)
27  , mNodeHelper(nodeHelper)
28  , mObjectTreeParser(otp)
29  , mProcessResult(result)
30 {
31 }
32 
33 Interface::BodyPartMemento *PartNodeBodyPart::memento() const
34 {
35  /*TODO(Andras) Volker suggests to use a ContentIndex->Mememnto mapping
36  Also review if the reader's bodyPartMemento should be returned or the NodeHelper's one
37  */
38  return mNodeHelper->bodyPartMemento(mContent, "__plugin__");
39 }
40 
41 Interface::ObjectTreeSource *PartNodeBodyPart::source() const
42 {
43  return mObjectTreeParser->mSource;
44 }
45 
46 KMime::Content *PartNodeBodyPart::content() const
47 {
48  return mContent;
49 }
50 
51 KMime::Content *PartNodeBodyPart::topLevelContent() const
52 {
53  return mTopLevelContent;
54 }
55 
56 NodeHelper *PartNodeBodyPart::nodeHelper() const
57 {
58  return mNodeHelper;
59 }
60 
61 ObjectTreeParser *PartNodeBodyPart::objectTreeParser() const
62 {
63  return mObjectTreeParser;
64 }
65 
66 ProcessResult *PartNodeBodyPart::processResult() const
67 {
68  return mProcessResult;
69 }
Interface for object tree sources.
interface of classes that implement status for BodyPartFormatters.
Definition: bodypart.h:33
Parses messages and generates HTML display code out of them.
The ProcessResult class.
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Thu Dec 2 2021 23:06:09 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.