From 678139141fe306dd721c799b23af56111eaae37f Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 26 Feb 2010 06:01:18 +0000 Subject: 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 --- src/engine/events/Get.cpp | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'src/engine/events/Get.cpp') 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(); -- cgit v1.2.1