libmpd.h File Reference

#include "libmpdclient.h"
#include "libmpd-version.h"
#include "libmpd-player.h"
#include "libmpd-status.h"
#include "libmpd-database.h"
#include "libmpd-playlist.h"
#include "libmpd-strfsong.h"
#include "libmpd-sticker.h"

Go to the source code of this file.

Data Structures

struct  _MpdData

Defines

#define TRUE   1
#define FALSE   0

Typedefs

typedef struct _MpdObj MpdObj
typedef struct _MpdData MpdData
typedef void(* StatusChangedCallback )(MpdObj *mi, ChangedStatusType what, void *userdata)
typedef int(* ErrorCallback )(MpdObj *mi, int id, char *msg, void *userdata)
typedef void(* ConnectionChangedCallback )(MpdObj *mi, int connect, void *userdata)

Enumerations

enum  MpdError {
  MPD_OK = 0, MPD_ARGS_ERROR = -5, MPD_NOT_CONNECTED = -10, MPD_STATUS_FAILED = -20,
  MPD_LOCK_FAILED = -30, MPD_STATS_FAILED = -40, MPD_SERVER_ERROR = -50, MPD_SERVER_NOT_SUPPORTED = -51,
  MPD_DATABASE_PLAYLIST_EXIST = -60, MPD_PLAYLIST_EMPTY = -70, MPD_PLAYLIST_QUEUE_EMPTY = -75, MPD_PLAYER_NOT_PLAYING = -80,
  MPD_TAG_NOT_FOUND = -90, MPD_FATAL_ERROR = -1000
}
enum  MpdServerCommand { MPD_SERVER_COMMAND_ALLOWED = TRUE, MPD_SERVER_COMMAND_NOT_ALLOWED = FALSE, MPD_SERVER_COMMAND_NOT_SUPPORTED = -1, MPD_SERVER_COMMAND_ERROR = -2 }
enum  MpdDataType {
  MPD_DATA_TYPE_NONE, MPD_DATA_TYPE_TAG, MPD_DATA_TYPE_DIRECTORY, MPD_DATA_TYPE_SONG,
  MPD_DATA_TYPE_PLAYLIST, MPD_DATA_TYPE_OUTPUT_DEV
}
enum  ChangedStatusType {
  MPD_CST_PLAYLIST = 0x0001, MPD_CST_SONGPOS = 0x0002, MPD_CST_SONGID = 0x0004, MPD_CST_DATABASE = 0x0008,
  MPD_CST_UPDATING = 0x0010, MPD_CST_VOLUME = 0x0020, MPD_CST_TOTAL_TIME = 0x0040, MPD_CST_ELAPSED_TIME = 0x0080,
  MPD_CST_CROSSFADE = 0x0100, MPD_CST_RANDOM = 0x0200, MPD_CST_REPEAT = 0x0400, MPD_CST_AUDIO = 0x0800,
  MPD_CST_STATE = 0x1000, MPD_CST_PERMISSION = 0x2000, MPD_CST_BITRATE = 0x4000, MPD_CST_AUDIOFORMAT = 0x8000,
  MPD_CST_STORED_PLAYLIST = 0x20000, MPD_CST_SERVER_ERROR = 0x40000, MPD_CST_OUTPUT = 0x80000, MPD_CST_STICKER = 0x100000
}

Functions

MpdObjmpd_new_default ()
MpdObjmpd_new (char *hostname, int port, char *password)
int mpd_set_hostname (MpdObj *mi, char *hostname)
const char * mpd_get_hostname (MpdObj *mi)
int mpd_set_password (MpdObj *mi, const char *password)
int mpd_set_port (MpdObj *mi, int port)
int mpd_set_connection_timeout (MpdObj *mi, float timeout)
int mpd_connect_real (MpdObj *mi, mpd_Connection *connection)
int mpd_connect (MpdObj *mi)
int mpd_disconnect (MpdObj *mi)
int mpd_check_connected (MpdObj *mi)
int mpd_check_error (MpdObj *mi)
void mpd_free (MpdObj *mi)
int mpd_send_password (MpdObj *mi)
void mpd_signal_connect_status_changed (MpdObj *mi, StatusChangedCallback status_changed, void *userdata)
void mpd_signal_connect_error (MpdObj *mi, ErrorCallback error, void *userdata)
void mpd_signal_connect_connection_changed (MpdObj *mi, ConnectionChangedCallback connection_changed, void *userdata)
int mpd_data_is_last (MpdData const *data)
void mpd_data_free (MpdData *data)
MpdDatampd_data_get_next (MpdData *data)
MpdDatampd_data_get_first (MpdData const *data)
MpdDatampd_data_delete_item (MpdData *data)
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)
int mpd_misc_get_tag_by_name (char *name)
int mpd_server_has_idle (MpdObj *mi)
int mpd_server_tag_supported (MpdObj *mi, int tag)

Variables

char * libmpd_version


Function Documentation

int mpd_server_has_idle ( MpdObj mi  ) 

Parameters:
mi a MpdObj
Reports if the connected mpd supports the idle command.

Returns:
a boolean, TRUE if it has idle support

int mpd_server_tag_supported ( MpdObj mi,
int  tag 
)

Parameters:
mi a MpdObj
tag a mpd_TagItems
Returns if mpd supports this tag.

return 1 if support 0 if not


Copyright 2006 Qball Cow