From 5dc6649496e938b32a5fe9f341de6cce962d3731 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 14 Jul 2006 22:24:00 +0000 Subject: Enforced OSC path restrictions on Path for spec conformance (since GraphObject paths will soon be part of OSC paths) git-svn-id: http://svn.drobilla.net/lad/ingen@88 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/engine/events/ConnectionEvent.cpp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'src/libs/engine/events/ConnectionEvent.cpp') diff --git a/src/libs/engine/events/ConnectionEvent.cpp b/src/libs/engine/events/ConnectionEvent.cpp index 0faff865..17e43147 100644 --- a/src/libs/engine/events/ConnectionEvent.cpp +++ b/src/libs/engine/events/ConnectionEvent.cpp @@ -17,6 +17,7 @@ #include "ConnectionEvent.h" #include #include "Responder.h" +#include "types.h" #include "Om.h" #include "OmApp.h" #include "TypedConnection.h" @@ -36,8 +37,8 @@ namespace Om { //// ConnectionEvent //// -ConnectionEvent::ConnectionEvent(CountedPtr responder, const string& src_port_path, const string& dst_port_path) -: QueuedEvent(responder), +ConnectionEvent::ConnectionEvent(CountedPtr responder, samplecount timestamp, const string& src_port_path, const string& dst_port_path) +: QueuedEvent(responder, timestamp), m_src_port_path(src_port_path), m_dst_port_path(dst_port_path), m_patch(NULL), @@ -104,10 +105,10 @@ ConnectionEvent::pre_process() // Create the typed event to actually do the work const DataType type = m_src_port->type(); if (type == DataType::FLOAT) { - m_typed_event = new TypedConnectionEvent(m_responder, + m_typed_event = new TypedConnectionEvent(_responder, _time_stamp, dynamic_cast*>(m_src_port), dynamic_cast*>(m_dst_port)); } else if (type == DataType::MIDI) { - m_typed_event = new TypedConnectionEvent(m_responder, + m_typed_event = new TypedConnectionEvent(_responder, _time_stamp, dynamic_cast*>(m_src_port), dynamic_cast*>(m_dst_port)); } else { m_error = TYPE_MISMATCH; @@ -140,7 +141,7 @@ ConnectionEvent::post_process() // FIXME: better error messages string msg = "Unable to make connection "; msg.append(m_src_port_path + " -> " + m_dst_port_path); - m_responder->respond_error(msg); + _responder->respond_error(msg); } } @@ -150,8 +151,8 @@ ConnectionEvent::post_process() template -TypedConnectionEvent::TypedConnectionEvent(CountedPtr responder, OutputPort* src_port, InputPort* dst_port) -: QueuedEvent(responder), +TypedConnectionEvent::TypedConnectionEvent(CountedPtr responder, samplecount timestamp, OutputPort* src_port, InputPort* dst_port) +: QueuedEvent(responder, timestamp), m_src_port(src_port), m_dst_port(dst_port), m_patch(NULL), @@ -248,11 +249,11 @@ TypedConnectionEvent::post_process() if (m_succeeded) { assert(m_connection != NULL); - m_responder->respond_ok(); + _responder->respond_ok(); om->client_broadcaster()->send_connection(m_connection); } else { - m_responder->respond_error("Unable to make connection."); + _responder->respond_error("Unable to make connection."); } } -- cgit v1.2.1