myMPD settings API
More...
Go to the source code of this file.
|
| bool | settings_to_webserver (struct t_mympd_state *mympd_state) |
| |
| void | mympd_api_settings_statefiles_global_read (struct t_mympd_state *mympd_state) |
| |
| void | mympd_api_settings_statefiles_partition_read (struct t_partition_state *partition_state) |
| |
| sds | mympd_api_settings_get (struct t_mympd_state *mympd_state, struct t_partition_state *partition_state, sds buffer, unsigned request_id) |
| |
| bool | mympd_api_settings_view_save (struct t_mympd_state *mympd_state, sds view, sds mode, sds cols) |
| |
| bool | mympd_api_settings_set (const char *path, sds key, sds value, enum json_vtype vtype, validate_callback vcb, void *userdata, struct t_json_parse_error *error) |
| |
| bool | mympd_api_settings_mpd_options_set (const char *path, sds key, sds value, enum json_vtype vtype, validate_callback vcb, void *userdata, struct t_json_parse_error *error) |
| |
| bool | mympd_api_settings_connection_save (const char *path, sds key, sds value, enum json_vtype vtype, validate_callback vcb, void *userdata, struct t_json_parse_error *error) |
| |
| bool | mympd_api_settings_partition_set (const char *path, sds key, sds value, enum json_vtype vtype, validate_callback vcb, void *userdata, struct t_json_parse_error *error) |
| |
◆ mympd_api_settings_connection_save()
Saves connection specific settings
- Parameters
-
| path | jsonrpc path |
| key | setting key |
| value | setting value |
| vtype | value type |
| vcb | validation callback (unused) |
| userdata | pointer to the t_mympd_state struct |
| error | pointer to t_json_parse_error |
- Returns
- true on success, else false
◆ mympd_api_settings_get()
Prints all settings
- Parameters
-
| mympd_state | pointer to mympd state |
| partition_state | pointer to partition state |
| buffer | already allocated sds string to append the response |
| request_id | jsonrpc request id |
- Returns
- pointer to buffer
◆ mympd_api_settings_mpd_options_set()
Sets mpd options and jukebox settings
- Parameters
-
| path | jsonrpc path |
| key | setting key |
| value | setting value |
| vtype | value type |
| vcb | validation callback (unused) |
| userdata | pointer to the t_partition_state struct |
| error | pointer to t_json_parse_error |
- Returns
- true on success, else false
◆ mympd_api_settings_partition_set()
Saves partition settings
- Parameters
-
| path | jsonrpc path |
| key | setting key |
| value | setting value |
| vtype | value type |
| vcb | validation callback (unused) |
| userdata | pointer to partition state |
| error | pointer to t_json_parse_error |
- Returns
- true on success, else false
◆ mympd_api_settings_set()
Saves settings
- Parameters
-
| path | jsonrpc path |
| key | setting key |
| value | setting value |
| vtype | value type |
| vcb | validation callback (unused) |
| userdata | pointer to central myMPD state |
| error | pointer to t_json_parse_error |
- Returns
- true on success, else false
◆ mympd_api_settings_statefiles_global_read()
| void mympd_api_settings_statefiles_global_read |
( |
struct t_mympd_state * |
mympd_state | ) |
|
Reads the settings from the state files. If the state file does not exist, it is populated with the default value and created.
- Parameters
-
◆ mympd_api_settings_statefiles_partition_read()
| void mympd_api_settings_statefiles_partition_read |
( |
struct t_partition_state * |
partition_state | ) |
|
Reads the partition specific settings from the state files. If the state file does not exist, it is populated with the default value and created.
- Parameters
-
◆ mympd_api_settings_view_save()
| bool mympd_api_settings_view_save |
( |
struct t_mympd_state * |
mympd_state, |
|
|
sds |
view, |
|
|
sds |
mode, |
|
|
sds |
fields |
|
) |
| |
Saves columns
- Parameters
-
| mympd_state | pointer to the t_mympd_state struct |
| view | save columns for this view |
| mode | mode for this view: table, grid |
| fields | json object with the columns |
- Returns
- true on success, else false
◆ settings_to_webserver()
Pushes some settings to the webserver thread
- Parameters
-
| mympd_state | pointer to central myMPD state |
- Returns
- true on success, else false