|
myMPD
Internal API documentation
|
Lua script functions. More...


Go to the source code of this file.
Functions | |
| bool | script_start (struct t_scripts_state *scripts_state, sds scriptname, struct t_list *arguments, const char *partition, bool localscript, enum script_start_events start_event, unsigned request_id, unsigned long conn_id, sds *error) |
| bool | script_validate (struct t_config *config, sds scriptname, sds script, sds *error) |
Lua script functions.
| bool script_start | ( | struct t_scripts_state * | scripts_state, |
| sds | scriptname, | ||
| struct t_list * | arguments, | ||
| const char * | partition, | ||
| bool | localscript, | ||
| enum script_start_events | start_event, | ||
| unsigned | request_id, | ||
| unsigned long | conn_id, | ||
| sds * | error | ||
| ) |
Executes the script in a new thread.
| scripts_state | Pointer to script_state |
| scriptname | Script name to execute |
| arguments | Script arguments |
| partition | MPD Partition |
| localscript | Script is saved locally? |
| start_event | Event starting the script |
| request_id | Jsonrpc ID |
| conn_id | Mongoose request id |
| error | Pointer to already allocated sds string for the error message |
| bool script_validate | ( | struct t_config * | config, |
| sds | scriptname, | ||
| sds | script, | ||
| sds * | error | ||
| ) |
Validates (compiles) a lua script
| config | Pointer to config |
| scriptname | name of the script |
| script | the script itself |
| error | already allocated sds string to hold the error message |