diff options
author | Max Kellermann <max@duempel.org> | 2009-03-02 20:45:50 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-03-02 20:45:50 +0100 |
commit | 9a350acf0497acd19e05b77e6aa985552c13a94a (patch) | |
tree | 985bfbbc95a518a7b94351d2f1262be2daa08a62 /src/input_plugin.h | |
parent | 36d24fb7eae3a7a761cb1659d10464f65ecdddf9 (diff) | |
download | mpd-9a350acf0497acd19e05b77e6aa985552c13a94a.tar.gz mpd-9a350acf0497acd19e05b77e6aa985552c13a94a.tar.xz mpd-9a350acf0497acd19e05b77e6aa985552c13a94a.zip |
input_plugin: added methods init(), finish()
Instead of hard-coding the plugin global initialization in
input_stream_global_init(), make it walk the plugin list and
initialize all plugins.
Diffstat (limited to 'src/input_plugin.h')
-rw-r--r-- | src/input_plugin.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/input_plugin.h b/src/input_plugin.h index 8f846373a..905596355 100644 --- a/src/input_plugin.h +++ b/src/input_plugin.h @@ -28,6 +28,20 @@ struct input_stream; struct input_plugin { + /** + * Global initialization. This method is called when MPD starts. + * + * @return true on success, false if the plugin should be + * disabled + */ + bool (*init)(void); + + /** + * Global deinitialization. Called once before MPD shuts + * down (only if init() has returned true). + */ + void (*finish)(void); + bool (*open)(struct input_stream *is, const char *url); void (*close)(struct input_stream *is); |