From fe32db17d76d59485bf3e51dd7001fb99614ae7b Mon Sep 17 00:00:00 2001
From: Max Kellermann <max@musicpd.org>
Date: Wed, 3 Apr 2019 21:31:32 +0200
Subject: [PATCH] client/Internal: rename to Config.hxx

---
 meson.build                             |  2 +-
 src/Main.cxx                            |  2 +-
 src/client/Client.hxx                   |  4 ----
 src/client/{Global.cxx => Config.cxx}   |  2 +-
 src/client/{Internal.hxx => Config.hxx} | 11 +++++++----
 src/client/Idle.cxx                     |  3 ++-
 src/client/New.cxx                      |  4 ++--
 src/client/Process.cxx                  |  3 ++-
 src/client/Read.cxx                     |  3 ++-
 src/command/CommandListBuilder.cxx      |  2 +-
 10 files changed, 19 insertions(+), 17 deletions(-)
 rename src/client/{Global.cxx => Config.cxx} (98%)
 rename src/client/{Internal.hxx => Config.hxx} (88%)

diff --git a/meson.build b/meson.build
index 813323ff0..de56cf109 100644
--- a/meson.build
+++ b/meson.build
@@ -206,10 +206,10 @@ sources = [
   'src/decoder/DecoderPrint.cxx',
   'src/client/Listener.cxx',
   'src/client/Client.cxx',
+  'src/client/Config.cxx',
   'src/client/Domain.cxx',
   'src/client/Event.cxx',
   'src/client/Expire.cxx',
-  'src/client/Global.cxx',
   'src/client/Idle.cxx',
   'src/client/List.cxx',
   'src/client/New.cxx',
diff --git a/src/Main.cxx b/src/Main.cxx
index b392048f2..e2205bab1 100644
--- a/src/Main.cxx
+++ b/src/Main.cxx
@@ -28,7 +28,7 @@
 #include "Permission.hxx"
 #include "Listen.hxx"
 #include "client/Listener.hxx"
-#include "client/Client.hxx"
+#include "client/Config.hxx"
 #include "client/List.hxx"
 #include "command/AllCommands.hxx"
 #include "Partition.hxx"
diff --git a/src/client/Client.hxx b/src/client/Client.hxx
index 977d638c2..74a423149 100644
--- a/src/client/Client.hxx
+++ b/src/client/Client.hxx
@@ -37,7 +37,6 @@
 
 #include <stddef.h>
 
-struct ConfigData;
 class SocketAddress;
 class UniqueSocketDescriptor;
 class EventLoop;
@@ -260,9 +259,6 @@ private:
 	void OnTimeout() noexcept;
 };
 
-void
-client_manager_init(const ConfigData &config);
-
 void
 client_new(EventLoop &loop, Partition &partition,
 	   UniqueSocketDescriptor fd, SocketAddress address, int uid,
diff --git a/src/client/Global.cxx b/src/client/Config.cxx
similarity index 98%
rename from src/client/Global.cxx
rename to src/client/Config.cxx
index 332d254bd..2092d877b 100644
--- a/src/client/Global.cxx
+++ b/src/client/Config.cxx
@@ -17,7 +17,7 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-#include "Internal.hxx"
+#include "Config.hxx"
 #include "config/Data.hxx"
 
 #define CLIENT_TIMEOUT_DEFAULT			(60)
diff --git a/src/client/Internal.hxx b/src/client/Config.hxx
similarity index 88%
rename from src/client/Internal.hxx
rename to src/client/Config.hxx
index ab1de1185..28241fd19 100644
--- a/src/client/Internal.hxx
+++ b/src/client/Config.hxx
@@ -17,15 +17,18 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-#ifndef MPD_CLIENT_INTERNAL_HXX
-#define MPD_CLIENT_INTERNAL_HXX
-
-#include "Client.hxx"
+#ifndef MPD_CLIENT_CONFIG_HXX
+#define MPD_CLIENT_CONFIG_HXX
 
 #include <chrono>
 
+struct ConfigData;
+
 extern std::chrono::steady_clock::duration client_timeout;
 extern size_t client_max_command_list_size;
 extern size_t client_max_output_buffer_size;
 
+void
+client_manager_init(const ConfigData &config);
+
 #endif
diff --git a/src/client/Idle.cxx b/src/client/Idle.cxx
index 92098bba1..abf3a38a6 100644
--- a/src/client/Idle.cxx
+++ b/src/client/Idle.cxx
@@ -17,7 +17,8 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-#include "Internal.hxx"
+#include "Client.hxx"
+#include "Config.hxx"
 #include "Response.hxx"
 #include "Idle.hxx"
 
diff --git a/src/client/New.cxx b/src/client/New.cxx
index 5c21d2a7c..46b3f5b99 100644
--- a/src/client/New.cxx
+++ b/src/client/New.cxx
@@ -17,8 +17,8 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-#include "config.h"
-#include "Internal.hxx"
+#include "Client.hxx"
+#include "Config.hxx"
 #include "Domain.hxx"
 #include "List.hxx"
 #include "Partition.hxx"
diff --git a/src/client/Process.cxx b/src/client/Process.cxx
index f0820918c..401244eef 100644
--- a/src/client/Process.cxx
+++ b/src/client/Process.cxx
@@ -17,7 +17,8 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-#include "Internal.hxx"
+#include "Client.hxx"
+#include "Config.hxx"
 #include "Domain.hxx"
 #include "protocol/Result.hxx"
 #include "command/AllCommands.hxx"
diff --git a/src/client/Read.cxx b/src/client/Read.cxx
index ebb502353..5ca6770bb 100644
--- a/src/client/Read.cxx
+++ b/src/client/Read.cxx
@@ -17,7 +17,8 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-#include "Internal.hxx"
+#include "Client.hxx"
+#include "Config.hxx"
 #include "Partition.hxx"
 #include "Instance.hxx"
 #include "event/Loop.hxx"
diff --git a/src/command/CommandListBuilder.cxx b/src/command/CommandListBuilder.cxx
index 40e2c833a..bb3584181 100644
--- a/src/command/CommandListBuilder.cxx
+++ b/src/command/CommandListBuilder.cxx
@@ -18,7 +18,7 @@
  */
 
 #include "CommandListBuilder.hxx"
-#include "client/Internal.hxx"
+#include "client/Config.hxx"
 
 #include <string.h>