From a7989077abe2b862b131b7573380a82f889bad95 Mon Sep 17 00:00:00 2001
From: Max Kellermann <max@duempel.org>
Date: Thu, 6 Feb 2014 22:11:03 +0100
Subject: neighbor/smbclient: move smbclient_domain to lib/smbclient/Domain.cxx

---
 Makefile.am                                      |  1 +
 src/lib/smbclient/Domain.cxx                     | 24 +++++++++++++++++++++
 src/lib/smbclient/Domain.hxx                     | 27 ++++++++++++++++++++++++
 src/neighbor/plugins/SmbclientNeighborPlugin.cxx |  3 +--
 4 files changed, 53 insertions(+), 2 deletions(-)
 create mode 100644 src/lib/smbclient/Domain.cxx
 create mode 100644 src/lib/smbclient/Domain.hxx

diff --git a/Makefile.am b/Makefile.am
index 520909040..c8d6a0219 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -414,6 +414,7 @@ libfs_a_SOURCES = \
 # Storage library
 
 SMBCLIENT_SOURCES = \
+	src/lib/smbclient/Domain.cxx src/lib/smbclient/Domain.hxx \
 	src/lib/smbclient/Init.cxx src/lib/smbclient/Init.hxx
 
 if ENABLE_DATABASE
diff --git a/src/lib/smbclient/Domain.cxx b/src/lib/smbclient/Domain.cxx
new file mode 100644
index 000000000..00f5ee6c1
--- /dev/null
+++ b/src/lib/smbclient/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 smbclient_domain("smbclient");
diff --git a/src/lib/smbclient/Domain.hxx b/src/lib/smbclient/Domain.hxx
new file mode 100644
index 000000000..3b21c4e60
--- /dev/null
+++ b/src/lib/smbclient/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_SMBCLIENT_DOMAIN_HXX
+#define MPD_SMBCLIENT_DOMAIN_HXX
+
+class Domain;
+
+extern const Domain smbclient_domain;
+
+#endif
diff --git a/src/neighbor/plugins/SmbclientNeighborPlugin.cxx b/src/neighbor/plugins/SmbclientNeighborPlugin.cxx
index ea3a6c2fd..2b81f3ceb 100644
--- a/src/neighbor/plugins/SmbclientNeighborPlugin.cxx
+++ b/src/neighbor/plugins/SmbclientNeighborPlugin.cxx
@@ -20,6 +20,7 @@
 #include "config.h"
 #include "SmbclientNeighborPlugin.hxx"
 #include "lib/smbclient/Init.hxx"
+#include "lib/smbclient/Domain.hxx"
 #include "neighbor/NeighborPlugin.hxx"
 #include "neighbor/Explorer.hxx"
 #include "neighbor/Listener.hxx"
@@ -38,8 +39,6 @@
 #include <list>
 #include <algorithm>
 
-static constexpr Domain smbclient_domain("smbclient");
-
 class SmbclientNeighborExplorer final : public NeighborExplorer {
 	struct Server {
 		std::string name, comment;
-- 
cgit v1.2.3