summaryrefslogtreecommitdiffstats
path: root/src/shared
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-03-19 20:16:46 +0000
committerDavid Robillard <d@drobilla.net>2012-03-19 20:16:46 +0000
commit254b434f0a79fea54bd963e8ff2e845a5b0cd3a6 (patch)
treeddf849fc5b64d1096846c28c1f1a742f54c3adff /src/shared
parentbc3afd8380d59c750c8f8e9bf1ed1b8d4a6826e9 (diff)
downloadingen-254b434f0a79fea54bd963e8ff2e845a5b0cd3a6.tar.gz
ingen-254b434f0a79fea54bd963e8ff2e845a5b0cd3a6.tar.bz2
ingen-254b434f0a79fea54bd963e8ff2e845a5b0cd3a6.zip
Partially functioning communication between Ingen LV2 plugin and UI.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4078 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/AtomReader.cpp83
-rw-r--r--src/shared/AtomWriter.cpp18
-rw-r--r--src/shared/Builder.cpp6
-rw-r--r--src/shared/Configuration.cpp34
-rw-r--r--src/shared/Forge.cpp53
-rw-r--r--src/shared/LV2Atom.cpp96
-rw-r--r--src/shared/LV2URIMap.cpp88
-rw-r--r--src/shared/ResourceImpl.cpp15
-rw-r--r--src/shared/URIs.cpp150
-rw-r--r--src/shared/World.cpp7
-rw-r--r--src/shared/wscript3
11 files changed, 258 insertions, 295 deletions
diff --git a/src/shared/AtomReader.cpp b/src/shared/AtomReader.cpp
new file mode 100644
index 00000000..009aace6
--- /dev/null
+++ b/src/shared/AtomReader.cpp
@@ -0,0 +1,83 @@
+/* This file is part of Ingen.
+ * Copyright 2012 David Robillard <http://drobilla.net>
+ *
+ * Ingen is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU General Public License as published by the Free Software
+ * Foundation; either version 2 of the License, or (at your option) any later
+ * version.
+ *
+ * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <iostream>
+#include <utility>
+
+#include "ingen/shared/AtomReader.hpp"
+#include "lv2/lv2plug.in/ns/ext/atom/util.h"
+#include "raul/log.hpp"
+
+namespace Ingen {
+namespace Shared {
+
+AtomReader::AtomReader(LV2URIMap& map, URIs& uris, Forge& forge, Interface& iface)
+ : _map(map)
+ , _uris(uris)
+ , _forge(forge)
+ , _iface(iface)
+{
+}
+
+void
+AtomReader::write(const LV2_Atom* msg)
+{
+ if (msg->type != _uris.atom_Blank) {
+ Raul::warn << "Unknown message type " << msg->type << std::endl;
+ return;
+ }
+
+ const LV2_Atom_Object* obj = (const LV2_Atom_Object*)msg;
+ const LV2_Atom* subject = NULL;
+
+ lv2_object_get(obj, (LV2_URID)_uris.patch_subject, &subject, NULL);
+ const char* subject_uri = subject ? (const char*)LV2_ATOM_BODY(subject) : NULL;
+ if (obj->body.otype == _uris.patch_Get) {
+ Raul::warn << "ATOM GET " << subject_uri << std::endl;
+ _iface.set_response_id(1);
+ _iface.get(subject_uri);
+ } else if (obj->body.otype == _uris.patch_Put) {
+ Raul::warn << "PUT" << std::endl;
+ const LV2_Atom_Object* body = NULL;
+ lv2_object_get(obj, (LV2_URID)_uris.patch_body, &body, 0);
+ if (!body) {
+ Raul::warn << "NO BODY" << std::endl;
+ return;
+ }
+
+ Ingen::Resource::Properties props;
+ LV2_OBJECT_FOREACH(body, i) {
+ LV2_Atom_Property_Body* p = lv2_object_iter_get(i);
+ props.insert(std::make_pair(_map.unmap_uri(p->key),
+ _forge.alloc(p->value.size,
+ p->value.type,
+ LV2_ATOM_BODY(&p->value))));
+ }
+
+ if (subject_uri) {
+ _iface.put(subject_uri, props);
+ } else {
+ Raul::warn << "Put message has no subject, ignored" << std::endl;
+ }
+
+ } else {
+ Raul::warn << "HANDLE MESSAGE TYPE " << obj->body.otype << std::endl;
+ }
+}
+
+} // namespace Shared
+} // namespace Ingen
diff --git a/src/shared/AtomWriter.cpp b/src/shared/AtomWriter.cpp
index c86ac96f..81a9d9ba 100644
--- a/src/shared/AtomWriter.cpp
+++ b/src/shared/AtomWriter.cpp
@@ -88,7 +88,21 @@ AtomWriter::put(const Raul::URI& uri,
{
LV2_Atom_Forge_Frame msg;
lv2_atom_forge_blank(&_forge, &msg, next_id(), _uris.patch_Put);
- // ...
+ lv2_atom_forge_property_head(&_forge, _uris.patch_subject, 0);
+ lv2_atom_forge_uri(&_forge, uri.c_str(), uri.length());
+ lv2_atom_forge_property_head(&_forge, _uris.patch_body, 0);
+
+ LV2_Atom_Forge_Frame body;
+ lv2_atom_forge_blank(&_forge, &body, 0, 0);
+
+ for (Resource::Properties::const_iterator i = properties.begin();
+ i != properties.end(); ++i) {
+ lv2_atom_forge_property_head(&_forge, _map.map_uri(i->first.c_str()), 0);
+ lv2_atom_forge_atom(&_forge, i->second.size(), i->second.type());
+ lv2_atom_forge_write(&_forge, i->second.get_body(), i->second.size());
+ }
+
+ lv2_atom_forge_pop(&_forge, &body);
lv2_atom_forge_pop(&_forge, &msg);
finish_msg();
}
@@ -173,7 +187,7 @@ AtomWriter::response(int32_t id, Status status)
LV2_Atom_Forge_Frame msg;
lv2_atom_forge_blank(&_forge, &msg, next_id(), _uris.patch_Response);
lv2_atom_forge_property_head(&_forge, _uris.patch_request, 0);
- lv2_atom_forge_int32(&_forge, id);
+ lv2_atom_forge_int(&_forge, id);
lv2_atom_forge_pop(&_forge, &msg);
finish_msg();
}
diff --git a/src/shared/Builder.cpp b/src/shared/Builder.cpp
index 3b49bd41..8c51d50e 100644
--- a/src/shared/Builder.cpp
+++ b/src/shared/Builder.cpp
@@ -48,7 +48,8 @@ Builder::build(SharedPtr<const GraphObject> object)
if (patch) {
if (!object->path().is_root()) {
Resource::Properties props;
- props.insert(make_pair(uris.rdf_type, uris.ingen_Patch));
+ props.insert(make_pair(uris.rdf_type,
+ _uris->forge.alloc_uri(uris.ingen_Patch.str())));
props.insert(make_pair(uris.ingen_polyphony,
_uris->forge.make(int32_t(patch->internal_poly()))));
_interface.put(object->path(), props);
@@ -66,7 +67,8 @@ Builder::build(SharedPtr<const GraphObject> object)
if (node) {
Resource::Properties props;
props.insert(make_pair(uris.rdf_type, uris.ingen_Node));
- props.insert(make_pair(uris.rdf_instanceOf, node->plugin()->uri()));
+ props.insert(make_pair(uris.rdf_instanceOf,
+ _uris->forge.alloc_uri(node->plugin()->uri().str())));
_interface.put(node->path(), props);
build_object(object);
return;
diff --git a/src/shared/Configuration.cpp b/src/shared/Configuration.cpp
index 300c7f1d..df539115 100644
--- a/src/shared/Configuration.cpp
+++ b/src/shared/Configuration.cpp
@@ -22,8 +22,8 @@ using namespace Raul;
namespace Ingen {
namespace Shared {
-Configuration::Configuration(Raul::Forge* forge)
- : Raul::Configuration(forge,
+Configuration::Configuration()
+ : Raul::Configuration(
"A realtime modular audio processor.",
"Ingen is a flexible modular system that be used in various ways.\n"
"The engine can run as a stand-alone server controlled via a network protocol\n"
@@ -37,21 +37,21 @@ Configuration::Configuration(Raul::Forge* forge)
" ingen -eg patch.ttl # Run an engine and a GUI and load a patch file\n"
" ingen -eg patch.ingen # Run an engine and a GUI and load a patch bundle")
{
- add("client-port", 'C', "Client OSC port", Atom::INT, forge->make());
- add("connect", 'c', "Connect to engine URI", Atom::STRING, forge->make("osc.udp://localhost:16180"));
- add("engine", 'e', "Run (JACK) engine", Atom::BOOL, forge->make(false));
- add("engine-port", 'E', "Engine listen port", Atom::INT, forge->make(16180));
- add("gui", 'g', "Launch the GTK graphical interface", Atom::BOOL, forge->make(false));
- add("help", 'h', "Print this help message", Atom::BOOL, forge->make(false));
- add("jack-client", 'n', "JACK client name", Atom::STRING, forge->make("ingen"));
- add("jack-server", 's', "JACK server name", Atom::STRING, forge->make(""));
- add("uuid", 'u', "JACK session UUID", Atom::STRING, forge->make(""));
- add("load", 'l', "Load patch", Atom::STRING, forge->make());
- add("packet-size", 'k', "Maximum UDP packet size", Atom::INT, forge->make(4096));
- add("parallelism", 'p', "Number of concurrent process threads", Atom::INT, forge->make(1));
- add("path", 'L', "Target path for loaded patch", Atom::STRING, forge->make());
- add("queue-size", 'q', "Event queue size", Atom::INT, forge->make(4096));
- add("run", 'r', "Run script", Atom::STRING, forge->make());
+ add("client-port", 'C', "Client OSC port", INT, Value());
+ add("connect", 'c', "Connect to engine URI", STRING, Value("osc.udp://localhost:16180"));
+ add("engine", 'e', "Run (JACK) engine", BOOL, Value(false));
+ add("engine-port", 'E', "Engine listen port", INT, Value(16180));
+ add("gui", 'g', "Launch the GTK graphical interface", BOOL, Value(false));
+ add("help", 'h', "Print this help message", BOOL, Value(false));
+ add("jack-client", 'n', "JACK client name", STRING, Value("ingen"));
+ add("jack-server", 's', "JACK server name", STRING, Value(""));
+ add("uuid", 'u', "JACK session UUID", STRING, Value());
+ add("load", 'l', "Load patch", STRING, Value());
+ add("packet-size", 'k', "Maximum UDP packet size", INT, Value(4096));
+ add("parallelism", 'p', "Number of concurrent process threads", INT, Value(1));
+ add("path", 'L', "Target path for loaded patch", STRING, Value());
+ add("queue-size", 'q', "Event queue size", INT, Value(4096));
+ add("run", 'r', "Run script", STRING, Value());
}
} // namespace Shared
diff --git a/src/shared/Forge.cpp b/src/shared/Forge.cpp
new file mode 100644
index 00000000..bf7eb3e8
--- /dev/null
+++ b/src/shared/Forge.cpp
@@ -0,0 +1,53 @@
+/* This file is part of Ingen.
+ * Copyright 2008-2011 David Robillard <http://drobilla.net>
+ *
+ * Ingen is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU General Public License as published by the Free Software
+ * Foundation; either version 2 of the License, or (at your option) any later
+ * version.
+ *
+ * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <sstream>
+
+#include "ingen/shared/Forge.hpp"
+#include "lv2/lv2plug.in/ns/ext/atom/atom.h"
+
+namespace Ingen {
+
+Forge::Forge(Shared::LV2URIMap& map)
+{
+ Int = map.map_uri(LV2_ATOM__Int);
+ Float = map.map_uri(LV2_ATOM__Float);
+ Bool = map.map_uri(LV2_ATOM__Bool);
+ URI = map.map_uri(LV2_ATOM__URI);
+ String = map.map_uri(LV2_ATOM__String);
+ Dict = map.map_uri(LV2_ATOM__Object);
+}
+
+std::string
+Forge::str(const Raul::Atom& atom)
+{
+ std::ostringstream ss;
+ if (atom.type() == Int) {
+ ss << atom.get_int32();
+ } else if (atom.type() == Float) {
+ ss << atom.get_float();
+ } else if (atom.type() == Bool) {
+ ss << (atom.get_bool() ? "true" : "false");
+ } else if (atom.type() == URI) {
+ ss << "<" << atom.get_uri() << ">";
+ } else if (atom.type() == String) {
+ ss << "\"" << atom.get_string() << "\"";
+ }
+ return ss.str();
+}
+
+} // namespace Ingen
diff --git a/src/shared/LV2Atom.cpp b/src/shared/LV2Atom.cpp
deleted file mode 100644
index ccd5f352..00000000
--- a/src/shared/LV2Atom.cpp
+++ /dev/null
@@ -1,96 +0,0 @@
-/* This file is part of Ingen.
- * Copyright 2009-2011 David Robillard <http://drobilla.net>
- *
- * Ingen is free software; you can redistribute it and/or modify it under the
- * terms of the GNU General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option) any later
- * version.
- *
- * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "ingen/shared/LV2Atom.hpp"
-#include "ingen/shared/LV2Features.hpp"
-#include "ingen/shared/LV2URIMap.hpp"
-#include "ingen/shared/URIs.hpp"
-#include "lv2/lv2plug.in/ns/ext/atom/atom.h"
-#include "lv2/lv2plug.in/ns/ext/uri-map/uri-map.h"
-#include "raul/Atom.hpp"
-#include "raul/log.hpp"
-
-using namespace std;
-using namespace Raul;
-
-namespace Ingen {
-namespace Shared {
-namespace LV2Atom {
-
-bool
-to_atom(Raul::Forge* forge,
- const Shared::URIs& uris,
- const LV2_Atom* object,
- Raul::Atom& atom)
-{
- if (object->type == uris.atom_String.id) {
- atom = forge->make((char*)(object + 1));
- return true;
- } else if (object->type == uris.atom_Bool.id) {
- atom = forge->make((bool)(int32_t*)(object + 1));
- return true;
- } else if (object->type == uris.atom_Int.id) {
- atom = forge->make((int32_t*)(object + 1));
- return true;
- } else if (object->type == uris.atom_Float.id) {
- atom = forge->make((float*)(object + 1));
- return true;
- }
- return false;
-}
-
-/** Convert an atom to an LV2 object, if possible.
- * object->size should be the capacity of the object (not including header)
- */
-bool
-from_atom(const Shared::URIs& uris, const Raul::Atom& atom, LV2_Atom* object)
-{
- char* str;
- switch (atom.type()) {
- case Raul::Atom::FLOAT:
- object->type = uris.atom_Float.id;
- object->size = sizeof(float);
- *(float*)(object + 1) = atom.get_float();
- break;
- case Raul::Atom::INT:
- object->type = uris.atom_Int.id;
- object->size = sizeof(int32_t);
- *(int32_t*)(object + 1) = atom.get_int32();
- break;
- case Raul::Atom::STRING:
- object->type = uris.atom_String.id;
- object->size = std::min((uint16_t)object->size, (uint16_t)(strlen(atom.get_string()) + 1));
- str = ((char*)(object + 1));
- str[object->size - 1] = '\0';
- strncpy(str, atom.get_string(), object->size);
- break;
- case Raul::Atom::BLOB:
- error << "TODO: Blob support" << endl;
- /*object->type = uris.atom_String;
- *(uint16_t*)(object + 1) = uris.uri_to_id(NULL, atom.get_blob_type());
- memcpy(((char*)(object + 1) + sizeof(uint32_t)), atom.get_blob(),
- std::min(atom.data_size(), (size_t)object->size));*/
- default:
- error << "Unsupported value type for toggle control" << endl;
- return false;
- }
- return true;
-}
-
-} // namespace LV2Atom
-} // namespace Shared
-} // namespace Ingen
diff --git a/src/shared/LV2URIMap.cpp b/src/shared/LV2URIMap.cpp
index 14b6ca0a..8a414c9f 100644
--- a/src/shared/LV2URIMap.cpp
+++ b/src/shared/LV2URIMap.cpp
@@ -26,7 +26,6 @@
#include "ingen/shared/LV2URIMap.hpp"
#include "lv2/lv2plug.in/ns/ext/atom/atom.h"
-#include "lv2/lv2plug.in/ns/ext/event/event.h"
#include "raul/log.hpp"
using namespace std;
@@ -36,19 +35,11 @@ namespace Ingen {
namespace Shared {
LV2URIMap::LV2URIMap(LV2_URID_Map* map, LV2_URID_Unmap* unmap)
- : _uri_map_feature(new URIMapFeature(this))
- , _urid_map_feature(new URIDMapFeature(this, map))
+ : _urid_map_feature(new URIDMapFeature(this, map))
, _urid_unmap_feature(new URIDUnmapFeature(this, unmap))
{
}
-LV2URIMap::URIMapFeature::URIMapFeature(LV2URIMap* map)
- : Feature(LV2_URI_MAP_URI, &uri_map)
-{
- uri_map.uri_to_id = &LV2URIMap::uri_map_uri_to_id;
- uri_map.callback_data = map;
-}
-
LV2URIMap::URIDMapFeature::URIDMapFeature(LV2URIMap* map,
LV2_URID_Map* impl)
: Feature(LV2_URID__map, &urid_map)
@@ -101,83 +92,6 @@ LV2URIMap::URIDUnmapFeature::unmap(LV2_URID urid)
}
uint32_t
-LV2URIMap::uri_to_id(const char* map,
- const char* uri)
-{
- const uint32_t id = map_uri(uri);
- if (map && !strcmp(map, LV2_EVENT_URI)) {
- GlobalToEvent::iterator i = _global_to_event.find(id);
- if (i != _global_to_event.end()) {
- return i->second;
- } else {
- if (_global_to_event.size() + 1 > UINT16_MAX) {
- error << "Event URI " << uri << " ID out of range." << endl;
- return 0;
- }
- const uint16_t ev_id = _global_to_event.size() + 1;
- assert(_event_to_global.find(ev_id) == _event_to_global.end());
- _global_to_event.insert(make_pair(id, ev_id));
- _event_to_global.insert(make_pair(ev_id, id));
- return ev_id;
- }
- } else {
- return id;
- }
-}
-
-const char*
-LV2URIMap::id_to_uri(const char* map,
- const uint32_t id)
-{
- if (map && !strcmp(map, LV2_EVENT_URI)) {
- EventToGlobal::iterator i = _event_to_global.find(id);
- if (i == _event_to_global.end()) {
- error << "Failed to unmap event URI " << id << endl;
- return NULL;
- }
- return unmap_uri(i->second);
- } else {
- return unmap_uri(id);
- }
-}
-
-std::pair<bool, uint32_t>
-LV2URIMap::event_to_global(uint16_t event_id) const
-{
- EventToGlobal::const_iterator i = _event_to_global.find(event_id);
- if (i == _event_to_global.end()) {
- return std::make_pair(false, uint32_t(0));
- }
- return std::make_pair(true, i->second);
-}
-
-std::pair<bool, uint16_t>
-LV2URIMap::global_to_event(uint32_t global_id) const
-{
- GlobalToEvent::const_iterator i = _global_to_event.find(global_id);
- if (i == _global_to_event.end()) {
- return std::make_pair(false, uint16_t(0));
- }
- return std::make_pair(true, i->second);
-}
-
-uint32_t
-LV2URIMap::uri_map_uri_to_id(LV2_URI_Map_Callback_Data callback_data,
- const char* map,
- const char* uri)
-{
- LV2URIMap* me = (LV2URIMap*)callback_data;
- return me->uri_to_id(map, uri);
-}
-
-LV2_URID
-LV2URIMap::urid_map(LV2_URID_Map_Handle handle, const char* uri)
-{
- LV2URIMap* me = (LV2URIMap*)handle;
- return me->uri_to_id(NULL, uri);
-}
-
-uint32_t
LV2URIMap::map_uri(const char* uri)
{
return _urid_map_feature->map(uri);
diff --git a/src/shared/ResourceImpl.cpp b/src/shared/ResourceImpl.cpp
index de3eae17..6858fab9 100644
--- a/src/shared/ResourceImpl.cpp
+++ b/src/shared/ResourceImpl.cpp
@@ -121,8 +121,8 @@ ResourceImpl::type(const URIs& uris,
patch = node = port = is_output = false;
for (iterator i = types_range.first; i != types_range.second; ++i) {
const Atom& atom = i->second;
- if (atom.type() != Atom::URI) {
- warn << "[ResourceImpl] Non-URI type " << atom << endl;
+ if (atom.type() != uris.forge.URI) {
+ warn << "[ResourceImpl] Non-URI type " << uris.forge.str(atom) << endl;
continue;
}
@@ -195,17 +195,6 @@ ResourceImpl::remove_properties(const Properties& p)
}
}
-void
-ResourceImpl::dump(std::ostream& os) const
-{
- typedef Resource::Properties::const_iterator iterator;
- os << _uri << " [" << endl;
- for (iterator i = _properties.begin(); i != _properties.end(); ++i) {
- os << "\t" << i->first << " " << i->second << " ;" << endl;
- }
- os << "]" << endl;
-}
-
Resource::Properties
ResourceImpl::properties(Resource::Graph ctx) const
{
diff --git a/src/shared/URIs.cpp b/src/shared/URIs.cpp
index 73718fab..07cd8ab1 100644
--- a/src/shared/URIs.cpp
+++ b/src/shared/URIs.cpp
@@ -37,9 +37,10 @@ using namespace Raul;
namespace Ingen {
namespace Shared {
-URIs::Quark::Quark(LV2URIMap* map, const char* c_str)
+URIs::Quark::Quark(Ingen::Forge& forge, LV2URIMap* map, const char* c_str)
: Raul::URI(c_str)
, id(map->map_uri(c_str))
+ , atom(forge.alloc_uri(c_str))
{
}
@@ -48,79 +49,82 @@ URIs::Quark::Quark(LV2URIMap* map, const char* c_str)
#define NS_RDF "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
#define NS_RDFS "http://www.w3.org/2000/01/rdf-schema#"
-URIs::URIs(Raul::Forge& f, LV2URIMap* map)
+URIs::URIs(Ingen::Forge& f, LV2URIMap* map)
: forge(f)
- , atom_Bool (map, LV2_ATOM__Bool)
- , atom_Float (map, LV2_ATOM__Float)
- , atom_Int (map, LV2_ATOM__Int)
- , atom_MessagePort (map, LV2_ATOM__MessagePort)
- , atom_String (map, LV2_ATOM__String)
- , atom_ValuePort (map, LV2_ATOM__ValuePort)
- , atom_Vector (map, LV2_ATOM__Vector)
- , atom_eventTransfer (map, LV2_ATOM__eventTransfer)
- , atom_supports (map, LV2_ATOM__supports)
- , ctx_audioContext (map, NS_CTX "audioContext")
- , ctx_context (map, NS_CTX "context")
- , ctx_messageContext (map, NS_CTX "messageContext")
- , cv_CVPort (map, "http://lv2plug.in/ns/ext/cv-port#CVPort")
- , doap_name (map, "http://usefulinc.com/ns/doap#name")
- , ev_EventPort (map, "http://lv2plug.in/ns/ext/event#EventPort")
- , ingen_Connection (map, NS_INGEN "Connection")
- , ingen_Internal (map, NS_INGEN "Internal")
- , ingen_Node (map, NS_INGEN "Node")
- , ingen_Patch (map, NS_INGEN "Patch")
- , ingen_Port (map, NS_INGEN "Port")
- , ingen_activity (map, NS_INGEN "activity")
- , ingen_broadcast (map, NS_INGEN "broadcast")
- , ingen_canvasX (map, NS_INGEN "canvasX")
- , ingen_canvasY (map, NS_INGEN "canvasY")
- , ingen_controlBinding (map, NS_INGEN "controlBinding")
- , ingen_destination (map, NS_INGEN "destination")
- , ingen_document (map, NS_INGEN "document")
- , ingen_enabled (map, NS_INGEN "enabled")
- , ingen_engine (map, NS_INGEN "engine")
- , ingen_nil (map, NS_INGEN "nil")
- , ingen_node (map, NS_INGEN "node")
- , ingen_polyphonic (map, NS_INGEN "polyphonic")
- , ingen_polyphony (map, NS_INGEN "polyphony")
- , ingen_sampleRate (map, NS_INGEN "sampleRate")
- , ingen_selected (map, NS_INGEN "selected")
- , ingen_source (map, NS_INGEN "source")
- , ingen_value (map, NS_INGEN "value")
- , lv2_AudioPort (map, LV2_CORE__AudioPort)
- , lv2_ControlPort (map, LV2_CORE__ControlPort)
- , lv2_InputPort (map, LV2_CORE__InputPort)
- , lv2_OutputPort (map, LV2_CORE__OutputPort)
- , lv2_Plugin (map, LV2_CORE__Plugin)
- , lv2_connectionOptional(map, LV2_CORE__connectionOptional)
- , lv2_default (map, LV2_CORE__default)
- , lv2_index (map, LV2_CORE__index)
- , lv2_integer (map, LV2_CORE__integer)
- , lv2_maximum (map, LV2_CORE__maximum)
- , lv2_minimum (map, LV2_CORE__minimum)
- , lv2_name (map, LV2_CORE__name)
- , lv2_portProperty (map, LV2_CORE__portProperty)
- , lv2_sampleRate (map, LV2_CORE__sampleRate)
- , lv2_symbol (map, LV2_CORE__symbol)
- , lv2_toggled (map, LV2_CORE__toggled)
- , midi_Bender (map, LV2_MIDI__Bender)
- , midi_ChannelPressure (map, LV2_MIDI__ChannelPressure)
- , midi_Controller (map, LV2_MIDI__Controller)
- , midi_MidiEvent (map, LV2_MIDI__MidiEvent)
- , midi_NoteOn (map, LV2_MIDI__NoteOn)
- , midi_controllerNumber (map, LV2_MIDI__controllerNumber)
- , midi_noteNumber (map, LV2_MIDI__noteNumber)
- , patch_Get (map, LV2_PATCH__Get)
- , patch_Put (map, LV2_PATCH__Put)
- , patch_Response (map, LV2_PATCH__Response)
- , patch_body (map, LV2_PATCH__body)
- , patch_request (map, LV2_PATCH__request)
- , patch_subject (map, LV2_PATCH__subject)
- , rdf_instanceOf (map, NS_RDF "instanceOf")
- , rdf_type (map, NS_RDF "type")
- , rdfs_seeAlso (map, NS_RDFS "seeAlso")
- , ui_Events (map, "http://lv2plug.in/ns/extensions/ui#Events")
- , wildcard (map, NS_INGEN "wildcard")
+ , atom_Blank (forge, map, LV2_ATOM__Blank)
+ , atom_Bool (forge, map, LV2_ATOM__Bool)
+ , atom_Float (forge, map, LV2_ATOM__Float)
+ , atom_Int (forge, map, LV2_ATOM__Int)
+ , atom_MessagePort (forge, map, LV2_ATOM__MessagePort)
+ , atom_Sequence (forge, map, LV2_ATOM__Sequence)
+ , atom_Sound (forge, map, LV2_ATOM__Sound)
+ , atom_String (forge, map, LV2_ATOM__String)
+ , atom_ValuePort (forge, map, LV2_ATOM__ValuePort)
+ , atom_Vector (forge, map, LV2_ATOM__Vector)
+ , atom_bufferType (forge, map, LV2_ATOM__bufferType)
+ , atom_eventTransfer (forge, map, LV2_ATOM__eventTransfer)
+ , atom_supports (forge, map, LV2_ATOM__supports)
+ , ctx_audioContext (forge, map, NS_CTX "audioContext")
+ , ctx_context (forge, map, NS_CTX "context")
+ , ctx_messageContext (forge, map, NS_CTX "messageContext")
+ , cv_CVPort (forge, map, "http://lv2plug.in/ns/ext/cv-port#CVPort")
+ , doap_name (forge, map, "http://usefulinc.com/ns/doap#name")
+ , ingen_Connection (forge, map, NS_INGEN "Connection")
+ , ingen_Internal (forge, map, NS_INGEN "Internal")
+ , ingen_Node (forge, map, NS_INGEN "Node")
+ , ingen_Patch (forge, map, NS_INGEN "Patch")
+ , ingen_Port (forge, map, NS_INGEN "Port")
+ , ingen_activity (forge, map, NS_INGEN "activity")
+ , ingen_broadcast (forge, map, NS_INGEN "broadcast")
+ , ingen_canvasX (forge, map, NS_INGEN "canvasX")
+ , ingen_canvasY (forge, map, NS_INGEN "canvasY")
+ , ingen_controlBinding (forge, map, NS_INGEN "controlBinding")
+ , ingen_destination (forge, map, NS_INGEN "destination")
+ , ingen_document (forge, map, NS_INGEN "document")
+ , ingen_enabled (forge, map, NS_INGEN "enabled")
+ , ingen_engine (forge, map, NS_INGEN "engine")
+ , ingen_nil (forge, map, NS_INGEN "nil")
+ , ingen_node (forge, map, NS_INGEN "node")
+ , ingen_polyphonic (forge, map, NS_INGEN "polyphonic")
+ , ingen_polyphony (forge, map, NS_INGEN "polyphony")
+ , ingen_sampleRate (forge, map, NS_INGEN "sampleRate")
+ , ingen_selected (forge, map, NS_INGEN "selected")
+ , ingen_source (forge, map, NS_INGEN "source")
+ , ingen_value (forge, map, NS_INGEN "value")
+ , lv2_AudioPort (forge, map, LV2_CORE__AudioPort)
+ , lv2_ControlPort (forge, map, LV2_CORE__ControlPort)
+ , lv2_InputPort (forge, map, LV2_CORE__InputPort)
+ , lv2_OutputPort (forge, map, LV2_CORE__OutputPort)
+ , lv2_Plugin (forge, map, LV2_CORE__Plugin)
+ , lv2_connectionOptional(forge, map, LV2_CORE__connectionOptional)
+ , lv2_default (forge, map, LV2_CORE__default)
+ , lv2_index (forge, map, LV2_CORE__index)
+ , lv2_integer (forge, map, LV2_CORE__integer)
+ , lv2_maximum (forge, map, LV2_CORE__maximum)
+ , lv2_minimum (forge, map, LV2_CORE__minimum)
+ , lv2_name (forge, map, LV2_CORE__name)
+ , lv2_portProperty (forge, map, LV2_CORE__portProperty)
+ , lv2_sampleRate (forge, map, LV2_CORE__sampleRate)
+ , lv2_symbol (forge, map, LV2_CORE__symbol)
+ , lv2_toggled (forge, map, LV2_CORE__toggled)
+ , midi_Bender (forge, map, LV2_MIDI__Bender)
+ , midi_ChannelPressure (forge, map, LV2_MIDI__ChannelPressure)
+ , midi_Controller (forge, map, LV2_MIDI__Controller)
+ , midi_MidiEvent (forge, map, LV2_MIDI__MidiEvent)
+ , midi_NoteOn (forge, map, LV2_MIDI__NoteOn)
+ , midi_controllerNumber (forge, map, LV2_MIDI__controllerNumber)
+ , midi_noteNumber (forge, map, LV2_MIDI__noteNumber)
+ , patch_Get (forge, map, LV2_PATCH__Get)
+ , patch_Put (forge, map, LV2_PATCH__Put)
+ , patch_Response (forge, map, LV2_PATCH__Response)
+ , patch_body (forge, map, LV2_PATCH__body)
+ , patch_request (forge, map, LV2_PATCH__request)
+ , patch_subject (forge, map, LV2_PATCH__subject)
+ , rdf_instanceOf (forge, map, NS_RDF "instanceOf")
+ , rdf_type (forge, map, NS_RDF "type")
+ , rdfs_seeAlso (forge, map, NS_RDFS "seeAlso")
+ , ui_Events (forge, map, "http://lv2plug.in/ns/extensions/ui#Events")
+ , wildcard (forge, map, NS_INGEN "wildcard")
{
}
diff --git a/src/shared/World.cpp b/src/shared/World.cpp
index e3551302..963d53f3 100644
--- a/src/shared/World.cpp
+++ b/src/shared/World.cpp
@@ -109,14 +109,13 @@ public:
, argv(a_argv)
, conf(conf)
, lv2_features(NULL)
- , forge(new Raul::Forge())
, rdf_world(new Sord::World())
, lv2_uri_map(new Ingen::Shared::LV2URIMap(map, unmap))
+ , forge(new Ingen::Forge(*lv2_uri_map))
, uris(new Shared::URIs(*forge, lv2_uri_map.get()))
, lilv_world(lilv_world_new())
{
lv2_features = new Ingen::Shared::LV2Features();
- lv2_features->add_feature(lv2_uri_map->uri_map_feature());
lv2_features->add_feature(lv2_uri_map->urid_map_feature());
lv2_features->add_feature(lv2_uri_map->urid_unmap_feature());
lilv_world_load_all(lilv_world);
@@ -173,9 +172,9 @@ public:
char**& argv;
Raul::Configuration* conf;
LV2Features* lv2_features;
- Raul::Forge* forge;
Sord::World* rdf_world;
SharedPtr<LV2URIMap> lv2_uri_map;
+ Ingen::Forge* forge;
SharedPtr<URIs> uris;
SharedPtr<Interface> engine;
SharedPtr<EngineBase> local_engine;
@@ -216,7 +215,7 @@ SharedPtr<Serialisation::Serialiser> World::serialiser() { return _impl->seria
SharedPtr<Serialisation::Parser> World::parser() { return _impl->parser; }
SharedPtr<Store> World::store() { return _impl->store; }
Raul::Configuration* World::conf() { return _impl->conf; }
-Raul::Forge& World::forge() { return *_impl->forge; }
+Ingen::Forge& World::forge() { return *_impl->forge; }
LV2Features* World::lv2_features() { return _impl->lv2_features; }
LilvWorld* World::lilv_world() { return _impl->lilv_world; }
diff --git a/src/shared/wscript b/src/shared/wscript
index 11b61f17..70806a59 100644
--- a/src/shared/wscript
+++ b/src/shared/wscript
@@ -13,11 +13,12 @@ def build(bld):
autowaf.use_lib(bld, obj, 'GLIBMM LV2CORE LILV RAUL SORD LV2_MIDI')
obj.source = '''
+ AtomReader.cpp
AtomWriter.cpp
Builder.cpp
ClashAvoider.cpp
Configuration.cpp
- LV2Atom.cpp
+ Forge.cpp
LV2Features.cpp
LV2URIMap.cpp
Module.cpp