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

akonadi

job.h

00001 /*
00002     Copyright (c) 2006 Tobias Koenig <tokoe@kde.org>
00003                   2006 Marc Mutz <mutz@kde.org>
00004                   2006 - 2007 Volker Krause <vkrause@kde.org>
00005 
00006     This library is free software; you can redistribute it and/or modify it
00007     under the terms of the GNU Library General Public License as published by
00008     the Free Software Foundation; either version 2 of the License, or (at your
00009     option) any later version.
00010 
00011     This library is distributed in the hope that it will be useful, but WITHOUT
00012     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00013     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
00014     License for more details.
00015 
00016     You should have received a copy of the GNU Library General Public License
00017     along with this library; see the file COPYING.LIB.  If not, write to the
00018     Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00019     02110-1301, USA.
00020 */
00021 
00022 #ifndef AKONADI_JOB_H
00023 #define AKONADI_JOB_H
00024 
00025 #include "akonadi_export.h"
00026 
00027 #include <kcompositejob.h>
00028 
00029 class QString;
00030 
00031 namespace Akonadi {
00032 
00033 class JobPrivate;
00034 class Session;
00035 class SessionPrivate;
00036 
00094 class AKONADI_EXPORT Job : public KCompositeJob
00095 {
00096   Q_OBJECT
00097 
00098   friend class Session;
00099   friend class SessionPrivate;
00100 
00101   public:
00105     typedef QList<Job*> List;
00106 
00112     enum Error
00113     {
00114       ConnectionFailed = UserDefinedError, 
00115       ProtocolVersionMismatch,             
00116       UserCanceled,                        
00117       Unknown,                             
00118       UserError = UserDefinedError + 42    
00119     };
00120 
00130     explicit Job( QObject *parent = 0 );
00131 
00135     virtual ~Job();
00136 
00141     void start();
00142 
00147     virtual QString errorString() const;
00148 
00149   Q_SIGNALS:
00155     void aboutToStart( Akonadi::Job *job );
00156 
00165     void writeFinished( Akonadi::Job *job );
00166 
00167   protected:
00173     virtual void doStart() = 0;
00174 
00183     virtual void doHandleResponse( const QByteArray &tag, const QByteArray &data );
00184 
00193     virtual bool addSubjob( KJob* job );
00194 
00200     virtual bool removeSubjob( KJob* job );
00201 
00205     virtual bool doKill();
00206 
00211     void emitWriteFinished();
00212 
00213   protected Q_SLOTS:
00214     virtual void slotResult( KJob* job );
00215 
00216   protected:
00217     //@cond PRIVATE
00218     Job( JobPrivate *dd, QObject *parent );
00219     JobPrivate* const d_ptr;
00220     //@endcond
00221 
00222   private:
00223     Q_DECLARE_PRIVATE( Job )
00224 
00225     //@cond PRIVATE
00226     Q_PRIVATE_SLOT( d_func(), void slotSubJobAboutToStart( Akonadi::Job* ) )
00227     Q_PRIVATE_SLOT( d_func(), void startNext() )
00228     Q_PRIVATE_SLOT( d_func(), void signalCreationToJobTracker() )
00229     //@endcond
00230 };
00231 
00232 }
00233 
00234 #endif

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.6.2-20100208
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