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

Jukebox library. More...

#include <stdbool.h>
Include dependency graph for jukebox.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  jukebox_modes {
  JUKEBOX_OFF , JUKEBOX_ADD_SONG , JUKEBOX_ADD_ALBUM , JUKEBOX_SCRIPT ,
  JUKEBOX_UNKNOWN
}
 

Functions

enum jukebox_modes jukebox_mode_parse (const char *str)
 
const char * jukebox_mode_lookup (enum jukebox_modes mode)
 
bool jukebox_file_save (struct t_partition_state *partition_state)
 
bool jukebox_file_read (struct t_partition_state *partition_state)
 

Detailed Description

Jukebox library.

Enumeration Type Documentation

◆ jukebox_modes

Jukebox state

Enumerator
JUKEBOX_OFF 

jukebox is disabled

JUKEBOX_ADD_SONG 

jukebox adds single songs

JUKEBOX_ADD_ALBUM 

jukebox adds whole albums

JUKEBOX_SCRIPT 

jukebox queue is filled by a script

JUKEBOX_UNKNOWN 

jukebox mode is unknown

Function Documentation

◆ jukebox_file_read()

bool jukebox_file_read ( struct t_partition_state partition_state)

Reads the jukebox list from disc

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

◆ jukebox_file_save()

bool jukebox_file_save ( struct t_partition_state partition_state)

Saves the jukebox list to disc

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

◆ jukebox_mode_lookup()

const char * jukebox_mode_lookup ( enum jukebox_modes  mode)

Returns the jukebox mode as string

Parameters
modethe jukebox mode
Returns
jukebox mode as string

◆ jukebox_mode_parse()

enum jukebox_modes jukebox_mode_parse ( const char *  str)

Parses the string to the jukebox mode

Parameters
strstring to parse
Returns
jukebox mode