# HG changeset patch # User František Kučera # Date 1659173636 -7200 # Node ID e6f005f3edfe185fa89bd2e6a52cf14886937b59 # Parent f0c51bc4d1648ce001c1cd5738f1aba38b73fd19 move options/constants from Configuration.h to Socket.h (avoid dependency from Socket to Configuration) diff -r f0c51bc4d164 -r e6f005f3edfe src/Configuration.h --- a/src/Configuration.h Sat Jul 30 02:33:33 2022 +0200 +++ b/src/Configuration.h Sat Jul 30 11:33:56 2022 +0200 @@ -28,25 +28,6 @@ namespace out { namespace socket { -namespace options { -static const char OPTION_PROTOCOL[] = "protocol"; -static const char OPTION_ROLE[] = "role"; -static const char OPTION_MODE[] = "mode"; -static const char OPTION_HOST[] = "host"; -static const char OPTION_PORT[] = "port"; -static const char OPTION_PATH[] = "path"; - -static const char PROTOCOL_TCP[] = "tcp"; -static const char PROTOCOL_UDP[] = "udp"; -static const char PROTOCOL_UDS[] = "uds"; -static const char PROTOCOL_SCTP[] = "sctp"; - -static const char ROLE_CLIENT[] = "client"; -static const char ROLE_SERVER[] = "server"; - -static const char MODE_STREAM[] = "stream"; -static const char MODE_DATAGRAM[] = "datagram"; -} class Configuration { public: diff -r f0c51bc4d164 -r e6f005f3edfe src/Socket.cpp --- a/src/Socket.cpp Sat Jul 30 02:33:33 2022 +0200 +++ b/src/Socket.cpp Sat Jul 30 11:33:56 2022 +0200 @@ -27,7 +27,6 @@ #include #include "Socket.h" -#include "Configuration.h" namespace relpipe { namespace out { diff -r f0c51bc4d164 -r e6f005f3edfe src/Socket.h --- a/src/Socket.h Sat Jul 30 02:33:33 2022 +0200 +++ b/src/Socket.h Sat Jul 30 11:33:56 2022 +0200 @@ -30,6 +30,26 @@ namespace out { namespace socket { +namespace options { +static const char OPTION_PROTOCOL[] = "protocol"; +static const char OPTION_ROLE[] = "role"; +static const char OPTION_MODE[] = "mode"; +static const char OPTION_HOST[] = "host"; +static const char OPTION_PORT[] = "port"; +static const char OPTION_PATH[] = "path"; + +static const char PROTOCOL_TCP[] = "tcp"; +static const char PROTOCOL_UDP[] = "udp"; +static const char PROTOCOL_UDS[] = "uds"; +static const char PROTOCOL_SCTP[] = "sctp"; + +static const char ROLE_CLIENT[] = "client"; +static const char ROLE_SERVER[] = "server"; + +static const char MODE_STREAM[] = "stream"; +static const char MODE_DATAGRAM[] = "datagram"; +} + class Socket { public: virtual ~Socket() = default;