• Skip to content
  • Skip to link menu
KDE 4.5 API Reference
  • KDE API Reference
  • KDE-PIM Libraries
  • Sitemap
  • Contact Us
 

akonadi

preprocessorbase.h

00001 /******************************************************************************
00002  *
00003  *  Copyright (c) 2009 Szymon Stefanek <s.stefanek at gmail dot com>
00004  *
00005  *  This library is free software; you can redistribute it and/or modify it
00006  *  under the terms of the GNU Library General Public License as published by
00007  *  the Free Software Foundation; either version 2 of the License, or (at your
00008  *  option) any later version.
00009  *
00010  *  This library is distributed in the hope that it will be useful, but WITHOUT
00011  *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00012  *  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
00013  *  License for more details.
00014  *
00015  *  You should have received a copy of the GNU Library General Public License
00016  *  along with this library; see the file COPYING.LIB.  If not, write to the
00017  *  Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
00018  *  MA, 02110-1301, USA.
00019  *
00020  *****************************************************************************/
00021 
00022 #ifndef AKONADI_PREPROCESSORBASE_H
00023 #define AKONADI_PREPROCESSORBASE_H
00024 
00025 #include "akonadi_export.h"
00026 
00027 #include <akonadi/agentbase.h>
00028 #include <akonadi/collection.h>
00029 #include <akonadi/item.h>
00030 
00031 namespace Akonadi
00032 {
00033 
00034 class ItemFetchScope;
00035 
00036 class PreprocessorBasePrivate;
00037 
00055 class AKONADI_EXPORT PreprocessorBase : public AgentBase
00056 {
00057   Q_OBJECT
00058 
00059   public:
00063     enum ProcessingResult
00064     {
00069       ProcessingCompleted,
00070 
00078       ProcessingDelayed,
00079 
00085       ProcessingFailed,
00086 
00095       ProcessingRefused
00096     };
00097 
00116     virtual ProcessingResult processItem( const Item &item ) = 0;
00117 
00129     void finishProcessing( ProcessingResult result );
00130 
00142     void setFetchScope( const ItemFetchScope &fetchScope );
00143 
00156     ItemFetchScope &fetchScope();
00157 
00158   protected:
00164     PreprocessorBase( const QString &id );
00165 
00169     virtual ~PreprocessorBase();
00170 
00171   private:
00172     //@cond PRIVATE
00173     Q_DECLARE_PRIVATE( PreprocessorBase )
00174     //@endcond
00175 
00176 }; // class PreprocessorBase
00177 
00178 } // namespace Akonadi
00179 
00180 #ifndef AKONADI_PREPROCESSOR_MAIN
00181 
00184 #define AKONADI_PREPROCESSOR_MAIN( preProcessorClass )                       \
00185   int main( int argc, char **argv )                                          \
00186   {                                                                          \
00187     return Akonadi::PreprocessorBase::init<preProcessorClass>( argc, argv ); \
00188   }
00189 #endif //!AKONADI_RESOURCE_MAIN
00190 
00191 #endif //!_PREPROCESSORBASE_H_

akonadi

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

KDE-PIM Libraries

Skip menu "KDE-PIM Libraries"
  • akonadi
  •   contact
  •   kmime
  • kabc
  • kblog
  • kcal
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  •   richtextbuilders
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Generated for KDE-PIM Libraries by doxygen 1.7.1
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal