/usr/include/libmpd-1.0/libmpd/libmpd-player.h is in libmpd-dev 0.20.0-1.2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 | /* libmpd (high level libmpdclient library)
* Copyright (C) 2004-2009 Qball Cow <qball@sarine.nl>
* Project homepage: http://gmpcwiki.sarine.nl/
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
/**
* @defgroup Player Player
* These functions allow the client to control the player part of mpd.
* To use the read functions you need "read" permission on mpd.
* To use the control functions you need "control" and "read" permission on mpd.
*/
/* @{*/
#ifndef __MPD_LIB_PLAYER__
#define __MPD_LIB_PLAYER__
/**
* Enum representing the possible states of the player
*/
typedef enum {
/** The player is paused */
MPD_PLAYER_PAUSE = MPD_STATUS_STATE_PAUSE,
/** The player is playing */
MPD_PLAYER_PLAY = MPD_STATUS_STATE_PLAY,
/** The player is stopped */
MPD_PLAYER_STOP = MPD_STATUS_STATE_STOP,
/** The player is in an unknown state */
MPD_PLAYER_UNKNOWN = MPD_STATUS_STATE_UNKNOWN
} MpdState;
/**
* \param mi a #MpdObj
*
* Sends mpd the play command.
*
* This equals:
* @code
* mpd_player_play_id(mi, -1);
* @endcode
*
* @returns a #MpdError
*/
int mpd_player_play(MpdObj * mi);
/**
*
* \param mi a #MpdObj
* \param id a songid.
*
* Plays the song with id
*
* @returns a #MpdError
*/
int mpd_player_play_id(MpdObj * mi, int id);
/**
* \param mi a #MpdObj
*
* Sends mpd the stop command.
*
* @returns a #MpdError
*/
int mpd_player_stop(MpdObj * mi);
/**
* \param mi a #MpdObj
*
* Sends mpd the next command.
*
* @returns a #MpdError
*/
int mpd_player_next(MpdObj * mi);
/**
* \param mi a #MpdObj
*
* Sends mpd the prev command.
*
* @returns a #MpdError
*/
int mpd_player_prev(MpdObj * mi);
/**
* \param mi a #MpdObj
*
* Sends mpd the pause command.
*
* @returns a #MpdError
*/
int mpd_player_pause(MpdObj * mi);
/**
* \param mi a #MpdObj
*
* Returns the mpd play state (play/paused/stop)
*
* @returns a #MpdState
*/
int mpd_player_get_state(MpdObj * mi);
/**
* \param mi a #MpdObj
*
* Returns the id of the currently playing song
*
* @returns the songid of the playing song
*/
int mpd_player_get_current_song_id(MpdObj * mi);
/**
* \param mi a #MpdObj
*
* Returns the position of the currently playing song in the playlist
*
* @returns the position of the playing song
*/
int mpd_player_get_current_song_pos(MpdObj * mi);
/**
* \param mi a #MpdObj
*
* Get the state of repeat: 1 if enabled, 0 when disabled.
*
* @returns the state of repeat
*/
int mpd_player_get_repeat(MpdObj * mi);
/**
* \param mi a #MpdObj
*
* Get the state of consume mode: 1 if enabled, 0 when disabled.
*
* @returns the state of consume
*/
int mpd_player_get_consume(MpdObj * mi);
/**
* \param mi a #MpdObj
*
* Get the state of single mode: 1 if enabled, 0 when disabled.
*
* @returns the state of single
*/
int mpd_player_get_single(MpdObj * mi);
/**
* \param mi a #MpdObj
* \param repeat New state of repeat (1 is enabled, 0 is disabled)
*
* Enable/disabled repeat
*
* @returns 0 when successful
*/
int mpd_player_set_repeat(MpdObj * mi, int repeat);
/**
* \param mi a #MpdObj
*
* Get the state of random: 1 if enabled, 0 when disabled.
*
* @returns the state of random
*/
int mpd_player_get_random(MpdObj * mi);
/**
* @param mi a #MpdObj
* @param random New state of random (1 is enabled, 0 is disabled)
*
* Enable/disable random
*
* @returns 0 when successful
*/
int mpd_player_set_random(MpdObj * mi, int random);
/**
* @param mi a #MpdObj
* @param sec Position to seek to. (in seconds)
*
* Seek through the current song.
* @returns a #MpdError
*/
int mpd_player_seek(MpdObj * mi, int sec);
int mpd_player_get_next_song_pos(MpdObj *mi);
int mpd_player_get_next_song_id(MpdObj *mi);
/**
* @param mi a #MpdObj
* @param single the state of single mode
*
* Enable/disable single mode. (single = 1 is enabled, single = 0 disabled)
* @return a #MpdError
*/
int mpd_player_set_single(MpdObj * mi, int single);
/**
* @param mi a #MpdObj
* @param consume the state of consume mode
*
* Enable/disable consume mode. (consume = 1 is enabled, consume = 0 disabled)
*/
int mpd_player_set_consume(MpdObj * mi, int consume);
#endif
/*@}*/
|