From ad07c414d557629251b2f4ea4078c22f241cc865 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 13 Feb 2010 22:07:26 +0000 Subject: Learn and remove bindings exclusively through property interface. Note this commit breaks some aspects of OSC and HTTP control for now. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2442 a436a847-0d15-0410-975c-d299462d15a1 --- src/engine/OSCClientSender.cpp | 53 ++++++++++++++++++++++++------------------ 1 file changed, 31 insertions(+), 22 deletions(-) (limited to 'src/engine/OSCClientSender.cpp') diff --git a/src/engine/OSCClientSender.cpp b/src/engine/OSCClientSender.cpp index 115b22de..c0f8e039 100644 --- a/src/engine/OSCClientSender.cpp +++ b/src/engine/OSCClientSender.cpp @@ -42,7 +42,7 @@ namespace Ingen { /** \page client_osc_namespace - *

/ingen/ok

+ *

/ok

* \arg \b response-id (int) - Request ID this is a response to * * Successful response to some command. @@ -53,7 +53,7 @@ OSCClientSender::response_ok(int32_t id) if (!_enabled) return; - if (lo_send(_address, "/ingen/ok", "i", id) < 0) { + if (lo_send(_address, "/ok", "i", id) < 0) { Raul::error << "Unable to send OK " << id << "! (" << lo_address_errstr(_address) << ")" << endl; } @@ -61,7 +61,7 @@ OSCClientSender::response_ok(int32_t id) /** \page client_osc_namespace - *

/ingen/error

+ *

/error

* \arg \b response-id (int) - Request ID this is a response to * \arg \b message (string) - Error message (natural language text) * @@ -73,7 +73,7 @@ OSCClientSender::response_error(int32_t id, const std::string& msg) if (!_enabled) return; - if (lo_send(_address, "/ingen/error", "is", id, msg.c_str()) < 0) { + if (lo_send(_address, "/error", "is", id, msg.c_str()) < 0) { Raul::error << "Unable to send error " << id << "! (" << lo_address_errstr(_address) << ")" << endl; } @@ -81,7 +81,7 @@ OSCClientSender::response_error(int32_t id, const std::string& msg) /** \page client_osc_namespace - *

/ingen/error

+ *

/error

* \arg \b message (string) - Error message (natural language text) * * Notification that an error has occurred. @@ -91,12 +91,12 @@ OSCClientSender::response_error(int32_t id, const std::string& msg) void OSCClientSender::error(const std::string& msg) { - send("/ingen/error", "s", msg.c_str(), LO_ARGS_END); + send("/error", "s", msg.c_str(), LO_ARGS_END); } /** \page client_osc_namespace - *

/ingen/put

+ *

/put

* \arg \b path (string) - Path of object * \arg \b predicate * \arg \b value @@ -115,12 +115,21 @@ OSCClientSender::put(const Raul::URI& path, lo_message_add_string(m, i->first.c_str()); Raul::AtomLiblo::lo_message_add_atom(m, i->second); } - send_message("/ingen/put", m); + send_message("/put", m); +} + + +void +OSCClientSender::delta(const Raul::URI& path, + const Shared::Resource::Properties& remove, + const Shared::Resource::Properties& add) +{ + warn << "FIXME: OSC DELTA" << endl; } /** \page client_osc_namespace - *

/ingen/move

+ *

/move

* \arg \b old-path (string) - Old path of object * \arg \b new-path (string) - New path of object * @@ -130,13 +139,13 @@ OSCClientSender::put(const Raul::URI& path, void OSCClientSender::move(const Path& old_path, const Path& new_path) { - send("/ingen/move", "ss", old_path.c_str(), new_path.c_str(), LO_ARGS_END); + send("/move", "ss", old_path.c_str(), new_path.c_str(), LO_ARGS_END); } /** \page client_osc_namespace - *

/ingen/delete

+ *

/delete

* \arg \b path (string) - Path of object (which no longer exists) * * DELETE an object (see \ref methods). @@ -144,12 +153,12 @@ OSCClientSender::move(const Path& old_path, const Path& new_path) void OSCClientSender::del(const Path& path) { - send("/ingen/delete", "s", path.c_str(), LO_ARGS_END); + send("/delete", "s", path.c_str(), LO_ARGS_END); } /** \page client_osc_namespace - *

/ingen/new_connection

+ *

/connect

* \arg \b src-path (string) - Path of the source port * \arg \b dst-path (string) - Path of the destination port * @@ -158,12 +167,12 @@ OSCClientSender::del(const Path& path) void OSCClientSender::connect(const Path& src_port_path, const Path& dst_port_path) { - send("/ingen/new_connection", "ss", src_port_path.c_str(), dst_port_path.c_str(), LO_ARGS_END); + send("/connect", "ss", src_port_path.c_str(), dst_port_path.c_str(), LO_ARGS_END); } /** \page client_osc_namespace - *

/ingen/disconnection

+ *

/disconnect

* \arg \b src-path (string) - Path of the source port * \arg \b dst-path (string) - Path of the destination port * @@ -172,12 +181,12 @@ OSCClientSender::connect(const Path& src_port_path, const Path& dst_port_path) void OSCClientSender::disconnect(const Path& src_port_path, const Path& dst_port_path) { - send("/ingen/disconnection", "ss", src_port_path.c_str(), dst_port_path.c_str(), LO_ARGS_END); + send("/disconnect", "ss", src_port_path.c_str(), dst_port_path.c_str(), LO_ARGS_END); } /** \page client_osc_namespace - *

/ingen/set_property

+ *

/set_property

* \arg \b path (string) - Path of the object associated with property (node, patch, or port) * \arg \b key (string) * \arg \b value (string) @@ -191,12 +200,12 @@ OSCClientSender::set_property(const URI& path, const URI& key, const Atom& value lo_message_add_string(m, path.c_str()); lo_message_add_string(m, key.c_str()); AtomLiblo::lo_message_add_atom(m, value); - send_message("/ingen/set_property", m); + send_message("/set_property", m); } /** \page client_osc_namespace - *

/ingen/set_port_value

+ *

/set_port_value

* \arg \b path (string) - Path of port * \arg \b voice (int) - Voice which is set to this value * \arg \b value (any) - New value of port @@ -209,12 +218,12 @@ OSCClientSender::set_voice_value(const Path& port_path, uint32_t voice, const At lo_message m = lo_message_new(); lo_message_add_string(m, port_path.c_str()); AtomLiblo::lo_message_add_atom(m, value); - send_message("/ingen/set_port_value", m); + send_message("/set_port_value", m); } /** \page client_osc_namespace - *

/ingen/activity

+ *

/activity

* \arg \b path (string) - Path of object * * Notification of "activity" (e.g. port message blinkenlights). @@ -225,7 +234,7 @@ OSCClientSender::activity(const Path& path) if (!_enabled) return; - lo_send(_address, "/ingen/activity", "s", path.c_str(), LO_ARGS_END); + lo_send(_address, "/activity", "s", path.c_str(), LO_ARGS_END); } -- cgit v1.2.1