akonadi
20 #include "searchresultjob_p.h"
22 #include "protocolhelper_p.h"
24 #include <akonadi/private/protocol_p.h>
31 SearchResultJobPrivate(SearchResultJob *parent);
36 QVector<QByteArray> rid;
39 SearchResultJobPrivate::SearchResultJobPrivate(SearchResultJob *parent)
46 using namespace Akonadi;
48 SearchResultJob::SearchResultJob(
const QByteArray &searchId,
const Collection &collection, QObject *parent)
49 :
Job(new SearchResultJobPrivate(this), parent)
54 d->searchId = searchId;
55 d->collection = collection;
58 SearchResultJob::~SearchResultJob()
62 void SearchResultJob::setSearchId(
const QByteArray &searchId)
65 d->searchId = searchId;
68 QByteArray SearchResultJob::searchId()
const
70 return d_func()->searchId;
73 void SearchResultJob::setResult(
const ImapSet &set)
80 void SearchResultJob::setResult(
const QVector<qint64> &ids)
88 void SearchResultJob::setResult(
const QVector<QByteArray> &remoteIds)
95 void SearchResultJob::doStart()
99 QByteArray command = d->newTag() +
' ';
101 if (!d->rid.isEmpty()) {
102 command += AKONADI_CMD_RID;
104 command += AKONADI_CMD_UID;
107 command +=
" SEARCH_RESULT " + d->searchId +
" " + QByteArray::number(d->collection.id()) +
" (";
109 if (!d->rid.isEmpty()) {
110 command += ImapParser::join(d->rid.toList(),
" ");
111 }
else if (!d->uid.isEmpty()) {
112 command += d->uid.toImapSequenceSet();
117 d->writeData(command);
Represents a collection of PIM items.
Base class for all actions in the Akonadi storage.
bool isValid() const
Returns whether the entity is valid.
This file is part of the KDE documentation.
Documentation copyright © 1996-2015 The KDE developers.
Generated on Wed Dec 23 2015 17:45:40 by
doxygen 1.8.5 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.