diff options
author | David Robillard <d@drobilla.net> | 2010-02-03 20:39:18 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2010-02-03 20:39:18 +0000 |
commit | aef3c9348218029a077f40081fd078a9e2ee85ca (patch) | |
tree | b77d6ef50f66004129a03cb0751b653336c50f14 /src/engine/events/CreatePort.cpp | |
parent | 3e495d47f06cca50521076e8f77a966dfec521ab (diff) | |
download | ingen-aef3c9348218029a077f40081fd078a9e2ee85ca.tar.gz ingen-aef3c9348218029a077f40081fd078a9e2ee85ca.tar.bz2 ingen-aef3c9348218029a077f40081fd078a9e2ee85ca.zip |
Responder => Request, and handle EventSource unblocking from Request (simplify Event interfaces).
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2417 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/engine/events/CreatePort.cpp')
-rw-r--r-- | src/engine/events/CreatePort.cpp | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/src/engine/events/CreatePort.cpp b/src/engine/events/CreatePort.cpp index 151181f4..7b63f6c5 100644 --- a/src/engine/events/CreatePort.cpp +++ b/src/engine/events/CreatePort.cpp @@ -28,12 +28,11 @@ #include "DuplexPort.hpp" #include "Engine.hpp" #include "EngineStore.hpp" -#include "EventSource.hpp" #include "PatchImpl.hpp" #include "PatchImpl.hpp" #include "PluginImpl.hpp" #include "PortImpl.hpp" -#include "Responder.hpp" +#include "Request.hpp" using namespace std; using namespace Raul; @@ -46,14 +45,13 @@ using namespace Shared; CreatePort::CreatePort( Engine& engine, - SharedPtr<Responder> responder, + SharedPtr<Request> request, SampleCount timestamp, const Raul::Path& path, const Raul::URI& type, bool is_output, - EventSource* source, const Resource::Properties& properties) - : QueuedEvent(engine, responder, timestamp, true, source) + : QueuedEvent(engine, request, timestamp, true) , _error(NO_ERROR) , _path(path) , _type(type) @@ -146,30 +144,30 @@ CreatePort::execute(ProcessContext& context) _engine.driver()->add_port(_driver_port); } - if (_source) - _source->unblock(); + if (_request) + _request->unblock(); } void CreatePort::post_process() { - if (!_responder) + if (!_request) return; string msg; switch (_error) { case NO_ERROR: - _responder->respond_ok(); + _request->respond_ok(); _engine.broadcaster()->send_object(_patch_port, true); break; case UNKNOWN_TYPE: msg = string("Could not create port ") + _path.str() + " (Unknown type)"; - _responder->respond_error(msg); + _request->respond_error(msg); break; case CREATION_FAILED: msg = string("Could not create port ") + _path.str() + " (Creation failed)"; - _responder->respond_error(msg); + _request->respond_error(msg); break; } } |