|
Arduino DLNA Server
|
Abstract interface for HTTP server functionality. More...
#include <IHttpServer.h>

Public Member Functions | |
| virtual | ~IHttpServer ()=default |
| virtual IPAddress & | localIP ()=0 |
| Get the local IP address of the server. | |
| virtual bool | begin ()=0 |
| Start the HTTP server. | |
| virtual void | end ()=0 |
| Stop the HTTP server. | |
| virtual void | rewrite (const char *from, const char *to)=0 |
| Add URL rewrite rule. | |
| virtual void | on (const char *url, TinyMethodID method, web_callback_fn fn, void *ctx[]=nullptr, int ctxCount=0)=0 |
| Register callback for HTTP request with context. | |
| virtual void | on (const char *url, TinyMethodID method, const char *mime, web_callback_fn fn)=0 |
| Register callback for HTTP request with MIME type. | |
| virtual void | on (const char *url, TinyMethodID method, const char *mime, const char *result)=0 |
| Register static response for HTTP request. | |
| virtual void | on (const char *url, TinyMethodID method, const char *mime, const uint8_t *data, int len)=0 |
| Register binary data response for HTTP request. | |
| virtual void | on (const char *url, TinyMethodID method, Url &redirect)=0 |
| Register redirect response for HTTP request. | |
| virtual bool | onRequest (const char *path)=0 |
| Check if request matches registered handlers. | |
| virtual void | replyChunked (const char *contentType, Stream &inputStream, int status=200, const char *msg=SUCCESS)=0 |
| Send chunked response from input stream. | |
| virtual void | replyChunked (const char *contentType, int status=200, const char *msg=SUCCESS)=0 |
| Send chunked response with callback. | |
| virtual void | reply (const char *contentType, Stream &inputStream, int size, int status=200, const char *msg=SUCCESS)=0 |
| Send response from input stream with known size. | |
| virtual void | reply (const char *contentType, size_t(*callback)(Print &out, void *ref), int status=200, const char *msg=SUCCESS, void *ref=nullptr)=0 |
| Send response using callback function. | |
| virtual void | reply (const char *contentType, const char *str, int status=200, const char *msg=SUCCESS)=0 |
| Send string response. | |
| virtual void | reply (const char *contentType, const uint8_t *str, int len, int status=200, const char *msg=SUCCESS)=0 |
| Send binary data response. | |
| virtual void | replyOK ()=0 |
| Send 200 OK response. | |
| virtual void | replyNotFound ()=0 |
| Send 404 Not Found response. | |
| virtual void | replyError (int err, const char *msg="Internal Server Error")=0 |
| Send error response with status code. | |
| virtual HttpRequestHeader & | requestHeader ()=0 |
| Get reference to request header. | |
| virtual HttpReplyHeader & | replyHeader ()=0 |
| Get reference to reply header. | |
| virtual void | endClient ()=0 |
| Close the client connection. | |
| virtual void | crlf ()=0 |
| Send CRLF sequence. | |
| virtual void | addHandler (HttpRequestHandlerLine *handlerLinePtr)=0 |
| Add custom request handler. | |
| virtual bool | doLoop ()=0 |
| Process server loop. | |
| virtual bool | copy ()=0 |
| Create a copy of the server instance. | |
| virtual Client & | client ()=0 |
| Get reference to current client. | |
| virtual | operator bool ()=0 |
| Check if server is valid. | |
| virtual bool | isActive ()=0 |
| Check if server is active. | |
| virtual const char * | localHost ()=0 |
| Get local hostname. | |
| virtual void | setNoConnectDelay (int delay)=0 |
| Set no-connect delay. | |
| virtual Str | contentStr ()=0 |
| Get content as string. | |
| virtual void | setReference (void *reference)=0 |
| Set user reference pointer. | |
| virtual void * | getReference ()=0 |
| Get user reference pointer. | |
Abstract interface for HTTP server functionality.
Defines the contract for implementing an HTTP server that can handle requests, send responses, manage connections, and support various HTTP methods and content types. Provides methods for routing, response handling, header management, and server lifecycle.
|
virtualdefault |
|
pure virtual |
Add custom request handler.
Implemented in tiny_dlna::HttpServer< ClientType, ServerType >.
|
pure virtual |
Start the HTTP server.
Implemented in tiny_dlna::HttpServer< ClientType, ServerType >.
|
pure virtual |
Get reference to current client.
Implemented in tiny_dlna::HttpServer< ClientType, ServerType >.
|
pure virtual |
Get content as string.
Implemented in tiny_dlna::HttpServer< ClientType, ServerType >.
|
pure virtual |
Create a copy of the server instance.
Implemented in tiny_dlna::HttpServer< ClientType, ServerType >.
|
pure virtual |
Send CRLF sequence.
Implemented in tiny_dlna::HttpServer< ClientType, ServerType >.
|
pure virtual |
Process server loop.
Implemented in tiny_dlna::HttpServer< ClientType, ServerType >.
|
pure virtual |
Stop the HTTP server.
Implemented in tiny_dlna::HttpServer< ClientType, ServerType >.
|
pure virtual |
Close the client connection.
Implemented in tiny_dlna::HttpServer< ClientType, ServerType >.
|
pure virtual |
Get user reference pointer.
Implemented in tiny_dlna::HttpServer< ClientType, ServerType >.
|
pure virtual |
Check if server is active.
Implemented in tiny_dlna::HttpServer< ClientType, ServerType >.
|
pure virtual |
Get local hostname.
Implemented in tiny_dlna::HttpServer< ClientType, ServerType >.
|
pure virtual |
Get the local IP address of the server.
Implemented in tiny_dlna::HttpServer< ClientType, ServerType >.
|
pure virtual |
Register static response for HTTP request.
Implemented in tiny_dlna::HttpServer< ClientType, ServerType >.
|
pure virtual |
Register binary data response for HTTP request.
Implemented in tiny_dlna::HttpServer< ClientType, ServerType >.
|
pure virtual |
Register callback for HTTP request with MIME type.
Implemented in tiny_dlna::HttpServer< ClientType, ServerType >.
|
pure virtual |
Register redirect response for HTTP request.
Implemented in tiny_dlna::HttpServer< ClientType, ServerType >.
|
pure virtual |
Register callback for HTTP request with context.
Implemented in tiny_dlna::HttpServer< ClientType, ServerType >.
|
pure virtual |
Check if request matches registered handlers.
Implemented in tiny_dlna::HttpServer< ClientType, ServerType >.
|
pure virtual |
Check if server is valid.
Implemented in tiny_dlna::HttpServer< ClientType, ServerType >.
|
pure virtual |
Send string response.
Implemented in tiny_dlna::HttpServer< ClientType, ServerType >.
|
pure virtual |
Send binary data response.
Implemented in tiny_dlna::HttpServer< ClientType, ServerType >.
|
pure virtual |
Send response using callback function.
Implemented in tiny_dlna::HttpServer< ClientType, ServerType >.
|
pure virtual |
Send response from input stream with known size.
Implemented in tiny_dlna::HttpServer< ClientType, ServerType >.
|
pure virtual |
Send chunked response with callback.
Implemented in tiny_dlna::HttpServer< ClientType, ServerType >.
|
pure virtual |
Send chunked response from input stream.
Implemented in tiny_dlna::HttpServer< ClientType, ServerType >.
|
pure virtual |
Send error response with status code.
Implemented in tiny_dlna::HttpServer< ClientType, ServerType >.
|
pure virtual |
Get reference to reply header.
Implemented in tiny_dlna::HttpServer< ClientType, ServerType >.
|
pure virtual |
Send 404 Not Found response.
Implemented in tiny_dlna::HttpServer< ClientType, ServerType >.
|
pure virtual |
Send 200 OK response.
Implemented in tiny_dlna::HttpServer< ClientType, ServerType >.
|
pure virtual |
Get reference to request header.
Implemented in tiny_dlna::HttpServer< ClientType, ServerType >.
|
pure virtual |
Add URL rewrite rule.
Implemented in tiny_dlna::HttpServer< ClientType, ServerType >.
|
pure virtual |
Set no-connect delay.
Implemented in tiny_dlna::HttpServer< ClientType, ServerType >.
|
pure virtual |
Set user reference pointer.
Implemented in tiny_dlna::HttpServer< ClientType, ServerType >.