2012-02-29 18:33:50 +01:00
|
|
|
/* ============================================================
|
|
|
|
* QupZilla - WebKit based browser
|
|
|
|
* Copyright (C) 2010-2012 David Rosca <nowrep@gmail.com>
|
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
* ============================================================ */
|
|
|
|
|
2011-10-29 13:36:04 +02:00
|
|
|
#ifndef FOLLOWREDIRECTREPLY_H
|
|
|
|
#define FOLLOWREDIRECTREPLY_H
|
|
|
|
|
|
|
|
#include <QObject>
|
2012-07-03 21:54:04 +02:00
|
|
|
#include <QNetworkReply>
|
2011-10-29 13:36:04 +02:00
|
|
|
|
2012-02-29 18:33:50 +01:00
|
|
|
#include "qz_namespace.h"
|
|
|
|
|
|
|
|
class QNetworkAccessManager;
|
|
|
|
class QNetworkReply;
|
|
|
|
class QUrl;
|
|
|
|
|
|
|
|
class QT_QUPZILLA_EXPORT FollowRedirectReply : public QObject
|
2011-10-29 13:36:04 +02:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
explicit FollowRedirectReply(const QUrl &url, QNetworkAccessManager* manager);
|
|
|
|
~FollowRedirectReply();
|
|
|
|
|
2012-07-03 21:54:04 +02:00
|
|
|
QNetworkReply* reply() const;
|
2012-07-08 00:15:03 +02:00
|
|
|
QUrl originalUrl() const;
|
2012-07-03 21:54:04 +02:00
|
|
|
QUrl url() const;
|
|
|
|
|
|
|
|
QNetworkReply::NetworkError error() const;
|
|
|
|
QByteArray readAll();
|
2011-10-29 13:36:04 +02:00
|
|
|
|
|
|
|
signals:
|
|
|
|
void finished();
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
void replyFinished();
|
|
|
|
|
|
|
|
private:
|
|
|
|
QNetworkAccessManager* m_manager;
|
|
|
|
QNetworkReply* m_reply;
|
|
|
|
int m_redirectCount;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // FOLLOWREDIRECTREPLY_H
|