src/network/access/qhttpnetworkconnectionchannel_p.h
changeset 19 fcece45ef507
parent 18 2f34d5167611
child 29 b72c6db6890b
equal deleted inserted replaced
18:2f34d5167611 19:fcece45ef507
    63 
    63 
    64 #include <private/qhttpnetworkheader_p.h>
    64 #include <private/qhttpnetworkheader_p.h>
    65 #include <private/qhttpnetworkrequest_p.h>
    65 #include <private/qhttpnetworkrequest_p.h>
    66 #include <private/qhttpnetworkreply_p.h>
    66 #include <private/qhttpnetworkreply_p.h>
    67 
    67 
       
    68 #include "qhttpnetworkconnection_p.h"
    68 
    69 
    69 #ifndef QT_NO_HTTP
    70 #ifndef QT_NO_HTTP
    70 
    71 
    71 #ifndef QT_NO_OPENSSL
    72 #ifndef QT_NO_OPENSSL
    72 #    include <QtNetwork/qsslsocket.h>
    73 #    include <QtNetwork/qsslsocket.h>
    78 QT_BEGIN_NAMESPACE
    79 QT_BEGIN_NAMESPACE
    79 
    80 
    80 class QHttpNetworkRequest;
    81 class QHttpNetworkRequest;
    81 class QHttpNetworkReply;
    82 class QHttpNetworkReply;
    82 class QByteArray;
    83 class QByteArray;
    83 class QHttpNetworkConnection;
       
    84 
    84 
    85 #ifndef HttpMessagePair
    85 #ifndef HttpMessagePair
    86 typedef QPair<QHttpNetworkRequest, QHttpNetworkReply*> HttpMessagePair;
    86 typedef QPair<QHttpNetworkRequest, QHttpNetworkReply*> HttpMessagePair;
    87 #endif
    87 #endif
    88 
    88 
   125     };
   125     };
   126     PipeliningSupport pipeliningSupported;
   126     PipeliningSupport pipeliningSupported;
   127     QList<HttpMessagePair> alreadyPipelinedRequests;
   127     QList<HttpMessagePair> alreadyPipelinedRequests;
   128 
   128 
   129 
   129 
   130     QHttpNetworkConnectionChannel() : socket(0), state(IdleState), reply(0), written(0), bytesTotal(0), resendCurrent(false),
   130     QHttpNetworkConnectionChannel();
   131     lastStatus(0), pendingEncrypt(false), reconnectAttempts(2),
   131     
   132     authMehtod(QAuthenticatorPrivate::None), proxyAuthMehtod(QAuthenticatorPrivate::None)
   132     void setConnection(QHttpNetworkConnection *c);
   133 #ifndef QT_NO_OPENSSL
   133     QPointer<QHttpNetworkConnection> connection;
   134     , ignoreAllSslErrors(false)
       
   135 #endif
       
   136     , pipeliningSupported(PipeliningSupportUnknown)
       
   137     , connection(0)
       
   138     {}
       
   139 
       
   140     void setConnection(QHttpNetworkConnection *c) {connection = c;}
       
   141     QHttpNetworkConnection *connection;
       
   142 
   134 
   143     void init();
   135     void init();
   144     void close();
   136     void close();
   145 
   137 
   146     bool sendRequest();
   138     bool sendRequest();
   185     void _q_sslErrors(const QList<QSslError> &errors); // ssl errors from the socket
   177     void _q_sslErrors(const QList<QSslError> &errors); // ssl errors from the socket
   186     void _q_encryptedBytesWritten(qint64 bytes); // proceed sending
   178     void _q_encryptedBytesWritten(qint64 bytes); // proceed sending
   187 #endif
   179 #endif
   188 };
   180 };
   189 
   181 
   190 
       
   191 
       
   192 QT_END_NAMESPACE
   182 QT_END_NAMESPACE
   193 
   183 
   194 #endif // QT_NO_HTTP
   184 #endif // QT_NO_HTTP
   195 
   185 
   196 #endif
   186 #endif