addressattribute.h
00001 /* 00002 Copyright 2009 Constantin Berzan <exit3219@gmail.com> 00003 00004 This library is free software; you can redistribute it and/or modify it 00005 under the terms of the GNU Library General Public License as published by 00006 the Free Software Foundation; either version 2 of the License, or (at your 00007 option) any later version. 00008 00009 This library is distributed in the hope that it will be useful, but WITHOUT 00010 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00011 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public 00012 License for more details. 00013 00014 You should have received a copy of the GNU Library General Public License 00015 along with this library; see the file COPYING.LIB. If not, write to the 00016 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 00017 02110-1301, USA. 00018 */ 00019 00020 #ifndef AKONADI_ADDRESSATTRIBUTE_H 00021 #define AKONADI_ADDRESSATTRIBUTE_H 00022 00023 #include "akonadi-kmime_export.h" 00024 00025 #include <QtCore/QString> 00026 #include <QtCore/QStringList> 00027 00028 #include <akonadi/attribute.h> 00029 00030 namespace MailTransport { 00031 class Transport; 00032 } 00033 00034 namespace Akonadi { 00035 00042 class AKONADI_KMIME_EXPORT AddressAttribute : public Akonadi::Attribute 00043 { 00044 public: 00048 explicit AddressAttribute( const QString &from = QString(), 00049 const QStringList &to = QStringList(), 00050 const QStringList &cc = QStringList(), 00051 const QStringList &bcc = QStringList() ); 00055 virtual ~AddressAttribute(); 00056 00057 00058 /* reimpl */ 00059 virtual AddressAttribute* clone() const; 00060 virtual QByteArray type() const; 00061 virtual QByteArray serialized() const; 00062 virtual void deserialize( const QByteArray &data ); 00063 00067 QString from() const; 00068 00072 void setFrom( const QString &from ); 00073 00077 QStringList to() const; 00078 00082 void setTo( const QStringList &to ); 00083 00087 QStringList cc() const; 00088 00092 void setCc( const QStringList &cc ); 00093 00097 QStringList bcc() const; 00098 00102 void setBcc( const QStringList &bcc ); 00103 00104 private: 00105 class Private; 00106 Private *const d; 00107 00108 }; 00109 00110 } // namespace Akonadi 00111 00112 #endif // AKONADI_ADDRESSATTRIBUTE_H