summaryrefslogtreecommitdiffstats
path: root/src/server/events/CreatePort.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/CreatePort.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/CreatePort.cpp')
-rw-r--r--src/server/events/CreatePort.cpp29
1 files changed, 12 insertions, 17 deletions
diff --git a/src/server/events/CreatePort.cpp b/src/server/events/CreatePort.cpp
index 0a200add..1df393ca 100644
--- a/src/server/events/CreatePort.cpp
+++ b/src/server/events/CreatePort.cpp
@@ -31,7 +31,6 @@
#include "PatchImpl.hpp"
#include "PluginImpl.hpp"
#include "PortImpl.hpp"
-#include "Request.hpp"
using namespace std;
using namespace Raul;
@@ -40,14 +39,14 @@ namespace Ingen {
namespace Server {
namespace Events {
-CreatePort::CreatePort(
- Engine& engine,
- SharedPtr<Request> request,
- SampleCount timestamp,
- const Raul::Path& path,
- bool is_output,
- const Resource::Properties& properties)
- : Event(engine, request, timestamp)
+CreatePort::CreatePort(Engine& engine,
+ ClientInterface* client,
+ int32_t id,
+ SampleCount timestamp,
+ const Raul::Path& path,
+ bool is_output,
+ const Resource::Properties& properties)
+ : Event(engine, client, id, timestamp)
, _path(path)
, _data_type(PortType::UNKNOWN)
, _patch(NULL)
@@ -174,27 +173,23 @@ CreatePort::execute(ProcessContext& context)
void
CreatePort::post_process()
{
- if (!_request) {
- return;
- }
-
string msg;
switch (_error) {
case NO_ERROR:
- _request->respond_ok();
+ respond_ok();
_engine.broadcaster()->send_object(_patch_port, true);
break;
case BAD_INDEX:
msg = string("Could not create port ") + _path.str() + " (Illegal index given)";
- _request->respond_error(msg);
+ respond_error(msg);
break;
case UNKNOWN_TYPE:
msg = string("Could not create port ") + _path.str() + " (Unknown type)";
- _request->respond_error(msg);
+ respond_error(msg);
break;
case CREATION_FAILED:
msg = string("Could not create port ") + _path.str() + " (Creation failed)";
- _request->respond_error(msg);
+ respond_error(msg);
break;
}
}