Set default priority to 0, not -1.
[libmpd.git] / src / libmpdclient.h
blob5dea74ad71c1bd389edfdfd1538416ef124de535
1 /* libmpdclient
2 (c)2003-2006 by Warren Dukes (warren.dukes@gmail.com)
3 This project's homepage is: http://www.musicpd.org
5 Redistribution and use in source and binary forms, with or without
6 modification, are permitted provided that the following conditions
7 are met:
9 - Redistributions of source code must retain the above copyright
10 notice, this list of conditions and the following disclaimer.
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.
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.
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.
33 #ifndef LIBMPDCLIENT_H
34 #define LIBMPDCLIENT_H
36 #ifdef WIN32
37 # define __W32API_USE_DLLIMPORT__ 1
38 #endif
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 "
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! */
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
74 #ifdef __cplusplus
75 extern "C" {
76 #endif
78 typedef enum mpd_TagItems
80 MPD_TAG_ITEM_ARTIST,
81 MPD_TAG_ITEM_ALBUM,
82 MPD_TAG_ITEM_TITLE,
83 MPD_TAG_ITEM_TRACK,
84 MPD_TAG_ITEM_NAME,
85 MPD_TAG_ITEM_GENRE,
86 MPD_TAG_ITEM_DATE,
87 MPD_TAG_ITEM_COMPOSER,
88 MPD_TAG_ITEM_PERFORMER,
89 MPD_TAG_ITEM_COMMENT,
90 MPD_TAG_ITEM_DISC,
91 MPD_TAG_ITEM_FILENAME,
92 MPD_TAG_ITEM_ALBUM_ARTIST,
93 MPD_TAG_ITEM_ANY,
94 MPD_TAG_NUM_OF_ITEM_TYPES
95 } mpd_TagItems;
97 extern char * mpdTagItemKeys[MPD_TAG_NUM_OF_ITEM_TYPES];
99 /* internal stuff don't touch this struct */
100 typedef struct _mpd_ReturnElement {
101 char * name;
102 char * value;
103 } mpd_ReturnElement;
105 /* mpd_Connection
106 * holds info about connection to mpd
107 * use error, and errorStr to detect errors
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 */
113 char errorStr[MPD_ERRORSTR_MAX_LENGTH+1];
114 int errorCode;
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;
120 char buffer[MPD_BUFFER_MAX_LENGTH+1];
121 int buflen;
122 int bufstart;
123 int doneProcessing;
124 int listOks;
125 int doneListOk;
126 int commandList;
127 mpd_ReturnElement * returnElement;
128 struct timeval timeout;
129 char *request;
130 } mpd_Connection;
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
138 mpd_Connection * mpd_newConnection(const char * host, int port, float timeout);
140 void mpd_setConnectionTimeout(mpd_Connection * connection, float timeout);
142 /* mpd_closeConnection
143 * use this to close a connection and free'ing subsequent memory
145 void mpd_closeConnection(mpd_Connection * connection);
147 /* mpd_clearError
148 * clears error
150 void mpd_clearError(mpd_Connection * connection);
152 /* STATUS STUFF */
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
160 /* us this with status.volume to determine if mpd has volume support */
161 #define MPD_STATUS_NO_VOLUME -1
163 /* mpd_Status
164 * holds info return from status command
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 */
178 int playlistLength;
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 */
186 int crossfade;
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
191 int song;
192 /* Song ID of the currently selected song */
193 int songid;
195 /* The next song pos */
196 int nextsong;
197 /* The next song id */
198 int nextsongid;
200 /* time in seconds that have elapsed in the currently playing/paused
201 * song
203 int elapsedTime;
204 /* length in seconds of the currently playing/paused song */
205 int totalTime;
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 */
215 int updatingDb;
216 /* error */
217 char * error;
218 } mpd_Status;
220 void mpd_sendStatusCommand(mpd_Connection * connection);
222 /* mpd_getStatus
223 * returns status info, be sure to free it with mpd_freeStatus()
224 * call this after mpd_sendStatusCommand()
226 mpd_Status * mpd_getStatus(mpd_Connection * connection);
228 /* mpd_freeStatus
229 * free's status info malloc'd and returned by mpd_getStatus
231 void mpd_freeStatus(mpd_Status * status);
233 typedef struct _mpd_Stats {
234 int numberOfArtists;
235 int numberOfAlbums;
236 int numberOfSongs;
237 unsigned long uptime;
238 unsigned long dbUpdateTime;
239 unsigned long playTime;
240 unsigned long dbPlayTime;
241 } mpd_Stats;
243 typedef struct _mpd_SearchStats {
244 int numberOfSongs;
245 unsigned long playTime;
246 } mpd_SearchStats;
248 void mpd_sendStatsCommand(mpd_Connection * connection);
250 mpd_Stats * mpd_getStats(mpd_Connection * connection);
252 void mpd_freeStats(mpd_Stats * stats);
254 mpd_SearchStats * mpd_getSearchStats(mpd_Connection * connection);
256 void mpd_freeSearchStats(mpd_SearchStats * stats);
258 /* SONG STUFF */
260 #define MPD_SONG_NO_TIME -1
261 #define MPD_SONG_NO_NUM -1
262 #define MPD_SONG_NO_ID -1
263 #define MPD_SONG_NO_PRIORITY 0
265 /* mpd_Song
266 * for storing song info returned by mpd
268 typedef struct _mpd_Song {
269 /* filename of song */
270 char * file;
271 /* artist, maybe NULL if there is no tag */
272 char * artist;
273 /* title, maybe NULL if there is no tag */
274 char * title;
275 /* album, maybe NULL if there is no tag */
276 char * album;
277 /* track, maybe NULL if there is no tag */
278 char * track;
279 /* name, maybe NULL if there is no tag; it's the name of the current
280 * song, f.e. the icyName of the stream */
281 char * name;
282 /* date */
283 char *date;
285 /* added by qball */
286 /* Genre */
287 char *genre;
288 /* Composer */
289 char *composer;
290 /* Performer */
291 char *performer;
292 /* Disc */
293 char *disc;
294 /* Comment */
295 char *comment;
297 /* AlbumArtist */
298 char *albumartist;
299 /* length of song in seconds, check that it is not MPD_SONG_NO_TIME */
300 int time;
301 /* if plchanges/playlistinfo/playlistid used, is the position of the
302 * song in the playlist */
303 int pos;
304 /* song id for a song in the playlist */
305 int id;
306 /* Priority */
307 int priority;
308 } mpd_Song;
310 /* mpd_newSong
311 * use to allocate memory for a new mpd_Song
312 * file, artist, etc all initialized to NULL
313 * if your going to assign values to file, artist, etc
314 * be sure to malloc or strdup the memory
315 * use mpd_freeSong to free the memory for the mpd_Song, it will also
316 * free memory for file, artist, etc, so don't do it yourself
318 mpd_Song * mpd_newSong(void);
320 /* mpd_freeSong
321 * use to free memory allocated by mpd_newSong
322 * also it will free memory pointed to by file, artist, etc, so be careful
324 void mpd_freeSong(mpd_Song * song);
326 /* mpd_songDup
327 * works like strDup, but for a mpd_Song
329 mpd_Song * mpd_songDup(const mpd_Song * song);
331 /* DIRECTORY STUFF */
333 /* mpd_Directory
334 * used to store info fro directory (right now that just the path)
336 typedef struct _mpd_Directory {
337 char * path;
338 } mpd_Directory;
340 /* mpd_newDirectory
341 * allocates memory for a new directory
342 * use mpd_freeDirectory to free this memory
344 mpd_Directory * mpd_newDirectory(void);
346 /* mpd_freeDirectory
347 * used to free memory allocated with mpd_newDirectory, and it frees
348 * path of mpd_Directory, so be careful
350 void mpd_freeDirectory(mpd_Directory * directory);
352 /* mpd_directoryDup
353 * works like strdup, but for mpd_Directory
355 mpd_Directory * mpd_directoryDup(mpd_Directory * directory);
357 /* PLAYLISTFILE STUFF */
359 /* mpd_PlaylistFile
360 * stores info about playlist file returned by lsinfo
362 typedef struct _mpd_PlaylistFile {
363 char * path;
364 char * mtime;
365 } mpd_PlaylistFile;
367 /* mpd_newPlaylistFile
368 * allocates memory for new mpd_PlaylistFile, path is set to NULL
369 * free this memory with mpd_freePlaylistFile
371 mpd_PlaylistFile * mpd_newPlaylistFile(void);
373 /* mpd_freePlaylist
374 * free memory allocated for freePlaylistFile, will also free
375 * path, so be careful
377 void mpd_freePlaylistFile(mpd_PlaylistFile * playlist);
379 /* mpd_playlistFileDup
380 * works like strdup, but for mpd_PlaylistFile
382 mpd_PlaylistFile * mpd_playlistFileDup(mpd_PlaylistFile * playlist);
384 /* INFO ENTITY STUFF */
386 /* the type of entity returned from one of the commands that generates info
387 * use in conjunction with mpd_InfoEntity.type
389 #define MPD_INFO_ENTITY_TYPE_DIRECTORY 0
390 #define MPD_INFO_ENTITY_TYPE_SONG 1
391 #define MPD_INFO_ENTITY_TYPE_PLAYLISTFILE 2
393 /* mpd_InfoEntity
394 * stores info on stuff returned info commands
396 typedef struct mpd_InfoEntity {
397 /* the type of entity, use with MPD_INFO_ENTITY_TYPE_* to determine
398 * what this entity is (song, directory, etc...)
400 int type;
401 /* the actual data you want, mpd_Song, mpd_Directory, etc */
402 union {
403 mpd_Directory * directory;
404 mpd_Song * song;
405 mpd_PlaylistFile * playlistFile;
406 } info;
407 } mpd_InfoEntity;
409 mpd_InfoEntity * mpd_newInfoEntity(void);
411 void mpd_freeInfoEntity(mpd_InfoEntity * entity);
413 /* INFO COMMANDS AND STUFF */
415 /* use this function to loop over after calling Info/Listall functions */
416 mpd_InfoEntity * mpd_getNextInfoEntity(mpd_Connection * connection);
418 /* fetches the currently seeletect song (the song referenced by status->song
419 * and status->songid*/
420 void mpd_sendCurrentSongCommand(mpd_Connection * connection);
422 /* songNum of -1, means to display the whole list */
423 void mpd_sendPlaylistInfoCommand(mpd_Connection * connection, int songNum);
425 /* songId of -1, means to display the whole list */
426 void mpd_sendPlaylistIdCommand(mpd_Connection * connection, int songId);
428 /* use this to get the changes in the playlist since version _playlist_ */
429 void mpd_sendPlChangesCommand(mpd_Connection * connection, long long playlist);
432 * @param connection: A valid and connected mpd_Connection.
433 * @param playlist: The playlist version you want the diff with.
434 * A more bandwidth efficient version of the mpd_sendPlChangesCommand.
435 * It only returns the pos+id of the changes song.
437 void mpd_sendPlChangesPosIdCommand(mpd_Connection * connection, long long playlist);
439 /* recursivel fetches all songs/dir/playlists in "dir* (no metadata is
440 * returned) */
441 void mpd_sendListallCommand(mpd_Connection * connection, const char * dir);
443 /* same as sendListallCommand, but also metadata is returned */
444 void mpd_sendListallInfoCommand(mpd_Connection * connection, const char * dir);
446 /* non-recursive version of ListallInfo */
447 void mpd_sendLsInfoCommand(mpd_Connection * connection, const char * dir);
449 #define MPD_TABLE_ARTIST MPD_TAG_ITEM_ARTIST
450 #define MPD_TABLE_ALBUM MPD_TAG_ITEM_ALBUM
451 #define MPD_TABLE_TITLE MPD_TAG_ITEM_TITLE
452 #define MPD_TABLE_FILENAME MPD_TAG_ITEM_FILENAME
454 void mpd_sendSearchCommand(mpd_Connection * connection, int table,
455 const char * str);
457 void mpd_sendFindCommand(mpd_Connection * connection, int table,
458 const char * str);
460 /* LIST TAG COMMANDS */
462 /* use this function fetch next artist entry, be sure to free the returned
463 * string. NULL means there are no more. Best used with sendListArtists
465 char * mpd_getNextArtist(mpd_Connection * connection);
467 char * mpd_getNextAlbum(mpd_Connection * connection);
469 char * mpd_getNextTag(mpd_Connection *connection, int type);
471 /* list artist or albums by artist, arg1 should be set to the artist if
472 * listing albums by a artist, otherwise NULL for listing all artists or albums
474 void mpd_sendListCommand(mpd_Connection * connection, int table,
475 const char * arg1);
477 /* SIMPLE COMMANDS */
479 void mpd_sendAddCommand(mpd_Connection * connection, const char * file);
481 int mpd_sendAddIdCommand(mpd_Connection *connection, const char *file);
483 void mpd_sendDeleteCommand(mpd_Connection * connection, int songNum);
485 void mpd_sendDeleteIdCommand(mpd_Connection * connection, int songNum);
487 void mpd_sendSaveCommand(mpd_Connection * connection, const char * name);
489 void mpd_sendLoadCommand(mpd_Connection * connection, const char * name);
491 void mpd_sendRmCommand(mpd_Connection * connection, const char * name);
493 void mpd_sendRenameCommand(mpd_Connection *connection, const char *from,
494 const char *to);
496 void mpd_sendShuffleCommand(mpd_Connection * connection);
498 void mpd_sendClearCommand(mpd_Connection * connection);
500 /* use this to start playing at the beginning, useful when in random mode */
501 #define MPD_PLAY_AT_BEGINNING -1
503 void mpd_sendPlayCommand(mpd_Connection * connection, int songNum);
505 void mpd_sendPlayIdCommand(mpd_Connection * connection, int songNum);
507 void mpd_sendStopCommand(mpd_Connection * connection);
509 void mpd_sendPauseCommand(mpd_Connection * connection, int pauseMode);
511 void mpd_sendNextCommand(mpd_Connection * connection);
513 void mpd_sendPrevCommand(mpd_Connection * connection);
515 void mpd_sendMoveCommand(mpd_Connection * connection, int from, int to);
517 void mpd_sendMoveIdCommand(mpd_Connection * connection, int from, int to);
519 void mpd_sendSwapCommand(mpd_Connection * connection, int song1, int song2);
521 void mpd_sendSwapIdCommand(mpd_Connection * connection, int song1, int song2);
523 void mpd_sendSeekCommand(mpd_Connection * connection, int song, int seek_time);
525 void mpd_sendSeekIdCommand(mpd_Connection * connection, int song, int seek_time);
527 void mpd_sendRepeatCommand(mpd_Connection * connection, int repeatMode);
529 void mpd_sendSingleCommand(mpd_Connection * connection, int singleMode);
531 void mpd_sendConsumeCommand(mpd_Connection * connection, int consumeMode);
533 void mpd_sendRandomCommand(mpd_Connection * connection, int randomMode);
535 void mpd_sendSetvolCommand(mpd_Connection * connection, int volumeChange);
537 void mpd_sendCrossfadeCommand(mpd_Connection * connection, int seconds);
539 void mpd_sendUpdateCommand(mpd_Connection * connection,const char * path);
541 /* returns the update job id, call this after a update command*/
542 int mpd_getUpdateId(mpd_Connection * connection);
544 void mpd_sendPasswordCommand(mpd_Connection * connection, const char * pass);
546 /* after executing a command, when your done with it to get its status
547 * (you want to check connection->error for an error)
549 void mpd_finishCommand(mpd_Connection * connection);
551 /* command list stuff, use this to do things like add files very quickly */
552 void mpd_sendCommandListBegin(mpd_Connection * connection);
554 void mpd_sendCommandListOkBegin(mpd_Connection * connection);
556 void mpd_sendCommandListEnd(mpd_Connection * connection);
558 /* advance to the next listOk
559 * returns 0 if advanced to the next list_OK,
560 * returns -1 if it advanced to an OK or ACK */
561 int mpd_nextListOkCommand(mpd_Connection * connection);
563 typedef struct _mpd_OutputEntity {
564 int id;
565 char * name;
566 int enabled;
567 } mpd_OutputEntity;
569 void mpd_sendOutputsCommand(mpd_Connection * connection);
571 mpd_OutputEntity * mpd_getNextOutput(mpd_Connection * connection);
573 void mpd_sendEnableOutputCommand(mpd_Connection * connection, int outputId);
575 void mpd_sendDisableOutputCommand(mpd_Connection * connection, int outputId);
577 void mpd_freeOutputElement(mpd_OutputEntity * output);
580 * @param connection a #mpd_Connection
582 * Queries mpd for the allowed commands
584 void mpd_sendCommandsCommand(mpd_Connection * connection);
587 * @param connection a #mpd_Connection
589 * Queries mpd for the not allowed commands
591 void mpd_sendNotCommandsCommand(mpd_Connection * connection);
594 * @param connection a #mpd_Connection
596 * returns the next supported command.
598 * @returns a string, needs to be free'ed
600 char *mpd_getNextCommand(mpd_Connection *connection);
602 void mpd_sendUrlHandlersCommand(mpd_Connection * connection);
604 char *mpd_getNextHandler(mpd_Connection * connection);
606 void mpd_sendTagTypesCommand(mpd_Connection * connection);
608 char *mpd_getNextTagType(mpd_Connection * connection);
611 * @param connection a MpdConnection
612 * @param path the path to the playlist.
614 * List the content, with full metadata, of a stored playlist.
617 void mpd_sendListPlaylistInfoCommand(mpd_Connection *connection,const char *path);
620 * @param connection a MpdConnection
621 * @param path the path to the playlist.
623 * List the content of a stored playlist.
626 void mpd_sendListPlaylistCommand(mpd_Connection *connection,const char *path);
629 * @param connection a #mpd_Connection
630 * @param exact if to match exact
632 * starts a search, use mpd_addConstraintSearch to add
633 * a constraint to the search, and mpd_commitSearch to do the actual search
635 void mpd_startSearch(mpd_Connection *connection, int exact);
638 * @param connection a #mpd_Connection
639 * @param type
640 * @param name
642 void mpd_addConstraintSearch(mpd_Connection *connection, int type, const char *name);
645 * @param connection a #mpd_Connection
647 void mpd_commitSearch(mpd_Connection *connection);
650 * @param connection a #mpd_Connection
651 * @param type The type to search for
653 * starts a search for fields... f.e. get a list of artists would be:
654 * @code
655 * mpd_startFieldSearch(connection, MPD_TAG_ITEM_ARTIST);
656 * mpd_commitSearch(connection);
657 * @endcode
659 * or get a list of artist in genre "jazz" would be:
660 * @code
661 * mpd_startFieldSearch(connection, MPD_TAG_ITEM_ARTIST);
662 * mpd_addConstraintSearch(connection, MPD_TAG_ITEM_GENRE, "jazz")
663 * mpd_commitSearch(connection);
664 * @endcode
666 * mpd_startSearch will return a list of songs (and you need mpd_getNextInfoEntity)
667 * this one will return a list of only one field (the one specified with type) and you need
668 * mpd_getNextTag to get the results
670 void mpd_startFieldSearch(mpd_Connection *connection, int type);
672 void mpd_startPlaylistSearch(mpd_Connection *connection, int exact);
674 void mpd_startStatsSearch(mpd_Connection *connection);
676 void mpd_sendPlaylistClearCommand(mpd_Connection *connection,const char *path);
678 void mpd_sendPlaylistAddCommand(mpd_Connection *connection,
679 const char *playlist,const char *path);
681 void mpd_sendPlaylistMoveCommand(mpd_Connection *connection,
682 const char *playlist, int from, int to);
684 void mpd_sendPlaylistDeleteCommand(mpd_Connection *connection,
685 const char *playlist, int pos);
687 void mpd_sendClearErrorCommand(mpd_Connection * connection);
689 void mpd_sendGetEventsCommand(mpd_Connection *connection);
690 char * mpd_getNextEvent(mpd_Connection *connection);
691 void mpd_sendListPlaylistsCommand(mpd_Connection * connection);
692 /* Stickers*/
693 char * mpd_getNextSticker (mpd_Connection * connection);
695 void mpd_sendSetSongSticker(mpd_Connection *connection, const char *song, const char *sticker, const char *value);
696 void mpd_sendGetSongSticker(mpd_Connection *connection, const char *song, const char *sticker);
698 void mpd_sendSetReplayGainMode(mpd_Connection *connection, const char *mode);
700 void mpd_sendReplayGainModeCommand(mpd_Connection *connection);
701 char *mpd_getReplayGainMode(mpd_Connection *connection);
704 void mpd_sendSetPrioId(mpd_Connection *connection, int id, int priority);
705 void mpd_sendSetPrio(mpd_Connection *connection, int pos, int priority);
706 #ifdef __cplusplus
708 #endif
710 #endif