diff options
author | Max Kellermann <max@duempel.org> | 2009-02-15 18:34:14 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-02-15 18:34:14 +0100 |
commit | dec5d48f80428575c7a1b9eeba961b0055156500 (patch) | |
tree | 2b13402d6e5bbf72a0ae658b546454a83538dc93 /src/decoder_plugin.h | |
parent | 900784bb4ebd6613223164e222f19abd3a312a93 (diff) | |
download | mpd-dec5d48f80428575c7a1b9eeba961b0055156500.tar.gz mpd-dec5d48f80428575c7a1b9eeba961b0055156500.tar.xz mpd-dec5d48f80428575c7a1b9eeba961b0055156500.zip |
decoder_plugin: pass struct config_param to init() method
Preparing for per-plugin configuration sections in mpd.conf.
Diffstat (limited to '')
-rw-r--r-- | src/decoder_plugin.h | 10 |
1 files changed, 7 insertions, 3 deletions
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 <stdbool.h> #include <stddef.h> +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; } |