From d7bc67f9752a90abf165c875839294befb42ef90 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 21 Oct 2011 23:11:27 +0000 Subject: Merge Request into Event. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@3574 a436a847-0d15-0410-975c-d299462d15a1 --- src/server/events/CreatePort.cpp | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) (limited to 'src/server/events/CreatePort.cpp') diff --git a/src/server/events/CreatePort.cpp b/src/server/events/CreatePort.cpp index 0a200add..1df393ca 100644 --- a/src/server/events/CreatePort.cpp +++ b/src/server/events/CreatePort.cpp @@ -31,7 +31,6 @@ #include "PatchImpl.hpp" #include "PluginImpl.hpp" #include "PortImpl.hpp" -#include "Request.hpp" using namespace std; using namespace Raul; @@ -40,14 +39,14 @@ namespace Ingen { namespace Server { namespace Events { -CreatePort::CreatePort( - Engine& engine, - SharedPtr request, - SampleCount timestamp, - const Raul::Path& path, - bool is_output, - const Resource::Properties& properties) - : Event(engine, request, timestamp) +CreatePort::CreatePort(Engine& engine, + ClientInterface* client, + int32_t id, + SampleCount timestamp, + const Raul::Path& path, + bool is_output, + const Resource::Properties& properties) + : Event(engine, client, id, timestamp) , _path(path) , _data_type(PortType::UNKNOWN) , _patch(NULL) @@ -174,27 +173,23 @@ CreatePort::execute(ProcessContext& context) void CreatePort::post_process() { - if (!_request) { - return; - } - string msg; switch (_error) { case NO_ERROR: - _request->respond_ok(); + respond_ok(); _engine.broadcaster()->send_object(_patch_port, true); break; case BAD_INDEX: msg = string("Could not create port ") + _path.str() + " (Illegal index given)"; - _request->respond_error(msg); + respond_error(msg); break; case UNKNOWN_TYPE: msg = string("Could not create port ") + _path.str() + " (Unknown type)"; - _request->respond_error(msg); + respond_error(msg); break; case CREATION_FAILED: msg = string("Could not create port ") + _path.str() + " (Creation failed)"; - _request->respond_error(msg); + respond_error(msg); break; } } -- cgit v1.2.1