libmpd  0.19.0
libmpdclient.h File Reference
#include <sys/time.h>
#include <stdarg.h>

Go to the source code of this file.

Data Structures

struct  _mpd_ReturnElement
struct  _mpd_Connection
struct  mpd_Status
struct  _mpd_Stats
struct  _mpd_SearchStats
struct  _mpd_Song
struct  _mpd_Directory
struct  _mpd_PlaylistFile
struct  mpd_InfoEntity
struct  _mpd_OutputEntity

Defines

#define MPD_BUFFER_MAX_LENGTH   50000
#define MPD_ERRORSTR_MAX_LENGTH   1000
#define MPD_WELCOME_MESSAGE   "OK MPD "
#define MPD_ERROR_TIMEOUT   10 /* timeout trying to talk to mpd */
#define MPD_ERROR_SYSTEM   11 /* system error */
#define MPD_ERROR_UNKHOST   12 /* unknown host */
#define MPD_ERROR_CONNPORT   13 /* problems connecting to port on host */
#define MPD_ERROR_NOTMPD   14 /* mpd not running on port at host */
#define MPD_ERROR_NORESPONSE   15 /* no response on attempting to connect */
#define MPD_ERROR_SENDING   16 /* error sending command */
#define MPD_ERROR_CONNCLOSED   17 /* connection closed by mpd */
#define MPD_ERROR_ACK   18 /* ACK returned! */
#define MPD_ERROR_BUFFEROVERRUN   19 /* Buffer was overrun! */
#define MPD_ACK_ERROR_UNK   -1
#define MPD_ERROR_AT_UNK   -1
#define MPD_ACK_ERROR_NOT_LIST   1
#define MPD_ACK_ERROR_ARG   2
#define MPD_ACK_ERROR_PASSWORD   3
#define MPD_ACK_ERROR_PERMISSION   4
#define MPD_ACK_ERROR_UNKNOWN_CMD   5
#define MPD_ACK_ERROR_NO_EXIST   50
#define MPD_ACK_ERROR_PLAYLIST_MAX   51
#define MPD_ACK_ERROR_SYSTEM   52
#define MPD_ACK_ERROR_PLAYLIST_LOAD   53
#define MPD_ACK_ERROR_UPDATE_ALREADY   54
#define MPD_ACK_ERROR_PLAYER_SYNC   55
#define MPD_ACK_ERROR_EXIST   56
#define MPD_STATUS_STATE_UNKNOWN   0
#define MPD_STATUS_STATE_STOP   1
#define MPD_STATUS_STATE_PLAY   2
#define MPD_STATUS_STATE_PAUSE   3
#define MPD_STATUS_NO_VOLUME   -1
#define MPD_SONG_NO_TIME   -1
#define MPD_SONG_NO_NUM   -1
#define MPD_SONG_NO_ID   -1
#define MPD_INFO_ENTITY_TYPE_DIRECTORY   0
#define MPD_INFO_ENTITY_TYPE_SONG   1
#define MPD_INFO_ENTITY_TYPE_PLAYLISTFILE   2
#define MPD_TABLE_ARTIST   MPD_TAG_ITEM_ARTIST
#define MPD_TABLE_ALBUM   MPD_TAG_ITEM_ALBUM
#define MPD_TABLE_TITLE   MPD_TAG_ITEM_TITLE
#define MPD_TABLE_FILENAME   MPD_TAG_ITEM_FILENAME
#define MPD_PLAY_AT_BEGINNING   -1

Typedefs

typedef enum mpd_TagItems mpd_TagItems
typedef struct _mpd_ReturnElement mpd_ReturnElement
typedef struct _mpd_Connection mpd_Connection
typedef struct mpd_Status mpd_Status
typedef struct _mpd_Stats mpd_Stats
typedef struct _mpd_SearchStats mpd_SearchStats
typedef struct _mpd_Song mpd_Song
typedef struct _mpd_Directory mpd_Directory
typedef struct _mpd_PlaylistFile mpd_PlaylistFile
typedef struct mpd_InfoEntity mpd_InfoEntity
typedef struct _mpd_OutputEntity mpd_OutputEntity

Enumerations

enum  mpd_TagItems {
  MPD_TAG_ITEM_ARTIST, MPD_TAG_ITEM_ALBUM, MPD_TAG_ITEM_TITLE, MPD_TAG_ITEM_TRACK,
  MPD_TAG_ITEM_NAME, MPD_TAG_ITEM_GENRE, MPD_TAG_ITEM_DATE, MPD_TAG_ITEM_COMPOSER,
  MPD_TAG_ITEM_PERFORMER, MPD_TAG_ITEM_COMMENT, MPD_TAG_ITEM_DISC, MPD_TAG_ITEM_FILENAME,
  MPD_TAG_ITEM_ALBUM_ARTIST, MPD_TAG_ITEM_ANY, MPD_TAG_NUM_OF_ITEM_TYPES
}

Functions

mpd_Connectionmpd_newConnection (const char *host, int port, float timeout)
void mpd_setConnectionTimeout (mpd_Connection *connection, float timeout)
void mpd_closeConnection (mpd_Connection *connection)
void mpd_clearError (mpd_Connection *connection)
void mpd_sendStatusCommand (mpd_Connection *connection)
mpd_Statusmpd_getStatus (mpd_Connection *connection)
void mpd_freeStatus (mpd_Status *status)
void mpd_sendStatsCommand (mpd_Connection *connection)
mpd_Statsmpd_getStats (mpd_Connection *connection)
void mpd_freeStats (mpd_Stats *stats)
mpd_SearchStatsmpd_getSearchStats (mpd_Connection *connection)
void mpd_freeSearchStats (mpd_SearchStats *stats)
mpd_Songmpd_newSong (void)
void mpd_freeSong (mpd_Song *song)
mpd_Songmpd_songDup (const mpd_Song *song)
mpd_Directorympd_newDirectory (void)
void mpd_freeDirectory (mpd_Directory *directory)
mpd_Directorympd_directoryDup (mpd_Directory *directory)
mpd_PlaylistFilempd_newPlaylistFile (void)
void mpd_freePlaylistFile (mpd_PlaylistFile *playlist)
mpd_PlaylistFilempd_playlistFileDup (mpd_PlaylistFile *playlist)
mpd_InfoEntitympd_newInfoEntity (void)
void mpd_freeInfoEntity (mpd_InfoEntity *entity)
mpd_InfoEntitympd_getNextInfoEntity (mpd_Connection *connection)
void mpd_sendCurrentSongCommand (mpd_Connection *connection)
void mpd_sendPlaylistInfoCommand (mpd_Connection *connection, int songNum)
void mpd_sendPlaylistIdCommand (mpd_Connection *connection, int songId)
void mpd_sendPlChangesCommand (mpd_Connection *connection, long long playlist)
void mpd_sendPlChangesPosIdCommand (mpd_Connection *connection, long long playlist)
void mpd_sendListallCommand (mpd_Connection *connection, const char *dir)
void mpd_sendListallInfoCommand (mpd_Connection *connection, const char *dir)
void mpd_sendLsInfoCommand (mpd_Connection *connection, const char *dir)
void mpd_sendSearchCommand (mpd_Connection *connection, int table, const char *str)
void mpd_sendFindCommand (mpd_Connection *connection, int table, const char *str)
char * mpd_getNextArtist (mpd_Connection *connection)
char * mpd_getNextAlbum (mpd_Connection *connection)
char * mpd_getNextTag (mpd_Connection *connection, int type)
void mpd_sendListCommand (mpd_Connection *connection, int table, const char *arg1)
void mpd_sendAddCommand (mpd_Connection *connection, const char *file)
int mpd_sendAddIdCommand (mpd_Connection *connection, const char *file)
void mpd_sendDeleteCommand (mpd_Connection *connection, int songNum)
void mpd_sendDeleteIdCommand (mpd_Connection *connection, int songNum)
void mpd_sendSaveCommand (mpd_Connection *connection, const char *name)
void mpd_sendLoadCommand (mpd_Connection *connection, const char *name)
void mpd_sendRmCommand (mpd_Connection *connection, const char *name)
void mpd_sendRenameCommand (mpd_Connection *connection, const char *from, const char *to)
void mpd_sendShuffleCommand (mpd_Connection *connection)
void mpd_sendClearCommand (mpd_Connection *connection)
void mpd_sendPlayCommand (mpd_Connection *connection, int songNum)
void mpd_sendPlayIdCommand (mpd_Connection *connection, int songNum)
void mpd_sendStopCommand (mpd_Connection *connection)
void mpd_sendPauseCommand (mpd_Connection *connection, int pauseMode)
void mpd_sendNextCommand (mpd_Connection *connection)
void mpd_sendPrevCommand (mpd_Connection *connection)
void mpd_sendMoveCommand (mpd_Connection *connection, int from, int to)
void mpd_sendMoveIdCommand (mpd_Connection *connection, int from, int to)
void mpd_sendSwapCommand (mpd_Connection *connection, int song1, int song2)
void mpd_sendSwapIdCommand (mpd_Connection *connection, int song1, int song2)
void mpd_sendSeekCommand (mpd_Connection *connection, int song, int seek_time)
void mpd_sendSeekIdCommand (mpd_Connection *connection, int song, int seek_time)
void mpd_sendRepeatCommand (mpd_Connection *connection, int repeatMode)
void mpd_sendSingleCommand (mpd_Connection *connection, int singleMode)
void mpd_sendConsumeCommand (mpd_Connection *connection, int consumeMode)
void mpd_sendRandomCommand (mpd_Connection *connection, int randomMode)
void mpd_sendSetvolCommand (mpd_Connection *connection, int volumeChange)
void mpd_sendCrossfadeCommand (mpd_Connection *connection, int seconds)
void mpd_sendUpdateCommand (mpd_Connection *connection, const char *path)
int mpd_getUpdateId (mpd_Connection *connection)
void mpd_sendPasswordCommand (mpd_Connection *connection, const char *pass)
void mpd_finishCommand (mpd_Connection *connection)
void mpd_sendCommandListBegin (mpd_Connection *connection)
void mpd_sendCommandListOkBegin (mpd_Connection *connection)
void mpd_sendCommandListEnd (mpd_Connection *connection)
int mpd_nextListOkCommand (mpd_Connection *connection)
void mpd_sendOutputsCommand (mpd_Connection *connection)
mpd_OutputEntitympd_getNextOutput (mpd_Connection *connection)
void mpd_sendEnableOutputCommand (mpd_Connection *connection, int outputId)
void mpd_sendDisableOutputCommand (mpd_Connection *connection, int outputId)
void mpd_freeOutputElement (mpd_OutputEntity *output)
void mpd_sendCommandsCommand (mpd_Connection *connection)
void mpd_sendNotCommandsCommand (mpd_Connection *connection)
char * mpd_getNextCommand (mpd_Connection *connection)
void mpd_sendUrlHandlersCommand (mpd_Connection *connection)
char * mpd_getNextHandler (mpd_Connection *connection)
void mpd_sendTagTypesCommand (mpd_Connection *connection)
char * mpd_getNextTagType (mpd_Connection *connection)
void mpd_sendListPlaylistInfoCommand (mpd_Connection *connection, const char *path)
void mpd_sendListPlaylistCommand (mpd_Connection *connection, const char *path)
void mpd_startSearch (mpd_Connection *connection, int exact)
void mpd_addConstraintSearch (mpd_Connection *connection, int type, const char *name)
void mpd_commitSearch (mpd_Connection *connection)
void mpd_startFieldSearch (mpd_Connection *connection, int type)
void mpd_startPlaylistSearch (mpd_Connection *connection, int exact)
void mpd_startStatsSearch (mpd_Connection *connection)
void mpd_sendPlaylistClearCommand (mpd_Connection *connection, const char *path)
void mpd_sendPlaylistAddCommand (mpd_Connection *connection, const char *playlist, const char *path)
void mpd_sendPlaylistMoveCommand (mpd_Connection *connection, const char *playlist, int from, int to)
void mpd_sendPlaylistDeleteCommand (mpd_Connection *connection, const char *playlist, int pos)
void mpd_sendClearErrorCommand (mpd_Connection *connection)
void mpd_sendGetEventsCommand (mpd_Connection *connection)
char * mpd_getNextEvent (mpd_Connection *connection)
void mpd_sendListPlaylistsCommand (mpd_Connection *connection)
char * mpd_getNextSticker (mpd_Connection *connection)
void mpd_sendSetSongSticker (mpd_Connection *connection, const char *song, const char *sticker, const char *value)
void mpd_sendGetSongSticker (mpd_Connection *connection, const char *song, const char *sticker)

Variables

char * mpdTagItemKeys [MPD_TAG_NUM_OF_ITEM_TYPES]

Define Documentation

#define MPD_ACK_ERROR_ARG   2

Definition at line 61 of file libmpdclient.h.

#define MPD_ACK_ERROR_EXIST   56

Definition at line 72 of file libmpdclient.h.

#define MPD_ACK_ERROR_NO_EXIST   50

Definition at line 66 of file libmpdclient.h.

#define MPD_ACK_ERROR_NOT_LIST   1

Definition at line 60 of file libmpdclient.h.

#define MPD_ACK_ERROR_PASSWORD   3

Definition at line 62 of file libmpdclient.h.

#define MPD_ACK_ERROR_PERMISSION   4

Definition at line 63 of file libmpdclient.h.

#define MPD_ACK_ERROR_PLAYER_SYNC   55

Definition at line 71 of file libmpdclient.h.

#define MPD_ACK_ERROR_PLAYLIST_LOAD   53

Definition at line 69 of file libmpdclient.h.

#define MPD_ACK_ERROR_PLAYLIST_MAX   51

Definition at line 67 of file libmpdclient.h.

#define MPD_ACK_ERROR_SYSTEM   52

Definition at line 68 of file libmpdclient.h.

#define MPD_ACK_ERROR_UNK   -1

Definition at line 57 of file libmpdclient.h.

#define MPD_ACK_ERROR_UNKNOWN_CMD   5

Definition at line 64 of file libmpdclient.h.

Definition at line 70 of file libmpdclient.h.

#define MPD_BUFFER_MAX_LENGTH   50000

Definition at line 42 of file libmpdclient.h.

#define MPD_ERROR_ACK   18 /* ACK returned! */

Definition at line 54 of file libmpdclient.h.

#define MPD_ERROR_AT_UNK   -1

Definition at line 58 of file libmpdclient.h.

#define MPD_ERROR_BUFFEROVERRUN   19 /* Buffer was overrun! */

Definition at line 55 of file libmpdclient.h.

#define MPD_ERROR_CONNCLOSED   17 /* connection closed by mpd */

Definition at line 53 of file libmpdclient.h.

#define MPD_ERROR_CONNPORT   13 /* problems connecting to port on host */

Definition at line 49 of file libmpdclient.h.

#define MPD_ERROR_NORESPONSE   15 /* no response on attempting to connect */

Definition at line 51 of file libmpdclient.h.

#define MPD_ERROR_NOTMPD   14 /* mpd not running on port at host */

Definition at line 50 of file libmpdclient.h.

#define MPD_ERROR_SENDING   16 /* error sending command */

Definition at line 52 of file libmpdclient.h.

#define MPD_ERROR_SYSTEM   11 /* system error */

Definition at line 47 of file libmpdclient.h.

#define MPD_ERROR_TIMEOUT   10 /* timeout trying to talk to mpd */

Definition at line 46 of file libmpdclient.h.

#define MPD_ERROR_UNKHOST   12 /* unknown host */

Definition at line 48 of file libmpdclient.h.

#define MPD_ERRORSTR_MAX_LENGTH   1000

Definition at line 43 of file libmpdclient.h.

Definition at line 386 of file libmpdclient.h.

Definition at line 388 of file libmpdclient.h.

#define MPD_INFO_ENTITY_TYPE_SONG   1

Definition at line 387 of file libmpdclient.h.

#define MPD_PLAY_AT_BEGINNING   -1

Definition at line 498 of file libmpdclient.h.

#define MPD_SONG_NO_ID   -1

Definition at line 262 of file libmpdclient.h.

#define MPD_SONG_NO_NUM   -1

Definition at line 261 of file libmpdclient.h.

#define MPD_SONG_NO_TIME   -1

Definition at line 260 of file libmpdclient.h.

#define MPD_STATUS_NO_VOLUME   -1

Definition at line 161 of file libmpdclient.h.

#define MPD_STATUS_STATE_PAUSE   3

Definition at line 158 of file libmpdclient.h.

#define MPD_STATUS_STATE_PLAY   2

Definition at line 157 of file libmpdclient.h.

#define MPD_STATUS_STATE_STOP   1

Definition at line 156 of file libmpdclient.h.

#define MPD_STATUS_STATE_UNKNOWN   0

Definition at line 155 of file libmpdclient.h.

Definition at line 447 of file libmpdclient.h.

Definition at line 446 of file libmpdclient.h.

Definition at line 449 of file libmpdclient.h.

Definition at line 448 of file libmpdclient.h.

#define MPD_WELCOME_MESSAGE   "OK MPD "

Definition at line 44 of file libmpdclient.h.


Typedef Documentation

typedef struct _mpd_Directory mpd_Directory
typedef struct _mpd_Song mpd_Song
typedef struct _mpd_Stats mpd_Stats
typedef struct mpd_Status mpd_Status
typedef enum mpd_TagItems mpd_TagItems

Enumeration Type Documentation

Enumerator:
MPD_TAG_ITEM_ARTIST 
MPD_TAG_ITEM_ALBUM 
MPD_TAG_ITEM_TITLE 
MPD_TAG_ITEM_TRACK 
MPD_TAG_ITEM_NAME 
MPD_TAG_ITEM_GENRE 
MPD_TAG_ITEM_DATE 
MPD_TAG_ITEM_COMPOSER 
MPD_TAG_ITEM_PERFORMER 
MPD_TAG_ITEM_COMMENT 
MPD_TAG_ITEM_DISC 
MPD_TAG_ITEM_FILENAME 
MPD_TAG_ITEM_ALBUM_ARTIST 
MPD_TAG_ITEM_ANY 
MPD_TAG_NUM_OF_ITEM_TYPES 

Definition at line 78 of file libmpdclient.h.


Function Documentation

void mpd_addConstraintSearch ( mpd_Connection connection,
int  type,
const char *  name 
)
Parameters:
connectiona mpd_Connection
type
name
void mpd_clearError ( mpd_Connection connection)
void mpd_closeConnection ( mpd_Connection connection)
void mpd_commitSearch ( mpd_Connection connection)
Parameters:
connectiona mpd_Connection
void mpd_finishCommand ( mpd_Connection connection)
void mpd_freeDirectory ( mpd_Directory directory)
void mpd_freeInfoEntity ( mpd_InfoEntity entity)
void mpd_freePlaylistFile ( mpd_PlaylistFile playlist)
void mpd_freeSong ( mpd_Song song)
void mpd_freeStats ( mpd_Stats stats)
void mpd_freeStatus ( mpd_Status status)
char* mpd_getNextAlbum ( mpd_Connection connection)
char* mpd_getNextArtist ( mpd_Connection connection)
char* mpd_getNextCommand ( mpd_Connection connection)
Parameters:
connectiona mpd_Connection

returns the next supported command.

Returns:
a string, needs to be free'ed
char* mpd_getNextEvent ( mpd_Connection connection)
char* mpd_getNextHandler ( mpd_Connection connection)
char* mpd_getNextSticker ( mpd_Connection connection)
char* mpd_getNextTag ( mpd_Connection connection,
int  type 
)
char* mpd_getNextTagType ( mpd_Connection connection)
int mpd_getUpdateId ( mpd_Connection connection)
mpd_Connection* mpd_newConnection ( const char *  host,
int  port,
float  timeout 
)
mpd_Song* mpd_newSong ( void  )
int mpd_nextListOkCommand ( mpd_Connection connection)
void mpd_sendAddCommand ( mpd_Connection connection,
const char *  file 
)
int mpd_sendAddIdCommand ( mpd_Connection connection,
const char *  file 
)
void mpd_sendClearCommand ( mpd_Connection connection)
void mpd_sendClearErrorCommand ( mpd_Connection connection)
void mpd_sendCommandListBegin ( mpd_Connection connection)
void mpd_sendCommandListEnd ( mpd_Connection connection)
void mpd_sendCommandsCommand ( mpd_Connection connection)
Parameters:
connectiona mpd_Connection

Queries mpd for the allowed commands

void mpd_sendConsumeCommand ( mpd_Connection connection,
int  consumeMode 
)
void mpd_sendCrossfadeCommand ( mpd_Connection connection,
int  seconds 
)
void mpd_sendDeleteCommand ( mpd_Connection connection,
int  songNum 
)
void mpd_sendDeleteIdCommand ( mpd_Connection connection,
int  songNum 
)
void mpd_sendDisableOutputCommand ( mpd_Connection connection,
int  outputId 
)
void mpd_sendEnableOutputCommand ( mpd_Connection connection,
int  outputId 
)
void mpd_sendFindCommand ( mpd_Connection connection,
int  table,
const char *  str 
)
void mpd_sendGetEventsCommand ( mpd_Connection connection)
void mpd_sendGetSongSticker ( mpd_Connection connection,
const char *  song,
const char *  sticker 
)
void mpd_sendListallCommand ( mpd_Connection connection,
const char *  dir 
)
void mpd_sendListallInfoCommand ( mpd_Connection connection,
const char *  dir 
)
void mpd_sendListCommand ( mpd_Connection connection,
int  table,
const char *  arg1 
)
void mpd_sendListPlaylistCommand ( mpd_Connection connection,
const char *  path 
)
Parameters:
connectiona MpdConnection
paththe path to the playlist.

List the content of a stored playlist.

void mpd_sendListPlaylistInfoCommand ( mpd_Connection connection,
const char *  path 
)
Parameters:
connectiona MpdConnection
paththe path to the playlist.

List the content, with full metadata, of a stored playlist.

void mpd_sendLoadCommand ( mpd_Connection connection,
const char *  name 
)
void mpd_sendLsInfoCommand ( mpd_Connection connection,
const char *  dir 
)
void mpd_sendMoveCommand ( mpd_Connection connection,
int  from,
int  to 
)
void mpd_sendMoveIdCommand ( mpd_Connection connection,
int  from,
int  to 
)
void mpd_sendNextCommand ( mpd_Connection connection)
Parameters:
connectiona mpd_Connection

Queries mpd for the not allowed commands

void mpd_sendOutputsCommand ( mpd_Connection connection)
void mpd_sendPasswordCommand ( mpd_Connection connection,
const char *  pass 
)
void mpd_sendPauseCommand ( mpd_Connection connection,
int  pauseMode 
)
void mpd_sendPlayCommand ( mpd_Connection connection,
int  songNum 
)
void mpd_sendPlayIdCommand ( mpd_Connection connection,
int  songNum 
)
void mpd_sendPlaylistAddCommand ( mpd_Connection connection,
const char *  playlist,
const char *  path 
)
void mpd_sendPlaylistClearCommand ( mpd_Connection connection,
const char *  path 
)
void mpd_sendPlaylistDeleteCommand ( mpd_Connection connection,
const char *  playlist,
int  pos 
)
void mpd_sendPlaylistIdCommand ( mpd_Connection connection,
int  songId 
)
void mpd_sendPlaylistInfoCommand ( mpd_Connection connection,
int  songNum 
)
void mpd_sendPlaylistMoveCommand ( mpd_Connection connection,
const char *  playlist,
int  from,
int  to 
)
void mpd_sendPlChangesCommand ( mpd_Connection connection,
long long  playlist 
)
void mpd_sendPlChangesPosIdCommand ( mpd_Connection connection,
long long  playlist 
)
Parameters:
connection,:A valid and connected mpd_Connection.
playlist,:The playlist version you want the diff with. A more bandwidth efficient version of the mpd_sendPlChangesCommand. It only returns the pos+id of the changes song.
void mpd_sendPrevCommand ( mpd_Connection connection)
void mpd_sendRandomCommand ( mpd_Connection connection,
int  randomMode 
)
void mpd_sendRenameCommand ( mpd_Connection connection,
const char *  from,
const char *  to 
)
void mpd_sendRepeatCommand ( mpd_Connection connection,
int  repeatMode 
)
void mpd_sendRmCommand ( mpd_Connection connection,
const char *  name 
)
void mpd_sendSaveCommand ( mpd_Connection connection,
const char *  name 
)
void mpd_sendSearchCommand ( mpd_Connection connection,
int  table,
const char *  str 
)
void mpd_sendSeekCommand ( mpd_Connection connection,
int  song,
int  seek_time 
)
void mpd_sendSeekIdCommand ( mpd_Connection connection,
int  song,
int  seek_time 
)
void mpd_sendSetSongSticker ( mpd_Connection connection,
const char *  song,
const char *  sticker,
const char *  value 
)
void mpd_sendSetvolCommand ( mpd_Connection connection,
int  volumeChange 
)
void mpd_sendShuffleCommand ( mpd_Connection connection)
void mpd_sendSingleCommand ( mpd_Connection connection,
int  singleMode 
)
void mpd_sendStatsCommand ( mpd_Connection connection)
void mpd_sendStatusCommand ( mpd_Connection connection)
void mpd_sendStopCommand ( mpd_Connection connection)
void mpd_sendSwapCommand ( mpd_Connection connection,
int  song1,
int  song2 
)
void mpd_sendSwapIdCommand ( mpd_Connection connection,
int  song1,
int  song2 
)
void mpd_sendTagTypesCommand ( mpd_Connection connection)
void mpd_sendUpdateCommand ( mpd_Connection connection,
const char *  path 
)
void mpd_setConnectionTimeout ( mpd_Connection connection,
float  timeout 
)
mpd_Song* mpd_songDup ( const mpd_Song song)
void mpd_startFieldSearch ( mpd_Connection connection,
int  type 
)
Parameters:
connectiona mpd_Connection
typeThe type to search for

starts a search for fields... f.e. get a list of artists would be:

or get a list of artist in genre "jazz" would be:

mpd_startSearch will return a list of songs (and you need mpd_getNextInfoEntity) this one will return a list of only one field (the one specified with type) and you need mpd_getNextTag to get the results

void mpd_startPlaylistSearch ( mpd_Connection connection,
int  exact 
)
void mpd_startSearch ( mpd_Connection connection,
int  exact 
)
Parameters:
connectiona mpd_Connection
exactif to match exact

starts a search, use mpd_addConstraintSearch to add a constraint to the search, and mpd_commitSearch to do the actual search

void mpd_startStatsSearch ( mpd_Connection connection)

Variable Documentation