summaryrefslogtreecommitdiffstats
path: root/src/engine/events/Delete.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2010-02-03 20:39:18 +0000
committerDavid Robillard <d@drobilla.net>2010-02-03 20:39:18 +0000
commitaef3c9348218029a077f40081fd078a9e2ee85ca (patch)
treeb77d6ef50f66004129a03cb0751b653336c50f14 /src/engine/events/Delete.cpp
parent3e495d47f06cca50521076e8f77a966dfec521ab (diff)
downloadingen-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/Delete.cpp')
-rw-r--r--src/engine/events/Delete.cpp23
1 files changed, 11 insertions, 12 deletions
diff --git a/src/engine/events/Delete.cpp b/src/engine/events/Delete.cpp
index 30166c51..82681c08 100644
--- a/src/engine/events/Delete.cpp
+++ b/src/engine/events/Delete.cpp
@@ -24,12 +24,11 @@
#include "Driver.hpp"
#include "Engine.hpp"
#include "EngineStore.hpp"
-#include "EventSource.hpp"
#include "NodeBase.hpp"
#include "PatchImpl.hpp"
#include "PluginImpl.hpp"
#include "PortImpl.hpp"
-#include "Responder.hpp"
+#include "Request.hpp"
using namespace std;
@@ -39,8 +38,8 @@ namespace Events {
using namespace Shared;
-Delete::Delete(Engine& engine, SharedPtr<Responder> responder, FrameTime time, EventSource* source, const Raul::Path& path)
- : QueuedEvent(engine, responder, time, true, source)
+Delete::Delete(Engine& engine, SharedPtr<Request> request, FrameTime time, const Raul::Path& path)
+ : QueuedEvent(engine, request, time, true)
, _path(path)
, _store_iterator(engine.engine_store()->end())
, _driver_port(NULL)
@@ -50,7 +49,8 @@ Delete::Delete(Engine& engine, SharedPtr<Responder> responder, FrameTime time, E
, _compiled_patch(NULL)
, _disconnect_event(NULL)
{
- assert(_source);
+ assert(request);
+ assert(request->source());
}
@@ -159,8 +159,7 @@ Delete::execute(ProcessContext& context)
}
}
- if (_source)
- _source->unblock();
+ _request->unblock();
}
@@ -171,17 +170,17 @@ Delete::post_process()
if (!_node && !_port) {
if (_path.is_root()) {
- _responder->respond_error("You can not destroy the root patch (/)");
+ _request->respond_error("You can not destroy the root patch (/)");
} else {
string msg = string("Could not find object ") + _path.str() + " to destroy";
- _responder->respond_error(msg);
+ _request->respond_error(msg);
}
}
if (_patch_node_listnode) {
assert(_node);
_node->deactivate();
- _responder->respond_ok();
+ _request->respond_ok();
_engine.broadcaster()->bundle_begin();
if (_disconnect_event)
_disconnect_event->post_process();
@@ -190,7 +189,7 @@ Delete::post_process()
_engine.maid()->push(_patch_node_listnode);
} else if (_patch_port_listnode) {
assert(_port);
- _responder->respond_ok();
+ _request->respond_ok();
_engine.broadcaster()->bundle_begin();
if (_disconnect_event)
_disconnect_event->post_process();
@@ -198,7 +197,7 @@ Delete::post_process()
_engine.broadcaster()->bundle_end();
_engine.maid()->push(_patch_port_listnode);
} else {
- _responder->respond_error("Unable to destroy object");
+ _request->respond_error("Unable to destroy object");
}
if (_driver_port) {