Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
CWebServer Class Reference

#include <WebServer.h>

Classes

struct  ConnectionHandler
 

Public Member Functions

 CWebServer ()
 
virtual ~CWebServer ()=default
 
bool Start (uint16_t port, const std::string &username, const std::string &password)
 
bool Stop ()
 
bool IsStarted ()
 
void SetCredentials (const std::string &username, const std::string &password)
 
void RegisterRequestHandler (IHTTPRequestHandler *handler)
 
void UnregisterRequestHandler (IHTTPRequestHandler *handler)
 

Static Public Member Functions

static bool WebServerSupportsSSL ()
 

Protected Types

typedef struct CWebServer::ConnectionHandler ConnectionHandler
 

Protected Member Functions

virtual void LogRequest (const char *uri) const
 
virtual MHD_RESULT HandlePartialRequest (struct MHD_Connection *connection, ConnectionHandler *connectionHandler, const HTTPRequest &request, const char *upload_data, size_t *upload_data_size, void **con_cls)
 
virtual MHD_RESULT HandleRequest (const std::shared_ptr< IHTTPRequestHandler > &handler)
 
virtual MHD_RESULT FinalizeRequest (const std::shared_ptr< IHTTPRequestHandler > &handler, int responseStatus, struct MHD_Response *response)
 

Member Typedef Documentation

◆ ConnectionHandler

struct CWebServer::ConnectionHandler CWebServer::ConnectionHandler
protected

Constructor & Destructor Documentation

◆ CWebServer()

CWebServer::CWebServer ( )

◆ ~CWebServer()

virtual CWebServer::~CWebServer ( )
virtualdefault

Member Function Documentation

◆ FinalizeRequest()

MHD_RESULT CWebServer::FinalizeRequest ( const std::shared_ptr< IHTTPRequestHandler > & handler,
int responseStatus,
struct MHD_Response * response )
protectedvirtual

◆ HandlePartialRequest()

MHD_RESULT CWebServer::HandlePartialRequest ( struct MHD_Connection * connection,
ConnectionHandler * connectionHandler,
const HTTPRequest & request,
const char * upload_data,
size_t * upload_data_size,
void ** con_cls )
protectedvirtual

◆ HandleRequest()

MHD_RESULT CWebServer::HandleRequest ( const std::shared_ptr< IHTTPRequestHandler > & handler)
protectedvirtual

◆ IsStarted()

bool CWebServer::IsStarted ( )

◆ LogRequest()

void CWebServer::LogRequest ( const char * uri) const
protectedvirtual

◆ RegisterRequestHandler()

void CWebServer::RegisterRequestHandler ( IHTTPRequestHandler * handler)

◆ SetCredentials()

void CWebServer::SetCredentials ( const std::string & username,
const std::string & password )

◆ Start()

bool CWebServer::Start ( uint16_t port,
const std::string & username,
const std::string & password )

◆ Stop()

bool CWebServer::Stop ( )

◆ UnregisterRequestHandler()

void CWebServer::UnregisterRequestHandler ( IHTTPRequestHandler * handler)

◆ WebServerSupportsSSL()

bool CWebServer::WebServerSupportsSSL ( )
static

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