summaryrefslogtreecommitdiffstats
path: root/src/libs/engine
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2006-12-08 22:32:34 +0000
committerDavid Robillard <d@drobilla.net>2006-12-08 22:32:34 +0000
commitd2d755b0db3b4779d581c7a70841609257250c12 (patch)
tree826098242c947ac3f5994b1a591a7853275972fc /src/libs/engine
parent26d0171f9bbc4af8036c704d3a4cb69a5d9fe942 (diff)
downloadingen-d2d755b0db3b4779d581c7a70841609257250c12.tar.gz
ingen-d2d755b0db3b4779d581c7a70841609257250c12.tar.bz2
ingen-d2d755b0db3b4779d581c7a70841609257250c12.zip
Fixed plugin type issues
git-svn-id: http://svn.drobilla.net/lad/ingen@211 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/engine')
-rw-r--r--src/libs/engine/ClientBroadcaster.cpp2
-rw-r--r--src/libs/engine/OSCClientSender.cpp3
-rw-r--r--src/libs/engine/OSCClientSender.h1
-rw-r--r--src/libs/engine/ObjectSender.cpp2
-rw-r--r--src/libs/engine/Plugin.h4
-rw-r--r--src/libs/engine/events/RequestPluginEvent.cpp2
6 files changed, 10 insertions, 4 deletions
diff --git a/src/libs/engine/ClientBroadcaster.cpp b/src/libs/engine/ClientBroadcaster.cpp
index 872cbb14..57f9a65d 100644
--- a/src/libs/engine/ClientBroadcaster.cpp
+++ b/src/libs/engine/ClientBroadcaster.cpp
@@ -175,7 +175,7 @@ ClientBroadcaster::send_plugins_to(SharedPtr<ClientInterface> client, const list
for (list<Plugin*>::const_iterator i = plugin_list.begin(); i != plugin_list.end(); ++i) {
const Plugin* const plugin = *i;
- client->new_plugin(plugin->uri(), plugin->name());
+ client->new_plugin(plugin->uri(), plugin->type_uri(), plugin->name());
}
client->transfer_end();
diff --git a/src/libs/engine/OSCClientSender.cpp b/src/libs/engine/OSCClientSender.cpp
index 2032e47b..eaceb14c 100644
--- a/src/libs/engine/OSCClientSender.cpp
+++ b/src/libs/engine/OSCClientSender.cpp
@@ -493,13 +493,14 @@ OSCClientSender::control_change(string port_path, float value)
* \arg \b name (string) - Descriptive human-readable name of plugin (ie "ADSR Envelope")
*/
void
-OSCClientSender::new_plugin(string uri, string name)
+OSCClientSender::new_plugin(string uri, string type_uri, string name)
{
if (!_enabled)
return;
lo_message m = lo_message_new();
lo_message_add_string(m, uri.c_str());
+ lo_message_add_string(m, type_uri.c_str());
lo_message_add_string(m, name.c_str());
//if (_transfer)
diff --git a/src/libs/engine/OSCClientSender.h b/src/libs/engine/OSCClientSender.h
index f45812af..12ae8bdf 100644
--- a/src/libs/engine/OSCClientSender.h
+++ b/src/libs/engine/OSCClientSender.h
@@ -77,6 +77,7 @@ public:
void error(string msg);
virtual void new_plugin(string uri,
+ string type_uri,
string name);
virtual void new_patch(string path, uint32_t poly);
diff --git a/src/libs/engine/ObjectSender.cpp b/src/libs/engine/ObjectSender.cpp
index 174f30be..6e93f405 100644
--- a/src/libs/engine/ObjectSender.cpp
+++ b/src/libs/engine/ObjectSender.cpp
@@ -170,7 +170,7 @@ ObjectSender::send_plugins(ClientInterface* client, const list<Plugin*>& plugs)
*/
for (list<Plugin*>::const_iterator j = plugs.begin(); j != plugs.end(); ++j) {
const Plugin* const p = *j;
- client->new_plugin(p->uri(), p->name());
+ client->new_plugin(p->uri(), p->type_uri(), p->name());
}
/*
plugin = (*j);
diff --git a/src/libs/engine/Plugin.h b/src/libs/engine/Plugin.h
index bdd96ed1..0b573cb1 100644
--- a/src/libs/engine/Plugin.h
+++ b/src/libs/engine/Plugin.h
@@ -112,6 +112,10 @@ public:
else if (_type == Patch) return "Patch";
else return "";
}
+
+ string type_uri() const {
+ return string("ingen:") + type_string();
+ }
void set_type(const string& type_string) {
if (type_string == "LADSPA") _type = LADSPA;
diff --git a/src/libs/engine/events/RequestPluginEvent.cpp b/src/libs/engine/events/RequestPluginEvent.cpp
index 4b509f78..8663f40a 100644
--- a/src/libs/engine/events/RequestPluginEvent.cpp
+++ b/src/libs/engine/events/RequestPluginEvent.cpp
@@ -66,7 +66,7 @@ RequestPluginEvent::post_process()
_responder->respond_ok();
assert(m_plugin->uri() == m_uri);
- m_client->new_plugin(m_uri, m_plugin->name());
+ m_client->new_plugin(m_uri, m_plugin->type_uri(), m_plugin->name());
} else {
_responder->respond_error("Unable to find client to send plugin.");