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

akonadi

  • sources
  • kde-4.12
  • 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
64  {
69  ProcessingCompleted,
70 
78  ProcessingDelayed,
79 
85  ProcessingFailed,
86 
95  ProcessingRefused
96  };
97 
116  virtual ProcessingResult processItem( const Item &item ) = 0;
117 
129  void finishProcessing( ProcessingResult result );
130 
142  void setFetchScope( const ItemFetchScope &fetchScope );
143 
156  ItemFetchScope &fetchScope();
157 
158  protected:
164  PreprocessorBase( const QString &id );
165 
169  virtual ~PreprocessorBase();
170 
171  private:
172  //@cond PRIVATE
173  Q_DECLARE_PRIVATE( PreprocessorBase )
174  //@endcond
175 
176 }; // class PreprocessorBase
177 
178 } // namespace Akonadi
179 
180 #ifndef AKONADI_PREPROCESSOR_MAIN
181 
184 #define AKONADI_PREPROCESSOR_MAIN( preProcessorClass ) \
185  int main( int argc, char **argv ) \
186  { \
187  return Akonadi::PreprocessorBase::init<preProcessorClass>( argc, argv ); \
188  }
189 #endif
190 
191 #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:69
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:78
Akonadi::ItemFetchScope
Specifies which parts of an item should be fetched from the Akonadi storage.
Definition: itemfetchscope.h:68
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:85
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:00:27 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
  • kldap
  • kmbox
  • kmime
  • kpimidentities
  • kpimtextedit
  • kresources
  • ktnef
  • kxmlrpcclient
  • microblog

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