filter/FilterInternal: split class Filter, add class PreparedFilter

For easier state management inside filter plugins.
This commit is contained in:
Max Kellermann
2016-06-22 11:15:49 +02:00
parent 5c75096bcd
commit 3a21241248
26 changed files with 615 additions and 388 deletions

View File

@@ -27,7 +27,7 @@
#define MPD_FILTER_PLUGIN_HXX
struct ConfigBlock;
class Filter;
class PreparedFilter;
class Error;
struct filter_plugin {
@@ -36,7 +36,7 @@ struct filter_plugin {
/**
* Allocates and configures a filter.
*/
Filter *(*init)(const ConfigBlock &block, Error &error);
PreparedFilter *(*init)(const ConfigBlock &block, Error &error);
};
/**
@@ -48,7 +48,7 @@ struct filter_plugin {
* ignore errors.
* @return a new filter object, or nullptr on error
*/
Filter *
PreparedFilter *
filter_new(const struct filter_plugin *plugin,
const ConfigBlock &block, Error &error);
@@ -61,7 +61,7 @@ filter_new(const struct filter_plugin *plugin,
* ignore errors.
* @return a new filter object, or nullptr on error
*/
Filter *
PreparedFilter *
filter_configured_new(const ConfigBlock &block, Error &error);
#endif