summaryrefslogtreecommitdiffstats
path: root/src/server/events/CreateNode.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-10-21 23:11:27 +0000
committerDavid Robillard <d@drobilla.net>2011-10-21 23:11:27 +0000
commitd7bc67f9752a90abf165c875839294befb42ef90 (patch)
tree1b8bddf242f95592d2ed563cc14a49b511580870 /src/server/events/CreateNode.cpp
parent221b1bfaec0ba4a9b1067fd16e2fb100e60a93ba (diff)
downloadingen-d7bc67f9752a90abf165c875839294befb42ef90.tar.gz
ingen-d7bc67f9752a90abf165c875839294befb42ef90.tar.bz2
ingen-d7bc67f9752a90abf165c875839294befb42ef90.zip
Merge Request into Event.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@3574 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/server/events/CreateNode.cpp')
-rw-r--r--src/server/events/CreateNode.cpp31
1 files changed, 13 insertions, 18 deletions
diff --git a/src/server/events/CreateNode.cpp b/src/server/events/CreateNode.cpp
index e827f840..04fef8b1 100644
--- a/src/server/events/CreateNode.cpp
+++ b/src/server/events/CreateNode.cpp
@@ -21,7 +21,6 @@
#include "sord/sordmm.hpp"
#include "ingen/shared/LV2URIMap.hpp"
#include "CreateNode.hpp"
-#include "Request.hpp"
#include "PatchImpl.hpp"
#include "NodeImpl.hpp"
#include "PluginImpl.hpp"
@@ -40,14 +39,14 @@ namespace Ingen {
namespace Server {
namespace Events {
-CreateNode::CreateNode(
- Engine& engine,
- SharedPtr<Request> request,
- SampleCount timestamp,
- const Path& path,
- const URI& plugin_uri,
- const Resource::Properties& properties)
- : Event(engine, request, timestamp)
+CreateNode::CreateNode(Engine& engine,
+ ClientInterface* client,
+ int32_t id,
+ SampleCount timestamp,
+ const Path& path,
+ const URI& plugin_uri,
+ const Resource::Properties& properties)
+ : Event(engine, client, id, timestamp)
, _path(path)
, _plugin_uri(plugin_uri)
, _patch(NULL)
@@ -117,26 +116,22 @@ CreateNode::execute(ProcessContext& context)
void
CreateNode::post_process()
{
- if (!_request) {
- return;
- }
-
string msg;
if (_node_already_exists) {
msg = string("Could not create node - ").append(_path.str());// + " already exists.";
- _request->respond_error(msg);
+ respond_error(msg);
} else if (_patch == NULL) {
msg = "Could not find patch '" + _path.parent().str() +"' to add node.";
- _request->respond_error(msg);
+ respond_error(msg);
} else if (_plugin == NULL) {
msg = "Unable to load node ";
msg += _path.str() + " (you're missing the plugin " + _plugin_uri.str() + ")";
- _request->respond_error(msg);
+ respond_error(msg);
} else if (_node == NULL) {
msg = "Failed to instantiate plugin " + _plugin_uri.str();
- _request->respond_error(msg);
+ respond_error(msg);
} else {
- _request->respond_ok();
+ respond_ok();
_engine.broadcaster()->send_object(_node, true); // yes, send ports
}
}