akonadi
20 #include "collectiondeletejob.h"
22 #include "collection.h"
25 #include <akonadi/private/imapparser_p.h>
28 using namespace Akonadi;
30 class Akonadi::CollectionDeleteJobPrivate :
public JobPrivate
33 CollectionDeleteJobPrivate( CollectionDeleteJob *parent )
34 : JobPrivate( parent )
38 Collection mCollection;
41 CollectionDeleteJob::CollectionDeleteJob(
const Collection &collection, QObject * parent)
42 :
Job( new CollectionDeleteJobPrivate( this ), parent )
46 d->mCollection = collection;
49 CollectionDeleteJob::~CollectionDeleteJob()
53 void CollectionDeleteJob::doStart()
57 if ( !d->mCollection.isValid() && d->mCollection.remoteId().isEmpty() ) {
59 setErrorText( i18n(
"Invalid collection" ) );
64 if ( d->mCollection.isValid() )
65 d->writeData( d->newTag() +
" DELETE " + QByteArray::number( d->mCollection.id() ) +
'\n' );
67 d->writeData( d->newTag() +
" RID DELETE " + ImapParser::quote( d->mCollection.remoteId().toUtf8() ) +
'\n' );
70 #include "collectiondeletejob.moc"
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Mon Sep 24 2012 09:06:24 by
doxygen 1.8.1.1 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.