src/network/access/qhttpnetworkreply_p.h
changeset 7 f7bc934e204c
parent 0 1918ee327afb
equal deleted inserted replaced
3:41300fa6a67c 7:f7bc934e204c
     1 /****************************************************************************
     1 /****************************************************************************
     2 **
     2 **
     3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     4 ** All rights reserved.
     4 ** All rights reserved.
     5 ** Contact: Nokia Corporation (qt-info@nokia.com)
     5 ** Contact: Nokia Corporation (qt-info@nokia.com)
     6 **
     6 **
     7 ** This file is part of the QtNetwork module of the Qt Toolkit.
     7 ** This file is part of the QtNetwork module of the Qt Toolkit.
     8 **
     8 **
    84 #include <private/qbytedata_p.h>
    84 #include <private/qbytedata_p.h>
    85 
    85 
    86 QT_BEGIN_NAMESPACE
    86 QT_BEGIN_NAMESPACE
    87 
    87 
    88 class QHttpNetworkConnection;
    88 class QHttpNetworkConnection;
       
    89 class QHttpNetworkConnectionChannel;
    89 class QHttpNetworkRequest;
    90 class QHttpNetworkRequest;
    90 class QHttpNetworkConnectionPrivate;
    91 class QHttpNetworkConnectionPrivate;
    91 class QHttpNetworkReplyPrivate;
    92 class QHttpNetworkReplyPrivate;
    92 class Q_AUTOTEST_EXPORT QHttpNetworkReply : public QObject, public QHttpNetworkHeader
    93 class Q_AUTOTEST_EXPORT QHttpNetworkReply : public QObject, public QHttpNetworkHeader
    93 {
    94 {
   123     QString reasonPhrase() const;
   124     QString reasonPhrase() const;
   124 
   125 
   125     qint64 bytesAvailable() const;
   126     qint64 bytesAvailable() const;
   126     qint64 bytesAvailableNextBlock() const;
   127     qint64 bytesAvailableNextBlock() const;
   127     QByteArray readAny();
   128     QByteArray readAny();
       
   129     void setDownstreamLimited(bool t);
   128 
   130 
   129     bool isFinished() const;
   131     bool isFinished() const;
   130 
   132 
   131     bool isPipeliningUsed() const;
   133     bool isPipeliningUsed() const;
   132 
   134 
   168     qint64 readBody(QAbstractSocket *socket, QByteDataBuffer *out);
   170     qint64 readBody(QAbstractSocket *socket, QByteDataBuffer *out);
   169     qint64 readBodyFast(QAbstractSocket *socket, QByteDataBuffer *rb);
   171     qint64 readBodyFast(QAbstractSocket *socket, QByteDataBuffer *rb);
   170     bool findChallenge(bool forProxy, QByteArray &challenge) const;
   172     bool findChallenge(bool forProxy, QByteArray &challenge) const;
   171     QAuthenticatorPrivate::Method authenticationMethod(bool isProxy) const;
   173     QAuthenticatorPrivate::Method authenticationMethod(bool isProxy) const;
   172     void clear();
   174     void clear();
       
   175     void clearHttpLayerInformation();
   173 
   176 
   174     qint64 readReplyBodyRaw(QIODevice *in, QByteDataBuffer *out, qint64 size);
   177     qint64 readReplyBodyRaw(QIODevice *in, QByteDataBuffer *out, qint64 size);
   175     qint64 readReplyBodyChunked(QIODevice *in, QByteDataBuffer *out);
   178     qint64 readReplyBodyChunked(QIODevice *in, QByteDataBuffer *out);
   176     qint64 getChunkSize(QIODevice *in, qint64 *chunkSize);
   179     qint64 getChunkSize(QIODevice *in, qint64 *chunkSize);
   177 
   180 
   215     bool connectionCloseEnabled;
   218     bool connectionCloseEnabled;
   216     bool forceConnectionCloseEnabled;
   219     bool forceConnectionCloseEnabled;
   217     qint64 currentChunkSize;
   220     qint64 currentChunkSize;
   218     qint64 currentChunkRead;
   221     qint64 currentChunkRead;
   219     QPointer<QHttpNetworkConnection> connection;
   222     QPointer<QHttpNetworkConnection> connection;
       
   223     QPointer<QHttpNetworkConnectionChannel> connectionChannel;
   220     bool initInflate;
   224     bool initInflate;
   221     bool streamEnd;
   225     bool streamEnd;
   222 #ifndef QT_NO_COMPRESS
   226 #ifndef QT_NO_COMPRESS
   223     z_stream inflateStrm;
   227     z_stream inflateStrm;
   224 #endif
   228 #endif
   227     QByteDataBuffer responseData; // uncompressed body
   231     QByteDataBuffer responseData; // uncompressed body
   228     QByteArray compressedData; // compressed body (temporary)
   232     QByteArray compressedData; // compressed body (temporary)
   229     bool requestIsPrepared;
   233     bool requestIsPrepared;
   230 
   234 
   231     bool pipeliningUsed;
   235     bool pipeliningUsed;
       
   236     bool downstreamLimited;
   232 };
   237 };
   233 
   238 
   234 
   239 
   235 
   240 
   236 
   241