diff options
author | David Robillard <d@drobilla.net> | 2007-08-01 14:10:46 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-08-01 14:10:46 +0000 |
commit | 188e34375827915a9832ddb1db4b94494bbee455 (patch) | |
tree | 2acbb717536af9a82949dcaa324360ed14bf5302 /src/libs/engine/events/RequestMetadataEvent.cpp | |
parent | 1a77934531b0ddfc4392ccffbdde0058c2dbab68 (diff) | |
download | ingen-188e34375827915a9832ddb1db4b94494bbee455.tar.gz ingen-188e34375827915a9832ddb1db4b94494bbee455.tar.bz2 ingen-188e34375827915a9832ddb1db4b94494bbee455.zip |
Clean up engine/client interfaces.
Hide Response, now an internal engine implementation detail (and not a problem for script bindings anymore).
git-svn-id: http://svn.drobilla.net/lad/ingen@666 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/engine/events/RequestMetadataEvent.cpp')
-rw-r--r-- | src/libs/engine/events/RequestMetadataEvent.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/libs/engine/events/RequestMetadataEvent.cpp b/src/libs/engine/events/RequestMetadataEvent.cpp index fa0ecafb..fdd0ded3 100644 --- a/src/libs/engine/events/RequestMetadataEvent.cpp +++ b/src/libs/engine/events/RequestMetadataEvent.cpp @@ -17,7 +17,7 @@ #include "RequestMetadataEvent.hpp" #include <string> -#include "interface/Responder.hpp" +#include "Responder.hpp" #include "Engine.hpp" #include "GraphObject.hpp" #include "ObjectStore.hpp" @@ -28,12 +28,11 @@ using std::string; namespace Ingen { -RequestMetadataEvent::RequestMetadataEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp, const string& node_path, const string& key) +RequestMetadataEvent::RequestMetadataEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& node_path, const string& key) : QueuedEvent(engine, responder, timestamp), _path(node_path), _key(key), - _object(NULL), - _client(NULL) + _object(NULL) { } @@ -41,9 +40,7 @@ RequestMetadataEvent::RequestMetadataEvent(Engine& engine, SharedPtr<Shared::Res void RequestMetadataEvent::pre_process() { - _client = _engine.broadcaster()->client(_responder->client_uri()); - - if (_client) { + if (_responder->client()) { _object = _engine.object_store()->find_object(_path); if (_object == NULL) { QueuedEvent::pre_process(); @@ -60,14 +57,14 @@ RequestMetadataEvent::pre_process() void RequestMetadataEvent::post_process() { - if (_client) { + if (_responder->client()) { if (!_object) { string msg = "Unable to find metadata subject "; msg += _path; _responder->respond_error(msg); } else { _responder->respond_ok(); - _client->metadata_update(_path, _key, _value); + _responder->client()->metadata_update(_path, _key, _value); } } else { _responder->respond_error("Unknown client"); |