Messagelib

bodypartformatter.h
1/* -*- mode: C++; c-file-style: "gnu" -*-
2 bodypartformatter.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
15#include <QSharedPointer>
16
17#include "mimetreeparser/objecttreeparser.h"
18
19namespace MimeTreeParser
20{
21class MessagePart;
22using MessagePartPtr = QSharedPointer<MessagePart>;
23
24namespace Interface
25{
26class BodyPart;
27/**
28 * @brief The BodyPartFormatter class
29 */
30class MIMETREEPARSER_EXPORT BodyPartFormatter
31{
32public:
33 virtual ~BodyPartFormatter();
34
35 virtual MimeTreeParser::MessagePartPtr process(BodyPart &part) const = 0;
36};
37
38/**
39 @short interface for BodyPartFormatter plugins
40
41 The interface is queried by for types, subtypes, and the
42 corresponding bodypart formatter, and the result inserted into
43 the bodypart formatter factory.
44
45 Subtype alone or both type and subtype may be "*", which is
46 taken as a wildcard, so that e.g. type=text subtype=* matches
47 any text subtype, but with lesser specificity than a concrete
48 mimetype such as text/plain. type=* is only allowed when
49 subtype=*, too.
50*/
51class MIMETREEPARSER_EXPORT BodyPartFormatterPlugin
52{
53public:
55
56 virtual const BodyPartFormatter *bodyPartFormatter(int idx) const = 0;
57};
58} // namespace Interface
59}
60
61Q_DECLARE_INTERFACE(MimeTreeParser::Interface::BodyPartFormatterPlugin, "org.kde.messageviewer.bodypartformatter/1.1")
interface for BodyPartFormatter plugins
interface of message body parts.
Definition bodypart.h:45
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:07:25 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.