playlist: added playlist_get_queue()

To allow code outside playlist.c to access the "queue" object,
provide a function which returns a const pointer.
This commit is contained in:
Max Kellermann 2009-01-24 14:51:35 +01:00
parent 6cfe032b94
commit d449d6abab
2 changed files with 12 additions and 0 deletions

View File

@ -132,6 +132,12 @@ void finishPlaylist(void)
g_rand = NULL;
}
const struct queue *
playlist_get_queue(void)
{
return &playlist.queue;
}
void clearPlaylist(void)
{
stopPlaylist();

View File

@ -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 *);