aboutsummaryrefslogtreecommitdiff
path: root/src/PlaylistGlobal.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-01-04 22:42:05 +0100
committerMax Kellermann <max@duempel.org>2013-01-05 02:43:00 +0100
commitd536944beb783ec098aa6215fc94d8e60cfd310d (patch)
treeb86702e5d0142cfe3c8bb22a9a4f8ea2034cb51b /src/PlaylistGlobal.cxx
parent1a8ef3cdab39234e91fe9d91dad2ae004e4537dc (diff)
Partition: new class, container for Playlist and PlayerControl
This is the beginning of multi-player support. There will be support for multiple Partition objects in one MPD process.
Diffstat (limited to 'src/PlaylistGlobal.cxx')
-rw-r--r--src/PlaylistGlobal.cxx18
1 files changed, 5 insertions, 13 deletions
diff --git a/src/PlaylistGlobal.cxx b/src/PlaylistGlobal.cxx
index d9685a2b..92572cde 100644
--- a/src/PlaylistGlobal.cxx
+++ b/src/PlaylistGlobal.cxx
@@ -25,36 +25,28 @@
#include "config.h"
#include "Playlist.hxx"
#include "Main.hxx"
+#include "Partition.hxx"
extern "C" {
#include "event_pipe.h"
}
-struct playlist g_playlist;
-
static void
playlist_tag_event(void)
{
- playlist_tag_changed(&g_playlist);
+ playlist_tag_changed(&global_partition->playlist);
}
static void
playlist_event(void)
{
- playlist_sync(&g_playlist, global_player_control);
+ playlist_sync(&global_partition->playlist,
+ &global_partition->pc);
}
void
-playlist_global_init(unsigned max_length)
+playlist_global_init()
{
- playlist_init(&g_playlist, max_length);
-
event_pipe_register(PIPE_EVENT_TAG, playlist_tag_event);
event_pipe_register(PIPE_EVENT_PLAYLIST, playlist_event);
}
-
-void
-playlist_global_finish(void)
-{
- playlist_finish(&g_playlist);
-}