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

Macros

#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)
 
void mpd_sendSetReplayGainMode (mpd_Connection *connection, const char *mode)
 
void mpd_sendReplayGainModeCommand (mpd_Connection *connection)
 
char * mpd_getReplayGainMode (mpd_Connection *connection)
 

Variables

char * mpdTagItemKeys [MPD_TAG_NUM_OF_ITEM_TYPES]
 

Macro Definition Documentation

◆ MPD_ACK_ERROR_ARG

#define MPD_ACK_ERROR_ARG   2

Definition at line 61 of file libmpdclient.h.

◆ MPD_ACK_ERROR_EXIST

#define MPD_ACK_ERROR_EXIST   56

Definition at line 72 of file libmpdclient.h.

◆ MPD_ACK_ERROR_NO_EXIST

#define MPD_ACK_ERROR_NO_EXIST   50

Definition at line 66 of file libmpdclient.h.

◆ MPD_ACK_ERROR_NOT_LIST

#define MPD_ACK_ERROR_NOT_LIST   1

Definition at line 60 of file libmpdclient.h.

◆ MPD_ACK_ERROR_PASSWORD

#define MPD_ACK_ERROR_PASSWORD   3

Definition at line 62 of file libmpdclient.h.

◆ MPD_ACK_ERROR_PERMISSION

#define MPD_ACK_ERROR_PERMISSION   4

Definition at line 63 of file libmpdclient.h.

◆ MPD_ACK_ERROR_PLAYER_SYNC

#define MPD_ACK_ERROR_PLAYER_SYNC   55

Definition at line 71 of file libmpdclient.h.

◆ MPD_ACK_ERROR_PLAYLIST_LOAD

#define MPD_ACK_ERROR_PLAYLIST_LOAD   53

Definition at line 69 of file libmpdclient.h.

◆ MPD_ACK_ERROR_PLAYLIST_MAX

#define MPD_ACK_ERROR_PLAYLIST_MAX   51

Definition at line 67 of file libmpdclient.h.

◆ MPD_ACK_ERROR_SYSTEM

#define MPD_ACK_ERROR_SYSTEM   52

Definition at line 68 of file libmpdclient.h.

◆ MPD_ACK_ERROR_UNK

#define MPD_ACK_ERROR_UNK   -1

Definition at line 57 of file libmpdclient.h.

◆ MPD_ACK_ERROR_UNKNOWN_CMD

#define MPD_ACK_ERROR_UNKNOWN_CMD   5

Definition at line 64 of file libmpdclient.h.

◆ MPD_ACK_ERROR_UPDATE_ALREADY

#define MPD_ACK_ERROR_UPDATE_ALREADY   54

Definition at line 70 of file libmpdclient.h.

◆ MPD_BUFFER_MAX_LENGTH

#define MPD_BUFFER_MAX_LENGTH   50000

Definition at line 42 of file libmpdclient.h.

◆ MPD_ERROR_ACK

#define MPD_ERROR_ACK   18 /* ACK returned! */

Definition at line 54 of file libmpdclient.h.

◆ MPD_ERROR_AT_UNK

#define MPD_ERROR_AT_UNK   -1

Definition at line 58 of file libmpdclient.h.

◆ MPD_ERROR_BUFFEROVERRUN

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

Definition at line 55 of file libmpdclient.h.

◆ MPD_ERROR_CONNCLOSED

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

Definition at line 53 of file libmpdclient.h.

◆ MPD_ERROR_CONNPORT

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

Definition at line 49 of file libmpdclient.h.

◆ MPD_ERROR_NORESPONSE

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

Definition at line 51 of file libmpdclient.h.

◆ MPD_ERROR_NOTMPD

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

Definition at line 50 of file libmpdclient.h.

◆ MPD_ERROR_SENDING

#define MPD_ERROR_SENDING   16 /* error sending command */

Definition at line 52 of file libmpdclient.h.

◆ MPD_ERROR_SYSTEM

#define MPD_ERROR_SYSTEM   11 /* system error */

Definition at line 47 of file libmpdclient.h.

◆ MPD_ERROR_TIMEOUT

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

Definition at line 46 of file libmpdclient.h.

◆ MPD_ERROR_UNKHOST

#define MPD_ERROR_UNKHOST   12 /* unknown host */

Definition at line 48 of file libmpdclient.h.

◆ MPD_ERRORSTR_MAX_LENGTH

#define MPD_ERRORSTR_MAX_LENGTH   1000

Definition at line 43 of file libmpdclient.h.

◆ MPD_INFO_ENTITY_TYPE_DIRECTORY

#define MPD_INFO_ENTITY_TYPE_DIRECTORY   0

Definition at line 386 of file libmpdclient.h.

◆ MPD_INFO_ENTITY_TYPE_PLAYLISTFILE

#define MPD_INFO_ENTITY_TYPE_PLAYLISTFILE   2

Definition at line 388 of file libmpdclient.h.

◆ MPD_INFO_ENTITY_TYPE_SONG

#define MPD_INFO_ENTITY_TYPE_SONG   1

Definition at line 387 of file libmpdclient.h.

◆ MPD_PLAY_AT_BEGINNING

#define MPD_PLAY_AT_BEGINNING   -1

Definition at line 498 of file libmpdclient.h.

◆ MPD_SONG_NO_ID

#define MPD_SONG_NO_ID   -1

Definition at line 262 of file libmpdclient.h.

◆ MPD_SONG_NO_NUM

#define MPD_SONG_NO_NUM   -1

Definition at line 261 of file libmpdclient.h.

◆ MPD_SONG_NO_TIME

#define MPD_SONG_NO_TIME   -1

Definition at line 260 of file libmpdclient.h.

◆ MPD_STATUS_NO_VOLUME

#define MPD_STATUS_NO_VOLUME   -1

Definition at line 161 of file libmpdclient.h.

◆ MPD_STATUS_STATE_PAUSE

#define MPD_STATUS_STATE_PAUSE   3

Definition at line 158 of file libmpdclient.h.

◆ MPD_STATUS_STATE_PLAY

#define MPD_STATUS_STATE_PLAY   2

Definition at line 157 of file libmpdclient.h.

◆ MPD_STATUS_STATE_STOP

#define MPD_STATUS_STATE_STOP   1

Definition at line 156 of file libmpdclient.h.

◆ MPD_STATUS_STATE_UNKNOWN

#define MPD_STATUS_STATE_UNKNOWN   0

Definition at line 155 of file libmpdclient.h.

◆ MPD_TABLE_ALBUM

#define MPD_TABLE_ALBUM   MPD_TAG_ITEM_ALBUM

Definition at line 447 of file libmpdclient.h.

◆ MPD_TABLE_ARTIST

#define MPD_TABLE_ARTIST   MPD_TAG_ITEM_ARTIST

Definition at line 446 of file libmpdclient.h.

◆ MPD_TABLE_FILENAME

#define MPD_TABLE_FILENAME   MPD_TAG_ITEM_FILENAME

Definition at line 449 of file libmpdclient.h.

◆ MPD_TABLE_TITLE

#define MPD_TABLE_TITLE   MPD_TAG_ITEM_TITLE

Definition at line 448 of file libmpdclient.h.

◆ MPD_WELCOME_MESSAGE

#define MPD_WELCOME_MESSAGE   "OK MPD "

Definition at line 44 of file libmpdclient.h.

Typedef Documentation

◆ mpd_Connection

◆ mpd_Directory

typedef struct _mpd_Directory mpd_Directory

◆ mpd_InfoEntity

typedef struct mpd_InfoEntity mpd_InfoEntity

◆ mpd_OutputEntity

◆ mpd_PlaylistFile

◆ mpd_ReturnElement

◆ mpd_SearchStats

◆ mpd_Song

typedef struct _mpd_Song mpd_Song

◆ mpd_Stats

typedef struct _mpd_Stats mpd_Stats

◆ mpd_Status

typedef struct mpd_Status mpd_Status

◆ mpd_TagItems

typedef enum mpd_TagItems mpd_TagItems

Enumeration Type Documentation

◆ mpd_TagItems

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

◆ mpd_addConstraintSearch()

void mpd_addConstraintSearch ( mpd_Connection * connection,
int type,
const char * name )
Parameters
connectiona mpd_Connection
type
name

◆ mpd_clearError()

void mpd_clearError ( mpd_Connection * connection)

◆ mpd_closeConnection()

void mpd_closeConnection ( mpd_Connection * connection)

◆ mpd_commitSearch()

void mpd_commitSearch ( mpd_Connection * connection)
Parameters
connectiona mpd_Connection

◆ mpd_directoryDup()

mpd_Directory * mpd_directoryDup ( mpd_Directory * directory)

◆ mpd_finishCommand()

void mpd_finishCommand ( mpd_Connection * connection)

◆ mpd_freeDirectory()

void mpd_freeDirectory ( mpd_Directory * directory)

◆ mpd_freeInfoEntity()

void mpd_freeInfoEntity ( mpd_InfoEntity * entity)

◆ mpd_freeOutputElement()

void mpd_freeOutputElement ( mpd_OutputEntity * output)

◆ mpd_freePlaylistFile()

void mpd_freePlaylistFile ( mpd_PlaylistFile * playlist)

◆ mpd_freeSearchStats()

void mpd_freeSearchStats ( mpd_SearchStats * stats)

◆ mpd_freeSong()

void mpd_freeSong ( mpd_Song * song)

◆ mpd_freeStats()

void mpd_freeStats ( mpd_Stats * stats)

◆ mpd_freeStatus()

void mpd_freeStatus ( mpd_Status * status)

◆ mpd_getNextAlbum()

char * mpd_getNextAlbum ( mpd_Connection * connection)

◆ mpd_getNextArtist()

char * mpd_getNextArtist ( mpd_Connection * connection)

◆ mpd_getNextCommand()

char * mpd_getNextCommand ( mpd_Connection * connection)
Parameters
connectiona mpd_Connection

returns the next supported command.

Returns
a string, needs to be free'ed

◆ mpd_getNextEvent()

char * mpd_getNextEvent ( mpd_Connection * connection)

◆ mpd_getNextHandler()

char * mpd_getNextHandler ( mpd_Connection * connection)

◆ mpd_getNextInfoEntity()

mpd_InfoEntity * mpd_getNextInfoEntity ( mpd_Connection * connection)

◆ mpd_getNextOutput()

mpd_OutputEntity * mpd_getNextOutput ( mpd_Connection * connection)

◆ mpd_getNextSticker()

char * mpd_getNextSticker ( mpd_Connection * connection)

◆ mpd_getNextTag()

char * mpd_getNextTag ( mpd_Connection * connection,
int type )

◆ mpd_getNextTagType()

char * mpd_getNextTagType ( mpd_Connection * connection)

◆ mpd_getReplayGainMode()

char * mpd_getReplayGainMode ( mpd_Connection * connection)

◆ mpd_getSearchStats()

mpd_SearchStats * mpd_getSearchStats ( mpd_Connection * connection)

◆ mpd_getStats()

mpd_Stats * mpd_getStats ( mpd_Connection * connection)

◆ mpd_getStatus()

mpd_Status * mpd_getStatus ( mpd_Connection * connection)

◆ mpd_getUpdateId()

int mpd_getUpdateId ( mpd_Connection * connection)

◆ mpd_newConnection()

mpd_Connection * mpd_newConnection ( const char * host,
int port,
float timeout )

◆ mpd_newDirectory()

mpd_Directory * mpd_newDirectory ( void )

◆ mpd_newInfoEntity()

mpd_InfoEntity * mpd_newInfoEntity ( void )

◆ mpd_newPlaylistFile()

mpd_PlaylistFile * mpd_newPlaylistFile ( void )

◆ mpd_newSong()

mpd_Song * mpd_newSong ( void )

◆ mpd_nextListOkCommand()

int mpd_nextListOkCommand ( mpd_Connection * connection)

◆ mpd_playlistFileDup()

mpd_PlaylistFile * mpd_playlistFileDup ( mpd_PlaylistFile * playlist)

◆ mpd_sendAddCommand()

void mpd_sendAddCommand ( mpd_Connection * connection,
const char * file )

◆ mpd_sendAddIdCommand()

int mpd_sendAddIdCommand ( mpd_Connection * connection,
const char * file )

◆ mpd_sendClearCommand()

void mpd_sendClearCommand ( mpd_Connection * connection)

◆ mpd_sendClearErrorCommand()

void mpd_sendClearErrorCommand ( mpd_Connection * connection)

◆ mpd_sendCommandListBegin()

void mpd_sendCommandListBegin ( mpd_Connection * connection)

◆ mpd_sendCommandListEnd()

void mpd_sendCommandListEnd ( mpd_Connection * connection)

◆ mpd_sendCommandListOkBegin()

void mpd_sendCommandListOkBegin ( mpd_Connection * connection)

◆ mpd_sendCommandsCommand()

void mpd_sendCommandsCommand ( mpd_Connection * connection)
Parameters
connectiona mpd_Connection

Queries mpd for the allowed commands

◆ mpd_sendConsumeCommand()

void mpd_sendConsumeCommand ( mpd_Connection * connection,
int consumeMode )

◆ mpd_sendCrossfadeCommand()

void mpd_sendCrossfadeCommand ( mpd_Connection * connection,
int seconds )

◆ mpd_sendCurrentSongCommand()

void mpd_sendCurrentSongCommand ( mpd_Connection * connection)

◆ mpd_sendDeleteCommand()

void mpd_sendDeleteCommand ( mpd_Connection * connection,
int songNum )

◆ mpd_sendDeleteIdCommand()

void mpd_sendDeleteIdCommand ( mpd_Connection * connection,
int songNum )

◆ mpd_sendDisableOutputCommand()

void mpd_sendDisableOutputCommand ( mpd_Connection * connection,
int outputId )

◆ mpd_sendEnableOutputCommand()

void mpd_sendEnableOutputCommand ( mpd_Connection * connection,
int outputId )

◆ mpd_sendFindCommand()

void mpd_sendFindCommand ( mpd_Connection * connection,
int table,
const char * str )

◆ mpd_sendGetEventsCommand()

void mpd_sendGetEventsCommand ( mpd_Connection * connection)

◆ mpd_sendGetSongSticker()

void mpd_sendGetSongSticker ( mpd_Connection * connection,
const char * song,
const char * sticker )

◆ mpd_sendListallCommand()

void mpd_sendListallCommand ( mpd_Connection * connection,
const char * dir )

◆ mpd_sendListallInfoCommand()

void mpd_sendListallInfoCommand ( mpd_Connection * connection,
const char * dir )

◆ mpd_sendListCommand()

void mpd_sendListCommand ( mpd_Connection * connection,
int table,
const char * arg1 )

◆ mpd_sendListPlaylistCommand()

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

List the content of a stored playlist.

◆ mpd_sendListPlaylistInfoCommand()

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.

◆ mpd_sendListPlaylistsCommand()

void mpd_sendListPlaylistsCommand ( mpd_Connection * connection)

◆ mpd_sendLoadCommand()

void mpd_sendLoadCommand ( mpd_Connection * connection,
const char * name )

◆ mpd_sendLsInfoCommand()

void mpd_sendLsInfoCommand ( mpd_Connection * connection,
const char * dir )

◆ mpd_sendMoveCommand()

void mpd_sendMoveCommand ( mpd_Connection * connection,
int from,
int to )

◆ mpd_sendMoveIdCommand()

void mpd_sendMoveIdCommand ( mpd_Connection * connection,
int from,
int to )

◆ mpd_sendNextCommand()

void mpd_sendNextCommand ( mpd_Connection * connection)

◆ mpd_sendNotCommandsCommand()

void mpd_sendNotCommandsCommand ( mpd_Connection * connection)
Parameters
connectiona mpd_Connection

Queries mpd for the not allowed commands

◆ mpd_sendOutputsCommand()

void mpd_sendOutputsCommand ( mpd_Connection * connection)

◆ mpd_sendPasswordCommand()

void mpd_sendPasswordCommand ( mpd_Connection * connection,
const char * pass )

◆ mpd_sendPauseCommand()

void mpd_sendPauseCommand ( mpd_Connection * connection,
int pauseMode )

◆ mpd_sendPlayCommand()

void mpd_sendPlayCommand ( mpd_Connection * connection,
int songNum )

◆ mpd_sendPlayIdCommand()

void mpd_sendPlayIdCommand ( mpd_Connection * connection,
int songNum )

◆ mpd_sendPlaylistAddCommand()

void mpd_sendPlaylistAddCommand ( mpd_Connection * connection,
const char * playlist,
const char * path )

◆ mpd_sendPlaylistClearCommand()

void mpd_sendPlaylistClearCommand ( mpd_Connection * connection,
const char * path )

◆ mpd_sendPlaylistDeleteCommand()

void mpd_sendPlaylistDeleteCommand ( mpd_Connection * connection,
const char * playlist,
int pos )

◆ mpd_sendPlaylistIdCommand()

void mpd_sendPlaylistIdCommand ( mpd_Connection * connection,
int songId )

◆ mpd_sendPlaylistInfoCommand()

void mpd_sendPlaylistInfoCommand ( mpd_Connection * connection,
int songNum )

◆ mpd_sendPlaylistMoveCommand()

void mpd_sendPlaylistMoveCommand ( mpd_Connection * connection,
const char * playlist,
int from,
int to )

◆ mpd_sendPlChangesCommand()

void mpd_sendPlChangesCommand ( mpd_Connection * connection,
long long playlist )

◆ mpd_sendPlChangesPosIdCommand()

void mpd_sendPlChangesPosIdCommand ( mpd_Connection * connection,
long long playlist )
Parameters
connectionA valid and connected mpd_Connection.
playlistThe 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.

◆ mpd_sendPrevCommand()

void mpd_sendPrevCommand ( mpd_Connection * connection)

◆ mpd_sendRandomCommand()

void mpd_sendRandomCommand ( mpd_Connection * connection,
int randomMode )

◆ mpd_sendRenameCommand()

void mpd_sendRenameCommand ( mpd_Connection * connection,
const char * from,
const char * to )

◆ mpd_sendRepeatCommand()

void mpd_sendRepeatCommand ( mpd_Connection * connection,
int repeatMode )

◆ mpd_sendReplayGainModeCommand()

void mpd_sendReplayGainModeCommand ( mpd_Connection * connection)

◆ mpd_sendRmCommand()

void mpd_sendRmCommand ( mpd_Connection * connection,
const char * name )

◆ mpd_sendSaveCommand()

void mpd_sendSaveCommand ( mpd_Connection * connection,
const char * name )

◆ mpd_sendSearchCommand()

void mpd_sendSearchCommand ( mpd_Connection * connection,
int table,
const char * str )

◆ mpd_sendSeekCommand()

void mpd_sendSeekCommand ( mpd_Connection * connection,
int song,
int seek_time )

◆ mpd_sendSeekIdCommand()

void mpd_sendSeekIdCommand ( mpd_Connection * connection,
int song,
int seek_time )

◆ mpd_sendSetReplayGainMode()

void mpd_sendSetReplayGainMode ( mpd_Connection * connection,
const char * mode )

◆ mpd_sendSetSongSticker()

void mpd_sendSetSongSticker ( mpd_Connection * connection,
const char * song,
const char * sticker,
const char * value )

◆ mpd_sendSetvolCommand()

void mpd_sendSetvolCommand ( mpd_Connection * connection,
int volumeChange )

◆ mpd_sendShuffleCommand()

void mpd_sendShuffleCommand ( mpd_Connection * connection)

◆ mpd_sendSingleCommand()

void mpd_sendSingleCommand ( mpd_Connection * connection,
int singleMode )

◆ mpd_sendStatsCommand()

void mpd_sendStatsCommand ( mpd_Connection * connection)

◆ mpd_sendStatusCommand()

void mpd_sendStatusCommand ( mpd_Connection * connection)

◆ mpd_sendStopCommand()

void mpd_sendStopCommand ( mpd_Connection * connection)

◆ mpd_sendSwapCommand()

void mpd_sendSwapCommand ( mpd_Connection * connection,
int song1,
int song2 )

◆ mpd_sendSwapIdCommand()

void mpd_sendSwapIdCommand ( mpd_Connection * connection,
int song1,
int song2 )

◆ mpd_sendTagTypesCommand()

void mpd_sendTagTypesCommand ( mpd_Connection * connection)

◆ mpd_sendUpdateCommand()

void mpd_sendUpdateCommand ( mpd_Connection * connection,
const char * path )

◆ mpd_sendUrlHandlersCommand()

void mpd_sendUrlHandlersCommand ( mpd_Connection * connection)

◆ mpd_setConnectionTimeout()

void mpd_setConnectionTimeout ( mpd_Connection * connection,
float timeout )

◆ mpd_songDup()

mpd_Song * mpd_songDup ( const mpd_Song * song)

◆ mpd_startFieldSearch()

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:

mpd_commitSearch(connection);
void mpd_startFieldSearch(mpd_Connection *connection, int type)
@ MPD_TAG_ITEM_ARTIST
void mpd_commitSearch(mpd_Connection *connection)

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

mpd_commitSearch(connection);
void mpd_addConstraintSearch(mpd_Connection *connection, int type, const char *name)
@ MPD_TAG_ITEM_GENRE

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

◆ mpd_startPlaylistSearch()

void mpd_startPlaylistSearch ( mpd_Connection * connection,
int exact )

◆ mpd_startSearch()

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

◆ mpd_startStatsSearch()

void mpd_startStatsSearch ( mpd_Connection * connection)

Variable Documentation

◆ mpdTagItemKeys

char* mpdTagItemKeys[MPD_TAG_NUM_OF_ITEM_TYPES]
extern

Copyright 2006 Qball Cow