From 74c76bd82792b03bd12f30aa875fae3e5047ccc2 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 19 Apr 2011 21:27:38 +0000 Subject: Remove EngineInterface::quit(). Use del("ingen:engine") instead. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@3172 a436a847-0d15-0410-975c-d299462d15a1 --- src/client/ClientStore.cpp | 6 +++++- src/client/ClientStore.hpp | 2 +- src/client/HTTPEngineSender.cpp | 9 +-------- src/client/HTTPEngineSender.hpp | 5 +---- src/client/OSCEngineSender.cpp | 12 ++---------- src/client/OSCEngineSender.hpp | 5 +---- src/client/SigClientInterface.hpp | 6 +++--- src/client/ThreadedSigClientInterface.hpp | 6 +++--- 8 files changed, 17 insertions(+), 34 deletions(-) (limited to 'src/client') diff --git a/src/client/ClientStore.cpp b/src/client/ClientStore.cpp index 32e115e6..690a2666 100644 --- a/src/client/ClientStore.cpp +++ b/src/client/ClientStore.cpp @@ -201,8 +201,12 @@ ClientStore::add_plugin(SharedPtr pm) /* ****** Signal Handlers ******** */ void -ClientStore::del(const Path& path) +ClientStore::del(const URI& uri) { + if (!Raul::Path::is_path(uri)) + return; + + const Raul::Path path(uri.str()); SharedPtr removed = remove_object(path); removed.reset(); LOG(debug) << "Removed object " << path << ", count: " << removed.use_count(); diff --git a/src/client/ClientStore.hpp b/src/client/ClientStore.hpp index 7bc21b99..dc02a455 100644 --- a/src/client/ClientStore.hpp +++ b/src/client/ClientStore.hpp @@ -97,7 +97,7 @@ public: void disconnect(const Raul::Path& src_port_path, const Raul::Path& dst_port_path); - void del(const Raul::Path& path); + void del(const Raul::URI& uri); sigc::signal< void, SharedPtr > signal_new_object; sigc::signal< void, SharedPtr > signal_new_plugin; diff --git a/src/client/HTTPEngineSender.cpp b/src/client/HTTPEngineSender.cpp index e188b010..98c43a12 100644 --- a/src/client/HTTPEngineSender.cpp +++ b/src/client/HTTPEngineSender.cpp @@ -78,13 +78,6 @@ HTTPEngineSender::unregister_client(const URI& uri) { } -// Engine commands - -void -HTTPEngineSender::quit() -{ -} - // Object commands void @@ -128,7 +121,7 @@ HTTPEngineSender::move(const Path& old_path, } void -HTTPEngineSender::del(const Path& uri) +HTTPEngineSender::del(const URI& uri) { const string path = (uri.substr(0, 6) == "path:/") ? uri.substr(6) : uri.str(); const string full_uri = _engine_url.str() + "/" + path; diff --git a/src/client/HTTPEngineSender.hpp b/src/client/HTTPEngineSender.hpp index 549ad07a..b5653273 100644 --- a/src/client/HTTPEngineSender.hpp +++ b/src/client/HTTPEngineSender.hpp @@ -72,9 +72,6 @@ public: void register_client(ClientInterface* client); void unregister_client(const Raul::URI& uri); - // Engine commands - void quit(); - // Object commands virtual void put(const Raul::URI& path, @@ -85,7 +82,7 @@ public: const Resource::Properties& remove, const Resource::Properties& add); - virtual void del(const Raul::Path& path); + virtual void del(const Raul::URI& uri); virtual void move(const Raul::Path& old_path, const Raul::Path& new_path); diff --git a/src/client/OSCEngineSender.cpp b/src/client/OSCEngineSender.cpp index 3c9b60b4..9de1192a 100644 --- a/src/client/OSCEngineSender.cpp +++ b/src/client/OSCEngineSender.cpp @@ -98,14 +98,6 @@ OSCEngineSender::unregister_client(const URI& uri) send("/unregister_client", "i", next_id(), LO_ARGS_END); } -// Engine commands - -void -OSCEngineSender::quit() -{ - send("/quit", "i", next_id(), LO_ARGS_END); -} - // Object commands void @@ -144,11 +136,11 @@ OSCEngineSender::move(const Path& old_path, } void -OSCEngineSender::del(const Path& path) +OSCEngineSender::del(const URI& uri) { send("/delete", "is", next_id(), - path.c_str(), + uri.c_str(), LO_ARGS_END); } diff --git a/src/client/OSCEngineSender.hpp b/src/client/OSCEngineSender.hpp index 75cf3db1..98d2d40c 100644 --- a/src/client/OSCEngineSender.hpp +++ b/src/client/OSCEngineSender.hpp @@ -73,9 +73,6 @@ public: void register_client(ClientInterface* client); void unregister_client(const Raul::URI& uri); - // Engine commands - void quit(); - // Object commands virtual void put(const Raul::URI& path, @@ -86,7 +83,7 @@ public: const Resource::Properties& remove, const Resource::Properties& add); - virtual void del(const Raul::Path& path); + virtual void del(const Raul::URI& uri); virtual void move(const Raul::Path& old_path, const Raul::Path& new_path); diff --git a/src/client/SigClientInterface.hpp b/src/client/SigClientInterface.hpp index 26a64f85..17cd8556 100644 --- a/src/client/SigClientInterface.hpp +++ b/src/client/SigClientInterface.hpp @@ -55,7 +55,7 @@ public: sigc::signal signal_delta; sigc::signal signal_object_moved; - sigc::signal signal_object_deleted; + sigc::signal signal_object_deleted; sigc::signal signal_connection; sigc::signal signal_disconnection; sigc::signal signal_variable_change; @@ -100,8 +100,8 @@ protected: void connect(const Raul::Path& src_port_path, const Raul::Path& dst_port_path) { EMIT(connection, src_port_path, dst_port_path); } - void del(const Raul::Path& path) - { EMIT(object_deleted, path); } + void del(const Raul::URI& uri) + { EMIT(object_deleted, uri); } void move(const Raul::Path& old_path, const Raul::Path& new_path) { EMIT(object_moved, old_path, new_path); } diff --git a/src/client/ThreadedSigClientInterface.hpp b/src/client/ThreadedSigClientInterface.hpp index 84f9c009..00bd2767 100644 --- a/src/client/ThreadedSigClientInterface.hpp +++ b/src/client/ThreadedSigClientInterface.hpp @@ -94,8 +94,8 @@ public: void connect(const Raul::Path& src_port_path, const Raul::Path& dst_port_path) { push_sig(sigc::bind(connection_slot, src_port_path, dst_port_path)); } - void del(const Raul::Path& path) - { push_sig(sigc::bind(object_deleted_slot, path)); } + void del(const Raul::URI& uri) + { push_sig(sigc::bind(object_deleted_slot, uri)); } void move(const Raul::Path& old_path, const Raul::Path& new_path) { push_sig(sigc::bind(object_moved_slot, old_path, new_path)); } @@ -132,7 +132,7 @@ private: sigc::slot delta_slot; sigc::slot connection_slot; - sigc::slot object_deleted_slot; + sigc::slot object_deleted_slot; sigc::slot object_moved_slot; sigc::slot disconnection_slot; sigc::slot variable_change_slot; -- cgit v1.2.1