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 {
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 {
41 
42  d->mFetchScope = fetchScope;
43 }
44 
46 {
48 
49  return d->mFetchScope;
50 }
Q_EMITQ_EMIT
ProcessingResult
Describes the possible return values of the processItem() method.
ItemFetchScope & fetchScope()
Returns the item fetch scope.
PreprocessorBase(const QString &id)
Creates a new preprocessor base agent.
The base class for all Akonadi agents and resources.
Definition: agentbase.h:72
@ ProcessingDelayed
Processing was delayed to a later stage.
~PreprocessorBase() override
Destroys the preprocessor base agent.
void setFetchScope(const ItemFetchScope &fetchScope)
Sets the item fetch scope.
The base class for all Akonadi preprocessor agents.
Q_D(Todo)
Specifies which parts of an item should be fetched from the Akonadi storage.
Helper integration between Akonadi and Qt.
void finishProcessing(ProcessingResult result)
This method must be called if processing is implemented asynchronously.
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Sat Jun 25 2022 06:00:32 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.