From 6f93b3d7c80f9dee2d95fac1bbc4f781a6f45979 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 18 Sep 2006 06:24:53 +0000 Subject: Work on loading old (deprecated) patches. More error tolerance in Store, related bugfixes. Patch port adding (threading) bug fixed (made event blocking). Better PatchView cacheing. Moved generic things from engine to util (shared) Bug fixes, features, etc. git-svn-id: http://svn.drobilla.net/lad/ingen@142 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/engine/OSCEngineReceiver.cpp | 57 +++++++++++++++++++++++++++++------ 1 file changed, 48 insertions(+), 9 deletions(-) (limited to 'src/libs/engine/OSCEngineReceiver.cpp') diff --git a/src/libs/engine/OSCEngineReceiver.cpp b/src/libs/engine/OSCEngineReceiver.cpp index 92ab08f0..50876850 100644 --- a/src/libs/engine/OSCEngineReceiver.cpp +++ b/src/libs/engine/OSCEngineReceiver.cpp @@ -88,7 +88,7 @@ OSCEngineReceiver::OSCEngineReceiver(CountedPtr engine, size_t queue_siz lo_server_add_method(_server, "/om/synth/disable_patch", "is", disable_patch_cb, this); lo_server_add_method(_server, "/om/synth/clear_patch", "is", clear_patch_cb, this); lo_server_add_method(_server, "/om/synth/create_port", "issi", create_port_cb, this); - lo_server_add_method(_server, "/om/synth/create_node", "isssi", create_node_cb, this); + lo_server_add_method(_server, "/om/synth/create_node", "issssi", create_node_cb, this); lo_server_add_method(_server, "/om/synth/create_node", "issi", create_node_by_uri_cb, this); lo_server_add_method(_server, "/om/synth/destroy", "is", destroy_cb, this); lo_server_add_method(_server, "/om/synth/rename", "iss", rename_cb, this); @@ -110,9 +110,12 @@ OSCEngineReceiver::OSCEngineReceiver(CountedPtr engine, size_t queue_siz lo_server_add_method(_server, "/om/metadata/set", NULL, metadata_set_cb, this); // Queries + lo_server_add_method(_server, "/om/request/plugin", "is", request_plugin_cb, this); + lo_server_add_method(_server, "/om/request/object", "is", request_object_cb, this); + lo_server_add_method(_server, "/om/request/port_value", "is", request_port_value_cb, this); lo_server_add_method(_server, "/om/request/plugins", "i", request_plugins_cb, this); lo_server_add_method(_server, "/om/request/all_objects", "i", request_all_objects_cb, this); - lo_server_add_method(_server, "/om/request/port_value", "is", request_port_value_cb, this); + // DSSI support #ifdef HAVE_DSSI @@ -799,29 +802,37 @@ OSCEngineReceiver::m_metadata_get_cb(const char* path, const char* types, lo_arg /** \page engine_osc_namespace - *

\b /om/responder/plugins - Requests the engine send a list of all known plugins. + *

\b /om/responder/plugin - Requests the engine send the value of a port. * \arg \b response-id (integer) + * \arg \b port-path (string) - Full path of port to send the value of

\n \n * * \li Reply will be sent to client registered with the source address of this message.

\n \n */ int -OSCEngineReceiver::m_request_plugins_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg) +OSCEngineReceiver::m_request_plugin_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg) { - request_plugins(); + const char* uri = &argv[1]->s; + + request_plugin(uri); + return 0; } /** \page engine_osc_namespace - *

\b /om/responder/all_objects - Requests the engine send information about \em all objects (patches, nodes, etc) + *

\b /om/responder/object - Requests the engine send the value of a port. * \arg \b response-id (integer) - * + * \arg \b port-path (string) - Full path of port to send the value of

\n \n + * * \li Reply will be sent to client registered with the source address of this message.

\n \n */ int -OSCEngineReceiver::m_request_all_objects_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg) +OSCEngineReceiver::m_request_object_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg) { - request_all_objects(); + const char* object_path = &argv[1]->s; + + request_object(object_path); + return 0; } @@ -843,6 +854,34 @@ OSCEngineReceiver::m_request_port_value_cb(const char* path, const char* types, } +/** \page engine_osc_namespace + *

\b /om/responder/plugins - Requests the engine send a list of all known plugins. + * \arg \b response-id (integer) + * + * \li Reply will be sent to client registered with the source address of this message.

\n \n + */ +int +OSCEngineReceiver::m_request_plugins_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg) +{ + request_plugins(); + return 0; +} + + +/** \page engine_osc_namespace + *

\b /om/responder/all_objects - Requests the engine send information about \em all objects (patches, nodes, etc) + * \arg \b response-id (integer) + * + * \li Reply will be sent to client registered with the source address of this message.

\n \n + */ +int +OSCEngineReceiver::m_request_all_objects_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg) +{ + request_all_objects(); + return 0; +} + + #ifdef HAVE_DSSI int OSCEngineReceiver::m_dssi_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg) -- cgit v1.2.1