libmpd 0.20.0

Server

Functions

MpdDatampd_server_get_output_devices (MpdObj *mi)
int mpd_server_set_output_device (MpdObj *mi, int device_id, int state)
long unsigned mpd_server_get_database_update_time (MpdObj *mi)
int mpd_server_check_version (MpdObj *mi, int major, int minor, int micro)
char * mpd_server_get_version (MpdObj *mi)
int mpd_server_check_command_allowed (MpdObj *mi, const char *command)
char ** mpd_server_get_url_handlers (MpdObj *mi)
char ** mpd_server_get_tag_types (MpdObj *mi)

Detailed Description

Functions to get information about the mpd daemon and or modify it.


Function Documentation

int mpd_server_check_command_allowed ( MpdObj mi,
const char *  command 
)
Parameters:
mia MpdObj
commandthe command to check

Checks if the user is allowed to execute the command and if the server supports it

Returns:
Returns MpdServerCommand
Examples:
testcase.c.
int mpd_server_check_version ( MpdObj mi,
int  major,
int  minor,
int  micro 
)
Parameters:
mia MpdObj
majorthe major version number
minorthe minor version number
microthe micro version number

Checks if the connected mpd server version is equal or higher.

Returns:
TRUE when version of mpd equals or is higher, else FALSE
long unsigned mpd_server_get_database_update_time ( MpdObj mi)
Parameters:
mia MpdObj

Gets a unix timestamp of the last time the database was updated.

Returns:
unix Timestamp
MpdData* mpd_server_get_output_devices ( MpdObj mi)
Parameters:
mia MpdObj

Returns a list of audio output devices stored in a MpdData list

Returns:
a MpdData
char** mpd_server_get_tag_types ( MpdObj mi)
Parameters:
mia MpdObj
Returns:
an array with supported tag types. (NULL Terminated). Result must be freed.
char** mpd_server_get_url_handlers ( MpdObj mi)
Parameters:
mia MpdObj
Returns:
an array with urlhandlers (NULL terminated). Result must be freed.
char* mpd_server_get_version ( MpdObj mi)
Parameters:
mia MpdObj
Returns:
a string with version or NULL when not connected
int mpd_server_set_output_device ( MpdObj mi,
int  device_id,
int  state 
)
Parameters:
mia MpdObj
device_idThe id of the output device
stateThe state to change the output device to, 1 is enable, 0 is disable.

Enable or Disable an audio output device

Returns:
0 if successful