Commit 975370c0 authored by Max Kellermann's avatar Max Kellermann

decoder_api.h, ...: add "extern C"

parent c3c776bc
......@@ -19,10 +19,7 @@
#include "config.h"
#include "ClientInternal.hxx"
extern "C" {
#include "conf.h"
}
#include <assert.h>
......
......@@ -24,9 +24,9 @@
extern "C" {
#include "log.h"
#include "conf.h"
}
#include "conf.h"
#include "decoder_list.h"
#include "decoder_plugin.h"
#include "OutputList.hxx"
......
......@@ -23,11 +23,11 @@
#include "DatabaseRegistry.hxx"
#include "DatabaseSave.hxx"
#include "Directory.hxx"
#include "conf.h"
extern "C" {
#include "db_error.h"
#include "stats.h"
#include "conf.h"
#include "glib_compat.h"
}
......
......@@ -26,10 +26,10 @@
#include "TimePrint.hxx"
#include "Directory.hxx"
#include "Client.hxx"
#include "tag.h"
extern "C" {
#include "song.h"
#include "tag.h"
}
#include "DatabaseGlue.hxx"
......
......@@ -18,13 +18,13 @@
*/
#include "config.h"
#include "decoder_api.h"
extern "C" {
#include "decoder_api.h"
#include "audio_config.h"
#include "replay_gain_config.h"
}
#include "replay_gain_config.h"
#include "MusicChunk.hxx"
#include "MusicBuffer.hxx"
#include "MusicPipe.hxx"
......
......@@ -23,11 +23,7 @@
#include "MusicPipe.hxx"
#include "MusicBuffer.hxx"
#include "MusicChunk.hxx"
extern "C" {
#include "tag.h"
}
#include "input_stream.h"
#include <assert.h>
......
......@@ -26,13 +26,13 @@
#include "song.h"
#include "mpd_error.h"
#include "Mapper.hxx"
#include "decoder_api.h"
#include "tag.h"
#include "input_stream.h"
extern "C" {
#include "decoder_list.h"
#include "decoder_api.h"
#include "replay_gain_ape.h"
#include "input_stream.h"
#include "tag.h"
#include "uri.h"
}
......
......@@ -22,10 +22,10 @@
#include "Main.hxx"
#include "Partition.hxx"
#include "Client.hxx"
#include "conf.h"
extern "C" {
#include "server_socket.h"
#include "conf.h"
}
#include <string.h>
......
......@@ -36,23 +36,23 @@
#include "Partition.hxx"
#include "Volume.hxx"
#include "OutputAll.hxx"
#include "tag.h"
#include "conf.h"
#include "replay_gain_config.h"
extern "C" {
#include "daemon.h"
#include "io_thread.h"
#include "idle.h"
#include "conf.h"
#include "path.h"
#include "stats.h"
#include "sig_handlers.h"
#include "audio_config.h"
#include "log.h"
#include "pcm_resample.h"
#include "replay_gain_config.h"
#include "decoder_list.h"
#include "input_init.h"
#include "playlist_list.h"
#include "tag.h"
#include "zeroconf.h"
#include "event_pipe.h"
}
......
......@@ -20,10 +20,7 @@
#include "config.h"
#include "MusicChunk.hxx"
#include "audio_format.h"
extern "C" {
#include "tag.h"
}
#include <assert.h>
......
......@@ -31,9 +31,9 @@ extern "C" {
#include "MusicPipe.hxx"
#include "MusicChunk.hxx"
#include "mpd_error.h"
#include "conf.h"
extern "C" {
#include "conf.h"
#include "notify.h"
}
......
......@@ -20,10 +20,7 @@
#include "config.h"
#include "Permission.hxx"
#include "mpd_error.h"
extern "C" {
#include "conf.h"
}
#include <map>
#include <string>
......
......@@ -31,9 +31,9 @@
extern "C" {
#include "audio_format.h"
#include "replay_gain_config.h"
}
#include "replay_gain_config.h"
#include "PlayerControl.hxx"
#include <errno.h>
......
......@@ -30,10 +30,10 @@
#include "CrossFade.hxx"
#include "PlayerControl.hxx"
#include "OutputAll.hxx"
#include "tag.h"
extern "C" {
#include "event_pipe.h"
#include "tag.h"
#include "idle.h"
}
......
......@@ -20,11 +20,11 @@
#include "config.h"
#include "PlaylistAny.hxx"
#include "PlaylistMapper.hxx"
#include "input_stream.h"
extern "C" {
#include "playlist_list.h"
#include "uri.h"
#include "input_stream.h"
}
#include <assert.h>
......
......@@ -28,12 +28,12 @@
#include "io_error.h"
#include "Mapper.hxx"
#include "TextFile.hxx"
#include "conf.h"
extern "C" {
#include "path.h"
#include "uri.h"
#include "idle.h"
#include "conf.h"
}
#include "glib_compat.h"
......
......@@ -28,12 +28,12 @@
#include "DatabaseGlue.hxx"
#include "DatabasePlugin.hxx"
#include "Client.hxx"
#include "input_stream.h"
extern "C" {
#include "playlist_list.h"
#include "playlist_plugin.h"
#include "song.h"
#include "input_stream.h"
}
void
......
......@@ -23,10 +23,10 @@
#include "PlaylistAny.hxx"
#include "PlaylistSong.hxx"
#include "Playlist.hxx"
#include "input_stream.h"
extern "C" {
#include "song.h"
#include "input_stream.h"
}
enum playlist_result
......
......@@ -23,12 +23,12 @@
#include "DatabasePlugin.hxx"
#include "DatabaseGlue.hxx"
#include "ls.hxx"
#include "tag.h"
extern "C" {
#include "song.h"
#include "uri.h"
#include "path.h"
#include "tag.h"
}
#include <assert.h>
......
......@@ -28,10 +28,7 @@
#include "QueueSave.hxx"
#include "TextFile.hxx"
#include "PlayerControl.hxx"
extern "C" {
#include "conf.h"
}
#include <string.h>
#include <stdlib.h>
......
......@@ -18,13 +18,13 @@
*/
#include "config.h"
#include "replay_gain_config.h"
extern "C" {
#include "replay_gain_config.h"
#include "conf.h"
#include "idle.h"
}
#include "conf.h"
#include "Playlist.hxx"
#include "mpd_error.h"
......
......@@ -18,10 +18,7 @@
*/
#include "config.h"
extern "C" {
#include "replay_gain_info.h"
}
float
replay_gain_tuple_scale(const struct replay_gain_tuple *tuple, float preamp, float missing_preamp, bool peak_limit)
......
......@@ -20,10 +20,7 @@
#include "config.h"
#include "song.h"
#include "Directory.hxx"
extern "C" {
#include "tag.h"
}
#include <glib.h>
......
......@@ -21,10 +21,7 @@
#include "SongFilter.hxx"
#include "path.h"
#include "song.h"
extern "C" {
#include "tag.h"
}
#include <glib.h>
......
......@@ -23,9 +23,9 @@
#include "TagSave.hxx"
#include "Directory.hxx"
#include "TextFile.hxx"
#include "tag.h"
extern "C" {
#include "tag.h"
#include "string_util.h"
}
......
......@@ -26,15 +26,15 @@ extern "C" {
#include "Directory.hxx"
#include "Mapper.hxx"
#include "tag.h"
#include "input_stream.h"
extern "C" {
#include "decoder_list.h"
#include "decoder_plugin.h"
#include "tag_ape.h"
#include "tag_id3.h"
#include "tag.h"
#include "tag_handler.h"
#include "input_stream.h"
}
#include <glib.h>
......
......@@ -28,7 +28,6 @@
#include "Mapper.hxx"
extern "C" {
#include "tag.h"
#include "tag_handler.h"
}
......
......@@ -30,12 +30,12 @@
#include "PlaylistVector.hxx"
#include "Mapper.hxx"
#include "ExcludeList.hxx"
#include "conf.h"
extern "C" {
#include "uri.h"
#include "path.h"
#include "playlist_list.h"
#include "conf.h"
}
#include <glib.h>
......
......@@ -220,6 +220,10 @@ static inline bool audio_format_equals(const struct audio_format *a,
a->channels == b->channels;
}
#ifdef __cplusplus
extern "C" {
#endif
void
audio_format_mask_apply(struct audio_format *af,
const struct audio_format *mask);
......@@ -305,4 +309,8 @@ const char *
audio_format_to_string(const struct audio_format *af,
struct audio_format_string *s);
#ifdef __cplusplus
}
#endif
#endif
......@@ -118,6 +118,8 @@ config_quark(void)
return g_quark_from_static_string("config");
}
G_BEGIN_DECLS
void config_global_init(void);
void config_global_finish(void);
......@@ -224,4 +226,6 @@ void
config_add_block_param(struct config_param * param, const char *name,
const char *value, int line);
G_END_DECLS
#endif
......@@ -24,12 +24,11 @@
#include "PlaylistVector.hxx"
#include "Directory.hxx"
#include "gcc.h"
#include "conf.h"
extern "C" {
#include "db_error.h"
#include "conf.h"
#include "song.h"
#include "tag.h"
}
#undef MPD_DIRECTORY_H
......
......@@ -27,10 +27,7 @@
#include "DatabaseLock.hxx"
#include "db_error.h"
#include "TextFile.hxx"
extern "C" {
#include "conf.h"
}
#include <sys/types.h>
#include <sys/stat.h>
......
......@@ -20,9 +20,9 @@
#include "config.h"
#include "AdPlugDecoderPlugin.h"
#include "tag_handler.h"
#include "decoder_api.h"
extern "C" {
#include "decoder_api.h"
#include "audio_check.h"
}
......
......@@ -25,9 +25,9 @@
#define MPD_FLAC_COMMON_HXX
#include "FLACInput.hxx"
#include "decoder_api.h"
extern "C" {
#include "decoder_api.h"
#include "pcm_buffer.h"
}
......
......@@ -21,10 +21,7 @@
#define MPD_FLAC_IO_HANDLE_HXX
#include "gcc.h"
extern "C" {
#include "input_stream.h"
}
#include <FLAC/callback.h>
......
......@@ -19,12 +19,9 @@
#include "config.h"
#include "FLACInput.hxx"
#include "decoder_api.h"
#include "gcc.h"
extern "C" {
#include "input_stream.h"
#include "decoder_api.h"
}
FLAC__StreamDecoderReadStatus
FLACInput::Read(FLAC__byte buffer[], size_t *bytes)
......
......@@ -22,12 +22,12 @@
extern "C" {
#include "XiphTags.h"
#include "replay_gain_info.h"
#include "tag.h"
}
#include "tag.h"
#include "tag_handler.h"
#include "tag_table.h"
#include "replay_gain_info.h"
#include <glib.h>
......
......@@ -19,10 +19,7 @@
#include "config.h"
#include "OggUtil.hxx"
extern "C" {
#include "decoder_api.h"
}
bool
OggFeed(ogg_sync_state &oy, struct decoder *decoder,
......
......@@ -22,10 +22,10 @@
#include "OpusHead.hxx"
#include "OpusTags.hxx"
#include "OggUtil.hxx"
#include "decoder_api.h"
extern "C" {
#include "ogg_codec.h"
#include "decoder_api.h"
}
#include "audio_check.h"
......
......@@ -18,9 +18,9 @@
*/
#include "config.h"
#include "../decoder_api.h"
extern "C" {
#include "../decoder_api.h"
#include "tag_handler.h"
}
......
......@@ -38,6 +38,10 @@
#include <stdbool.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* Notify the player thread that it has finished initialization and
* that it has read the song's meta data.
......@@ -168,4 +172,8 @@ void
decoder_mixramp(struct decoder *decoder,
char *mixramp_start, char *mixramp_end);
#ifdef __cplusplus
}
#endif
#endif
......@@ -88,6 +88,10 @@ struct input_stream {
char *mime;
};
#ifdef __cplusplus
extern "C" {
#endif
/**
* Opens a new input stream. You may not access it until the "ready"
* flag is set.
......@@ -264,4 +268,8 @@ size_t
input_stream_lock_read(struct input_stream *is, void *ptr, size_t size,
GError **error_r);
#ifdef __cplusplus
}
#endif
#endif
......@@ -30,6 +30,10 @@ extern float replay_gain_preamp;
extern float replay_gain_missing_preamp;
extern bool replay_gain_limit;
#ifdef __cplusplus
extern "C" {
#endif
void replay_gain_global_init(void);
/**
......@@ -52,4 +56,8 @@ replay_gain_set_mode_string(const char *p);
enum replay_gain_mode
replay_gain_get_real_mode(bool random_mode);
#ifdef __cplusplus
}
#endif
#endif
......@@ -61,6 +61,10 @@ replay_gain_tuple_defined(const struct replay_gain_tuple *tuple)
return !isinf(tuple->gain);
}
#ifdef __cplusplus
extern "C" {
#endif
float
replay_gain_tuple_scale(const struct replay_gain_tuple *tuple, float preamp, float missing_preamp, bool peak_limit);
......@@ -71,4 +75,8 @@ replay_gain_tuple_scale(const struct replay_gain_tuple *tuple, float preamp, flo
void
replay_gain_info_complete(struct replay_gain_info *info);
#ifdef __cplusplus
}
#endif
#endif
......@@ -101,6 +101,10 @@ struct tag {
unsigned num_items;
};
#ifdef __cplusplus
extern "C" {
#endif
/**
* Parse the string, and convert it into a #tag_type. Returns
* #TAG_NUM_OF_ITEM_TYPES if the string could not be recognized.
......@@ -236,4 +240,8 @@ bool tag_has_type(const struct tag *tag, enum tag_type type);
*/
bool tag_equal(const struct tag *tag1, const struct tag *tag2);
#ifdef __cplusplus
}
#endif
#endif
......@@ -24,11 +24,8 @@
#include "Directory.hxx"
#include "song.h"
#include "PlaylistVector.hxx"
extern "C" {
#include "conf.h"
#include "tag.h"
}
#include <iostream>
using std::cout;
......
......@@ -21,13 +21,13 @@
#include "TagSave.hxx"
#include "song.h"
#include "Directory.hxx"
#include "input_stream.h"
#include "conf.h"
#include "decoder_api.h"
extern "C" {
#include "io_thread.h"
#include "input_init.h"
#include "input_stream.h"
#include "conf.h"
#include "decoder_api.h"
#include "decoder_list.h"
#include "playlist_list.h"
#include "playlist_plugin.h"
......
......@@ -20,13 +20,13 @@
#include "config.h"
#include "TagSave.hxx"
#include "stdbin.h"
#include "tag.h"
#include "conf.h"
#include "input_stream.h"
extern "C" {
#include "io_thread.h"
#include "input_init.h"
#include "input_stream.h"
#include "tag.h"
#include "conf.h"
#ifdef ENABLE_ARCHIVE
#include "archive_list.h"
......
......@@ -19,12 +19,12 @@
#include "config.h"
#include "OutputControl.hxx"
#include "conf.h"
extern "C" {
#include "output_plugin.h"
#include "output_internal.h"
#include "io_thread.h"
#include "conf.h"
#include "audio_parser.h"
#include "filter_registry.h"
#include "pcm_convert.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment