summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-04-28 02:36:39 +0000
committerDavid Robillard <d@drobilla.net>2012-04-28 02:36:39 +0000
commiteb3f6dc10b8b1541fa9084bea0deef7dec16d073 (patch)
tree6046718d71cac9f32c90df0ba7947b6eda3358af
parentbcdedde58a39ec0008e75fcc31e975551c68ab15 (diff)
downloadingen-eb3f6dc10b8b1541fa9084bea0deef7dec16d073.tar.gz
ingen-eb3f6dc10b8b1541fa9084bea0deef7dec16d073.tar.bz2
ingen-eb3f6dc10b8b1541fa9084bea0deef7dec16d073.zip
Implement set_property via atom interface (working blinkenlights).
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4294 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r--src/shared/AtomReader.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/shared/AtomReader.cpp b/src/shared/AtomReader.cpp
index 99a09b44..6925d478 100644
--- a/src/shared/AtomReader.cpp
+++ b/src/shared/AtomReader.cpp
@@ -140,6 +140,22 @@ AtomReader::write(const LV2_Atom* msg)
_iface.set_response_id(obj->body.id);
_iface.put(subject_uri, props);
}
+ } else if (obj->body.otype == _uris.patch_Set) {
+ const LV2_Atom_Object* body = NULL;
+ lv2_atom_object_get(obj, (LV2_URID)_uris.patch_body, &body, 0);
+ if (!body) {
+ Raul::warn << "Set message has no body" << std::endl;
+ return;
+ } else if (!subject_uri) {
+ Raul::warn << "Set message has no subject" << std::endl;
+ return;
+ }
+
+ LV2_ATOM_OBJECT_FOREACH(body, p) {
+ Raul::Atom val;
+ get_uri(&p->value, val);
+ _iface.set_property(subject_uri, _map.unmap_uri(p->key), val);
+ }
} else if (obj->body.otype == _uris.patch_Patch) {
if (!subject_uri) {
Raul::warn << "Put message has no subject" << std::endl;