summaryrefslogtreecommitdiffstats
path: root/examples/network/torrent/trackerclient.h
diff options
context:
space:
mode:
authorJonas M. Gastal <jgastal@profusion.mobi>2011-12-22 17:42:49 -0200
committerQt by Nokia <qt-info@nokia.com>2012-01-06 23:07:26 +0100
commitb3ce4470ae2ece0c03c66684ca3d9dd13955786b (patch)
tree9e4ef3ec338cb3731bd1df66e0df4c0448a6574b /examples/network/torrent/trackerclient.h
parent7dca461620ee6d8cce3a74acf2e1530d4497bff9 (diff)
Removing QHttp class, its tests and its usage in examples.
Task-number: QTBUG-22750 Change-Id: I161fad772bfb26797e6ee9d69da925b6747c371f Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'examples/network/torrent/trackerclient.h')
-rw-r--r--examples/network/torrent/trackerclient.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/examples/network/torrent/trackerclient.h b/examples/network/torrent/trackerclient.h
index 02dd5f91e7..723b3aa4b7 100644
--- a/examples/network/torrent/trackerclient.h
+++ b/examples/network/torrent/trackerclient.h
@@ -45,7 +45,9 @@
#include <QList>
#include <QObject>
#include <QHostAddress>
-#include <QHttp>
+#include <QNetworkAccessManager>
+#include <QNetworkReply>
+#include <QAuthenticator>
#include "metainfo.h"
#include "torrentclient.h"
@@ -64,7 +66,7 @@ public:
void startSeeding();
signals:
- void connectionError(QHttp::Error error);
+ void connectionError(QNetworkReply::NetworkError error);
void failure(const QString &reason);
void warning(const QString &message);
@@ -80,20 +82,23 @@ protected:
private slots:
void fetchPeerList();
- void httpRequestDone(bool error);
+ void httpRequestDone(QNetworkReply *reply);
+ void provideAuthentication(QNetworkReply *reply, QAuthenticator *auth);
private:
TorrentClient *torrentDownloader;
int requestInterval;
int requestIntervalTimer;
- QHttp http;
+ QNetworkAccessManager http;
MetaInfo metaInfo;
QByteArray trackerId;
QList<TorrentPeer> peers;
qint64 uploadedBytes;
qint64 downloadedBytes;
qint64 length;
+ QString uname;
+ QString pwd;
bool firstTrackerRequest;
bool lastTrackerRequest;