aboutsummaryrefslogtreecommitdiffstats
path: root/src/mixer/Listener.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-02-05 23:20:33 +0100
committerMax Kellermann <max@duempel.org>2014-02-19 21:40:14 +0100
commit8d6fedf8177d0d2ced81e6d93d35c368b2ac69db (patch)
tree17890432eb5d7f6cbdf5feb32a0105dc6f9d8974 /src/mixer/Listener.hxx
parentf4f8fa7c947af10235d1cdd70b294a3b8810c6f4 (diff)
downloadmpd-8d6fedf8177d0d2ced81e6d93d35c368b2ac69db.tar.gz
mpd-8d6fedf8177d0d2ced81e6d93d35c368b2ac69db.tar.xz
mpd-8d6fedf8177d0d2ced81e6d93d35c368b2ac69db.zip
Mixer: add class MixerListener
Use a listener interface instead of GlobalEvents.
Diffstat (limited to 'src/mixer/Listener.hxx')
-rw-r--r--src/mixer/Listener.hxx34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/mixer/Listener.hxx b/src/mixer/Listener.hxx
new file mode 100644
index 000000000..6f48fbd4d
--- /dev/null
+++ b/src/mixer/Listener.hxx
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2003-2014 The Music Player Daemon Project
+ * http://www.musicpd.org
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifndef MPD_MIXER_LISTENER_HXX
+#define MPD_MIXER_LISTENER_HXX
+
+class Mixer;
+
+/**
+ * An interface that listens on events from mixer plugins. The
+ * methods must be thread-safe and non-blocking.
+ */
+class MixerListener {
+public:
+ virtual void OnMixerVolumeChanged(Mixer &mixer, int volume) = 0;
+};
+
+#endif