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

Central myMPD state for the mympd_api thread. More...

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

Go to the source code of this file.

Data Structures

struct  t_mympd_state

Functions

void mympd_state_save (struct t_mympd_state *mympd_state, bool free_data)
void mympd_state_default (struct t_mympd_state *mympd_state, struct t_config *config)
void mympd_state_free (struct t_mympd_state *mympd_state)

Detailed Description

Central myMPD state for the mympd_api thread.

Function Documentation

◆ mympd_state_default()

void mympd_state_default ( struct t_mympd_state * mympd_state,
struct t_config * config )

Sets mympd_state defaults.

Parameters
mympd_statepointer to central myMPD state
configpointer to static config

◆ mympd_state_free()

void mympd_state_free ( struct t_mympd_state * mympd_state)

Frees the myMPD state, frees also the referenced structs.

Parameters
mympd_statepointer to central myMPD state

◆ mympd_state_save()

void mympd_state_save ( struct t_mympd_state * mympd_state,
bool free_data )

Public functions

Saves in-memory states to disc. This is done on shutdown and on SIGHUP.

Parameters
mympd_statepointer to central myMPD state
free_datatrue=free the struct, else not