summaryrefslogtreecommitdiffstats
path: root/src/server/events
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-08-15 04:18:31 +0000
committerDavid Robillard <d@drobilla.net>2012-08-15 04:18:31 +0000
commit0a9297ed2a1622d252a389d8babc0656fedbe7fd (patch)
tree3f8e72bcb12e62f36eceda789cd1912c39eda2a4 /src/server/events
parent859ace60e8b1c4c0d9c5bea88d8eed1265ea859e (diff)
downloadingen-0a9297ed2a1622d252a389d8babc0656fedbe7fd.tar.gz
ingen-0a9297ed2a1622d252a389d8babc0656fedbe7fd.tar.bz2
ingen-0a9297ed2a1622d252a389d8babc0656fedbe7fd.zip
Simpler and more unified EnginePort implementation.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4699 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/server/events')
-rw-r--r--src/server/events/Delete.cpp10
-rw-r--r--src/server/events/Delete.hpp1
-rw-r--r--src/server/events/Disconnect.hpp1
-rw-r--r--src/server/events/Move.cpp2
4 files changed, 5 insertions, 9 deletions
diff --git a/src/server/events/Delete.cpp b/src/server/events/Delete.cpp
index 97f1161f..84b29a6f 100644
--- a/src/server/events/Delete.cpp
+++ b/src/server/events/Delete.cpp
@@ -41,7 +41,6 @@ Delete::Delete(Engine& engine,
const Raul::URI& uri)
: Event(engine, client, id, time)
, _uri(uri)
- , _garbage(NULL)
, _engine_port(NULL)
, _patch_node_listnode(NULL)
, _patch_port_listnode(NULL)
@@ -111,7 +110,7 @@ Delete::pre_process()
}
if (!_port->parent_patch()->parent()) {
- _engine_port = _engine.driver()->port(_port->path());
+ _engine_port = _engine.driver()->get_port(_port->path());
}
}
@@ -145,7 +144,7 @@ Delete::execute(ProcessContext& context)
_port->parent_patch()->external_ports(_ports_array);
if (_engine_port) {
- _garbage = _engine.driver()->remove_port(context, _engine_port);
+ _engine.driver()->remove_port(context, _engine_port);
}
}
@@ -177,10 +176,9 @@ Delete::post_process()
}
if (_engine_port) {
- _engine_port->destroy();
+ _engine.driver()->unregister_port(*_engine_port);
+ delete _engine_port;
}
-
- delete _garbage;
}
} // namespace Events
diff --git a/src/server/events/Delete.hpp b/src/server/events/Delete.hpp
index 53671846..a493fcf7 100644
--- a/src/server/events/Delete.hpp
+++ b/src/server/events/Delete.hpp
@@ -73,7 +73,6 @@ private:
Raul::Path _path;
SharedPtr<NodeImpl> _node; ///< Non-NULL iff a node
SharedPtr<PortImpl> _port; ///< Non-NULL iff a port
- Raul::Deletable* _garbage;
EnginePort* _engine_port;
PatchImpl::Nodes::Node* _patch_node_listnode;
Raul::List<PortImpl*>::Node* _patch_port_listnode;
diff --git a/src/server/events/Disconnect.hpp b/src/server/events/Disconnect.hpp
index bcd8f1bc..b008025a 100644
--- a/src/server/events/Disconnect.hpp
+++ b/src/server/events/Disconnect.hpp
@@ -24,7 +24,6 @@
#include "BufferFactory.hpp"
namespace Raul {
-template <typename T> class ListNode;
template <typename T> class Array;
}
diff --git a/src/server/events/Move.cpp b/src/server/events/Move.cpp
index 4d72e9ba..5fa58825 100644
--- a/src/server/events/Move.cpp
+++ b/src/server/events/Move.cpp
@@ -65,7 +65,7 @@ Move::pre_process()
return Event::pre_process_done(EXISTS, _new_path);
}
- EnginePort* eport = _engine.driver()->port(_old_path);
+ EnginePort* eport = _engine.driver()->get_port(_old_path);
if (eport) {
_engine.driver()->rename_port(_old_path, _new_path);
}