libmpdclient  2.17
player.h
Go to the documentation of this file.
1 /* libmpdclient
2  (c) 2003-2018 The Music Player Daemon Project
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  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17  ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
20  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
21  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
22  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
23  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
24  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
25  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28 
37 #ifndef MPD_PLAYER_H
38 #define MPD_PLAYER_H
39 
40 #include "compiler.h"
41 
42 #include <stdbool.h>
43 
44 struct mpd_connection;
45 struct mpd_song;
46 
47 #ifdef __cplusplus
48 extern "C" {
49 #endif
50 
55 bool
56 mpd_send_current_song(struct mpd_connection *connection);
57 
65 mpd_malloc
66 struct mpd_song *
67 mpd_run_current_song(struct mpd_connection *connection);
68 
74 bool
75 mpd_send_play(struct mpd_connection *connection);
76 
77 bool
78 mpd_run_play(struct mpd_connection *connection);
79 
87 bool
88 mpd_send_play_pos(struct mpd_connection *connection, unsigned song_pos);
89 
90 bool
91 mpd_run_play_pos(struct mpd_connection *connection, unsigned song_pos);
92 
100 bool
101 mpd_send_play_id(struct mpd_connection *connection, unsigned id);
102 
103 bool
104 mpd_run_play_id(struct mpd_connection *connection, unsigned song_id);
105 
106 bool
107 mpd_send_stop(struct mpd_connection *connection);
108 
109 bool
110 mpd_run_stop(struct mpd_connection *connection);
111 
117 bool
118 mpd_send_toggle_pause(struct mpd_connection *connection);
119 
120 bool
121 mpd_run_toggle_pause(struct mpd_connection *connection);
122 
123 bool
124 mpd_send_pause(struct mpd_connection *connection, bool mode);
125 
126 bool
127 mpd_run_pause(struct mpd_connection *connection, bool mode);
128 
129 bool
130 mpd_send_next(struct mpd_connection *connection);
131 
132 bool
133 mpd_run_next(struct mpd_connection *connection);
134 
135 bool
136 mpd_send_previous(struct mpd_connection *connection);
137 
138 bool
139 mpd_run_previous(struct mpd_connection *connection);
140 
149 bool
150 mpd_send_seek_pos(struct mpd_connection *connection,
151  unsigned song_pos, unsigned t);
152 
153 bool
154 mpd_run_seek_pos(struct mpd_connection *connection,
155  unsigned song_pos, unsigned t);
156 
165 bool
166 mpd_send_seek_id(struct mpd_connection *connection, unsigned id, unsigned t);
167 
168 bool
169 mpd_run_seek_id(struct mpd_connection *connection,
170  unsigned song_id, unsigned t);
171 
180 bool
181 mpd_send_seek_id_float(struct mpd_connection *connection,
182  unsigned id, float t);
183 
184 bool
185 mpd_run_seek_id_float(struct mpd_connection *connection,
186  unsigned song_id, float t);
187 
198 bool
199 mpd_send_seek_current(struct mpd_connection *connection,
200  float t, bool relative);
201 
202 bool
203 mpd_run_seek_current(struct mpd_connection *connection,
204  float t, bool relative);
205 
206 bool
207 mpd_send_repeat(struct mpd_connection *connection, bool mode);
208 
209 bool
210 mpd_run_repeat(struct mpd_connection *connection, bool mode);
211 
212 bool
213 mpd_send_random(struct mpd_connection *connection, bool mode);
214 
215 bool
216 mpd_run_random(struct mpd_connection *connection, bool mode);
217 
218 bool
219 mpd_send_single(struct mpd_connection *connection, bool mode);
220 
221 bool
222 mpd_run_single(struct mpd_connection *connection, bool mode);
223 
224 bool
225 mpd_send_consume(struct mpd_connection *connection, bool mode);
226 
227 bool
228 mpd_run_consume(struct mpd_connection *connection, bool mode);
229 
230 bool
231 mpd_send_crossfade(struct mpd_connection *connection, unsigned seconds);
232 
233 bool
234 mpd_run_crossfade(struct mpd_connection *connection, unsigned seconds);
235 
239 bool
240 mpd_send_mixrampdb(struct mpd_connection *connection, float db);
241 
245 bool
246 mpd_run_mixrampdb(struct mpd_connection *connection, float db);
247 
251 bool
252 mpd_send_mixrampdelay(struct mpd_connection *connection, float seconds);
253 
257 bool
258 mpd_run_mixrampdelay(struct mpd_connection *connection, float seconds);
259 
263 bool
264 mpd_send_clearerror(struct mpd_connection *connection);
265 
269 bool
270 mpd_run_clearerror(struct mpd_connection *connection);
271 
272 #ifdef __cplusplus
273 }
274 #endif
275 
276 #endif
bool mpd_send_next(struct mpd_connection *connection)
bool mpd_run_play(struct mpd_connection *connection)
bool mpd_run_random(struct mpd_connection *connection, bool mode)
bool mpd_send_mixrampdb(struct mpd_connection *connection, float db)
bool mpd_send_repeat(struct mpd_connection *connection, bool mode)
bool mpd_send_seek_id(struct mpd_connection *connection, unsigned id, unsigned t)
bool mpd_send_seek_id_float(struct mpd_connection *connection, unsigned id, float t)
bool mpd_send_single(struct mpd_connection *connection, bool mode)
mpd_malloc struct mpd_song * mpd_run_current_song(struct mpd_connection *connection)
bool mpd_run_previous(struct mpd_connection *connection)
bool mpd_send_play_id(struct mpd_connection *connection, unsigned id)
bool mpd_run_play_pos(struct mpd_connection *connection, unsigned song_pos)
bool mpd_run_crossfade(struct mpd_connection *connection, unsigned seconds)
bool mpd_send_current_song(struct mpd_connection *connection)
bool mpd_run_stop(struct mpd_connection *connection)
bool mpd_send_previous(struct mpd_connection *connection)
bool mpd_send_toggle_pause(struct mpd_connection *connection)
Compiler specific definitions.
bool mpd_run_next(struct mpd_connection *connection)
bool mpd_run_clearerror(struct mpd_connection *connection)
bool mpd_run_pause(struct mpd_connection *connection, bool mode)
bool mpd_run_mixrampdb(struct mpd_connection *connection, float db)
bool mpd_run_seek_id(struct mpd_connection *connection, unsigned song_id, unsigned t)
bool mpd_send_crossfade(struct mpd_connection *connection, unsigned seconds)
bool mpd_send_play_pos(struct mpd_connection *connection, unsigned song_pos)
bool mpd_send_stop(struct mpd_connection *connection)
bool mpd_send_consume(struct mpd_connection *connection, bool mode)
bool mpd_send_random(struct mpd_connection *connection, bool mode)
bool mpd_run_consume(struct mpd_connection *connection, bool mode)
bool mpd_run_play_id(struct mpd_connection *connection, unsigned song_id)
bool mpd_run_repeat(struct mpd_connection *connection, bool mode)
bool mpd_run_seek_pos(struct mpd_connection *connection, unsigned song_pos, unsigned t)
bool mpd_send_play(struct mpd_connection *connection)
bool mpd_run_toggle_pause(struct mpd_connection *connection)
bool mpd_send_mixrampdelay(struct mpd_connection *connection, float seconds)
bool mpd_run_single(struct mpd_connection *connection, bool mode)
Definition: song.h:49
bool mpd_run_seek_id_float(struct mpd_connection *connection, unsigned song_id, float t)
bool mpd_send_pause(struct mpd_connection *connection, bool mode)
bool mpd_send_seek_current(struct mpd_connection *connection, float t, bool relative)
bool mpd_run_seek_current(struct mpd_connection *connection, float t, bool relative)
bool mpd_send_clearerror(struct mpd_connection *connection)
bool mpd_run_mixrampdelay(struct mpd_connection *connection, float seconds)
bool mpd_send_seek_pos(struct mpd_connection *connection, unsigned song_pos, unsigned t)