mailtransport
20 #include "sentbehaviourattribute.h"
22 #include <QDataStream>
26 using namespace Akonadi;
27 using namespace MailTransport;
29 class SentBehaviourAttribute::Private
32 SentBehaviour mBehaviour;
33 Akonadi::Collection mMoveToCollection;
36 SentBehaviourAttribute::SentBehaviourAttribute(
SentBehaviour beh, Collection moveToCollection )
53 QByteArray SentBehaviourAttribute::type()
const
55 static const QByteArray sType(
"SentBehaviourAttribute" );
59 QByteArray SentBehaviourAttribute::serialized()
const
61 switch ( d->mBehaviour ) {
62 case Delete:
return "delete";
63 case MoveToCollection:
return "moveTo" + QByteArray::number( d->mMoveToCollection.id() );
71 void SentBehaviourAttribute::deserialize(
const QByteArray &data )
73 d->mMoveToCollection = Akonadi::Collection( -1 );
74 if ( data ==
"delete" ) {
76 }
else if ( data ==
"moveToDefault" ) {
78 }
else if ( data.startsWith( QByteArray(
"moveTo" ) ) ) {
80 d->mMoveToCollection = Akonadi::Collection( data.mid( 6 ).toLongLong() );
99 return d->mMoveToCollection;
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Sat Jul 13 2013 01:26:52 by
doxygen 1.8.3.1 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.