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

marble

  • sources
  • kde-4.14
  • kdeedu
  • marble
  • src
  • lib
  • marble
HttpJob.h
Go to the documentation of this file.
1 //
2 // This file is part of the Marble Virtual Globe.
3 //
4 // This program is free software licensed under the GNU LGPL. You can
5 // find a copy of this license in LICENSE.txt in the top directory of
6 // the source code.
7 //
8 // Copyright 2007 Torsten Rahn <tackat@kde.org>
9 // Copyright 2007 Inge Wallin <ingwa@kde.org>
10 // Copyright 2008,2009 Jens-Michael Hoffmann <jensmh@gmx.de>
11 // Copyright 2008 Pino Toscano <pino@kde.org>
12 //
13 
14 #ifndef MARBLE_HTTPJOB_H
15 #define MARBLE_HTTPJOB_H
16 
17 #include <QByteArray>
18 #include <QObject>
19 #include <QString>
20 #include <QUrl>
21 #include <QNetworkReply>
22 
23 #include "MarbleGlobal.h"
24 
25 #include "marble_export.h"
26 
27 class QNetworkAccessManager;
28 
29 namespace Marble
30 {
31 class HttpJobPrivate;
32 
33 class MARBLE_EXPORT HttpJob: public QObject
34 {
35  Q_OBJECT
36 
37  public:
38  HttpJob( const QUrl & sourceUrl, const QString & destFileName, const QString &id, QNetworkAccessManager *networkAccessManager );
39  ~HttpJob();
40 
41  QUrl sourceUrl() const;
42  void setSourceUrl( const QUrl & );
43 
44  QString initiatorId() const;
45  void setInitiatorId( const QString & );
46 
47  QString destinationFileName() const;
48  void setDestinationFileName( const QString & );
49 
50  bool tryAgain();
51 
52  DownloadUsage downloadUsage() const;
53  void setDownloadUsage( const DownloadUsage );
54 
55  void setUserAgentPluginId( const QString & pluginId ) const;
56 
57  QByteArray userAgent() const;
58 
59  Q_SIGNALS:
63  void jobDone( HttpJob *, int errorCode );
64  void redirected( HttpJob * job, QUrl redirectionTarget );
65 
70  void dataReceived( HttpJob * job, QByteArray data );
71 
72  public Q_SLOTS:
73  void execute();
74 
75 private Q_SLOTS:
76  void downloadProgress( qint64 bytesReceived, qint64 bytesTotal );
77  void error( QNetworkReply::NetworkError code );
78  void finished();
79 
80  private:
81  Q_DISABLE_COPY( HttpJob )
82  HttpJobPrivate *const d;
83  friend class HttpJobPrivate;
84 };
85 
86 }
87 
88 #endif
Marble::DownloadUsage
DownloadUsage
This enum is used to describe the type of download.
Definition: MarbleGlobal.h:164
QByteArray
QObject
MARBLE_EXPORT
#define MARBLE_EXPORT
Definition: marble_export.h:20
QString
MarbleGlobal.h
QUrl
QNetworkAccessManager
marble_export.h
Marble::HttpJob
Definition: HttpJob.h:33
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:39 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

marble

Skip menu "marble"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

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