TTKMusicPlayer
4.1.3.0
TTKMusicPlayer imitates Kugou UI, the music player uses of qmmp core library based on Qt for windows and linux
|
The class of the http response. More...
#include <qhttpresponse.h>
Public Slots | |
void | setHeader (const QString &field, const QString &value) |
Sets a response header field to value . More... | |
void | writeHead (int statusCode) |
Writes the header section of the response using status as the response status code. More... | |
void | writeHead (StatusCode statusCode) |
void | write (const QByteArray &data) |
Writes a block of data to the client. More... | |
void | flush () |
Flushes the written data to the client. More... | |
void | waitForBytesWritten () |
Waiting for bytes to be written. See QAbstractSocket::waitForBytesWritten in the Qt documentation. More... | |
void | end (const QByteArray &data="") |
End/finish the response. More... | |
Signals | |
void | allBytesWritten () |
Emitted when all the data has been sent. More... | |
void | done () |
Emitted when the response is finished. More... | |
Private Slots | |
void | connectionClosed () |
Private Member Functions | |
QHttpResponse (QHttpConnection *connection) | |
void | setKeepAlive (bool alive) |
bool | isLast () const |
The class of the http response.
Definition at line 29 of file qhttpresponse.h.
HTTP status code.
Definition at line 34 of file qhttpresponse.h.
|
explicitprivate |
Definition at line 198 of file qhttpresponse.cpp.
References allBytesWritten(), TTK_D, and TTK_INIT_PRIVATE.
|
signal |
Emitted when all the data has been sent.
This signal indicates that the underlaying socket has transmitted all of it's buffered data. It is possible to implement memory-efficient file transfers by calling write() for a block of data only after receiving this signal.
Referenced by QHttpResponse().
|
privateslot |
Definition at line 264 of file qhttpresponse.cpp.
|
signal |
Emitted when the response is finished.
You should not interact with this object after done() has been emitted as the object has already been scheduled for deletion.
Referenced by connectionClosed(), and end().
|
slot |
End/finish the response.
Data will be flushed to the underlying socket and the connection itself will be closed if this is the last response.
This will emit done() and queue this object for deletion. For details see memorymanagement.
data | Optional data to be written before finishing. |
Definition at line 243 of file qhttpresponse.cpp.
References done(), TTK_D, and write().
Referenced by QDlnaFileServer::handleRequest().
|
slot |
Flushes the written data to the client.
Definition at line 231 of file qhttpresponse.cpp.
References TTK_D.
|
private |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 278 of file qhttpresponse.cpp.
References TTK_D.
Referenced by QHttpConnection::responseDone().
Sets a response header field
to value
.
field | Header field to be set. |
value | Header value to be set. |
Definition at line 207 of file qhttpresponse.cpp.
References TTK_D.
Referenced by QDlnaFileServer::handleRequest().
|
private |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 272 of file qhttpresponse.cpp.
References TTK_D.
Referenced by QHttpConnectionPrivate::HeadersComplete().
|
slot |
Waiting for bytes to be written. See QAbstractSocket::waitForBytesWritten in the Qt documentation.
Definition at line 237 of file qhttpresponse.cpp.
References TTK_D.
|
slot |
Writes a block of data
to the client.
Definition at line 225 of file qhttpresponse.cpp.
References TTK_D.
Referenced by end().
|
slot |
Writes the header section of the response using status
as the response status code.
statusCode | Status code for the response. |
Definition at line 213 of file qhttpresponse.cpp.
References TTK_D.
Referenced by QDlnaFileServer::handleRequest().
|
slot |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 219 of file qhttpresponse.cpp.
References TTK_D, and TTKStaticCast.