summaryrefslogtreecommitdiffstats
path: root/src/server/events/CreatePatch.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/events/CreatePatch.cpp')
-rw-r--r--src/server/events/CreatePatch.cpp69
1 files changed, 33 insertions, 36 deletions
diff --git a/src/server/events/CreatePatch.cpp b/src/server/events/CreatePatch.cpp
index 2abe5d22..eda05ccd 100644
--- a/src/server/events/CreatePatch.cpp
+++ b/src/server/events/CreatePatch.cpp
@@ -19,7 +19,6 @@
#include "raul/Path.hpp"
#include "ingen/shared/LV2URIMap.hpp"
#include "events/CreatePatch.hpp"
-#include "Request.hpp"
#include "PatchImpl.hpp"
#include "NodeImpl.hpp"
#include "PluginImpl.hpp"
@@ -35,14 +34,14 @@ namespace Ingen {
namespace Server {
namespace Events {
-CreatePatch::CreatePatch(
- Engine& engine,
- SharedPtr<Request> request,
- SampleCount timestamp,
- const Raul::Path& path,
- int poly,
- const Resource::Properties& properties)
- : Event(engine, request, timestamp)
+CreatePatch::CreatePatch(Engine& engine,
+ ClientInterface* client,
+ int32_t id,
+ SampleCount timestamp,
+ const Raul::Path& path,
+ int poly,
+ const Resource::Properties& properties)
+ : Event(engine, client, id, timestamp)
, _path(path)
, _patch(NULL)
, _parent(NULL)
@@ -128,33 +127,31 @@ void
CreatePatch::post_process()
{
string msg;
- if (_request) {
- switch (_error) {
- case NO_ERROR:
- _request->respond_ok();
- // Don't send ports/nodes that have been added since prepare()
- // (otherwise they would be sent twice)
- _engine.broadcaster()->send_object(_patch, false);
- break;
- case OBJECT_EXISTS:
- _request->respond_ok();
- /*string msg = "Unable to create patch: ";
- msg.append(_path).append(" already exists.");
- _request->respond_error(msg);*/
- break;
- case PARENT_NOT_FOUND:
- msg = "Unable to create patch: Parent ";
- msg.append(Path(_path).parent().str()).append(" not found.");
- _request->respond_error(msg);
- break;
- case INVALID_POLY:
- msg = "Unable to create patch ";
- msg.append(_path.str()).append(": ").append("Invalid polyphony requested.");
- _request->respond_error(msg);
- break;
- default:
- _request->respond_error("Unable to load patch.");
- }
+ switch (_error) {
+ case NO_ERROR:
+ respond_ok();
+ // Don't send ports/nodes that have been added since prepare()
+ // (otherwise they would be sent twice)
+ _engine.broadcaster()->send_object(_patch, false);
+ break;
+ case OBJECT_EXISTS:
+ respond_ok();
+ /*string msg = "Unable to create patch: ";
+ msg.append(_path).append(" already exists.");
+ respond_error(msg);*/
+ break;
+ case PARENT_NOT_FOUND:
+ msg = "Unable to create patch: Parent ";
+ msg.append(Path(_path).parent().str()).append(" not found.");
+ respond_error(msg);
+ break;
+ case INVALID_POLY:
+ msg = "Unable to create patch ";
+ msg.append(_path.str()).append(": ").append("Invalid polyphony requested.");
+ respond_error(msg);
+ break;
+ default:
+ respond_error("Unable to load patch.");
}
}