Messagelib

bodypart.h
1/* -*- mode: C++; c-file-style: "gnu" -*-
2 bodypart.h
3
4 This file is part of KMail's plugin interface.
5 SPDX-FileCopyrightText: 2004 Marc Mutz <mutz@kde.org>
6 SPDX-FileCopyrightText: 2004 Ingo Kloecker <kloecker@kde.org>
7
8 SPDX-License-Identifier: GPL-2.0-or-later
9*/
10
11#pragma once
12
13#include "mimetreeparser_export.h"
14
15namespace KMime
16{
17class Content;
18}
19
20namespace MimeTreeParser
21{
22class NodeHelper;
23class ObjectTreeParser;
24class ProcessResult;
25
26namespace Interface
27{
28class ObjectTreeSource;
29
30/**
31 @short interface of classes that implement status for BodyPartFormatters.
32*/
33class MIMETREEPARSER_EXPORT BodyPartMemento
34{
35public:
36 virtual ~BodyPartMemento();
37
38 virtual void detach() = 0;
39};
40
41/**
42 @short interface of message body parts.
43*/
44class MIMETREEPARSER_EXPORT BodyPart
45{
46public:
47 virtual ~BodyPart();
48
49 /**
50 @return the BodyPartMemento set for this part, or null, if
51 none is set.
52 */
53 virtual BodyPartMemento *memento() const = 0;
54
55 /** Returns the KMime::Content node represented here. Makes most of the above obsolete
56 and probably should be used in the interfaces in the first place.
57 */
58 virtual KMime::Content *content() const = 0;
59
60 /**
61 * Returns the top-level content.
62 * Note that this is _not_ necessarily the same as content()->topLevel(), for example the later
63 * will not work for "extra nodes", i.e. nodes in encrypted parts of the mail.
64 * topLevelContent() will return the correct result in this case. Also note that
65 * topLevelContent()
66 */
67 virtual KMime::Content *topLevelContent() const = 0;
68
69 /**
70 * Ok, this is ugly, exposing the node helper here, but there is too much useful stuff in there
71 * for real-world plugins. Still, there should be a nicer way for this.
72 */
74
75 /**
76 * For making it easier to refactor, add objectTreeParser
77 */
79 virtual MimeTreeParser::Interface::ObjectTreeSource *source() const = 0;
80 virtual MimeTreeParser::ProcessResult *processResult() const = 0;
81};
82} // namespace Interface
83}
interface of classes that implement status for BodyPartFormatters.
Definition bodypart.h:34
interface of message body parts.
Definition bodypart.h:45
virtual KMime::Content * topLevelContent() const =0
Returns the top-level content.
virtual MimeTreeParser::ObjectTreeParser * objectTreeParser() const =0
For making it easier to refactor, add objectTreeParser.
virtual BodyPartMemento * memento() const =0
virtual MimeTreeParser::NodeHelper * nodeHelper() const =0
Ok, this is ugly, exposing the node helper here, but there is too much useful stuff in there for real...
virtual KMime::Content * content() const =0
Returns the KMime::Content node represented here.
Interface for object tree sources.
Parses messages and generates HTML display code out of them.
The ProcessResult class.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:33:26 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.