diff options
Diffstat (limited to 'src/engine/OSCClientSender.cpp')
-rw-r--r-- | src/engine/OSCClientSender.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/engine/OSCClientSender.cpp b/src/engine/OSCClientSender.cpp index aa99c1d8..fb87ba23 100644 --- a/src/engine/OSCClientSender.cpp +++ b/src/engine/OSCClientSender.cpp @@ -313,6 +313,31 @@ OSCClientSender::new_plugin(const std::string& uri, } +void +OSCClientSender::new_object(const Shared::GraphObject* object) +{ + using namespace Shared; + + const Patch* patch = dynamic_cast<const Patch*>(object); + if (patch) { + new_patch(patch->path(), patch->internal_polyphony()); + return; + } + + const Node* node = dynamic_cast<const Node*>(object); + if (node) { + new_node(node->path(), node->plugin()->uri()); + return; + } + + const Port* port = dynamic_cast<const Port*>(object); + if (port) { + new_port(port->path(), port->type().uri(), port->index(), !port->is_input()); + return; + } +} + + /** \page client_osc_namespace * <p> \b /ingen/new_patch - Notification of a new patch * \arg \b path (string) - Path of new patch |