From 6e416be77892b960bb429cab11cd4effce0033e1 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 21 Oct 2011 20:25:25 +0000 Subject: QueuedEngineInterface => ServerInterfaceImpl. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@3568 a436a847-0d15-0410-975c-d299462d15a1 --- src/server/Engine.cpp | 2 +- src/server/HTTPEngineReceiver.cpp | 4 +- src/server/HTTPEngineReceiver.hpp | 4 +- src/server/OSCEngineReceiver.cpp | 4 +- src/server/OSCEngineReceiver.hpp | 8 +- src/server/QueuedEngineInterface.cpp | 217 ----------------------------------- src/server/QueuedEngineInterface.hpp | 114 ------------------ src/server/ServerInterfaceImpl.cpp | 217 +++++++++++++++++++++++++++++++++++ src/server/ServerInterfaceImpl.hpp | 114 ++++++++++++++++++ src/server/ingen_engine.cpp | 6 +- src/server/ingen_lv2.cpp | 6 +- src/server/wscript | 2 +- 12 files changed, 349 insertions(+), 349 deletions(-) delete mode 100644 src/server/QueuedEngineInterface.cpp delete mode 100644 src/server/QueuedEngineInterface.hpp create mode 100644 src/server/ServerInterfaceImpl.cpp create mode 100644 src/server/ServerInterfaceImpl.hpp (limited to 'src') diff --git a/src/server/Engine.cpp b/src/server/Engine.cpp index a38e936f..3e5ee704 100644 --- a/src/server/Engine.cpp +++ b/src/server/Engine.cpp @@ -43,7 +43,7 @@ #include "PatchImpl.hpp" #include "PostProcessor.hpp" #include "ProcessContext.hpp" -#include "QueuedEngineInterface.hpp" +#include "ServerInterfaceImpl.hpp" #include "ThreadManager.hpp" using namespace std; diff --git a/src/server/HTTPEngineReceiver.cpp b/src/server/HTTPEngineReceiver.cpp index 855cb486..15362a80 100644 --- a/src/server/HTTPEngineReceiver.cpp +++ b/src/server/HTTPEngineReceiver.cpp @@ -51,7 +51,7 @@ using namespace Serialisation; namespace Server { HTTPEngineReceiver::HTTPEngineReceiver(Engine& engine, uint16_t port) - : QueuedEngineInterface(engine) + : ServerInterfaceImpl(engine) , _server(soup_server_new(SOUP_SERVER_PORT, port, NULL)) { _receive_thread = new ReceiveThread(*this); @@ -216,7 +216,7 @@ HTTPEngineReceiver::message_callback(SoupServer* server, } } -/** Override the semaphore driven _run method of QueuedEngineInterface +/** Override the semaphore driven _run method of ServerInterfaceImpl * to wait on HTTP requests and process them immediately in this thread. */ void diff --git a/src/server/HTTPEngineReceiver.hpp b/src/server/HTTPEngineReceiver.hpp index c261d0f1..f942ee96 100644 --- a/src/server/HTTPEngineReceiver.hpp +++ b/src/server/HTTPEngineReceiver.hpp @@ -22,7 +22,7 @@ #include -#include "QueuedEngineInterface.hpp" +#include "ServerInterfaceImpl.hpp" typedef struct _SoupServer SoupServer; typedef struct _SoupMessage SoupMessage; @@ -31,7 +31,7 @@ typedef struct SoupClientContext SoupClientContext; namespace Ingen { namespace Server { -class HTTPEngineReceiver : public QueuedEngineInterface +class HTTPEngineReceiver : public ServerInterfaceImpl { public: HTTPEngineReceiver(Engine& engine, uint16_t port); diff --git a/src/server/OSCEngineReceiver.cpp b/src/server/OSCEngineReceiver.cpp index 53dc6e4a..4a24989a 100644 --- a/src/server/OSCEngineReceiver.cpp +++ b/src/server/OSCEngineReceiver.cpp @@ -57,7 +57,7 @@ namespace Server { */ OSCEngineReceiver::OSCEngineReceiver(Engine& engine, uint16_t port) - : QueuedEngineInterface(engine) + : ServerInterfaceImpl(engine) , _server(NULL) { _receive_thread = new ReceiveThread(*this); @@ -139,7 +139,7 @@ OSCEngineReceiver::~OSCEngineReceiver() } } -/** Override the semaphore driven _run method of QueuedEngineInterface +/** Override the semaphore driven _run method of ServerInterfaceImpl * to wait on OSC messages and prepare them right away in the same thread. */ void diff --git a/src/server/OSCEngineReceiver.hpp b/src/server/OSCEngineReceiver.hpp index f032d009..4282b0a8 100644 --- a/src/server/OSCEngineReceiver.hpp +++ b/src/server/OSCEngineReceiver.hpp @@ -20,7 +20,7 @@ #include #include -#include "QueuedEngineInterface.hpp" +#include "ServerInterfaceImpl.hpp" #include "Request.hpp" #include "ingen-config.h" @@ -46,15 +46,15 @@ inline static int name##_cb(LO_HANDLER_ARGS, void* myself)\ /** Receives OSC messages from liblo. * - * This inherits from QueuedEngineInterface and calls it's own functions + * This inherits from ServerInterfaceImpl and calls it's own functions * via OSC. It's not actually a directly callable ServerInterface (it's * callable via OSC...) so it should be implemented-as-a (privately inherit) - * QueuedEngineInterface, but it needs to be public so it's an EventSource + * ServerInterfaceImpl, but it needs to be public so it's an EventSource * the Driver can use. This probably should be fixed somehow.. * * \ingroup engine */ -class OSCEngineReceiver : public QueuedEngineInterface +class OSCEngineReceiver : public ServerInterfaceImpl { public: OSCEngineReceiver(Engine& engine, uint16_t port); diff --git a/src/server/QueuedEngineInterface.cpp b/src/server/QueuedEngineInterface.cpp deleted file mode 100644 index f941ef58..00000000 --- a/src/server/QueuedEngineInterface.cpp +++ /dev/null @@ -1,217 +0,0 @@ -/* This file is part of Ingen. - * Copyright 2007-2011 David Robillard - * - * Ingen is free software; you can redistribute it and/or modify it under the - * terms of the GNU General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) any later - * version. - * - * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include - -#include "raul/log.hpp" - -#include "Driver.hpp" -#include "Engine.hpp" -#include "EventSource.hpp" -#include "QueuedEngineInterface.hpp" -#include "events.hpp" - -#define LOG(s) s << "[QueuedEngineInterface] " - -using namespace std; -using namespace Raul; - -namespace Ingen { -namespace Server { - -QueuedEngineInterface::QueuedEngineInterface(Engine& engine) - : EventSource() - , _request(new Request(this, NULL, 0)) - , _engine(engine) - , _in_bundle(false) -{ - start(); -} - - -QueuedEngineInterface::~QueuedEngineInterface() -{ - stop(); -} - -SampleCount -QueuedEngineInterface::now() const -{ - // Exactly one cycle latency (some could run ASAP if we get lucky, but not always, and a slight - // constant latency is far better than jittery lower (average) latency - if (_engine.driver()) - return _engine.driver()->frame_time() + _engine.driver()->block_length(); - else - return 0; -} - -void -QueuedEngineInterface::set_next_response_id(int32_t id) -{ - if (_request) - _request->set_id(id); -} - -void -QueuedEngineInterface::disable_responses() -{ - _request->set_client(NULL); - _request->set_id(0); -} - -/* *** ServerInterface implementation below here *** */ - -void -QueuedEngineInterface::register_client(ClientInterface* client) -{ - push_queued(new Events::RegisterClient(_engine, _request, now(), client->uri(), client)); - if (!_request) { - _request = SharedPtr(new Request(this, client, 1)); - } else { - _request->set_id(1); - _request->set_client(client); - } -} - -void -QueuedEngineInterface::unregister_client(const URI& uri) -{ - push_queued(new Events::UnregisterClient(_engine, _request, now(), uri)); - if (_request && _request->client() && _request->client()->uri() == uri) { - _request->set_id(0); - _request->set_client(NULL); - } -} - -// Bundle commands - -void -QueuedEngineInterface::bundle_begin() -{ - _in_bundle = true; -} - -void -QueuedEngineInterface::bundle_end() -{ - _in_bundle = false; -} - -// Object commands - -void -QueuedEngineInterface::put(const URI& uri, - const Resource::Properties& properties, - const Resource::Graph ctx) -{ - push_queued(new Events::SetMetadata(_engine, _request, now(), true, ctx, uri, properties)); -} - -void -QueuedEngineInterface::delta(const URI& uri, - const Resource::Properties& remove, - const Resource::Properties& add) -{ - push_queued(new Events::SetMetadata(_engine, _request, now(), false, Resource::DEFAULT, uri, add, remove)); -} - -void -QueuedEngineInterface::move(const Path& old_path, - const Path& new_path) -{ - push_queued(new Events::Move(_engine, _request, now(), old_path, new_path)); -} - -void -QueuedEngineInterface::del(const URI& uri) -{ - if (uri == "ingen:engine") { - _request->respond_ok(); - _engine.quit(); - } else { - push_queued(new Events::Delete(_engine, _request, now(), uri)); - } -} - -void -QueuedEngineInterface::connect(const Path& src_port_path, - const Path& dst_port_path) -{ - push_queued(new Events::Connect(_engine, _request, now(), src_port_path, dst_port_path)); - -} - -void -QueuedEngineInterface::disconnect(const URI& src, - const URI& dst) -{ - if (!Path::is_path(src) && !Path::is_path(dst)) { - std::cerr << "Bad disconnect request " << src << " => " << dst << std::endl; - return; - } - - push_queued(new Events::Disconnect(_engine, _request, now(), - Path(src.str()), Path(dst.str()))); -} - -void -QueuedEngineInterface::disconnect_all(const Path& patch_path, - const Path& path) -{ - push_queued(new Events::DisconnectAll(_engine, _request, now(), patch_path, path)); -} - -void -QueuedEngineInterface::set_property(const URI& uri, - const URI& predicate, - const Atom& value) -{ - if (uri == "ingen:engine" && predicate == "ingen:enabled" - && value.type() == Atom::BOOL) { - if (value.get_bool()) { - _engine.activate(); - push_queued(new Events::Ping(_engine, _request, now())); - } else { - push_queued(new Events::Deactivate(_engine, _request, now())); - } - } else { - Resource::Properties remove; - remove.insert(make_pair(predicate, _engine.world()->uris()->wildcard)); - Resource::Properties add; - add.insert(make_pair(predicate, value)); - push_queued(new Events::SetMetadata( - _engine, _request, now(), false, Resource::DEFAULT, - uri, add, remove)); - } -} - -// Requests // - -void -QueuedEngineInterface::ping() -{ - push_queued(new Events::Ping(_engine, _request, now())); -} - -void -QueuedEngineInterface::get(const URI& uri) -{ - push_queued(new Events::Get(_engine, _request, now(), uri)); -} - -} // namespace Server -} // namespace Ingen diff --git a/src/server/QueuedEngineInterface.hpp b/src/server/QueuedEngineInterface.hpp deleted file mode 100644 index f8aa3c24..00000000 --- a/src/server/QueuedEngineInterface.hpp +++ /dev/null @@ -1,114 +0,0 @@ -/* This file is part of Ingen. - * Copyright 2007-2011 David Robillard - * - * Ingen is free software; you can redistribute it and/or modify it under the - * terms of the GNU General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) any later - * version. - * - * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef INGEN_ENGINE_QUEUEDENGINEINTERFACE_HPP -#define INGEN_ENGINE_QUEUEDENGINEINTERFACE_HPP - -#include -#include -#include -#include "raul/SharedPtr.hpp" -#include "ingen/ClientInterface.hpp" -#include "ingen/ServerInterface.hpp" -#include "ingen/Resource.hpp" -#include "EventSource.hpp" -#include "Request.hpp" -#include "types.hpp" - -namespace Ingen { -namespace Server { - -class Engine; - -/** A queued (preprocessed) event source / interface. - * - * This is the bridge between the ServerInterface presented to the client, and - * the EventSource that needs to be presented to the Driver. - * - * Responses occur through the event mechanism (which notified clients in - * event post_process methods) and are related to an event by an integer ID. - * If you do not register a request, you have no way of knowing if your calls - * are successful. - */ -class QueuedEngineInterface : public EventSource, - public ServerInterface -{ -public: - QueuedEngineInterface(Engine& engine); - virtual ~QueuedEngineInterface(); - - Raul::URI uri() const { return "http://drobilla.net/ns/ingen#internal"; } - - void set_next_response_id(int32_t id); - - // Client registration - virtual void register_client(ClientInterface* client); - virtual void unregister_client(const Raul::URI& uri); - - // Bundles - virtual void bundle_begin(); - virtual void bundle_end(); - - // CommonInterface object commands - - virtual void put(const Raul::URI& path, - const Resource::Properties& properties, - const Resource::Graph g=Resource::DEFAULT); - - virtual void delta(const Raul::URI& path, - const Resource::Properties& remove, - const Resource::Properties& add); - - virtual void move(const Raul::Path& old_path, - const Raul::Path& new_path); - - virtual void connect(const Raul::Path& src_port_path, - const Raul::Path& dst_port_path); - - virtual void disconnect(const Raul::URI& src, - const Raul::URI& dst); - - virtual void set_property(const Raul::URI& subject_path, - const Raul::URI& predicate, - const Raul::Atom& value); - - virtual void del(const Raul::URI& uri); - - // ServerInterface object commands - - virtual void disconnect_all(const Raul::Path& parent_patch_path, - const Raul::Path& path); - - // Requests - virtual void ping(); - virtual void get(const Raul::URI& uri); - -protected: - virtual void disable_responses(); - - SharedPtr _request; ///< NULL if responding disabled - Engine& _engine; - bool _in_bundle; ///< True iff a bundle is currently being received - -private: - SampleCount now() const; -}; - -} // namespace Server -} // namespace Ingen - -#endif // INGEN_ENGINE_QUEUEDENGINEINTERFACE_HPP diff --git a/src/server/ServerInterfaceImpl.cpp b/src/server/ServerInterfaceImpl.cpp new file mode 100644 index 00000000..1109a388 --- /dev/null +++ b/src/server/ServerInterfaceImpl.cpp @@ -0,0 +1,217 @@ +/* This file is part of Ingen. + * Copyright 2007-2011 David Robillard + * + * Ingen is free software; you can redistribute it and/or modify it under the + * terms of the GNU General Public License as published by the Free Software + * Foundation; either version 2 of the License, or (at your option) any later + * version. + * + * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include + +#include "raul/log.hpp" + +#include "Driver.hpp" +#include "Engine.hpp" +#include "EventSource.hpp" +#include "ServerInterfaceImpl.hpp" +#include "events.hpp" + +#define LOG(s) s << "[ServerInterfaceImpl] " + +using namespace std; +using namespace Raul; + +namespace Ingen { +namespace Server { + +ServerInterfaceImpl::ServerInterfaceImpl(Engine& engine) + : EventSource() + , _request(new Request(this, NULL, 0)) + , _engine(engine) + , _in_bundle(false) +{ + start(); +} + + +ServerInterfaceImpl::~ServerInterfaceImpl() +{ + stop(); +} + +SampleCount +ServerInterfaceImpl::now() const +{ + // Exactly one cycle latency (some could run ASAP if we get lucky, but not always, and a slight + // constant latency is far better than jittery lower (average) latency + if (_engine.driver()) + return _engine.driver()->frame_time() + _engine.driver()->block_length(); + else + return 0; +} + +void +ServerInterfaceImpl::set_next_response_id(int32_t id) +{ + if (_request) + _request->set_id(id); +} + +void +ServerInterfaceImpl::disable_responses() +{ + _request->set_client(NULL); + _request->set_id(0); +} + +/* *** ServerInterface implementation below here *** */ + +void +ServerInterfaceImpl::register_client(ClientInterface* client) +{ + push_queued(new Events::RegisterClient(_engine, _request, now(), client->uri(), client)); + if (!_request) { + _request = SharedPtr(new Request(this, client, 1)); + } else { + _request->set_id(1); + _request->set_client(client); + } +} + +void +ServerInterfaceImpl::unregister_client(const URI& uri) +{ + push_queued(new Events::UnregisterClient(_engine, _request, now(), uri)); + if (_request && _request->client() && _request->client()->uri() == uri) { + _request->set_id(0); + _request->set_client(NULL); + } +} + +// Bundle commands + +void +ServerInterfaceImpl::bundle_begin() +{ + _in_bundle = true; +} + +void +ServerInterfaceImpl::bundle_end() +{ + _in_bundle = false; +} + +// Object commands + +void +ServerInterfaceImpl::put(const URI& uri, + const Resource::Properties& properties, + const Resource::Graph ctx) +{ + push_queued(new Events::SetMetadata(_engine, _request, now(), true, ctx, uri, properties)); +} + +void +ServerInterfaceImpl::delta(const URI& uri, + const Resource::Properties& remove, + const Resource::Properties& add) +{ + push_queued(new Events::SetMetadata(_engine, _request, now(), false, Resource::DEFAULT, uri, add, remove)); +} + +void +ServerInterfaceImpl::move(const Path& old_path, + const Path& new_path) +{ + push_queued(new Events::Move(_engine, _request, now(), old_path, new_path)); +} + +void +ServerInterfaceImpl::del(const URI& uri) +{ + if (uri == "ingen:engine") { + _request->respond_ok(); + _engine.quit(); + } else { + push_queued(new Events::Delete(_engine, _request, now(), uri)); + } +} + +void +ServerInterfaceImpl::connect(const Path& src_port_path, + const Path& dst_port_path) +{ + push_queued(new Events::Connect(_engine, _request, now(), src_port_path, dst_port_path)); + +} + +void +ServerInterfaceImpl::disconnect(const URI& src, + const URI& dst) +{ + if (!Path::is_path(src) && !Path::is_path(dst)) { + std::cerr << "Bad disconnect request " << src << " => " << dst << std::endl; + return; + } + + push_queued(new Events::Disconnect(_engine, _request, now(), + Path(src.str()), Path(dst.str()))); +} + +void +ServerInterfaceImpl::disconnect_all(const Path& patch_path, + const Path& path) +{ + push_queued(new Events::DisconnectAll(_engine, _request, now(), patch_path, path)); +} + +void +ServerInterfaceImpl::set_property(const URI& uri, + const URI& predicate, + const Atom& value) +{ + if (uri == "ingen:engine" && predicate == "ingen:enabled" + && value.type() == Atom::BOOL) { + if (value.get_bool()) { + _engine.activate(); + push_queued(new Events::Ping(_engine, _request, now())); + } else { + push_queued(new Events::Deactivate(_engine, _request, now())); + } + } else { + Resource::Properties remove; + remove.insert(make_pair(predicate, _engine.world()->uris()->wildcard)); + Resource::Properties add; + add.insert(make_pair(predicate, value)); + push_queued(new Events::SetMetadata( + _engine, _request, now(), false, Resource::DEFAULT, + uri, add, remove)); + } +} + +// Requests // + +void +ServerInterfaceImpl::ping() +{ + push_queued(new Events::Ping(_engine, _request, now())); +} + +void +ServerInterfaceImpl::get(const URI& uri) +{ + push_queued(new Events::Get(_engine, _request, now(), uri)); +} + +} // namespace Server +} // namespace Ingen diff --git a/src/server/ServerInterfaceImpl.hpp b/src/server/ServerInterfaceImpl.hpp new file mode 100644 index 00000000..6c65dcb9 --- /dev/null +++ b/src/server/ServerInterfaceImpl.hpp @@ -0,0 +1,114 @@ +/* This file is part of Ingen. + * Copyright 2007-2011 David Robillard + * + * Ingen is free software; you can redistribute it and/or modify it under the + * terms of the GNU General Public License as published by the Free Software + * Foundation; either version 2 of the License, or (at your option) any later + * version. + * + * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef INGEN_ENGINE_QUEUEDENGINEINTERFACE_HPP +#define INGEN_ENGINE_QUEUEDENGINEINTERFACE_HPP + +#include +#include +#include +#include "raul/SharedPtr.hpp" +#include "ingen/ClientInterface.hpp" +#include "ingen/ServerInterface.hpp" +#include "ingen/Resource.hpp" +#include "EventSource.hpp" +#include "Request.hpp" +#include "types.hpp" + +namespace Ingen { +namespace Server { + +class Engine; + +/** A queued (preprocessed) event source / interface. + * + * This is the bridge between the ServerInterface presented to the client, and + * the EventSource that needs to be presented to the Driver. + * + * Responses occur through the event mechanism (which notified clients in + * event post_process methods) and are related to an event by an integer ID. + * If you do not register a request, you have no way of knowing if your calls + * are successful. + */ +class ServerInterfaceImpl : public EventSource, + public ServerInterface +{ +public: + ServerInterfaceImpl(Engine& engine); + virtual ~ServerInterfaceImpl(); + + Raul::URI uri() const { return "http://drobilla.net/ns/ingen#internal"; } + + void set_next_response_id(int32_t id); + + // Client registration + virtual void register_client(ClientInterface* client); + virtual void unregister_client(const Raul::URI& uri); + + // Bundles + virtual void bundle_begin(); + virtual void bundle_end(); + + // CommonInterface object commands + + virtual void put(const Raul::URI& path, + const Resource::Properties& properties, + const Resource::Graph g=Resource::DEFAULT); + + virtual void delta(const Raul::URI& path, + const Resource::Properties& remove, + const Resource::Properties& add); + + virtual void move(const Raul::Path& old_path, + const Raul::Path& new_path); + + virtual void connect(const Raul::Path& src_port_path, + const Raul::Path& dst_port_path); + + virtual void disconnect(const Raul::URI& src, + const Raul::URI& dst); + + virtual void set_property(const Raul::URI& subject_path, + const Raul::URI& predicate, + const Raul::Atom& value); + + virtual void del(const Raul::URI& uri); + + // ServerInterface object commands + + virtual void disconnect_all(const Raul::Path& parent_patch_path, + const Raul::Path& path); + + // Requests + virtual void ping(); + virtual void get(const Raul::URI& uri); + +protected: + virtual void disable_responses(); + + SharedPtr _request; ///< NULL if responding disabled + Engine& _engine; + bool _in_bundle; ///< True iff a bundle is currently being received + +private: + SampleCount now() const; +}; + +} // namespace Server +} // namespace Ingen + +#endif // INGEN_ENGINE_QUEUEDENGINEINTERFACE_HPP diff --git a/src/server/ingen_engine.cpp b/src/server/ingen_engine.cpp index b7b28575..43d021e0 100644 --- a/src/server/ingen_engine.cpp +++ b/src/server/ingen_engine.cpp @@ -18,7 +18,7 @@ #include "ingen/shared/Module.hpp" #include "ingen/shared/World.hpp" #include "Engine.hpp" -#include "QueuedEngineInterface.hpp" +#include "ServerInterfaceImpl.hpp" #include "util.hpp" using namespace Ingen; @@ -28,8 +28,8 @@ struct IngenEngineModule : public Ingen::Shared::Module { Server::set_denormal_flags(); SharedPtr engine(new Server::Engine(world)); world->set_local_engine(engine); - SharedPtr interface( - new Server::QueuedEngineInterface(*engine.get())); + SharedPtr interface( + new Server::ServerInterfaceImpl(*engine.get())); world->set_engine(interface); engine->add_event_source(interface); assert(world->local_engine() == engine); diff --git a/src/server/ingen_lv2.cpp b/src/server/ingen_lv2.cpp index 9554d6d5..a2513946 100644 --- a/src/server/ingen_lv2.cpp +++ b/src/server/ingen_lv2.cpp @@ -43,7 +43,7 @@ #include "PatchImpl.hpp" #include "PostProcessor.hpp" #include "ProcessContext.hpp" -#include "QueuedEngineInterface.hpp" +#include "ServerInterfaceImpl.hpp" #include "ThreadManager.hpp" /** Record of a patch in this Ingen LV2 bundle */ @@ -285,8 +285,8 @@ ingen_instantiate(const LV2_Descriptor* descriptor, plugin->main = new MainThread(engine); plugin->main->set_name("Main"); - SharedPtr interface( - new Server::QueuedEngineInterface(*engine.get())); + SharedPtr interface( + new Server::ServerInterfaceImpl(*engine.get())); plugin->world->set_engine(interface); engine->add_event_source(interface); diff --git a/src/server/wscript b/src/server/wscript index 92404c5c..0251d7e8 100644 --- a/src/server/wscript +++ b/src/server/wscript @@ -33,8 +33,8 @@ def build(bld): PostProcessor.cpp ProcessContext.cpp ProcessSlave.cpp - QueuedEngineInterface.cpp QueuedEvent.cpp + ServerInterfaceImpl.cpp events/Connect.cpp events/CreateNode.cpp events/CreatePatch.cpp -- cgit v1.2.1