From 30a82076ba50a21c4df5fe4c46c8fc2ed25a7486 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 21 Feb 2014 08:55:52 +0100 Subject: PlayerListener: new interface to replace GlobalEvents access --- src/Partition.hxx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/Partition.hxx') diff --git a/src/Partition.hxx b/src/Partition.hxx index cbdce2e86..991234a50 100644 --- a/src/Partition.hxx +++ b/src/Partition.hxx @@ -24,6 +24,7 @@ #include "output/MultipleOutputs.hxx" #include "mixer/Listener.hxx" #include "PlayerControl.hxx" +#include "PlayerListener.hxx" struct Instance; class MultipleOutputs; @@ -33,7 +34,7 @@ class SongLoader; * A partition of the Music Player Daemon. It is a separate unit with * a playlist, a player, outputs etc. */ -struct Partition final : private MixerListener { +struct Partition final : private PlayerListener, private MixerListener { Instance &instance; struct playlist playlist; @@ -48,7 +49,7 @@ struct Partition final : private MixerListener { unsigned buffered_before_play) :instance(_instance), playlist(max_length), outputs(*this), - pc(outputs, buffer_chunks, buffered_before_play) {} + pc(*this, outputs, buffer_chunks, buffered_before_play) {} void ClearQueue() { playlist.Clear(pc); @@ -192,6 +193,10 @@ struct Partition final : private MixerListener { void SyncWithPlayer(); private: + /* virtual methods from class PlayerListener */ + virtual void OnPlayerSync() override; + virtual void OnPlayerTagModified() override; + /* virtual methods from class MixerListener */ virtual void OnMixerVolumeChanged(Mixer &mixer, int volume) override; }; -- cgit v1.2.3