diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/shared/AtomReader.cpp | 16 |
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; |