MailTransport

sentactionattribute.h
1 /*
2  SPDX-FileCopyrightText: 2010 Klarälvdalens Datakonsult AB, a KDAB Group company, [email protected]
3  SPDX-FileContributor: Tobias Koenig <[email protected]>
4 
5  SPDX-License-Identifier: LGPL-2.0-or-later
6 */
7 
8 #ifndef MAILTRANSPORT_SENTACTIONATTRIBUTE_H
9 #define MAILTRANSPORT_SENTACTIONATTRIBUTE_H
10 
11 #include <mailtransportakonadi_export.h>
12 
13 #include <QSharedDataPointer>
14 #include <QVariant>
15 #include <QVector>
16 #include <attribute.h>
17 
18 namespace MailTransport {
28 class MAILTRANSPORTAKONADI_EXPORT SentActionAttribute : public Akonadi::Attribute
29 {
30 public:
34  class MAILTRANSPORTAKONADI_EXPORT Action
35  {
36  public:
40  enum Type {
43  MarkAsForwarded
44  };
45 
50 
54  Action();
55 
62  Action(Type type, const QVariant &value);
63 
67  Action(const Action &other);
68 
72  ~Action();
73 
77  Type type() const;
78 
82  QVariant value() const;
83 
87  Action &operator=(const Action &other);
88 
92  bool operator==(const Action &other) const;
93 
94  private:
95  //@cond PRIVATE
96  class Private;
98  //@endcond
99  };
100 
104  explicit SentActionAttribute();
105 
109  ~SentActionAttribute() override;
110 
117  void addAction(Action::Type type, const QVariant &value);
118 
122  Action::List actions() const;
123 
124  /* reimpl */
125  SentActionAttribute *clone() const override;
126  QByteArray type() const override;
127  QByteArray serialized() const override;
128  void deserialize(const QByteArray &data) override;
129 
130 private:
131  //@cond PRIVATE
132  class Private;
133  Private *const d;
134  //@endcond
135 };
136 }
137 Q_DECLARE_TYPEINFO(MailTransport::SentActionAttribute::Action, Q_MOVABLE_TYPE);
138 
139 #endif
QVector< Action > List
Describes a list of sent actions.
An Attribute that stores the action to execute after sending.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sun Jul 5 2020 23:18:36 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.