Arduino DLNA Server
Loading...
Searching...
No Matches
Public Member Functions | List of all members
tiny_dlna::IHttpServer Class Referenceabstract

Abstract interface for HTTP server functionality. More...

#include <IHttpServer.h>

Inheritance diagram for tiny_dlna::IHttpServer:
Inheritance graph
[legend]

Public Member Functions

virtual ~IHttpServer ()=default
 
virtual IPAddress & localIP ()=0
 
virtual bool begin ()=0
 
virtual void end ()=0
 
virtual void rewrite (const char *from, const char *to)=0
 
virtual void on (const char *url, TinyMethodID method, web_callback_fn fn, void *ctx[]=nullptr, int ctxCount=0)=0
 
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 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 operator bool ()=0
 
virtual bool isActive ()=0
 
virtual const char * localHost ()=0
 
virtual void setNoConnectDelay (int delay)=0
 
virtual void setReference (void *reference)=0
 
virtual void * getReference ()=0
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ ~IHttpServer()

virtual tiny_dlna::IHttpServer::~IHttpServer ( )
virtualdefault

Member Function Documentation

◆ addHandler()

virtual void tiny_dlna::IHttpServer::addHandler ( HttpRequestHandlerLine handlerLinePtr)
pure virtual

Add custom request handler.

Implemented in tiny_dlna::HttpServer< ClientType, ServerType >.

◆ begin()

virtual bool tiny_dlna::IHttpServer::begin ( )
pure virtual

◆ copy()

virtual bool tiny_dlna::IHttpServer::copy ( )
pure virtual

Create a copy of the server instance.

Implemented in tiny_dlna::HttpServer< ClientType, ServerType >.

◆ doLoop()

virtual bool tiny_dlna::IHttpServer::doLoop ( )
pure virtual

◆ end()

virtual void tiny_dlna::IHttpServer::end ( )
pure virtual

◆ getReference()

virtual void * tiny_dlna::IHttpServer::getReference ( )
pure virtual

◆ isActive()

virtual bool tiny_dlna::IHttpServer::isActive ( )
pure virtual

◆ localHost()

virtual const char * tiny_dlna::IHttpServer::localHost ( )
pure virtual

◆ localIP()

virtual IPAddress & tiny_dlna::IHttpServer::localIP ( )
pure virtual

◆ on() [1/5]

virtual void tiny_dlna::IHttpServer::on ( const char *  url,
TinyMethodID  method,
const char *  mime,
const char *  result 
)
pure virtual

Register static response for HTTP request.

Implemented in tiny_dlna::HttpServer< ClientType, ServerType >.

◆ on() [2/5]

virtual void tiny_dlna::IHttpServer::on ( const char *  url,
TinyMethodID  method,
const char *  mime,
const uint8_t *  data,
int  len 
)
pure virtual

Register binary data response for HTTP request.

Implemented in tiny_dlna::HttpServer< ClientType, ServerType >.

◆ on() [3/5]

virtual void tiny_dlna::IHttpServer::on ( const char *  url,
TinyMethodID  method,
const char *  mime,
web_callback_fn  fn 
)
pure virtual

Register callback for HTTP request with MIME type.

Implemented in tiny_dlna::HttpServer< ClientType, ServerType >.

◆ on() [4/5]

virtual void tiny_dlna::IHttpServer::on ( const char *  url,
TinyMethodID  method,
Url redirect 
)
pure virtual

Register redirect response for HTTP request.

Implemented in tiny_dlna::HttpServer< ClientType, ServerType >.

◆ on() [5/5]

virtual void tiny_dlna::IHttpServer::on ( const char *  url,
TinyMethodID  method,
web_callback_fn  fn,
void *  ctx[] = nullptr,
int  ctxCount = 0 
)
pure virtual

◆ onRequest()

virtual bool tiny_dlna::IHttpServer::onRequest ( const char *  path)
pure virtual

Check if request matches registered handlers.

Implemented in tiny_dlna::HttpServer< ClientType, ServerType >.

◆ operator bool()

virtual tiny_dlna::IHttpServer::operator bool ( )
pure virtual

◆ rewrite()

virtual void tiny_dlna::IHttpServer::rewrite ( const char *  from,
const char *  to 
)
pure virtual

◆ setNoConnectDelay()

virtual void tiny_dlna::IHttpServer::setNoConnectDelay ( int  delay)
pure virtual

◆ setReference()

virtual void tiny_dlna::IHttpServer::setReference ( void *  reference)
pure virtual

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