| QxOrm 1.5.0 C++ Object Relational Mapping library

- Main Page
- Modules
- Namespaces
- Classes
- Files
- Directories

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Types | Signals | Public Member Functions | Static Public Member Functions | Private Slots | Private Attributes
qx::QxHttpServer Class Reference
QxHttpServer : QxOrm library HTTP server (based on QxService module) : support SSL/TLS, persistent connection, deliver static files, REST API, etc...

qx::QxHttpServer : HTTP server which manages connections in a multi-threaded environment (support SSL/TLS, persistent connection, etc...) : https://www.qxorm.com/qxorm_en/manual.html#manual_96 More...

`#include <QxHttpServer.h>`

List of all members.

## Public Types
typedef std::function< void(qx::QxHttpRequest &, qx::QxHttpResponse &)> | type_fct_custom_request_handler
## Signals
void | error (const QString &err, qx::QxHttpTransaction_ptr transaction)
void | transactionStarted (qx::QxHttpTransaction_ptr transaction)
void | transactionFinished (qx::QxHttpTransaction_ptr transaction)
void | serverStatusChanged (bool bIsRunning)
## Public Member Functions
| QxHttpServer (QObject *parent=NULL)
virtual | ~QxHttpServer ()
Q_INVOKABLE void | startServer ()
Q_INVOKABLE void | stopServer ()
void | setCustomRequestHandler (type_fct_custom_request_handler fct)
QxHttpServer & | dispatch (const QString &command, const QString &path, type_fct_custom_request_handler fct, long position=-1)
void | beforeDispatching (type_fct_custom_request_handler fct)
void | afterDispatching (type_fct_custom_request_handler fct)
void | clearDispatcher ()
void | setEventDispatcher (QAbstractEventDispatcher *pEventDispatcher)
## Static Public Member Functions
static void | buildResponseStaticFile (qx::QxHttpRequest &request, qx::QxHttpResponse &response, const QString &serverPath, qlonglong chunkedSize=0)
static void | buildResponseQxRestApi (qx::QxHttpRequest &request, qx::QxHttpResponse &response)
## Private Slots
void | onError (const QString &err, qx::service::QxTransaction_ptr transaction)
void | onServerIsRunning (bool bIsRunning, qx::service::QxServer *pServer)
void | onTransactionStarted (qx::service::QxTransaction_ptr transaction)
void | onTransactionFinished (qx::service::QxTransaction_ptr transaction)
void | onCustomRequestHandler (qx::service::QxTransaction_ptr transaction)
## Private Attributes
std::unique_ptr< QxHttpServerImpl > | m_pImpl
| Private implementation idiom.

## Detailed Description

qx::QxHttpServer : HTTP server which manages connections in a multi-threaded environment (support SSL/TLS, persistent connection, etc...) : https://www.qxorm.com/qxorm_en/manual.html#manual_96

Definition at line 77 of file QxHttpServer.h.

## Member Typedef Documentation

typedef std::function<void (qx::QxHttpRequest &, qx::QxHttpResponse &)> qx::QxHttpServer::type_fct_custom_request_handler

Definition at line 84 of file QxHttpServer.h.

## Constructor & Destructor Documentation

qx::QxHttpServer::QxHttpServer | ( | QObject * | parent = `NULL` | ) |

virtual qx::QxHttpServer::~QxHttpServer | ( |  | ) | `[virtual]`

## Member Function Documentation

void qx::QxHttpServer::afterDispatching | ( | type_fct_custom_request_handler | fct | ) |

void qx::QxHttpServer::beforeDispatching | ( | type_fct_custom_request_handler | fct | ) |

static void qx::QxHttpServer::buildResponseQxRestApi | ( | qx::QxHttpRequest & | request,
|  | qx::QxHttpResponse & | response
| ) |  | `[static]`

static void qx::QxHttpServer::buildResponseStaticFile | ( | qx::QxHttpRequest & | request,
|  | qx::QxHttpResponse & | response,
|  | const QString & | serverPath,
|  | qlonglong | chunkedSize = `0`
| ) |  | `[static]`

void qx::QxHttpServer::clearDispatcher | ( |  | ) |

QxHttpServer& qx::QxHttpServer::dispatch | ( | const QString & | command,
|  | const QString & | path,
|  | type_fct_custom_request_handler | fct,
|  | long | position = `-1`
| ) |  |

void qx::QxHttpServer::error | ( | const QString & | err,
|  | qx::QxHttpTransaction_ptr | transaction
| ) |  | `[signal]`

void qx::QxHttpServer::onCustomRequestHandler | ( | qx::service::QxTransaction_ptr | transaction | ) | `[private, slot]`

void qx::QxHttpServer::onError | ( | const QString & | err,
|  | qx::service::QxTransaction_ptr | transaction
| ) |  | `[private, slot]`

void qx::QxHttpServer::onServerIsRunning | ( | bool | bIsRunning,
|  | qx::service::QxServer * | pServer
| ) |  | `[private, slot]`

void qx::QxHttpServer::onTransactionFinished | ( | qx::service::QxTransaction_ptr | transaction | ) | `[private, slot]`

void qx::QxHttpServer::onTransactionStarted | ( | qx::service::QxTransaction_ptr | transaction | ) | `[private, slot]`

void qx::QxHttpServer::serverStatusChanged | ( | bool | bIsRunning | ) | `[signal]`

void qx::QxHttpServer::setCustomRequestHandler | ( | type_fct_custom_request_handler | fct | ) |

void qx::QxHttpServer::setEventDispatcher | ( | QAbstractEventDispatcher * | pEventDispatcher | ) |

Q_INVOKABLE void qx::QxHttpServer::startServer | ( |  | ) |

Q_INVOKABLE void qx::QxHttpServer::stopServer | ( |  | ) |

void qx::QxHttpServer::transactionFinished | ( | qx::QxHttpTransaction_ptr | transaction | ) | `[signal]`

void qx::QxHttpServer::transactionStarted | ( | qx::QxHttpTransaction_ptr | transaction | ) | `[signal]`

## Member Data Documentation

std::unique_ptr<QxHttpServerImpl> qx::QxHttpServer::m_pImpl`[private]`

Private implementation idiom.

Definition at line 88 of file QxHttpServer.h.

The documentation for this class was generated from the following file:

- C:/Dev/_Perso/QxOrm/include/QxHttpServer/QxHttpServer.h