diff options
Diffstat (limited to 'examples/network/torrent/trackerclient.h')
-rw-r--r-- | examples/network/torrent/trackerclient.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/examples/network/torrent/trackerclient.h b/examples/network/torrent/trackerclient.h index de63a8f87f..723b3aa4b7 100644 --- a/examples/network/torrent/trackerclient.h +++ b/examples/network/torrent/trackerclient.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** @@ -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; |