From 119468f621a59d86da10bedf75c4427b70f9d370 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 16 Mar 2012 03:15:41 +0000 Subject: Remove activity from interface and use set_property() instead. Move client registration stuff to Engine and remove corresponding events. Simply response ID interface. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4066 a436a847-0d15-0410-975c-d299462d15a1 --- ingen/ClientInterface.hpp | 3 --- ingen/EngineBase.hpp | 16 +++++++++++++ ingen/ServerInterface.hpp | 11 ++++----- ingen/client/ClientStore.hpp | 2 -- ingen/client/SigClientInterface.hpp | 4 ---- ingen/client/ThreadedSigClientInterface.hpp | 37 +++++++++++++---------------- ingen/shared/URIs.hpp | 1 + 7 files changed, 37 insertions(+), 37 deletions(-) (limited to 'ingen') diff --git a/ingen/ClientInterface.hpp b/ingen/ClientInterface.hpp index 0bed231c..d59e25b5 100644 --- a/ingen/ClientInterface.hpp +++ b/ingen/ClientInterface.hpp @@ -44,9 +44,6 @@ public: virtual void response(int32_t id, Status status) = 0; virtual void error(const std::string& msg) = 0; - - virtual void activity(const Raul::Path& path, - const Raul::Atom& value) = 0; }; } // namespace Ingen diff --git a/ingen/EngineBase.hpp b/ingen/EngineBase.hpp index 80d1c789..a0fba00f 100644 --- a/ingen/EngineBase.hpp +++ b/ingen/EngineBase.hpp @@ -18,8 +18,12 @@ #ifndef INGEN_ENGINE_BASE_HPP #define INGEN_ENGINE_BASE_HPP +#include "raul/URI.hpp" + namespace Ingen { +class ClientInterface; + /** The engine which executes the process graph. @@ -60,6 +64,18 @@ public: caller should cease calling main_iteration() and stop the engine. */ virtual bool main_iteration() = 0; + + /** + Register a client to receive updates about engine changes. + */ + virtual void register_client(const Raul::URI& uri, + ClientInterface* client) = 0; + + /** + Unregister a client. + */ + virtual bool unregister_client(const Raul::URI& uri) = 0; + }; } // namespace Ingen diff --git a/ingen/ServerInterface.hpp b/ingen/ServerInterface.hpp index 25016416..dade9658 100644 --- a/ingen/ServerInterface.hpp +++ b/ingen/ServerInterface.hpp @@ -36,13 +36,10 @@ class ServerInterface : public CommonInterface public: virtual ~ServerInterface() {} - // Responses - virtual void respond_to(ClientInterface* client, int32_t id) = 0; - virtual void disable_responses() = 0; - - // Client registration - virtual void register_client(ClientInterface* client) = 0; - virtual void unregister_client(const Raul::URI& uri) = 0; + /** Set the ID to use to respond to the next message. + * Setting the ID to -1 will disable responses. + */ + virtual void set_response_id(int32_t id) = 0; // Requests virtual void ping() = 0; diff --git a/ingen/client/ClientStore.hpp b/ingen/client/ClientStore.hpp index b6042086..e29723ae 100644 --- a/ingen/client/ClientStore.hpp +++ b/ingen/client/ClientStore.hpp @@ -125,8 +125,6 @@ private: void bundle_end() {} // Slots for SigClientInterface signals - void activity(const Raul::Path& path, const Raul::Atom& value); - bool attempt_connection(const Raul::Path& src_port_path, const Raul::Path& dst_port_path); diff --git a/ingen/client/SigClientInterface.hpp b/ingen/client/SigClientInterface.hpp index 559d1b15..db59be9d 100644 --- a/ingen/client/SigClientInterface.hpp +++ b/ingen/client/SigClientInterface.hpp @@ -60,7 +60,6 @@ public: INGEN_SIGNAL(variable_change, void, Raul::URI, Raul::URI, Raul::Atom) INGEN_SIGNAL(property_change, void, Raul::URI, Raul::URI, Raul::Atom) INGEN_SIGNAL(port_value, void, Raul::Path, Raul::Atom) - INGEN_SIGNAL(activity, void, Raul::Path, Raul::Atom) /** Fire pending signals. Only does anything on derived classes (that may queue) */ virtual bool emit_signals() { return false; } @@ -110,9 +109,6 @@ protected: void set_property(const Raul::URI& subject, const Raul::URI& key, const Raul::Atom& value) { EMIT(property_change, subject, key, value); } - - void activity(const Raul::Path& port_path, const Raul::Atom& value) - { EMIT(activity, port_path, value); } }; } // namespace Client diff --git a/ingen/client/ThreadedSigClientInterface.hpp b/ingen/client/ThreadedSigClientInterface.hpp index 6ded560e..2a33eae8 100644 --- a/ingen/client/ThreadedSigClientInterface.hpp +++ b/ingen/client/ThreadedSigClientInterface.hpp @@ -65,7 +65,6 @@ public: , variable_change_slot(_signal_variable_change.make_slot()) , property_change_slot(_signal_property_change.make_slot()) , port_value_slot(_signal_port_value.make_slot()) - , activity_slot(_signal_activity.make_slot()) {} virtual Raul::URI uri() const { return "http://drobilla.net/ns/ingen#internal"; } @@ -110,9 +109,6 @@ public: void set_property(const Raul::URI& subject, const Raul::URI& key, const Raul::Atom& value) { push_sig(sigc::bind(property_change_slot, subject, key, value)); } - void activity(const Raul::Path& port_path, const Raul::Atom& value) - { push_sig(sigc::bind(activity_slot, port_path, value)); } - /** Process all queued events - Called from GTK thread to emit signals. */ bool emit_signals(); @@ -124,25 +120,24 @@ private: Raul::SRSWQueue _sigs; - sigc::slot bundle_begin_slot; - sigc::slot bundle_end_slot; - sigc::slot response_slot; - sigc::slot error_slot; - sigc::slot new_plugin_slot; - sigc::slot new_port_slot; + sigc::slot bundle_begin_slot; + sigc::slot bundle_end_slot; + sigc::slot response_slot; + sigc::slot error_slot; + sigc::slot new_plugin_slot; + sigc::slot new_port_slot; sigc::slot put_slot; + Resource::Graph> put_slot; sigc::slot delta_slot; - sigc::slot connection_slot; - sigc::slot object_deleted_slot; - sigc::slot object_moved_slot; - sigc::slot disconnection_slot; - sigc::slot disconnect_all_slot; - sigc::slot variable_change_slot; - sigc::slot property_change_slot; - sigc::slot port_value_slot; - sigc::slot activity_slot; + Resource::Properties> delta_slot; + sigc::slot connection_slot; + sigc::slot object_deleted_slot; + sigc::slot object_moved_slot; + sigc::slot disconnection_slot; + sigc::slot disconnect_all_slot; + sigc::slot variable_change_slot; + sigc::slot property_change_slot; + sigc::slot port_value_slot; }; } // namespace Client diff --git a/ingen/shared/URIs.hpp b/ingen/shared/URIs.hpp index b3d8d301..a99e45d0 100644 --- a/ingen/shared/URIs.hpp +++ b/ingen/shared/URIs.hpp @@ -60,6 +60,7 @@ public: const Quark ingen_Node; const Quark ingen_Patch; const Quark ingen_Port; + const Quark ingen_activity; const Quark ingen_broadcast; const Quark ingen_controlBinding; const Quark ingen_document; -- cgit v1.2.1