libmpd  11.8.17
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

◆ mpd_server_check_command_allowed()

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.

◆ mpd_server_check_version()

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

◆ mpd_server_get_database_update_time()

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

◆ mpd_server_get_output_devices()

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

◆ mpd_server_get_tag_types()

char** mpd_server_get_tag_types ( MpdObj mi)
Parameters
mia MpdObj
Returns
an array with supported tag types. (NULL Terminated). Result must be freed.

◆ mpd_server_get_url_handlers()

char** mpd_server_get_url_handlers ( MpdObj mi)
Parameters
mia MpdObj
Returns
an array with urlhandlers (NULL terminated). Result must be freed.

◆ mpd_server_get_version()

char* mpd_server_get_version ( MpdObj mi)
Parameters
mia MpdObj
Returns
a string with version or NULL when not connected

◆ mpd_server_set_output_device()

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

Copyright 2006 Qball Cow