myMPD
Internal API documentation
Loading...
Searching...
No Matches
webserver.h File Reference

Webserver implementation. More...

#include "src/lib/config_def.h"
#include "src/webserver/utility.h"
#include <stdbool.h>
Include dependency graph for webserver.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void * webserver_loop (void *arg_mgr)
 
bool webserver_init (struct mg_mgr *mgr, struct t_config *config, struct t_mg_user_data *mg_user_data)
 
bool webserver_read_certs (struct t_mg_user_data *mg_user_data, struct t_config *config)
 
void * webserver_free (struct mg_mgr *mgr)
 

Detailed Description

Webserver implementation.

Function Documentation

◆ webserver_free()

void * webserver_free ( struct mg_mgr *  mgr)

Frees the mongoose mgr

Parameters
mgrmongoose mgr to free
Returns
NULL

◆ webserver_init()

bool webserver_init ( struct mg_mgr *  mgr,
struct t_config config,
struct t_mg_user_data mg_user_data 
)

Public functions Initializes the webserver

Parameters
mgrmongoose mgr
configpointer to myMPD config
mg_user_dataalready allocated t_mg_user_data to populate
Returns
true on success, else false

◆ webserver_loop()

void * webserver_loop ( void *  arg_mgr)

Main function for the webserver thread

Parameters
arg_mgrvoid pointer to mongoose mgr
Returns
NULL

◆ webserver_read_certs()

bool webserver_read_certs ( struct t_mg_user_data mg_user_data,
struct t_config config 
)

Reads the ssl key and certificate from disc

Parameters
mg_user_datapointer to mongoose user data
configpointer to myMPD config
Returns
true on success, else false