• 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
job.h
1 /*
2  Copyright (c) 2006 Tobias Koenig <tokoe@kde.org>
3  2006 Marc Mutz <mutz@kde.org>
4  2006 - 2007 Volker Krause <vkrause@kde.org>
5 
6  This library is free software; you can redistribute it and/or modify it
7  under the terms of the GNU Library General Public License as published by
8  the Free Software Foundation; either version 2 of the License, or (at your
9  option) any later version.
10 
11  This library is distributed in the hope that it will be useful, but WITHOUT
12  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
14  License for more details.
15 
16  You should have received a copy of the GNU Library General Public License
17  along with this library; see the file COPYING.LIB. If not, write to the
18  Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19  02110-1301, USA.
20 */
21 
22 #ifndef AKONADI_JOB_H
23 #define AKONADI_JOB_H
24 
25 #include "akonadi_export.h"
26 
27 #include <kcompositejob.h>
28 
29 class QString;
30 
31 namespace Akonadi {
32 
33 class JobPrivate;
34 class Session;
35 class SessionPrivate;
36 
86 class AKONADI_EXPORT Job : public KCompositeJob
87 {
88  Q_OBJECT
89 
90  friend class Session;
91  friend class SessionPrivate;
92 
93  public:
97  typedef QList<Job*> List;
98 
104  enum Error
105  {
106  ConnectionFailed = UserDefinedError,
107  ProtocolVersionMismatch,
108  UserCanceled,
109  Unknown,
110  UserError = UserDefinedError + 42
111  };
112 
122  explicit Job( QObject *parent = 0 );
123 
127  virtual ~Job();
128 
133  void start();
134 
139  virtual QString errorString() const;
140 
141  Q_SIGNALS:
147  void aboutToStart( Akonadi::Job *job );
148 
157  void writeFinished( Akonadi::Job *job );
158 
159  protected:
165  virtual void doStart() = 0;
166 
175  virtual void doHandleResponse( const QByteArray &tag, const QByteArray &data );
176 
185  virtual bool addSubjob( KJob* job );
186 
192  virtual bool removeSubjob( KJob* job );
193 
197  virtual bool doKill();
198 
203  void emitWriteFinished();
204 
205  protected Q_SLOTS:
206  virtual void slotResult( KJob* job );
207 
208  protected:
209  //@cond PRIVATE
210  Job( JobPrivate *dd, QObject *parent );
211  JobPrivate* const d_ptr;
212  //@endcond
213 
214  private:
215  Q_DECLARE_PRIVATE( Job )
216 
217  //@cond PRIVATE
218  Q_PRIVATE_SLOT( d_func(), void slotSubJobAboutToStart( Akonadi::Job* ) )
219  Q_PRIVATE_SLOT( d_func(), void startNext() )
220  Q_PRIVATE_SLOT( d_func(), void signalCreationToJobTracker() )
221  Q_PRIVATE_SLOT( d_func(), void signalStartedToJobTracker() )
222  Q_PRIVATE_SLOT( d_func(), void delayedEmitResult() )
223  //@endcond
224 };
225 
226 }
227 
228 #endif
Akonadi::Job::List
QList< Job * > List
Describes a list of jobs.
Definition: job.h:97
Akonadi::Job::ProtocolVersionMismatch
The server protocol version is too old or too new.
Definition: job.h:107
Akonadi::Job::Unknown
Unknown error.
Definition: job.h:109
Akonadi::Job
Base class for all actions in the Akonadi storage.
Definition: job.h:86
Akonadi::Session
A communication session with the Akonadi storage.
Definition: session.h:59
Akonadi::SessionPrivate
Definition: session_p.h:41
Akonadi::JobPrivate
Definition: job_p.h:31
Akonadi::Job::UserCanceled
The user canceld this job.
Definition: job.h:108
Akonadi::Job::Error
Error
Describes the error codes that can be emitted by this class.
Definition: job.h:104
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