From fe353cce9665b33a7372ed2d1683b3c2748625f7 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 2 May 2012 06:24:22 +0000 Subject: Preliminary socket control interface, and ingen_cmd command line interface which uses it. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4311 a436a847-0d15-0410-975c-d299462d15a1 --- src/shared/AtomReader.cpp | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'src/shared/AtomReader.cpp') diff --git a/src/shared/AtomReader.cpp b/src/shared/AtomReader.cpp index 6925d478..7cafd919 100644 --- a/src/shared/AtomReader.cpp +++ b/src/shared/AtomReader.cpp @@ -33,7 +33,7 @@ AtomReader::AtomReader(LV2URIMap& map, URIs& uris, Forge& forge, Interface& ifac } void -AtomReader::get_uri(const LV2_Atom* in, Raul::Atom& out) +AtomReader::get_atom(const LV2_Atom* in, Raul::Atom& out) { if (in) { if (in->type == _uris.atom_URID) { @@ -49,9 +49,14 @@ void AtomReader::get_props(const LV2_Atom_Object* obj, Ingen::Resource::Properties& props) { + if (obj->body.otype) { + props.insert( + std::make_pair(_uris.rdf_type, + _forge.alloc_uri(_map.unmap_uri(obj->body.otype)))); + } LV2_ATOM_OBJECT_FOREACH(obj, p) { Raul::Atom val; - get_uri(&p->value, val); + get_atom(&p->value, val); props.insert(std::make_pair(_map.unmap_uri(p->key), val)); } } @@ -96,8 +101,8 @@ AtomReader::write(const LV2_Atom* msg) Raul::Atom tail_atom; Raul::Atom head_atom; - get_uri(tail, tail_atom); - get_uri(head, head_atom); + get_atom(tail, tail_atom); + get_atom(head, head_atom); if (tail_atom.is_valid() && head_atom.is_valid()) { _iface.disconnect(Raul::Path(tail_atom.get_uri()), Raul::Path(head_atom.get_uri())); @@ -130,8 +135,8 @@ AtomReader::write(const LV2_Atom* msg) Raul::Atom tail_atom; Raul::Atom head_atom; - get_uri(tail, tail_atom); - get_uri(head, head_atom); + get_atom(tail, tail_atom); + get_atom(head, head_atom); _iface.connect(Raul::Path(tail_atom.get_uri()), Raul::Path(head_atom.get_uri())); } else { @@ -153,7 +158,7 @@ AtomReader::write(const LV2_Atom* msg) LV2_ATOM_OBJECT_FOREACH(body, p) { Raul::Atom val; - get_uri(&p->value, val); + get_atom(&p->value, val); _iface.set_property(subject_uri, _map.unmap_uri(p->key), val); } } else if (obj->body.otype == _uris.patch_Patch) { -- cgit v1.2.1