1
/** ===========================================================
4
* This file is a part of KDE project
5
* <a href="https://projects.kde.org/projects/extragear/libs/libmediawiki">libmediawiki</a>
8
* @brief a MediaWiki C++ interface for KDE
10
* @author Copyright (C) 2011-2012 by Gilles Caulier
11
* <a href="mailto:caulier dot gilles at gmail dot com">caulier dot gilles at gmail dot com</a>
12
* @author Copyright (C) 2009 by Paolo de Vathaire
13
* <a href="mailto:paolo dot devathaire at gmail dot com">paolo dot devathaire at gmail dot com</a>
15
* This program is free software; you can redistribute it
16
* and/or modify it under the terms of the GNU General
17
* Public License as published by the Free Software Foundation;
18
* either version 2, or (at your option)
21
* This program is distributed in the hope that it will be useful,
22
* but WITHOUT ANY WARRANTY; without even the implied warranty of
23
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24
* GNU General Public License for more details.
26
* ============================================================ */
28
#ifndef MEDIAWIKIJOB_H
29
#define MEDIAWIKIJOB_H
33
#include <KCoreAddons/KJob>
37
#include "mediawiki_export.h"
46
* @brief The base class for all MediaWiki jobs.
48
class MEDIAWIKI_EXPORT Job : public KJob
51
Q_DECLARE_PRIVATE(Job)
56
* @brief Indicates all possible error conditions found during the processing of the job.
60
NetworkError = KJob::UserDefinedError + 1,
62
UserRequestDefinedError = KJob::UserDefinedError + 100,
63
MissingMandatoryParameter
69
* @brief Destructs the Job.
74
* @brief Aborts this job quietly.
76
virtual bool doKill();
81
* @brief Constructs a Job by a private class.
82
* @param dd a private class
83
* @param parent the QObject parent
85
Job(JobPrivate& dd, QObject* const parent = 0);
88
* @brief Connects signals of the reply object (in the private object) to
89
* slots of this base class.
94
* @brief The private d pointer.
96
JobPrivate* const d_ptr;
100
void processUploadProgress(qint64 bytesReceived, qint64 bytesTotal);
103
} // namespace mediawiki
105
#endif // MEDIAWIKIJOB_H