libmpdclient 2.22
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
78mpd_pure
79unsigned
80mpd_song_get_duration(const struct mpd_song *song);
81
88mpd_pure
89unsigned
91
98mpd_pure
99unsigned
100mpd_song_get_start(const struct mpd_song *song);
101
108mpd_pure
109unsigned
110mpd_song_get_end(const struct mpd_song *song);
111
116mpd_pure
117time_t
119
126mpd_pure
127time_t
128mpd_song_get_added(const struct mpd_song *song);
129
137void
138mpd_song_set_pos(struct mpd_song *song, unsigned pos);
139
144mpd_pure
145unsigned
146mpd_song_get_pos(const struct mpd_song *song);
147
152mpd_pure
153unsigned
154mpd_song_get_id(const struct mpd_song *song);
155
162mpd_pure
163unsigned
164mpd_song_get_prio(const struct mpd_song *song);
165
172mpd_pure
173const struct mpd_audio_format *
175
183mpd_malloc
184struct mpd_song *
185mpd_song_begin(const struct mpd_pair *pair);
186
195bool
196mpd_song_feed(struct mpd_song *song, const struct mpd_pair *pair);
197
204mpd_malloc
205struct mpd_song *
206mpd_recv_song(struct mpd_connection *connection);
207
208#ifdef __cplusplus
209}
210#endif
211
212#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)
time_t mpd_song_get_added(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)
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:25