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

MPD presets functions. More...

Include dependency graph for presets.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

bool preset_apply (struct t_partition_state *partition_state, sds preset_name, sds *error)
sds presets_list (struct t_list *preset_list, sds buffer)
bool preset_save (struct t_list *preset_list, sds preset_name, sds preset_value, sds *error)
bool preset_delete (struct t_list *preset_list, const char *preset_name)
bool preset_list_save (struct t_partition_state *partition_state)
bool preset_list_load (struct t_partition_state *partition_state)

Detailed Description

MPD presets functions.

Function Documentation

◆ preset_apply()

bool preset_apply ( struct t_partition_state * partition_state,
sds preset_name,
sds * error )

Applies a preset

Parameters
partition_statepointer to partition state
preset_namepreset name
errorpointer to already allocated sds string to append the error message
Returns
true on success, else false

◆ preset_delete()

bool preset_delete ( struct t_list * preset_list,
const char * preset_name )

Deletes a preset

Parameters
preset_listpointer to preset list
preset_namepreset name
Returns
bool

◆ preset_list_load()

bool preset_list_load ( struct t_partition_state * partition_state)

Reads the presets file from disc

Parameters
partition_statepointer to partition state
Returns
bool true on success, else false

◆ preset_list_save()

bool preset_list_save ( struct t_partition_state * partition_state)

Writes the preset list to disc

Parameters
partition_statepointer to partition state
Returns
bool true on success, else false

◆ preset_save()

bool preset_save ( struct t_list * preset_list,
sds preset_name,
sds preset_value,
sds * error )

Saves a preset

Parameters
preset_listpointer to preset list
preset_namepreset name
preset_valuepreset value (stringified json)
errorpointer to alreay allocated sds string to append the error message
Returns
true on success, else false

◆ presets_list()

sds presets_list ( struct t_list * preset_list,
sds buffer )

Prints the list of presets as json array

Parameters
preset_listpreset list
buffersds string to append the array
Returns
sds pointer to buffer