00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef MAILTRANSPORT_SENTACTIONATTRIBUTE_H
00023 #define MAILTRANSPORT_SENTACTIONATTRIBUTE_H
00024
00025 #include <mailtransport/mailtransport_export.h>
00026
00027 #include <QtCore/QSharedDataPointer>
00028 #include <QtCore/QVariant>
00029
00030 #include <akonadi/attribute.h>
00031
00032 namespace MailTransport {
00033
00043 class MAILTRANSPORT_EXPORT SentActionAttribute : public Akonadi::Attribute
00044 {
00045 public:
00049 class Action
00050 {
00051 public:
00055 enum Type
00056 {
00057 Invalid,
00058 MarkAsReplied,
00059 MarkAsForwarded
00060 };
00061
00065 typedef QList<Action> List;
00066
00070 Action();
00071
00078 Action( Type type, const QVariant &value );
00079
00083 Action( const Action &other );
00084
00088 ~Action();
00089
00093 Type type() const;
00094
00098 QVariant value() const;
00099
00103 Action& operator=( const Action &other );
00104
00108 bool operator==( const Action &other ) const;
00109
00110 private:
00111
00112 class Private;
00113 QSharedDataPointer<Private> d;
00114
00115 };
00116
00120 explicit SentActionAttribute();
00121
00125 virtual ~SentActionAttribute();
00126
00133 void addAction( Action::Type type, const QVariant &value );
00134
00138 Action::List actions() const;
00139
00140
00141 virtual SentActionAttribute *clone() const;
00142 virtual QByteArray type() const;
00143 virtual QByteArray serialized() const;
00144 virtual void deserialize( const QByteArray &data );
00145
00146 private:
00147
00148 class Private;
00149 Private *const d;
00150
00151 };
00152
00153 }
00154
00155 #endif