mailtransport
filteractionjob_p.h
00001 /* 00002 Copyright (c) 2009 Constantin Berzan <exit3219@gmail.com> 00003 00004 This library is free software; you can redistribute it and/or modify it 00005 under the terms of the GNU Library General Public License as published by 00006 the Free Software Foundation; either version 2 of the License, or (at your 00007 option) any later version. 00008 00009 This library is distributed in the hope that it will be useful, but WITHOUT 00010 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00011 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public 00012 License for more details. 00013 00014 You should have received a copy of the GNU Library General Public License 00015 along with this library; see the file COPYING.LIB. If not, write to the 00016 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 00017 02110-1301, USA. 00018 */ 00019 00020 #ifndef MAILTRANSPORT_FILTERACTIONJOB_P_H 00021 #define MAILTRANSPORT_FILTERACTIONJOB_P_H 00022 00023 #include <mailtransport/mailtransport_export.h> 00024 00025 #include <akonadi/item.h> 00026 #include <akonadi/transactionsequence.h> 00027 00028 namespace Akonadi { 00029 00030 class Collection; 00031 class ItemFetchScope; 00032 class Job; 00033 00034 class FilterActionJob; 00035 00075 class MAILTRANSPORT_EXPORT FilterAction 00076 { 00077 public: 00083 virtual ~FilterAction(); 00084 00092 virtual Akonadi::ItemFetchScope fetchScope() const = 0; 00093 00098 virtual bool itemAccepted( const Akonadi::Item &item ) const = 0; 00099 00104 virtual Akonadi::Job *itemAction( const Akonadi::Item &item, 00105 Akonadi::FilterActionJob *parent ) const = 0; 00106 }; 00107 00129 class MAILTRANSPORT_EXPORT FilterActionJob : public TransactionSequence 00130 { 00131 Q_OBJECT 00132 00133 public: 00141 FilterActionJob( const Item &item, FilterAction *functor, QObject *parent = 0 ); 00142 00150 FilterActionJob( const Item::List &items, FilterAction *functor, QObject *parent = 0 ); 00151 00160 FilterActionJob( const Collection &collection, FilterAction *functor, QObject *parent = 0 ); 00161 00165 ~FilterActionJob(); 00166 00167 protected: 00168 /* reimpl */ 00169 virtual void doStart(); 00170 00171 private: 00172 //@cond PRIVATE 00173 class Private; 00174 Private *const d; 00175 00176 Q_PRIVATE_SLOT( d, void fetchResult( KJob* ) ) 00177 //@endcond 00178 }; 00179 00180 } // namespace Akonadi 00181 00182 #endif // AKONADI_FILTERACTIONJOB_H
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Mon Aug 27 2012 22:09:03 by doxygen 1.7.5 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2012 The KDE developers.
Generated on Mon Aug 27 2012 22:09:03 by doxygen 1.7.5 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.