KNewStuff

httpjob.h
1 /*
2  SPDX-FileCopyrightText: 2016 Dan Leinir Turthra Jensen <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.1-or-later
5 */
6 
7 #ifndef HTTPJOB_H
8 #define HTTPJOB_H
9 
10 #include "jobbase.h"
11 
12 #include <QUrl>
13 
14 namespace KNSCore
15 {
16 
17 class HTTPJob : public KJob
18 {
19  Q_OBJECT
20 public:
21  explicit HTTPJob(const QUrl& source, LoadType loadType = Reload, JobFlags flags = DefaultFlags, QObject* parent = nullptr);
22  explicit HTTPJob(QObject* parent = nullptr);
23  ~HTTPJob() override;
24 
25  Q_SLOT void start() override;
26 
27  static HTTPJob* get(const QUrl& source, LoadType loadType = Reload, JobFlags flags = DefaultFlags, QObject* parent = nullptr);
28 
29 Q_SIGNALS:
39  void data(KJob *job, const QByteArray& data);
40 
41 protected Q_SLOTS:
42  void handleWorkerData(const QByteArray& data);
43  void handleWorkerCompleted();
44  void handleWorkerError(const QString& error);
45 private:
46  class Private;
47  Private* d;
48 };
49 
50 }
51 
52 #endif//HTTPJOB_H
QFlags< JobFlag > JobFlags
Contains the core functionality for handling interaction with NewStuff providers. ...
Q_SIGNALSQ_SIGNALS
DefaultFlags
Q_OBJECTQ_OBJECT
Q_SLOTQ_SLOT
Q_SLOTSQ_SLOTS
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Tue Aug 11 2020 22:43:23 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.