input_{internal,plugin}: convert to C++

This commit is contained in:
Max Kellermann 2013-01-25 22:43:01 +01:00
parent 94fffb332b
commit 49567f1f3e
19 changed files with 36 additions and 45 deletions

View File

@ -79,7 +79,6 @@ mpd_headers = \
src/gcc.h \ src/gcc.h \
src/decoder_list.h \ src/decoder_list.h \
src/decoder/pcm_decoder_plugin.h \ src/decoder/pcm_decoder_plugin.h \
src/input_plugin.h \
src/input_stream.h \ src/input_stream.h \
src/text_input_stream.h \ src/text_input_stream.h \
src/icy_server.h \ src/icy_server.h \
@ -710,7 +709,8 @@ libinput_a_SOURCES = \
src/InputInit.cxx src/InputInit.hxx \ src/InputInit.cxx src/InputInit.hxx \
src/InputRegistry.cxx src/InputRegistry.hxx \ src/InputRegistry.cxx src/InputRegistry.hxx \
src/InputStream.cxx \ src/InputStream.cxx \
src/input_internal.c src/input_internal.h \ src/InputPlugin.hxx \
src/InputInternal.cxx src/InputInternal.hxx \
src/input/RewindInputPlugin.cxx src/input/RewindInputPlugin.hxx \ src/input/RewindInputPlugin.cxx src/input/RewindInputPlugin.hxx \
src/input/FileInputPlugin.cxx src/input/FileInputPlugin.hxx src/input/FileInputPlugin.cxx src/input/FileInputPlugin.hxx

View File

@ -27,7 +27,7 @@
#include "OutputList.hxx" #include "OutputList.hxx"
#include "output_plugin.h" #include "output_plugin.h"
#include "InputRegistry.hxx" #include "InputRegistry.hxx"
#include "input_plugin.h" #include "InputPlugin.hxx"
#include "playlist_list.h" #include "playlist_list.h"
#include "playlist_plugin.h" #include "playlist_plugin.h"
#include "mpd_error.h" #include "mpd_error.h"

View File

@ -20,7 +20,7 @@
#include "config.h" #include "config.h"
#include "InputInit.hxx" #include "InputInit.hxx"
#include "InputRegistry.hxx" #include "InputRegistry.hxx"
#include "input_plugin.h" #include "InputPlugin.hxx"
#include "conf.h" #include "conf.h"
#include <assert.h> #include <assert.h>

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2003-2011 The Music Player Daemon Project * Copyright (C) 2003-2013 The Music Player Daemon Project
* http://www.musicpd.org * http://www.musicpd.org
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
@ -18,7 +18,7 @@
*/ */
#include "config.h" #include "config.h"
#include "input_internal.h" #include "InputInternal.hxx"
#include "input_stream.h" #include "input_stream.h"
#include <assert.h> #include <assert.h>

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2003-2011 The Music Player Daemon Project * Copyright (C) 2003-2013 The Music Player Daemon Project
* http://www.musicpd.org * http://www.musicpd.org
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
@ -17,8 +17,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/ */
#ifndef MPD_INPUT_INTERNAL_H #ifndef MPD_INPUT_INTERNAL_HXX
#define MPD_INPUT_INTERNAL_H #define MPD_INPUT_INTERNAL_HXX
#include "check.h" #include "check.h"
@ -27,10 +27,6 @@
struct input_stream; struct input_stream;
struct input_plugin; struct input_plugin;
#ifdef __cplusplus
extern "C" {
#endif
void void
input_stream_init(struct input_stream *is, const struct input_plugin *plugin, input_stream_init(struct input_stream *is, const struct input_plugin *plugin,
const char *uri, GMutex *mutex, GCond *cond); const char *uri, GMutex *mutex, GCond *cond);
@ -44,8 +40,4 @@ input_stream_signal_client(struct input_stream *is);
void void
input_stream_set_ready(struct input_stream *is); input_stream_set_ready(struct input_stream *is);
#ifdef __cplusplus
}
#endif
#endif #endif

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2003-2011 The Music Player Daemon Project * Copyright (C) 2003-2013 The Music Player Daemon Project
* http://www.musicpd.org * http://www.musicpd.org
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
@ -17,13 +17,12 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/ */
#ifndef MPD_INPUT_PLUGIN_H #ifndef MPD_INPUT_PLUGIN_HXX
#define MPD_INPUT_PLUGIN_H #define MPD_INPUT_PLUGIN_HXX
#include "input_stream.h" #include "input_stream.h"
#include <stddef.h> #include <stddef.h>
#include <stdbool.h>
#include <sys/types.h> #include <sys/types.h>
struct config_param; struct config_param;

View File

@ -20,7 +20,7 @@
#include "config.h" #include "config.h"
#include "input_stream.h" #include "input_stream.h"
#include "InputRegistry.hxx" #include "InputRegistry.hxx"
#include "input_plugin.h" #include "InputPlugin.hxx"
#include "input/RewindInputPlugin.hxx" #include "input/RewindInputPlugin.hxx"
extern "C" { extern "C" {

View File

@ -25,8 +25,8 @@
#include "Bzip2ArchivePlugin.hxx" #include "Bzip2ArchivePlugin.hxx"
#include "ArchiveInternal.hxx" #include "ArchiveInternal.hxx"
#include "ArchivePlugin.hxx" #include "ArchivePlugin.hxx"
#include "input_internal.h" #include "InputInternal.hxx"
#include "input_plugin.h" #include "InputPlugin.hxx"
#include "refcount.h" #include "refcount.h"
#include <stdint.h> #include <stdint.h>

View File

@ -25,8 +25,8 @@
#include "Iso9660ArchivePlugin.hxx" #include "Iso9660ArchivePlugin.hxx"
#include "ArchiveInternal.hxx" #include "ArchiveInternal.hxx"
#include "ArchivePlugin.hxx" #include "ArchivePlugin.hxx"
#include "input_internal.h" #include "InputInternal.hxx"
#include "input_plugin.h" #include "InputPlugin.hxx"
#include "refcount.h" #include "refcount.h"
#include <cdio/cdio.h> #include <cdio/cdio.h>

View File

@ -25,8 +25,8 @@
#include "ZzipArchivePlugin.hxx" #include "ZzipArchivePlugin.hxx"
#include "ArchiveInternal.hxx" #include "ArchiveInternal.hxx"
#include "ArchivePlugin.hxx" #include "ArchivePlugin.hxx"
#include "input_internal.h" #include "InputInternal.hxx"
#include "input_plugin.h" #include "InputPlugin.hxx"
#include "refcount.h" #include "refcount.h"
#include <zzip/zzip.h> #include <zzip/zzip.h>

View File

@ -22,7 +22,7 @@
#include "ArchiveLookup.hxx" #include "ArchiveLookup.hxx"
#include "ArchiveList.hxx" #include "ArchiveList.hxx"
#include "ArchivePlugin.hxx" #include "ArchivePlugin.hxx"
#include "input_plugin.h" #include "InputPlugin.hxx"
#include <glib.h> #include <glib.h>

View File

@ -23,8 +23,8 @@
#include "config.h" #include "config.h"
#include "CdioParanoiaInputPlugin.hxx" #include "CdioParanoiaInputPlugin.hxx"
#include "input_internal.h" #include "InputInternal.hxx"
#include "input_plugin.h" #include "InputPlugin.hxx"
#include "refcount.h" #include "refcount.h"
#include <stdio.h> #include <stdio.h>

View File

@ -19,12 +19,12 @@
#include "config.h" #include "config.h"
#include "CurlInputPlugin.hxx" #include "CurlInputPlugin.hxx"
#include "input_plugin.h" #include "InputPlugin.hxx"
#include "conf.h" #include "conf.h"
#include "tag.h" #include "tag.h"
#include "IcyMetaDataParser.hxx" #include "IcyMetaDataParser.hxx"
#include "event/MultiSocketMonitor.hxx" #include "event/MultiSocketMonitor.hxx"
#include "input_internal.h" #include "InputInternal.hxx"
#include "event/Loop.hxx" #include "event/Loop.hxx"
#include "IOThread.hxx" #include "IOThread.hxx"
#include "glib_compat.h" #include "glib_compat.h"

View File

@ -20,8 +20,8 @@
#include "config.h" #include "config.h"
#include "DespotifyInputPlugin.hxx" #include "DespotifyInputPlugin.hxx"
#include "DespotifyUtils.hxx" #include "DespotifyUtils.hxx"
#include "input_internal.h" #include "InputInternal.hxx"
#include "input_plugin.h" #include "InputPlugin.hxx"
#include "tag.h" #include "tag.h"
extern "C" { extern "C" {

View File

@ -22,8 +22,8 @@
#include "config.h" #include "config.h"
#include "FfmpegInputPlugin.hxx" #include "FfmpegInputPlugin.hxx"
#include "input_internal.h" #include "InputInternal.hxx"
#include "input_plugin.h" #include "InputPlugin.hxx"
extern "C" { extern "C" {
#include <libavutil/avutil.h> #include <libavutil/avutil.h>

View File

@ -19,8 +19,8 @@
#include "config.h" /* must be first for large file support */ #include "config.h" /* must be first for large file support */
#include "FileInputPlugin.hxx" #include "FileInputPlugin.hxx"
#include "input_internal.h" #include "InputInternal.hxx"
#include "input_plugin.h" #include "InputPlugin.hxx"
#include "fd_util.h" #include "fd_util.h"
#include "open.h" #include "open.h"
#include "io_error.h" #include "io_error.h"

View File

@ -19,8 +19,8 @@
#include "config.h" #include "config.h"
#include "MmsInputPlugin.hxx" #include "MmsInputPlugin.hxx"
#include "input_internal.h" #include "InputInternal.hxx"
#include "input_plugin.h" #include "InputPlugin.hxx"
#include <glib.h> #include <glib.h>
#include <libmms/mmsx.h> #include <libmms/mmsx.h>

View File

@ -19,8 +19,8 @@
#include "config.h" #include "config.h"
#include "RewindInputPlugin.hxx" #include "RewindInputPlugin.hxx"
#include "input_internal.h" #include "InputInternal.hxx"
#include "input_plugin.h" #include "InputPlugin.hxx"
#include "tag.h" #include "tag.h"
#include <glib.h> #include <glib.h>

View File

@ -19,8 +19,8 @@
#include "config.h" #include "config.h"
#include "SoupInputPlugin.hxx" #include "SoupInputPlugin.hxx"
#include "input_plugin.h" #include "InputPlugin.hxx"
#include "input_internal.h" #include "InputInternal.hxx"
#include "IOThread.hxx" #include "IOThread.hxx"
#include "event/Loop.hxx" #include "event/Loop.hxx"
#include "conf.h" #include "conf.h"