mixer_api: moved mixer_plugin imports to mixer_list.h

This patch allows the output plugins to import only mixer_list.h,
instead of the full mixer_api.h (which would expose internal
structures).
This commit is contained in:
Max Kellermann 2009-03-14 11:36:59 +01:00
parent a5017a2d7c
commit b488355df8
6 changed files with 37 additions and 11 deletions

View File

@ -82,6 +82,7 @@ mpd_headers = \
src/mixer_all.h \
src/mixer_api.h \
src/mixer_control.h \
src/mixer_list.h \
src/event_pipe.h \
src/mixer_plugin.h \
src/daemon.h \

View File

@ -21,14 +21,7 @@
#define MPD_MIXER_H
#include "mixer_plugin.h"
/*
* list of currently implemented mixers
*/
extern const struct mixer_plugin alsa_mixer;
extern const struct mixer_plugin oss_mixer;
extern const struct mixer_plugin pulse_mixer;
#include "mixer_list.h"
struct mixer {
const struct mixer_plugin *plugin;

32
src/mixer_list.h Normal file
View File

@ -0,0 +1,32 @@
/*
* Copyright (C) 2003-2009 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.
*/
/** \file
*
* This header provides "extern" declarations for all mixer plugins.
*/
#ifndef MPD_MIXER_LIST_H
#define MPD_MIXER_LIST_H
extern const struct mixer_plugin alsa_mixer;
extern const struct mixer_plugin oss_mixer;
extern const struct mixer_plugin pulse_mixer;
#endif

View File

@ -18,7 +18,7 @@
*/
#include "../output_api.h"
#include "../mixer_api.h"
#include "mixer_list.h"
#include "mixer_control.h"
#include <glib.h>

View File

@ -18,7 +18,7 @@
*/
#include "../output_api.h"
#include "../mixer_api.h"
#include "mixer_list.h"
#include "mixer_control.h"
#include <glib.h>

View File

@ -18,7 +18,7 @@
*/
#include "../output_api.h"
#include "../mixer_api.h"
#include "mixer_list.h"
#include "mixer_control.h"
#include <glib.h>