akonadi
20 #include "collectionselectjob_p.h"
23 #include "protocol_p.h"
24 #include <akonadi/private/imapparser_p.h>
26 #include <QtCore/QDebug>
27 #include <KLocalizedString>
28 using namespace Akonadi;
30 class Akonadi::CollectionSelectJobPrivate :
public JobPrivate
38 QString jobDebuggingString() const {
39 if ( mCollection.id() > 0 )
40 return QString::number( mCollection.id() );
42 return QString::fromLatin1(
"RemoteID " ) + QString::number( mCollection.id() );
49 :
Job( new CollectionSelectJobPrivate( this ), parent )
53 d->mCollection = collection;
64 if ( d->mCollection.isValid() ) {
65 QByteArray command( d->newTag() +
" SELECT SILENT " );
66 d->writeData( command + QByteArray::number( d->mCollection.id() ) +
'\n' );
67 }
else if ( !d->mCollection.remoteId().isEmpty() ) {
68 QByteArray command( d->newTag() +
" " AKONADI_CMD_RID
" SELECT SILENT " );
69 d->writeData( command + ImapParser::quote( d->mCollection.remoteId().toUtf8() ) +
'\n' );
72 setErrorText( i18n(
"Invalid collection specified" ) );
77 #include "moc_collectionselectjob_p.cpp"
Represents a collection of PIM items.
Base class for all actions in the Akonadi storage.
CollectionSelectJob(const Collection &collection, QObject *parent=0)
Creates a new collection select job.
void doStart()
This method must be reimplemented in the concrete jobs.
virtual ~CollectionSelectJob()
Destroys this job.
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:00:26 by
doxygen 1.8.7 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.