summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-10-21 23:44:02 +0000
committerDavid Robillard <d@drobilla.net>2011-10-21 23:44:02 +0000
commitc7b05953949dbc80eee22348270166c2a6704a95 (patch)
treed0ac1b757831bd5b4944d008101e68054e9f1c37
parent5a413b8cd31006c8836bcc7409f7055c890f8a68 (diff)
downloadingen-c7b05953949dbc80eee22348270166c2a6704a95.tar.gz
ingen-c7b05953949dbc80eee22348270166c2a6704a95.tar.bz2
ingen-c7b05953949dbc80eee22348270166c2a6704a95.zip
Move engine side OSC and HTTP stuff to separate modules.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@3576 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r--src/http/HTTPClientSender.cpp (renamed from src/server/HTTPClientSender.cpp)12
-rw-r--r--src/http/HTTPClientSender.hpp (renamed from src/server/HTTPClientSender.hpp)0
-rw-r--r--src/http/HTTPEngineReceiver.cpp (renamed from src/server/HTTPEngineReceiver.cpp)5
-rw-r--r--src/http/HTTPEngineReceiver.hpp (renamed from src/server/HTTPEngineReceiver.hpp)0
-rw-r--r--src/http/ingen_http.cpp (renamed from src/server/ingen_http.cpp)6
-rw-r--r--src/osc/OSCClientSender.cpp (renamed from src/server/OSCClientSender.cpp)13
-rw-r--r--src/osc/OSCClientSender.hpp (renamed from src/server/OSCClientSender.hpp)0
-rw-r--r--src/osc/OSCEngineReceiver.cpp (renamed from src/server/OSCEngineReceiver.cpp)13
-rw-r--r--src/osc/OSCEngineReceiver.hpp (renamed from src/server/OSCEngineReceiver.hpp)0
-rw-r--r--src/osc/ingen_osc.cpp (renamed from src/server/ingen_osc.cpp)6
-rw-r--r--src/server/wscript24
-rw-r--r--wscript6
12 files changed, 30 insertions, 55 deletions
diff --git a/src/server/HTTPClientSender.cpp b/src/http/HTTPClientSender.cpp
index 85a291a5..564954ae 100644
--- a/src/server/HTTPClientSender.cpp
+++ b/src/http/HTTPClientSender.cpp
@@ -16,14 +16,18 @@
*/
#include <string>
+
#include <libsoup/soup.h>
-#include "raul/log.hpp"
-#include "raul/Atom.hpp"
-#include "raul/AtomRDF.hpp"
+
#include "ingen/serialisation/Serialiser.hpp"
#include "ingen/shared/World.hpp"
+#include "raul/Atom.hpp"
+#include "raul/AtomRDF.hpp"
+#include "raul/log.hpp"
+
+#include "../server/Engine.hpp"
+
#include "HTTPClientSender.hpp"
-#include "Engine.hpp"
using namespace std;
using namespace Raul;
diff --git a/src/server/HTTPClientSender.hpp b/src/http/HTTPClientSender.hpp
index 116f0601..116f0601 100644
--- a/src/server/HTTPClientSender.hpp
+++ b/src/http/HTTPClientSender.hpp
diff --git a/src/server/HTTPEngineReceiver.cpp b/src/http/HTTPEngineReceiver.cpp
index a7b4ee1f..2f39ee9c 100644
--- a/src/server/HTTPEngineReceiver.cpp
+++ b/src/http/HTTPEngineReceiver.cpp
@@ -33,8 +33,9 @@
#include "ingen/shared/Module.hpp"
#include "ingen/shared/Store.hpp"
-#include "ClientBroadcaster.hpp"
-#include "Engine.hpp"
+#include "../server/ClientBroadcaster.hpp"
+#include "../server/Engine.hpp"
+
#include "HTTPClientSender.hpp"
#include "HTTPEngineReceiver.hpp"
diff --git a/src/server/HTTPEngineReceiver.hpp b/src/http/HTTPEngineReceiver.hpp
index e17efe05..e17efe05 100644
--- a/src/server/HTTPEngineReceiver.hpp
+++ b/src/http/HTTPEngineReceiver.hpp
diff --git a/src/server/ingen_http.cpp b/src/http/ingen_http.cpp
index c0bc0ce4..0a08f59b 100644
--- a/src/server/ingen_http.cpp
+++ b/src/http/ingen_http.cpp
@@ -17,9 +17,11 @@
#include "ingen/shared/Module.hpp"
#include "ingen/shared/World.hpp"
+
+#include "../server/Engine.hpp"
+#include "../server/ServerInterfaceImpl.hpp"
+
#include "HTTPEngineReceiver.hpp"
-#include "ServerInterfaceImpl.hpp"
-#include "Engine.hpp"
using namespace std;
using namespace Ingen;
diff --git a/src/server/OSCClientSender.cpp b/src/osc/OSCClientSender.cpp
index 5e9c01f0..ba098a61 100644
--- a/src/server/OSCClientSender.cpp
+++ b/src/osc/OSCClientSender.cpp
@@ -22,16 +22,11 @@
#include "raul/log.hpp"
#include "raul/AtomLiblo.hpp"
+#include "raul/Path.hpp"
-#include "EngineStore.hpp"
-#include "NodeImpl.hpp"
-#include "OSCClientSender.hpp"
-#include "PatchImpl.hpp"
-
-#include "PluginImpl.hpp"
-#include "PortImpl.hpp"
#include "ingen/ClientInterface.hpp"
-#include "util.hpp"
+
+#include "OSCClientSender.hpp"
using namespace std;
using namespace Raul;
@@ -57,8 +52,6 @@ OSCClientSender::response_ok(int32_t id)
{
if (!_enabled)
return;
-
-
if (lo_send(_address, "/ok", "i", id, LO_ARGS_END) < 0) {
Raul::error << "Unable to send OK " << id << "! ("
diff --git a/src/server/OSCClientSender.hpp b/src/osc/OSCClientSender.hpp
index ffc3b202..ffc3b202 100644
--- a/src/server/OSCClientSender.hpp
+++ b/src/osc/OSCClientSender.hpp
diff --git a/src/server/OSCEngineReceiver.cpp b/src/osc/OSCEngineReceiver.cpp
index 8451f4ee..254cc850 100644
--- a/src/server/OSCEngineReceiver.cpp
+++ b/src/osc/OSCEngineReceiver.cpp
@@ -29,13 +29,13 @@
#include "ingen-config.h"
#include "ingen/ClientInterface.hpp"
+#include "ingen/ServerInterface.hpp"
+
+#include "../server/ClientBroadcaster.hpp"
+#include "../server/Engine.hpp"
-#include "ClientBroadcaster.hpp"
-#include "Engine.hpp"
#include "OSCClientSender.hpp"
#include "OSCEngineReceiver.hpp"
-#include "ServerInterfaceImpl.hpp"
-#include "ThreadManager.hpp"
#define LOG(s) s << "[OSCEngineReceiver] "
@@ -116,8 +116,6 @@ OSCEngineReceiver::OSCEngineReceiver(Engine& engine,
lo_server_add_method(_server, NULL, NULL, unknown_cb, NULL);
- //_interface->set_name("OSCEngineReceiver");
- //_interface->start();
_receive_thread->set_name("OSCEngineReceiver Listener");
_receive_thread->start();
_receive_thread->set_scheduling(SCHED_FIFO, 5);
@@ -126,7 +124,6 @@ OSCEngineReceiver::OSCEngineReceiver(Engine& engine,
OSCEngineReceiver::~OSCEngineReceiver()
{
_receive_thread->stop();
- //_interface->stop();
delete _receive_thread;
if (_server != NULL) {
@@ -141,8 +138,6 @@ OSCEngineReceiver::~OSCEngineReceiver()
void
OSCEngineReceiver::ReceiveThread::_run()
{
- Thread::get().set_context(THREAD_PRE_PROCESS);
-
/* get a timestamp here and stamp all the events with the same time so
* they all get executed in the same cycle */
diff --git a/src/server/OSCEngineReceiver.hpp b/src/osc/OSCEngineReceiver.hpp
index fe16ac1a..fe16ac1a 100644
--- a/src/server/OSCEngineReceiver.hpp
+++ b/src/osc/OSCEngineReceiver.hpp
diff --git a/src/server/ingen_osc.cpp b/src/osc/ingen_osc.cpp
index 024a93ce..4a8946c0 100644
--- a/src/server/ingen_osc.cpp
+++ b/src/osc/ingen_osc.cpp
@@ -17,9 +17,11 @@
#include "ingen/shared/Module.hpp"
#include "ingen/shared/World.hpp"
+
+#include "../server/Engine.hpp"
+#include "../server/ServerInterfaceImpl.hpp"
+
#include "OSCEngineReceiver.hpp"
-#include "ServerInterfaceImpl.hpp"
-#include "Engine.hpp"
using namespace std;
using namespace Ingen;
diff --git a/src/server/wscript b/src/server/wscript
index 4172b23e..04731313 100644
--- a/src/server/wscript
+++ b/src/server/wscript
@@ -65,30 +65,6 @@ def build(bld):
core_libs = 'GLIBMM GTHREAD LV2CORE LILV RAUL SORD'
autowaf.use_lib(bld, obj, core_libs)
- if bld.is_defined('HAVE_SOUP'):
- obj = bld(features = 'cxx cxxshlib',
- source = '''HTTPClientSender.cpp
- HTTPEngineReceiver.cpp
- ingen_http.cpp''',
- includes = ['.', '../..', '../../include'],
- name = 'libingen_http',
- target = 'ingen_http',
- install_path = '${LIBDIR}',
- use = 'libingen_server')
- autowaf.use_lib(bld, obj, core_libs + ' SOUP')
-
- if bld.is_defined('HAVE_LIBLO'):
- obj = bld(features = 'cxx cxxshlib',
- source = '''OSCClientSender.cpp
- OSCEngineReceiver.cpp
- ingen_osc.cpp''',
- includes = ['.', '../..', '../../include'],
- name = 'libingen_osc',
- target = 'ingen_osc',
- install_path = '${LIBDIR}',
- use = 'libingen_server')
- autowaf.use_lib(bld, obj, core_libs + ' LIBLO')
-
if bld.is_defined('HAVE_JACK'):
obj = bld(features = 'cxx cxxshlib',
source = 'JackDriver.cpp ingen_jack.cpp',
diff --git a/wscript b/wscript
index b9d61244..026c3db3 100644
--- a/wscript
+++ b/wscript
@@ -136,10 +136,12 @@ def build(bld):
bld.path.ant_glob('include/ingen/%s/*' % i))
# Modules
- bld.recurse('src/client')
+ bld.recurse('src/shared')
bld.recurse('src/serialisation')
bld.recurse('src/server')
- bld.recurse('src/shared')
+ bld.recurse('src/client')
+ bld.recurse('src/http')
+ bld.recurse('src/osc')
if bld.is_defined('INGEN_BUILD_GUI'):
bld.recurse('src/gui')