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

Variables API functions. More...

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

Go to the source code of this file.

Functions

bool scripts_vars_delete (struct t_list *script_var_list, sds key)
 
bool scripts_vars_save (struct t_list *script_var_list, sds key, sds value)
 
bool scripts_vars_file_read (struct t_list *script_var_list, sds workdir)
 
bool scripts_vars_file_save (struct t_list *script_var_list, sds workdir)
 
sds scripts_vars_list (struct t_list *script_var_list, sds buffer, unsigned request_id)
 

Detailed Description

Variables API functions.

Function Documentation

◆ scripts_vars_delete()

bool scripts_vars_delete ( struct t_list script_var_list,
sds  key 
)

Deletes a variable in the list

Parameters
script_var_listpointer to script var list
keykey 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_listpointer to script var list
workdirworking 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_listpointer to script var list
workdirworking 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_listpointer to script var list
bufferbuffer to append the response
request_idjsonrpc 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_listpointer to script var list
keyname of the variable
valuevalue of the variable
Returns
true on success, else false