libyui-rest-api
Loading...
Searching...
No Matches
YHttpServer Class Reference

Public Member Functions

 YHttpServer (YHttpWidgetsActionHandler *widgets_action_handler)
 
void start ()
 
void stop ()
 
bool process_data ()
 
YHttpServerSockets sockets ()
 
void mount (std::string path, const std::string &method, YHttpHandler *handler, bool has_api_version=true)
 
MHD_RESULT handle (struct MHD_Connection *connection, const char *url, const char *method, const char *upload_data, size_t *upload_data_size)
 
std::string user () const
 
std::string passwd () const
 

Static Public Member Functions

static bool enabled ()
 
static YHttpServeryserver ()
 
static int port_num ()
 

Constructor & Destructor Documentation

◆ YHttpServer()

YHttpServer::YHttpServer ( YHttpWidgetsActionHandler widgets_action_handler)

Constructor to override widgets action handler. Is used in case there are UI specific actions for the widget.

Member Function Documentation

◆ process_data()

bool YHttpServer::process_data ( )

Process the data by the HTTP server

Returns
true if the UI content has been changed and it should be refreshed

◆ sockets()

YHttpServerSockets YHttpServer::sockets ( )

Return the list of the FDs used by the HTTP server, these should be watched by the UI in the main event loop (in addition to the user input)

◆ start()

void YHttpServer::start ( )

Start the HTTP server

◆ stop()

void YHttpServer::stop ( )

Stop the HTTP server. The server is also stopped automatically in the destructor.

◆ yserver()

static YHttpServer * YHttpServer::yserver ( )
inlinestatic

Access the global YHttpServer.


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