diff options
Diffstat (limited to '')
-rw-r--r-- | src/DecoderList.hxx | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/src/DecoderList.hxx b/src/DecoderList.hxx index fd4b22c63..47085d4ae 100644 --- a/src/DecoderList.hxx +++ b/src/DecoderList.hxx @@ -1,5 +1,5 @@ /* - * Copyright (C) 2003-2013 The Music Player Daemon Project + * 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 @@ -20,6 +20,8 @@ #ifndef MPD_DECODER_LIST_HXX #define MPD_DECODER_LIST_HXX +#include "Compiler.h" + struct DecoderPlugin; extern const struct DecoderPlugin *const decoder_plugins[]; @@ -27,20 +29,7 @@ extern bool decoder_plugins_enabled[]; /* interface for using plugins */ -/** - * Find the next enabled decoder plugin which supports the specified suffix. - * - * @param suffix the file name suffix - * @param plugin the previous plugin, or nullptr to find the first plugin - * @return a plugin, or nullptr if none matches - */ -const struct DecoderPlugin * -decoder_plugin_from_suffix(const char *suffix, - const struct DecoderPlugin *plugin); - -const struct DecoderPlugin * -decoder_plugin_from_mime_type(const char *mimeType, unsigned int next); - +gcc_pure const struct DecoderPlugin * decoder_plugin_from_name(const char *name); @@ -89,4 +78,12 @@ decoder_plugins_for_each_enabled(F f) f(*decoder_plugins[i]); } +/** + * Is there at least once #DecoderPlugin that supports the specified + * file name suffix? + */ +gcc_pure gcc_nonnull_all +bool +decoder_plugins_supports_suffix(const char *suffix); + #endif |