summaryrefslogtreecommitdiffstats
path: root/src/client
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-11-10 20:35:33 +0000
committerDavid Robillard <d@drobilla.net>2008-11-10 20:35:33 +0000
commitfb76b922a4d3b0f7e49ea1dcb21fec0c3a236b3f (patch)
tree3dcf722285ffeadb00452d6c9f7bf916561f6a76 /src/client
parent72ffe8b96f492805b16df8d2ffa452e67046b974 (diff)
downloadingen-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
Diffstat (limited to 'src/client')
-rw-r--r--src/client/PluginModel.cpp2
-rw-r--r--src/client/PluginModel.hpp32
2 files changed, 11 insertions, 23 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;