33 #ifndef LIBMPDCLIENT_H 34 #define LIBMPDCLIENT_H 37 # define __W32API_USE_DLLIMPORT__ 1 42 #define MPD_BUFFER_MAX_LENGTH 50000 43 #define MPD_ERRORSTR_MAX_LENGTH 1000 44 #define MPD_WELCOME_MESSAGE "OK MPD " 46 #define MPD_ERROR_TIMEOUT 10 47 #define MPD_ERROR_SYSTEM 11 48 #define MPD_ERROR_UNKHOST 12 49 #define MPD_ERROR_CONNPORT 13 50 #define MPD_ERROR_NOTMPD 14 51 #define MPD_ERROR_NORESPONSE 15 52 #define MPD_ERROR_SENDING 16 53 #define MPD_ERROR_CONNCLOSED 17 54 #define MPD_ERROR_ACK 18 55 #define MPD_ERROR_BUFFEROVERRUN 19 57 #define MPD_ACK_ERROR_UNK -1 58 #define MPD_ERROR_AT_UNK -1 60 #define MPD_ACK_ERROR_NOT_LIST 1 61 #define MPD_ACK_ERROR_ARG 2 62 #define MPD_ACK_ERROR_PASSWORD 3 63 #define MPD_ACK_ERROR_PERMISSION 4 64 #define MPD_ACK_ERROR_UNKNOWN_CMD 5 66 #define MPD_ACK_ERROR_NO_EXIST 50 67 #define MPD_ACK_ERROR_PLAYLIST_MAX 51 68 #define MPD_ACK_ERROR_SYSTEM 52 69 #define MPD_ACK_ERROR_PLAYLIST_LOAD 53 70 #define MPD_ACK_ERROR_UPDATE_ALREADY 54 71 #define MPD_ACK_ERROR_PLAYER_SYNC 55 72 #define MPD_ACK_ERROR_EXIST 56 155 #define MPD_STATUS_STATE_UNKNOWN 0 156 #define MPD_STATUS_STATE_STOP 1 157 #define MPD_STATUS_STATE_PLAY 2 158 #define MPD_STATUS_STATE_PAUSE 3 161 #define MPD_STATUS_NO_VOLUME -1 260 #define MPD_SONG_NO_TIME -1 261 #define MPD_SONG_NO_NUM -1 262 #define MPD_SONG_NO_ID -1 386 #define MPD_INFO_ENTITY_TYPE_DIRECTORY 0 387 #define MPD_INFO_ENTITY_TYPE_SONG 1 388 #define MPD_INFO_ENTITY_TYPE_PLAYLISTFILE 2 446 #define MPD_TABLE_ARTIST MPD_TAG_ITEM_ARTIST 447 #define MPD_TABLE_ALBUM MPD_TAG_ITEM_ALBUM 448 #define MPD_TABLE_TITLE MPD_TAG_ITEM_TITLE 449 #define MPD_TABLE_FILENAME MPD_TAG_ITEM_FILENAME 498 #define MPD_PLAY_AT_BEGINNING -1 676 const char *playlist,
const char *path);
679 const char *playlist,
int from,
int to);
682 const char *playlist,
int pos);
struct _mpd_ReturnElement mpd_ReturnElement
void mpd_sendRepeatCommand(mpd_Connection *connection, int repeatMode)
void mpd_sendUpdateCommand(mpd_Connection *connection, const char *path)
mpd_Song * mpd_newSong(void)
char * mpd_getNextArtist(mpd_Connection *connection)
void mpd_sendUrlHandlersCommand(mpd_Connection *connection)
mpd_Directory * mpd_directoryDup(mpd_Directory *directory)
struct mpd_InfoEntity mpd_InfoEntity
void mpd_sendStatsCommand(mpd_Connection *connection)
void mpd_sendRandomCommand(mpd_Connection *connection, int randomMode)
struct mpd_Status mpd_Status
void mpd_freeStatus(mpd_Status *status)
void mpd_sendSetReplayGainMode(mpd_Connection *connection, const char *mode)
struct _mpd_SearchStats mpd_SearchStats
void mpd_sendPlaylistAddCommand(mpd_Connection *connection, const char *playlist, const char *path)
void mpd_sendPlayIdCommand(mpd_Connection *connection, int songNum)
void mpd_sendSeekCommand(mpd_Connection *connection, int song, int seek_time)
void mpd_sendSearchCommand(mpd_Connection *connection, int table, const char *str)
void mpd_sendDisableOutputCommand(mpd_Connection *connection, int outputId)
void mpd_sendNextCommand(mpd_Connection *connection)
void mpd_sendPlaylistDeleteCommand(mpd_Connection *connection, const char *playlist, int pos)
void mpd_sendPlaylistInfoCommand(mpd_Connection *connection, int songNum)
#define MPD_BUFFER_MAX_LENGTH
void mpd_sendCrossfadeCommand(mpd_Connection *connection, int seconds)
void mpd_addConstraintSearch(mpd_Connection *connection, int type, const char *name)
void mpd_closeConnection(mpd_Connection *connection)
void mpd_sendPrevCommand(mpd_Connection *connection)
void mpd_freeInfoEntity(mpd_InfoEntity *entity)
void mpd_freeSearchStats(mpd_SearchStats *stats)
void mpd_sendCommandListOkBegin(mpd_Connection *connection)
union mpd_InfoEntity::@4 info
void mpd_startSearch(mpd_Connection *connection, int exact)
char * mpd_getNextAlbum(mpd_Connection *connection)
mpd_Directory * mpd_newDirectory(void)
char * mpd_getNextTagType(mpd_Connection *connection)
void mpd_freeOutputElement(mpd_OutputEntity *output)
struct _mpd_Stats mpd_Stats
struct _mpd_PlaylistFile mpd_PlaylistFile
void mpd_sendListallCommand(mpd_Connection *connection, const char *dir)
struct _mpd_Song mpd_Song
void mpd_sendSwapIdCommand(mpd_Connection *connection, int song1, int song2)
void mpd_sendListallInfoCommand(mpd_Connection *connection, const char *dir)
struct _mpd_OutputEntity mpd_OutputEntity
void mpd_sendLoadCommand(mpd_Connection *connection, const char *name)
mpd_PlaylistFile * mpd_playlistFileDup(mpd_PlaylistFile *playlist)
void mpd_sendEnableOutputCommand(mpd_Connection *connection, int outputId)
void mpd_freeDirectory(mpd_Directory *directory)
char buffer[MPD_BUFFER_MAX_LENGTH+1]
struct _mpd_Directory mpd_Directory
unsigned long dbUpdateTime
mpd_PlaylistFile * mpd_newPlaylistFile(void)
void mpd_sendPlaylistClearCommand(mpd_Connection *connection, const char *path)
char * mpdTagItemKeys[MPD_TAG_NUM_OF_ITEM_TYPES]
#define MPD_ERRORSTR_MAX_LENGTH
void mpd_sendSetvolCommand(mpd_Connection *connection, int volumeChange)
mpd_Connection * mpd_newConnection(const char *host, int port, float timeout)
void mpd_freeSong(mpd_Song *song)
void mpd_sendListPlaylistInfoCommand(mpd_Connection *connection, const char *path)
mpd_Status * mpd_getStatus(mpd_Connection *connection)
void mpd_sendListPlaylistCommand(mpd_Connection *connection, const char *path)
mpd_InfoEntity * mpd_newInfoEntity(void)
void mpd_sendFindCommand(mpd_Connection *connection, int table, const char *str)
void mpd_sendRenameCommand(mpd_Connection *connection, const char *from, const char *to)
mpd_Directory * directory
char * mpd_getNextHandler(mpd_Connection *connection)
void mpd_freePlaylistFile(mpd_PlaylistFile *playlist)
void mpd_sendGetSongSticker(mpd_Connection *connection, const char *song, const char *sticker)
void mpd_clearError(mpd_Connection *connection)
void mpd_sendGetEventsCommand(mpd_Connection *connection)
void mpd_finishCommand(mpd_Connection *connection)
int mpd_nextListOkCommand(mpd_Connection *connection)
char * mpd_getNextTag(mpd_Connection *connection, int type)
void mpd_commitSearch(mpd_Connection *connection)
void mpd_sendNotCommandsCommand(mpd_Connection *connection)
void mpd_freeStats(mpd_Stats *stats)
void mpd_startStatsSearch(mpd_Connection *connection)
void mpd_sendTagTypesCommand(mpd_Connection *connection)
mpd_PlaylistFile * playlistFile
void mpd_sendConsumeCommand(mpd_Connection *connection, int consumeMode)
char errorStr[MPD_ERRORSTR_MAX_LENGTH+1]
void mpd_sendStatusCommand(mpd_Connection *connection)
void mpd_sendStopCommand(mpd_Connection *connection)
void mpd_sendListCommand(mpd_Connection *connection, int table, const char *arg1)
void mpd_sendSaveCommand(mpd_Connection *connection, const char *name)
void mpd_sendSwapCommand(mpd_Connection *connection, int song1, int song2)
char * mpd_getNextCommand(mpd_Connection *connection)
void mpd_sendPlChangesPosIdCommand(mpd_Connection *connection, long long playlist)
mpd_Stats * mpd_getStats(mpd_Connection *connection)
void mpd_sendSetSongSticker(mpd_Connection *connection, const char *song, const char *sticker, const char *value)
mpd_Song * mpd_songDup(const mpd_Song *song)
void mpd_sendPlChangesCommand(mpd_Connection *connection, long long playlist)
void mpd_sendShuffleCommand(mpd_Connection *connection)
mpd_SearchStats * mpd_getSearchStats(mpd_Connection *connection)
void mpd_sendPlaylistMoveCommand(mpd_Connection *connection, const char *playlist, int from, int to)
void mpd_sendMoveCommand(mpd_Connection *connection, int from, int to)
void mpd_sendMoveIdCommand(mpd_Connection *connection, int from, int to)
void mpd_sendLsInfoCommand(mpd_Connection *connection, const char *dir)
char * mpd_getNextSticker(mpd_Connection *connection)
void mpd_sendPauseCommand(mpd_Connection *connection, int pauseMode)
char * mpd_getReplayGainMode(mpd_Connection *connection)
void mpd_sendCommandListEnd(mpd_Connection *connection)
void mpd_sendClearErrorCommand(mpd_Connection *connection)
void mpd_setConnectionTimeout(mpd_Connection *connection, float timeout)
void mpd_sendDeleteCommand(mpd_Connection *connection, int songNum)
void mpd_sendReplayGainModeCommand(mpd_Connection *connection)
void mpd_sendPasswordCommand(mpd_Connection *connection, const char *pass)
void mpd_sendCurrentSongCommand(mpd_Connection *connection)
void mpd_sendOutputsCommand(mpd_Connection *connection)
void mpd_sendCommandsCommand(mpd_Connection *connection)
void mpd_sendAddCommand(mpd_Connection *connection, const char *file)
void mpd_sendClearCommand(mpd_Connection *connection)
void mpd_startPlaylistSearch(mpd_Connection *connection, int exact)
void mpd_sendSingleCommand(mpd_Connection *connection, int singleMode)
void mpd_sendDeleteIdCommand(mpd_Connection *connection, int songNum)
char * mpd_getNextEvent(mpd_Connection *connection)
void mpd_sendRmCommand(mpd_Connection *connection, const char *name)
struct _mpd_Connection mpd_Connection
void mpd_sendPlayCommand(mpd_Connection *connection, int songNum)
int mpd_getUpdateId(mpd_Connection *connection)
mpd_ReturnElement * returnElement
void mpd_sendListPlaylistsCommand(mpd_Connection *connection)
void mpd_sendPlaylistIdCommand(mpd_Connection *connection, int songId)
mpd_OutputEntity * mpd_getNextOutput(mpd_Connection *connection)
mpd_InfoEntity * mpd_getNextInfoEntity(mpd_Connection *connection)
void mpd_startFieldSearch(mpd_Connection *connection, int type)
int mpd_sendAddIdCommand(mpd_Connection *connection, const char *file)
void mpd_sendCommandListBegin(mpd_Connection *connection)
void mpd_sendSeekIdCommand(mpd_Connection *connection, int song, int seek_time)