src/network/access/qhttpnetworkconnectionchannel_p.h
changeset 18 2f34d5167611
parent 0 1918ee327afb
child 19 fcece45ef507
equal deleted inserted replaced
3:41300fa6a67c 18:2f34d5167611
     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 **
   142 
   142 
   143     void init();
   143     void init();
   144     void close();
   144     void close();
   145 
   145 
   146     bool sendRequest();
   146     bool sendRequest();
   147     void receiveReply();
       
   148 
   147 
   149     bool ensureConnection();
   148     bool ensureConnection();
   150 
   149 
   151     bool expand(bool dataComplete);
   150     bool expand(bool dataComplete);
   152     void allDone(); // reply header + body have been read
   151     void allDone(); // reply header + body have been read
   153     void handleStatus(); // called from allDone()
   152     void handleStatus(); // called from allDone()
   154 
   153 
       
   154     bool resetUploadData(); // return true if resetting worked or there is no upload data
       
   155 
   155     void pipelineInto(HttpMessagePair &pair);
   156     void pipelineInto(HttpMessagePair &pair);
   156     void requeueCurrentlyPipelinedRequests();
   157     void requeueCurrentlyPipelinedRequests();
   157     void detectPipeliningSupport();
   158     void detectPipeliningSupport();
   158 
   159 
       
   160     void handleUnexpectedEOF();
   159     void closeAndResendCurrentRequest();
   161     void closeAndResendCurrentRequest();
   160 
   162 
   161     void eatWhitespace();
   163     void eatWhitespace();
   162 
   164 
   163     bool isSocketBusy() const;
   165     bool isSocketBusy() const;
   164     bool isSocketWriting() const;
   166     bool isSocketWriting() const;
   165     bool isSocketWaiting() const;
   167     bool isSocketWaiting() const;
   166     bool isSocketReading() const;
   168     bool isSocketReading() const;
   167 
   169 
   168     protected slots:
   170     protected slots:
       
   171     void _q_receiveReply();
   169     void _q_bytesWritten(qint64 bytes); // proceed sending
   172     void _q_bytesWritten(qint64 bytes); // proceed sending
   170     void _q_readyRead(); // pending data to read
   173     void _q_readyRead(); // pending data to read
   171     void _q_disconnected(); // disconnected from host
   174     void _q_disconnected(); // disconnected from host
   172     void _q_connected(); // start sending request
   175     void _q_connected(); // start sending request
   173     void _q_error(QAbstractSocket::SocketError); // error from socket
   176     void _q_error(QAbstractSocket::SocketError); // error from socket