core/playlist: Move playlist_get_queue() out of the playlist namespace

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
This commit is contained in:
Anna Schumaker 2015-12-09 10:38:57 -05:00
parent 6f0b95608a
commit 82ed2f2dc0
4 changed files with 12 additions and 14 deletions

View File

@ -178,7 +178,7 @@ index_entry *playlist :: get_tracks(const std::string &name)
return INDEX_ENTRY(db_get(&playlist_db, name.c_str()));
}
queue *playlist :: get_queue()
struct queue *playlist_get_queue()
{
return &playlist_q;
}

View File

@ -75,7 +75,7 @@ private:
PlaylistWindow *playlist_window;
public:
PlaylistTab() : Tab(playlist :: get_queue())
PlaylistTab() : Tab(playlist_get_queue())
{
tab_builder->add_from_file(gui :: share_file("QueueLabel.ui"));
tab_builder->add_from_file(gui :: share_file("PlaylistWindow.ui"));

View File

@ -55,12 +55,6 @@ namespace playlist
* @return The index_entry containing the tracks.
*/
index_entry *get_tracks(const std::string &);
/**
* @return The playlist queue.
*/
queue *get_queue();
};
@ -77,4 +71,8 @@ bool playlist_has(const gchar *, struct track *);
/* Called to fill the queue with a specific playlist. */
void playlist_select(const gchar *);
/* Called to access the playlist queue. */
struct queue *playlist_get_queue();
#endif /* OCARINA_CORE_PLAYLIST_H */

View File

@ -13,7 +13,7 @@ static index_entry *IDX_NULL = NULL;
static void test_init()
{
queue *q = playlist :: get_queue();
queue *q = playlist_get_queue();
GSList *list;
filter_init();
@ -43,7 +43,7 @@ static void test_init()
static void test_queue()
{
queue *q = playlist :: get_queue();
queue *q = playlist_get_queue();
test_cp_data_dir();
filter_init();
@ -73,9 +73,9 @@ static void test_queue()
static void test_add()
{
index_entry *ent;
queue *q = playlist :: get_queue();
queue *l = collection_get_queue();
queue *q = playlist_get_queue();
index_entry *ent;
playlist_select("Favorites");
@ -98,8 +98,8 @@ static void test_add()
static void test_delete()
{
index_entry *ent;
queue *q = playlist :: get_queue();
queue *l = collection_get_queue();
queue *q = playlist_get_queue();
playlist :: del(track_get(5), "Banned");
ent = playlist :: get_tracks("Banned");
@ -139,7 +139,7 @@ static void test_has()
static void test_deinit()
{
struct queue *q = playlist :: get_queue();
struct queue *q = playlist_get_queue();
playlist_deinit();
collection_deinit();