diff options
author | Max Kellermann <max@musicpd.org> | 2018-01-02 23:06:53 +0100 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2018-01-02 23:06:53 +0100 |
commit | bbabb7a14c8e2abce220d0bfed899639b72174b4 (patch) | |
tree | 3d6e8e69ac2a4406bd06c499f9dfd12d16702321 /src/filter | |
parent | b13ebe3ddb123136a82eefbdc6b0234af8cca337 (diff) |
filter/Plugin: move filter_configured_new() to LoadOne.cxx
Diffstat (limited to 'src/filter')
-rw-r--r-- | src/filter/FilterConfig.cxx | 2 | ||||
-rw-r--r-- | src/filter/FilterPlugin.hxx | 11 | ||||
-rw-r--r-- | src/filter/LoadOne.cxx (renamed from src/filter/FilterPlugin.cxx) | 4 | ||||
-rw-r--r-- | src/filter/LoadOne.hxx | 39 |
4 files changed, 41 insertions, 15 deletions
diff --git a/src/filter/FilterConfig.cxx b/src/filter/FilterConfig.cxx index a328f6296..e15d59c27 100644 --- a/src/filter/FilterConfig.cxx +++ b/src/filter/FilterConfig.cxx @@ -19,7 +19,7 @@ #include "config.h" #include "FilterConfig.hxx" -#include "FilterPlugin.hxx" +#include "LoadOne.hxx" #include "Prepared.hxx" #include "plugins/ChainFilterPlugin.hxx" #include "config/Param.hxx" diff --git a/src/filter/FilterPlugin.hxx b/src/filter/FilterPlugin.hxx index 5804ef0c1..d6d8e627a 100644 --- a/src/filter/FilterPlugin.hxx +++ b/src/filter/FilterPlugin.hxx @@ -40,15 +40,4 @@ struct FilterPlugin { std::unique_ptr<PreparedFilter> (*init)(const ConfigBlock &block); }; -/** - * Creates a new filter, loads configuration and the plugin name from - * the specified configuration section. - * - * Throws std::runtime_error on error. - * - * @param block the configuration section - */ -std::unique_ptr<PreparedFilter> -filter_configured_new(const ConfigBlock &block); - #endif diff --git a/src/filter/FilterPlugin.cxx b/src/filter/LoadOne.cxx index dcdf80252..43f751f64 100644 --- a/src/filter/FilterPlugin.cxx +++ b/src/filter/LoadOne.cxx @@ -18,15 +18,13 @@ */ #include "config.h" +#include "LoadOne.hxx" #include "FilterPlugin.hxx" #include "FilterRegistry.hxx" #include "Prepared.hxx" #include "config/Block.hxx" -#include "config/ConfigError.hxx" #include "util/RuntimeError.hxx" -#include <assert.h> - std::unique_ptr<PreparedFilter> filter_configured_new(const ConfigBlock &block) { diff --git a/src/filter/LoadOne.hxx b/src/filter/LoadOne.hxx new file mode 100644 index 000000000..8baf51bc3 --- /dev/null +++ b/src/filter/LoadOne.hxx @@ -0,0 +1,39 @@ +/* + * Copyright 2003-2017 The Music Player Daemon Project + * http://www.musicpd.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#ifndef MPD_FILTER_LOAD_ONE_HXX +#define MPD_FILTER_LOAD_ONE_HXX + +#include <memory> + +struct ConfigBlock; +class PreparedFilter; + +/** + * Creates a new filter, loads configuration and the plugin name from + * the specified configuration section. + * + * Throws std::runtime_error on error. + * + * @param block the configuration section + */ +std::unique_ptr<PreparedFilter> +filter_configured_new(const ConfigBlock &block); + +#endif |