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

HTTP lua script handler. More...

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

Go to the source code of this file.

Functions

bool script_execute_http (struct mg_connection *nc, struct mg_http_message *hm, struct t_config *config)
 
bool script_execute_bgimage (struct mg_connection *nc, struct mg_http_message *hm)
 

Detailed Description

HTTP lua script handler.

Function Documentation

◆ script_execute_bgimage()

bool script_execute_bgimage ( struct mg_connection *  nc,
struct mg_http_message *  hm 
)

Emits the MYMPD_BGIMAGE trigger.

Parameters
ncmongoose connection
hmhttp message
Returns
true on success, else false

◆ script_execute_http()

bool script_execute_http ( struct mg_connection *  nc,
struct mg_http_message *  hm,
struct t_config config 
)

Executes the script as request handler.

Parameters
ncmongoose connection
hmhttp message
configPointer to config
Returns
true on success, else false