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

akonadi

  • sources
  • kde-4.14
  • kdepimlibs
  • 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 
31 namespace Akonadi
32 {
33 
34 class ItemFetchScope;
35 
36 class PreprocessorBasePrivate;
37 
55 class AKONADI_EXPORT PreprocessorBase : public AgentBase
56 {
57  Q_OBJECT
58 
59 public:
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 
157 protected:
163  PreprocessorBase(const QString &id);
164 
168  virtual ~PreprocessorBase();
169 
170 private:
171  //@cond PRIVATE
172  Q_DECLARE_PRIVATE(PreprocessorBase)
173  //@endcond
174 
175 }; // class PreprocessorBase
176 
177 } // namespace Akonadi
178 
179 #ifndef AKONADI_PREPROCESSOR_MAIN
180 
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::PreprocessorBase::ProcessingResult
ProcessingResult
Describes the possible return values of the processItem() method.
Definition: preprocessorbase.h:63
Akonadi::PreprocessorBase::ProcessingCompleted
Processing completed successfully for this item.
Definition: preprocessorbase.h:68
Akonadi::AgentBase
The base class for all Akonadi agents and resources.
Definition: agentbase.h:80
Akonadi::PreprocessorBase::ProcessingDelayed
Processing was delayed to a later stage.
Definition: preprocessorbase.h:77
QString
Akonadi::ItemFetchScope
Specifies which parts of an item should be fetched from the Akonadi storage.
Definition: itemfetchscope.h:69
Akonadi::PreprocessorBase
The base class for all Akonadi preprocessor agents.
Definition: preprocessorbase.h:55
Akonadi::PreprocessorBase::ProcessingFailed
Processing for this item failed (and the failure is unrecoverable).
Definition: preprocessorbase.h:84
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:38:03 by doxygen 1.8.7 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
  • Modules
  • Related Pages

kdepimlibs API Reference

Skip menu "kdepimlibs 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

Search



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