21 #ifndef QGSHTTPTRANSACTION_H
22 #define QGSHTTPTRANSACTION_H
25 #include <QNetworkProxy>
47 QString proxyHost = QString(),
49 QString proxyUser = QString(),
50 QString proxyPass = QString(),
51 QNetworkProxy::ProxyType proxyType = QNetworkProxy::NoProxy,
52 QString userName = QString(),
53 QString password = QString() );
58 void getAsynchronously();
75 bool getSynchronously( QByteArray &respondedContent,
int redirections = 0,
const QByteArray* postData = 0 );
77 QString responseContentType();
85 QString errorString();
89 static bool applyProxySettings( QHttp& http,
const QString& url );
96 void setCredentials(
const QString& username,
const QString &password );
106 void dataStarted(
int id );
108 void dataHeaderReceived(
const QHttpResponseHeader& resp );
110 void dataReceived(
const QHttpResponseHeader& resp );
112 void dataProgress(
int done,
int total );
114 void dataFinished(
int id,
bool error );
116 void transactionFinished(
bool error );
118 void dataStateChanged(
int state );
120 void networkTimedOut();
128 void setProgress(
int done,
int total );
131 void dataReadProgress(
int theProgress );
133 void totalSteps(
int theTotalSteps );
136 void statusChanged( QString theStatusQString );
bool httpactive
Indicates if the transaction is in progress.
int httpid
Indicates the QHttp ID.
int networkTimeout() const
Returns the network timeout in msec.
QString mPassword
Password.
QString httphost
The host being used for this transaction.
int mNetworkTimeoutMsec
Network timeout in milliseconds.
QHttp * http
Indicates the associated QHttp object.
void setNetworkTimeout(int msec)
Sets the network timeout in milliseconds.
QString httpresponsecontenttype
QString mUserName
User name.
QString httpurl
The original URL requested for this transaction.
QString mError
The error message associated with the last HTTP error.
HTTP request/response manager that is redirect-aware.
int httpredirections
Number of http redirections this transaction has been subjected to.
QString httpredirecturl
If not empty, indicates that the QHttp is a redirect to the contents of this variable.
QTimer * mWatchdogTimer
Indicates the associated QTimer object - used to detect network timeouts.