• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.10.5 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 
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
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Sat Jul 13 2013 01:27:40 by doxygen 1.8.3.1 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-4.10.5 API Reference

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