libsaria: Added Set playlist type
I think inheritance is easier than passing a bunch of flags and then deciding what to do. Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
This commit is contained in:
parent
29cb7f7a47
commit
cfc50cf745
|
@ -23,6 +23,9 @@ namespace libsaria
|
|||
class Playlist {
|
||||
private:
|
||||
unsigned int flags;
|
||||
|
||||
protected:
|
||||
list<Track *> plist;
|
||||
/*bool del_renderer;
|
||||
unsigned int flags;
|
||||
string filename;
|
||||
|
@ -64,6 +67,13 @@ namespace libsaria
|
|||
void for_each_insert();*/
|
||||
};
|
||||
|
||||
|
||||
class Set : public Playlist {
|
||||
public:
|
||||
Set(unsigned int);
|
||||
~Set();
|
||||
};
|
||||
|
||||
}; /* Namespace: libsaria */
|
||||
|
||||
#endif /* LIBSARIA_PLAYLIST_H */
|
||||
|
|
|
@ -16,7 +16,7 @@ using namespace std;
|
|||
|
||||
static list<struct libsaria::library::Path> path_list;
|
||||
list<libsaria::library::Driver *> driver_list;
|
||||
libsaria::Playlist lib_playlist(PL_STATIC | PL_NO_DRAIN);
|
||||
libsaria::Set lib_playlist(PL_STATIC | PL_NO_DRAIN);
|
||||
/*list<libsaria::LibraryPath> path_list;
|
||||
libsaria::Playlist lib_playlist(PL_RANDOM | PL_SEQUENTIAL | PL_FILTER);
|
||||
static map<sid_t, libsaria::Track *> lookup_map;
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
// Copyright (c) 2012 Bryan Schumaker.
|
||||
#include <libsaria/playlist.h>
|
||||
|
||||
namespace libsaria
|
||||
{
|
||||
|
||||
Set::Set(unsigned int flags) : Playlist(flags)
|
||||
{
|
||||
}
|
||||
|
||||
Set::~Set()
|
||||
{
|
||||
}
|
||||
|
||||
}; /* Namespace: libsaria */
|
Loading…
Reference in New Issue