summaryrefslogtreecommitdiffstats
path: root/src/engine
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine')
-rw-r--r--src/engine/ClientBroadcaster.cpp2
-rw-r--r--src/engine/HTTPClientSender.cpp14
-rw-r--r--src/engine/HTTPClientSender.hpp4
-rw-r--r--src/engine/InternalPlugin.cpp9
-rw-r--r--src/engine/InternalPlugin.hpp6
-rw-r--r--src/engine/LADSPAPlugin.cpp18
-rw-r--r--src/engine/LADSPAPlugin.hpp7
-rw-r--r--src/engine/LV2Plugin.cpp8
-rw-r--r--src/engine/LV2Plugin.hpp6
-rw-r--r--src/engine/OSCClientSender.cpp22
-rw-r--r--src/engine/OSCClientSender.hpp4
-rw-r--r--src/engine/events/RequestObjectEvent.cpp2
12 files changed, 40 insertions, 62 deletions
diff --git a/src/engine/ClientBroadcaster.cpp b/src/engine/ClientBroadcaster.cpp
index 50a1112b..48281cf3 100644
--- a/src/engine/ClientBroadcaster.cpp
+++ b/src/engine/ClientBroadcaster.cpp
@@ -116,7 +116,7 @@ ClientBroadcaster::send_plugins_to(ClientInterface* client, const NodeFactory::P
for (NodeFactory::Plugins::const_iterator i = plugins.begin(); i != plugins.end(); ++i) {
const PluginImpl* const plugin = i->second;
- client->new_plugin(plugin->uri(), plugin->type_uri(), plugin->symbol());
+ client->put(plugin->uri(), plugin->properties());
}
client->transfer_end();
diff --git a/src/engine/HTTPClientSender.cpp b/src/engine/HTTPClientSender.cpp
index 41f517cb..6735c164 100644
--- a/src/engine/HTTPClientSender.cpp
+++ b/src/engine/HTTPClientSender.cpp
@@ -157,20 +157,6 @@ HTTPClientSender::new_object(const Shared::GraphObject* object)
void
-HTTPClientSender::new_plugin(const URI& uri,
- const URI& type_uri,
- const Symbol& symbol)
-{
- /*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, symbol.c_str());
- lo_message_add_string(m, name.c_str());
- send_message("/ingen/plugin", m);*/
-}
-
-
-void
HTTPClientSender::move(const Path& old_path, const Path& new_path)
{
string msg = string(
diff --git a/src/engine/HTTPClientSender.hpp b/src/engine/HTTPClientSender.hpp
index 9a7948ff..a9d37784 100644
--- a/src/engine/HTTPClientSender.hpp
+++ b/src/engine/HTTPClientSender.hpp
@@ -74,10 +74,6 @@ public:
//virtual bool new_object(const Shared::GraphObject* object);
- virtual void new_plugin(const Raul::URI& uri,
- const Raul::URI& type_uri,
- const Raul::Symbol& symbol);
-
virtual void put(const Raul::URI& path,
const Shared::Resource::Properties& properties);
diff --git a/src/engine/InternalPlugin.cpp b/src/engine/InternalPlugin.cpp
index e98b14ed..8ab9070b 100644
--- a/src/engine/InternalPlugin.cpp
+++ b/src/engine/InternalPlugin.cpp
@@ -25,10 +25,19 @@
#include "AudioDriver.hpp"
using namespace std;
+using namespace Raul;
namespace Ingen {
+InternalPlugin::InternalPlugin(const std::string& uri, const std::string& symbol)
+ : PluginImpl(Plugin::Internal, uri)
+ , _symbol(symbol)
+{
+ set_property("rdf:type", Atom(Atom::URI, "ingen:Internal"));
+}
+
+
NodeImpl*
InternalPlugin::instantiate(const string& name,
bool polyphonic,
diff --git a/src/engine/InternalPlugin.hpp b/src/engine/InternalPlugin.hpp
index 3c0583cd..d9d6b0b2 100644
--- a/src/engine/InternalPlugin.hpp
+++ b/src/engine/InternalPlugin.hpp
@@ -44,11 +44,7 @@ class NodeImpl;
class InternalPlugin : public PluginImpl
{
public:
- InternalPlugin(const std::string& uri,
- const std::string& symbol)
- : PluginImpl(Plugin::Internal, uri)
- , _symbol(symbol)
- {}
+ InternalPlugin(const std::string& uri, const std::string& symbol);
NodeImpl* instantiate(const std::string& name,
bool polyphonic,
diff --git a/src/engine/LADSPAPlugin.cpp b/src/engine/LADSPAPlugin.cpp
index 2279da00..0b3aabdc 100644
--- a/src/engine/LADSPAPlugin.cpp
+++ b/src/engine/LADSPAPlugin.cpp
@@ -18,16 +18,34 @@
#include <cassert>
#include <ladspa.h>
#include <iostream>
+#include <raul/Symbol.hpp>
#include "LADSPAPlugin.hpp"
#include "LADSPANode.hpp"
#include "Engine.hpp"
#include "AudioDriver.hpp"
using namespace std;
+using namespace Raul;
namespace Ingen {
+LADSPAPlugin::LADSPAPlugin(
+ const std::string& library_path,
+ const std::string& uri,
+ unsigned long id,
+ const std::string& label,
+ const std::string& name)
+ : PluginImpl(Plugin::LADSPA, uri, library_path)
+ , _id(id)
+ , _label(label)
+ , _name(Raul::Atom::STRING, name)
+{
+ set_property("rdf:type", Atom(Atom::URI, "ingen:LADSPAPlugin"));
+ set_property("lv2:symbol", Atom(Atom::STRING, Symbol::symbolify(label)));
+}
+
+
const Raul::Atom&
LADSPAPlugin::get_property(const Raul::URI& uri) const
{
diff --git a/src/engine/LADSPAPlugin.hpp b/src/engine/LADSPAPlugin.hpp
index 967a2fd4..0a9bbdd7 100644
--- a/src/engine/LADSPAPlugin.hpp
+++ b/src/engine/LADSPAPlugin.hpp
@@ -42,12 +42,7 @@ public:
const std::string& uri,
unsigned long id,
const std::string& label,
- const std::string& name)
- : PluginImpl(Plugin::LADSPA, uri, library_path)
- , _id(id)
- , _label(label)
- , _name(Raul::Atom::STRING, name)
- {}
+ const std::string& name);
NodeImpl* instantiate(const std::string& name,
bool polyphonic,
diff --git a/src/engine/LV2Plugin.cpp b/src/engine/LV2Plugin.cpp
index c3992fb1..0736dfcb 100644
--- a/src/engine/LV2Plugin.cpp
+++ b/src/engine/LV2Plugin.cpp
@@ -30,6 +30,14 @@ using namespace Raul;
namespace Ingen {
+LV2Plugin::LV2Plugin(SharedPtr<LV2Info> lv2_info, const std::string& uri)
+ : PluginImpl(Plugin::LV2, uri)
+ , _slv2_plugin(NULL)
+ , _lv2_info(lv2_info)
+{
+ set_property("rdf:type", Atom(Atom::URI, "lv2:Plugin"));
+}
+
const string
LV2Plugin::symbol() const
{
diff --git a/src/engine/LV2Plugin.hpp b/src/engine/LV2Plugin.hpp
index f5223d8f..29c987d4 100644
--- a/src/engine/LV2Plugin.hpp
+++ b/src/engine/LV2Plugin.hpp
@@ -46,11 +46,7 @@ class NodeImpl;
class LV2Plugin : public PluginImpl
{
public:
- LV2Plugin(SharedPtr<LV2Info> lv2_info, const std::string& uri)
- : PluginImpl(Plugin::LV2, uri)
- , _slv2_plugin(NULL)
- , _lv2_info(lv2_info)
- {}
+ LV2Plugin(SharedPtr<LV2Info> lv2_info, const std::string& uri);
NodeImpl* instantiate(const std::string& name,
bool polyphonic,
diff --git a/src/engine/OSCClientSender.cpp b/src/engine/OSCClientSender.cpp
index 3d33c6ce..76ab0459 100644
--- a/src/engine/OSCClientSender.cpp
+++ b/src/engine/OSCClientSender.cpp
@@ -259,26 +259,4 @@ OSCClientSender::activity(const Path& path)
}
-/** \page client_osc_namespace
- * <h2>/ingen/plugin</h2>
- * \arg \b uri (string) - URI of plugin (e.g. http://example.org/filtermatic)
- * \arg \b type (string) - Type of plugin (e.g. "lv2:Plugin", "ingen:LADSPAPlugin")
- * \arg \b symbol (string) - Valid symbol for plugin (default symbol for nodes) (e.g. "adsr")
- * \arg \b name (string) - Descriptive human-readable name of plugin (e.g. "ADSR Envelope")
- *
- * Notification of the existence of a plugin.
- */
-void
-OSCClientSender::new_plugin(const URI& uri,
- const URI& type_uri,
- const Symbol& symbol)
-{
- 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, symbol.c_str());
- send_message("/ingen/plugin", m);
-}
-
-
} // namespace Ingen
diff --git a/src/engine/OSCClientSender.hpp b/src/engine/OSCClientSender.hpp
index 333fee49..58175d47 100644
--- a/src/engine/OSCClientSender.hpp
+++ b/src/engine/OSCClientSender.hpp
@@ -71,10 +71,6 @@ public:
void error(const std::string& msg);
- virtual void new_plugin(const Raul::URI& uri,
- const Raul::URI& type_uri,
- const Raul::Symbol& symbol);
-
virtual void put(const Raul::URI& path,
const Shared::Resource::Properties& properties);
diff --git a/src/engine/events/RequestObjectEvent.cpp b/src/engine/events/RequestObjectEvent.cpp
index c17e4983..a74f15d3 100644
--- a/src/engine/events/RequestObjectEvent.cpp
+++ b/src/engine/events/RequestObjectEvent.cpp
@@ -75,7 +75,7 @@ RequestObjectEvent::post_process()
if (_object)
_responder->client()->put(_uri, _object->properties());
else if (_plugin)
- _responder->client()->new_plugin(_uri, _plugin->type_uri(), _plugin->symbol());
+ _responder->client()->put(_uri, _plugin->properties());
} else {
_responder->respond_error("Unable to find client to send object.");
}