summaryrefslogtreecommitdiffstats
path: root/src/shared/AtomReader.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-05-10 02:14:55 +0000
committerDavid Robillard <d@drobilla.net>2012-05-10 02:14:55 +0000
commit281bbcc6a7208c28283bc9bdd521c5d6cc48a60f (patch)
tree6cfc2bf6c3c0d92b3cb5a79a4d019d5952d41989 /src/shared/AtomReader.cpp
parentcd2ac251d7e076e3bf25f2640d1684447efa83d3 (diff)
downloadingen-281bbcc6a7208c28283bc9bdd521c5d6cc48a60f.tar.gz
ingen-281bbcc6a7208c28283bc9bdd521c5d6cc48a60f.tar.bz2
ingen-281bbcc6a7208c28283bc9bdd521c5d6cc48a60f.zip
Bidirectional socket communication (GUI once again works remotely).
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4335 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/shared/AtomReader.cpp')
-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 7cafd919..45b60c35 100644
--- a/src/shared/AtomReader.cpp
+++ b/src/shared/AtomReader.cpp
@@ -188,6 +188,22 @@ AtomReader::write(const LV2_Atom* msg)
get_props(remove, remove_props);
_iface.delta(subject_uri, remove_props, add_props);
+ } else if (obj->body.otype == _uris.patch_Response) {
+ const LV2_Atom* request = NULL;
+ const LV2_Atom* body = NULL;
+ lv2_atom_object_get(obj,
+ (LV2_URID)_uris.patch_request, &request,
+ (LV2_URID)_uris.patch_body, &body,
+ 0);
+ if (!request || request->type != _uris.atom_Int) {
+ Raul::warn << "Response message has no request" << std::endl;
+ return;
+ } else if (!body || body->type != _uris.atom_Int) {
+ Raul::warn << "Response message body is not integer" << std::endl;
+ return;
+ }
+ _iface.response(((LV2_Atom_Int*)request)->body,
+ (Ingen::Status)((LV2_Atom_Int*)body)->body);
} else {
Raul::warn << "Unknown object type <"
<< _map.unmap_uri(obj->body.otype)