Messagelib

attachmentstrategy.h
1/* -*- c++ -*-
2 attachmentstrategy.h
3
4 This file is part of KMail, the KDE mail client.
5 SPDX-FileCopyrightText: 2003 Marc Mutz <mutz@kde.org>
6 SPDX-FileCopyrightText: 2009 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.net
7 SPDX-FileCopyrightText: 2009 Andras Mantia <andras@kdab.net>
8
9 SPDX-License-Identifier: GPL-2.0-or-later
10*/
11
12#pragma once
13
14#include "messageviewer_export.h"
15
16class QString;
17namespace KMime
18{
19class Content;
20}
21
22namespace MessageViewer
23{
24/**
25 * @brief The AttachmentStrategy class
26 */
27class MESSAGEVIEWER_EXPORT AttachmentStrategy
28{
29protected:
31 virtual ~AttachmentStrategy();
32
33public:
34 //
35 // Factory methods:
36 //
37 enum Type {
38 Iconic,
39 Smart,
40 Inlined,
41 Hidden,
42 HeaderOnly
43 };
44
45 static const AttachmentStrategy *create(Type type);
46 static const AttachmentStrategy *create(const QString &type);
47
48 static const AttachmentStrategy *iconic();
49 static const AttachmentStrategy *smart();
50 static const AttachmentStrategy *inlined();
51 static const AttachmentStrategy *hidden();
52 static const AttachmentStrategy *headerOnly();
53
54 //
55 // Navigation methods:
56 //
57
58 virtual const char *name() const = 0;
59
60 //
61 // Behavioral:
62 //
63
64 enum Display {
65 None,
66 AsIcon,
67 Inline,
68 };
69
70 virtual bool inlineNestedMessages() const = 0;
71 virtual Display defaultDisplay(KMime::Content *node) const = 0;
72 virtual bool requiresAttachmentListInHeader() const;
73};
74}
The AttachmentStrategy class.
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.