diff -r 41300fa6a67c -r f7bc934e204c src/network/access/qhttpnetworkconnectionchannel_p.h --- a/src/network/access/qhttpnetworkconnectionchannel_p.h Tue Feb 02 00:43:10 2010 +0200 +++ b/src/network/access/qhttpnetworkconnectionchannel_p.h Wed Mar 31 11:06:36 2010 +0300 @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** @@ -65,6 +65,7 @@ #include #include +#include "qhttpnetworkconnection_p.h" #ifndef QT_NO_HTTP @@ -80,7 +81,6 @@ class QHttpNetworkRequest; class QHttpNetworkReply; class QByteArray; -class QHttpNetworkConnection; #ifndef HttpMessagePair typedef QPair HttpMessagePair; @@ -127,24 +127,15 @@ QList alreadyPipelinedRequests; - QHttpNetworkConnectionChannel() : socket(0), state(IdleState), reply(0), written(0), bytesTotal(0), resendCurrent(false), - lastStatus(0), pendingEncrypt(false), reconnectAttempts(2), - authMehtod(QAuthenticatorPrivate::None), proxyAuthMehtod(QAuthenticatorPrivate::None) -#ifndef QT_NO_OPENSSL - , ignoreAllSslErrors(false) -#endif - , pipeliningSupported(PipeliningSupportUnknown) - , connection(0) - {} - - void setConnection(QHttpNetworkConnection *c) {connection = c;} - QHttpNetworkConnection *connection; + QHttpNetworkConnectionChannel(); + + void setConnection(QHttpNetworkConnection *c); + QPointer connection; void init(); void close(); bool sendRequest(); - void receiveReply(); bool ensureConnection(); @@ -152,10 +143,13 @@ void allDone(); // reply header + body have been read void handleStatus(); // called from allDone() + bool resetUploadData(); // return true if resetting worked or there is no upload data + void pipelineInto(HttpMessagePair &pair); void requeueCurrentlyPipelinedRequests(); void detectPipeliningSupport(); + void handleUnexpectedEOF(); void closeAndResendCurrentRequest(); void eatWhitespace(); @@ -166,6 +160,7 @@ bool isSocketReading() const; protected slots: + void _q_receiveReply(); void _q_bytesWritten(qint64 bytes); // proceed sending void _q_readyRead(); // pending data to read void _q_disconnected(); // disconnected from host @@ -184,8 +179,6 @@ #endif }; - - QT_END_NAMESPACE #endif // QT_NO_HTTP