summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-04-12 23:47:14 +0000
committerDavid Robillard <d@drobilla.net>2012-04-12 23:47:14 +0000
commitf74b7279cf959a3b8f943e89db350af432ae78a8 (patch)
tree607d19ca9015dd7c02b5b9d00b0ea7c4becb1fe4 /src
parentb9ee86cf97f9ba8f6139c83f57b8d5848e7f90e4 (diff)
downloadingen-f74b7279cf959a3b8f943e89db350af432ae78a8.tar.gz
ingen-f74b7279cf959a3b8f943e89db350af432ae78a8.tar.bz2
ingen-f74b7279cf959a3b8f943e89db350af432ae78a8.zip
Use URI defines from LV2 headers where possible.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4175 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r--src/client/PortModel.cpp10
-rw-r--r--src/gui/Port.cpp5
-rw-r--r--src/serialisation/Parser.cpp9
-rw-r--r--src/serialisation/Serialiser.cpp8
-rw-r--r--src/shared/URIs.cpp4
5 files changed, 7 insertions, 29 deletions
diff --git a/src/client/PortModel.cpp b/src/client/PortModel.cpp
index 8cdac7af..2e503100 100644
--- a/src/client/PortModel.cpp
+++ b/src/client/PortModel.cpp
@@ -60,15 +60,5 @@ PortModel::set(SharedPtr<ObjectModel> model)
ObjectModel::set(model);
}
-bool
-PortModel::has_context(const Raul::URI& uri) const
-{
- const Raul::Atom& context = get_property(_uris.ctx_context);
- if (uri == _uris.ctx_audioContext && !context.is_valid())
- return true;
- else
- return context == _uris.forge.alloc_uri(uri.str());
-}
-
} // namespace Client
} // namespace Ingen
diff --git a/src/gui/Port.cpp b/src/gui/Port.cpp
index a6b72ace..7631837a 100644
--- a/src/gui/Port.cpp
+++ b/src/gui/Port.cpp
@@ -294,8 +294,6 @@ Port::property_changed(const URI& key, const Atom& value)
} else if (key == uris.lv2_portProperty) {
if (value == uris.lv2_toggled)
set_control_is_toggle(true);
- } else if (key == uris.ctx_context) {
- Raul::info << "TODO: Visual indication of port context?" << std::endl;
} else if (key == uris.lv2_name) {
if (value.type() == uris.forge.String
&& _app.configuration()->name_style() == Configuration::HUMAN) {
@@ -313,9 +311,6 @@ Port::dash()
if (!pm)
return NULL;
- if (pm->has_context(uris.ctx_audioContext))
- return NULL;
-
if (!_dash) {
_dash = new ArtVpathDash();
_dash->n_dash = 2;
diff --git a/src/serialisation/Parser.cpp b/src/serialisation/Parser.cpp
index 1ce1410b..edc0e534 100644
--- a/src/serialisation/Parser.cpp
+++ b/src/serialisation/Parser.cpp
@@ -34,7 +34,6 @@
#define LOG(s) s << "[Parser] "
-#define NS_LV2 "http://lv2plug.in/ns/lv2core#"
#define NS_RDF "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
#define NS_RDFS "http://www.w3.org/2000/01/rdf-schema#"
@@ -285,7 +284,7 @@ parse_patch(Ingen::Shared::World* world,
{
const Sord::URI ingen_node(*world->rdf_world(), NS_INGEN "node");
const Sord::URI ingen_polyphony(*world->rdf_world(), NS_INGEN "polyphony");
- const Sord::URI lv2_port(*world->rdf_world(), NS_LV2 "port");
+ const Sord::URI lv2_port(*world->rdf_world(), LV2_CORE__port);
const URIs& uris = *world->uris().get();
const Sord::Node& patch = subject_node;
@@ -475,9 +474,9 @@ parse(Ingen::Shared::World* world,
const Sord::URI node_class (*world->rdf_world(), NS_INGEN "Node");
const Sord::URI port_class (*world->rdf_world(), NS_INGEN "Port");
const Sord::URI internal_class(*world->rdf_world(), NS_INGEN "Internal");
- const Sord::URI in_port_class (*world->rdf_world(), NS_LV2 "InputPort");
- const Sord::URI out_port_class(*world->rdf_world(), NS_LV2 "OutputPort");
- const Sord::URI lv2_class (*world->rdf_world(), NS_LV2 "Plugin");
+ const Sord::URI in_port_class (*world->rdf_world(), LV2_CORE__InputPort);
+ const Sord::URI out_port_class(*world->rdf_world(), LV2_CORE__OutputPort);
+ const Sord::URI lv2_class (*world->rdf_world(), LV2_CORE__Plugin);
const Sord::URI rdf_type (*world->rdf_world(), NS_RDF "type");
Sord::Node subject = model.base_uri();
diff --git a/src/serialisation/Serialiser.cpp b/src/serialisation/Serialiser.cpp
index c7e487c4..38c47dc3 100644
--- a/src/serialisation/Serialiser.cpp
+++ b/src/serialisation/Serialiser.cpp
@@ -48,8 +48,6 @@
#define LOG(s) s << "[Serialiser] "
-#define NS_LV2 "http://lv2plug.in/ns/lv2core#"
-
using namespace std;
using namespace Raul;
using namespace Sord;
@@ -431,12 +429,12 @@ Serialiser::Impl::serialise_patch(SharedPtr<const Patch> patch,
const Sord::Node port_id = path_rdf_node(p->path());
// Ensure lv2:name always exists so Patch is a valid LV2 plugin
- if (p->properties().find(NS_LV2 "name") == p->properties().end())
- p->set_property(NS_LV2 "name",
+ if (p->properties().find(LV2_CORE__name) == p->properties().end())
+ p->set_property(LV2_CORE__name,
_world.forge().alloc(p->symbol().c_str()));
_model->add_statement(patch_id,
- Sord::URI(world, NS_LV2 "port"),
+ Sord::URI(world, LV2_CORE__port),
port_id);
serialise_port(p, Resource::INTERNAL, port_id);
}
diff --git a/src/shared/URIs.cpp b/src/shared/URIs.cpp
index 85d465ab..ae14782a 100644
--- a/src/shared/URIs.cpp
+++ b/src/shared/URIs.cpp
@@ -43,7 +43,6 @@ URIs::Quark::Quark(Ingen::Forge& forge, LV2URIMap* map, const char* c_str)
{
}
-#define NS_CTX "http://lv2plug.in/ns/ext/contexts#"
#define NS_INGEN "http://drobilla.net/ns/ingen#"
#define NS_RDF "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
#define NS_RDFS "http://www.w3.org/2000/01/rdf-schema#"
@@ -64,9 +63,6 @@ URIs::URIs(Ingen::Forge& f, LV2URIMap* map)
, 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")