From 0fd3c583e032a3cd5af877902d4561a45179a232 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 16 Nov 2008 05:34:01 +0000 Subject: Follow new object creation via HTTP (serialising/parsing RDF to communicate between client and engine). git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@1722 a436a847-0d15-0410-975c-d299462d15a1 --- src/client/ClientStore.cpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'src/client/ClientStore.cpp') diff --git a/src/client/ClientStore.cpp b/src/client/ClientStore.cpp index cf9e06a0..4c4e452c 100644 --- a/src/client/ClientStore.cpp +++ b/src/client/ClientStore.cpp @@ -428,6 +428,31 @@ ClientStore::new_plugin(const string& uri, const string& type_uri, const string& } +void +ClientStore::new_object(const Shared::GraphObject* object) +{ + using namespace Shared; + + const Patch* patch = dynamic_cast(object); + if (patch) { + new_patch(patch->path(), patch->internal_polyphony()); + return; + } + + const Node* node = dynamic_cast(object); + if (node) { + new_node(node->path(), node->plugin()->uri()); + return; + } + + const Port* port = dynamic_cast(object); + if (port) { + new_port(port->path(), port->type().uri(), port->index(), !port->is_input()); + return; + } +} + + void ClientStore::new_patch(const string& path, uint32_t poly) { -- cgit v1.2.1