• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepimlibs API Reference
  • KDE Home
  • Contact Us
 

akonadi

  • sources
  • kde-4.14
  • 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  ConnectionFailed = UserDefinedError,
106  ProtocolVersionMismatch,
107  UserCanceled,
108  Unknown,
109  UserError = UserDefinedError + 42
110  };
111 
121  explicit Job(QObject *parent = 0);
122 
126  virtual ~Job();
127 
132  void start();
133 
138  virtual QString errorString() const;
139 
140 Q_SIGNALS:
146  void aboutToStart(Akonadi::Job *job);
147 
156  void writeFinished(Akonadi::Job *job);
157 
158 protected:
164  virtual void doStart() = 0;
165 
174  virtual void doHandleResponse(const QByteArray &tag, const QByteArray &data);
175 
184  virtual bool addSubjob(KJob *job);
185 
191  virtual bool removeSubjob(KJob *job);
192 
196  virtual bool doKill();
197 
202  void emitWriteFinished();
203 
204 protected Q_SLOTS:
205  virtual void slotResult(KJob *job);
206 
207 protected:
208  //@cond PRIVATE
209  Job(JobPrivate *dd, QObject *parent);
210  JobPrivate *const d_ptr;
211  //@endcond
212 
213 private:
214  Q_DECLARE_PRIVATE(Job)
215 
216  //@cond PRIVATE
217  Q_PRIVATE_SLOT(d_func(), void slotSubJobAboutToStart(Akonadi::Job *))
218  Q_PRIVATE_SLOT(d_func(), void startNext())
219  Q_PRIVATE_SLOT(d_func(), void signalCreationToJobTracker())
220  Q_PRIVATE_SLOT(d_func(), void signalStartedToJobTracker())
221  Q_PRIVATE_SLOT(d_func(), void delayedEmitResult())
222  //@endcond
223 };
224 
225 }
226 
227 #endif
QByteArray
Akonadi::Job::ProtocolVersionMismatch
The server protocol version is too old or too new.
Definition: job.h:106
Akonadi::Job::Unknown
Unknown error.
Definition: job.h:108
Akonadi::Job
Base class for all actions in the Akonadi storage.
Definition: job.h:86
QObject
Akonadi::Session
A communication session with the Akonadi storage.
Definition: session.h:59
Akonadi::SessionPrivate
Definition: session_p.h:42
QString
QList
Akonadi::Job::List
QList< Job * > List
Describes a list of jobs.
Definition: job.h:97
Akonadi::JobPrivate
Definition: job_p.h:31
Akonadi::Job::UserCanceled
The user canceld this job.
Definition: job.h:107
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-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:38:03 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
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2

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