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 { Iconic, Smart, Inlined, Hidden, HeaderOnly };
38
39 static const AttachmentStrategy *create(Type type);
40 static const AttachmentStrategy *create(const QString &type);
41
42 static const AttachmentStrategy *iconic();
43 static const AttachmentStrategy *smart();
44 static const AttachmentStrategy *inlined();
45 static const AttachmentStrategy *hidden();
46 static const AttachmentStrategy *headerOnly();
47
48 //
49 // Navigation methods:
50 //
51
52 virtual const char *name() const = 0;
53
54 //
55 // Behavioral:
56 //
57
58 enum Display {
59 None,
60 AsIcon,
61 Inline,
62 };
63
64 virtual bool inlineNestedMessages() const = 0;
65 virtual Display defaultDisplay(KMime::Content *node) const = 0;
66 virtual bool requiresAttachmentListInHeader() const;
67};
68}
The AttachmentStrategy class.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Jul 19 2024 11:56:57 by doxygen 1.11.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.