• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.14.10 API Reference
  • KDE Home
  • Contact Us
 

akonadi

  • akonadi
preprocessorbase.h
1/******************************************************************************
2 *
3 * Copyright (c) 2009 Szymon Stefanek <s.stefanek at gmail dot com>
4 *
5 * This library is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU Library General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13 * License for more details.
14 *
15 * You should have received a copy of the GNU Library General Public License
16 * along with this library; see the file COPYING.LIB. If not, write to the
17 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
18 * MA, 02110-1301, USA.
19 *
20 *****************************************************************************/
21
22#ifndef AKONADI_PREPROCESSORBASE_H
23#define AKONADI_PREPROCESSORBASE_H
24
25#include "akonadi_export.h"
26
27#include <akonadi/agentbase.h>
28#include <akonadi/collection.h>
29#include <akonadi/item.h>
30
31namespace Akonadi
32{
33
34class ItemFetchScope;
35
36class PreprocessorBasePrivate;
37
55class AKONADI_EXPORT PreprocessorBase : public AgentBase
56{
57 Q_OBJECT
58
59public:
63 enum ProcessingResult {
68 ProcessingCompleted,
69
77 ProcessingDelayed,
78
84 ProcessingFailed,
85
94 ProcessingRefused
95 };
96
115 virtual ProcessingResult processItem(const Item &item) = 0;
116
128 void finishProcessing(ProcessingResult result);
129
141 void setFetchScope(const ItemFetchScope &fetchScope);
142
155 ItemFetchScope &fetchScope();
156
157protected:
163 PreprocessorBase(const QString &id);
164
168 virtual ~PreprocessorBase();
169
170private:
171 //@cond PRIVATE
172 Q_DECLARE_PRIVATE(PreprocessorBase)
173 //@endcond
174
175}; // class PreprocessorBase
176
177} // namespace Akonadi
178
179#ifndef AKONADI_PREPROCESSOR_MAIN
183#define AKONADI_PREPROCESSOR_MAIN( preProcessorClass ) \
184 int main( int argc, char **argv ) \
185 { \
186 return Akonadi::PreprocessorBase::init<preProcessorClass>( argc, argv ); \
187 }
188#endif
189
190#endif
Akonadi::AgentBase
The base class for all Akonadi agents and resources.
Definition agentbase.h:81
Akonadi::ItemFetchScope
Specifies which parts of an item should be fetched from the Akonadi storage.
Definition itemfetchscope.h:70
Akonadi::PreprocessorBase
The base class for all Akonadi preprocessor agents.
Definition preprocessorbase.h:56
Akonadi::PreprocessorBase::processItem
virtual ProcessingResult processItem(const Item &item)=0
This method must be implemented by every preprocessor subclass.
Akonadi::PreprocessorBase::ProcessingResult
ProcessingResult
Describes the possible return values of the processItem() method.
Definition preprocessorbase.h:63
Akonadi::PreprocessorBase::ProcessingDelayed
@ ProcessingDelayed
Processing was delayed to a later stage.
Definition preprocessorbase.h:77
Akonadi::PreprocessorBase::ProcessingCompleted
@ ProcessingCompleted
Processing completed successfully for this item.
Definition preprocessorbase.h:68
Akonadi::PreprocessorBase::ProcessingFailed
@ ProcessingFailed
Processing for this item failed (and the failure is unrecoverable).
Definition preprocessorbase.h:84
Akonadi
FreeBusyManager::Singleton.
Definition actionstatemanager_p.h:28
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Wed Jan 24 2024 00:00:00 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

akonadi

Skip menu "akonadi"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • Related Pages

kdepimlibs-4.14.10 API Reference

Skip menu "kdepimlibs-4.14.10 API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal