libsaria: Rename List -> Stack
I want to recycle the "class List" name, so I need to free it up from the playlist code. Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
This commit is contained in:
parent
d12c5bac75
commit
14fe5661a5
|
@ -119,11 +119,11 @@ namespace libsaria
|
|||
};
|
||||
|
||||
|
||||
class List : public Playlist {
|
||||
class Stack : public Playlist {
|
||||
public:
|
||||
List(unsigned int);
|
||||
List(string, unsigned int);
|
||||
~List();
|
||||
Stack(unsigned int);
|
||||
Stack(string, unsigned int);
|
||||
~Stack();
|
||||
|
||||
Track *next();
|
||||
void do_add_tracks(list<Track *> &);
|
||||
|
|
|
@ -15,7 +15,7 @@ static AutoPauseType pause_type;
|
|||
static unsigned short pause_count = 0;
|
||||
|
||||
static list<libsaria::Playlist *> playlist_deck;
|
||||
static libsaria::List recent_plist("Recent", PL_STATIC | PL_NO_DRAIN);
|
||||
static libsaria::Stack recent_plist("Recent", PL_STATIC | PL_NO_DRAIN);
|
||||
|
||||
static void renumber_playlists()
|
||||
{
|
||||
|
@ -123,7 +123,7 @@ namespace libsaria
|
|||
plist = new Queue(PL_NONE);
|
||||
break;
|
||||
default:
|
||||
plist = new List(PL_NONE);
|
||||
plist = new Stack(PL_NONE);
|
||||
};
|
||||
|
||||
if (front)
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
// Copyright (c) 2012 Bryan Schumaker.
|
||||
#include <libsaria/playlist.h>
|
||||
|
||||
namespace libsaria
|
||||
{
|
||||
|
||||
List::List(unsigned int flags) : Playlist("List", flags, PLIST_LIST)
|
||||
{
|
||||
}
|
||||
|
||||
List::List(string name, unsigned int flags) : Playlist(name, flags, PLIST_LIST)
|
||||
{
|
||||
}
|
||||
|
||||
List::~List()
|
||||
{
|
||||
}
|
||||
|
||||
void List::do_add_tracks(list<Track *> &tracks)
|
||||
{
|
||||
add_to_front(tracks);
|
||||
}
|
||||
|
||||
Track *List::next()
|
||||
{
|
||||
return pick_sequential();
|
||||
}
|
||||
|
||||
}; /* Namespace: libsaria */
|
|
@ -0,0 +1,29 @@
|
|||
// Copyright (c) 2012 Bryan Schumaker.
|
||||
#include <libsaria/playlist.h>
|
||||
|
||||
namespace libsaria
|
||||
{
|
||||
|
||||
Stack::Stack(unsigned int flags) : Playlist("List", flags, PLIST_LIST)
|
||||
{
|
||||
}
|
||||
|
||||
Stack::Stack(string name, unsigned int flags) : Playlist(name, flags, PLIST_LIST)
|
||||
{
|
||||
}
|
||||
|
||||
Stack::~Stack()
|
||||
{
|
||||
}
|
||||
|
||||
void Stack::do_add_tracks(list<Track *> &tracks)
|
||||
{
|
||||
add_to_front(tracks);
|
||||
}
|
||||
|
||||
Track *Stack::next()
|
||||
{
|
||||
return pick_sequential();
|
||||
}
|
||||
|
||||
}; /* Namespace: libsaria */
|
Loading…
Reference in New Issue