36#ifdef _QX_ENABLE_QT_NETWORK
37#ifndef _QX_HTTP_SERVER_H_
38#define _QX_HTTP_SERVER_H_
51#ifdef _QX_NO_PRECOMPILED_HEADER
67#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
68class QAbstractEventDispatcher;
88 struct QxHttpServerImpl;
89 std::unique_ptr<QxHttpServerImpl>
m_pImpl;
105#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
List of parameters to compile and build QxOrm library.
Define connection parameters used by QxService module of QxOrm library.
HTTP request (headers + body)
HTTP response (headers + body)
qx::QxHttpServer qx_http_server
HTTP transaction (contains request from client and reply from server)
Server side to manage a thread pool of incoming connections (new request from client)
Transaction of QxService module (contains request from client and reply from server)
qx::QxHttpRequest : HTTP request (headers + body)
qx::QxHttpResponse : HTTP response (headers + body)
qx::QxHttpServer : HTTP server which manages connections in a multi-threaded environment (support SSL...
void onError(const QString &err, qx::service::QxTransaction_ptr transaction)
std::unique_ptr< QxHttpServerImpl > m_pImpl
Private implementation idiom.
Q_INVOKABLE void startServer()
QxHttpServer(QObject *parent=NULL)
void onCustomRequestHandler(qx::service::QxTransaction_ptr transaction)
void onTransactionFinished(qx::service::QxTransaction_ptr transaction)
void beforeDispatching(type_fct_custom_request_handler fct)
void error(const QString &err, qx::QxHttpTransaction_ptr transaction)
void transactionStarted(qx::QxHttpTransaction_ptr transaction)
void onServerIsRunning(bool bIsRunning, qx::service::QxServer *pServer)
std::function< void(qx::QxHttpRequest &, qx::QxHttpResponse &)> type_fct_custom_request_handler
QxHttpServer & dispatch(const QString &command, const QString &path, type_fct_custom_request_handler fct, long position=-1)
Q_INVOKABLE void stopServer()
void transactionFinished(qx::QxHttpTransaction_ptr transaction)
static void buildResponseQxRestApi(qx::QxHttpRequest &request, qx::QxHttpResponse &response)
void serverStatusChanged(bool bIsRunning)
void afterDispatching(type_fct_custom_request_handler fct)
void setCustomRequestHandler(type_fct_custom_request_handler fct)
static void buildResponseStaticFile(qx::QxHttpRequest &request, qx::QxHttpResponse &response, const QString &serverPath, qlonglong chunkedSize=0)
void onTransactionStarted(qx::service::QxTransaction_ptr transaction)
void setEventDispatcher(QAbstractEventDispatcher *pEventDispatcher)
qx::service::QxServer : server side to manage a thread pool of incoming connections (new request from...
std::shared_ptr< QxTransaction > QxTransaction_ptr
Root namespace for all QxOrm library features.
std::shared_ptr< QxHttpServer > QxHttpServer_ptr
std::shared_ptr< QxHttpTransaction > QxHttpTransaction_ptr