// Copyright 2009 Simon Edwards <simon@simonzone.com>

//                 Generated by twine2

// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU Library General Public License as
// published by the Free Software Foundation; either version 2, or
// (at your option) any later version.

// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details

// You should have received a copy of the GNU Library General Public
// License along with this program; if not, write to the
// Free Software Foundation, Inc.,
// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.

namespace Akonadi
{
class AddressAttribute : Akonadi::Attribute
{
%TypeHeaderCode
#include <akonadi/kmime/addressattribute.h>
%End

public:
    explicit                AddressAttribute (const QString& from = QString(), const QStringList& to = QStringList(), const QStringList& cc = QStringList(), const QStringList& bcc = QStringList());
    virtual ~AddressAttribute ();
    virtual Akonadi::AddressAttribute*  clone () const;
    virtual QByteArray      type () const;
    virtual QByteArray      serialized () const;
    virtual void            deserialize (const QByteArray& data);
    QString                 from () const;
    void                    setFrom (const QString& from);
    QStringList             to () const;
    void                    setTo (const QStringList& to);
    QStringList             cc () const;
    void                    setCc (const QStringList& cc);
    QStringList             bcc () const;
    void                    setBcc (const QStringList& bcc);
%ConvertToSubClassCode
    // CTSCC for subclasses of 'Attribute'
    sipType = NULL;

    if (dynamic_cast<Akonadi::AddressAttribute*>(sipCpp))
        sipType = sipType_Akonadi_AddressAttribute;
    else if (dynamic_cast<Akonadi::CollectionQuotaAttribute*>(sipCpp))
        sipType = sipType_Akonadi_CollectionQuotaAttribute;
    else if (dynamic_cast<Akonadi::EntityDisplayAttribute*>(sipCpp))
        sipType = sipType_Akonadi_EntityDisplayAttribute;
    else if (dynamic_cast<Akonadi::EntityHiddenAttribute*>(sipCpp))
        sipType = sipType_Akonadi_EntityHiddenAttribute;
    else if (dynamic_cast<Akonadi::IndexPolicyAttribute*>(sipCpp))
        sipType = sipType_Akonadi_IndexPolicyAttribute;
    else if (dynamic_cast<Akonadi::MessageFolderAttribute*>(sipCpp))
        sipType = sipType_Akonadi_MessageFolderAttribute;
    else if (dynamic_cast<Akonadi::MessageThreadingAttribute*>(sipCpp))
        sipType = sipType_Akonadi_MessageThreadingAttribute;
    else if (dynamic_cast<Akonadi::PersistentSearchAttribute*>(sipCpp))
        sipType = sipType_Akonadi_PersistentSearchAttribute;
%End
private:
//force
    Akonadi::AddressAttribute&  operator = (const Akonadi::AddressAttribute&);
//end
};
};
%ModuleHeaderCode
//ctscc
#include <akonadi/kmime/addressattribute.h>
#include <akonadi/attribute.h>
#include <akonadi/collectionquotaattribute.h>
#include <akonadi/entitydisplayattribute.h>
#include <akonadi/entityhiddenattribute.h>
#include <akonadi/indexpolicyattribute.h>
#include <akonadi/kmime/messagefolderattribute.h>
#include <akonadi/kmime/messagethreadingattribute.h>
#include <akonadi/persistentsearchattribute.h>
%End
