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 --- src/server/ServerInterfaceImpl.cpp | 34 ++++++++-------------------------- 1 file changed, 8 insertions(+), 26 deletions(-) (limited to 'src/server/ServerInterfaceImpl.cpp') diff --git a/src/server/ServerInterfaceImpl.cpp b/src/server/ServerInterfaceImpl.cpp index eb615e9a..1bd388ec 100644 --- a/src/server/ServerInterfaceImpl.cpp +++ b/src/server/ServerInterfaceImpl.cpp @@ -21,6 +21,7 @@ #include "ingen/shared/URIs.hpp" +#include "ClientBroadcaster.hpp" #include "Driver.hpp" #include "Engine.hpp" #include "EventSource.hpp" @@ -63,37 +64,18 @@ ServerInterfaceImpl::now() const } void -ServerInterfaceImpl::respond_to(ClientInterface* client, int32_t id) +ServerInterfaceImpl::set_response_id(int32_t id) { - _request_client = client; - _request_id = id; -} - -void -ServerInterfaceImpl::disable_responses() -{ - _request_client = NULL; - _request_id = -1; + if (!_request_client) { // Kludge + _request_client = _engine.broadcaster()->client( + "http://drobilla.net/ns/ingen#internal"); + std::cerr << "SET REQUEST CLIENT " << (void*)_request_client << std::endl; + } + _request_id = id; } /* *** ServerInterface implementation below here *** */ -void -ServerInterfaceImpl::register_client(ClientInterface* client) -{ - push_queued(new Events::RegisterClient(_engine, client, _request_id, now(), client->uri())); - _request_client = client; - _request_id = 1; -} - -void -ServerInterfaceImpl::unregister_client(const URI& uri) -{ - push_queued(new Events::UnregisterClient(_engine, _request_client, _request_id, now(), uri)); - _request_client = NULL; - _request_id = -1; -} - // Bundle commands void -- cgit v1.2.1