summaryrefslogtreecommitdiffstats
path: root/src/engine/events/RequestMetadataEvent.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2009-05-27 23:21:34 +0000
committerDavid Robillard <d@drobilla.net>2009-05-27 23:21:34 +0000
commit2f595631859574bfa7779ebb42f42b8590f5424c (patch)
treec91c0cddcd93af991161c6cde4eceaaf45c5c8d5 /src/engine/events/RequestMetadataEvent.cpp
parent20ff9af76b21b751ac29b354cf557e86b69c52f7 (diff)
downloadingen-2f595631859574bfa7779ebb42f42b8590f5424c.tar.gz
ingen-2f595631859574bfa7779ebb42f42b8590f5424c.tar.bz2
ingen-2f595631859574bfa7779ebb42f42b8590f5424c.zip
Remove 'property' vs 'variable' dichotomy in favour of 'meta objects' (to match serialisation).
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2016 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/engine/events/RequestMetadataEvent.cpp')
-rw-r--r--src/engine/events/RequestMetadataEvent.cpp21
1 files changed, 13 insertions, 8 deletions
diff --git a/src/engine/events/RequestMetadataEvent.cpp b/src/engine/events/RequestMetadataEvent.cpp
index fe1f0cab..5d0b15bc 100644
--- a/src/engine/events/RequestMetadataEvent.cpp
+++ b/src/engine/events/RequestMetadataEvent.cpp
@@ -37,7 +37,7 @@ using namespace Shared;
RequestMetadataEvent::RequestMetadataEvent(Engine& engine,
SharedPtr<Responder> responder,
SampleCount timestamp,
- bool is_property,
+ bool is_meta,
const URI& subject,
const URI& key)
: QueuedEvent(engine, responder, timestamp)
@@ -46,7 +46,7 @@ RequestMetadataEvent::RequestMetadataEvent(Engine& engine,
, _uri(subject)
, _key(key)
, _resource(0)
- , _is_property(is_property)
+ , _is_meta(is_meta)
{
}
@@ -67,12 +67,17 @@ RequestMetadataEvent::pre_process()
}
}
- if (_key.str() == "ingen:value")
- _special_type = PORT_VALUE;
- else if (!is_object || _is_property)
+ GraphObjectImpl* obj = dynamic_cast<GraphObjectImpl*>(_resource);
+ if (obj) {
+ if (_key.str() == "ingen:value")
+ _special_type = PORT_VALUE;
+ else if (_is_meta)
+ _value = obj->meta().get_property(_key);
+ else
+ _value = obj->get_property(_key);
+ } else {
_value = _resource->get_property(_key);
- else
- _value = dynamic_cast<GraphObjectImpl*>(_resource)->get_variable(_key);
+ }
QueuedEvent::pre_process();
}
@@ -111,7 +116,7 @@ RequestMetadataEvent::post_process()
_responder->respond_error(msg);
} else {
_responder->respond_ok();
- _responder->client()->set_variable(_uri, _key, _value);
+ _responder->client()->set_property(_uri, _key, _value);
}
} else {
_responder->respond_error("Unknown client");