8#include "commandpipe.h"
10#include "baloodebug.h"
15enum BatchStatus : quint8 {
24 : m_commandStream(commandPipe)
25 , m_statusStream(statusPipe)
31 m_commandStream << ids;
34void ControllerPipe::processStatusData()
37 BatchStatus
event{Invalid};
40 m_statusStream.startTransaction();
41 m_statusStream >>
event;
43 if ((m_statusStream.status() !=
QDataStream::Ok) && m_statusStream.device()->atEnd()) {
44 m_statusStream.rollbackTransaction();
48 if (event == BatchFinished) {
49 if (m_statusStream.commitTransaction()) {
50 Q_EMIT batchFinished();
57 m_statusStream >> url;
58 if (!m_statusStream.commitTransaction()) {
64 Q_EMIT urlStarted(url);
68 Q_EMIT urlFinished(url);
72 Q_EMIT urlFailed(url);
76 qCCritical(BALOO) <<
"Got unknown result from extractor" <<
event << url;
82 : m_commandStream(commandPipe)
83 , m_statusStream(statusPipe)
87void WorkerPipe::processIdData()
92 m_commandStream.startTransaction();
93 m_commandStream >> ids;
101 if ((m_commandStream.status() !=
QDataStream::Ok) && m_commandStream.device()->atEnd()) {
102 m_commandStream.rollbackTransaction();
107 if (!m_commandStream.commitTransaction()) {
111 Q_EMIT newDocumentIds(ids);
112 if (m_commandStream.device()->atEnd()) {
118void WorkerPipe::urlStarted(
const QString& url)
120 m_statusStream << UrlStarted << url;
123void WorkerPipe::urlFinished(
const QString& url)
125 m_statusStream << UrlFinished << url;
128void WorkerPipe::urlFailed(
const QString& url)
130 m_statusStream << UrlFailed << url;
133void WorkerPipe::batchFinished()
135 m_statusStream << BatchFinished;
141#include "moc_commandpipe.cpp"
AKONADI_CALENDAR_EXPORT KCalendarCore::Event::Ptr event(const Akonadi::Item &item)
Implements storage for docIds without any associated data Instantiated for: