summaryrefslogtreecommitdiffstats
path: root/src/progs
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-05-02 23:58:28 +0000
committerDavid Robillard <d@drobilla.net>2007-05-02 23:58:28 +0000
commit40ff85e256ca9094fb75cdcbabd3442339f91ecd (patch)
treebc2c23a9802110f14836fc87413e08be1b7b7266 /src/progs
parent10e23868c8199335ebd360afb62911174075658c (diff)
downloadingen-40ff85e256ca9094fb75cdcbabd3442339f91ecd.tar.gz
ingen-40ff85e256ca9094fb75cdcbabd3442339f91ecd.tar.bz2
ingen-40ff85e256ca9094fb75cdcbabd3442339f91ecd.zip
Added svn:ignore property to everything.
Made engine and patch loader separate dynamically loaded modules. No more monolithic ingenuity (module loaded at runtime). git-svn-id: http://svn.drobilla.net/lad/ingen@491 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/progs')
-rw-r--r--src/progs/demolition/demolition.cpp2
-rw-r--r--src/progs/ingenuity/App.cpp12
-rw-r--r--src/progs/ingenuity/App.h35
-rw-r--r--src/progs/ingenuity/BreadCrumb.h4
-rw-r--r--src/progs/ingenuity/BreadCrumbBox.h4
-rw-r--r--src/progs/ingenuity/ConfigWindow.cpp7
-rw-r--r--src/progs/ingenuity/ConfigWindow.h5
-rw-r--r--src/progs/ingenuity/Configuration.cpp8
-rw-r--r--src/progs/ingenuity/ConnectWindow.cpp94
-rw-r--r--src/progs/ingenuity/ConnectWindow.h10
-rw-r--r--src/progs/ingenuity/Connection.h4
-rw-r--r--src/progs/ingenuity/ControlGroups.cpp8
-rw-r--r--src/progs/ingenuity/ControlGroups.h4
-rw-r--r--src/progs/ingenuity/ControlPanel.cpp10
-rw-r--r--src/progs/ingenuity/ControlPanel.h11
-rw-r--r--src/progs/ingenuity/DSSIController.cpp4
-rw-r--r--src/progs/ingenuity/DSSIController.h4
-rw-r--r--src/progs/ingenuity/LoadPatchWindow.cpp4
-rw-r--r--src/progs/ingenuity/LoadPatchWindow.h7
-rw-r--r--src/progs/ingenuity/LoadPluginWindow.cpp14
-rw-r--r--src/progs/ingenuity/LoadPluginWindow.h6
-rw-r--r--src/progs/ingenuity/LoadRemotePatchWindow.cpp6
-rw-r--r--src/progs/ingenuity/LoadRemotePatchWindow.h7
-rw-r--r--src/progs/ingenuity/LoadSubpatchWindow.cpp8
-rw-r--r--src/progs/ingenuity/LoadSubpatchWindow.h6
-rw-r--r--src/progs/ingenuity/Makefile.am15
-rw-r--r--src/progs/ingenuity/NewSubpatchWindow.cpp11
-rw-r--r--src/progs/ingenuity/NewSubpatchWindow.h6
-rw-r--r--src/progs/ingenuity/NodeControlWindow.cpp11
-rw-r--r--src/progs/ingenuity/NodeControlWindow.h2
-rw-r--r--src/progs/ingenuity/NodeMenu.cpp6
-rw-r--r--src/progs/ingenuity/NodeMenu.h6
-rw-r--r--src/progs/ingenuity/NodeModule.cpp10
-rw-r--r--src/progs/ingenuity/NodeModule.h2
-rw-r--r--src/progs/ingenuity/NodePropertiesWindow.cpp6
-rw-r--r--src/progs/ingenuity/NodePropertiesWindow.h4
-rw-r--r--src/progs/ingenuity/PatchCanvas.cpp24
-rw-r--r--src/progs/ingenuity/PatchCanvas.h4
-rw-r--r--src/progs/ingenuity/PatchPortModule.cpp6
-rw-r--r--src/progs/ingenuity/PatchPortModule.h2
-rw-r--r--src/progs/ingenuity/PatchPropertiesWindow.cpp4
-rw-r--r--src/progs/ingenuity/PatchPropertiesWindow.h2
-rw-r--r--src/progs/ingenuity/PatchTreeWindow.cpp11
-rw-r--r--src/progs/ingenuity/PatchTreeWindow.h2
-rw-r--r--src/progs/ingenuity/PatchView.cpp6
-rw-r--r--src/progs/ingenuity/PatchView.h4
-rw-r--r--src/progs/ingenuity/PatchWindow.cpp6
-rw-r--r--src/progs/ingenuity/PatchWindow.h6
-rw-r--r--src/progs/ingenuity/Port.cpp10
-rw-r--r--src/progs/ingenuity/Port.h2
-rw-r--r--src/progs/ingenuity/PortPropertiesWindow.cpp10
-rw-r--r--src/progs/ingenuity/PortPropertiesWindow.h4
-rw-r--r--src/progs/ingenuity/RenameWindow.cpp9
-rw-r--r--src/progs/ingenuity/RenameWindow.h4
-rw-r--r--src/progs/ingenuity/SubpatchModule.cpp4
-rw-r--r--src/progs/ingenuity/SubpatchModule.h6
-rw-r--r--src/progs/ingenuity/ThreadedLoader.cpp26
-rw-r--r--src/progs/ingenuity/ThreadedLoader.h18
-rw-r--r--src/progs/ingenuity/UploadPatchWindow.cpp8
-rw-r--r--src/progs/ingenuity/UploadPatchWindow.h10
-rw-r--r--src/progs/ingenuity/WindowFactory.h5
-rwxr-xr-xsrc/progs/ingenuity/ingenuity_dev3
-rw-r--r--src/progs/patch_loader/Makefile.am6
-rw-r--r--src/progs/patch_loader/new_patch_loader.cpp2
-rw-r--r--src/progs/patch_loader/patch_loader.cpp36
-rw-r--r--src/progs/server/Makefile.am7
-rw-r--r--src/progs/server/cmdline.c63
-rw-r--r--src/progs/server/cmdline.ggo1
-rw-r--r--src/progs/server/cmdline.h6
-rwxr-xr-xsrc/progs/server/ingen_dev3
-rw-r--r--src/progs/server/main.cpp41
71 files changed, 381 insertions, 343 deletions
diff --git a/src/progs/demolition/demolition.cpp b/src/progs/demolition/demolition.cpp
index 2998f774..feba204a 100644
--- a/src/progs/demolition/demolition.cpp
+++ b/src/progs/demolition/demolition.cpp
@@ -23,7 +23,7 @@
#include "Store.h"
#include "PatchLibrarian.h"
#include "PluginModel.h"
-#include "raul/SharedPtr.h"
+#include <raul/SharedPtr.h>
#include <iostream>
#include <unistd.h>
#include <stdlib.h>
diff --git a/src/progs/ingenuity/App.cpp b/src/progs/ingenuity/App.cpp
index 0e726db9..20b61da6 100644
--- a/src/progs/ingenuity/App.cpp
+++ b/src/progs/ingenuity/App.cpp
@@ -23,6 +23,11 @@
#include <libgnomecanvasmm.h>
#include <time.h>
#include <sys/time.h>
+#include <raul/Path.h>
+#include "interface/EngineInterface.h"
+#include "client/ObjectModel.h"
+#include "client/PatchModel.h"
+#include "client/Store.h"
#include "NodeModule.h"
#include "ControlPanel.h"
#include "SubpatchModule.h"
@@ -31,16 +36,11 @@
#include "MessagesWindow.h"
#include "ConfigWindow.h"
#include "GladeFactory.h"
-#include "raul/Path.h"
-#include "ObjectModel.h"
-#include "PatchModel.h"
#include "PatchTreeWindow.h"
#include "Configuration.h"
#include "ConnectWindow.h"
-#include "Store.h"
#include "ThreadedLoader.h"
#include "WindowFactory.h"
-#include "ModelEngineInterface.h"
#ifdef HAVE_LASH
#include "LashController.h"
#endif
@@ -102,7 +102,7 @@ App::instantiate()
void
-App::attach(const SharedPtr<ModelEngineInterface>& engine, const SharedPtr<SigClientInterface>& client)
+App::attach(const SharedPtr<EngineInterface>& engine, const SharedPtr<SigClientInterface>& client)
{
assert( ! _engine);
assert( ! _client);
diff --git a/src/progs/ingenuity/App.h b/src/progs/ingenuity/App.h
index aaf33893..2ef0891d 100644
--- a/src/progs/ingenuity/App.h
+++ b/src/progs/ingenuity/App.h
@@ -31,14 +31,19 @@
using std::string; using std::map; using std::list;
using std::cerr; using std::endl;
-namespace Ingen { namespace Client {
- class PatchModel;
- class PluginModel;
- class Store;
- class SigClientInterface;
- class ModelEngineInterface;
-} }
+namespace Ingen {
+ namespace Shared {
+ class EngineInterface;
+ }
+ namespace Client {
+ class PatchModel;
+ class PluginModel;
+ class Store;
+ class SigClientInterface;
+ }
+}
using namespace Ingen::Client;
+using Ingen::Shared::EngineInterface;
/** \defgroup Ingenuity GTK Client
*/
@@ -72,8 +77,8 @@ public:
void error_message(const string& msg);
- void attach(const SharedPtr<ModelEngineInterface>& engine,
- const SharedPtr<SigClientInterface>& client);
+ void attach(const SharedPtr<EngineInterface>& engine,
+ const SharedPtr<SigClientInterface>& client);
void detach();
@@ -89,10 +94,10 @@ public:
Raul::RDF::World* rdf_world() { return &_rdf_world; }
- const SharedPtr<ModelEngineInterface>& engine() const { return _engine; }
- const SharedPtr<SigClientInterface>& client() const { return _client; }
- const SharedPtr<Store>& store() const { return _store; }
- const SharedPtr<ThreadedLoader>& loader() const { return _loader; }
+ const SharedPtr<EngineInterface>& engine() const { return _engine; }
+ const SharedPtr<SigClientInterface>& client() const { return _client; }
+ const SharedPtr<Store>& store() const { return _store; }
+ const SharedPtr<ThreadedLoader>& loader() const { return _loader; }
static inline App& instance() { assert(_instance); return *_instance; }
static void instantiate();
@@ -101,8 +106,8 @@ protected:
App();
static App* _instance;
- SharedPtr<ModelEngineInterface> _engine;
- SharedPtr<SigClientInterface> _client;
+ SharedPtr<EngineInterface> _engine;
+ SharedPtr<SigClientInterface> _client;
SharedPtr<Store> _store;
SharedPtr<ThreadedLoader> _loader;
diff --git a/src/progs/ingenuity/BreadCrumb.h b/src/progs/ingenuity/BreadCrumb.h
index ae829dee..1e8b4c9b 100644
--- a/src/progs/ingenuity/BreadCrumb.h
+++ b/src/progs/ingenuity/BreadCrumb.h
@@ -19,8 +19,8 @@
#define BREADCRUMB_H
#include <gtkmm.h>
-#include "raul/Path.h"
-#include "raul/SharedPtr.h"
+#include <raul/Path.h>
+#include <raul/SharedPtr.h>
#include "PatchView.h"
namespace Ingenuity {
diff --git a/src/progs/ingenuity/BreadCrumbBox.h b/src/progs/ingenuity/BreadCrumbBox.h
index f05a14d1..952e04f1 100644
--- a/src/progs/ingenuity/BreadCrumbBox.h
+++ b/src/progs/ingenuity/BreadCrumbBox.h
@@ -22,8 +22,8 @@
#include <gtkmm.h>
#include <libglademm/xml.h>
#include <libglademm.h>
-#include "raul/Path.h"
-#include "raul/SharedPtr.h"
+#include <raul/Path.h>
+#include <raul/SharedPtr.h>
#include "PatchView.h"
namespace Ingenuity {
diff --git a/src/progs/ingenuity/ConfigWindow.cpp b/src/progs/ingenuity/ConfigWindow.cpp
index decd18ef..eef81ce3 100644
--- a/src/progs/ingenuity/ConfigWindow.cpp
+++ b/src/progs/ingenuity/ConfigWindow.cpp
@@ -15,17 +15,18 @@
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "ConfigWindow.h"
#include <iostream>
#include <cassert>
#include <algorithm>
#include <cctype>
-#include "NodeModel.h"
-using std::cout; using std::cerr; using std::endl;
+#include "client/NodeModel.h"
+#include "ConfigWindow.h"
+using namespace std;
namespace Ingenuity {
+
ConfigWindow::ConfigWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& xml)
: Gtk::Window(cobject),
_configuration(NULL)
diff --git a/src/progs/ingenuity/ConfigWindow.h b/src/progs/ingenuity/ConfigWindow.h
index 04a25689..31e564bd 100644
--- a/src/progs/ingenuity/ConfigWindow.h
+++ b/src/progs/ingenuity/ConfigWindow.h
@@ -15,16 +15,15 @@
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-
#ifndef CONFIGWINDOW_H
#define CONFIGWINDOW_H
-#include "PluginModel.h"
-#include "Configuration.h"
#include <list>
#include <libglademm/xml.h>
#include <libglademm.h>
#include <gtkmm.h>
+#include "client/PluginModel.h"
+#include "Configuration.h"
using std::list;
using Ingen::Client::PluginModel;
diff --git a/src/progs/ingenuity/Configuration.cpp b/src/progs/ingenuity/Configuration.cpp
index 4d2b8e07..d3d7f295 100644
--- a/src/progs/ingenuity/Configuration.cpp
+++ b/src/progs/ingenuity/Configuration.cpp
@@ -21,10 +21,10 @@
#include <iostream>
#include <fstream>
#include <map>
-#include "PortModel.h"
-#include "PluginModel.h"
-#include "PatchModel.h"
-#include "Loader.h"
+#include "client/PortModel.h"
+#include "client/PluginModel.h"
+#include "client/PatchModel.h"
+#include "serialisation/Loader.h"
#include "App.h"
using std::cerr; using std::cout; using std::endl;
diff --git a/src/progs/ingenuity/ConnectWindow.cpp b/src/progs/ingenuity/ConnectWindow.cpp
index 6e5b6c67..322750ea 100644
--- a/src/progs/ingenuity/ConnectWindow.cpp
+++ b/src/progs/ingenuity/ConnectWindow.cpp
@@ -21,25 +21,24 @@
#include <stdlib.h>
#include <sys/time.h>
#include <sys/resource.h>
-#include "raul/Process.h"
+#include <raul/Process.h>
#include "config.h"
-#include "ConnectWindow.h"
#include "interface/ClientKey.h"
-#include "OSCModelEngineInterface.h"
-#include "OSCClientReceiver.h"
-#include "ThreadedSigClientInterface.h"
-#include "Store.h"
-#include "PatchModel.h"
+#include "interface/EngineInterface.h"
+#include "engine/tuning.h"
+#include "engine/Engine.h"
+#include "engine/DirectResponder.h"
+#include "engine/QueuedEngineInterface.h"
+#include "client/OSCClientReceiver.h"
+#include "client/OSCEngineSender.h"
+#include "client/ThreadedSigClientInterface.h"
+#include "client/Store.h"
+#include "client/PatchModel.h"
+#include "module/Module.h"
#include "App.h"
#include "WindowFactory.h"
-#ifdef MONOLITHIC_INGENUITY
- #include "engine/Engine.h"
- #include "engine/JackAudioDriver.h"
- #include "engine/QueuedEngineInterface.h"
- #include "engine/DirectResponder.h"
- #include "engine/tuning.h"
+#include "ConnectWindow.h"
using Ingen::QueuedEngineInterface;
-#endif
using Ingen::Client::ThreadedSigClientInterface;
namespace Ingenuity {
@@ -58,18 +57,6 @@ struct OSCSigEmitter : public OSCClientReceiver, public ThreadedSigClientInterfa
};
-#ifdef MONOLITHIC_INGENUITY
-struct QueuedModelEngineInterface : public QueuedEngineInterface, public ModelEngineInterface {
- QueuedModelEngineInterface(SharedPtr<Ingen::Engine> engine)
- : Ingen::Shared::EngineInterface()
- , Ingen::QueuedEngineInterface(engine, Ingen::event_queue_size, Ingen::event_queue_size)
- {
- QueuedEventSource::start();
- }
-};
-#endif
-
-
// ConnectWindow
@@ -79,6 +66,8 @@ ConnectWindow::ConnectWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::
, _ping_id(-1)
, _attached(false)
, _connect_stage(0)
+ , _new_engine(NULL)
+ , _new_queued_engine_interface(NULL)
{
xml->get_widget("connect_icon", _icon);
xml->get_widget("connect_progress_bar", _progress_bar);
@@ -91,13 +80,29 @@ ConnectWindow::ConnectWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::
xml->get_widget("connect_disconnect_button", _disconnect_button);
xml->get_widget("connect_connect_button", _connect_button);
xml->get_widget("connect_quit_button", _quit_button);
-
+
_server_radio->signal_toggled().connect(sigc::mem_fun(this, &ConnectWindow::server_toggled));
_launch_radio->signal_toggled().connect(sigc::mem_fun(this, &ConnectWindow::launch_toggled));
_internal_radio->signal_clicked().connect(sigc::mem_fun(this, &ConnectWindow::internal_toggled));
_disconnect_button->signal_clicked().connect(sigc::mem_fun(this, &ConnectWindow::disconnect));
_connect_button->signal_clicked().connect(sigc::mem_fun(this, &ConnectWindow::connect));
_quit_button->signal_clicked().connect(sigc::mem_fun(this, &ConnectWindow::quit));
+
+ _engine_module = Ingen::Shared::load_module("ingen_engine");
+
+ if (!_engine_module) {
+ cerr << "Unable to load ingen_engine module, internal engine unavailable." << endl;
+ cerr << "If you are running from the source tree, run ingenuity_dev." << endl;
+ }
+
+ bool found1 = _engine_module->get_symbol("new_engine", (void*&)_new_engine);
+ bool found2 = _engine_module->get_symbol("new_queued_engine_interface",
+ (void*&)_new_queued_engine_interface);
+
+ if (!found1 || !found2) {
+ cerr << "Unable to find module entry point, internal engine unavailable." << endl;
+ _engine_module.reset();
+ }
}
@@ -121,11 +126,10 @@ ConnectWindow::init()
_disconnect_button->set_sensitive(false);
_port_spinbutton->set_sensitive(false);
_launch_radio->set_sensitive(true);
-#ifdef MONOLITHIC_INGENUITY
- _internal_radio->set_sensitive(true);
-#else
- _internal_radio->set_sensitive(false);
-#endif
+ if (_new_engine)
+ _internal_radio->set_sensitive(true);
+ else
+ _internal_radio->set_sensitive(false);
server_toggled();
_progress_label->set_text(string("Disconnected"));
@@ -151,8 +155,8 @@ ConnectWindow::connect()
_connect_stage = 0;
if (_mode == CONNECT_REMOTE) {
- SharedPtr<ModelEngineInterface> engine(
- new OSCModelEngineInterface(_url_entry->get_text()));
+ SharedPtr<EngineInterface> engine(
+ new OSCEngineSender(_url_entry->get_text()));
OSCSigEmitter* ose = new OSCSigEmitter(1024, 16181); // FIXME: args
SharedPtr<SigClientInterface> client(ose);
@@ -172,8 +176,8 @@ ConnectWindow::connect()
const string cmd = string("ingen --port=").append(port_str);
if (Raul::Process::launch(cmd)) {
- SharedPtr<ModelEngineInterface> engine(
- new OSCModelEngineInterface(string("osc.udp://localhost:").append(port_str)));
+ SharedPtr<EngineInterface> engine(
+ new OSCEngineSender(string("osc.udp://localhost:").append(port_str)));
OSCSigEmitter* ose = new OSCSigEmitter(1024, 16181); // FIXME: args
SharedPtr<SigClientInterface> client(ose);
@@ -189,13 +193,14 @@ ConnectWindow::connect()
cerr << "Failed to launch ingen process." << endl;
}
-#ifdef MONOLITHIC_INGENUITY
} else if (_mode == INTERNAL) {
- SharedPtr<Ingen::Engine> engine(new Ingen::Engine());
- SharedPtr<Ingen::AudioDriver> audio_driver(
- new Ingen::JackAudioDriver(*engine.get()) );
- SharedPtr<QueuedModelEngineInterface> engine_interface(
- new QueuedModelEngineInterface(engine) );
+ assert(_new_engine);
+ SharedPtr<Ingen::Engine> engine(_new_engine());
+ engine->start_jack_driver();
+
+ assert(_new_queued_engine_interface);
+ SharedPtr<Ingen::QueuedEngineInterface> engine_interface(_new_queued_engine_interface(*engine.get()));
+
ThreadedSigClientInterface* tsci = new ThreadedSigClientInterface(Ingen::event_queue_size);
SharedPtr<SigClientInterface> client(tsci);
@@ -203,7 +208,9 @@ ConnectWindow::connect()
engine_interface->set_responder(SharedPtr<Ingen::Responder>(new Ingen::DirectResponder(client, 1)));
- engine->activate(audio_driver, engine_interface);
+ engine->set_event_source(engine_interface);
+
+ engine->activate();
Glib::signal_timeout().connect(
sigc::mem_fun(engine.get(), &Ingen::Engine::main_iteration), 1000);
@@ -213,7 +220,6 @@ ConnectWindow::connect()
Glib::signal_timeout().connect(
sigc::mem_fun(tsci, &ThreadedSigClientInterface::emit_signals), 2, G_PRIORITY_HIGH_IDLE);
-#endif
}
}
diff --git a/src/progs/ingenuity/ConnectWindow.h b/src/progs/ingenuity/ConnectWindow.h
index 7e137066..fb1a012f 100644
--- a/src/progs/ingenuity/ConnectWindow.h
+++ b/src/progs/ingenuity/ConnectWindow.h
@@ -21,10 +21,12 @@
#include <gtkmm.h>
#include <libglademm/xml.h>
#include <libglademm.h>
-#include "raul/SharedPtr.h"
-#include "ThreadedSigClientInterface.h"
+#include <raul/SharedPtr.h>
+#include "client/ThreadedSigClientInterface.h"
using Ingen::Client::SigClientInterface;
+namespace Ingen { class Engine; class QueuedEngineInterface; }
+
namespace Ingenuity {
class App;
@@ -66,6 +68,10 @@ private:
int _connect_stage;
+ SharedPtr<Glib::Module> _engine_module;
+ Ingen::Engine* (*_new_engine)();
+ Ingen::QueuedEngineInterface* (*_new_queued_engine_interface)(Ingen::Engine&);
+
Gtk::Image* _icon;
Gtk::ProgressBar* _progress_bar;
Gtk::Label* _progress_label;
diff --git a/src/progs/ingenuity/Connection.h b/src/progs/ingenuity/Connection.h
index 7e0f3cc5..d7b3a9cc 100644
--- a/src/progs/ingenuity/Connection.h
+++ b/src/progs/ingenuity/Connection.h
@@ -21,8 +21,8 @@
#include <cassert>
#include <string>
#include <flowcanvas/Connection.h>
-#include "ConnectionModel.h"
-#include "raul/SharedPtr.h"
+#include <raul/SharedPtr.h>
+#include "client/ConnectionModel.h"
using Ingen::Client::ConnectionModel;
namespace Ingenuity {
diff --git a/src/progs/ingenuity/ControlGroups.cpp b/src/progs/ingenuity/ControlGroups.cpp
index f775709a..2cdbf0a3 100644
--- a/src/progs/ingenuity/ControlGroups.cpp
+++ b/src/progs/ingenuity/ControlGroups.cpp
@@ -17,12 +17,12 @@
#include <cmath>
#include <iostream>
-#include "ModelEngineInterface.h"
+#include "interface/EngineInterface.h"
+#include "client/PluginModel.h"
+#include "client/NodeModel.h"
+#include "client/PortModel.h"
#include "ControlGroups.h"
#include "ControlPanel.h"
-#include "PluginModel.h"
-#include "NodeModel.h"
-#include "PortModel.h"
#include "PortPropertiesWindow.h"
#include "GladeFactory.h"
#include "App.h"
diff --git a/src/progs/ingenuity/ControlGroups.h b/src/progs/ingenuity/ControlGroups.h
index 020b7bf7..70b8bb72 100644
--- a/src/progs/ingenuity/ControlGroups.h
+++ b/src/progs/ingenuity/ControlGroups.h
@@ -22,8 +22,8 @@
#include <gtkmm.h>
#include <libglademm/xml.h>
#include <libglademm.h>
-#include "PortModel.h"
-#include "raul/SharedPtr.h"
+#include "client/PortModel.h"
+#include <raul/SharedPtr.h>
namespace Ingen { namespace Client { class PortModel; } }
using namespace Ingen::Client;
diff --git a/src/progs/ingenuity/ControlPanel.cpp b/src/progs/ingenuity/ControlPanel.cpp
index fa28f0b2..7e153ba5 100644
--- a/src/progs/ingenuity/ControlPanel.cpp
+++ b/src/progs/ingenuity/ControlPanel.cpp
@@ -15,13 +15,13 @@
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "interface/EngineInterface.h"
+#include "client/PatchModel.h"
+#include "client/NodeModel.h"
+#include "client/PortModel.h"
+#include "client/PluginModel.h"
#include "App.h"
-#include "ModelEngineInterface.h"
#include "ControlPanel.h"
-#include "PatchModel.h"
-#include "NodeModel.h"
-#include "PortModel.h"
-#include "PluginModel.h"
#include "ControlGroups.h"
#include "GladeFactory.h"
diff --git a/src/progs/ingenuity/ControlPanel.h b/src/progs/ingenuity/ControlPanel.h
index 309d2e50..f7da37ad 100644
--- a/src/progs/ingenuity/ControlPanel.h
+++ b/src/progs/ingenuity/ControlPanel.h
@@ -18,16 +18,17 @@
#ifndef CONTROLPANEL_H
#define CONTROLPANEL_H
-#include <gtkmm.h>
-#include <sigc++/sigc++.h>
-#include <libglademm/xml.h>
-#include <libglademm.h>
#include <vector>
#include <string>
#include <iostream>
#include <utility> // for pair<>
+#include <sigc++/sigc++.h>
+#include <gtkmm.h>
+#include <libglademm/xml.h>
+#include <libglademm.h>
+#include <raul/Path.h>
#include "ControlGroups.h"
-#include "raul/Path.h"
+
using std::vector; using std::string; using std::pair;
using std::cerr; using std::cout; using std::endl;
diff --git a/src/progs/ingenuity/DSSIController.cpp b/src/progs/ingenuity/DSSIController.cpp
index 811d6f1a..01ef96c4 100644
--- a/src/progs/ingenuity/DSSIController.cpp
+++ b/src/progs/ingenuity/DSSIController.cpp
@@ -21,10 +21,10 @@
#include <dirent.h>
#include <unistd.h>
#include <sys/stat.h>
+#include "interface/EngineInterface.h"
+#include "client/NodeModel.h"
#include "App.h"
-#include "NodeModel.h"
#include "DSSIModule.h"
-#include "ModelEngineInterface.h"
namespace Ingenuity {
diff --git a/src/progs/ingenuity/DSSIController.h b/src/progs/ingenuity/DSSIController.h
index 78ae3a35..3d5922c9 100644
--- a/src/progs/ingenuity/DSSIController.h
+++ b/src/progs/ingenuity/DSSIController.h
@@ -20,8 +20,8 @@
#include <string>
#include <gtkmm.h>
-#include "raul/Path.h"
-#include "NodeModel.h"
+#include <raul/Path.h>
+#include "client/NodeModel.h"
using std::string;
using namespace Ingen::Client;
diff --git a/src/progs/ingenuity/LoadPatchWindow.cpp b/src/progs/ingenuity/LoadPatchWindow.cpp
index cc7ff7bd..70d5c409 100644
--- a/src/progs/ingenuity/LoadPatchWindow.cpp
+++ b/src/progs/ingenuity/LoadPatchWindow.cpp
@@ -19,10 +19,10 @@
#include <sys/types.h>
#include <dirent.h>
#include <boost/optional/optional.hpp>
+#include "interface/EngineInterface.h"
+#include "client/PatchModel.h"
#include "App.h"
#include "Configuration.h"
-#include "PatchModel.h"
-#include "ModelEngineInterface.h"
#include "ThreadedLoader.h"
using namespace Ingen::Serialisation;
diff --git a/src/progs/ingenuity/LoadPatchWindow.h b/src/progs/ingenuity/LoadPatchWindow.h
index 3ac3d137..7f17cef7 100644
--- a/src/progs/ingenuity/LoadPatchWindow.h
+++ b/src/progs/ingenuity/LoadPatchWindow.h
@@ -18,12 +18,11 @@
#ifndef LOADPATCHWINDOW_H
#define LOADPATCHWINDOW_H
-#include "PluginModel.h"
-
#include <libglademm/xml.h>
#include <gtkmm.h>
-#include "raul/SharedPtr.h"
-#include "PatchModel.h"
+#include <raul/SharedPtr.h>
+#include "client/PluginModel.h"
+#include "client/PatchModel.h"
using Ingen::Client::PatchModel;
using Ingen::Client::MetadataMap;
diff --git a/src/progs/ingenuity/LoadPluginWindow.cpp b/src/progs/ingenuity/LoadPluginWindow.cpp
index d0311446..5d314db2 100644
--- a/src/progs/ingenuity/LoadPluginWindow.cpp
+++ b/src/progs/ingenuity/LoadPluginWindow.cpp
@@ -15,17 +15,17 @@
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "LoadPluginWindow.h"
#include <iostream>
#include <cassert>
#include <algorithm>
#include <cctype>
-#include "NodeModel.h"
+#include "interface/EngineInterface.h"
+#include "client/NodeModel.h"
+#include "client/PatchModel.h"
+#include "client/Store.h"
#include "App.h"
+#include "LoadPluginWindow.h"
#include "PatchWindow.h"
-#include "PatchModel.h"
-#include "Store.h"
-#include "ModelEngineInterface.h"
#include "PatchView.h"
#include "PatchCanvas.h"
using std::cout; using std::cerr; using std::endl;
@@ -341,7 +341,9 @@ LoadPluginWindow::add_clicked()
dialog.run();
} else {
Path path = _patch->path().base() + Path::nameify(name);
- App::instance().engine()->create_node_with_data(plugin->uri(), path, polyphonic, _initial_data);
+ App::instance().engine()->create_node(plugin->uri(), path, polyphonic);
+ for (MetadataMap::const_iterator i = _initial_data.begin(); i != _initial_data.end(); ++i)
+ App::instance().engine()->set_metadata(path, i->first, i->second);
++_plugin_name_offset;
_node_name_entry->set_text(generate_module_name(_plugin_name_offset));
diff --git a/src/progs/ingenuity/LoadPluginWindow.h b/src/progs/ingenuity/LoadPluginWindow.h
index 39329f0e..7bfb63e1 100644
--- a/src/progs/ingenuity/LoadPluginWindow.h
+++ b/src/progs/ingenuity/LoadPluginWindow.h
@@ -19,13 +19,13 @@
#ifndef LOADPLUGINWINDOW_H
#define LOADPLUGINWINDOW_H
-#include "PluginModel.h"
#include <map>
#include <libglademm/xml.h>
#include <libglademm.h>
#include <gtkmm.h>
-#include "raul/SharedPtr.h"
-#include "PatchModel.h"
+#include <raul/SharedPtr.h>
+#include "client/PatchModel.h"
+#include "client/PluginModel.h"
using Ingen::Client::PluginModel;
using Ingen::Client::PatchModel;
using Ingen::Client::MetadataMap;
diff --git a/src/progs/ingenuity/LoadRemotePatchWindow.cpp b/src/progs/ingenuity/LoadRemotePatchWindow.cpp
index d1aa0db3..f42c0849 100644
--- a/src/progs/ingenuity/LoadRemotePatchWindow.cpp
+++ b/src/progs/ingenuity/LoadRemotePatchWindow.cpp
@@ -19,11 +19,11 @@
#include <sys/types.h>
#include <dirent.h>
#include <boost/optional/optional.hpp>
-#include "raul/RDFQuery.h"
+#include <raul/RDFQuery.h>
+#include "interface/EngineInterface.h"
+#include "client/PatchModel.h"
#include "App.h"
#include "Configuration.h"
-#include "PatchModel.h"
-#include "ModelEngineInterface.h"
#include "ThreadedLoader.h"
using boost::optional;
diff --git a/src/progs/ingenuity/LoadRemotePatchWindow.h b/src/progs/ingenuity/LoadRemotePatchWindow.h
index 5c399888..5a9de63a 100644
--- a/src/progs/ingenuity/LoadRemotePatchWindow.h
+++ b/src/progs/ingenuity/LoadRemotePatchWindow.h
@@ -18,12 +18,11 @@
#ifndef LOADREMOTEPATCHWINDOW_H
#define LOADREMOTEPATCHWINDOW_H
-#include "PluginModel.h"
-
#include <libglademm/xml.h>
#include <gtkmm.h>
-#include "raul/SharedPtr.h"
-#include "PatchModel.h"
+#include <raul/SharedPtr.h>
+#include "client/PatchModel.h"
+#include "client/PluginModel.h"
using Ingen::Client::PatchModel;
using Ingen::Client::MetadataMap;
diff --git a/src/progs/ingenuity/LoadSubpatchWindow.cpp b/src/progs/ingenuity/LoadSubpatchWindow.cpp
index 37648ca8..d1f4b953 100644
--- a/src/progs/ingenuity/LoadSubpatchWindow.cpp
+++ b/src/progs/ingenuity/LoadSubpatchWindow.cpp
@@ -15,17 +15,17 @@
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "LoadSubpatchWindow.h"
#include <sys/types.h>
#include <dirent.h>
#include <cassert>
#include <boost/optional.hpp>
+#include "interface/EngineInterface.h"
+#include "client/NodeModel.h"
+#include "client/PatchModel.h"
#include "App.h"
+#include "LoadSubpatchWindow.h"
#include "PatchView.h"
-#include "NodeModel.h"
-#include "PatchModel.h"
#include "Configuration.h"
-#include "ModelEngineInterface.h"
#include "ThreadedLoader.h"
using boost::optional;
diff --git a/src/progs/ingenuity/LoadSubpatchWindow.h b/src/progs/ingenuity/LoadSubpatchWindow.h
index 6580bce1..54693504 100644
--- a/src/progs/ingenuity/LoadSubpatchWindow.h
+++ b/src/progs/ingenuity/LoadSubpatchWindow.h
@@ -18,11 +18,11 @@
#ifndef LOADSUBPATCHWINDOW_H
#define LOADSUBPATCHWINDOW_H
-#include "PluginModel.h"
#include <libglademm/xml.h>
#include <gtkmm.h>
-#include "raul/SharedPtr.h"
-#include "PatchModel.h"
+#include <raul/SharedPtr.h>
+#include "client/PatchModel.h"
+#include "client/PluginModel.h"
using Ingen::Client::PatchModel;
using Ingen::Client::MetadataMap;
diff --git a/src/progs/ingenuity/Makefile.am b/src/progs/ingenuity/Makefile.am
index 07420b48..82d96b15 100644
--- a/src/progs/ingenuity/Makefile.am
+++ b/src/progs/ingenuity/Makefile.am
@@ -1,6 +1,6 @@
if BUILD_GTK_CLIENT
-EXTRA_DIST = ingenuity.gladep
+EXTRA_DIST = ingenuity.gladep ingenuity_dev
MAINTAINERCLEANFILES = Makefile.in
sharefilesdir = $(pkgdatadir)
@@ -12,16 +12,9 @@ dist_desktopfiles_DATA = ingenuity.desktop
globalpixmapsdir = $(datadir)/pixmaps
dist_globalpixmaps_DATA = ingen.svg
-ingenuity_CXXFLAGS = -DGTK_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -I$(top_srcdir)/src/common -I$(top_srcdir)/src/libs/client -DPKGDATADIR=\"$(pkgdatadir)\" @RAUL_CFLAGS@ @GTKMM_CFLAGS@ @LIBGLADEMM_CFLAGS@ @GNOMECANVASMM_CFLAGS@ @LOSC_CFLAGS@ @LASH_CFLAGS@ @FLOWCANVAS_CFLAGS@ @SLV2_CFLAGS@ @CURL_CFLAGS@
-ingenuity_LDADD = @RAUL_LIBS@ @GTKMM_LIBS@ @LIBGLADEMM_LIBS@ @GNOMECANVASMM_LIBS@ @LOSC_LIBS@ @LASH_LIBS@ @FLOWCANVAS_LIBS@ @SLV2_LIBS@ @CURL_LIBS@ ../../libs/client/libingenclient.la
-ingenuity_DEPENDENCIES = ../../libs/client/libingenclient.la
-
-# FIXME: make engine have a separate include dir
-if MONOLITHIC_INGENUITY
-ingenuity_CXXFLAGS += -I$(top_srcdir)/src/libs
-ingenuity_LDADD += ../../libs/engine/libingen.la
-ingenuity_DEPENDENCIES += ../../libs/engine/libingen.la
-endif
+ingenuity_CXXFLAGS = -DGTK_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -I$(top_srcdir)/src/common -I$(top_srcdir)/src/libs -DPKGDATADIR=\"$(pkgdatadir)\" @RAUL_CFLAGS@ @GTKMM_CFLAGS@ @LIBGLADEMM_CFLAGS@ @GNOMECANVASMM_CFLAGS@ @LOSC_CFLAGS@ @LASH_CFLAGS@ @FLOWCANVAS_CFLAGS@ @SLV2_CFLAGS@ @CURL_CFLAGS@ -DINGEN_MODULE_DIR=\"$(libdir)/ingen\"
+ingenuity_LDADD = @RAUL_LIBS@ @GTKMM_LIBS@ @LIBGLADEMM_LIBS@ @GNOMECANVASMM_LIBS@ @LOSC_LIBS@ @LASH_LIBS@ @FLOWCANVAS_LIBS@ @SLV2_LIBS@ @CURL_LIBS@ ../../libs/client/libingen_client.la ../../libs/module/libingen_module.la
+ingenuity_DEPENDENCIES = ../../libs/client/libingen_client.la ../../libs/module/libingen_module.la
bin_PROGRAMS = ingenuity
ingenuity_SOURCES = \
diff --git a/src/progs/ingenuity/NewSubpatchWindow.cpp b/src/progs/ingenuity/NewSubpatchWindow.cpp
index b30003e7..e49340b8 100644
--- a/src/progs/ingenuity/NewSubpatchWindow.cpp
+++ b/src/progs/ingenuity/NewSubpatchWindow.cpp
@@ -16,10 +16,10 @@
*/
#include "App.h"
-#include "ModelEngineInterface.h"
+#include "interface/EngineInterface.h"
+#include "client/NodeModel.h"
+#include "client/PatchModel.h"
#include "NewSubpatchWindow.h"
-#include "NodeModel.h"
-#include "PatchModel.h"
#include "PatchView.h"
namespace Ingenuity {
@@ -89,7 +89,10 @@ NewSubpatchWindow::ok_clicked()
const Path path = _patch->path().base() + Path::nameify(_name_entry->get_text());
const size_t poly = _poly_spinbutton->get_value_as_int();
- App::instance().engine()->create_patch_with_data(path, poly, _initial_data);
+ App::instance().engine()->create_patch(path, poly);
+ for (MetadataMap::const_iterator i = _initial_data.begin(); i != _initial_data.end(); ++i)
+ App::instance().engine()->set_metadata(path, i->first, i->second);
+
App::instance().engine()->enable_patch(path);
hide();
diff --git a/src/progs/ingenuity/NewSubpatchWindow.h b/src/progs/ingenuity/NewSubpatchWindow.h
index 554005fa..28730137 100644
--- a/src/progs/ingenuity/NewSubpatchWindow.h
+++ b/src/progs/ingenuity/NewSubpatchWindow.h
@@ -18,11 +18,11 @@
#ifndef NEWSUBPATCHWINDOW_H
#define NEWSUBPATCHWINDOW_H
-#include "PluginModel.h"
#include <libglademm/xml.h>
#include <gtkmm.h>
-#include "raul/SharedPtr.h"
-#include "PatchModel.h"
+#include <raul/SharedPtr.h>
+#include "client/PatchModel.h"
+#include "client/PluginModel.h"
using Ingen::Client::PatchModel;
using Ingen::Client::MetadataMap;
diff --git a/src/progs/ingenuity/NodeControlWindow.cpp b/src/progs/ingenuity/NodeControlWindow.cpp
index 49578c1d..8d324a65 100644
--- a/src/progs/ingenuity/NodeControlWindow.cpp
+++ b/src/progs/ingenuity/NodeControlWindow.cpp
@@ -15,17 +15,18 @@
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include <iostream>
+#include <cmath>
+#include "interface/EngineInterface.h"
+#include "client/NodeModel.h"
#include "App.h"
-#include "ModelEngineInterface.h"
#include "NodeControlWindow.h"
#include "GladeFactory.h"
-#include "NodeModel.h"
#include "ControlGroups.h"
#include "ControlPanel.h"
#include "PatchWindow.h"
-#include <iostream>
-#include <cmath>
-using std::cerr; using std::cout; using std::endl;
+
+using namespace std;
namespace Ingenuity {
diff --git a/src/progs/ingenuity/NodeControlWindow.h b/src/progs/ingenuity/NodeControlWindow.h
index ab3e7e85..62ab497d 100644
--- a/src/progs/ingenuity/NodeControlWindow.h
+++ b/src/progs/ingenuity/NodeControlWindow.h
@@ -23,7 +23,7 @@
#include <gtkmm.h>
#include <libglademm.h>
#include <sigc++/sigc++.h>
-#include "raul/SharedPtr.h"
+#include <raul/SharedPtr.h>
using std::string; using std::vector;
namespace Ingen { namespace Client {
diff --git a/src/progs/ingenuity/NodeMenu.cpp b/src/progs/ingenuity/NodeMenu.cpp
index d8a64184..a0efe441 100644
--- a/src/progs/ingenuity/NodeMenu.cpp
+++ b/src/progs/ingenuity/NodeMenu.cpp
@@ -17,10 +17,10 @@
#include <iostream>
#include <gtkmm.h>
-#include "NodeMenu.h"
-#include "NodeModel.h"
+#include "interface/EngineInterface.h"
+#include "client/NodeModel.h"
#include "App.h"
-#include "ModelEngineInterface.h"
+#include "NodeMenu.h"
#include "WindowFactory.h"
using std::cerr; using std::endl;
diff --git a/src/progs/ingenuity/NodeMenu.h b/src/progs/ingenuity/NodeMenu.h
index 23e7c890..d6f598ad 100644
--- a/src/progs/ingenuity/NodeMenu.h
+++ b/src/progs/ingenuity/NodeMenu.h
@@ -20,9 +20,9 @@
#include <string>
#include <gtkmm.h>
-#include "raul/Path.h"
-#include "raul/SharedPtr.h"
-#include "NodeModel.h"
+#include <raul/Path.h>
+#include <raul/SharedPtr.h>
+#include "client/NodeModel.h"
using Ingen::Client::NodeModel;
using std::string;
diff --git a/src/progs/ingenuity/NodeModule.cpp b/src/progs/ingenuity/NodeModule.cpp
index c927114d..dd03fde8 100644
--- a/src/progs/ingenuity/NodeModule.cpp
+++ b/src/progs/ingenuity/NodeModule.cpp
@@ -15,14 +15,14 @@
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "NodeModule.h"
#include <cassert>
-#include "raul/Atom.h"
+#include <raul/Atom.h>
+#include "interface/EngineInterface.h"
+#include "client/PatchModel.h"
+#include "client/NodeModel.h"
#include "App.h"
-#include "ModelEngineInterface.h"
+#include "NodeModule.h"
#include "PatchCanvas.h"
-#include "PatchModel.h"
-#include "NodeModel.h"
#include "Port.h"
#include "GladeFactory.h"
#include "RenameWindow.h"
diff --git a/src/progs/ingenuity/NodeModule.h b/src/progs/ingenuity/NodeModule.h
index 77829e93..d87bcfcc 100644
--- a/src/progs/ingenuity/NodeModule.h
+++ b/src/progs/ingenuity/NodeModule.h
@@ -20,7 +20,7 @@
#include <string>
#include <libgnomecanvasmm.h>
#include <flowcanvas/Module.h>
-#include "raul/SharedPtr.h"
+#include <raul/SharedPtr.h>
#include "Port.h"
#include "NodeMenu.h"
using std::string;
diff --git a/src/progs/ingenuity/NodePropertiesWindow.cpp b/src/progs/ingenuity/NodePropertiesWindow.cpp
index 87e09c99..428119a3 100644
--- a/src/progs/ingenuity/NodePropertiesWindow.cpp
+++ b/src/progs/ingenuity/NodePropertiesWindow.cpp
@@ -15,11 +15,11 @@
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "NodePropertiesWindow.h"
#include <cassert>
#include <string>
-#include "NodeModel.h"
-#include "PluginModel.h"
+#include "client/NodeModel.h"
+#include "client/PluginModel.h"
+#include "NodePropertiesWindow.h"
namespace Ingenuity {
using std::string;
diff --git a/src/progs/ingenuity/NodePropertiesWindow.h b/src/progs/ingenuity/NodePropertiesWindow.h
index b6d90062..eae9bfdc 100644
--- a/src/progs/ingenuity/NodePropertiesWindow.h
+++ b/src/progs/ingenuity/NodePropertiesWindow.h
@@ -20,8 +20,8 @@
#include <gtkmm.h>
#include <libglademm.h>
-#include "raul/SharedPtr.h"
-#include "NodeModel.h"
+#include <raul/SharedPtr.h>
+#include "client/NodeModel.h"
using namespace Ingen::Client;
namespace Ingenuity {
diff --git a/src/progs/ingenuity/PatchCanvas.cpp b/src/progs/ingenuity/PatchCanvas.cpp
index 38fd0d87..e6397a3d 100644
--- a/src/progs/ingenuity/PatchCanvas.cpp
+++ b/src/progs/ingenuity/PatchCanvas.cpp
@@ -15,12 +15,16 @@
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "PatchCanvas.h"
#include <cassert>
#include <flowcanvas/FlowCanvas.h>
+#include "interface/EngineInterface.h"
+#include "client/PluginModel.h"
+#include "client/PatchModel.h"
+#include "client/NodeModel.h"
+#include "client/Store.h"
+#include "client/Serializer.h"
#include "App.h"
-#include "ModelEngineInterface.h"
-#include "PatchModel.h"
+#include "PatchCanvas.h"
#include "PatchWindow.h"
#include "PatchPortModule.h"
#include "LoadPluginWindow.h"
@@ -28,14 +32,10 @@
#include "NewSubpatchWindow.h"
#include "Port.h"
#include "Connection.h"
-#include "NodeModel.h"
#include "NodeModule.h"
#include "SubpatchModule.h"
#include "GladeFactory.h"
#include "WindowFactory.h"
-#include "Serializer.h"
-#include "Store.h"
-#include "PluginModel.h"
#include "config.h"
using Ingen::Client::Store;
using Ingen::Client::Serializer;
@@ -456,7 +456,10 @@ void
PatchCanvas::menu_add_port(const string& name, const string& type, bool is_output)
{
const Path& path = _patch->path().base() + generate_port_name(name);
- App::instance().engine()->create_port_with_data(path, type, is_output, get_initial_data());
+ App::instance().engine()->create_port(path, type, is_output);
+ MetadataMap data = get_initial_data();
+ for (MetadataMap::const_iterator i = data.begin(); i != data.end(); ++i)
+ App::instance().engine()->set_metadata(path, i->first, i->second);
}
@@ -465,7 +468,10 @@ PatchCanvas::load_plugin(SharedPtr<PluginModel> plugin)
{
const Path& path = _patch->path().base() + plugin->default_node_name(_patch);
// FIXME: polyphony?
- App::instance().engine()->create_node_with_data(plugin->uri(), path, false, get_initial_data());
+ App::instance().engine()->create_node(plugin->uri(), path, false);
+ MetadataMap data = get_initial_data();
+ for (MetadataMap::const_iterator i = data.begin(); i != data.end(); ++i)
+ App::instance().engine()->set_metadata(path, i->first, i->second);
}
diff --git a/src/progs/ingenuity/PatchCanvas.h b/src/progs/ingenuity/PatchCanvas.h
index b36bd115..297e9874 100644
--- a/src/progs/ingenuity/PatchCanvas.h
+++ b/src/progs/ingenuity/PatchCanvas.h
@@ -25,8 +25,8 @@
#include <flowcanvas/Module.h>
#include <raul/SharedPtr.h>
#include <raul/Path.h>
-#include "ConnectionModel.h"
-#include "PatchModel.h"
+#include "client/ConnectionModel.h"
+#include "client/PatchModel.h"
#include "NodeModule.h"
using std::string;
diff --git a/src/progs/ingenuity/PatchPortModule.cpp b/src/progs/ingenuity/PatchPortModule.cpp
index 048d0ee7..08e7dbbd 100644
--- a/src/progs/ingenuity/PatchPortModule.cpp
+++ b/src/progs/ingenuity/PatchPortModule.cpp
@@ -17,11 +17,11 @@
#include "PatchPortModule.h"
#include <cassert>
+#include "interface/EngineInterface.h"
+#include "client/PatchModel.h"
+#include "client/NodeModel.h"
#include "App.h"
-#include "ModelEngineInterface.h"
#include "PatchCanvas.h"
-#include "PatchModel.h"
-#include "NodeModel.h"
#include "Port.h"
#include "GladeFactory.h"
#include "RenameWindow.h"
diff --git a/src/progs/ingenuity/PatchPortModule.h b/src/progs/ingenuity/PatchPortModule.h
index 21455089..f42b7592 100644
--- a/src/progs/ingenuity/PatchPortModule.h
+++ b/src/progs/ingenuity/PatchPortModule.h
@@ -22,7 +22,7 @@
#include <boost/enable_shared_from_this.hpp>
#include <libgnomecanvasmm.h>
#include <flowcanvas/Module.h>
-#include "raul/Atom.h"
+#include <raul/Atom.h>
#include "Port.h"
using std::string;
diff --git a/src/progs/ingenuity/PatchPropertiesWindow.cpp b/src/progs/ingenuity/PatchPropertiesWindow.cpp
index 33afd1fb..17b28d34 100644
--- a/src/progs/ingenuity/PatchPropertiesWindow.cpp
+++ b/src/progs/ingenuity/PatchPropertiesWindow.cpp
@@ -15,9 +15,9 @@
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "PatchPropertiesWindow.h"
#include <string>
-#include "PatchModel.h"
+#include "client/PatchModel.h"
+#include "PatchPropertiesWindow.h"
namespace Ingenuity {
using std::string;
diff --git a/src/progs/ingenuity/PatchPropertiesWindow.h b/src/progs/ingenuity/PatchPropertiesWindow.h
index f5dc3b79..8e461381 100644
--- a/src/progs/ingenuity/PatchPropertiesWindow.h
+++ b/src/progs/ingenuity/PatchPropertiesWindow.h
@@ -21,7 +21,7 @@
#include <string>
#include <gtkmm.h>
#include <libglademm/xml.h>
-#include "raul/SharedPtr.h"
+#include <raul/SharedPtr.h>
using std::string;
namespace Ingen { namespace Client { class PatchModel; } }
diff --git a/src/progs/ingenuity/PatchTreeWindow.cpp b/src/progs/ingenuity/PatchTreeWindow.cpp
index 5f17a774..77caf6dd 100644
--- a/src/progs/ingenuity/PatchTreeWindow.cpp
+++ b/src/progs/ingenuity/PatchTreeWindow.cpp
@@ -15,16 +15,15 @@
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include <raul/Path.h>
+#include "interface/EngineInterface.h"
+#include "client/OSCEngineSender.h"
+#include "client/Store.h"
+#include "client/PatchModel.h"
#include "App.h"
-#include "ModelEngineInterface.h"
-#include "OSCEngineSender.h"
#include "PatchTreeWindow.h"
-#include "PatchWindow.h"
-#include "Store.h"
#include "SubpatchModule.h"
-#include "PatchModel.h"
#include "WindowFactory.h"
-#include "raul/Path.h"
namespace Ingenuity {
diff --git a/src/progs/ingenuity/PatchTreeWindow.h b/src/progs/ingenuity/PatchTreeWindow.h
index 00dcf25c..c7fc3c10 100644
--- a/src/progs/ingenuity/PatchTreeWindow.h
+++ b/src/progs/ingenuity/PatchTreeWindow.h
@@ -20,7 +20,7 @@
#include <gtkmm.h>
#include <libglademm.h>
-#include "raul/Path.h"
+#include <raul/Path.h>
namespace Ingen { namespace Client {
class Store;
diff --git a/src/progs/ingenuity/PatchView.cpp b/src/progs/ingenuity/PatchView.cpp
index aafe798a..076eaa40 100644
--- a/src/progs/ingenuity/PatchView.cpp
+++ b/src/progs/ingenuity/PatchView.cpp
@@ -15,15 +15,15 @@
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "PatchView.h"
#include <iostream>
#include <cassert>
#include <fstream>
+#include "interface/EngineInterface.h"
+#include "client/PatchModel.h"
#include "App.h"
-#include "ModelEngineInterface.h"
+#include "PatchView.h"
#include "PatchCanvas.h"
#include "LoadPluginWindow.h"
-#include "PatchModel.h"
#include "NewSubpatchWindow.h"
#include "LoadSubpatchWindow.h"
#include "NodeControlWindow.h"
diff --git a/src/progs/ingenuity/PatchView.h b/src/progs/ingenuity/PatchView.h
index 3ea52932..95683251 100644
--- a/src/progs/ingenuity/PatchView.h
+++ b/src/progs/ingenuity/PatchView.h
@@ -22,8 +22,8 @@
#include <gtkmm.h>
#include <libglademm/xml.h>
#include <libglademm.h>
-#include "raul/SharedPtr.h"
-#include "PatchModel.h"
+#include <raul/SharedPtr.h>
+#include "client/PatchModel.h"
using std::string;
diff --git a/src/progs/ingenuity/PatchWindow.cpp b/src/progs/ingenuity/PatchWindow.cpp
index 606674bb..2e764ff0 100644
--- a/src/progs/ingenuity/PatchWindow.cpp
+++ b/src/progs/ingenuity/PatchWindow.cpp
@@ -19,11 +19,12 @@
#include <iostream>
#include <cassert>
#include <fstream>
+#include "interface/EngineInterface.h"
+#include "client/PatchModel.h"
+#include "client/Store.h"
#include "App.h"
-#include "ModelEngineInterface.h"
#include "PatchCanvas.h"
#include "LoadPluginWindow.h"
-#include "PatchModel.h"
#include "NewSubpatchWindow.h"
#include "LoadPatchWindow.h"
#include "LoadSubpatchWindow.h"
@@ -33,7 +34,6 @@
#include "MessagesWindow.h"
#include "PatchTreeWindow.h"
#include "BreadCrumbBox.h"
-#include "Store.h"
#include "ConnectWindow.h"
#include "ThreadedLoader.h"
#include "WindowFactory.h"
diff --git a/src/progs/ingenuity/PatchWindow.h b/src/progs/ingenuity/PatchWindow.h
index a5ce150d..f4399a20 100644
--- a/src/progs/ingenuity/PatchWindow.h
+++ b/src/progs/ingenuity/PatchWindow.h
@@ -23,9 +23,9 @@
#include <gtkmm.h>
#include <libglademm/xml.h>
#include <libglademm.h>
-#include "raul/Path.h"
-#include "raul/SharedPtr.h"
-#include "PatchModel.h"
+#include <raul/Path.h>
+#include <raul/SharedPtr.h>
+#include "client/PatchModel.h"
#include "PatchView.h"
using Ingen::Client::PatchModel;
diff --git a/src/progs/ingenuity/Port.cpp b/src/progs/ingenuity/Port.cpp
index 4c27c3b1..b13ccda9 100644
--- a/src/progs/ingenuity/Port.cpp
+++ b/src/progs/ingenuity/Port.cpp
@@ -15,15 +15,15 @@
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "Port.h"
#include <cassert>
#include <iostream>
-#include "PatchModel.h"
-#include "PortModel.h"
-#include "ControlModel.h"
+#include "interface/EngineInterface.h"
+#include "client/PatchModel.h"
+#include "client/PortModel.h"
+#include "client/ControlModel.h"
#include "Configuration.h"
-#include "ModelEngineInterface.h"
#include "App.h"
+#include "Port.h"
using std::cerr; using std::endl;
using namespace Ingen::Client;
diff --git a/src/progs/ingenuity/Port.h b/src/progs/ingenuity/Port.h
index 78950040..b006ba45 100644
--- a/src/progs/ingenuity/Port.h
+++ b/src/progs/ingenuity/Port.h
@@ -21,7 +21,7 @@
#include <cassert>
#include <string>
#include <flowcanvas/Port.h>
-#include "raul/SharedPtr.h"
+#include <raul/SharedPtr.h>
namespace Ingen { namespace Client { class PortModel; } }
using Ingen::Client::PortModel;
diff --git a/src/progs/ingenuity/PortPropertiesWindow.cpp b/src/progs/ingenuity/PortPropertiesWindow.cpp
index 3a490a74..eb23c542 100644
--- a/src/progs/ingenuity/PortPropertiesWindow.cpp
+++ b/src/progs/ingenuity/PortPropertiesWindow.cpp
@@ -15,14 +15,14 @@
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "PortPropertiesWindow.h"
#include <cassert>
#include <string>
-#include "NodeModel.h"
-#include "PluginModel.h"
-#include "ModelEngineInterface.h"
-#include "ControlGroups.h"
+#include "interface/EngineInterface.h"
+#include "client/NodeModel.h"
+#include "client/PluginModel.h"
#include "App.h"
+#include "ControlGroups.h"
+#include "PortPropertiesWindow.h"
using std::string;
diff --git a/src/progs/ingenuity/PortPropertiesWindow.h b/src/progs/ingenuity/PortPropertiesWindow.h
index cd22cb09..adb0a2f0 100644
--- a/src/progs/ingenuity/PortPropertiesWindow.h
+++ b/src/progs/ingenuity/PortPropertiesWindow.h
@@ -20,8 +20,8 @@
#include <gtkmm.h>
#include <libglademm.h>
-#include "raul/SharedPtr.h"
-#include "PortModel.h"
+#include <raul/SharedPtr.h>
+#include "client/PortModel.h"
using namespace Ingen::Client;
namespace Ingenuity {
diff --git a/src/progs/ingenuity/RenameWindow.cpp b/src/progs/ingenuity/RenameWindow.cpp
index c2dca012..28a8ddfe 100644
--- a/src/progs/ingenuity/RenameWindow.cpp
+++ b/src/progs/ingenuity/RenameWindow.cpp
@@ -15,13 +15,14 @@
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "RenameWindow.h"
#include <cassert>
#include <string>
-#include "ObjectModel.h"
-#include "Store.h"
+#include "interface/EngineInterface.h"
+#include "client/ObjectModel.h"
+#include "client/Store.h"
#include "App.h"
-#include "ModelEngineInterface.h"
+#include "RenameWindow.h"
+
using std::string;
namespace Ingenuity {
diff --git a/src/progs/ingenuity/RenameWindow.h b/src/progs/ingenuity/RenameWindow.h
index 11adbff8..04f765d4 100644
--- a/src/progs/ingenuity/RenameWindow.h
+++ b/src/progs/ingenuity/RenameWindow.h
@@ -20,8 +20,8 @@
#include <gtkmm.h>
#include <libglademm.h>
-#include "raul/SharedPtr.h"
-#include "ObjectModel.h"
+#include <raul/SharedPtr.h>
+#include "client/ObjectModel.h"
using Ingen::Client::ObjectModel;
namespace Ingenuity {
diff --git a/src/progs/ingenuity/SubpatchModule.cpp b/src/progs/ingenuity/SubpatchModule.cpp
index ec4d7fd9..53958375 100644
--- a/src/progs/ingenuity/SubpatchModule.cpp
+++ b/src/progs/ingenuity/SubpatchModule.cpp
@@ -18,11 +18,11 @@
#include "SubpatchModule.h"
#include <cassert>
#include <iostream>
+#include "interface/EngineInterface.h"
+#include "client/PatchModel.h"
#include "App.h"
-#include "ModelEngineInterface.h"
#include "NodeModule.h"
#include "NodeControlWindow.h"
-#include "PatchModel.h"
#include "PatchWindow.h"
#include "PatchCanvas.h"
#include "Port.h"
diff --git a/src/progs/ingenuity/SubpatchModule.h b/src/progs/ingenuity/SubpatchModule.h
index 4bf33431..36e9a2d3 100644
--- a/src/progs/ingenuity/SubpatchModule.h
+++ b/src/progs/ingenuity/SubpatchModule.h
@@ -21,10 +21,10 @@
#include <string>
#include <libgnomecanvasmm.h>
-#include "NodeModule.h"
-#include "raul/SharedPtr.h"
-#include "PatchModel.h"
+#include <raul/SharedPtr.h>
+#include "client/PatchModel.h"
#include "PatchPortModule.h"
+#include "NodeModule.h"
using std::string; using std::list;
namespace Ingen { namespace Client {
diff --git a/src/progs/ingenuity/ThreadedLoader.cpp b/src/progs/ingenuity/ThreadedLoader.cpp
index bf195dce..43bc76c8 100644
--- a/src/progs/ingenuity/ThreadedLoader.cpp
+++ b/src/progs/ingenuity/ThreadedLoader.cpp
@@ -15,24 +15,38 @@
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "ThreadedLoader.h"
#include <fstream>
#include <cassert>
#include <string>
-#include "PatchModel.h"
+#include "client/PatchModel.h"
+#include "module/Module.h"
#include "App.h"
+#include "ThreadedLoader.h"
using std::cout; using std::endl;
namespace Ingenuity {
-ThreadedLoader::ThreadedLoader(SharedPtr<ModelEngineInterface> engine)
- : _engine(engine)
+ThreadedLoader::ThreadedLoader(SharedPtr<EngineInterface> engine)
+ : _serialisation_module(Ingen::Shared::load_module("ingen_serialisation"))
+ , _engine(engine)
, _deprecated_loader(engine)
, _serializer(*App::instance().rdf_world())
{
// FIXME: rework this so the thread is only present when it's doing something (save mem)
- start();
+ if (_serialisation_module) {
+ Loader* (*new_loader)() = NULL;
+ bool found = _serialisation_module->get_symbol("new_loader", (void*&)new_loader);
+ if (found)
+ _loader = SharedPtr<Loader>(new_loader());
+ }
+
+ if (_loader) {
+ start();
+ } else {
+ cerr << "WARNING: Failed to load ingen_serialisation module, unable to load patches." << endl;;
+ cerr << "If you are running from the source tree, run ingenuity_dev." << endl;
+ }
}
@@ -78,7 +92,7 @@ ThreadedLoader::load_patch(bool merge,
false)));
} else {
_events.push_back(sigc::hide_return(sigc::bind(
- sigc::ptr_fun(&Ingen::Serialisation::load),
+ sigc::mem_fun(_loader.get(), &Ingen::Serialisation::Loader::load),
App::instance().engine(),
App::instance().rdf_world(),
data_base_uri,
diff --git a/src/progs/ingenuity/ThreadedLoader.h b/src/progs/ingenuity/ThreadedLoader.h
index bf2c2ed5..1846cece 100644
--- a/src/progs/ingenuity/ThreadedLoader.h
+++ b/src/progs/ingenuity/ThreadedLoader.h
@@ -26,16 +26,17 @@
#include <raul/Slave.h>
#include <raul/Mutex.h>
#include <raul/Condition.h>
-#include "ModelEngineInterface.h"
-#include "Serializer.h"
-#include "DeprecatedLoader.h"
-#include "Loader.h"
-#include "PatchModel.h"
+#include "interface/EngineInterface.h"
+#include "client/PatchModel.h"
+#include "client/Serializer.h"
+#include "client/DeprecatedLoader.h"
+#include "serialisation/Loader.h"
using std::string;
using std::list;
using boost::optional;
using namespace Ingen::Client;
+using namespace Ingen::Serialisation;
namespace Ingenuity {
@@ -54,7 +55,7 @@ namespace Ingenuity {
class ThreadedLoader : public Raul::Slave
{
public:
- ThreadedLoader(SharedPtr<ModelEngineInterface> engine);
+ ThreadedLoader(SharedPtr<EngineInterface> engine);
~ThreadedLoader();
// FIXME: there's a pattern here....
@@ -79,7 +80,10 @@ private:
void _whipped();
- SharedPtr<ModelEngineInterface> _engine;
+ SharedPtr<Glib::Module> _serialisation_module;
+
+ SharedPtr<EngineInterface> _engine;
+ SharedPtr<Loader> _loader;
DeprecatedLoader _deprecated_loader;
Serializer _serializer;
diff --git a/src/progs/ingenuity/UploadPatchWindow.cpp b/src/progs/ingenuity/UploadPatchWindow.cpp
index 6c68236d..400c2369 100644
--- a/src/progs/ingenuity/UploadPatchWindow.cpp
+++ b/src/progs/ingenuity/UploadPatchWindow.cpp
@@ -21,13 +21,13 @@
#include <dirent.h>
#include <boost/optional/optional.hpp>
#include <curl/curl.h>
-#include "Serializer.h"
-#include "raul/RDFQuery.h"
+#include <raul/RDFQuery.h>
+#include "interface/EngineInterface.h"
+#include "client/Serializer.h"
+#include "client/PatchModel.h"
#include "UploadPatchWindow.h"
#include "App.h"
#include "Configuration.h"
-#include "PatchModel.h"
-#include "ModelEngineInterface.h"
#include "ThreadedLoader.h"
using boost::optional;
diff --git a/src/progs/ingenuity/UploadPatchWindow.h b/src/progs/ingenuity/UploadPatchWindow.h
index ffc0f17c..36b39b07 100644
--- a/src/progs/ingenuity/UploadPatchWindow.h
+++ b/src/progs/ingenuity/UploadPatchWindow.h
@@ -22,11 +22,11 @@
#include <libglademm/xml.h>
#include <gtkmm.h>
#include <curl/curl.h>
-#include "raul/SharedPtr.h"
-#include "raul/Thread.h"
-#include "raul/AtomicInt.h"
-#include "PatchModel.h"
-#include "PluginModel.h"
+#include <raul/SharedPtr.h>
+#include <raul/Thread.h>
+#include <raul/AtomicInt.h>
+#include "client/PatchModel.h"
+#include "client/PluginModel.h"
using Ingen::Client::PatchModel;
using Ingen::Client::MetadataMap;
diff --git a/src/progs/ingenuity/WindowFactory.h b/src/progs/ingenuity/WindowFactory.h
index 9c6cfa0a..085ff9b6 100644
--- a/src/progs/ingenuity/WindowFactory.h
+++ b/src/progs/ingenuity/WindowFactory.h
@@ -20,9 +20,10 @@
#include <map>
#include <gtkmm.h>
-#include "raul/SharedPtr.h"
+#include <raul/SharedPtr.h>
+#include "client/PatchModel.h"
#include "PatchView.h"
-#include "PatchModel.h"
+
using Ingen::Client::PatchModel;
namespace Ingenuity {
diff --git a/src/progs/ingenuity/ingenuity_dev b/src/progs/ingenuity/ingenuity_dev
new file mode 100755
index 00000000..b77d2fe6
--- /dev/null
+++ b/src/progs/ingenuity/ingenuity_dev
@@ -0,0 +1,3 @@
+#!/usr/bin/env sh
+
+INGEN_MODULE_PATH=../../libs/engine/.libs:../../libs/serialisation/.libs ./ingenuity
diff --git a/src/progs/patch_loader/Makefile.am b/src/progs/patch_loader/Makefile.am
index 9913411a..f16cc495 100644
--- a/src/progs/patch_loader/Makefile.am
+++ b/src/progs/patch_loader/Makefile.am
@@ -1,11 +1,11 @@
EXTRA_DIST = README
-ingen_load_CXXFLAGS = -I$(top_srcdir)/src/libs/client -I$(top_srcdir)/src/common @LSIGCPP_CFLAGS@ @RAUL_CFLAGS@ @GLIBMM_CFLAGS@ @RASQAL_CFLAGS@
-ingen_load_LDADD = ../../libs/client/libingenclient.la @RAUL_LIBS@ @LSIGCPP_LIBS@ @GLIBMM_LIBS@ @RASQAL_LIBS@
+ingen_load_CXXFLAGS = -I$(top_srcdir)/src/libs -I$(top_srcdir)/src/common @LSIGCPP_CFLAGS@ @RAUL_CFLAGS@ @GLIBMM_CFLAGS@ @RASQAL_CFLAGS@ -DINGEN_MODULE_DIR=\"$(libdir)/ingen\"
+ingen_load_LDADD = ../../libs/client/libingen_client.la ../../libs/module/libingen_module.la @RAUL_LIBS@ @LSIGCPP_LIBS@ @GLIBMM_LIBS@ @RASQAL_LIBS@
bin_PROGRAMS = ingen_load
-#ingen_load_DEPENDENCIES = ../../libs/client/libingenclient.la
+#ingen_load_DEPENDENCIES = ../../libs/client/libingen_client.la
ingen_load_SOURCES = \
patch_loader.cpp \
diff --git a/src/progs/patch_loader/new_patch_loader.cpp b/src/progs/patch_loader/new_patch_loader.cpp
index 6c879f43..cee48827 100644
--- a/src/progs/patch_loader/new_patch_loader.cpp
+++ b/src/progs/patch_loader/new_patch_loader.cpp
@@ -17,8 +17,8 @@
#include <iostream>
#include <unistd.h>
+#include <raul/Path.h>
#include "cmdline.h" // generated by gengetopt
-#include "raul/Path.h"
#include "OSCEngineInterface.h"
#include "PatchLibrarian.h"
diff --git a/src/progs/patch_loader/patch_loader.cpp b/src/progs/patch_loader/patch_loader.cpp
index cc3c1903..57bba0e0 100644
--- a/src/progs/patch_loader/patch_loader.cpp
+++ b/src/progs/patch_loader/patch_loader.cpp
@@ -17,16 +17,20 @@
#include <iostream>
#include <unistd.h>
+#include <glibmm/module.h>
#include <raul/Path.h>
#include <raul/RDFWorld.h>
-#include "OSCModelEngineInterface.h"
-#include "Loader.h"
-#include "PatchModel.h"
+#include "client/OSCEngineSender.h"
+#include "client/PatchModel.h"
+#include "module/Module.h"
+#include "serialisation/serialisation.h"
+#include "serialisation/Loader.h"
#include "cmdline.h" // generated by gengetopt
-using std::cout; using std::endl;
-
+using namespace std;
using namespace Ingen::Client;
+using namespace Ingen::Serialisation;
+
int main(int argc, char** argv)
{
@@ -60,7 +64,7 @@ int main(int argc, char** argv)
rdf_world.add_prefix("rdfs", "http://www.w3.org/2000/01/rdf-schema#");
rdf_world.add_prefix("doap", "http://usefulinc.com/ns/doap#");
- SharedPtr<OSCModelEngineInterface> engine(new OSCModelEngineInterface(engine_url));
+ SharedPtr<OSCEngineSender> engine(new OSCEngineSender(engine_url));
/* Connect to engine */
engine->attach(-1, client_port);
@@ -76,11 +80,29 @@ int main(int argc, char** argv)
* engine->wait_for_response();
*/
+ SharedPtr<Glib::Module> module = Ingen::Shared::load_module("ingen_serialisation");
+
+ if (!module) {
+ cerr << "Unable to load ingen_serialisation module, exiting." << endl;
+ return -1;
+ }
+
+ Loader* (*new_loader)() = NULL;
+
+ bool found = module->get_symbol("new_loader", (void*&)new_loader);
+
+ if (!found) {
+ cerr << "Unable to find module entry point, exiting." << endl;
+ return -1;
+ }
+
+ SharedPtr<Loader> loader(new_loader());
+
// Load patches
for (uint i=0; i < args_info.inputs_num; ++i) {
cerr << "FIXME: load patch under root" << endl;
cerr << "Load " << args_info.inputs[i] << endl;
- Ingen::Serialisation::load(engine, &rdf_world,
+ loader->load(engine, &rdf_world,
string("file:") + args_info.inputs[i], Path("/"), "");
}
diff --git a/src/progs/server/Makefile.am b/src/progs/server/Makefile.am
index 7584ee87..ab384494 100644
--- a/src/progs/server/Makefile.am
+++ b/src/progs/server/Makefile.am
@@ -1,6 +1,7 @@
-AM_CXXFLAGS = @RAUL_CFLAGS@ @SLV2_CFLAGS@ @JACK_CFLAGS@ @LOSC_CFLAGS@ @ALSA_CFLAGS@ @LASH_CFLAGS@ -I$(top_srcdir)/src/common -I$(top_srcdir)/src/libs/engine -I$(top_srcdir)/src/libs/engine/events
+AM_CXXFLAGS = @RAUL_CFLAGS@ @JACK_CFLAGS@ @LOSC_CFLAGS@ @ALSA_CFLAGS@ @LASH_CFLAGS@ @SLV2_CFLAGS@ -I$(top_srcdir)/src/common -I$(top_srcdir)/src/libs -DINGEN_MODULE_DIR=\"$(libdir)/ingen\"
MAINTAINERCLEANFILES = Makefile.in
+EXTRA_DIST = ingen_dev
#
# Stand-alone engine
@@ -8,8 +9,8 @@ MAINTAINERCLEANFILES = Makefile.in
if BUILD_SERVER
bin_PROGRAMS = ingen
-ingen_DEPENDENCIES = ../../libs/engine/libingen.la
-ingen_LDADD = @RAUL_LIBS@ @SLV2_LIBS@ @JACK_LIBS@ @LOSC_LIBS@ @ALSA_LIBS@ @LASH_LIBS@ -lrt ../../libs/engine/libingen.la
+ingen_LDADD = @RAUL_LIBS@ @JACK_LIBS@ @LOSC_LIBS@ @ALSA_LIBS@ @LASH_LIBS@ @SLV2_LIBS@ -lrt ../../libs/module/libingen_module.la
+ingen_DEPENDENCIES = ../../libs/module/libingen_module.la
ingen_SOURCES = \
main.cpp \
diff --git a/src/progs/server/cmdline.c b/src/progs/server/cmdline.c
index 6a697a04..1e97e1ef 100644
--- a/src/progs/server/cmdline.c
+++ b/src/progs/server/cmdline.c
@@ -1,5 +1,5 @@
/*
- File autogenerated by gengetopt version 2.18
+ File autogenerated by gengetopt version 2.19.1
generated with the following command:
gengetopt -u
@@ -23,14 +23,15 @@
const char *gengetopt_args_info_purpose = "";
-const char *gengetopt_args_info_usage = "Usage: Om - An OSC controlled realtime modular synthesizer [OPTIONS]... [FILES]...";
+const char *gengetopt_args_info_usage = "Usage: Om - An OSC controlled realtime modular synthesizer [OPTIONS]... \n [FILES]...";
+
+const char *gengetopt_args_info_description = "";
const char *gengetopt_args_info_help[] = {
- " -h, --help Print help and exit",
- " -V, --version Print version and exit",
- " -p, --port=STRING OSC port to listen on (default=`16180')",
- " -j, --jack-server=STRING Name of Jack server to attach to",
- " -i, --in-jackd Run engine as in-process JACK client (default=off)",
+ " -h, --help Print help and exit",
+ " -V, --version Print version and exit",
+ " -p, --port=STRING OSC port to listen on (default=`16180')",
+ " -i, --in-jackd Run engine as in-process JACK client (default=off)",
0
};
@@ -52,7 +53,6 @@ void clear_given (struct gengetopt_args_info *args_info)
args_info->help_given = 0 ;
args_info->version_given = 0 ;
args_info->port_given = 0 ;
- args_info->jack_server_given = 0 ;
args_info->in_jackd_given = 0 ;
}
@@ -61,8 +61,6 @@ void clear_args (struct gengetopt_args_info *args_info)
{
args_info->port_arg = gengetopt_strdup ("16180");
args_info->port_orig = NULL;
- args_info->jack_server_arg = NULL;
- args_info->jack_server_orig = NULL;
args_info->in_jackd_flag = 0;
}
@@ -73,8 +71,7 @@ void init_args_info(struct gengetopt_args_info *args_info)
args_info->help_help = gengetopt_args_info_help[0] ;
args_info->version_help = gengetopt_args_info_help[1] ;
args_info->port_help = gengetopt_args_info_help[2] ;
- args_info->jack_server_help = gengetopt_args_info_help[3] ;
- args_info->in_jackd_help = gengetopt_args_info_help[4] ;
+ args_info->in_jackd_help = gengetopt_args_info_help[3] ;
}
@@ -94,6 +91,10 @@ cmdline_parser_print_help (void)
printf("\n%s\n", gengetopt_args_info_purpose);
printf("\n%s\n\n", gengetopt_args_info_usage);
+
+ if (strlen(gengetopt_args_info_description) > 0)
+ printf("%s\n", gengetopt_args_info_description);
+
while (gengetopt_args_info_help[i])
printf("%s\n", gengetopt_args_info_help[i++]);
}
@@ -124,16 +125,6 @@ cmdline_parser_release (struct gengetopt_args_info *args_info)
free (args_info->port_orig); /* free previous argument */
args_info->port_orig = 0;
}
- if (args_info->jack_server_arg)
- {
- free (args_info->jack_server_arg); /* free previous argument */
- args_info->jack_server_arg = 0;
- }
- if (args_info->jack_server_orig)
- {
- free (args_info->jack_server_orig); /* free previous argument */
- args_info->jack_server_orig = 0;
- }
for (i = 0; i < args_info->inputs_num; ++i)
free (args_info->inputs [i]);
@@ -171,13 +162,6 @@ cmdline_parser_file_save(const char *filename, struct gengetopt_args_info *args_
fprintf(outfile, "%s\n", "port");
}
}
- if (args_info->jack_server_given) {
- if (args_info->jack_server_orig) {
- fprintf(outfile, "%s=\"%s\"\n", "jack-server", args_info->jack_server_orig);
- } else {
- fprintf(outfile, "%s\n", "jack-server");
- }
- }
if (args_info->in_jackd_given) {
fprintf(outfile, "%s\n", "in-jackd");
}
@@ -266,13 +250,12 @@ cmdline_parser_internal (int argc, char * const *argv, struct gengetopt_args_inf
{ "help", 0, NULL, 'h' },
{ "version", 0, NULL, 'V' },
{ "port", 1, NULL, 'p' },
- { "jack-server", 1, NULL, 'j' },
{ "in-jackd", 0, NULL, 'i' },
{ NULL, 0, NULL, 0 }
};
stop_char = 0;
- c = getopt_long (argc, argv, "hVp:j:i", long_options, &option_index);
+ c = getopt_long (argc, argv, "hVp:i", long_options, &option_index);
if (c == -1) break; /* Exit from `while (1)' loop. */
@@ -306,24 +289,6 @@ cmdline_parser_internal (int argc, char * const *argv, struct gengetopt_args_inf
args_info->port_orig = gengetopt_strdup (optarg);
break;
- case 'j': /* Name of Jack server to attach to. */
- if (local_args_info.jack_server_given)
- {
- fprintf (stderr, "%s: `--jack-server' (`-j') option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
- goto failure;
- }
- if (args_info->jack_server_given && ! override)
- continue;
- local_args_info.jack_server_given = 1;
- args_info->jack_server_given = 1;
- if (args_info->jack_server_arg)
- free (args_info->jack_server_arg); /* free previous string */
- args_info->jack_server_arg = gengetopt_strdup (optarg);
- if (args_info->jack_server_orig)
- free (args_info->jack_server_orig); /* free previous string */
- args_info->jack_server_orig = gengetopt_strdup (optarg);
- break;
-
case 'i': /* Run engine as in-process JACK client. */
if (local_args_info.in_jackd_given)
{
diff --git a/src/progs/server/cmdline.ggo b/src/progs/server/cmdline.ggo
index ce50cea1..9635a8f5 100644
--- a/src/progs/server/cmdline.ggo
+++ b/src/progs/server/cmdline.ggo
@@ -3,6 +3,5 @@
package "Om - An OSC controlled realtime modular synthesizer"
option "port" p "OSC port to listen on" string default="16180" no
-option "jack-server" j "Name of Jack server to attach to" string no
option "in-jackd" i "Run engine as in-process JACK client" flag off
diff --git a/src/progs/server/cmdline.h b/src/progs/server/cmdline.h
index 8ced9534..5253162c 100644
--- a/src/progs/server/cmdline.h
+++ b/src/progs/server/cmdline.h
@@ -1,6 +1,6 @@
/* cmdline.h */
-/* File autogenerated by gengetopt version 2.18 */
+/* File autogenerated by gengetopt version 2.19.1 */
#ifndef CMDLINE_H
#define CMDLINE_H
@@ -29,16 +29,12 @@ struct gengetopt_args_info
char * port_arg; /* OSC port to listen on (default='16180'). */
char * port_orig; /* OSC port to listen on original value given at command line. */
const char *port_help; /* OSC port to listen on help description. */
- char * jack_server_arg; /* Name of Jack server to attach to. */
- char * jack_server_orig; /* Name of Jack server to attach to original value given at command line. */
- const char *jack_server_help; /* Name of Jack server to attach to help description. */
int in_jackd_flag; /* Run engine as in-process JACK client (default=off). */
const char *in_jackd_help; /* Run engine as in-process JACK client help description. */
int help_given ; /* Whether help was given. */
int version_given ; /* Whether version was given. */
int port_given ; /* Whether port was given. */
- int jack_server_given ; /* Whether jack-server was given. */
int in_jackd_given ; /* Whether in-jackd was given. */
char **inputs ; /* unamed options */
diff --git a/src/progs/server/ingen_dev b/src/progs/server/ingen_dev
new file mode 100755
index 00000000..bd8857f7
--- /dev/null
+++ b/src/progs/server/ingen_dev
@@ -0,0 +1,3 @@
+#!/usr/bin/env sh
+
+INGEN_MODULE_PATH=../../libs/engine/.libs ./ingen
diff --git a/src/progs/server/main.cpp b/src/progs/server/main.cpp
index ea9b37d8..e92b635f 100644
--- a/src/progs/server/main.cpp
+++ b/src/progs/server/main.cpp
@@ -19,19 +19,18 @@
#include <cstddef>
#include <signal.h>
#include "config.h"
-#include "util.h"
-#include "cmdline.h"
-#include "tuning.h"
-#include "Engine.h"
-#include "JackAudioDriver.h"
-#include "OSCEngineReceiver.h"
+#include "module/Module.h"
+#include "engine/util.h"
+#include "engine/Engine.h"
+#include "engine/EventSource.h"
#ifdef HAVE_LASH
-#include "LashDriver.h"
+#include "engine/LashDriver.h"
#endif
#ifdef BUILD_IN_PROCESS_ENGINE
#include <jack/jack.h>
#include <jack/intclient.h>
#endif
+#include "cmdline.h"
using std::cout; using std::endl; using std::cerr;
using namespace Ingen;
@@ -139,18 +138,28 @@ main(int argc, char** argv)
set_denormal_flags();
- engine = SharedPtr<Engine>(new Engine());
+ SharedPtr<Glib::Module> module = Ingen::Shared::load_module("ingen_engine");
+
+ if (!module) {
+ cerr << "Aborting. If you are running from the source tree, run ingen_dev." << endl;
+ return -1;
+ }
- std::string jack_name
- = (args_info.jack_server_given) ? args_info.jack_server_arg : "";
+ Engine* (*new_engine)() = NULL;
+
+ bool found = module->get_symbol("new_engine", (void*&)new_engine);
+
+ if (!found) {
+ cerr << "Unable to find module entry point, exiting." << endl;
+ return -1;
+ }
- SharedPtr<AudioDriver> audio_driver(
- new JackAudioDriver(*engine.get(), jack_name) );
+ SharedPtr<Engine> engine(new_engine());
- SharedPtr<EventSource> event_source(new OSCEngineReceiver(
- engine, pre_processor_queue_size, args_info.port_arg ));
+ engine->start_jack_driver();
+ engine->start_osc_driver(args_info.port_arg);
- engine->activate(audio_driver, event_source);
+ engine->activate();
#ifdef HAVE_LASH
lash_driver = new LashDriver(engine, lash_args);
@@ -158,7 +167,7 @@ main(int argc, char** argv)
engine->main();
- event_source->deactivate();
+ engine->event_source()->deactivate();
#ifdef HAVE_LASH
delete lash_driver;