From 362e73bea88c8bf4a59e16939da615bf5ddf0558 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 7 Nov 2014 13:56:34 +0100 Subject: input/Open: expose input_domain --- Makefile.am | 1 + src/input/Domain.cxx | 24 ++++++++++++++++++++++++ src/input/Domain.hxx | 27 +++++++++++++++++++++++++++ src/input/Open.cxx | 3 +-- 4 files changed, 53 insertions(+), 2 deletions(-) create mode 100644 src/input/Domain.cxx create mode 100644 src/input/Domain.hxx diff --git a/Makefile.am b/Makefile.am index dac3e1772..72b6a0ca4 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1112,6 +1112,7 @@ endif # libinput_a_SOURCES = \ + src/input/Domain.cxx src/input/Domain.hxx \ src/input/Init.cxx src/input/Init.hxx \ src/input/Registry.cxx src/input/Registry.hxx \ src/input/Open.cxx \ diff --git a/src/input/Domain.cxx b/src/input/Domain.cxx new file mode 100644 index 000000000..26ae298a4 --- /dev/null +++ b/src/input/Domain.cxx @@ -0,0 +1,24 @@ +/* + * Copyright (C) 2003-2014 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. + */ + +#include "config.h" +#include "Domain.hxx" +#include "util/Domain.hxx" + +const Domain input_domain("input"); diff --git a/src/input/Domain.hxx b/src/input/Domain.hxx new file mode 100644 index 000000000..16fa5e0f1 --- /dev/null +++ b/src/input/Domain.hxx @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2003-2014 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_INPUT_DOMAIN_HXX +#define MPD_INPUT_DOMAIN_HXX + +class Domain; + +extern const Domain input_domain; + +#endif diff --git a/src/input/Open.cxx b/src/input/Open.cxx index 18572d6b2..66ccdce74 100644 --- a/src/input/Open.cxx +++ b/src/input/Open.cxx @@ -22,14 +22,13 @@ #include "Registry.hxx" #include "InputPlugin.hxx" #include "LocalOpen.hxx" +#include "Domain.hxx" #include "plugins/RewindInputPlugin.hxx" #include "fs/Traits.hxx" #include "fs/Path.hxx" #include "util/Error.hxx" #include "util/Domain.hxx" -static constexpr Domain input_domain("input"); - InputStream * InputStream::Open(const char *url, Mutex &mutex, Cond &cond, -- cgit v1.2.3