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:
mi a MpdObj
command the 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:
mi a MpdObj
major the major version number
minor the minor version number
micro the 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:
mi a 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:
mi a 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:
mi a MpdObj
Returns:
an array with supported tag types. (NULL Terminated). Result must be freed.

char** mpd_server_get_url_handlers ( MpdObj mi  ) 

Parameters:
mi a MpdObj
Returns:
an array with urlhandlers (NULL terminated). Result must be freed.

char* mpd_server_get_version ( MpdObj mi  ) 

Parameters:
mi a 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:
mi a MpdObj
device_id The id of the output device
state The 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