• 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
HttpDownloadManager.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 2009 Jens-Michael Hoffmann <jensmh@gmx.de>
11 //
12 
13 //
14 // The HttpDownloadManager manages http downloads.
15 //
16 
17 #ifndef MARBLE_HTTPDOWNLOADMANAGER_H
18 #define MARBLE_HTTPDOWNLOADMANAGER_H
19 
20 #include <QObject>
21 
22 #include "MarbleGlobal.h"
23 #include "marble_export.h"
24 
25 class QUrl;
26 
27 namespace Marble
28 {
29 
30 class DownloadPolicy;
31 class DownloadQueueSet;
32 class StoragePolicy;
33 
44 class MARBLE_EXPORT HttpDownloadManager : public QObject
45 {
46  Q_OBJECT
47 
48  public:
56  explicit HttpDownloadManager( StoragePolicy *policy );
57 
61  virtual ~HttpDownloadManager();
62 
66  void setDownloadEnabled( const bool enable );
67  void addDownloadPolicy( const DownloadPolicy& );
68 
69  public Q_SLOTS:
70 
74  void addJob( const QUrl& sourceUrl, const QString& destFilename, const QString &id,
75  const DownloadUsage usage );
76 
77 
78  Q_SIGNALS:
79  void downloadComplete( QString, QString );
80 
86  void downloadComplete( QByteArray data, QString initiatorId );
87 
91  void jobAdded();
92 
97  void jobRemoved();
98 
102  void progressChanged( int active, int queued );
103 
104  private Q_SLOTS:
105  void finishJob( const QByteArray& data, const QString& destinationFileName,
106  const QString& id );
107  void requeue();
108  void startRetryTimer();
109 
110  private:
111  Q_DISABLE_COPY( HttpDownloadManager )
112 
113  void connectDefaultQueueSets();
114  void connectQueueSet( DownloadQueueSet * );
115  bool hasDownloadPolicy( const DownloadPolicy& policy ) const;
116  class Private;
117  Private * const d;
118 };
119 
120 }
121 
122 #endif // MARBLE_HTTPDOWNLOADMANAGER_H
Marble::DownloadPolicy
Definition: DownloadPolicy.h:55
Marble::DownloadUsage
DownloadUsage
This enum is used to describe the type of download.
Definition: MarbleGlobal.h:164
QByteArray
Marble::StoragePolicy
Definition: StoragePolicy.h:25
Marble::DownloadQueueSet
Life of a HttpJob
Definition: DownloadQueueSet.h:72
QObject
MARBLE_EXPORT
#define MARBLE_EXPORT
Definition: marble_export.h:20
QString
MarbleGlobal.h
QUrl
marble_export.h
Marble::HttpDownloadManager
This class manages scheduled downloads.
Definition: HttpDownloadManager.h:44
usage
void usage(const QString &app)
Definition: merge_ts_po.cpp:16
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