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 <[email protected]>
6  SPDX-FileCopyrightText: 2004 Ingo Kloecker <[email protected]>
7 
8  SPDX-License-Identifier: GPL-2.0-or-later
9 */
10 
11 #pragma once
12 
13 #include "mimetreeparser_export.h"
14 
15 namespace KMime
16 {
17 class Content;
18 }
19 
20 namespace MimeTreeParser
21 {
22 class NodeHelper;
23 class ObjectTreeParser;
24 class ProcessResult;
25 
26 namespace Interface
27 {
28 class ObjectTreeSource;
29 
30 /**
31  @short interface of classes that implement status for BodyPartFormatters.
32 */
33 class MIMETREEPARSER_EXPORT BodyPartMemento
34 {
35 public:
36  virtual ~BodyPartMemento();
37 
38  virtual void detach() = 0;
39 };
40 
41 /**
42  @short interface of message body parts.
43 */
44 class MIMETREEPARSER_EXPORT BodyPart
45 {
46 public:
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  */
73  virtual MimeTreeParser::NodeHelper *nodeHelper() const = 0;
74 
75  /**
76  * For making it easier to refactor, add objectTreeParser
77  */
78  virtual MimeTreeParser::ObjectTreeParser *objectTreeParser() const = 0;
79  virtual MimeTreeParser::Interface::ObjectTreeSource *source() const = 0;
80  virtual MimeTreeParser::ProcessResult *processResult() const = 0;
81 };
82 } // namespace Interface
83 }
The ProcessResult class.
Parses messages and generates HTML display code out of them.
Interface for object tree sources.
interface of message body parts.
Definition: bodypart.h:44
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 Nov 30 2023 03:56:25 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.