diff options
Diffstat (limited to 'src/libs/client/ThreadedSigClientInterface.hpp')
-rw-r--r-- | src/libs/client/ThreadedSigClientInterface.hpp | 45 |
1 files changed, 25 insertions, 20 deletions
diff --git a/src/libs/client/ThreadedSigClientInterface.hpp b/src/libs/client/ThreadedSigClientInterface.hpp index af321cab..ed9f0ed4 100644 --- a/src/libs/client/ThreadedSigClientInterface.hpp +++ b/src/libs/client/ThreadedSigClientInterface.hpp @@ -47,7 +47,8 @@ public: ThreadedSigClientInterface(uint32_t queue_size) : _enabled(true) , _sigs(queue_size) - , response_slot(response_sig.make_slot()) + , response_ok_slot(response_ok_sig.make_slot()) + , response_error_slot(response_error_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()) @@ -82,55 +83,58 @@ public: void num_plugins(uint32_t num) { _num_plugins = num; } - void response(int32_t id, bool success, string msg) - { push_sig(sigc::bind(response_slot, id, success, msg)); } + void response_ok(int32_t id) + { push_sig(sigc::bind(response_ok_slot, id)); } + + void response_error(int32_t id, const string& msg) + { push_sig(sigc::bind(response_error_slot, id, msg)); } - void error(string msg) + void error(const string& msg) { push_sig(sigc::bind(error_slot, msg)); } - void new_plugin(string uri, string type_uri, string name) + void new_plugin(const string& uri, const string& type_uri, const string& name) { push_sig(sigc::bind(new_plugin_slot, uri, type_uri, name)); } - void new_patch(string path, uint32_t poly) + void new_patch(const string& path, uint32_t poly) { push_sig(sigc::bind(new_patch_slot, path, poly)); } - void new_node(string plugin_uri, string node_path, bool is_polyphonic, uint32_t num_ports) + 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_port(string path, string data_type, bool is_output) + void new_port(const string& path, const string& data_type, bool is_output) { push_sig(sigc::bind(new_port_slot, path, data_type, is_output)); } - void connection(string src_port_path, string dst_port_path) + void connection(const string& src_port_path, const string& dst_port_path) { push_sig(sigc::bind(connection_slot, src_port_path, dst_port_path)); } - void object_destroyed(string path) + void object_destroyed(const string& path) { push_sig(sigc::bind(object_destroyed_slot, path)); } - void patch_enabled(string path) + void patch_enabled(const string& path) { push_sig(sigc::bind(patch_enabled_slot, path)); } - void patch_disabled(string path) + void patch_disabled(const string& path) { push_sig(sigc::bind(patch_disabled_slot, path)); } - void patch_cleared(string path) + void patch_cleared(const string& path) { push_sig(sigc::bind(patch_cleared_slot, path)); } - void object_renamed(string old_path, string new_path) + void object_renamed(const string& old_path, const string& new_path) { push_sig(sigc::bind(object_renamed_slot, old_path, new_path)); } - void disconnection(string src_port_path, string dst_port_path) + void disconnection(const string& src_port_path, const string& dst_port_path) { push_sig(sigc::bind(disconnection_slot, src_port_path, dst_port_path)); } - void metadata_update(string path, string key, Raul::Atom value) + void metadata_update(const string& path, const string& key, const Raul::Atom& value) { push_sig(sigc::bind(metadata_update_slot, path, key, value)); } - void control_change(string port_path, float value) + void control_change(const string& port_path, float value) { push_sig(sigc::bind(control_change_slot, port_path, value)); } - void program_add(string path, uint32_t bank, uint32_t program, string name) + void program_add(const string& path, uint32_t bank, uint32_t program, const string& name) { push_sig(sigc::bind(program_add_slot, path, bank, program, name)); } - void program_remove(string path, uint32_t bank, uint32_t program) + void program_remove(const string& path, uint32_t bank, uint32_t program) { push_sig(sigc::bind(program_remove_slot, path, bank, program)); } /** Process all queued events - Called from GTK thread to emit signals. */ @@ -147,7 +151,8 @@ private: sigc::slot<void> bundle_begin_slot; sigc::slot<void> bundle_end_slot; sigc::slot<void, uint32_t> num_plugins_slot; - sigc::slot<void, int32_t, bool, string> response_slot; + 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> new_plugin_slot; sigc::slot<void, string, uint32_t> new_patch_slot; |