From 82ab6f73fab060860addb30691d0e926b4723ee2 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 7 Feb 2015 01:05:13 +0000 Subject: Demodularize socket stuff. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5535 a436a847-0d15-0410-975c-d299462d15a1 --- src/server/Engine.cpp | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'src/server/Engine.cpp') diff --git a/src/server/Engine.cpp b/src/server/Engine.cpp index 76755a2c..c905eed2 100644 --- a/src/server/Engine.cpp +++ b/src/server/Engine.cpp @@ -1,6 +1,6 @@ /* This file is part of Ingen. - Copyright 2007-2013 David Robillard + Copyright 2007-2015 David Robillard Ingen is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free @@ -14,6 +14,8 @@ along with Ingen. If not, see . */ +#include "ingen_config.h" + #include #include @@ -45,6 +47,9 @@ #include "ProcessContext.hpp" #include "ThreadManager.hpp" #include "Worker.hpp" +#ifdef HAVE_SOCKET +#include "SocketListener.hpp" +#endif using namespace std; @@ -67,6 +72,7 @@ Engine::Engine(Ingen::World* world) , _post_processor(new PostProcessor(*this)) , _root_graph(NULL) , _worker(new Worker(world->log(), event_queue_size())) + , _listener(NULL) , _process_context(*this) , _rand_engine(0) , _uniform_dist(0.0f, 1.0f) @@ -119,6 +125,9 @@ Engine::~Engine() _world->set_store(SPtr()); +#ifdef HAVE_SOCKET + delete _listener; +#endif delete _pre_processor; delete _post_processor; delete _block_factory; @@ -135,6 +144,14 @@ Engine::~Engine() munlockall(); } +void +Engine::listen() +{ +#ifdef HAVE_SOCKET + _listener = new SocketListener(*this); +#endif +} + SPtr Engine::store() const { -- cgit v1.2.1