From d6823fa9b29bcff74ca180e6d389d8a21cf88d1f Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 17 Aug 2008 03:10:58 +0000 Subject: There! Loader uses only CommonInterface and is now able to parse into a client or engine. Proper OSC serialisation of boolean atoms. Remove patch_enabled and patch_disabled calls/signals/etc in favour of new generic "property" mechanism (courtesy of which much more killed API is to come). git-svn-id: http://svn.drobilla.net/lad/ingen@1410 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/client/OSCEngineSender.cpp | 38 +++++++++++++++++-------------------- 1 file changed, 17 insertions(+), 21 deletions(-) (limited to 'src/libs/client/OSCEngineSender.cpp') diff --git a/src/libs/client/OSCEngineSender.cpp b/src/libs/client/OSCEngineSender.cpp index 5f2db7ad..d235e7a9 100644 --- a/src/libs/client/OSCEngineSender.cpp +++ b/src/libs/client/OSCEngineSender.cpp @@ -140,9 +140,11 @@ OSCEngineSender::new_patch(const string& path, void OSCEngineSender::new_port(const string& path, + uint32_t index, const string& data_type, bool is_output) { + // FIXME: use index send("/ingen/new_port", "issi", next_id(), path.c_str(), @@ -263,26 +265,6 @@ OSCEngineSender::set_polyphonic(const string& path, bool poly) } -void -OSCEngineSender::enable_patch(const string& patch_path) -{ - send("/ingen/enable_patch", "is", - next_id(), - patch_path.c_str(), - LO_ARGS_END); -} - - -void -OSCEngineSender::disable_patch(const string& patch_path) -{ - send("/ingen/disable_patch", "is", - next_id(), - patch_path.c_str(), - LO_ARGS_END); -} - - void OSCEngineSender::connect(const string& src_port_path, const string& dst_port_path) @@ -415,7 +397,6 @@ OSCEngineSender::set_variable(const string& obj_path, const string& predicate, const Raul::Atom& value) { - lo_message m = lo_message_new(); lo_message_add_int32(m, next_id()); lo_message_add_string(m, obj_path.c_str()); @@ -424,6 +405,21 @@ OSCEngineSender::set_variable(const string& obj_path, send_message("/ingen/set_variable", m); } + +void +OSCEngineSender::set_property(const string& obj_path, + const string& predicate, + const Raul::Atom& value) +{ + lo_message m = lo_message_new(); + lo_message_add_int32(m, next_id()); + lo_message_add_string(m, obj_path.c_str()); + lo_message_add_string(m, predicate.c_str()); + Raul::AtomLiblo::lo_message_add_atom(m, value); + send_message("/ingen/set_property", m); +} + + // Requests // -- cgit v1.2.1