move printAllOutputPluginTypes to output_list.c

This commit is contained in:
Viliam Mateicka 2009-03-18 19:11:48 +01:00 committed by Max Kellermann
parent 3d202e4609
commit 71cd24954a
6 changed files with 18 additions and 65 deletions

View File

@ -28,7 +28,6 @@ mpd_headers = \
src/audio.h \
src/audio_format.h \
src/audio_parser.h \
src/audioOutput.h \
src/output_internal.h \
src/output_api.h \
src/output_plugin.h \
@ -164,7 +163,6 @@ src_mpd_SOURCES = \
src/notify.c \
src/audio.c \
src/audio_parser.c \
src/audioOutput.c \
src/buffer2array.c \
src/command.c \
src/idle.c \

View File

@ -1,34 +0,0 @@
/*
* 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.
*/
#include "audioOutput.h"
#include "output_api.h"
#include "output_list.h"
void printAllOutputPluginTypes(FILE * fp)
{
unsigned i;
const struct audio_output_plugin *plugin;
audio_output_plugins_for_each(plugin, i)
fprintf(fp, "%s ", plugin->name);
fprintf(fp, "\n");
fflush(fp);
}

View File

@ -1,27 +0,0 @@
/*
* 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.
*/
#ifndef MPD_AUDIO_OUTPUT_H
#define MPD_AUDIO_OUTPUT_H
#include <stdio.h>
void printAllOutputPluginTypes(FILE * fp);
#endif

View File

@ -23,7 +23,7 @@
#include "conf.h"
#include "decoder_list.h"
#include "config.h"
#include "audioOutput.h"
#include "output_list.h"
#include "ls.h"
#ifdef ENABLE_ARCHIVE
@ -56,7 +56,7 @@ static void version(void)
puts("\n"
"Supported outputs:\n");
printAllOutputPluginTypes(stdout);
audio_output_plugin_print_all_types(stdout);
#ifdef ENABLE_ARCHIVE
puts("\n"

View File

@ -88,3 +88,15 @@ audio_output_plugin_get(const char *name)
return NULL;
}
void audio_output_plugin_print_all_types(FILE * fp)
{
unsigned i;
const struct audio_output_plugin *plugin;
audio_output_plugins_for_each(plugin, i)
fprintf(fp, "%s ", plugin->name);
fprintf(fp, "\n");
fflush(fp);
}

View File

@ -20,11 +20,15 @@
#ifndef MPD_OUTPUT_LIST_H
#define MPD_OUTPUT_LIST_H
#include <stdio.h>
extern const struct audio_output_plugin *audio_output_plugins[];
const struct audio_output_plugin *
audio_output_plugin_get(const char *name);
void audio_output_plugin_print_all_types(FILE * fp);
#define audio_output_plugins_for_each(plugin, i) \
for (i = 0; (plugin = audio_output_plugins[i]) != NULL; ++i)