• Skip to content
  • Skip to link menu
KDE 4.4 API Reference
  • KDE API Reference
  • KDE-PIM Libraries
  • Sitemap
  • Contact Us
 

akonadi/kmime

messagefolderattribute.cpp

00001 /*
00002     Copyright (c) 2009 Kevin Ottens <ervin@kde.org>
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 #include "messagefolderattribute.h"
00021 
00022 using namespace Akonadi;
00023 
00024 class Akonadi::MessageFolderAttribute::Private
00025 {
00026   public:
00027     Private()
00028       : isOutboundFolder( false ) { }
00029 
00030     bool isOutboundFolder;
00031 };
00032 
00033 MessageFolderAttribute::MessageFolderAttribute() :
00034     d( new Private )
00035 {
00036 }
00037 
00038 MessageFolderAttribute::MessageFolderAttribute(const MessageFolderAttribute & other) :
00039     Attribute( other ),
00040     d( new Private( *(other.d) ) )
00041 {
00042 }
00043 
00044 MessageFolderAttribute::~MessageFolderAttribute()
00045 {
00046   delete d;
00047 }
00048 
00049 QByteArray MessageFolderAttribute::type() const
00050 {
00051   return "MESSAGEFOLDER";
00052 }
00053 
00054 MessageFolderAttribute * MessageFolderAttribute::clone() const
00055 {
00056   return new MessageFolderAttribute( *this );
00057 }
00058 
00059 QByteArray MessageFolderAttribute::serialized() const
00060 {
00061   QByteArray rv;
00062 
00063   if ( d->isOutboundFolder ) {
00064     rv+= "outbound";
00065   } else {
00066     rv+= "inbound";
00067   }
00068 
00069   return rv;
00070 }
00071 
00072 void MessageFolderAttribute::deserialize(const QByteArray &data)
00073 {
00074   if ( data == "outbound" ) {
00075     d->isOutboundFolder = true;
00076   } else {
00077     d->isOutboundFolder = false;
00078   }
00079 }
00080 
00081 bool MessageFolderAttribute::isOutboundFolder() const
00082 {
00083   return d->isOutboundFolder;
00084 }
00085 
00086 void MessageFolderAttribute::setOutboundFolder(bool outbound)
00087 {
00088   d->isOutboundFolder = outbound;
00089 }
00090 

akonadi/kmime

Skip menu "akonadi/kmime"
  • Main Page
  • Namespace List
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members

KDE-PIM Libraries

Skip menu "KDE-PIM Libraries"
  • akonadi
  •   contact
  •   kmime
  • kabc
  • kblog
  • kcal
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  •   richtextbuilders
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Generated for KDE-PIM Libraries by doxygen 1.6.2-20100208
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal