summaryrefslogtreecommitdiffstats
path: root/src/engine/events
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-11-16 16:58:30 +0000
committerDavid Robillard <d@drobilla.net>2008-11-16 16:58:30 +0000
commit9c075799fdadf3d35cc4544ee0331e572d32cbe9 (patch)
tree15cf65199f1259bd81a281a6ca292f170fe3ff7b /src/engine/events
parent422694ebc886882fc8c2f0555a725d052dfc935c (diff)
downloadingen-9c075799fdadf3d35cc4544ee0331e572d32cbe9.tar.gz
ingen-9c075799fdadf3d35cc4544ee0331e572d32cbe9.tar.bz2
ingen-9c075799fdadf3d35cc4544ee0331e572d32cbe9.zip
Use higher level object sending interface internally in engine.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@1727 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/engine/events')
-rw-r--r--src/engine/events/RequestAllObjectsEvent.cpp3
-rw-r--r--src/engine/events/RequestObjectEvent.cpp25
2 files changed, 3 insertions, 25 deletions
diff --git a/src/engine/events/RequestAllObjectsEvent.cpp b/src/engine/events/RequestAllObjectsEvent.cpp
index d57080aa..a4dbc1f2 100644
--- a/src/engine/events/RequestAllObjectsEvent.cpp
+++ b/src/engine/events/RequestAllObjectsEvent.cpp
@@ -21,6 +21,7 @@
#include "ObjectSender.hpp"
#include "ClientBroadcaster.hpp"
#include "EngineStore.hpp"
+#include "PatchImpl.hpp"
namespace Ingen {
@@ -47,7 +48,7 @@ RequestAllObjectsEvent::post_process()
// Everything is a child of the root patch, so this sends it all
PatchImpl* root = _engine.engine_store()->find_patch("/");
if (root && _responder->client())
- ObjectSender::send_patch(_responder->client(), root, true);
+ ObjectSender::send_object(_responder->client(), root, true);
} else {
_responder->respond_error("Unable to find client to send all objects");
diff --git a/src/engine/events/RequestObjectEvent.cpp b/src/engine/events/RequestObjectEvent.cpp
index 30f95c03..c7fdd2d8 100644
--- a/src/engine/events/RequestObjectEvent.cpp
+++ b/src/engine/events/RequestObjectEvent.cpp
@@ -63,31 +63,8 @@ RequestObjectEvent::post_process()
{
if (!_object) {
_responder->respond_error("Unable to find object requested.");
-
} else if (_responder->client()) {
- PatchImpl* const patch = dynamic_cast<PatchImpl*>(_object);
- if (patch) {
- _responder->respond_ok();
- ObjectSender::send_patch(_responder->client(), patch, true);
- return;
- }
-
- NodeImpl* const node = dynamic_cast<NodeImpl*>(_object);
- if (node) {
- _responder->respond_ok();
- ObjectSender::send_node(_responder->client(), node, true);
- return;
- }
-
- PortImpl* const port = dynamic_cast<PortImpl*>(_object);
- if (port) {
- _responder->respond_ok();
- ObjectSender::send_port(_responder->client(), port);
- return;
- }
-
- _responder->respond_error("Object of unknown type requested.");
-
+ ObjectSender::send_object(_responder->client(), _object, true);
} else {
_responder->respond_error("Unable to find client to send object.");
}