libmpdclient 2.25
song.h
Go to the documentation of this file.
1// SPDX-License-Identifier: BSD-3-Clause
2// Copyright The Music Player Daemon Project
3
10#ifndef MPD_SONG_H
11#define MPD_SONG_H
12
13#include "tag.h"
14#include "compiler.h"
15
16#include <stdbool.h>
17#include <time.h>
18
19struct mpd_pair;
20struct mpd_connection;
21
29struct mpd_song;
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
38void mpd_song_free(struct mpd_song *song);
39
45mpd_malloc
46struct mpd_song *
47mpd_song_dup(const struct mpd_song *song);
48
54mpd_pure
55const char *
56mpd_song_get_uri(const struct mpd_song *song);
57
69mpd_pure
70const char *
71mpd_song_get_tag(const struct mpd_song *song,
72 enum mpd_tag_type type, unsigned idx);
73
81mpd_pure
82const char *
83mpd_song_get_real_uri(const struct mpd_song *song);
84
89mpd_pure
90unsigned
91mpd_song_get_duration(const struct mpd_song *song);
92
99mpd_pure
100unsigned
102
109mpd_pure
110unsigned
111mpd_song_get_start(const struct mpd_song *song);
112
119mpd_pure
120unsigned
121mpd_song_get_start_ms(const struct mpd_song *song);
122
129mpd_pure
130unsigned
131mpd_song_get_end(const struct mpd_song *song);
132
139mpd_pure
140unsigned
141mpd_song_get_end_ms(const struct mpd_song *song);
142
147mpd_pure
148time_t
150
157mpd_pure
158time_t
159mpd_song_get_added(const struct mpd_song *song);
160
168void
169mpd_song_set_pos(struct mpd_song *song, unsigned pos);
170
175mpd_pure
176unsigned
177mpd_song_get_pos(const struct mpd_song *song);
178
183mpd_pure
184unsigned
185mpd_song_get_id(const struct mpd_song *song);
186
193mpd_pure
194unsigned
195mpd_song_get_prio(const struct mpd_song *song);
196
203mpd_pure
204const struct mpd_audio_format *
206
214mpd_malloc
215struct mpd_song *
216mpd_song_begin(const struct mpd_pair *pair);
217
226bool
227mpd_song_feed(struct mpd_song *song, const struct mpd_pair *pair);
228
235mpd_malloc
236struct mpd_song *
237mpd_recv_song(struct mpd_connection *connection);
238
239#ifdef __cplusplus
240}
241#endif
242
243#endif
unsigned mpd_song_get_start(const struct mpd_song *song)
void mpd_song_free(struct mpd_song *song)
struct mpd_song * mpd_recv_song(struct mpd_connection *connection)
unsigned mpd_song_get_duration_ms(const struct mpd_song *song)
time_t mpd_song_get_last_modified(const struct mpd_song *song)
unsigned mpd_song_get_end(const struct mpd_song *song)
unsigned mpd_song_get_duration(const struct mpd_song *song)
unsigned mpd_song_get_end_ms(const struct mpd_song *song)
time_t mpd_song_get_added(const struct mpd_song *song)
unsigned mpd_song_get_start_ms(const struct mpd_song *song)
void mpd_song_set_pos(struct mpd_song *song, unsigned pos)
const char * mpd_song_get_uri(const struct mpd_song *song)
unsigned mpd_song_get_id(const struct mpd_song *song)
bool mpd_song_feed(struct mpd_song *song, const struct mpd_pair *pair)
unsigned mpd_song_get_prio(const struct mpd_song *song)
const char * mpd_song_get_real_uri(const struct mpd_song *song)
struct mpd_song * mpd_song_dup(const struct mpd_song *song)
struct mpd_song * mpd_song_begin(const struct mpd_pair *pair)
unsigned mpd_song_get_pos(const struct mpd_song *song)
const char * mpd_song_get_tag(const struct mpd_song *song, enum mpd_tag_type type, unsigned idx)
const struct mpd_audio_format * mpd_song_get_audio_format(const struct mpd_song *song)
mpd_tag_type
Definition tag.h:27