Akonadi

preprocessorbase.cpp
1 /******************************************************************************
2  *
3  * SPDX-FileCopyrightText: 2009 Szymon Stefanek <s.stefanek at gmail dot com>
4  *
5  * SPDX-License-Identifier: LGPL-2.0-or-later
6  *
7  *****************************************************************************/
8 
9 #include "preprocessorbase.h"
10 
11 #include "preprocessorbase_p.h"
12 
13 #include "akonadiagentbase_debug.h"
14 
15 using namespace Akonadi;
16 
18  : AgentBase(new PreprocessorBasePrivate(this), id)
19 {
20 }
21 
23 {
24 }
25 
27 {
28  Q_D(PreprocessorBase);
29 
30  Q_ASSERT_X(result != ProcessingDelayed, "PreprocessorBase::terminateProcessing", "You should never pass ProcessingDelayed to this function");
31  Q_ASSERT_X(d->mInDelayedProcessing, "PreprocessorBase::terminateProcessing", "terminateProcessing() called while not in delayed processing mode");
32  Q_UNUSED(result);
33 
34  d->mInDelayedProcessing = false;
35  Q_EMIT d->itemProcessed(d->mDelayedProcessingItemId);
36 }
37 
39 {
40  Q_D(PreprocessorBase);
41 
42  d->mFetchScope = fetchScope;
43 }
44 
46 {
47  Q_D(PreprocessorBase);
48 
49  return d->mFetchScope;
50 }
ProcessingResult
Describes the possible return values of the processItem() method.
~PreprocessorBase() override
Destroys the preprocessor base agent.
PreprocessorBase(const QString &id)
Creates a new preprocessor base agent.
The base class for all Akonadi agents and resources.
Definition: agentbase.h:71
void finishProcessing(ProcessingResult result)
This method must be called if processing is implemented asynchronously.
Processing was delayed to a later stage.
ItemFetchScope & fetchScope()
Returns the item fetch scope.
Specifies which parts of an item should be fetched from the Akonadi storage.
The base class for all Akonadi preprocessor agents.
Helper integration between Akonadi and Qt.
void setFetchScope(const ItemFetchScope &fetchScope)
Sets the item fetch scope.
Q_EMITQ_EMIT
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sun Jul 12 2020 23:16:57 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.