From b853b3dde1f7028dd275f78433a6ad9b5b9f61c7 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 8 Sep 2006 23:15:42 +0000 Subject: More cleanups git-svn-id: http://svn.drobilla.net/lad/ingen@122 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/client/ThreadedSigClientInterface.h | 100 +++++++++++---------------- 1 file changed, 40 insertions(+), 60 deletions(-) (limited to 'src/libs/client/ThreadedSigClientInterface.h') diff --git a/src/libs/client/ThreadedSigClientInterface.h b/src/libs/client/ThreadedSigClientInterface.h index 985b1f26..afc756c4 100644 --- a/src/libs/client/ThreadedSigClientInterface.h +++ b/src/libs/client/ThreadedSigClientInterface.h @@ -44,27 +44,23 @@ class ThreadedSigClientInterface : virtual public SigClientInterface public: ThreadedSigClientInterface(uint32_t queue_size) : _sigs(queue_size) - , error_slot(sigc::mem_fun((SigClientInterface*)this, &SigClientInterface::emit_error)) - //, new_plugin_slot(sigc::mem_fun((SigClientInterface*)this, &SigClientInterface::emit_new_plugin_model)) - //, new_patch_slot(sigc::mem_fun((SigClientInterface*)this, &SigClientInterface::emit_new_patch_model)) - //, new_node_slot(sigc::mem_fun((SigClientInterface*)this, &SigClientInterface::emit_new_node_model)) - //, new_port_slot(sigc::mem_fun((SigClientInterface*)this, &SigClientInterface::emit_new_port_model)) - //, connection_slot(sigc::mem_fun((SigClientInterface*)this, &SigClientInterface::emit_connection_model)) - , new_plugin_slot(sigc::mem_fun((SigClientInterface*)this, &SigClientInterface::emit_new_plugin)) - , new_patch_slot(sigc::mem_fun((SigClientInterface*)this, &SigClientInterface::emit_new_patch)) - , new_node_slot(sigc::mem_fun((SigClientInterface*)this, &SigClientInterface::emit_new_node)) - , new_port_slot(sigc::mem_fun((SigClientInterface*)this, &SigClientInterface::emit_new_port)) - , connection_slot(sigc::mem_fun((SigClientInterface*)this, &SigClientInterface::emit_connection)) - , patch_enabled_slot(sigc::mem_fun((SigClientInterface*)this, &SigClientInterface::emit_patch_enabled)) - , patch_disabled_slot(sigc::mem_fun((SigClientInterface*)this, &SigClientInterface::emit_patch_disabled)) - , patch_cleared_slot(sigc::mem_fun((SigClientInterface*)this, &SigClientInterface::emit_patch_cleared)) - , object_destroyed_slot(sigc::mem_fun((SigClientInterface*)this, &SigClientInterface::emit_object_destroyed)) - , object_renamed_slot(sigc::mem_fun((SigClientInterface*)this, &SigClientInterface::emit_object_renamed)) - , disconnection_slot(sigc::mem_fun((SigClientInterface*)this, &SigClientInterface::emit_disconnection)) - , metadata_update_slot(sigc::mem_fun((SigClientInterface*)this, &SigClientInterface::emit_metadata_update)) - , control_change_slot(sigc::mem_fun((SigClientInterface*)this, &SigClientInterface::emit_control_change)) - , program_add_slot(sigc::mem_fun((SigClientInterface*)this, &SigClientInterface::emit_program_add)) - , program_remove_slot(sigc::mem_fun((SigClientInterface*)this, &SigClientInterface::emit_program_remove)) + , response_slot(response_sig.make_slot()) + , error_slot(error_sig.make_slot()) + , new_plugin_slot(new_plugin_sig.make_slot()) + , new_patch_slot(new_patch_sig.make_slot()) + , new_node_slot(new_node_sig.make_slot()) + , new_port_slot(new_port_sig.make_slot()) + , connection_slot(connection_sig.make_slot()) + , patch_enabled_slot(patch_enabled_sig.make_slot()) + , patch_disabled_slot(patch_disabled_sig.make_slot()) + , patch_cleared_slot(patch_cleared_sig.make_slot()) + , object_destroyed_slot(object_destroyed_sig.make_slot()) + , object_renamed_slot(object_renamed_sig.make_slot()) + , disconnection_slot(disconnection_sig.make_slot()) + , metadata_update_slot(metadata_update_sig.make_slot()) + , control_change_slot(control_change_sig.make_slot()) + , program_add_slot(program_add_sig.make_slot()) + , program_remove_slot(program_remove_sig.make_slot()) {} @@ -74,24 +70,12 @@ public: void num_plugins(uint32_t num) { _num_plugins = num; } + void response(int32_t id, bool success, const string& msg) + { push_sig(sigc::bind(response_slot, id, success, msg)); } + void error(const string& msg) { push_sig(sigc::bind(error_slot, msg)); } - /* - void new_plugin_model(PluginModel* const pm) - { push_sig(sigc::bind(new_plugin_slot, pm)); } - - void new_patch_model(PatchModel* const pm) - { push_sig(sigc::bind(new_patch_slot, pm)); } - - void new_node_model(NodeModel* const nm) - { assert(nm); push_sig(sigc::bind(new_node_slot, nm)); } - - void new_port_model(PortModel* const pm) - { push_sig(sigc::bind(new_port_slot, pm)); } - void connection_model(ConnectionModel* const cm) - { push_sig(sigc::bind(connection_slot, cm)); } - */ void new_plugin(const string& type, const string& uri, const string& name) { push_sig(sigc::bind(new_plugin_slot, type, uri, name)); } @@ -146,30 +130,26 @@ private: Queue _sigs; uint32_t _num_plugins; - sigc::slot bundle_begin_slot; - sigc::slot bundle_end_slot; - sigc::slot num_plugins_slot; - sigc::slot error_slot; - /*sigc::slot new_plugin_slot; - sigc::slot new_patch_slot; - sigc::slot new_node_slot; - sigc::slot new_port_slot; - sigc::slot connection_slot; */ - sigc::slot new_plugin_slot; - sigc::slot new_patch_slot; - sigc::slot new_node_slot; - sigc::slot new_port_slot; - sigc::slot connection_slot; - sigc::slot patch_enabled_slot; - sigc::slot patch_disabled_slot; - sigc::slot patch_cleared_slot; - sigc::slot object_destroyed_slot; - sigc::slot object_renamed_slot; - sigc::slot disconnection_slot; - sigc::slot metadata_update_slot; - sigc::slot control_change_slot; - sigc::slot program_add_slot; - sigc::slot program_remove_slot; + sigc::slot bundle_begin_slot; + sigc::slot bundle_end_slot; + sigc::slot num_plugins_slot; + sigc::slot response_slot; + sigc::slot error_slot; + sigc::slot new_plugin_slot; + sigc::slot new_patch_slot; + sigc::slot new_node_slot; + sigc::slot new_port_slot; + sigc::slot connection_slot; + sigc::slot patch_enabled_slot; + sigc::slot patch_disabled_slot; + sigc::slot patch_cleared_slot; + sigc::slot object_destroyed_slot; + sigc::slot object_renamed_slot; + sigc::slot disconnection_slot; + sigc::slot metadata_update_slot; + sigc::slot control_change_slot; + sigc::slot program_add_slot; + sigc::slot program_remove_slot; }; -- cgit v1.2.1