diff options
author | David Robillard <d@drobilla.net> | 2010-02-26 06:01:18 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2010-02-26 06:01:18 +0000 |
commit | 678139141fe306dd721c799b23af56111eaae37f (patch) | |
tree | cf53b8f4b5dcff71ca3e4230c62646ad50783ce2 /src/engine/events/Get.cpp | |
parent | fe61806905a86e7513df64d59ec8b4d31f184a33 (diff) | |
download | ingen-678139141fe306dd721c799b23af56111eaae37f.tar.gz ingen-678139141fe306dd721c799b23af56111eaae37f.tar.bz2 ingen-678139141fe306dd721c799b23af56111eaae37f.zip |
Remove request_plugins from EngineInterface (and RequestPlugins event from engine), replacing with get of magic URI "ingen:plugins".
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2504 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/engine/events/Get.cpp')
-rw-r--r-- | src/engine/events/Get.cpp | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/src/engine/events/Get.cpp b/src/engine/events/Get.cpp index 05aa2f90..5031d794 100644 --- a/src/engine/events/Get.cpp +++ b/src/engine/events/Get.cpp @@ -49,27 +49,25 @@ Get::Get( void Get::pre_process() { - if (Path::is_valid(_uri.str())) + if (_uri == "ingen:plugins") { + _plugins = _engine.node_factory()->plugins(); + } else if (Path::is_valid(_uri.str())) { _object = _engine.engine_store()->find_object(Path(_uri.str())); - else + } else { _plugin = _engine.node_factory()->plugin(_uri); + } QueuedEvent::pre_process(); } void -Get::execute(ProcessContext& context) -{ - QueuedEvent::execute(context); - assert(_time >= context.start() && _time <= context.end()); -} - - -void Get::post_process() { - if (!_object && !_plugin) { + if (_uri == "ingen:plugins") { + _request->respond_ok(); + _engine.broadcaster()->send_plugins_to(_request->client(), _plugins); + } else if (!_object && !_plugin) { _request->respond_error("Unable to find object requested."); } else if (_request->client()) { _request->respond_ok(); |