libmpd  11.8.17
libmpdclient.h
Go to the documentation of this file.
1 /* libmpdclient
2  (c)2003-2006 by Warren Dukes (warren.dukes@gmail.com)
3  This project's homepage is: http://www.musicpd.org
4 
5  Redistribution and use in source and binary forms, with or without
6  modification, are permitted provided that the following conditions
7  are met:
8 
9  - Redistributions of source code must retain the above copyright
10  notice, this list of conditions and the following disclaimer.
11 
12  - Redistributions in binary form must reproduce the above copyright
13  notice, this list of conditions and the following disclaimer in the
14  documentation and/or other materials provided with the distribution.
15 
16  - Neither the name of the Music Player Daemon nor the names of its
17  contributors may be used to endorse or promote products derived from
18  this software without specific prior written permission.
19 
20  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21  ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
24  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
27  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
28  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
29  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
30  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 */
32 
33 #ifndef LIBMPDCLIENT_H
34 #define LIBMPDCLIENT_H
35 
36 #ifdef WIN32
37 # define __W32API_USE_DLLIMPORT__ 1
38 #endif
39 
40 #include <sys/time.h>
41 #include <stdarg.h>
42 #define MPD_BUFFER_MAX_LENGTH 50000
43 #define MPD_ERRORSTR_MAX_LENGTH 1000
44 #define MPD_WELCOME_MESSAGE "OK MPD "
45 
46 #define MPD_ERROR_TIMEOUT 10 /* timeout trying to talk to mpd */
47 #define MPD_ERROR_SYSTEM 11 /* system error */
48 #define MPD_ERROR_UNKHOST 12 /* unknown host */
49 #define MPD_ERROR_CONNPORT 13 /* problems connecting to port on host */
50 #define MPD_ERROR_NOTMPD 14 /* mpd not running on port at host */
51 #define MPD_ERROR_NORESPONSE 15 /* no response on attempting to connect */
52 #define MPD_ERROR_SENDING 16 /* error sending command */
53 #define MPD_ERROR_CONNCLOSED 17 /* connection closed by mpd */
54 #define MPD_ERROR_ACK 18 /* ACK returned! */
55 #define MPD_ERROR_BUFFEROVERRUN 19 /* Buffer was overrun! */
56 
57 #define MPD_ACK_ERROR_UNK -1
58 #define MPD_ERROR_AT_UNK -1
59 
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
65 
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
73 
74 #ifdef __cplusplus
75 extern "C" {
76 #endif
77 
78 typedef enum mpd_TagItems
79 {
96 
98 
99 /* internal stuff don't touch this struct */
100 typedef struct _mpd_ReturnElement {
101  char * name;
102  char * value;
104 
105 /* mpd_Connection
106  * holds info about connection to mpd
107  * use error, and errorStr to detect errors
108  */
109 typedef struct _mpd_Connection {
110  /* use this to check the version of mpd */
111  int version[3];
112  /* IMPORTANT, you want to get the error messages from here */
115  int errorAt;
116  /* this will be set to MPD_ERROR_* if there is an error, 0 if not */
117  int error;
118  /* DON'T TOUCH any of the rest of this stuff */
119  int sock;
121  int buflen;
122  int bufstart;
124  int listOks;
128  struct timeval timeout;
129  char *request;
131 
132 /* mpd_newConnection
133  * use this to open a new connection
134  * you should use mpd_closeConnection, when your done with the connection,
135  * even if an error has occurred
136  * _timeout_ is the connection timeout period in seconds
137  */
138 mpd_Connection * mpd_newConnection(const char * host, int port, float timeout);
139 
140 void mpd_setConnectionTimeout(mpd_Connection * connection, float timeout);
141 
142 /* mpd_closeConnection
143  * use this to close a connection and free'ing subsequent memory
144  */
146 
147 /* mpd_clearError
148  * clears error
149  */
150 void mpd_clearError(mpd_Connection * connection);
151 
152 /* STATUS STUFF */
153 
154 /* use these with status.state to determine what state the player is in */
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
159 
160 /* us this with status.volume to determine if mpd has volume support */
161 #define MPD_STATUS_NO_VOLUME -1
162 
163 /* mpd_Status
164  * holds info return from status command
165  */
166 typedef struct mpd_Status {
167  /* 0-100, or MPD_STATUS_NO_VOLUME when there is no volume support */
168  int volume;
169  /* 1 if repeat is on, 0 otherwise */
170  int repeat;
171  /* 1 if random is on, 0 otherwise */
172  int random;
173  /* 1 if single in on, 0 otherwise */
174  int single;
175  /* 1 if single is on, 0 otherwise */
176  int consume;
177  /* playlist length */
179  /* playlist, use this to determine when the playlist has changed */
180  long long playlist;
181  /* The id, used to determine is one of the playlists are changed */
182  long long storedplaylist;
183  /* use with MPD_STATUS_STATE_* to determine state of player */
184  int state;
185  /* crossfade setting in seconds */
187  /* if a song is currently selected (always the case when state is
188  * PLAY or PAUSE), this is the position of the currently
189  * playing song in the playlist, beginning with 0
190  */
191  int song;
192  /* Song ID of the currently selected song */
193  int songid;
194 
195  /* The next song pos */
196  int nextsong;
197  /* The next song id */
199 
200  /* time in seconds that have elapsed in the currently playing/paused
201  * song
202  */
204  /* length in seconds of the currently playing/paused song */
206  /* current bit rate in kbs */
207  int bitRate;
208  /* audio sample rate */
209  unsigned int sampleRate;
210  /* audio bits */
211  int bits;
212  /* audio channels */
213  int channels;
214  /* 1 if mpd is updating, 0 otherwise */
216  /* error */
217  char * error;
219 
221 
222 /* mpd_getStatus
223  * returns status info, be sure to free it with mpd_freeStatus()
224  * call this after mpd_sendStatusCommand()
225  */
227 
228 /* mpd_freeStatus
229  * free's status info malloc'd and returned by mpd_getStatus
230  */
231 void mpd_freeStatus(mpd_Status * status);
232 
233 typedef struct _mpd_Stats {
237  unsigned long uptime;
238  unsigned long dbUpdateTime;
239  unsigned long playTime;
240  unsigned long dbPlayTime;
242 
243 typedef struct _mpd_SearchStats {
245  unsigned long playTime;
247 
249 
251 
252 void mpd_freeStats(mpd_Stats * stats);
253 
255 
257 
258 /* SONG STUFF */
259 
260 #define MPD_SONG_NO_TIME -1
261 #define MPD_SONG_NO_NUM -1
262 #define MPD_SONG_NO_ID -1
263 
264 /* mpd_Song
265  * for storing song info returned by mpd
266  */
267 typedef struct _mpd_Song {
268  /* filename of song */
269  char * file;
270  /* artist, maybe NULL if there is no tag */
271  char * artist;
272  /* title, maybe NULL if there is no tag */
273  char * title;
274  /* album, maybe NULL if there is no tag */
275  char * album;
276  /* track, maybe NULL if there is no tag */
277  char * track;
278  /* name, maybe NULL if there is no tag; it's the name of the current
279  * song, f.e. the icyName of the stream */
280  char * name;
281  /* date */
282  char *date;
283 
284  /* added by qball */
285  /* Genre */
286  char *genre;
287  /* Composer */
288  char *composer;
289  /* Performer */
290  char *performer;
291  /* Disc */
292  char *disc;
293  /* Comment */
294  char *comment;
295 
296  /* AlbumArtist */
297  char *albumartist;
298  /* length of song in seconds, check that it is not MPD_SONG_NO_TIME */
299  int time;
300  /* if plchanges/playlistinfo/playlistid used, is the position of the
301  * song in the playlist */
302  int pos;
303  /* song id for a song in the playlist */
304  int id;
306 
307 /* mpd_newSong
308  * use to allocate memory for a new mpd_Song
309  * file, artist, etc all initialized to NULL
310  * if your going to assign values to file, artist, etc
311  * be sure to malloc or strdup the memory
312  * use mpd_freeSong to free the memory for the mpd_Song, it will also
313  * free memory for file, artist, etc, so don't do it yourself
314  */
316 
317 /* mpd_freeSong
318  * use to free memory allocated by mpd_newSong
319  * also it will free memory pointed to by file, artist, etc, so be careful
320  */
321 void mpd_freeSong(mpd_Song * song);
322 
323 /* mpd_songDup
324  * works like strDup, but for a mpd_Song
325  */
326 mpd_Song * mpd_songDup(const mpd_Song * song);
327 
328 /* DIRECTORY STUFF */
329 
330 /* mpd_Directory
331  * used to store info fro directory (right now that just the path)
332  */
333 typedef struct _mpd_Directory {
334  char * path;
336 
337 /* mpd_newDirectory
338  * allocates memory for a new directory
339  * use mpd_freeDirectory to free this memory
340  */
342 
343 /* mpd_freeDirectory
344  * used to free memory allocated with mpd_newDirectory, and it frees
345  * path of mpd_Directory, so be careful
346  */
348 
349 /* mpd_directoryDup
350  * works like strdup, but for mpd_Directory
351  */
353 
354 /* PLAYLISTFILE STUFF */
355 
356 /* mpd_PlaylistFile
357  * stores info about playlist file returned by lsinfo
358  */
359 typedef struct _mpd_PlaylistFile {
360  char * path;
361  char * mtime;
363 
364 /* mpd_newPlaylistFile
365  * allocates memory for new mpd_PlaylistFile, path is set to NULL
366  * free this memory with mpd_freePlaylistFile
367  */
369 
370 /* mpd_freePlaylist
371  * free memory allocated for freePlaylistFile, will also free
372  * path, so be careful
373  */
375 
376 /* mpd_playlistFileDup
377  * works like strdup, but for mpd_PlaylistFile
378  */
380 
381 /* INFO ENTITY STUFF */
382 
383 /* the type of entity returned from one of the commands that generates info
384  * use in conjunction with mpd_InfoEntity.type
385  */
386 #define MPD_INFO_ENTITY_TYPE_DIRECTORY 0
387 #define MPD_INFO_ENTITY_TYPE_SONG 1
388 #define MPD_INFO_ENTITY_TYPE_PLAYLISTFILE 2
389 
390 /* mpd_InfoEntity
391  * stores info on stuff returned info commands
392  */
393 typedef struct mpd_InfoEntity {
394  /* the type of entity, use with MPD_INFO_ENTITY_TYPE_* to determine
395  * what this entity is (song, directory, etc...)
396  */
397  int type;
398  /* the actual data you want, mpd_Song, mpd_Directory, etc */
399  union {
403  } info;
405 
407 
409 
410 /* INFO COMMANDS AND STUFF */
411 
412 /* use this function to loop over after calling Info/Listall functions */
414 
415 /* fetches the currently seeletect song (the song referenced by status->song
416  * and status->songid*/
418 
419 /* songNum of -1, means to display the whole list */
420 void mpd_sendPlaylistInfoCommand(mpd_Connection * connection, int songNum);
421 
422 /* songId of -1, means to display the whole list */
423 void mpd_sendPlaylistIdCommand(mpd_Connection * connection, int songId);
424 
425 /* use this to get the changes in the playlist since version _playlist_ */
426 void mpd_sendPlChangesCommand(mpd_Connection * connection, long long playlist);
427 
434 void mpd_sendPlChangesPosIdCommand(mpd_Connection * connection, long long playlist);
435 
436 /* recursivel fetches all songs/dir/playlists in "dir* (no metadata is
437  * returned) */
438 void mpd_sendListallCommand(mpd_Connection * connection, const char * dir);
439 
440 /* same as sendListallCommand, but also metadata is returned */
441 void mpd_sendListallInfoCommand(mpd_Connection * connection, const char * dir);
442 
443 /* non-recursive version of ListallInfo */
444 void mpd_sendLsInfoCommand(mpd_Connection * connection, const char * dir);
445 
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
450 
451 void mpd_sendSearchCommand(mpd_Connection * connection, int table,
452  const char * str);
453 
454 void mpd_sendFindCommand(mpd_Connection * connection, int table,
455  const char * str);
456 
457 /* LIST TAG COMMANDS */
458 
459 /* use this function fetch next artist entry, be sure to free the returned
460  * string. NULL means there are no more. Best used with sendListArtists
461  */
462 char * mpd_getNextArtist(mpd_Connection * connection);
463 
464 char * mpd_getNextAlbum(mpd_Connection * connection);
465 
466 char * mpd_getNextTag(mpd_Connection *connection, int type);
467 
468 /* list artist or albums by artist, arg1 should be set to the artist if
469  * listing albums by a artist, otherwise NULL for listing all artists or albums
470  */
471 void mpd_sendListCommand(mpd_Connection * connection, int table,
472  const char * arg1);
473 
474 /* SIMPLE COMMANDS */
475 
476 void mpd_sendAddCommand(mpd_Connection * connection, const char * file);
477 
478 int mpd_sendAddIdCommand(mpd_Connection *connection, const char *file);
479 
480 void mpd_sendDeleteCommand(mpd_Connection * connection, int songNum);
481 
482 void mpd_sendDeleteIdCommand(mpd_Connection * connection, int songNum);
483 
484 void mpd_sendSaveCommand(mpd_Connection * connection, const char * name);
485 
486 void mpd_sendLoadCommand(mpd_Connection * connection, const char * name);
487 
488 void mpd_sendRmCommand(mpd_Connection * connection, const char * name);
489 
490 void mpd_sendRenameCommand(mpd_Connection *connection, const char *from,
491  const char *to);
492 
494 
496 
497 /* use this to start playing at the beginning, useful when in random mode */
498 #define MPD_PLAY_AT_BEGINNING -1
499 
500 void mpd_sendPlayCommand(mpd_Connection * connection, int songNum);
501 
502 void mpd_sendPlayIdCommand(mpd_Connection * connection, int songNum);
503 
505 
506 void mpd_sendPauseCommand(mpd_Connection * connection, int pauseMode);
507 
509 
511 
512 void mpd_sendMoveCommand(mpd_Connection * connection, int from, int to);
513 
514 void mpd_sendMoveIdCommand(mpd_Connection * connection, int from, int to);
515 
516 void mpd_sendSwapCommand(mpd_Connection * connection, int song1, int song2);
517 
518 void mpd_sendSwapIdCommand(mpd_Connection * connection, int song1, int song2);
519 
520 void mpd_sendSeekCommand(mpd_Connection * connection, int song, int seek_time);
521 
522 void mpd_sendSeekIdCommand(mpd_Connection * connection, int song, int seek_time);
523 
524 void mpd_sendRepeatCommand(mpd_Connection * connection, int repeatMode);
525 
526 void mpd_sendSingleCommand(mpd_Connection * connection, int singleMode);
527 
528 void mpd_sendConsumeCommand(mpd_Connection * connection, int consumeMode);
529 
530 void mpd_sendRandomCommand(mpd_Connection * connection, int randomMode);
531 
532 void mpd_sendSetvolCommand(mpd_Connection * connection, int volumeChange);
533 
534 void mpd_sendCrossfadeCommand(mpd_Connection * connection, int seconds);
535 
536 void mpd_sendUpdateCommand(mpd_Connection * connection,const char * path);
537 
538 /* returns the update job id, call this after a update command*/
539 int mpd_getUpdateId(mpd_Connection * connection);
540 
541 void mpd_sendPasswordCommand(mpd_Connection * connection, const char * pass);
542 
543 /* after executing a command, when your done with it to get its status
544  * (you want to check connection->error for an error)
545  */
547 
548 /* command list stuff, use this to do things like add files very quickly */
550 
552 
554 
555 /* advance to the next listOk
556  * returns 0 if advanced to the next list_OK,
557  * returns -1 if it advanced to an OK or ACK */
559 
560 typedef struct _mpd_OutputEntity {
561  int id;
562  char * name;
563  int enabled;
565 
567 
569 
570 void mpd_sendEnableOutputCommand(mpd_Connection * connection, int outputId);
571 
572 void mpd_sendDisableOutputCommand(mpd_Connection * connection, int outputId);
573 
575 
582 
589 
598 
600 
601 char *mpd_getNextHandler(mpd_Connection * connection);
602 
604 
605 char *mpd_getNextTagType(mpd_Connection * connection);
606 
614 void mpd_sendListPlaylistInfoCommand(mpd_Connection *connection,const char *path);
615 
623 void mpd_sendListPlaylistCommand(mpd_Connection *connection,const char *path);
624 
632 void mpd_startSearch(mpd_Connection *connection, int exact);
633 
639 void mpd_addConstraintSearch(mpd_Connection *connection, int type, const char *name);
640 
645 
667 void mpd_startFieldSearch(mpd_Connection *connection, int type);
668 
669 void mpd_startPlaylistSearch(mpd_Connection *connection, int exact);
670 
672 
673 void mpd_sendPlaylistClearCommand(mpd_Connection *connection,const char *path);
674 
676  const char *playlist,const char *path);
677 
679  const char *playlist, int from, int to);
680 
682  const char *playlist, int pos);
683 
685 
687 char * mpd_getNextEvent(mpd_Connection *connection);
689 /* Stickers*/
690 char * mpd_getNextSticker (mpd_Connection * connection);
691 
692 void mpd_sendSetSongSticker(mpd_Connection *connection, const char *song, const char *sticker, const char *value);
693 void mpd_sendGetSongSticker(mpd_Connection *connection, const char *song, const char *sticker);
694 
695 void mpd_sendSetReplayGainMode(mpd_Connection *connection, const char *mode);
696 
699 #ifdef __cplusplus
700 }
701 #endif
702 
703 #endif
mpd_sendNotCommandsCommand
void mpd_sendNotCommandsCommand(mpd_Connection *connection)
_mpd_Song::comment
char * comment
Definition: libmpdclient.h:294
mpd_Status::random
int random
Definition: libmpdclient.h:172
mpd_sendClearCommand
void mpd_sendClearCommand(mpd_Connection *connection)
MPD_TAG_ITEM_GENRE
@ MPD_TAG_ITEM_GENRE
Definition: libmpdclient.h:85
mpd_sendListallInfoCommand
void mpd_sendListallInfoCommand(mpd_Connection *connection, const char *dir)
mpd_InfoEntity::playlistFile
mpd_PlaylistFile * playlistFile
Definition: libmpdclient.h:402
mpd_songDup
mpd_Song * mpd_songDup(const mpd_Song *song)
MPD_TAG_ITEM_ANY
@ MPD_TAG_ITEM_ANY
Definition: libmpdclient.h:93
mpd_sendPlaylistMoveCommand
void mpd_sendPlaylistMoveCommand(mpd_Connection *connection, const char *playlist, int from, int to)
mpd_sendMoveIdCommand
void mpd_sendMoveIdCommand(mpd_Connection *connection, int from, int to)
mpd_sendGetSongSticker
void mpd_sendGetSongSticker(mpd_Connection *connection, const char *song, const char *sticker)
mpd_clearError
void mpd_clearError(mpd_Connection *connection)
mpd_sendListPlaylistsCommand
void mpd_sendListPlaylistsCommand(mpd_Connection *connection)
_mpd_Connection::commandList
int commandList
Definition: libmpdclient.h:126
mpd_newConnection
mpd_Connection * mpd_newConnection(const char *host, int port, float timeout)
_mpd_Song::title
char * title
Definition: libmpdclient.h:273
mpd_sendPlChangesPosIdCommand
void mpd_sendPlChangesPosIdCommand(mpd_Connection *connection, long long playlist)
mpd_getStats
mpd_Stats * mpd_getStats(mpd_Connection *connection)
_mpd_Song::disc
char * disc
Definition: libmpdclient.h:292
mpd_getStatus
mpd_Status * mpd_getStatus(mpd_Connection *connection)
mpd_sendStatusCommand
void mpd_sendStatusCommand(mpd_Connection *connection)
mpd_sendDeleteIdCommand
void mpd_sendDeleteIdCommand(mpd_Connection *connection, int songNum)
mpd_sendAddIdCommand
int mpd_sendAddIdCommand(mpd_Connection *connection, const char *file)
MPD_TAG_ITEM_ALBUM
@ MPD_TAG_ITEM_ALBUM
Definition: libmpdclient.h:81
mpd_sendShuffleCommand
void mpd_sendShuffleCommand(mpd_Connection *connection)
mpd_sendStopCommand
void mpd_sendStopCommand(mpd_Connection *connection)
mpd_sendRenameCommand
void mpd_sendRenameCommand(mpd_Connection *connection, const char *from, const char *to)
_mpd_OutputEntity::name
char * name
Definition: libmpdclient.h:562
mpd_sendPlayCommand
void mpd_sendPlayCommand(mpd_Connection *connection, int songNum)
mpd_finishCommand
void mpd_finishCommand(mpd_Connection *connection)
mpd_getNextArtist
char * mpd_getNextArtist(mpd_Connection *connection)
mpd_SearchStats
struct _mpd_SearchStats mpd_SearchStats
_mpd_Song::file
char * file
Definition: libmpdclient.h:269
_mpd_Directory
Definition: libmpdclient.h:333
mpd_sendPlaylistIdCommand
void mpd_sendPlaylistIdCommand(mpd_Connection *connection, int songId)
mpd_sendSetSongSticker
void mpd_sendSetSongSticker(mpd_Connection *connection, const char *song, const char *sticker, const char *value)
mpd_sendSingleCommand
void mpd_sendSingleCommand(mpd_Connection *connection, int singleMode)
mpd_getReplayGainMode
char * mpd_getReplayGainMode(mpd_Connection *connection)
_mpd_Stats::numberOfAlbums
int numberOfAlbums
Definition: libmpdclient.h:235
mpd_getNextInfoEntity
mpd_InfoEntity * mpd_getNextInfoEntity(mpd_Connection *connection)
mpd_Status::error
char * error
Definition: libmpdclient.h:217
mpd_sendRandomCommand
void mpd_sendRandomCommand(mpd_Connection *connection, int randomMode)
mpd_startPlaylistSearch
void mpd_startPlaylistSearch(mpd_Connection *connection, int exact)
_mpd_Song::time
int time
Definition: libmpdclient.h:299
_mpd_Song::track
char * track
Definition: libmpdclient.h:277
mpd_sendReplayGainModeCommand
void mpd_sendReplayGainModeCommand(mpd_Connection *connection)
mpd_Status::sampleRate
unsigned int sampleRate
Definition: libmpdclient.h:209
_mpd_Stats::playTime
unsigned long playTime
Definition: libmpdclient.h:239
MPD_TAG_ITEM_ARTIST
@ MPD_TAG_ITEM_ARTIST
Definition: libmpdclient.h:80
mpd_sendFindCommand
void mpd_sendFindCommand(mpd_Connection *connection, int table, const char *str)
mpd_Status::state
int state
Definition: libmpdclient.h:184
mpd_Status::single
int single
Definition: libmpdclient.h:174
_mpd_SearchStats::playTime
unsigned long playTime
Definition: libmpdclient.h:245
mpd_directoryDup
mpd_Directory * mpd_directoryDup(mpd_Directory *directory)
MPD_TAG_ITEM_TRACK
@ MPD_TAG_ITEM_TRACK
Definition: libmpdclient.h:83
mpd_getNextCommand
char * mpd_getNextCommand(mpd_Connection *connection)
mpd_startFieldSearch
void mpd_startFieldSearch(mpd_Connection *connection, int type)
mpd_commitSearch
void mpd_commitSearch(mpd_Connection *connection)
MPD_TAG_ITEM_COMPOSER
@ MPD_TAG_ITEM_COMPOSER
Definition: libmpdclient.h:87
_mpd_ReturnElement
Definition: libmpdclient.h:100
_mpd_SearchStats
Definition: libmpdclient.h:243
mpd_sendClearErrorCommand
void mpd_sendClearErrorCommand(mpd_Connection *connection)
mpd_freeStatus
void mpd_freeStatus(mpd_Status *status)
mpd_startStatsSearch
void mpd_startStatsSearch(mpd_Connection *connection)
mpd_InfoEntity
struct mpd_InfoEntity mpd_InfoEntity
_mpd_Connection::doneProcessing
int doneProcessing
Definition: libmpdclient.h:123
mpd_sendDisableOutputCommand
void mpd_sendDisableOutputCommand(mpd_Connection *connection, int outputId)
_mpd_Connection::sock
int sock
Definition: libmpdclient.h:119
_mpd_Song::album
char * album
Definition: libmpdclient.h:275
mpd_sendRmCommand
void mpd_sendRmCommand(mpd_Connection *connection, const char *name)
mpd_sendCrossfadeCommand
void mpd_sendCrossfadeCommand(mpd_Connection *connection, int seconds)
mpd_InfoEntity::type
int type
Definition: libmpdclient.h:397
mpd_Status::channels
int channels
Definition: libmpdclient.h:213
MPD_TAG_ITEM_FILENAME
@ MPD_TAG_ITEM_FILENAME
Definition: libmpdclient.h:91
mpd_sendCommandListOkBegin
void mpd_sendCommandListOkBegin(mpd_Connection *connection)
mpd_sendPauseCommand
void mpd_sendPauseCommand(mpd_Connection *connection, int pauseMode)
mpd_sendSwapCommand
void mpd_sendSwapCommand(mpd_Connection *connection, int song1, int song2)
mpd_Status::crossfade
int crossfade
Definition: libmpdclient.h:186
mpd_Status::nextsongid
int nextsongid
Definition: libmpdclient.h:198
_mpd_Song::genre
char * genre
Definition: libmpdclient.h:286
_mpd_Song::id
int id
Definition: libmpdclient.h:304
_mpd_PlaylistFile::path
char * path
Definition: libmpdclient.h:360
mpd_getNextOutput
mpd_OutputEntity * mpd_getNextOutput(mpd_Connection *connection)
mpd_sendAddCommand
void mpd_sendAddCommand(mpd_Connection *connection, const char *file)
mpd_sendSearchCommand
void mpd_sendSearchCommand(mpd_Connection *connection, int table, const char *str)
MPD_TAG_NUM_OF_ITEM_TYPES
@ MPD_TAG_NUM_OF_ITEM_TYPES
Definition: libmpdclient.h:94
_mpd_OutputEntity
Definition: libmpdclient.h:560
_mpd_Connection
Definition: libmpdclient.h:109
mpd_Status::bits
int bits
Definition: libmpdclient.h:211
mpd_Status::playlist
long long playlist
Definition: libmpdclient.h:180
_mpd_Song::date
char * date
Definition: libmpdclient.h:282
_mpd_ReturnElement::name
char * name
Definition: libmpdclient.h:101
mpd_sendSwapIdCommand
void mpd_sendSwapIdCommand(mpd_Connection *connection, int song1, int song2)
mpd_InfoEntity::info
union mpd_InfoEntity::@4 info
mpd_Status
struct mpd_Status mpd_Status
_mpd_Song::performer
char * performer
Definition: libmpdclient.h:290
mpd_Status::totalTime
int totalTime
Definition: libmpdclient.h:205
mpd_sendRepeatCommand
void mpd_sendRepeatCommand(mpd_Connection *connection, int repeatMode)
mpd_sendPlayIdCommand
void mpd_sendPlayIdCommand(mpd_Connection *connection, int songNum)
_mpd_Connection::version
int version[3]
Definition: libmpdclient.h:111
mpd_Stats
struct _mpd_Stats mpd_Stats
_mpd_OutputEntity::id
int id
Definition: libmpdclient.h:561
mpd_playlistFileDup
mpd_PlaylistFile * mpd_playlistFileDup(mpd_PlaylistFile *playlist)
_mpd_PlaylistFile::mtime
char * mtime
Definition: libmpdclient.h:361
mpd_getNextTagType
char * mpd_getNextTagType(mpd_Connection *connection)
mpd_sendCommandListEnd
void mpd_sendCommandListEnd(mpd_Connection *connection)
mpd_Directory
struct _mpd_Directory mpd_Directory
mpd_Status::updatingDb
int updatingDb
Definition: libmpdclient.h:215
mpd_sendPlChangesCommand
void mpd_sendPlChangesCommand(mpd_Connection *connection, long long playlist)
_mpd_Stats::dbUpdateTime
unsigned long dbUpdateTime
Definition: libmpdclient.h:238
mpd_Song
struct _mpd_Song mpd_Song
mpd_setConnectionTimeout
void mpd_setConnectionTimeout(mpd_Connection *connection, float timeout)
_mpd_Song::composer
char * composer
Definition: libmpdclient.h:288
_mpd_Connection::errorAt
int errorAt
Definition: libmpdclient.h:115
mpd_getSearchStats
mpd_SearchStats * mpd_getSearchStats(mpd_Connection *connection)
mpd_sendPlaylistDeleteCommand
void mpd_sendPlaylistDeleteCommand(mpd_Connection *connection, const char *playlist, int pos)
MPD_BUFFER_MAX_LENGTH
#define MPD_BUFFER_MAX_LENGTH
Definition: libmpdclient.h:42
_mpd_Connection::bufstart
int bufstart
Definition: libmpdclient.h:122
_mpd_Connection::listOks
int listOks
Definition: libmpdclient.h:124
mpd_sendCommandListBegin
void mpd_sendCommandListBegin(mpd_Connection *connection)
mpd_addConstraintSearch
void mpd_addConstraintSearch(mpd_Connection *connection, int type, const char *name)
MPD_TAG_ITEM_PERFORMER
@ MPD_TAG_ITEM_PERFORMER
Definition: libmpdclient.h:88
mpd_sendLsInfoCommand
void mpd_sendLsInfoCommand(mpd_Connection *connection, const char *dir)
mpd_sendCurrentSongCommand
void mpd_sendCurrentSongCommand(mpd_Connection *connection)
mpd_newSong
mpd_Song * mpd_newSong(void)
mpd_Status::storedplaylist
long long storedplaylist
Definition: libmpdclient.h:182
mpd_InfoEntity
Definition: libmpdclient.h:393
mpd_getUpdateId
int mpd_getUpdateId(mpd_Connection *connection)
mpd_Connection
struct _mpd_Connection mpd_Connection
mpd_getNextHandler
char * mpd_getNextHandler(mpd_Connection *connection)
mpd_Status::playlistLength
int playlistLength
Definition: libmpdclient.h:178
mpd_sendPlaylistClearCommand
void mpd_sendPlaylistClearCommand(mpd_Connection *connection, const char *path)
mpd_sendStatsCommand
void mpd_sendStatsCommand(mpd_Connection *connection)
mpd_Status::consume
int consume
Definition: libmpdclient.h:176
mpd_getNextEvent
char * mpd_getNextEvent(mpd_Connection *connection)
_mpd_Stats::numberOfArtists
int numberOfArtists
Definition: libmpdclient.h:234
mpd_sendDeleteCommand
void mpd_sendDeleteCommand(mpd_Connection *connection, int songNum)
mpd_sendPlaylistAddCommand
void mpd_sendPlaylistAddCommand(mpd_Connection *connection, const char *playlist, const char *path)
_mpd_Stats::uptime
unsigned long uptime
Definition: libmpdclient.h:237
_mpd_Connection::buflen
int buflen
Definition: libmpdclient.h:121
mpd_freeSearchStats
void mpd_freeSearchStats(mpd_SearchStats *stats)
mpd_sendEnableOutputCommand
void mpd_sendEnableOutputCommand(mpd_Connection *connection, int outputId)
_mpd_Connection::request
char * request
Definition: libmpdclient.h:129
mpd_sendOutputsCommand
void mpd_sendOutputsCommand(mpd_Connection *connection)
MPD_TAG_ITEM_DATE
@ MPD_TAG_ITEM_DATE
Definition: libmpdclient.h:86
mpd_sendCommandsCommand
void mpd_sendCommandsCommand(mpd_Connection *connection)
mpd_sendUrlHandlersCommand
void mpd_sendUrlHandlersCommand(mpd_Connection *connection)
mpd_InfoEntity::directory
mpd_Directory * directory
Definition: libmpdclient.h:400
_mpd_Song
Definition: libmpdclient.h:267
_mpd_Stats::numberOfSongs
int numberOfSongs
Definition: libmpdclient.h:236
MPD_TAG_ITEM_NAME
@ MPD_TAG_ITEM_NAME
Definition: libmpdclient.h:84
mpd_ReturnElement
struct _mpd_ReturnElement mpd_ReturnElement
mpd_freePlaylistFile
void mpd_freePlaylistFile(mpd_PlaylistFile *playlist)
mpd_getNextAlbum
char * mpd_getNextAlbum(mpd_Connection *connection)
mpd_sendConsumeCommand
void mpd_sendConsumeCommand(mpd_Connection *connection, int consumeMode)
mpd_PlaylistFile
struct _mpd_PlaylistFile mpd_PlaylistFile
_mpd_Connection::timeout
struct timeval timeout
Definition: libmpdclient.h:128
mpd_nextListOkCommand
int mpd_nextListOkCommand(mpd_Connection *connection)
mpd_getNextTag
char * mpd_getNextTag(mpd_Connection *connection, int type)
mpd_sendSetvolCommand
void mpd_sendSetvolCommand(mpd_Connection *connection, int volumeChange)
_mpd_ReturnElement::value
char * value
Definition: libmpdclient.h:102
mpd_freeStats
void mpd_freeStats(mpd_Stats *stats)
_mpd_Song::albumartist
char * albumartist
Definition: libmpdclient.h:297
mpd_Status::bitRate
int bitRate
Definition: libmpdclient.h:207
mpd_sendLoadCommand
void mpd_sendLoadCommand(mpd_Connection *connection, const char *name)
mpd_sendTagTypesCommand
void mpd_sendTagTypesCommand(mpd_Connection *connection)
MPD_TAG_ITEM_DISC
@ MPD_TAG_ITEM_DISC
Definition: libmpdclient.h:90
mpd_sendUpdateCommand
void mpd_sendUpdateCommand(mpd_Connection *connection, const char *path)
mpd_freeDirectory
void mpd_freeDirectory(mpd_Directory *directory)
mpd_startSearch
void mpd_startSearch(mpd_Connection *connection, int exact)
mpd_freeOutputElement
void mpd_freeOutputElement(mpd_OutputEntity *output)
_mpd_Connection::error
int error
Definition: libmpdclient.h:117
_mpd_Connection::errorStr
char errorStr[MPD_ERRORSTR_MAX_LENGTH+1]
Definition: libmpdclient.h:113
_mpd_Song::name
char * name
Definition: libmpdclient.h:280
mpd_sendPlaylistInfoCommand
void mpd_sendPlaylistInfoCommand(mpd_Connection *connection, int songNum)
_mpd_Stats
Definition: libmpdclient.h:233
mpd_sendPrevCommand
void mpd_sendPrevCommand(mpd_Connection *connection)
mpd_sendSeekIdCommand
void mpd_sendSeekIdCommand(mpd_Connection *connection, int song, int seek_time)
mpd_Status::songid
int songid
Definition: libmpdclient.h:193
_mpd_Song::pos
int pos
Definition: libmpdclient.h:302
mpd_Status::nextsong
int nextsong
Definition: libmpdclient.h:196
_mpd_Song::artist
char * artist
Definition: libmpdclient.h:271
mpd_sendSaveCommand
void mpd_sendSaveCommand(mpd_Connection *connection, const char *name)
mpd_sendMoveCommand
void mpd_sendMoveCommand(mpd_Connection *connection, int from, int to)
_mpd_SearchStats::numberOfSongs
int numberOfSongs
Definition: libmpdclient.h:244
mpd_Status::elapsedTime
int elapsedTime
Definition: libmpdclient.h:203
_mpd_Stats::dbPlayTime
unsigned long dbPlayTime
Definition: libmpdclient.h:240
mpd_sendGetEventsCommand
void mpd_sendGetEventsCommand(mpd_Connection *connection)
_mpd_OutputEntity::enabled
int enabled
Definition: libmpdclient.h:563
mpd_Status
Definition: libmpdclient.h:166
mpd_newDirectory
mpd_Directory * mpd_newDirectory(void)
mpd_InfoEntity::song
mpd_Song * song
Definition: libmpdclient.h:401
mpd_OutputEntity
struct _mpd_OutputEntity mpd_OutputEntity
mpd_Status::song
int song
Definition: libmpdclient.h:191
mpdTagItemKeys
char * mpdTagItemKeys[MPD_TAG_NUM_OF_ITEM_TYPES]
_mpd_PlaylistFile
Definition: libmpdclient.h:359
_mpd_Connection::buffer
char buffer[MPD_BUFFER_MAX_LENGTH+1]
Definition: libmpdclient.h:120
mpd_Status::volume
int volume
Definition: libmpdclient.h:168
MPD_TAG_ITEM_COMMENT
@ MPD_TAG_ITEM_COMMENT
Definition: libmpdclient.h:89
mpd_sendListallCommand
void mpd_sendListallCommand(mpd_Connection *connection, const char *dir)
mpd_sendSetReplayGainMode
void mpd_sendSetReplayGainMode(mpd_Connection *connection, const char *mode)
mpd_freeSong
void mpd_freeSong(mpd_Song *song)
mpd_sendListPlaylistInfoCommand
void mpd_sendListPlaylistInfoCommand(mpd_Connection *connection, const char *path)
mpd_sendListPlaylistCommand
void mpd_sendListPlaylistCommand(mpd_Connection *connection, const char *path)
_mpd_Connection::doneListOk
int doneListOk
Definition: libmpdclient.h:125
mpd_closeConnection
void mpd_closeConnection(mpd_Connection *connection)
mpd_freeInfoEntity
void mpd_freeInfoEntity(mpd_InfoEntity *entity)
_mpd_Directory::path
char * path
Definition: libmpdclient.h:334
mpd_newInfoEntity
mpd_InfoEntity * mpd_newInfoEntity(void)
mpd_sendPasswordCommand
void mpd_sendPasswordCommand(mpd_Connection *connection, const char *pass)
mpd_sendSeekCommand
void mpd_sendSeekCommand(mpd_Connection *connection, int song, int seek_time)
mpd_sendListCommand
void mpd_sendListCommand(mpd_Connection *connection, int table, const char *arg1)
mpd_TagItems
mpd_TagItems
Definition: libmpdclient.h:79
MPD_TAG_ITEM_TITLE
@ MPD_TAG_ITEM_TITLE
Definition: libmpdclient.h:82
_mpd_Connection::returnElement
mpd_ReturnElement * returnElement
Definition: libmpdclient.h:127
mpd_newPlaylistFile
mpd_PlaylistFile * mpd_newPlaylistFile(void)
mpd_getNextSticker
char * mpd_getNextSticker(mpd_Connection *connection)
mpd_sendNextCommand
void mpd_sendNextCommand(mpd_Connection *connection)
MPD_TAG_ITEM_ALBUM_ARTIST
@ MPD_TAG_ITEM_ALBUM_ARTIST
Definition: libmpdclient.h:92
_mpd_Connection::errorCode
int errorCode
Definition: libmpdclient.h:114
mpd_Status::repeat
int repeat
Definition: libmpdclient.h:170
MPD_ERRORSTR_MAX_LENGTH
#define MPD_ERRORSTR_MAX_LENGTH
Definition: libmpdclient.h:43

Copyright 2006 Qball Cow