diff data/fileio/FileSource.h @ 762:3b2409646cc0 qt5

Get FileSource building
author Chris Cannam
date Mon, 11 Mar 2013 13:42:01 +0000
parents 579b2da21e7a
children 95d4a59295b7
line wrap: on
line diff
--- a/data/fileio/FileSource.h	Mon Mar 11 11:49:16 2013 +0000
+++ b/data/fileio/FileSource.h	Mon Mar 11 13:42:01 2013 +0000
@@ -20,15 +20,13 @@
 #include <QMutex>
 #include <QString>
 #include <QTimer>
+#include <QNetworkReply>
 
 #include <map>
 
 #include "base/Debug.h"
 
-class QFtp;
-class QHttp;
 class QFile;
-class QHttpResponseHeader;
 class ProgressReporter;
 
 /**
@@ -210,20 +208,19 @@
     void ready();
 
 protected slots:
-    void dataReadProgress(int done, int total);
-    void httpResponseHeaderReceived(const QHttpResponseHeader &resp);
-    void ftpCommandFinished(int, bool);
-    void dataTransferProgress(qint64 done, qint64 total);
-    void done(bool error);
+    void metadataChanged();
+    void readyRead();
+    void replyFailed(QNetworkReply::NetworkError);
+    void replyFinished();
+    void downloadProgress(qint64 done, qint64 total);
     void cancelled();
 
 protected:
     FileSource &operator=(const FileSource &); // not provided
 
     QUrl m_url;
-    QFtp *m_ftp;
-    QHttp *m_http;
     QFile *m_localFile;
+    QNetworkReply *m_reply;
     QString m_localFilename;
     QString m_errorString;
     QString m_contentType;
@@ -244,8 +241,7 @@
     bool m_refCounted;
 
     void init();
-    void initHttp();
-    void initFtp();
+    void initRemote();
 
     void cleanup();