• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepimlibs API Reference
  • KDE Home
  • Contact Us
 

akonadi/kmime

  • sources
  • kde-4.12
  • kdepimlibs
  • akonadi
  • kmime
messagefolderattribute.cpp
1 /*
2  Copyright (c) 2009 Kevin Ottens <ervin@kde.org>
3 
4  This library is free software; you can redistribute it and/or modify it
5  under the terms of the GNU Library General Public License as published by
6  the Free Software Foundation; either version 2 of the License, or (at your
7  option) any later version.
8 
9  This library is distributed in the hope that it will be useful, but WITHOUT
10  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12  License for more details.
13 
14  You should have received a copy of the GNU Library General Public License
15  along with this library; see the file COPYING.LIB. If not, write to the
16  Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17  02110-1301, USA.
18 */
19 
20 #include "messagefolderattribute.h"
21 
22 using namespace Akonadi;
23 
24 class Akonadi::MessageFolderAttribute::Private
25 {
26  public:
27  Private()
28  : isOutboundFolder( false ) { }
29 
30  bool isOutboundFolder;
31 };
32 
33 MessageFolderAttribute::MessageFolderAttribute() :
34  d( new Private )
35 {
36 }
37 
38 MessageFolderAttribute::MessageFolderAttribute(const MessageFolderAttribute & other) :
39  Attribute( other ),
40  d( new Private( *(other.d) ) )
41 {
42 }
43 
44 MessageFolderAttribute::~MessageFolderAttribute()
45 {
46  delete d;
47 }
48 
49 QByteArray MessageFolderAttribute::type() const
50 {
51  return "MESSAGEFOLDER";
52 }
53 
54 MessageFolderAttribute * MessageFolderAttribute::clone() const
55 {
56  return new MessageFolderAttribute( *this );
57 }
58 
59 QByteArray MessageFolderAttribute::serialized() const
60 {
61  QByteArray rv;
62 
63  if ( d->isOutboundFolder ) {
64  rv+= "outbound";
65  } else {
66  rv+= "inbound";
67  }
68 
69  return rv;
70 }
71 
72 void MessageFolderAttribute::deserialize(const QByteArray &data)
73 {
74  if ( data == "outbound" ) {
75  d->isOutboundFolder = true;
76  } else {
77  d->isOutboundFolder = false;
78  }
79 }
80 
81 bool MessageFolderAttribute::isOutboundFolder() const
82 {
83  return d->isOutboundFolder;
84 }
85 
86 void MessageFolderAttribute::setOutboundFolder(bool outbound)
87 {
88  d->isOutboundFolder = outbound;
89 }
90 
Akonadi::MessageFolderAttribute::setOutboundFolder
void setOutboundFolder(bool outbound)
Set if the folder should be considered as containing mostly outbound messages.
Definition: messagefolderattribute.cpp:86
Akonadi::MessageFolderAttribute
Message folder information.
Definition: messagefolderattribute.h:34
Akonadi::MessageFolderAttribute::isOutboundFolder
bool isOutboundFolder() const
Indicates if the folder is supposed to contain mostly outbound messages.
Definition: messagefolderattribute.cpp:81
Akonadi::MessageFolderAttribute::~MessageFolderAttribute
~MessageFolderAttribute()
Destructor.
Definition: messagefolderattribute.cpp:44
Akonadi::MessageFolderAttribute::MessageFolderAttribute
MessageFolderAttribute()
Creates an empty folder attribute.
Definition: messagefolderattribute.cpp:33
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:00:55 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

akonadi/kmime

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

kdepimlibs API Reference

Skip menu "kdepimlibs API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kldap
  • kmbox
  • kmime
  • kpimidentities
  • kpimtextedit
  • kresources
  • ktnef
  • kxmlrpcclient
  • microblog

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal