aboutsummaryrefslogtreecommitdiffstats
path: root/src/Playlist.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-01-06 14:55:35 +0100
committerMax Kellermann <max@duempel.org>2013-01-06 18:59:33 +0100
commite202b407ec18570ad54a04c64341f654b447fb31 (patch)
tree5389f1a2fbbaa4791e986620e9f23ee4c9bc2f2c /src/Playlist.hxx
parent2cc89e60ccf4337b1956a4295cd3c3f71e91f2aa (diff)
downloadmpd-e202b407ec18570ad54a04c64341f654b447fb31.tar.gz
mpd-e202b407ec18570ad54a04c64341f654b447fb31.tar.xz
mpd-e202b407ec18570ad54a04c64341f654b447fb31.zip
Playlist: add constructor and destructor
Diffstat (limited to 'src/Playlist.hxx')
-rw-r--r--src/Playlist.hxx15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/Playlist.hxx b/src/Playlist.hxx
index 163d17afe..b158d0464 100644
--- a/src/Playlist.hxx
+++ b/src/Playlist.hxx
@@ -68,16 +68,19 @@ struct playlist {
* This variable is only valid if #playing is true.
*/
int queued;
-};
-void
-playlist_global_init();
+ playlist(unsigned max_length)
+ :current(-1), queued(-1) {
+ queue_init(&queue, max_length);
+ }
-void
-playlist_init(struct playlist *playlist, unsigned max_length);
+ ~playlist() {
+ queue_finish(&queue);
+ }
+};
void
-playlist_finish(struct playlist *playlist);
+playlist_global_init();
void
playlist_tag_changed(struct playlist *playlist);