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/RequestMetadata.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/RequestMetadata.cpp')
-rw-r--r-- | src/engine/events/RequestMetadata.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/engine/events/RequestMetadata.cpp b/src/engine/events/RequestMetadata.cpp index 1cc092e2..17c39585 100644 --- a/src/engine/events/RequestMetadata.cpp +++ b/src/engine/events/RequestMetadata.cpp @@ -28,7 +28,7 @@ #include "PluginImpl.hpp" #include "PortImpl.hpp" #include "ProcessContext.hpp" -#include "Responder.hpp" +#include "Request.hpp" using namespace std; using namespace Raul; @@ -39,13 +39,13 @@ namespace Events { using namespace Shared; -RequestMetadata::RequestMetadata(Engine& engine, - SharedPtr<Responder> responder, - SampleCount timestamp, - bool is_meta, - const URI& subject, - const URI& key) - : QueuedEvent(engine, responder, timestamp) +RequestMetadata::RequestMetadata(Engine& engine, + SharedPtr<Request> request, + SampleCount timestamp, + bool is_meta, + const URI& subject, + const URI& key) + : QueuedEvent(engine, request, timestamp) , _error(NO_ERROR) , _special_type(NONE) , _uri(subject) @@ -60,7 +60,7 @@ void RequestMetadata::pre_process() { const bool is_object = (_uri.scheme() == Path::scheme && Path::is_valid(_uri.str())); - if (_responder->client()) { + if (_request->client()) { if (is_object) _resource = _engine.engine_store()->find_object(Path(_uri.str())); else @@ -110,25 +110,25 @@ RequestMetadata::execute(ProcessContext& context) void RequestMetadata::post_process() { - if (_responder->client()) { + if (_request->client()) { if (_special_type == PORT_VALUE) { if (_resource) { - _responder->respond_ok(); - _responder->client()->set_property(_uri.str(), + _request->respond_ok(); + _request->client()->set_property(_uri.str(), _engine.world()->uris->ingen_value, _value); } else { const string msg = "Get value for non-port " + _uri.str(); - _responder->respond_error(msg); + _request->respond_error(msg); } } else if (!_resource) { const string msg = "Unable to find subject " + _uri.str(); - _responder->respond_error(msg); + _request->respond_error(msg); } else { - _responder->respond_ok(); - _responder->client()->set_property(_uri, _key, _value); + _request->respond_ok(); + _request->client()->set_property(_uri, _key, _value); } } else { - _responder->respond_error("Unknown client"); + _request->respond_error("Unknown client"); } } |