diff options
author | David Robillard <d@drobilla.net> | 2008-11-10 20:35:33 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2008-11-10 20:35:33 +0000 |
commit | fb76b922a4d3b0f7e49ea1dcb21fec0c3a236b3f (patch) | |
tree | 3dcf722285ffeadb00452d6c9f7bf916561f6a76 | |
parent | 72ffe8b96f492805b16df8d2ffa452e67046b974 (diff) | |
download | ingen-fb76b922a4d3b0f7e49ea1dcb21fec0c3a236b3f.tar.gz ingen-fb76b922a4d3b0f7e49ea1dcb21fec0c3a236b3f.tar.bz2 ingen-fb76b922a4d3b0f7e49ea1dcb21fec0c3a236b3f.zip |
Fix Plugin name/symbol shadowing stuff that broke plugin loading (fix ticket #256).
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@1714 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r-- | src/client/PluginModel.cpp | 2 | ||||
-rw-r--r-- | src/client/PluginModel.hpp | 32 | ||||
-rw-r--r-- | src/engine/OSCEngineReceiver.cpp | 2 |
3 files changed, 12 insertions, 24 deletions
diff --git a/src/client/PluginModel.cpp b/src/client/PluginModel.cpp index 16e09414..6b7ec4c8 100644 --- a/src/client/PluginModel.cpp +++ b/src/client/PluginModel.cpp @@ -53,7 +53,7 @@ PluginModel::PluginModel(const string& uri, const string& type_uri) string PluginModel::default_node_symbol() { - return Raul::Path::nameify(_symbol); + return Raul::Path::nameify(symbol()); } diff --git a/src/client/PluginModel.hpp b/src/client/PluginModel.hpp index 62ee13a8..53bf668c 100644 --- a/src/client/PluginModel.hpp +++ b/src/client/PluginModel.hpp @@ -50,30 +50,12 @@ class PluginModel : public Ingen::Shared::Plugin , public Ingen::Shared::ResourceImpl { public: - /*PluginModel(const string& uri, const string& type_uri, const string& symbol, const string& name) - : ResourceImpl(uri) - , _type(type_from_uri(type_uri)) - , _symbol(symbol) - , _name(name) - { -#ifdef HAVE_SLV2 - Glib::Mutex::Lock lock(_rdf_world->mutex()); - SLV2Value plugin_uri = slv2_value_new_uri(_slv2_world, uri.c_str()); - _slv2_plugin = slv2_plugins_get_by_uri(_slv2_plugins, plugin_uri); - slv2_value_free(plugin_uri); -#endif - }*/ PluginModel(const string& uri, const string& type_uri); Type type() const { return _type; } - const string name() const { - const Raul::Atom& name_atom = get_property("doap:name"); - if (name_atom.type() == Raul::Atom::STRING) - return name_atom.get_string(); - else - return ""; - } + const string symbol() const { return string_property("lv2:symbol"); } + const string name() const { return string_property("doap:name"); } string default_node_symbol(); string human_name(); @@ -111,8 +93,14 @@ public: private: const Type _type; - const string _symbol; - const string _name; + + const string string_property(const std::string& name) const { + const Raul::Atom& atom = get_property(name); + if (atom.type() == Raul::Atom::STRING) + return atom.get_string(); + else + return ""; + } #ifdef HAVE_SLV2 static SLV2World _slv2_world; diff --git a/src/engine/OSCEngineReceiver.cpp b/src/engine/OSCEngineReceiver.cpp index ba3e65c1..de626c50 100644 --- a/src/engine/OSCEngineReceiver.cpp +++ b/src/engine/OSCEngineReceiver.cpp @@ -71,7 +71,7 @@ OSCEngineReceiver::OSCEngineReceiver(Engine& engine, size_t queue_size, uint16_t } // For debugging, print all incoming OSC messages - //lo_server_add_method(_server, NULL, NULL, generic_cb, NULL); + lo_server_add_method(_server, NULL, NULL, generic_cb, NULL); // Set response address for this message. // It's important this is first and returns nonzero. |