From 92ebdc5a6aa5c779821374c240a47e01718807a3 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 3 Feb 2013 16:30:35 +0000 Subject: Fix compilation with GCC 4.6. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5038 a436a847-0d15-0410-975c-d299462d15a1 --- src/socket/ingen_socket_client.cpp | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) (limited to 'src/socket/ingen_socket_client.cpp') diff --git a/src/socket/ingen_socket_client.cpp b/src/socket/ingen_socket_client.cpp index 88842dde..a6b2f63b 100644 --- a/src/socket/ingen_socket_client.cpp +++ b/src/socket/ingen_socket_client.cpp @@ -23,36 +23,40 @@ #include "Socket.hpp" #include "SocketClient.hpp" -static Ingen::SPtr -new_socket_interface(Ingen::World* world, - const Raul::URI& uri, - Ingen::SPtr respondee) +namespace Ingen { +namespace Socket { + +static SPtr +new_socket_interface(Ingen::World* world, + const Raul::URI& uri, + SPtr respondee) { - Ingen::SPtr sock( - new Ingen::Socket::Socket(Ingen::Socket::Socket::type_from_uri(uri))); + SPtr sock(new Socket(Socket::type_from_uri(uri))); if (!sock->connect(uri)) { world->log().error(Raul::fmt("Failed to connect <%1%> (%2%)\n") % sock->uri() % strerror(errno)); - return Ingen::SPtr(); + return SPtr(); } - Ingen::Socket::SocketClient* client = new Ingen::Socket::SocketClient( - *world, uri, sock, respondee); - return Ingen::SPtr(client); + SocketClient* client = new SocketClient(*world, uri, sock, respondee); + return SPtr(client); } -struct IngenSocketClientModule : public Ingen::Module { - void load(Ingen::World* world) { +struct SocketClientModule : public Module { + void load(World* world) { world->add_interface_factory("unix", &new_socket_interface); world->add_interface_factory("tcp", &new_socket_interface); } }; +} // namespace Socket +} // namespace Ingen + extern "C" { Ingen::Module* ingen_module_load() { - return new IngenSocketClientModule(); + return new Ingen::Socket::SocketClientModule(); } } // extern "C" -- cgit v1.2.1