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

akonadi

  • 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
29class QString;
30
31namespace Akonadi {
32
33class JobPrivate;
34class Session;
35class SessionPrivate;
36
86class AKONADI_EXPORT Job : public KCompositeJob
87{
88 Q_OBJECT
89
90 friend class Session;
91 friend class SessionPrivate;
92
93public:
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
140Q_SIGNALS:
146 void aboutToStart(Akonadi::Job *job);
147
156 void writeFinished(Akonadi::Job *job);
157
158protected:
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
204protected Q_SLOTS:
205 virtual void slotResult(KJob *job);
206
207protected:
208 //@cond PRIVATE
209 Job(JobPrivate *dd, QObject *parent);
210 JobPrivate *const d_ptr;
211 //@endcond
212
213private:
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
Akonadi::JobPrivate
Definition job_p.h:32
Akonadi::Job
Base class for all actions in the Akonadi storage.
Definition job.h:87
Akonadi::Job::aboutToStart
void aboutToStart(Akonadi::Job *job)
This signal is emitted directly before the job will be started.
Akonadi::Job::Error
Error
Describes the error codes that can be emitted by this class.
Definition job.h:104
Akonadi::Job::Unknown
@ Unknown
Unknown error.
Definition job.h:108
Akonadi::Job::ProtocolVersionMismatch
@ ProtocolVersionMismatch
The server protocol version is too old or too new.
Definition job.h:106
Akonadi::Job::UserCanceled
@ UserCanceled
The user canceld this job.
Definition job.h:107
Akonadi::Job::doStart
virtual void doStart()=0
This method must be reimplemented in the concrete jobs.
Akonadi::Job::writeFinished
void writeFinished(Akonadi::Job *job)
This signal is emitted if the job has finished all write operations, ie.
Akonadi::Job::List
QList< Job * > List
Describes a list of jobs.
Definition job.h:97
Akonadi::SessionPrivate
Definition session_p.h:43
Akonadi::Session
A communication session with the Akonadi storage.
Definition session.h:60
Akonadi
FreeBusyManager::Singleton.
Definition actionstatemanager_p.h:28
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Wed Jan 24 2024 00:00:00 by doxygen 1.10.0 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
  • Related Pages

kdepimlibs-4.14.10 API Reference

Skip menu "kdepimlibs-4.14.10 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
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