diff options
author | David Robillard <d@drobilla.net> | 2011-10-22 00:21:43 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-10-22 00:21:43 +0000 |
commit | 14ab4dcff7f8461dfed27b6352249b683c1f4bae (patch) | |
tree | f263ecca5c5c2a220bd00c69bba11a03ad266dc5 /src/client/ingen_client.cpp | |
parent | 91bd13d3767452ba0575d69447f23eed1c508603 (diff) | |
download | ingen-14ab4dcff7f8461dfed27b6352249b683c1f4bae.tar.gz ingen-14ab4dcff7f8461dfed27b6352249b683c1f4bae.tar.bz2 ingen-14ab4dcff7f8461dfed27b6352249b683c1f4bae.zip |
Move *all* OSC and HTTP stuff to their respective modules.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@3578 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/client/ingen_client.cpp')
-rw-r--r-- | src/client/ingen_client.cpp | 50 |
1 files changed, 3 insertions, 47 deletions
diff --git a/src/client/ingen_client.cpp b/src/client/ingen_client.cpp index 03056f65..2e3e2c74 100644 --- a/src/client/ingen_client.cpp +++ b/src/client/ingen_client.cpp @@ -15,60 +15,16 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "ingen-config.h" -#include "raul/SharedPtr.hpp" #include "ingen/shared/Module.hpp" #include "ingen/shared/World.hpp" -#ifdef HAVE_LIBLO -#include "OSCClientReceiver.hpp" -#include "OSCEngineSender.hpp" -#endif -#ifdef HAVE_SOUP -#include "HTTPClientReceiver.hpp" -#include "HTTPEngineSender.hpp" -#endif - -using namespace Ingen; +#include "raul/SharedPtr.hpp" -#ifdef HAVE_LIBLO -SharedPtr<Ingen::ServerInterface> -new_osc_interface(Ingen::Shared::World* world, - const std::string& url, - SharedPtr<ClientInterface> respond_to) -{ - SharedPtr<Client::OSCClientReceiver> receiver( - new Client::OSCClientReceiver(16181, respond_to)); - Client::OSCEngineSender* oes = new Client::OSCEngineSender( - url, world->conf()->option("packet-size").get_int32(), receiver); - oes->attach(rand(), true); - return SharedPtr<ServerInterface>(oes); -} -#endif +#include "ingen-config.h" -#ifdef HAVE_SOUP -SharedPtr<Ingen::ServerInterface> -new_http_interface(Ingen::Shared::World* world, - const std::string& url, - SharedPtr<ClientInterface> respond_to) -{ - SharedPtr<Client::HTTPClientReceiver> receiver( - new Client::HTTPClientReceiver(world, url, respond_to)); - Client::HTTPEngineSender* hes = new Client::HTTPEngineSender( - world, url, receiver); - hes->attach(rand(), true); - return SharedPtr<ServerInterface>(hes); -} -#endif +using namespace Ingen; struct IngenClientModule : public Ingen::Shared::Module { void load(Ingen::Shared::World* world) { -#ifdef HAVE_LIBLO - world->add_interface_factory("osc.udp", &new_osc_interface); - world->add_interface_factory("osc.tcp", &new_osc_interface); -#endif -#ifdef HAVE_SOUP - world->add_interface_factory("http", &new_http_interface); -#endif } }; |