From d449d6abab3c263ae6bcfe2ae5e4465d7a1d149f Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 24 Jan 2009 14:51:35 +0100 Subject: playlist: added playlist_get_queue() To allow code outside playlist.c to access the "queue" object, provide a function which returns a const pointer. --- src/playlist.c | 6 ++++++ src/playlist.h | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/src/playlist.c b/src/playlist.c index 238502fee..9d1f4f5b4 100644 --- a/src/playlist.c +++ b/src/playlist.c @@ -132,6 +132,12 @@ void finishPlaylist(void) g_rand = NULL; } +const struct queue * +playlist_get_queue(void) +{ + return &playlist.queue; +} + void clearPlaylist(void) { stopPlaylist(); diff --git a/src/playlist.h b/src/playlist.h index ab6e0979b..3875aaed0 100644 --- a/src/playlist.h +++ b/src/playlist.h @@ -94,6 +94,12 @@ void initPlaylist(void); void finishPlaylist(void); +/** + * Returns the "queue" object of the global playlist instance. + */ +const struct queue * +playlist_get_queue(void); + void readPlaylistState(FILE *); void savePlaylistState(FILE *); -- cgit v1.2.3