diff options
Diffstat (limited to 'src')
-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. |