summaryrefslogtreecommitdiffstats
path: root/src/shared
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/LV2Atom.cpp16
-rw-r--r--src/shared/LV2URIMap.cpp114
-rw-r--r--src/shared/LV2URIMap.hpp24
-rw-r--r--src/shared/ResourceImpl.cpp2
4 files changed, 78 insertions, 78 deletions
diff --git a/src/shared/LV2Atom.cpp b/src/shared/LV2Atom.cpp
index ea6a4fa2..aa004f6f 100644
--- a/src/shared/LV2Atom.cpp
+++ b/src/shared/LV2Atom.cpp
@@ -34,16 +34,16 @@ namespace LV2Atom {
bool
to_atom(const Shared::LV2URIMap& uris, const LV2_Atom* object, Raul::Atom& atom)
{
- if (object->type == uris.object_class_string.id) {
+ if (object->type == uris.atom_String.id) {
atom = Raul::Atom((char*)(object + 1));
return true;
- } else if (object->type == uris.object_class_bool.id) {
+ } else if (object->type == uris.atom_Bool.id) {
atom = Raul::Atom((bool)(int32_t*)(object + 1));
return true;
- } else if (object->type == uris.object_class_int32.id) {
+ } else if (object->type == uris.atom_Int32.id) {
atom = Raul::Atom((int32_t*)(object + 1));
return true;
- } else if (object->type == uris.object_class_float32.id) {
+ } else if (object->type == uris.atom_Float32.id) {
atom = Raul::Atom((float*)(object + 1));
return true;
}
@@ -60,17 +60,17 @@ from_atom(const Shared::LV2URIMap& uris, const Raul::Atom& atom, LV2_Atom* objec
char* str;
switch (atom.type()) {
case Raul::Atom::FLOAT:
- object->type = uris.object_class_float32.id;
+ object->type = uris.atom_Float32.id;
object->size = sizeof(float);
*(float*)(object + 1) = atom.get_float();
break;
case Raul::Atom::INT:
- object->type = uris.object_class_int32.id;
+ object->type = uris.atom_Int32.id;
object->size = sizeof(int32_t);
*(int32_t*)(object + 1) = atom.get_int32();
break;
case Raul::Atom::STRING:
- object->type = uris.object_class_string.id;
+ 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';
@@ -78,7 +78,7 @@ from_atom(const Shared::LV2URIMap& uris, const Raul::Atom& atom, LV2_Atom* objec
break;
case Raul::Atom::BLOB:
error << "TODO: Blob support" << endl;
- /*object->type = uris.object_class_string;
+ /*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));*/
diff --git a/src/shared/LV2URIMap.cpp b/src/shared/LV2URIMap.cpp
index 34721db6..5a8dbff0 100644
--- a/src/shared/LV2URIMap.cpp
+++ b/src/shared/LV2URIMap.cpp
@@ -53,63 +53,63 @@ LV2URIMap::Quark::c_str() const
#define NS_RDFS "http://www.w3.org/2000/01/rdf-schema#"
LV2URIMap::LV2URIMap()
- : ctx_AudioContext(NS_CTX "AudioContext")
- , ctx_MessageContext(NS_CTX "MessageContext")
- , ctx_context(NS_CTX "context")
- , doap_name("http://usefulinc.com/ns/doap#name")
- , ingen_Internal(NS_INGEN "Internal")
- , ingen_LADSPAPlugin(NS_INGEN "LADSPAPlugin")
- , ingen_Node(NS_INGEN "Node")
- , ingen_Patch(NS_INGEN "Patch")
- , ingen_Port(NS_INGEN "Port")
- , ingen_broadcast(NS_INGEN "broadcast")
- , ingen_controlBinding(NS_INGEN "controlBinding")
- , ingen_document(NS_INGEN "document")
- , ingen_enabled(NS_INGEN "enabled")
- , ingen_nil(NS_INGEN "nil")
- , ingen_node(NS_INGEN "node")
- , ingen_polyphonic(NS_INGEN "polyphonic")
- , ingen_polyphony(NS_INGEN "polyphony")
- , ingen_selected(NS_INGEN "selected")
- , ingen_value(NS_INGEN "value")
- , ingenui_canvas_x(NS_INGENUI "canvas-x")
- , ingenui_canvas_y(NS_INGENUI "canvas-y")
- , lv2_AudioPort(NS_LV2 "AudioPort")
- , lv2_ControlPort(NS_LV2 "ControlPort")
- , lv2_InputPort(NS_LV2 "InputPort")
- , lv2_OutputPort(NS_LV2 "OutputPort")
- , lv2_Plugin(NS_LV2 "Plugin")
- , lv2_default(NS_LV2 "default")
- , lv2_index(NS_LV2 "index")
- , lv2_integer(NS_LV2 "integer")
- , lv2_maximum(NS_LV2 "maximum")
- , lv2_minimum(NS_LV2 "minimum")
- , lv2_name(NS_LV2 "name")
- , lv2_portProperty(NS_LV2 "portProperty")
- , lv2_symbol(NS_LV2 "symbol")
- , lv2_toggled(NS_LV2 "toggled")
- , lv2ev_EventPort("http://lv2plug.in/ns/ext/event#EventPort")
- , midi_Bender(NS_MIDI "Bender")
- , midi_ChannelPressure(NS_MIDI "ChannelPressure")
- , midi_Controller(NS_MIDI "Controller")
- , midi_Note(NS_MIDI "Note")
- , midi_controllerNumber(NS_MIDI "controllerNumber")
- , midi_event("http://lv2plug.in/ns/ext/midi#MidiEvent")
- , midi_noteNumber(NS_MIDI "noteNumber")
- , atom_MessagePort("http://lv2plug.in/ns/ext/atom#MessagePort")
- , atom_ValuePort("http://lv2plug.in/ns/ext/atom#ValuePort")
- , atom_supports("http://lv2plug.in/ns/ext/atom#supports")
- , object_class_bool(LV2_ATOM_URI "#Bool")
- , object_class_float32(LV2_ATOM_URI "#Float32")
- , object_class_int32(LV2_ATOM_URI "#Int32")
- , object_class_string(LV2_ATOM_URI "#String")
- , object_class_vector(LV2_ATOM_URI "#Vector")
- , object_transfer(LV2_ATOM_URI "#ObjectTransfer")
- , rdf_instanceOf(NS_RDF "instanceOf")
- , rdf_type(NS_RDF "type")
- , rdfs_seeAlso(NS_RDFS "seeAlso")
- , ui_format_events("http://lv2plug.in/ns/extensions/ui#Events")
- , wildcard(NS_INGEN "wildcard")
+ : atom_MessagePort (LV2_ATOM_URI "#MessagePort")
+ , atom_AtomTransfer (LV2_ATOM_URI "#AtomTransfer")
+ , atom_Bool (LV2_ATOM_URI "#Bool")
+ , atom_Float32 (LV2_ATOM_URI "#Float32")
+ , atom_Int32 (LV2_ATOM_URI "#Int32")
+ , atom_String (LV2_ATOM_URI "#String")
+ , atom_ValuePort (LV2_ATOM_URI "#ValuePort")
+ , atom_Vector (LV2_ATOM_URI "#Vector")
+ , atom_supports (LV2_ATOM_URI "#supports")
+ , ctx_AudioContext (NS_CTX "AudioContext")
+ , ctx_MessageContext (NS_CTX "MessageContext")
+ , ctx_context (NS_CTX "context")
+ , doap_name ("http://usefulinc.com/ns/doap#name")
+ , ev_EventPort ("http://lv2plug.in/ns/ext/event#EventPort")
+ , ingen_Internal (NS_INGEN "Internal")
+ , ingen_LADSPAPlugin (NS_INGEN "LADSPAPlugin")
+ , ingen_Node (NS_INGEN "Node")
+ , ingen_Patch (NS_INGEN "Patch")
+ , ingen_Port (NS_INGEN "Port")
+ , ingen_broadcast (NS_INGEN "broadcast")
+ , ingen_controlBinding (NS_INGEN "controlBinding")
+ , ingen_document (NS_INGEN "document")
+ , ingen_enabled (NS_INGEN "enabled")
+ , ingen_nil (NS_INGEN "nil")
+ , ingen_node (NS_INGEN "node")
+ , ingen_polyphonic (NS_INGEN "polyphonic")
+ , ingen_polyphony (NS_INGEN "polyphony")
+ , ingen_selected (NS_INGEN "selected")
+ , ingen_value (NS_INGEN "value")
+ , ingenui_canvas_x (NS_INGENUI "canvas-x")
+ , ingenui_canvas_y (NS_INGENUI "canvas-y")
+ , lv2_AudioPort (NS_LV2 "AudioPort")
+ , lv2_ControlPort (NS_LV2 "ControlPort")
+ , lv2_InputPort (NS_LV2 "InputPort")
+ , lv2_OutputPort (NS_LV2 "OutputPort")
+ , lv2_Plugin (NS_LV2 "Plugin")
+ , lv2_default (NS_LV2 "default")
+ , lv2_index (NS_LV2 "index")
+ , lv2_integer (NS_LV2 "integer")
+ , lv2_maximum (NS_LV2 "maximum")
+ , lv2_minimum (NS_LV2 "minimum")
+ , lv2_name (NS_LV2 "name")
+ , lv2_portProperty (NS_LV2 "portProperty")
+ , lv2_symbol (NS_LV2 "symbol")
+ , lv2_toggled (NS_LV2 "toggled")
+ , midi_Bender (NS_MIDI "Bender")
+ , midi_ChannelPressure (NS_MIDI "ChannelPressure")
+ , midi_Controller (NS_MIDI "Controller")
+ , midi_MidiEvent ("http://lv2plug.in/ns/ext/midi#MidiEvent")
+ , midi_Note (NS_MIDI "Note")
+ , midi_controllerNumber (NS_MIDI "controllerNumber")
+ , midi_noteNumber (NS_MIDI "noteNumber")
+ , rdf_instanceOf (NS_RDF "instanceOf")
+ , rdf_type (NS_RDF "type")
+ , rdfs_seeAlso (NS_RDFS "seeAlso")
+ , ui_Events ("http://lv2plug.in/ns/extensions/ui#Events")
+ , wildcard (NS_INGEN "wildcard")
{
uri_map_feature_data.uri_to_id = &LV2URIMap::uri_map_uri_to_id;
uri_map_feature_data.callback_data = this;
diff --git a/src/shared/LV2URIMap.hpp b/src/shared/LV2URIMap.hpp
index 13a97129..c63214ea 100644
--- a/src/shared/LV2URIMap.hpp
+++ b/src/shared/LV2URIMap.hpp
@@ -78,10 +78,20 @@ public:
uint32_t id;
};
+ const Quark atom_AtomTransfer;
+ const Quark atom_Bool;
+ const Quark atom_Float32;
+ const Quark atom_Int32;
+ const Quark atom_MessagePort;
+ const Quark atom_String;
+ const Quark atom_ValuePort;
+ const Quark atom_Vector;
+ const Quark atom_supports;
const Quark ctx_AudioContext;
const Quark ctx_MessageContext;
const Quark ctx_context;
const Quark doap_name;
+ const Quark ev_EventPort;
const Quark ingen_Internal;
const Quark ingen_LADSPAPlugin;
const Quark ingen_Node;
@@ -113,27 +123,17 @@ public:
const Quark lv2_portProperty;
const Quark lv2_symbol;
const Quark lv2_toggled;
- const Quark lv2ev_EventPort;
const Quark midi_Bender;
const Quark midi_ChannelPressure;
const Quark midi_Controller;
+ const Quark midi_MidiEvent;
const Quark midi_Note;
const Quark midi_controllerNumber;
- const Quark midi_event;
const Quark midi_noteNumber;
- const Quark atom_MessagePort;
- const Quark atom_ValuePort;
- const Quark atom_supports;
- const Quark object_class_bool;
- const Quark object_class_float32;
- const Quark object_class_int32;
- const Quark object_class_string;
- const Quark object_class_vector;
- const Quark object_transfer;
const Quark rdf_instanceOf;
const Quark rdf_type;
const Quark rdfs_seeAlso;
- const Quark ui_format_events;
+ const Quark ui_Events;
const Quark wildcard;
};
diff --git a/src/shared/ResourceImpl.cpp b/src/shared/ResourceImpl.cpp
index 5d79ed9b..1801eb9f 100644
--- a/src/shared/ResourceImpl.cpp
+++ b/src/shared/ResourceImpl.cpp
@@ -146,7 +146,7 @@ ResourceImpl::type(
} else if (atom == uris.lv2_ControlPort) {
port = true;
data_type = PortType::CONTROL;
- } else if (atom == uris.lv2ev_EventPort) {
+ } else if (atom == uris.ev_EventPort) {
data_type = PortType::EVENTS;
port = true;
} else if (atom == uris.atom_ValuePort) {