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 <[email protected]>
6  SPDX-FileCopyrightText: 2009 Klarälvdalens Datakonsult AB, a KDAB Group company, [email protected]
7  SPDX-FileCopyrightText: 2009 Andras Mantia <[email protected]>
8 
9  SPDX-License-Identifier: GPL-2.0-or-later
10 */
11 
12 #pragma once
13 
14 #include "messageviewer_export.h"
15 
16 class QString;
17 namespace KMime
18 {
19 class Content;
20 }
21 
22 namespace MessageViewer
23 {
24 /**
25  * @brief The AttachmentStrategy class
26  */
27 class MESSAGEVIEWER_EXPORT AttachmentStrategy
28 {
29 protected:
31  virtual ~AttachmentStrategy();
32 
33 public:
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-2023 The KDE developers.
Generated on Sat Dec 2 2023 03:56:52 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.