From 881eac58c2f9bf1fcb18ef7dcda7ab025e327871 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 24 May 2011 22:21:20 +0000 Subject: Tidy up headers. Remove dependency on OSCEngineSender and HTTPEngineSender from GUI code. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@3317 a436a847-0d15-0410-975c-d299462d15a1 --- src/gui/ConnectWindow.cpp | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) (limited to 'src/gui') diff --git a/src/gui/ConnectWindow.cpp b/src/gui/ConnectWindow.cpp index eb98bb6b..b266307a 100644 --- a/src/gui/ConnectWindow.cpp +++ b/src/gui/ConnectWindow.cpp @@ -31,11 +31,9 @@ #include "server/Engine.hpp" #ifdef HAVE_SOUP #include "client/HTTPClientReceiver.hpp" -#include "client/HTTPEngineSender.hpp" #endif #ifdef HAVE_LIBLO #include "client/OSCClientReceiver.hpp" -#include "client/OSCEngineSender.hpp" #endif #include "client/ClientStore.hpp" #include "client/PatchModel.hpp" @@ -191,19 +189,7 @@ ConnectWindow::connect(bool existing) #endif if (!existing) { -#ifdef HAVE_LIBLO - if (scheme == "osc.udp" || scheme == "osc.tcp") - world->set_engine( - SharedPtr( - new OSCEngineSender( - uri, - world->conf()->option("packet-size").get_int32()))); -#endif -#ifdef HAVE_SOUP - if (scheme == "http") - world->set_engine(SharedPtr( - new HTTPEngineSender(world, uri))); -#endif + world->set_engine(world->interface(uri)); } else { uri = world->engine()->uri().str(); scheme = uri.substr(0, uri.find(":")); @@ -223,10 +209,8 @@ ConnectWindow::connect(bool existing) const string cmd = string("ingen -e --engine-port=").append(port_str); if (Raul::Process::launch(cmd)) { - world->set_engine(SharedPtr( - new OSCEngineSender( - string("osc.udp://localhost:").append(port_str), - world->conf()->option("packet-size").get_int32()))); + const std::string engine_uri = string("osc.udp://localhost:").append(port_str); + world->set_engine(world->interface(engine_uri)); // FIXME: static args SharedPtr tsci(new ThreadedSigClientInterface(1024)); -- cgit v1.2.1