diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/bindings/Client.hpp | 3 | ||||
-rw-r--r-- | src/client/ClientStore.cpp | 3 | ||||
-rw-r--r-- | src/client/ClientStore.hpp | 2 | ||||
-rw-r--r-- | src/client/SigClientInterface.hpp | 6 | ||||
-rw-r--r-- | src/client/ThreadedSigClientInterface.hpp | 6 | ||||
-rw-r--r-- | src/common/interface/ClientInterface.hpp | 3 | ||||
-rw-r--r-- | src/engine/ClientBroadcaster.cpp | 2 | ||||
-rw-r--r-- | src/engine/HTTPClientSender.cpp | 3 | ||||
-rw-r--r-- | src/engine/HTTPClientSender.hpp | 3 | ||||
-rw-r--r-- | src/engine/LV2Node.cpp | 2 | ||||
-rw-r--r-- | src/engine/LV2Plugin.cpp | 24 | ||||
-rw-r--r-- | src/engine/LV2Plugin.hpp | 5 | ||||
-rw-r--r-- | src/engine/NodeFactory.cpp | 2 | ||||
-rw-r--r-- | src/engine/OSCClientSender.cpp | 4 | ||||
-rw-r--r-- | src/engine/OSCClientSender.hpp | 3 | ||||
-rw-r--r-- | src/engine/PluginImpl.hpp | 10 | ||||
-rw-r--r-- | src/engine/events/RequestPluginEvent.cpp | 2 |
17 files changed, 34 insertions, 49 deletions
diff --git a/src/bindings/Client.hpp b/src/bindings/Client.hpp index 59c9d842..dc58b9b7 100644 --- a/src/bindings/Client.hpp +++ b/src/bindings/Client.hpp @@ -40,8 +40,7 @@ public: virtual void new_plugin(const std::string& uri, const std::string& type_uri, - const std::string& symbol, - const std::string& name) {} + const std::string& symbol) {} virtual void new_patch(const std::string& path, uint32_t poly) {} diff --git a/src/client/ClientStore.cpp b/src/client/ClientStore.cpp index 36156db8..2acb2124 100644 --- a/src/client/ClientStore.cpp +++ b/src/client/ClientStore.cpp @@ -419,11 +419,10 @@ ClientStore::rename(const Path& old_path, const Path& new_path) } void -ClientStore::new_plugin(const string& uri, const string& type_uri, const string& symbol, const string& name) +ClientStore::new_plugin(const string& uri, const string& type_uri, const string& symbol) { SharedPtr<PluginModel> p(new PluginModel(uri, type_uri)); p->set_property("lv2:symbol", Atom(Atom::STRING, symbol)); - p->set_property("doap:name", Atom(Atom::STRING, name)); add_plugin(p); resolve_plugin_orphans(p); } diff --git a/src/client/ClientStore.hpp b/src/client/ClientStore.hpp index 97930955..9fb677ea 100644 --- a/src/client/ClientStore.hpp +++ b/src/client/ClientStore.hpp @@ -71,7 +71,7 @@ public: void set_plugins(SharedPtr<Plugins> p) { _plugins = p; } // CommonInterface - void new_plugin(const string& uri, const string& type_uri, const string& symbol, const string& name); + void new_plugin(const string& uri, const string& type_uri, const string& symbol); bool new_object(const Shared::GraphObject* object); void new_patch(const string& path, uint32_t poly); void new_node(const string& path, const string& plugin_uri); diff --git a/src/client/SigClientInterface.hpp b/src/client/SigClientInterface.hpp index 05f027a4..580de7b2 100644 --- a/src/client/SigClientInterface.hpp +++ b/src/client/SigClientInterface.hpp @@ -54,7 +54,7 @@ public: sigc::signal<void> signal_bundle_begin; sigc::signal<void> signal_bundle_end; sigc::signal<void, string> signal_error; - sigc::signal<void, string, string, string, string> signal_new_plugin; + sigc::signal<void, string, string, string> signal_new_plugin; sigc::signal<void, string, uint32_t> signal_new_patch; sigc::signal<void, string, string> signal_new_node; sigc::signal<void, string, string, uint32_t, bool> signal_new_port; @@ -101,8 +101,8 @@ protected: void error(const string& msg) { if (_enabled) signal_error.emit(msg); } - void new_plugin(const string& uri, const string& type_uri, const string& symbol, const string& name) - { if (_enabled) signal_new_plugin.emit(uri, type_uri, symbol, name); } + void new_plugin(const string& uri, const string& type_uri, const string& symbol) + { if (_enabled) signal_new_plugin.emit(uri, type_uri, symbol); } bool new_object(const Shared::GraphObject* object) { if (_enabled) signal_new_object.emit(object); return false; } diff --git a/src/client/ThreadedSigClientInterface.hpp b/src/client/ThreadedSigClientInterface.hpp index b855dc33..ff4b202c 100644 --- a/src/client/ThreadedSigClientInterface.hpp +++ b/src/client/ThreadedSigClientInterface.hpp @@ -94,8 +94,8 @@ public: void error(const string& msg) { push_sig(sigc::bind(error_slot, msg)); } - void new_plugin(const string& uri, const string& type_uri, const string& symbol, const string& name) - { push_sig(sigc::bind(new_plugin_slot, uri, type_uri, symbol, name)); } + void new_plugin(const string& uri, const string& type_uri, const string& symbol) + { push_sig(sigc::bind(new_plugin_slot, uri, type_uri, symbol)); } bool new_object(const Shared::GraphObject* object); @@ -161,7 +161,7 @@ private: sigc::slot<void, int32_t> response_ok_slot; sigc::slot<void, int32_t, string> response_error_slot; sigc::slot<void, string> error_slot; - sigc::slot<void, string, string, string, string> new_plugin_slot; + sigc::slot<void, string, string, string> new_plugin_slot; sigc::slot<void, string, uint32_t> new_patch_slot; sigc::slot<void, string, string> new_node_slot; sigc::slot<void, string, string, uint32_t, bool> new_port_slot; diff --git a/src/common/interface/ClientInterface.hpp b/src/common/interface/ClientInterface.hpp index ee5f4791..80a48dc9 100644 --- a/src/common/interface/ClientInterface.hpp +++ b/src/common/interface/ClientInterface.hpp @@ -63,8 +63,7 @@ public: virtual void new_plugin(const std::string& uri, const std::string& type_uri, - const std::string& symbol, - const std::string& name) = 0; + const std::string& symbol) = 0; virtual void patch_cleared(const std::string& path) = 0; diff --git a/src/engine/ClientBroadcaster.cpp b/src/engine/ClientBroadcaster.cpp index a13550a7..ee76eb53 100644 --- a/src/engine/ClientBroadcaster.cpp +++ b/src/engine/ClientBroadcaster.cpp @@ -115,7 +115,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(), plugin->name()); + client->new_plugin(plugin->uri(), plugin->type_uri(), plugin->symbol()); } client->transfer_end(); diff --git a/src/engine/HTTPClientSender.cpp b/src/engine/HTTPClientSender.cpp index 87da009d..f9329ebd 100644 --- a/src/engine/HTTPClientSender.cpp +++ b/src/engine/HTTPClientSender.cpp @@ -183,8 +183,7 @@ HTTPClientSender::new_object(const Shared::GraphObject* object) void HTTPClientSender::new_plugin(const std::string& uri, const std::string& type_uri, - const std::string& symbol, - const std::string& name) + const std::string& symbol) { /*lo_message m = lo_message_new(); lo_message_add_string(m, uri.c_str()); diff --git a/src/engine/HTTPClientSender.hpp b/src/engine/HTTPClientSender.hpp index 5eab2d2a..9a1ce10c 100644 --- a/src/engine/HTTPClientSender.hpp +++ b/src/engine/HTTPClientSender.hpp @@ -76,8 +76,7 @@ public: virtual void new_plugin(const std::string& uri, const std::string& type_uri, - const std::string& symbol, - const std::string& name); + const std::string& symbol); virtual void new_patch(const std::string& path, uint32_t poly); diff --git a/src/engine/LV2Node.cpp b/src/engine/LV2Node.cpp index a72ebc21..a9246b3a 100644 --- a/src/engine/LV2Node.cpp +++ b/src/engine/LV2Node.cpp @@ -238,7 +238,7 @@ LV2Node::instantiate() if (!strcmp("http://lv2plug.in/ns/dev/contexts#MessageContext", context)) { cout << "MESSAGE CONTEXT!" << endl; if (!_message_funcs) { - cerr << "Plugin " << _lv2_plugin->name() + cerr << "Plugin " << _lv2_plugin->uri() << " has a message port, but no context extension data." << endl; } port->set_context(Context::MESSAGE); diff --git a/src/engine/LV2Plugin.cpp b/src/engine/LV2Plugin.cpp index cb35e495..8efd5da2 100644 --- a/src/engine/LV2Plugin.cpp +++ b/src/engine/LV2Plugin.cpp @@ -48,16 +48,6 @@ LV2Plugin::symbol() const } -const string -LV2Plugin::name() const -{ - if (_name) - return slv2_value_as_string(_name); - else - return "(no name)"; -} - - NodeImpl* LV2Plugin::instantiate(const string& name, bool polyphonic, @@ -85,9 +75,17 @@ void LV2Plugin::slv2_plugin(SLV2Plugin p) { _slv2_plugin = p; - if (_name) - slv2_value_free(_name); - _name = slv2_plugin_get_name(_slv2_plugin); +} + + +const std::string& +LV2Plugin::library_path() const +{ + if (_library_path == "") + _library_path = slv2_uri_to_path(slv2_value_as_uri( + slv2_plugin_get_library_uri(_slv2_plugin))); + + return _library_path; } diff --git a/src/engine/LV2Plugin.hpp b/src/engine/LV2Plugin.hpp index ca8daeea..0d67834e 100644 --- a/src/engine/LV2Plugin.hpp +++ b/src/engine/LV2Plugin.hpp @@ -52,7 +52,6 @@ class LV2Plugin : public PluginImpl public: LV2Plugin(SharedPtr<LV2Info> lv2_info, const string& uri) : PluginImpl(Plugin::LV2, uri) - , _name(NULL) , _slv2_plugin(NULL) , _lv2_info(lv2_info) {} @@ -63,15 +62,15 @@ public: Engine& engine); const string symbol() const; - const string name() const; SharedPtr<LV2Info> lv2_info() const { return _lv2_info; } + + const std::string& library_path() const; SLV2Plugin slv2_plugin() const { return _slv2_plugin; } void slv2_plugin(SLV2Plugin p); private: - SLV2Value _name; SLV2Plugin _slv2_plugin; SharedPtr<LV2Info> _lv2_info; }; diff --git a/src/engine/NodeFactory.cpp b/src/engine/NodeFactory.cpp index dd59f41a..9ec58d80 100644 --- a/src/engine/NodeFactory.cpp +++ b/src/engine/NodeFactory.cpp @@ -180,8 +180,6 @@ NodeFactory::load_lv2_plugins() LV2Plugin* const plugin = new LV2Plugin(_lv2_info, uri); plugin->slv2_plugin(lv2_plug); - plugin->library_path(slv2_uri_to_path(slv2_value_as_uri( - slv2_plugin_get_library_uri(lv2_plug)))); _plugins.insert(make_pair(uri, plugin)); } diff --git a/src/engine/OSCClientSender.cpp b/src/engine/OSCClientSender.cpp index db1d342e..2e058ed5 100644 --- a/src/engine/OSCClientSender.cpp +++ b/src/engine/OSCClientSender.cpp @@ -298,14 +298,12 @@ OSCClientSender::activity(const std::string& path) void OSCClientSender::new_plugin(const std::string& uri, const std::string& type_uri, - const std::string& symbol, - const std::string& name) + const std::string& 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); } diff --git a/src/engine/OSCClientSender.hpp b/src/engine/OSCClientSender.hpp index 1d1c47c5..6b8cc1bf 100644 --- a/src/engine/OSCClientSender.hpp +++ b/src/engine/OSCClientSender.hpp @@ -73,8 +73,7 @@ public: virtual void new_plugin(const std::string& uri, const std::string& type_uri, - const std::string& symbol, - const std::string& name); + const std::string& symbol); virtual bool new_object(const Shared::GraphObject* object); diff --git a/src/engine/PluginImpl.hpp b/src/engine/PluginImpl.hpp index 17a3d116..e900d34c 100644 --- a/src/engine/PluginImpl.hpp +++ b/src/engine/PluginImpl.hpp @@ -59,10 +59,8 @@ public: Engine& engine) = 0; virtual const string symbol() const = 0; - virtual const string name() const = 0; - const std::string& library_path() const { return _library_path; } - void library_path(const std::string& s) { _library_path = s;} + virtual const std::string& library_path() const { return _library_path; } void load(); void unload(); @@ -73,9 +71,9 @@ public: void module(Glib::Module* module) { _module = module; } protected: - Plugin::Type _type; - string _library_path; - Glib::Module* _module; + Plugin::Type _type; + mutable string _library_path; + Glib::Module* _module; }; diff --git a/src/engine/events/RequestPluginEvent.cpp b/src/engine/events/RequestPluginEvent.cpp index 36358df7..3acdceed 100644 --- a/src/engine/events/RequestPluginEvent.cpp +++ b/src/engine/events/RequestPluginEvent.cpp @@ -67,7 +67,7 @@ RequestPluginEvent::post_process() _responder->respond_ok(); assert(_plugin->uri() == _uri); - _responder->client()->new_plugin(_uri, _plugin->type_uri(), _plugin->symbol(), _plugin->name()); + _responder->client()->new_plugin(_uri, _plugin->type_uri(), _plugin->symbol()); } else { _responder->respond_error("Unable to find client to send plugin."); |