diff options
author | Max Kellermann <max@duempel.org> | 2013-01-04 22:42:05 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-01-05 02:43:00 +0100 |
commit | d536944beb783ec098aa6215fc94d8e60cfd310d (patch) | |
tree | b86702e5d0142cfe3c8bb22a9a4f8ea2034cb51b /src/PlaylistGlobal.cxx | |
parent | 1a8ef3cdab39234e91fe9d91dad2ae004e4537dc (diff) | |
download | mpd-d536944beb783ec098aa6215fc94d8e60cfd310d.tar.gz mpd-d536944beb783ec098aa6215fc94d8e60cfd310d.tar.xz mpd-d536944beb783ec098aa6215fc94d8e60cfd310d.zip |
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 '')
-rw-r--r-- | src/PlaylistGlobal.cxx | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/src/PlaylistGlobal.cxx b/src/PlaylistGlobal.cxx index d9685a2be..92572cde9 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); -} |