From dec5d48f80428575c7a1b9eeba961b0055156500 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 15 Feb 2009 18:34:14 +0100 Subject: decoder_plugin: pass struct config_param to init() method Preparing for per-plugin configuration sections in mpd.conf. --- src/decoder_plugin.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/decoder_plugin.h') diff --git a/src/decoder_plugin.h b/src/decoder_plugin.h index 7034103ba..35a76bb38 100644 --- a/src/decoder_plugin.h +++ b/src/decoder_plugin.h @@ -22,6 +22,7 @@ #include #include +struct config_param; struct input_stream; struct tag; @@ -39,7 +40,7 @@ struct decoder_plugin { * have/need one this must return < 0 if there is an error and * >= 0 otherwise */ - bool (*init)(void); + bool (*init)(const struct config_param *param); /** * optional, set this to NULL if the InputPlugin doesn't have/need one @@ -81,14 +82,17 @@ struct decoder_plugin { /** * Initialize a decoder plugin. * + * @param param a configuration block for this plugin, or NULL if none + * is configured * @return true if the plugin was initialized successfully, false if * the plugin is not available */ static inline bool -decoder_plugin_init(const struct decoder_plugin *plugin) +decoder_plugin_init(const struct decoder_plugin *plugin, + const struct config_param *param) { return plugin->init != NULL - ? plugin->init() + ? plugin->init(param) : true; } -- cgit v1.2.3