mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-12-04 15:39:34 +01:00
Implemented qhttp in server protocol
This commit is contained in:
committed by
Janek Bevendorff
parent
6dcb83f913
commit
5274826e5c
66
src/http/qhttp/qhttpclientresponse.cpp
Normal file
66
src/http/qhttp/qhttpclientresponse.cpp
Normal file
@@ -0,0 +1,66 @@
|
||||
#include "private/qhttpclientresponse_private.hpp"
|
||||
#include "qhttpclient.hpp"
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
namespace qhttp {
|
||||
namespace client {
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
QHttpResponse::QHttpResponse(QHttpClient *cli)
|
||||
: QHttpAbstractInput(cli), d_ptr(new QHttpResponsePrivate(cli, this)) {
|
||||
d_ptr->initialize();
|
||||
QHTTP_LINE_LOG
|
||||
}
|
||||
|
||||
QHttpResponse::QHttpResponse(QHttpResponsePrivate &dd, QHttpClient *cli)
|
||||
: QHttpAbstractInput(cli), d_ptr(&dd) {
|
||||
d_ptr->initialize();
|
||||
QHTTP_LINE_LOG
|
||||
}
|
||||
|
||||
QHttpResponse::~QHttpResponse() {
|
||||
QHTTP_LINE_LOG
|
||||
}
|
||||
|
||||
TStatusCode
|
||||
QHttpResponse::status() const {
|
||||
return d_func()->istatus;
|
||||
}
|
||||
|
||||
const QString&
|
||||
QHttpResponse::statusString() const {
|
||||
return d_func()->icustomStatusMessage;
|
||||
}
|
||||
|
||||
const QString&
|
||||
QHttpResponse::httpVersion() const {
|
||||
return d_func()->iversion;
|
||||
}
|
||||
|
||||
const THeaderHash&
|
||||
QHttpResponse::headers() const {
|
||||
return d_func()->iheaders;
|
||||
}
|
||||
|
||||
bool
|
||||
QHttpResponse::isSuccessful() const {
|
||||
return d_func()->isuccessful;
|
||||
}
|
||||
|
||||
void
|
||||
QHttpResponse::collectData(int atMost) {
|
||||
d_func()->collectData(atMost);
|
||||
}
|
||||
|
||||
const QByteArray&
|
||||
QHttpResponse::collectedData() const {
|
||||
return d_func()->icollectedData;
|
||||
}
|
||||
|
||||
QHttpClient*
|
||||
QHttpResponse::connection() const {
|
||||
return d_func()->iclient;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
} // namespace client
|
||||
} // namespace qhttp
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
Reference in New Issue
Block a user