Variables API functions.
More...
◆ scripts_vars_delete()
| bool scripts_vars_delete |
( |
struct t_list * | script_var_list, |
|
|
sds | key ) |
Deletes a variable in the list
- Parameters
-
| script_var_list | pointer to script var list |
| key | key to remove |
- Returns
- true on success, else false
◆ scripts_vars_file_read()
| bool scripts_vars_file_read |
( |
struct t_list * | script_var_list, |
|
|
sds | workdir ) |
Reads the scripts variables from the filesystem
- Parameters
-
| script_var_list | pointer to script var list |
| workdir | working directory |
- Returns
- true on success, else false
◆ scripts_vars_file_save()
| bool scripts_vars_file_save |
( |
struct t_list * | script_var_list, |
|
|
sds | workdir ) |
Writes the home icons to the filesystem
- Parameters
-
| script_var_list | pointer to script var list |
| workdir | working directory |
- Returns
- true on success, else false
◆ scripts_vars_list()
| sds scripts_vars_list |
( |
struct t_list * | script_var_list, |
|
|
sds | buffer, |
|
|
unsigned | request_id ) |
Returns a jsonrpc response with all script variables
- Parameters
-
| script_var_list | pointer to script var list |
| buffer | buffer to append the response |
| request_id | jsonrpc request id |
- Returns
- pointer to buffer
◆ scripts_vars_save()
| bool scripts_vars_save |
( |
struct t_list * | script_var_list, |
|
|
sds | key, |
|
|
sds | value ) |
Adds/modifies a variable in the list
- Parameters
-
| script_var_list | pointer to script var list |
| key | name of the variable |
| value | value of the variable |
- Returns
- true on success, else false
◆ var_to_line_cb()
| sds var_to_line_cb |
( |
sds | buffer, |
|
|
struct t_list_node * | current, |
|
|
bool | newline ) |
|
static |
Callback function for mympd_api_script_vars_file_save
- Parameters
-
| buffer | buffer to append the line |
| current | list node to print |
| newline | append a newline char |
- Returns
- pointer to buffer