diff options
author | David Robillard <d@drobilla.net> | 2008-08-16 23:30:21 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2008-08-16 23:30:21 +0000 |
commit | 3dc90cc95df35e5c786857336f22856c6373b00f (patch) | |
tree | 5d59f52c6242e6a0fced015542bd966f33779815 /src/libs | |
parent | d72ed9fd506756c83d97b62f6640135f3b8c32bb (diff) | |
download | ingen-3dc90cc95df35e5c786857336f22856c6373b00f.tar.gz ingen-3dc90cc95df35e5c786857336f22856c6373b00f.tar.bz2 ingen-3dc90cc95df35e5c786857336f22856c6373b00f.zip |
Clooser...
git-svn-id: http://svn.drobilla.net/lad/ingen@1408 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs')
-rw-r--r-- | src/libs/client/ClientStore.cpp | 8 | ||||
-rw-r--r-- | src/libs/client/ClientStore.hpp | 2 | ||||
-rw-r--r-- | src/libs/client/DeprecatedLoader.cpp | 2 | ||||
-rw-r--r-- | src/libs/client/OSCClientReceiver.cpp | 7 | ||||
-rw-r--r-- | src/libs/client/OSCEngineSender.cpp | 10 | ||||
-rw-r--r-- | src/libs/client/OSCEngineSender.hpp | 10 | ||||
-rw-r--r-- | src/libs/client/SigClientInterface.hpp | 6 | ||||
-rw-r--r-- | src/libs/client/ThreadedSigClientInterface.hpp | 6 | ||||
-rw-r--r-- | src/libs/engine/OSCClientSender.cpp | 18 | ||||
-rw-r--r-- | src/libs/engine/OSCClientSender.hpp | 7 | ||||
-rw-r--r-- | src/libs/engine/OSCEngineReceiver.cpp | 2 | ||||
-rw-r--r-- | src/libs/engine/ObjectSender.cpp | 2 | ||||
-rw-r--r-- | src/libs/engine/QueuedEngineInterface.cpp | 10 | ||||
-rw-r--r-- | src/libs/engine/QueuedEngineInterface.hpp | 10 |
14 files changed, 47 insertions, 53 deletions
diff --git a/src/libs/client/ClientStore.cpp b/src/libs/client/ClientStore.cpp index 3c7f17aa..d0cb5906 100644 --- a/src/libs/client/ClientStore.cpp +++ b/src/libs/client/ClientStore.cpp @@ -418,16 +418,14 @@ ClientStore::new_patch_event(const Path& path, uint32_t poly) void -ClientStore::new_node_event(const string& plugin_uri, const Path& node_path, bool is_polyphonic, uint32_t num_ports) +ClientStore::new_node_event(const Path& path, const string& plugin_uri, bool polyphonic) { - // FIXME: num_ports unused - SharedPtr<PluginModel> plug = plugin(plugin_uri); if (!plug) { - SharedPtr<NodeModel> n(new NodeModel(plugin_uri, node_path, is_polyphonic)); + SharedPtr<NodeModel> n(new NodeModel(plugin_uri, path, polyphonic)); add_plugin_orphan(n); } else { - SharedPtr<NodeModel> n(new NodeModel(plug, node_path, is_polyphonic)); + SharedPtr<NodeModel> n(new NodeModel(plug, path, polyphonic)); add_object(n); } } diff --git a/src/libs/client/ClientStore.hpp b/src/libs/client/ClientStore.hpp index 4871c644..187070b0 100644 --- a/src/libs/client/ClientStore.hpp +++ b/src/libs/client/ClientStore.hpp @@ -98,7 +98,7 @@ private: void rename_event(const Path& old_path, const Path& new_path); void new_plugin_event(const string& uri, const string& type_uri, const string& symbol, const string& name); void new_patch_event(const Path& path, uint32_t poly); - void new_node_event(const string& plugin_uri, const Path& node_path, bool is_polyphonic, uint32_t num_ports); + void new_node_event(const Path& path, const string& plugin_uri, bool polyphonic); void new_port_event(const Path& path, uint32_t index, const string& data_type, bool is_output); void polyphonic_event(const Path& path, bool polyphonic); void patch_enabled_event(const Path& path); diff --git a/src/libs/client/DeprecatedLoader.cpp b/src/libs/client/DeprecatedLoader.cpp index 8de8a9b6..ea853b23 100644 --- a/src/libs/client/DeprecatedLoader.cpp +++ b/src/libs/client/DeprecatedLoader.cpp @@ -521,7 +521,7 @@ DeprecatedLoader::load_node(const Path& parent, xmlDocPtr doc, const xmlNodePtr if (plugin_uri != "") _engine->new_node(path, plugin_uri, polyphonic); else - _engine->new_node(path, plugin_type, library_name, plugin_label, polyphonic); + _engine->new_node_deprecated(path, plugin_type, library_name, plugin_label, polyphonic); for (GraphObject::Variables::const_iterator i = initial_data.begin(); i != initial_data.end(); ++i) _engine->set_variable(path, i->first, i->second); diff --git a/src/libs/client/OSCClientReceiver.cpp b/src/libs/client/OSCClientReceiver.cpp index c9398685..856e66cc 100644 --- a/src/libs/client/OSCClientReceiver.cpp +++ b/src/libs/client/OSCClientReceiver.cpp @@ -153,8 +153,8 @@ OSCClientReceiver::setup_callbacks() lo_server_thread_add_method(_st, "/ingen/object_renamed", "ss", object_renamed_cb, this); lo_server_thread_add_method(_st, "/ingen/new_connection", "ss", connection_cb, this); lo_server_thread_add_method(_st, "/ingen/disconnection", "ss", disconnection_cb, this); - lo_server_thread_add_method(_st, "/ingen/new_node", "ssTi", new_node_cb, this); - lo_server_thread_add_method(_st, "/ingen/new_node", "ssFi", new_node_cb, this); + lo_server_thread_add_method(_st, "/ingen/new_node", "ssT", new_node_cb, this); + lo_server_thread_add_method(_st, "/ingen/new_node", "ssF", new_node_cb, this); lo_server_thread_add_method(_st, "/ingen/new_port", "sisi", new_port_cb, this); lo_server_thread_add_method(_st, "/ingen/polyphonic", "sT", polyphonic_cb, this); lo_server_thread_add_method(_st, "/ingen/polyphonic", "sF", polyphonic_cb, this); @@ -264,9 +264,8 @@ OSCClientReceiver::_new_node_cb(const char* path, const char* types, lo_arg** ar const char* uri = &argv[0]->s; const char* node_path = &argv[1]->s; const bool polyphonic = (types[2] == 'T'); - const int32_t num_ports = argv[3]->i; - new_node(uri, node_path, polyphonic, num_ports); + new_node(uri, node_path, polyphonic); return 0; } diff --git a/src/libs/client/OSCEngineSender.cpp b/src/libs/client/OSCEngineSender.cpp index 4d8007db..e622b37d 100644 --- a/src/libs/client/OSCEngineSender.cpp +++ b/src/libs/client/OSCEngineSender.cpp @@ -233,11 +233,11 @@ OSCEngineSender::new_node(const string& path, * DO NOT USE THIS. */ void -OSCEngineSender::new_node(const string& path, - const string& plugin_type, - const string& library_name, - const string& plugin_label, - bool polyphonic) +OSCEngineSender::new_node_deprecated(const string& path, + const string& plugin_type, + const string& library_name, + const string& plugin_label, + bool polyphonic) { assert(_engine_addr); if (polyphonic) diff --git a/src/libs/client/OSCEngineSender.hpp b/src/libs/client/OSCEngineSender.hpp index 610841f6..0c317608 100644 --- a/src/libs/client/OSCEngineSender.hpp +++ b/src/libs/client/OSCEngineSender.hpp @@ -84,11 +84,11 @@ public: const string& plugin_uri, bool polyphonic); - void new_node(const string& path, - const string& plugin_type, - const string& library_name, - const string& plugin_label, - bool polyphonic); + void new_node_deprecated(const string& path, + const string& plugin_type, + const string& library_name, + const string& plugin_label, + bool polyphonic); void rename(const string& old_path, const string& new_name); diff --git a/src/libs/client/SigClientInterface.hpp b/src/libs/client/SigClientInterface.hpp index fd2c0bee..d1ea30f2 100644 --- a/src/libs/client/SigClientInterface.hpp +++ b/src/libs/client/SigClientInterface.hpp @@ -52,7 +52,7 @@ public: sigc::signal<void, uint32_t> signal_num_plugins; sigc::signal<void, string, string, string, string> signal_new_plugin; sigc::signal<void, string, uint32_t> signal_new_patch; - sigc::signal<void, string, string, bool, uint32_t> signal_new_node; + sigc::signal<void, string, string, bool> signal_new_node; sigc::signal<void, string, uint32_t, string, bool> signal_new_port; sigc::signal<void, string, bool> signal_polyphonic; sigc::signal<void, string> signal_patch_enabled; @@ -107,8 +107,8 @@ protected: void new_patch(const string& path, uint32_t poly) { if (_enabled) signal_new_patch.emit(path, poly); } - void new_node(const string& plugin_uri, const string& node_path, bool poly, uint32_t num_ports) - { if (_enabled) signal_new_node.emit(plugin_uri, node_path, poly, num_ports); } + void new_node(const string& path, const string& plugin_uri, bool poly) + { if (_enabled) signal_new_node.emit(path, plugin_uri, poly); } void new_port(const string& path, uint32_t index, const string& data_type, bool is_output) { if (_enabled) signal_new_port.emit(path, index, data_type, is_output); } diff --git a/src/libs/client/ThreadedSigClientInterface.hpp b/src/libs/client/ThreadedSigClientInterface.hpp index bdca9a0d..03c638bb 100644 --- a/src/libs/client/ThreadedSigClientInterface.hpp +++ b/src/libs/client/ThreadedSigClientInterface.hpp @@ -98,8 +98,8 @@ public: void new_patch(const string& path, uint32_t poly) { push_sig(sigc::bind(new_patch_slot, path, poly)); } - void new_node(const string& plugin_uri, const string& node_path, bool is_polyphonic, uint32_t num_ports) - { push_sig(sigc::bind(new_node_slot, plugin_uri, node_path, is_polyphonic, num_ports)); } + void new_node(const string& path, const string& plugin_uri, bool polyphonic) + { push_sig(sigc::bind(new_node_slot, path, plugin_uri, polyphonic)); } void new_port(const string& path, uint32_t index, const string& data_type, bool is_output) { push_sig(sigc::bind(new_port_slot, path, index, data_type, is_output)); } @@ -163,7 +163,7 @@ private: sigc::slot<void, string> error_slot; sigc::slot<void, string, string, string, string> new_plugin_slot; sigc::slot<void, string, uint32_t> new_patch_slot; - sigc::slot<void, string, string, bool, int> new_node_slot; + sigc::slot<void, string, string, bool> new_node_slot; sigc::slot<void, string, uint32_t, string, bool> new_port_slot; sigc::slot<void, string, bool> polyphonic_slot; sigc::slot<void, string, string> connection_slot; diff --git a/src/libs/engine/OSCClientSender.cpp b/src/libs/engine/OSCClientSender.cpp index 2c7b5825..c9b156db 100644 --- a/src/libs/engine/OSCClientSender.cpp +++ b/src/libs/engine/OSCClientSender.cpp @@ -289,23 +289,21 @@ OSCClientSender::plugins() * <p> \b /ingen/new_node - Notification of a new node's creation. * \arg \b plug-uri (string) - URI of the plugin new node is an instance of * \arg \b path (string) - Path of the new node - * \arg \b polyphonic (boolean) - Node is polyphonic - * \arg \b num-ports (integer) - Number of ports (number of new_port messages to expect)\n\n + * \arg \b polyphonic (boolean) - Node is polyphonic\n\n * \li New nodes are sent as a bundle. The first message in the bundle will be * this one (/ingen/new_node), followed by a series of /ingen/new_port commands, * followed by /ingen/new_node_end. </p> \n \n */ -void OSCClientSender::new_node(const std::string& plugin_uri, - const std::string& node_path, - bool is_polyphonic, - uint32_t num_ports) +void OSCClientSender::new_node(const std::string& node_path, + const std::string& plugin_uri, + bool is_polyphonic) { if (is_polyphonic) - send("/ingen/new_node", "ssTi", plugin_uri.c_str(), - node_path.c_str(), num_ports, LO_ARGS_END); + send("/ingen/new_node", "ssT", node_path.c_str(), + plugin_uri.c_str(), LO_ARGS_END); else - send("/ingen/new_node", "ssFi", plugin_uri.c_str(), - node_path.c_str(), num_ports, LO_ARGS_END); + send("/ingen/new_node", "ssF", node_path.c_str(), + plugin_uri.c_str(), LO_ARGS_END); } diff --git a/src/libs/engine/OSCClientSender.hpp b/src/libs/engine/OSCClientSender.hpp index 77cafbd8..cc700e38 100644 --- a/src/libs/engine/OSCClientSender.hpp +++ b/src/libs/engine/OSCClientSender.hpp @@ -84,10 +84,9 @@ public: virtual void new_patch(const std::string& path, uint32_t poly); - virtual void new_node(const std::string& plugin_uri, - const std::string& node_path, - bool is_polyphonic, - uint32_t num_ports); + virtual void new_node(const std::string& path, + const std::string& plugin_uri, + bool is_polyphonic); virtual void new_port(const std::string& path, uint32_t index, diff --git a/src/libs/engine/OSCEngineReceiver.cpp b/src/libs/engine/OSCEngineReceiver.cpp index e8f22a2d..4cc27367 100644 --- a/src/libs/engine/OSCEngineReceiver.cpp +++ b/src/libs/engine/OSCEngineReceiver.cpp @@ -544,7 +544,7 @@ OSCEngineReceiver::_new_node_cb(const char* path, const char* types, lo_arg** ar const char* plug_label = &argv[4]->s; bool polyphonic = (types[5] == 'T'); - new_node(node_path, type, lib_name, plug_label, polyphonic); + new_node_deprecated(node_path, type, lib_name, plug_label, polyphonic); return 0; } diff --git a/src/libs/engine/ObjectSender.cpp b/src/libs/engine/ObjectSender.cpp index 5a4436c0..5e456dbc 100644 --- a/src/libs/engine/ObjectSender.cpp +++ b/src/libs/engine/ObjectSender.cpp @@ -95,7 +95,7 @@ ObjectSender::send_node(ClientInterface* client, const NodeImpl* node, bool recu client->bundle_begin(); - client->new_node(node->plugin()->uri(), node->path(), node->polyphonic(), node->num_ports()); + client->new_node(node->path(), node->plugin()->uri(), node->polyphonic()); client->polyphonic(node->path(), node->polyphonic()); // Send variable diff --git a/src/libs/engine/QueuedEngineInterface.cpp b/src/libs/engine/QueuedEngineInterface.cpp index 5a174bf6..65f2c14b 100644 --- a/src/libs/engine/QueuedEngineInterface.cpp +++ b/src/libs/engine/QueuedEngineInterface.cpp @@ -164,11 +164,11 @@ QueuedEngineInterface::new_node(const string& path, void -QueuedEngineInterface::new_node(const string& path, - const string& plugin_type, - const string& plugin_lib, - const string& plugin_label, - bool polyphonic) +QueuedEngineInterface::new_node_deprecated(const string& path, + const string& plugin_type, + const string& plugin_lib, + const string& plugin_label, + bool polyphonic) { push_queued(new CreateNodeEvent(_engine, _responder, now(), path, plugin_type, plugin_lib, plugin_label, polyphonic)); diff --git a/src/libs/engine/QueuedEngineInterface.hpp b/src/libs/engine/QueuedEngineInterface.hpp index 36f16aec..280e9b4e 100644 --- a/src/libs/engine/QueuedEngineInterface.hpp +++ b/src/libs/engine/QueuedEngineInterface.hpp @@ -93,11 +93,11 @@ public: bool polyphonic); /** FIXME: DEPRECATED, REMOVE */ - virtual void new_node(const string& path, - const string& plugin_type, - const string& lib_path, - const string& plug_label, - bool polyphonic); + virtual void new_node_deprecated(const string& path, + const string& plugin_type, + const string& lib_path, + const string& plug_label, + bool polyphonic); virtual void rename(const string& old_path, const string& new_name); |