akonadi
20 #include "indexpolicyattribute.h"
22 #include <akonadi/private/imapparser_p.h>
24 #include <QtCore/QString>
26 using namespace Akonadi;
28 class IndexPolicyAttribute::Private
31 Private() : enable( true ) {}
35 IndexPolicyAttribute::IndexPolicyAttribute()
40 IndexPolicyAttribute::~IndexPolicyAttribute()
45 bool IndexPolicyAttribute::indexingEnabled()
const
50 void IndexPolicyAttribute::setIndexingEnabled(
bool enable)
55 QByteArray IndexPolicyAttribute::type()
const
60 Attribute* IndexPolicyAttribute::clone()
const
62 IndexPolicyAttribute* attr =
new IndexPolicyAttribute;
63 attr->setIndexingEnabled( indexingEnabled() );
67 QByteArray IndexPolicyAttribute::serialized()
const
71 l.append( d->enable ?
"true" :
"false" );
72 return "(" + ImapParser::join( l,
" " ) +
')';
75 void IndexPolicyAttribute::deserialize(
const QByteArray& data)
78 ImapParser::parseParenthesizedList( data, l );
79 for (
int i = 0; i < l.size() - 1; i += 2 ) {
80 const QByteArray key = l.at( i );
81 if ( key ==
"ENABLE" )
82 d->enable = l.at( i + 1 ) ==
"true";
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Mon Sep 24 2012 09:06:26 by
doxygen 1.8.1.1 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.