mailtransport
sentactionattribute.h
00001 /* 00002 Copyright (C) 2010 Klarälvdalens Datakonsult AB, 00003 a KDAB Group company, info@kdab.net, 00004 author Tobias Koenig <tokoe@kdab.com> 00005 00006 This library is free software; you can redistribute it and/or modify it 00007 under the terms of the GNU Library General Public License as published by 00008 the Free Software Foundation; either version 2 of the License, or (at your 00009 option) any later version. 00010 00011 This library is distributed in the hope that it will be useful, but WITHOUT 00012 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00013 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public 00014 License for more details. 00015 00016 You should have received a copy of the GNU Library General Public License 00017 along with this library; see the file COPYING.LIB. If not, write to the 00018 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 00019 02110-1301, USA. 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 MAILTRANSPORT_EXPORT Action 00050 { 00051 public: 00055 enum Type { 00056 Invalid, 00057 MarkAsReplied, 00058 MarkAsForwarded 00059 }; 00060 00064 typedef QList<Action> List; 00065 00069 Action(); 00070 00077 Action( Type type, const QVariant &value ); 00078 00082 Action( const Action &other ); 00083 00087 ~Action(); 00088 00092 Type type() const; 00093 00097 QVariant value() const; 00098 00102 Action &operator=( const Action &other ); 00103 00107 bool operator==( const Action &other ) const; 00108 00109 private: 00110 //@cond PRIVATE 00111 class Private; 00112 QSharedDataPointer<Private> d; 00113 //@endcond 00114 }; 00115 00119 explicit SentActionAttribute(); 00120 00124 virtual ~SentActionAttribute(); 00125 00132 void addAction( Action::Type type, const QVariant &value ); 00133 00137 Action::List actions() const; 00138 00139 /* reimpl */ 00140 virtual SentActionAttribute *clone() const; 00141 virtual QByteArray type() const; 00142 virtual QByteArray serialized() const; 00143 virtual void deserialize( const QByteArray &data ); 00144 00145 private: 00146 //@cond PRIVATE 00147 class Private; 00148 Private *const d; 00149 //@endcond 00150 }; 00151 00152 } 00153 00154 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Mon Apr 30 2012 21:49:03 by doxygen 1.8.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2012 The KDE developers.
Generated on Mon Apr 30 2012 21:49:03 by doxygen 1.8.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.