From 9da093217352daa1fb61a6f2daf5195640e286a7 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 16 Mar 2012 04:13:23 +0000 Subject: Merge ClientInterface and ServerInterface. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4067 a436a847-0d15-0410-975c-d299462d15a1 --- ingen/ClientInterface.hpp | 51 ---------------- ingen/CommonInterface.hpp | 75 ------------------------ ingen/EngineBase.hpp | 4 +- ingen/Interface.hpp | 91 +++++++++++++++++++++++++++++ ingen/ServerInterface.hpp | 52 ----------------- ingen/client/ClientStore.hpp | 20 ++++--- ingen/client/PluginModel.hpp | 2 +- ingen/client/PluginUI.hpp | 2 +- ingen/client/SigClientInterface.hpp | 8 ++- ingen/client/ThreadedSigClientInterface.hpp | 4 +- ingen/serialisation/Parser.hpp | 6 +- ingen/shared/Builder.hpp | 8 +-- ingen/shared/ClashAvoider.hpp | 20 ++++--- ingen/shared/World.hpp | 21 ++++--- src/client/ClientStore.cpp | 12 ++-- src/gui/App.cpp | 4 +- src/gui/App.hpp | 5 +- src/gui/ConnectWindow.cpp | 9 ++- src/gui/ConnectWindow.hpp | 2 +- src/gui/ControlPanel.cpp | 2 +- src/gui/Controls.cpp | 2 +- src/gui/LoadPatchWindow.cpp | 2 +- src/gui/LoadPluginWindow.cpp | 2 +- src/gui/NewSubpatchWindow.cpp | 2 +- src/gui/NodeControlWindow.cpp | 2 +- src/gui/NodeMenu.cpp | 2 +- src/gui/NodeModule.cpp | 2 +- src/gui/ObjectMenu.cpp | 2 +- src/gui/PatchCanvas.cpp | 2 +- src/gui/PatchPortModule.cpp | 2 +- src/gui/PatchTreeWindow.cpp | 2 +- src/gui/PatchView.cpp | 2 +- src/gui/PatchWindow.cpp | 2 +- src/gui/Port.cpp | 2 +- src/gui/PortMenu.cpp | 2 +- src/gui/PortPropertiesWindow.cpp | 2 +- src/gui/RenameWindow.cpp | 2 +- src/gui/SubpatchModule.cpp | 2 +- src/gui/ThreadedLoader.cpp | 2 +- src/gui/ThreadedLoader.hpp | 14 ++--- src/ingen/main.cpp | 6 +- src/osc/OSCClientReceiver.hpp | 2 +- src/osc/OSCClientSender.cpp | 2 +- src/osc/OSCClientSender.hpp | 2 +- src/osc/OSCEngineReceiver.cpp | 3 +- src/osc/OSCEngineSender.hpp | 6 +- src/serialisation/Parser.cpp | 50 ++++++++-------- src/serialisation/Serialiser.cpp | 2 +- src/server/ClientBroadcaster.cpp | 8 +-- src/server/ClientBroadcaster.hpp | 21 ++++--- src/server/Engine.cpp | 2 +- src/server/Engine.hpp | 3 +- src/server/Event.cpp | 2 +- src/server/Event.hpp | 8 +-- src/server/ObjectSender.cpp | 10 ++-- src/server/ObjectSender.hpp | 22 +++---- src/server/ServerInterfaceImpl.cpp | 1 - src/server/ServerInterfaceImpl.hpp | 26 ++++----- src/server/events/Connect.cpp | 12 ++-- src/server/events/Connect.hpp | 2 +- src/server/events/CreateNode.cpp | 2 +- src/server/events/CreateNode.hpp | 2 +- src/server/events/CreatePatch.cpp | 2 +- src/server/events/CreatePatch.hpp | 2 +- src/server/events/CreatePort.cpp | 2 +- src/server/events/CreatePort.hpp | 2 +- src/server/events/Deactivate.hpp | 2 +- src/server/events/Delete.cpp | 2 +- src/server/events/Delete.hpp | 2 +- src/server/events/Disconnect.cpp | 2 +- src/server/events/Disconnect.hpp | 2 +- src/server/events/DisconnectAll.cpp | 12 ++-- src/server/events/DisconnectAll.hpp | 2 +- src/server/events/Get.cpp | 12 ++-- src/server/events/Get.hpp | 2 +- src/server/events/Move.cpp | 12 ++-- src/server/events/Move.hpp | 2 +- src/server/events/Ping.hpp | 8 +-- src/server/events/SetMetadata.cpp | 2 +- src/server/events/SetMetadata.hpp | 2 +- src/server/events/SetPortValue.cpp | 4 +- src/server/events/SetPortValue.hpp | 4 +- src/server/ingen_lv2.cpp | 4 +- src/shared/Builder.cpp | 4 +- src/shared/World.cpp | 16 ++--- 85 files changed, 334 insertions(+), 414 deletions(-) delete mode 100644 ingen/ClientInterface.hpp delete mode 100644 ingen/CommonInterface.hpp create mode 100644 ingen/Interface.hpp delete mode 100644 ingen/ServerInterface.hpp diff --git a/ingen/ClientInterface.hpp b/ingen/ClientInterface.hpp deleted file mode 100644 index d59e25b5..00000000 --- a/ingen/ClientInterface.hpp +++ /dev/null @@ -1,51 +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_INTERFACE_CLIENTINTERFACE_HPP -#define INGEN_INTERFACE_CLIENTINTERFACE_HPP - -#include - -#include - -#include "raul/URI.hpp" - -#include "ingen/CommonInterface.hpp" -#include "ingen/Status.hpp" - -namespace Raul { class Path; } - -namespace Ingen { - -/** The (only) interface the engine uses to communicate with clients. - * Purely virtual (except for the destructor). - * - * \ingroup interface - */ -class ClientInterface : public CommonInterface -{ -public: - virtual ~ClientInterface() {} - - virtual void response(int32_t id, Status status) = 0; - - virtual void error(const std::string& msg) = 0; -}; - -} // namespace Ingen - -#endif diff --git a/ingen/CommonInterface.hpp b/ingen/CommonInterface.hpp deleted file mode 100644 index 398fbd3b..00000000 --- a/ingen/CommonInterface.hpp +++ /dev/null @@ -1,75 +0,0 @@ -/* This file is part of Ingen. - * Copyright 2008-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_INTERFACE_COMMONINTERFACE_HPP -#define INGEN_INTERFACE_COMMONINTERFACE_HPP - -#include "ingen/Resource.hpp" - -namespace Raul { class Atom; class Path; class URI; } - -namespace Ingen { - -/** Abstract interface common to both engine and clients. - * Purely virtual (except for the destructor). - * - * \ingroup interface - */ -class CommonInterface -{ -public: - virtual ~CommonInterface() {} - - virtual Raul::URI uri() const = 0; - - /** Begin an atomic bundle */ - virtual void bundle_begin() = 0; - - /** End (and send) an atomic bundle */ - virtual void bundle_end() = 0; - - virtual void put(const Raul::URI& uri, - const Resource::Properties& properties, - Resource::Graph ctx=Resource::DEFAULT) = 0; - - virtual void delta(const Raul::URI& uri, - const Resource::Properties& remove, - const Resource::Properties& add) = 0; - - virtual void move(const Raul::Path& old_path, - const Raul::Path& new_path) = 0; - - virtual void del(const Raul::URI& uri) = 0; - - virtual void connect(const Raul::Path& src_port_path, - const Raul::Path& dst_port_path) = 0; - - virtual void disconnect(const Raul::URI& src, - const Raul::URI& dst) = 0; - - virtual void disconnect_all(const Raul::Path& parent_patch_path, - const Raul::Path& path) = 0; - - virtual void set_property(const Raul::URI& subject, - const Raul::URI& predicate, - const Raul::Atom& value) = 0; -}; - -} // namespace Ingen - -#endif // INGEN_INTERFACE_COMMONINTERFACE_HPP - diff --git a/ingen/EngineBase.hpp b/ingen/EngineBase.hpp index a0fba00f..87a637ae 100644 --- a/ingen/EngineBase.hpp +++ b/ingen/EngineBase.hpp @@ -22,7 +22,7 @@ namespace Ingen { -class ClientInterface; +class Interface; /** The engine which executes the process graph. @@ -69,7 +69,7 @@ public: Register a client to receive updates about engine changes. */ virtual void register_client(const Raul::URI& uri, - ClientInterface* client) = 0; + Interface* client) = 0; /** Unregister a client. diff --git a/ingen/Interface.hpp b/ingen/Interface.hpp new file mode 100644 index 00000000..cdc37949 --- /dev/null +++ b/ingen/Interface.hpp @@ -0,0 +1,91 @@ +/* This file is part of Ingen. + * Copyright 2008-2012 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_INTERFACE_HPP +#define INGEN_INTERFACE_HPP + +#include "ingen/Resource.hpp" +#include "ingen/Status.hpp" + +namespace Raul { class Atom; class Path; class URI; } + +namespace Ingen { + +/** Abstract interface common to both engine and clients. + * Purely virtual (except for the destructor). + * + * \ingroup interface + */ +class Interface +{ +public: + virtual ~Interface() {} + + virtual Raul::URI uri() const = 0; + + /** Begin an atomic bundle */ + virtual void bundle_begin() = 0; + + /** End (and send) an atomic bundle */ + virtual void bundle_end() = 0; + + virtual void put(const Raul::URI& uri, + const Resource::Properties& properties, + Resource::Graph ctx=Resource::DEFAULT) = 0; + + virtual void delta(const Raul::URI& uri, + const Resource::Properties& remove, + const Resource::Properties& add) = 0; + + virtual void move(const Raul::Path& old_path, + const Raul::Path& new_path) = 0; + + virtual void del(const Raul::URI& uri) = 0; + + virtual void connect(const Raul::Path& src_port_path, + const Raul::Path& dst_port_path) = 0; + + virtual void disconnect(const Raul::URI& src, + const Raul::URI& dst) = 0; + + virtual void disconnect_all(const Raul::Path& parent_patch_path, + const Raul::Path& path) = 0; + + virtual void set_property(const Raul::URI& subject, + const Raul::URI& predicate, + const Raul::Atom& value) = 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; + virtual void get(const Raul::URI& uri) = 0; + + // Response + virtual void response(int32_t id, Status status) = 0; + + // Non-response error + virtual void error(const std::string& msg) = 0; +}; + +} // namespace Ingen + +#endif // INGEN_INTERFACE_HPP + diff --git a/ingen/ServerInterface.hpp b/ingen/ServerInterface.hpp deleted file mode 100644 index dade9658..00000000 --- a/ingen/ServerInterface.hpp +++ /dev/null @@ -1,52 +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_INTERFACE_SERVERINTERFACE_HPP -#define INGEN_INTERFACE_SERVERINTERFACE_HPP - -#include - -#include "ingen/CommonInterface.hpp" - -namespace Ingen { - -class ClientInterface; - -/** The (only) interface clients use to communicate with the engine. - * Purely virtual (except for the destructor). - * - * \ingroup interface - */ -class ServerInterface : public CommonInterface -{ -public: - virtual ~ServerInterface() {} - - /** 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; - virtual void get(const Raul::URI& uri) = 0; -}; - -} // namespace Ingen - -#endif // INGEN_INTERFACE_SERVERINTERFACE_HPP - diff --git a/ingen/client/ClientStore.hpp b/ingen/client/ClientStore.hpp index e29723ae..dbba8e90 100644 --- a/ingen/client/ClientStore.hpp +++ b/ingen/client/ClientStore.hpp @@ -27,7 +27,7 @@ #include "raul/SharedPtr.hpp" #include "raul/TableImpl.hpp" -#include "ingen/ServerInterface.hpp" +#include "ingen/Interface.hpp" #include "ingen/client/signal.hpp" #include "ingen/shared/LV2URIMap.hpp" #include "ingen/shared/Store.hpp" @@ -54,13 +54,13 @@ class SigClientInterface; * \ingroup IngenClient */ class ClientStore : public Shared::Store - , public CommonInterface + , public Interface , public INGEN_TRACKABLE { public: ClientStore( SharedPtr uris, - SharedPtr engine=SharedPtr(), - SharedPtr emitter=SharedPtr()); + SharedPtr engine = SharedPtr(), + SharedPtr emitter = SharedPtr()); Raul::URI uri() const { return "ingen:ClientStore"; } @@ -103,8 +103,14 @@ public: void del(const Raul::URI& uri); - INGEN_SIGNAL(new_object, void, SharedPtr); - INGEN_SIGNAL(new_plugin, void, SharedPtr); + void set_response_id(int32_t id) {} + void ping() {} + void get(const Raul::URI& uri) {} + void response(int32_t id, Status status) {} + void error(const std::string& msg) {} + + INGEN_SIGNAL(new_object, void, SharedPtr); + INGEN_SIGNAL(new_plugin, void, SharedPtr); private: void add(GraphObject* o) { throw; } @@ -129,7 +135,7 @@ private: const Raul::Path& dst_port_path); SharedPtr _uris; - SharedPtr _engine; + SharedPtr _engine; SharedPtr _emitter; SharedPtr _plugins; ///< Map, keyed by plugin URI diff --git a/ingen/client/PluginModel.hpp b/ingen/client/PluginModel.hpp index a0887454..62c5b92f 100644 --- a/ingen/client/PluginModel.hpp +++ b/ingen/client/PluginModel.hpp @@ -24,7 +24,7 @@ #include "sord/sordmm.hpp" #include "ingen/Plugin.hpp" -#include "ingen/ServerInterface.hpp" +#include "ingen/Interface.hpp" #include "ingen/client/signal.hpp" #include "ingen/shared/ResourceImpl.hpp" #include "ingen/shared/World.hpp" diff --git a/ingen/client/PluginUI.hpp b/ingen/client/PluginUI.hpp index 501db260..c99c5fb8 100644 --- a/ingen/client/PluginUI.hpp +++ b/ingen/client/PluginUI.hpp @@ -28,7 +28,7 @@ namespace Ingen { -class ServerInterface; +class Interface; namespace Shared { class World; } diff --git a/ingen/client/SigClientInterface.hpp b/ingen/client/SigClientInterface.hpp index db59be9d..afc4d66b 100644 --- a/ingen/client/SigClientInterface.hpp +++ b/ingen/client/SigClientInterface.hpp @@ -22,7 +22,7 @@ #include "raul/Path.hpp" -#include "ingen/ClientInterface.hpp" +#include "ingen/Interface.hpp" #include "ingen/client/signal.hpp" namespace Ingen { @@ -36,7 +36,7 @@ namespace Client { * The signals here match the calls to ClientInterface exactly. See the * documentation for ClientInterface for meanings of signal parameters. */ -class SigClientInterface : public Ingen::ClientInterface, +class SigClientInterface : public Ingen::Interface, public INGEN_TRACKABLE { public: @@ -109,6 +109,10 @@ protected: void set_property(const Raul::URI& subject, const Raul::URI& key, const Raul::Atom& value) { EMIT(property_change, subject, key, value); } + + void set_response_id(int32_t id) {} + void ping() {} + void get(const Raul::URI& uri) {} }; } // namespace Client diff --git a/ingen/client/ThreadedSigClientInterface.hpp b/ingen/client/ThreadedSigClientInterface.hpp index 2a33eae8..30185c4c 100644 --- a/ingen/client/ThreadedSigClientInterface.hpp +++ b/ingen/client/ThreadedSigClientInterface.hpp @@ -29,7 +29,7 @@ #include "raul/Atom.hpp" #include "raul/SRSWQueue.hpp" -#include "ingen/ClientInterface.hpp" +#include "ingen/Interface.hpp" #include "ingen/client/SigClientInterface.hpp" /** Returns nothing and takes no parameters (because they have all been bound) */ @@ -37,7 +37,7 @@ typedef sigc::slot Closure; namespace Ingen { -class ServerInterface; +class Interface; namespace Client { diff --git a/ingen/serialisation/Parser.hpp b/ingen/serialisation/Parser.hpp index 492af2ad..f242108b 100644 --- a/ingen/serialisation/Parser.hpp +++ b/ingen/serialisation/Parser.hpp @@ -30,7 +30,7 @@ namespace Ingen { -class CommonInterface; +class Interface; namespace Shared { class World; } @@ -50,7 +50,7 @@ public: virtual bool parse_file( Shared::World* world, - CommonInterface* target, + Interface* target, Glib::ustring path, boost::optional parent = boost::optional(), boost::optional symbol = boost::optional(), @@ -58,7 +58,7 @@ public: virtual bool parse_string( Shared::World* world, - CommonInterface* target, + Interface* target, const Glib::ustring& str, const Glib::ustring& base_uri, boost::optional parent = boost::optional(), diff --git a/ingen/shared/Builder.hpp b/ingen/shared/Builder.hpp index 245b3013..5db41b44 100644 --- a/ingen/shared/Builder.hpp +++ b/ingen/shared/Builder.hpp @@ -22,21 +22,21 @@ namespace Ingen { -class CommonInterface; +class Interface; class GraphObject; namespace Shared { class URIs; -/** Wrapper for CommonInterface to create existing objects/models. +/** Wrapper for Interface to create existing objects/models. * * \ingroup interface */ class Builder { public: - Builder(SharedPtr uris, CommonInterface& interface); + Builder(SharedPtr uris, Interface& interface); virtual ~Builder() {} void build(SharedPtr object); @@ -46,7 +46,7 @@ private: void build_object(SharedPtr object); SharedPtr _uris; - CommonInterface& _interface; + Interface& _interface; }; } // namespace Shared diff --git a/ingen/shared/ClashAvoider.hpp b/ingen/shared/ClashAvoider.hpp index 4f5d8ec1..5c33d412 100644 --- a/ingen/shared/ClashAvoider.hpp +++ b/ingen/shared/ClashAvoider.hpp @@ -22,7 +22,7 @@ #include -#include "ingen/CommonInterface.hpp" +#include "ingen/Interface.hpp" namespace Raul { class Atom; class Path; } @@ -31,18 +31,18 @@ namespace Shared { class Store; -/** A wrapper for a CommonInterface that creates objects but possibly maps +/** A wrapper for an Interface that creates objects but possibly maps * symbol names to avoid clashes with the existing objects in a store. */ -class ClashAvoider : public CommonInterface +class ClashAvoider : public Interface { public: - ClashAvoider(Store& store, CommonInterface& target, Store* also_avoid=NULL) + ClashAvoider(Store& store, Interface& target, Store* also_avoid=NULL) : _store(store), _target(target), _also_avoid(also_avoid) {} Raul::URI uri() const { return "ingen:ClientStore"; } - void set_target(CommonInterface& target) { _target = target; } + void set_target(Interface& target) { _target = target; } // Bundles void bundle_begin() { _target.bundle_begin(); } @@ -76,12 +76,18 @@ public: virtual void del(const Raul::URI& uri); + virtual void set_response_id(int32_t id) {} + virtual void ping() {} + virtual void get(const Raul::URI& uri) {} + virtual void response(int32_t id, Status status) {} + virtual void error(const std::string& msg) {} + private: const Raul::URI map_uri(const Raul::URI& in); const Raul::Path map_path(const Raul::Path& in); - Store& _store; - CommonInterface& _target; + Store& _store; + Interface& _target; Store* _also_avoid; bool exists(const Raul::Path& path) const; diff --git a/ingen/shared/World.hpp b/ingen/shared/World.hpp index e062dea6..aa308efd 100644 --- a/ingen/shared/World.hpp +++ b/ingen/shared/World.hpp @@ -35,8 +35,7 @@ namespace Sord { class World; } namespace Ingen { class EngineBase; -class ClientInterface; -class ServerInterface; +class Interface; namespace Serialisation { class Serialiser; class Parser; } @@ -71,29 +70,29 @@ public: virtual void unload_modules(); - typedef SharedPtr (*InterfaceFactory)( - World* world, - const std::string& engine_url, - SharedPtr respond_to); + typedef SharedPtr (*InterfaceFactory)( + World* world, + const std::string& engine_url, + SharedPtr respond_to); virtual void add_interface_factory(const std::string& scheme, InterfaceFactory factory); - virtual SharedPtr interface( - const std::string& engine_url, - SharedPtr respond_to); + virtual SharedPtr interface( + const std::string& engine_url, + SharedPtr respond_to); virtual bool run(const std::string& mime_type, const std::string& filename); virtual void set_local_engine(SharedPtr e); - virtual void set_engine(SharedPtr e); + virtual void set_engine(SharedPtr e); virtual void set_serialiser(SharedPtr s); virtual void set_parser(SharedPtr p); virtual void set_store(SharedPtr s); virtual SharedPtr local_engine(); - virtual SharedPtr engine(); + virtual SharedPtr engine(); virtual SharedPtr serialiser(); virtual SharedPtr parser(); virtual SharedPtr store(); diff --git a/src/client/ClientStore.cpp b/src/client/ClientStore.cpp index c7d5b9a2..83815187 100644 --- a/src/client/ClientStore.cpp +++ b/src/client/ClientStore.cpp @@ -43,7 +43,7 @@ using namespace Shared; namespace Client { ClientStore::ClientStore(SharedPtr uris, - SharedPtr engine, + SharedPtr engine, SharedPtr emitter) : _uris(uris) , _engine(engine) @@ -238,7 +238,7 @@ ClientStore::move(const Path& old_path_str, const Path& new_path_str) iterator parent = find(old_path); if (parent == end()) { - LOG(error) << "Failed to find object " << old_path << " to move." << endl; + LOG(Raul::error) << "Failed to find object " << old_path << " to move." << endl; return; } @@ -301,7 +301,7 @@ ClientStore::put(const URI& uri, } if (!Path::is_valid(uri.str())) { - LOG(error) << "Bad path `" << uri.str() << "'" << endl; + LOG(Raul::error) << "Bad path `" << uri.str() << "'" << endl; return; } @@ -351,7 +351,7 @@ ClientStore::put(const URI& uri, p->set_properties(properties); add_object(p); } else { - LOG(error) << "Port " << path << " has no index" << endl; + LOG(Raul::error) << "Port " << path << " has no index" << endl; } } else { LOG(warn) << "Ignoring object " << path << " with unknown type " @@ -377,7 +377,7 @@ ClientStore::delta(const URI& uri, #endif if (!Path::is_valid(uri.str())) { - LOG(error) << "Bad path `" << uri.str() << "'" << endl; + LOG(Raul::error) << "Bad path `" << uri.str() << "'" << endl; return; } @@ -430,7 +430,7 @@ ClientStore::connection_patch(const Path& src_port_path, const Path& dst_port_pa patch = PtrCast(_object(src_port_path.parent().parent())); if (!patch) - LOG(error) << "Unable to find connection patch " << src_port_path + LOG(Raul::error) << "Unable to find connection patch " << src_port_path << " -> " << dst_port_path << endl; return patch; diff --git a/src/gui/App.cpp b/src/gui/App.cpp index 5ef4575d..620aceb4 100644 --- a/src/gui/App.cpp +++ b/src/gui/App.cpp @@ -22,7 +22,7 @@ #include #include "ganv/Edge.hpp" -#include "ingen/ServerInterface.hpp" +#include "ingen/Interface.hpp" #include "ingen/EngineBase.hpp" #include "ingen/client/ClientStore.hpp" #include "ingen/client/ObjectModel.hpp" @@ -187,7 +187,7 @@ App::detach() _loader.reset(); _store.reset(); _client.reset(); - _world->set_engine(SharedPtr()); + _world->set_engine(SharedPtr()); } } diff --git a/src/gui/App.hpp b/src/gui/App.hpp index 9953a993..6f2cd592 100644 --- a/src/gui/App.hpp +++ b/src/gui/App.hpp @@ -32,8 +32,7 @@ #include "ingen/shared/World.hpp" namespace Ingen { - class ClientInterface; - class ServerInterface; + class Interface; class Port; namespace Shared { class World; @@ -103,7 +102,7 @@ public: Glib::RefPtr icon_from_path(const std::string& path, int size); Raul::Forge& forge() const { return _world->forge(); } - SharedPtr engine() const { return _world->engine(); } + SharedPtr engine() const { return _world->engine(); } SharedPtr client() const { return _client; } SharedPtr store() const { return _store; } SharedPtr loader() const { return _loader; } diff --git a/src/gui/ConnectWindow.cpp b/src/gui/ConnectWindow.cpp index 2d1516cd..12f2173a 100644 --- a/src/gui/ConnectWindow.cpp +++ b/src/gui/ConnectWindow.cpp @@ -23,7 +23,7 @@ #include "ingen_config.h" #include "ingen/EngineBase.hpp" -#include "ingen/ServerInterface.hpp" +#include "ingen/Interface.hpp" #include "ingen/client/ClientStore.hpp" #include "ingen/client/PatchModel.hpp" #include "ingen/client/ThreadedSigClientInterface.hpp" @@ -75,7 +75,7 @@ ConnectWindow::start(App& app, Ingen::Shared::World* world) } void -ConnectWindow::set_connected_to(SharedPtr engine) +ConnectWindow::set_connected_to(SharedPtr engine) { _app->world()->set_engine(engine); @@ -134,8 +134,7 @@ ConnectWindow::set_connecting_widget_states() /** Launch (if applicable) and connect to the Engine. * - * This will create the ServerInterface and ClientInterface and initialize - * the App with them. + * This will create the required interfaces and initialize the App with them. */ void ConnectWindow::connect(bool existing) @@ -230,7 +229,7 @@ ConnectWindow::disconnect() _attached = false; _app->detach(); - set_connected_to(SharedPtr()); + set_connected_to(SharedPtr()); if (!_widgets_loaded) return; diff --git a/src/gui/ConnectWindow.hpp b/src/gui/ConnectWindow.hpp index 9905b51a..29684e0f 100644 --- a/src/gui/ConnectWindow.hpp +++ b/src/gui/ConnectWindow.hpp @@ -43,7 +43,7 @@ public: ConnectWindow(BaseObjectType* cobject, const Glib::RefPtr& xml); - void set_connected_to(SharedPtr engine); + void set_connected_to(SharedPtr engine); void start(App& app, Ingen::Shared::World* world); void ingen_response(int32_t id, Status status) { _attached = true; } diff --git a/src/gui/ControlPanel.cpp b/src/gui/ControlPanel.cpp index 3c02d2d9..f0d0b936 100644 --- a/src/gui/ControlPanel.cpp +++ b/src/gui/ControlPanel.cpp @@ -15,7 +15,7 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "ingen/ServerInterface.hpp" +#include "ingen/Interface.hpp" #include "ingen/shared/LV2URIMap.hpp" #include "ingen/client/NodeModel.hpp" #include "ingen/client/PortModel.hpp" diff --git a/src/gui/Controls.cpp b/src/gui/Controls.cpp index eba36d1d..c3fe2658 100644 --- a/src/gui/Controls.cpp +++ b/src/gui/Controls.cpp @@ -18,7 +18,7 @@ #include #include #include "raul/log.hpp" -#include "ingen/ServerInterface.hpp" +#include "ingen/Interface.hpp" #include "ingen/shared/LV2URIMap.hpp" #include "ingen/client/PluginModel.hpp" #include "ingen/client/NodeModel.hpp" diff --git a/src/gui/LoadPatchWindow.cpp b/src/gui/LoadPatchWindow.cpp index 66c64495..dd10e089 100644 --- a/src/gui/LoadPatchWindow.cpp +++ b/src/gui/LoadPatchWindow.cpp @@ -18,7 +18,7 @@ #include #include #include -#include "ingen/ServerInterface.hpp" +#include "ingen/Interface.hpp" #include "ingen/shared/LV2URIMap.hpp" #include "ingen/client/NodeModel.hpp" #include "ingen/client/PatchModel.hpp" diff --git a/src/gui/LoadPluginWindow.cpp b/src/gui/LoadPluginWindow.cpp index f6b6e5e9..95bbc0b6 100644 --- a/src/gui/LoadPluginWindow.cpp +++ b/src/gui/LoadPluginWindow.cpp @@ -20,7 +20,7 @@ #include #include -#include "ingen/ServerInterface.hpp" +#include "ingen/Interface.hpp" #include "ingen/client/ClientStore.hpp" #include "ingen/client/PatchModel.hpp" #include "ingen/shared/LV2URIMap.hpp" diff --git a/src/gui/NewSubpatchWindow.cpp b/src/gui/NewSubpatchWindow.cpp index ad0b6e42..4f0d602a 100644 --- a/src/gui/NewSubpatchWindow.cpp +++ b/src/gui/NewSubpatchWindow.cpp @@ -16,7 +16,7 @@ */ #include "App.hpp" -#include "ingen/ServerInterface.hpp" +#include "ingen/Interface.hpp" #include "ingen/shared/LV2URIMap.hpp" #include "ingen/client/PatchModel.hpp" #include "ingen/client/ClientStore.hpp" diff --git a/src/gui/NodeControlWindow.cpp b/src/gui/NodeControlWindow.cpp index 2af13b98..0a8603e6 100644 --- a/src/gui/NodeControlWindow.cpp +++ b/src/gui/NodeControlWindow.cpp @@ -16,7 +16,7 @@ */ #include -#include "ingen/ServerInterface.hpp" +#include "ingen/Interface.hpp" #include "ingen/shared/LV2URIMap.hpp" #include "ingen/client/NodeModel.hpp" #include "App.hpp" diff --git a/src/gui/NodeMenu.cpp b/src/gui/NodeMenu.cpp index 2ceb4a66..ea40988a 100644 --- a/src/gui/NodeMenu.cpp +++ b/src/gui/NodeMenu.cpp @@ -16,7 +16,7 @@ */ #include -#include "ingen/ServerInterface.hpp" +#include "ingen/Interface.hpp" #include "ingen/shared/LV2URIMap.hpp" #include "ingen/client/NodeModel.hpp" #include "ingen/client/PluginModel.hpp" diff --git a/src/gui/NodeModule.cpp b/src/gui/NodeModule.cpp index 36c3b67b..697961db 100644 --- a/src/gui/NodeModule.cpp +++ b/src/gui/NodeModule.cpp @@ -18,7 +18,7 @@ #include #include "raul/log.hpp" #include "raul/Atom.hpp" -#include "ingen/ServerInterface.hpp" +#include "ingen/Interface.hpp" #include "ingen/shared/LV2URIMap.hpp" #include "ingen/client/PatchModel.hpp" #include "ingen/client/NodeModel.hpp" diff --git a/src/gui/ObjectMenu.cpp b/src/gui/ObjectMenu.cpp index 4c3804bd..76607559 100644 --- a/src/gui/ObjectMenu.cpp +++ b/src/gui/ObjectMenu.cpp @@ -19,7 +19,7 @@ #include -#include "ingen/ServerInterface.hpp" +#include "ingen/Interface.hpp" #include "ingen/client/ObjectModel.hpp" #include "ingen/shared/LV2URIMap.hpp" diff --git a/src/gui/PatchCanvas.cpp b/src/gui/PatchCanvas.cpp index 61e30e04..64c7df66 100644 --- a/src/gui/PatchCanvas.cpp +++ b/src/gui/PatchCanvas.cpp @@ -22,7 +22,7 @@ #include "raul/log.hpp" #include "ganv/Canvas.hpp" #include "ganv/Circle.hpp" -#include "ingen/ServerInterface.hpp" +#include "ingen/Interface.hpp" #include "ingen/shared/LV2URIMap.hpp" #include "ingen/shared/Builder.hpp" #include "ingen/shared/ClashAvoider.hpp" diff --git a/src/gui/PatchPortModule.cpp b/src/gui/PatchPortModule.cpp index be8008da..1e5b1d5a 100644 --- a/src/gui/PatchPortModule.cpp +++ b/src/gui/PatchPortModule.cpp @@ -18,7 +18,7 @@ #include #include #include "PatchPortModule.hpp" -#include "ingen/ServerInterface.hpp" +#include "ingen/Interface.hpp" #include "ingen/shared/LV2URIMap.hpp" #include "ingen/client/PatchModel.hpp" #include "ingen/client/NodeModel.hpp" diff --git a/src/gui/PatchTreeWindow.cpp b/src/gui/PatchTreeWindow.cpp index 36bc78ea..41d82899 100644 --- a/src/gui/PatchTreeWindow.cpp +++ b/src/gui/PatchTreeWindow.cpp @@ -17,7 +17,7 @@ #include "raul/log.hpp" #include "raul/Path.hpp" -#include "ingen/ServerInterface.hpp" +#include "ingen/Interface.hpp" #include "ingen/shared/LV2URIMap.hpp" #include "ingen/client/ClientStore.hpp" #include "ingen/client/PatchModel.hpp" diff --git a/src/gui/PatchView.cpp b/src/gui/PatchView.cpp index e2a650fa..4506a651 100644 --- a/src/gui/PatchView.cpp +++ b/src/gui/PatchView.cpp @@ -18,7 +18,7 @@ #include #include #include "raul/log.hpp" -#include "ingen/ServerInterface.hpp" +#include "ingen/Interface.hpp" #include "ingen/shared/LV2URIMap.hpp" #include "ingen/client/PatchModel.hpp" #include "App.hpp" diff --git a/src/gui/PatchWindow.cpp b/src/gui/PatchWindow.cpp index 748bec74..c97ae89a 100644 --- a/src/gui/PatchWindow.cpp +++ b/src/gui/PatchWindow.cpp @@ -24,7 +24,7 @@ #include "raul/AtomRDF.hpp" -#include "ingen/ServerInterface.hpp" +#include "ingen/Interface.hpp" #include "ingen/client/ClientStore.hpp" #include "ingen/client/PatchModel.hpp" #include "ingen/shared/LV2URIMap.hpp" diff --git a/src/gui/Port.cpp b/src/gui/Port.cpp index 7c9de28b..7bf3412d 100644 --- a/src/gui/Port.cpp +++ b/src/gui/Port.cpp @@ -18,7 +18,7 @@ #include #include "raul/log.hpp" #include "ganv/Module.hpp" -#include "ingen/ServerInterface.hpp" +#include "ingen/Interface.hpp" #include "ingen/shared/LV2URIMap.hpp" #include "ingen/client/PatchModel.hpp" #include "ingen/client/PortModel.hpp" diff --git a/src/gui/PortMenu.cpp b/src/gui/PortMenu.cpp index c757d917..60d419f6 100644 --- a/src/gui/PortMenu.cpp +++ b/src/gui/PortMenu.cpp @@ -18,7 +18,7 @@ #include #include #include "raul/SharedPtr.hpp" -#include "ingen/ServerInterface.hpp" +#include "ingen/Interface.hpp" #include "ingen/shared/LV2URIMap.hpp" #include "ingen/client/PatchModel.hpp" #include "ingen/client/PortModel.hpp" diff --git a/src/gui/PortPropertiesWindow.cpp b/src/gui/PortPropertiesWindow.cpp index 13dd4781..dd138b12 100644 --- a/src/gui/PortPropertiesWindow.cpp +++ b/src/gui/PortPropertiesWindow.cpp @@ -17,7 +17,7 @@ #include #include -#include "ingen/ServerInterface.hpp" +#include "ingen/Interface.hpp" #include "ingen/shared/LV2URIMap.hpp" #include "ingen/client/NodeModel.hpp" #include "ingen/client/PluginModel.hpp" diff --git a/src/gui/RenameWindow.cpp b/src/gui/RenameWindow.cpp index 6b3a5f20..49323c4e 100644 --- a/src/gui/RenameWindow.cpp +++ b/src/gui/RenameWindow.cpp @@ -20,7 +20,7 @@ #include "ingen/shared/LV2URIMap.hpp" -#include "ingen/ServerInterface.hpp" +#include "ingen/Interface.hpp" #include "ingen/client/ObjectModel.hpp" #include "ingen/client/ClientStore.hpp" diff --git a/src/gui/SubpatchModule.cpp b/src/gui/SubpatchModule.cpp index e71dcbc8..475a6e8f 100644 --- a/src/gui/SubpatchModule.cpp +++ b/src/gui/SubpatchModule.cpp @@ -18,7 +18,7 @@ #include #include -#include "ingen/ServerInterface.hpp" +#include "ingen/Interface.hpp" #include "ingen/client/PatchModel.hpp" #include "ingen/shared/LV2URIMap.hpp" diff --git a/src/gui/ThreadedLoader.cpp b/src/gui/ThreadedLoader.cpp index babc6ee9..9d7731bb 100644 --- a/src/gui/ThreadedLoader.cpp +++ b/src/gui/ThreadedLoader.cpp @@ -29,7 +29,7 @@ using namespace Raul; namespace Ingen { namespace GUI { -ThreadedLoader::ThreadedLoader(App& app, SharedPtr engine) +ThreadedLoader::ThreadedLoader(App& app, SharedPtr engine) : _app(app) , _engine(engine) { diff --git a/src/gui/ThreadedLoader.hpp b/src/gui/ThreadedLoader.hpp index 2668a691..8d17fa64 100644 --- a/src/gui/ThreadedLoader.hpp +++ b/src/gui/ThreadedLoader.hpp @@ -25,7 +25,7 @@ #include "raul/Thread.hpp" #include "raul/Slave.hpp" #include -#include "ingen/ServerInterface.hpp" +#include "ingen/Interface.hpp" #include "ingen/serialisation/Serialiser.hpp" #include "ingen/serialisation/Parser.hpp" @@ -54,8 +54,8 @@ namespace GUI { class ThreadedLoader : public Raul::Slave { public: - ThreadedLoader(App& app, - SharedPtr engine); + ThreadedLoader(App& app, + SharedPtr engine); void load_patch(bool merge, const Glib::ustring& document_uri, @@ -75,10 +75,10 @@ private: void _whipped(); - App& _app; - SharedPtr _engine; - Glib::Mutex _mutex; - list _events; + App& _app; + SharedPtr _engine; + Glib::Mutex _mutex; + list _events; }; } // namespace GUI diff --git a/src/ingen/main.cpp b/src/ingen/main.cpp index 61d8a90e..2a9645af 100644 --- a/src/ingen/main.cpp +++ b/src/ingen/main.cpp @@ -40,7 +40,7 @@ #include "ingen_config.h" #include "ingen/EngineBase.hpp" -#include "ingen/ServerInterface.hpp" +#include "ingen/Interface.hpp" #include "ingen/serialisation/Parser.hpp" #include "ingen/shared/Configuration.hpp" #include "ingen/shared/World.hpp" @@ -107,7 +107,7 @@ main(int argc, char** argv) // Set bundle path from executable location so resources can be found Shared::set_bundle_path_from_code((void*)&main); - SharedPtr engine_interface; + SharedPtr engine_interface; Glib::thread_init(); #ifdef HAVE_SOUP @@ -156,7 +156,7 @@ main(int argc, char** argv) "Unable to load HTTP client module"); #endif const char* const uri = conf.option("connect").get_string(); - SharedPtr client(new Client::SigClientInterface()); + SharedPtr client(new Client::SigClientInterface()); ingen_try((engine_interface = world->interface(uri, client)), (string("Unable to create interface to `") + uri + "'").c_str()); } diff --git a/src/osc/OSCClientReceiver.hpp b/src/osc/OSCClientReceiver.hpp index c3effb10..9c7d6d44 100644 --- a/src/osc/OSCClientReceiver.hpp +++ b/src/osc/OSCClientReceiver.hpp @@ -23,7 +23,7 @@ #include #include -#include "ingen/ClientInterface.hpp" +#include "ingen/Interface.hpp" #include "raul/Deletable.hpp" #include "raul/SharedPtr.hpp" diff --git a/src/osc/OSCClientSender.cpp b/src/osc/OSCClientSender.cpp index 5a50ddf3..037ae989 100644 --- a/src/osc/OSCClientSender.cpp +++ b/src/osc/OSCClientSender.cpp @@ -22,7 +22,7 @@ #include "raul/AtomLiblo.hpp" #include "raul/Path.hpp" -#include "ingen/ClientInterface.hpp" +#include "ingen/Interface.hpp" #include "OSCClientSender.hpp" diff --git a/src/osc/OSCClientSender.hpp b/src/osc/OSCClientSender.hpp index ffb7323b..75682006 100644 --- a/src/osc/OSCClientSender.hpp +++ b/src/osc/OSCClientSender.hpp @@ -23,7 +23,7 @@ #include -#include "ingen/ClientInterface.hpp" +#include "ingen/Interface.hpp" #include "ingen/GraphObject.hpp" #include "OSCSender.hpp" diff --git a/src/osc/OSCEngineReceiver.cpp b/src/osc/OSCEngineReceiver.cpp index b75d76a4..8b7b89c6 100644 --- a/src/osc/OSCEngineReceiver.cpp +++ b/src/osc/OSCEngineReceiver.cpp @@ -28,8 +28,7 @@ #include "raul/log.hpp" #include "ingen_config.h" -#include "ingen/ClientInterface.hpp" -#include "ingen/ServerInterface.hpp" +#include "ingen/Interface.hpp" #include "../server/ClientBroadcaster.hpp" #include "../server/Engine.hpp" diff --git a/src/osc/OSCEngineSender.hpp b/src/osc/OSCEngineSender.hpp index ff74fb4a..fef60991 100644 --- a/src/osc/OSCEngineSender.hpp +++ b/src/osc/OSCEngineSender.hpp @@ -26,7 +26,7 @@ #include "raul/Deletable.hpp" -#include "ingen/ServerInterface.hpp" +#include "ingen/Interface.hpp" #include "OSCSender.hpp" @@ -36,12 +36,12 @@ namespace Client { /* OSC (via liblo) interface to the engine. * - * Clients can use this opaquely as an ServerInterface* to control the engine + * Clients can use this opaquely as an Interface* to control the engine * over OSC (whether over a network or not, etc). * * \ingroup IngenClient */ -class OSCEngineSender : public ServerInterface, public Shared::OSCSender { +class OSCEngineSender : public Interface, public Shared::OSCSender { public: OSCEngineSender(const Raul::URI& engine_url, size_t max_packet_size, diff --git a/src/serialisation/Parser.cpp b/src/serialisation/Parser.cpp index 120de4b1..9acd460c 100644 --- a/src/serialisation/Parser.cpp +++ b/src/serialisation/Parser.cpp @@ -33,7 +33,7 @@ #include "serd/serd.h" #include "sord/sordmm.hpp" -#include "ingen/ServerInterface.hpp" +#include "ingen/Interface.hpp" #include "ingen/shared/World.hpp" #include "ingen/shared/LV2URIMap.hpp" #include "ingen/shared/URIs.hpp" @@ -158,17 +158,17 @@ get_port(Ingen::Shared::World* world, static boost::optional parse( Shared::World* world, - CommonInterface* target, + Interface* target, Sord::Model& model, Glib::ustring document_uri, - boost::optional parent = boost::optional(), - boost::optional symbol = boost::optional(), - boost::optional data = boost::optional()); + boost::optional parent = boost::optional(), + boost::optional symbol = boost::optional(), + boost::optional data = boost::optional()); static boost::optional parse_patch( Shared::World* world, - CommonInterface* target, + Interface* target, Sord::Model& model, const Sord::Node& subject, boost::optional parent = boost::optional(), @@ -179,7 +179,7 @@ parse_patch( static boost::optional parse_node( Shared::World* world, - CommonInterface* target, + Interface* target, Sord::Model& model, const Sord::Node& subject, const Raul::Path& path, @@ -188,24 +188,24 @@ parse_node( static bool parse_properties( - Shared::World* world, - CommonInterface* target, - Sord::Model& model, - const Sord::Node& subject, - const Raul::URI& uri, + Shared::World* world, + Interface* target, + Sord::Model& model, + const Sord::Node& subject, + const Raul::URI& uri, boost::optional data = boost::optional()); static bool parse_connections( Shared::World* world, - CommonInterface* target, + Interface* target, Sord::Model& model, const Sord::Node& subject, const Raul::Path& patch); static boost::optional parse_node(Ingen::Shared::World* world, - Ingen::CommonInterface* target, + Ingen::Interface* target, Sord::Model& model, const Sord::Node& subject, const Raul::Path& path, @@ -264,7 +264,7 @@ parse_node(Ingen::Shared::World* world, static boost::optional parse_patch(Ingen::Shared::World* world, - Ingen::CommonInterface* target, + Ingen::Interface* target, Sord::Model& model, const Sord::Node& subject_node, boost::optional parent, @@ -382,11 +382,11 @@ parse_patch(Ingen::Shared::World* world, } static bool -parse_connections(Ingen::Shared::World* world, - Ingen::CommonInterface* target, - Sord::Model& model, - const Sord::Node& subject, - const Raul::Path& parent) +parse_connections(Ingen::Shared::World* world, + Ingen::Interface* target, + Sord::Model& model, + const Sord::Node& subject, + const Raul::Path& parent) { Sord::URI ingen_connection(*world->rdf_world(), NS_INGEN "connection"); Sord::URI ingen_source(*world->rdf_world(), NS_INGEN "source"); @@ -432,7 +432,7 @@ parse_connections(Ingen::Shared::World* world, static bool parse_properties(Ingen::Shared::World* world, - Ingen::CommonInterface* target, + Ingen::Interface* target, Sord::Model& model, const Sord::Node& subject, const Raul::URI& uri, @@ -460,7 +460,7 @@ parse_properties(Ingen::Shared::World* world, static boost::optional parse(Ingen::Shared::World* world, - Ingen::CommonInterface* target, + Ingen::Interface* target, Sord::Model& model, Glib::ustring document_uri, boost::optional parent, @@ -539,12 +539,12 @@ Parser::Parser(Ingen::Shared::World& world) { } -/** Parse a patch from RDF into a CommonInterface (engine or client). +/** Parse a patch from RDF into a Interface (engine or client). * @return whether or not load was successful. */ bool Parser::parse_file(Ingen::Shared::World* world, - Ingen::CommonInterface* target, + Ingen::Interface* target, Glib::ustring path, boost::optional parent, boost::optional symbol, @@ -598,7 +598,7 @@ Parser::parse_file(Ingen::Shared::World* world, bool Parser::parse_string(Ingen::Shared::World* world, - Ingen::CommonInterface* target, + Ingen::Interface* target, const Glib::ustring& str, const Glib::ustring& base_uri, boost::optional parent, diff --git a/src/serialisation/Serialiser.cpp b/src/serialisation/Serialiser.cpp index f86c84a5..2ea07af3 100644 --- a/src/serialisation/Serialiser.cpp +++ b/src/serialisation/Serialiser.cpp @@ -48,7 +48,7 @@ #include "ingen/Patch.hpp" #include "ingen/Plugin.hpp" #include "ingen/Port.hpp" -#include "ingen/ServerInterface.hpp" +#include "ingen/Interface.hpp" #include "ingen/shared/LV2URIMap.hpp" #include "ingen/shared/ResourceImpl.hpp" #include "ingen/shared/Store.hpp" diff --git a/src/server/ClientBroadcaster.cpp b/src/server/ClientBroadcaster.cpp index 1a55d355..26658eb6 100644 --- a/src/server/ClientBroadcaster.cpp +++ b/src/server/ClientBroadcaster.cpp @@ -18,7 +18,7 @@ #include #include #include "raul/log.hpp" -#include "ingen/ClientInterface.hpp" +#include "ingen/Interface.hpp" #include "ClientBroadcaster.hpp" #include "PluginImpl.hpp" #include "ConnectionImpl.hpp" @@ -37,7 +37,7 @@ namespace Server { /** Register a client to receive messages over the notification band. */ void -ClientBroadcaster::register_client(const URI& uri, ClientInterface* client) +ClientBroadcaster::register_client(const URI& uri, Interface* client) { Glib::Mutex::Lock lock(_clients_mutex); Clients::iterator i = _clients.find(uri); @@ -72,7 +72,7 @@ ClientBroadcaster::unregister_client(const URI& uri) /** Looks up the client with the given source @a uri (which is used as the * unique identifier for registered clients). */ -ClientInterface* +Interface* ClientBroadcaster::client(const URI& uri) { Glib::Mutex::Lock lock(_clients_mutex); @@ -94,7 +94,7 @@ ClientBroadcaster::send_plugins(const NodeFactory::Plugins& plugins) } void -ClientBroadcaster::send_plugins_to(ClientInterface* client, const NodeFactory::Plugins& plugins) +ClientBroadcaster::send_plugins_to(Interface* client, const NodeFactory::Plugins& plugins) { client->bundle_begin(); diff --git a/src/server/ClientBroadcaster.hpp b/src/server/ClientBroadcaster.hpp index b004433b..ee356702 100644 --- a/src/server/ClientBroadcaster.hpp +++ b/src/server/ClientBroadcaster.hpp @@ -26,7 +26,7 @@ #include "raul/SharedPtr.hpp" -#include "ingen/ClientInterface.hpp" +#include "ingen/Interface.hpp" #include "NodeFactory.hpp" @@ -44,21 +44,21 @@ class ConnectionImpl; /** Broadcaster for all clients. * - * This is a ClientInterface that forwards all messages to all registered + * This is an Interface that forwards all messages to all registered * clients (for updating all clients on state changes in the engine). * * \ingroup engine */ -class ClientBroadcaster : public ClientInterface +class ClientBroadcaster : public Interface { public: - void register_client(const Raul::URI& uri, ClientInterface* client); + void register_client(const Raul::URI& uri, Interface* client); bool unregister_client(const Raul::URI& uri); - ClientInterface* client(const Raul::URI& uri); + Interface* client(const Raul::URI& uri); void send_plugins(const NodeFactory::Plugins& plugin_list); - void send_plugins_to(ClientInterface*, const NodeFactory::Plugins& plugin_list); + void send_plugins_to(Interface*, const NodeFactory::Plugins& plugin_list); void send_object(const GraphObjectImpl* p, bool recursive); @@ -67,8 +67,6 @@ public: for (Clients::const_iterator i = _clients.begin(); i != _clients.end(); ++i) \ (*i).second->msg(__VA_ARGS__) - // CommonInterface - void bundle_begin() { BROADCAST(bundle_begin); } void bundle_end() { BROADCAST(bundle_end); } @@ -114,16 +112,17 @@ public: BROADCAST(set_property, subject, predicate, value); } - // ClientInterface - Raul::URI uri() const { return "http://drobilla.net/ns/ingen#broadcaster"; } ///< N/A + void set_response_id(int32_t id) {} ///< N/A + void ping() {} ///< N/A + void get(const Raul::URI& uri) {} ///< N/A void response(int32_t id, Status status) {} ///< N/A void error(const std::string& msg) { BROADCAST(error, msg); } private: - typedef std::map Clients; + typedef std::map Clients; Glib::Mutex _clients_mutex; Clients _clients; diff --git a/src/server/Engine.cpp b/src/server/Engine.cpp index 89062d4a..3d5e981b 100644 --- a/src/server/Engine.cpp +++ b/src/server/Engine.cpp @@ -241,7 +241,7 @@ Engine::process_events(ProcessContext& context) } void -Engine::register_client(const Raul::URI& uri, ClientInterface* client) +Engine::register_client(const Raul::URI& uri, Interface* client) { _broadcaster->register_client(uri, client); } diff --git a/src/server/Engine.hpp b/src/server/Engine.hpp index 64f874c2..d1ac04f1 100644 --- a/src/server/Engine.hpp +++ b/src/server/Engine.hpp @@ -26,6 +26,7 @@ #include "raul/SharedPtr.hpp" #include "ingen/EngineBase.hpp" +#include "ingen/Interface.hpp" namespace Raul { class Maid; } @@ -76,7 +77,7 @@ public: virtual void process_events(ProcessContext& context); - virtual void register_client(const Raul::URI& uri, ClientInterface* client); + virtual void register_client(const Raul::URI& uri, Interface* client); virtual bool unregister_client(const Raul::URI& uri); diff --git a/src/server/Event.cpp b/src/server/Event.cpp index 95d0d052..258eff3f 100644 --- a/src/server/Event.cpp +++ b/src/server/Event.cpp @@ -15,7 +15,7 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "ingen/ClientInterface.hpp" +#include "ingen/Interface.hpp" #include "Driver.hpp" #include "Engine.hpp" diff --git a/src/server/Event.hpp b/src/server/Event.hpp index 8bb1d8aa..b933a8ca 100644 --- a/src/server/Event.hpp +++ b/src/server/Event.hpp @@ -24,14 +24,12 @@ #include "raul/Path.hpp" #include "raul/SharedPtr.hpp" +#include "ingen/Interface.hpp" #include "ingen/Status.hpp" #include "types.hpp" namespace Ingen { - -class ClientInterface; - namespace Server { class Engine; @@ -82,7 +80,7 @@ public: void respond(Status status); protected: - Event(Engine& engine, ClientInterface* client, int32_t id, FrameTime time) + Event(Engine& engine, Interface* client, int32_t id, FrameTime time) : _engine(engine) , _request_client(client) , _request_id(id) @@ -105,7 +103,7 @@ protected: Engine& _engine; Raul::AtomicPtr _next; - ClientInterface* _request_client; + Interface* _request_client; int32_t _request_id; FrameTime _time; Status _status; diff --git a/src/server/ObjectSender.cpp b/src/server/ObjectSender.cpp index 9eac2911..39217ae4 100644 --- a/src/server/ObjectSender.cpp +++ b/src/server/ObjectSender.cpp @@ -16,7 +16,7 @@ */ #include "ObjectSender.hpp" -#include "ingen/ClientInterface.hpp" +#include "ingen/Interface.hpp" #include "ingen/shared/LV2URIMap.hpp" #include "ingen/shared/URIs.hpp" #include "EngineStore.hpp" @@ -35,7 +35,7 @@ namespace Ingen { namespace Server { void -ObjectSender::send_object(ClientInterface* client, +ObjectSender::send_object(Interface* client, const GraphObjectImpl* object, bool recursive) { @@ -59,7 +59,7 @@ ObjectSender::send_object(ClientInterface* client, } void -ObjectSender::send_patch(ClientInterface* client, const PatchImpl* patch, bool recursive, bool bundle) +ObjectSender::send_patch(Interface* client, const PatchImpl* patch, bool recursive, bool bundle) { if (bundle) client->bundle_begin(); @@ -98,7 +98,7 @@ ObjectSender::send_patch(ClientInterface* client, const PatchImpl* patch, bool r /** Sends a node or a patch */ void -ObjectSender::send_node(ClientInterface* client, const NodeImpl* node, bool recursive, bool bundle) +ObjectSender::send_node(Interface* client, const NodeImpl* node, bool recursive, bool bundle) { PluginImpl* const plugin = node->plugin_impl(); @@ -128,7 +128,7 @@ ObjectSender::send_node(ClientInterface* client, const NodeImpl* node, bool recu } void -ObjectSender::send_port(ClientInterface* client, const PortImpl* port, bool bundle) +ObjectSender::send_port(Interface* client, const PortImpl* port, bool bundle) { assert(port); diff --git a/src/server/ObjectSender.hpp b/src/server/ObjectSender.hpp index a743c6d5..9c4a65c6 100644 --- a/src/server/ObjectSender.hpp +++ b/src/server/ObjectSender.hpp @@ -20,7 +20,7 @@ namespace Ingen { -class ClientInterface; +class Interface; namespace Server { @@ -30,33 +30,33 @@ class NodeImpl; class PortImpl; class PluginImpl; -/** Utility class for sending GraphObjects to clients through ClientInterface. +/** Utility class for sending GraphObjects to clients via Interface. * - * While ClientInterface is the direct low level message-based interface + * While Interface is the direct low level message-based interface * (protocol), this is used from the engine to easily send proper Objects * with these messages (which is done in a few different parts of the code). * - * Basically a serialiser, except to calls on ClientInterface rather than + * Basically a serialiser, except to calls on Interface rather than * eg a byte stream. */ class ObjectSender { public: - static void send_object(ClientInterface* client, + static void send_object(Interface* client, const GraphObjectImpl* object, bool recursive); private: - static void send_patch(ClientInterface* client, + static void send_patch(Interface* client, const PatchImpl* patch, bool recursive, - bool bundle=true); - static void send_node(ClientInterface* client, + bool bundle = true); + static void send_node(Interface* client, const NodeImpl* node, bool recursive, - bool bundle=true); - static void send_port(ClientInterface* client, + bool bundle = true); + static void send_port(Interface* client, const PortImpl* port, - bool bundle=true); + bool bundle = true); }; } // namespace Server diff --git a/src/server/ServerInterfaceImpl.cpp b/src/server/ServerInterfaceImpl.cpp index 1bd388ec..b5c6f3fc 100644 --- a/src/server/ServerInterfaceImpl.cpp +++ b/src/server/ServerInterfaceImpl.cpp @@ -69,7 +69,6 @@ ServerInterfaceImpl::set_response_id(int32_t id) 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; } diff --git a/src/server/ServerInterfaceImpl.hpp b/src/server/ServerInterfaceImpl.hpp index e3dcabad..ef9042bf 100644 --- a/src/server/ServerInterfaceImpl.hpp +++ b/src/server/ServerInterfaceImpl.hpp @@ -22,8 +22,7 @@ #include #include #include "raul/SharedPtr.hpp" -#include "ingen/ClientInterface.hpp" -#include "ingen/ServerInterface.hpp" +#include "ingen/Interface.hpp" #include "ingen/Resource.hpp" #include "EventSource.hpp" #include "types.hpp" @@ -35,7 +34,7 @@ class Engine; /** A queued (preprocessed) event source / interface. * - * This is the bridge between the ServerInterface presented to the client, and + * This is the bridge between the Interface 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 @@ -44,7 +43,7 @@ class Engine; * are successful. */ class ServerInterfaceImpl : public EventSource, - public ServerInterface + public Interface { public: ServerInterfaceImpl(Engine& engine); @@ -54,11 +53,9 @@ public: virtual void set_response_id(int32_t id); - // Bundles virtual void bundle_begin(); - virtual void bundle_end(); - // CommonInterface object commands + virtual void bundle_end(); virtual void put(const Raul::URI& path, const Resource::Properties& properties, @@ -83,20 +80,21 @@ public: 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); + virtual void response(int32_t id, Status status) {} ///< N/A + virtual void error(const std::string& msg) {} ///< N/A + protected: - ClientInterface* _request_client; - int32_t _request_id; - Engine& _engine; - bool _in_bundle; ///< True iff a bundle is currently being received + Interface* _request_client; + int32_t _request_id; + Engine& _engine; + bool _in_bundle; ///< True iff a bundle is currently being received private: SampleCount now() const; diff --git a/src/server/events/Connect.cpp b/src/server/events/Connect.cpp index 0cdd78dd..f5641bac 100644 --- a/src/server/events/Connect.cpp +++ b/src/server/events/Connect.cpp @@ -43,12 +43,12 @@ namespace Ingen { namespace Server { namespace Events { -Connect::Connect(Engine& engine, - ClientInterface* client, - int32_t id, - SampleCount timestamp, - const Path& src_port_path, - const Path& dst_port_path) +Connect::Connect(Engine& engine, + Interface* client, + int32_t id, + SampleCount timestamp, + const Path& src_port_path, + const Path& dst_port_path) : Event(engine, client, id, timestamp) , _src_port_path(src_port_path) , _dst_port_path(dst_port_path) diff --git a/src/server/events/Connect.hpp b/src/server/events/Connect.hpp index c1218865..ca972d33 100644 --- a/src/server/events/Connect.hpp +++ b/src/server/events/Connect.hpp @@ -50,7 +50,7 @@ class Connect : public Event { public: Connect(Engine& engine, - ClientInterface* client, + Interface* client, int32_t id, SampleCount timestamp, const Raul::Path& src_port_path, diff --git a/src/server/events/CreateNode.cpp b/src/server/events/CreateNode.cpp index f043a321..d74b0b6c 100644 --- a/src/server/events/CreateNode.cpp +++ b/src/server/events/CreateNode.cpp @@ -42,7 +42,7 @@ namespace Server { namespace Events { CreateNode::CreateNode(Engine& engine, - ClientInterface* client, + Interface* client, int32_t id, SampleCount timestamp, const Path& path, diff --git a/src/server/events/CreateNode.hpp b/src/server/events/CreateNode.hpp index 0a89ba02..31e10dbd 100644 --- a/src/server/events/CreateNode.hpp +++ b/src/server/events/CreateNode.hpp @@ -42,7 +42,7 @@ class CreateNode : public Event { public: CreateNode(Engine& engine, - ClientInterface* client, + Interface* client, int32_t id, SampleCount timestamp, const Raul::Path& node_path, diff --git a/src/server/events/CreatePatch.cpp b/src/server/events/CreatePatch.cpp index 4f85be8d..a5072689 100644 --- a/src/server/events/CreatePatch.cpp +++ b/src/server/events/CreatePatch.cpp @@ -37,7 +37,7 @@ namespace Server { namespace Events { CreatePatch::CreatePatch(Engine& engine, - ClientInterface* client, + Interface* client, int32_t id, SampleCount timestamp, const Raul::Path& path, diff --git a/src/server/events/CreatePatch.hpp b/src/server/events/CreatePatch.hpp index 66a81c20..858210c5 100644 --- a/src/server/events/CreatePatch.hpp +++ b/src/server/events/CreatePatch.hpp @@ -37,7 +37,7 @@ class CreatePatch : public Event { public: CreatePatch(Engine& engine, - ClientInterface* client, + Interface* client, int32_t id, SampleCount timestamp, const Raul::Path& path, diff --git a/src/server/events/CreatePort.cpp b/src/server/events/CreatePort.cpp index 39aed9d2..6fa4a6bf 100644 --- a/src/server/events/CreatePort.cpp +++ b/src/server/events/CreatePort.cpp @@ -41,7 +41,7 @@ namespace Server { namespace Events { CreatePort::CreatePort(Engine& engine, - ClientInterface* client, + Interface* client, int32_t id, SampleCount timestamp, const Raul::Path& path, diff --git a/src/server/events/CreatePort.hpp b/src/server/events/CreatePort.hpp index fec23f0d..331a1252 100644 --- a/src/server/events/CreatePort.hpp +++ b/src/server/events/CreatePort.hpp @@ -43,7 +43,7 @@ class CreatePort : public Event { public: CreatePort(Engine& engine, - ClientInterface* client, + Interface* client, int32_t id, SampleCount timestamp, const Raul::Path& path, diff --git a/src/server/events/Deactivate.hpp b/src/server/events/Deactivate.hpp index 33264795..c6a74845 100644 --- a/src/server/events/Deactivate.hpp +++ b/src/server/events/Deactivate.hpp @@ -33,7 +33,7 @@ class Deactivate : public Event { public: Deactivate(Engine& engine, - ClientInterface* client, + Interface* client, int32_t id, SampleCount timestamp) : Event(engine, client, id, timestamp) diff --git a/src/server/events/Delete.cpp b/src/server/events/Delete.cpp index 7138a40d..34796baf 100644 --- a/src/server/events/Delete.cpp +++ b/src/server/events/Delete.cpp @@ -36,7 +36,7 @@ namespace Server { namespace Events { Delete::Delete(Engine& engine, - ClientInterface* client, + Interface* client, int32_t id, FrameTime time, const Raul::URI& uri) diff --git a/src/server/events/Delete.hpp b/src/server/events/Delete.hpp index c85d6982..f8416bc8 100644 --- a/src/server/events/Delete.hpp +++ b/src/server/events/Delete.hpp @@ -59,7 +59,7 @@ class Delete : public Event { public: Delete(Engine& engine, - ClientInterface* client, + Interface* client, int32_t id, FrameTime timestamp, const Raul::URI& uri); diff --git a/src/server/events/Disconnect.cpp b/src/server/events/Disconnect.cpp index 81528d7c..b2e55adc 100644 --- a/src/server/events/Disconnect.cpp +++ b/src/server/events/Disconnect.cpp @@ -43,7 +43,7 @@ namespace Server { namespace Events { Disconnect::Disconnect(Engine& engine, - ClientInterface* client, + Interface* client, int32_t id, SampleCount timestamp, const Raul::Path& src_port_path, diff --git a/src/server/events/Disconnect.hpp b/src/server/events/Disconnect.hpp index 726f5a98..24c6a863 100644 --- a/src/server/events/Disconnect.hpp +++ b/src/server/events/Disconnect.hpp @@ -47,7 +47,7 @@ class Disconnect : public Event { public: Disconnect(Engine& engine, - ClientInterface* client, + Interface* client, int32_t id, SampleCount timestamp, const Raul::Path& src_port_path, diff --git a/src/server/events/DisconnectAll.cpp b/src/server/events/DisconnectAll.cpp index 1538c93b..667b5a64 100644 --- a/src/server/events/DisconnectAll.cpp +++ b/src/server/events/DisconnectAll.cpp @@ -44,12 +44,12 @@ namespace Ingen { namespace Server { namespace Events { -DisconnectAll::DisconnectAll(Engine& engine, - ClientInterface* client, - int32_t id, - SampleCount timestamp, - const Path& parent_path, - const Path& node_path) +DisconnectAll::DisconnectAll(Engine& engine, + Interface* client, + int32_t id, + SampleCount timestamp, + const Path& parent_path, + const Path& node_path) : Event(engine, client, id, timestamp) , _parent_path(parent_path) , _path(node_path) diff --git a/src/server/events/DisconnectAll.hpp b/src/server/events/DisconnectAll.hpp index e3cd2490..65db2d90 100644 --- a/src/server/events/DisconnectAll.hpp +++ b/src/server/events/DisconnectAll.hpp @@ -45,7 +45,7 @@ class DisconnectAll : public Event { public: DisconnectAll(Engine& engine, - ClientInterface* client, + Interface* client, int32_t id, SampleCount timestamp, const Raul::Path& parent, diff --git a/src/server/events/Get.cpp b/src/server/events/Get.cpp index 605e392a..404cd981 100644 --- a/src/server/events/Get.cpp +++ b/src/server/events/Get.cpp @@ -15,7 +15,7 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "ingen/ClientInterface.hpp" +#include "ingen/Interface.hpp" #include "ClientBroadcaster.hpp" #include "Driver.hpp" @@ -31,11 +31,11 @@ namespace Ingen { namespace Server { namespace Events { -Get::Get(Engine& engine, - ClientInterface* client, - int32_t id, - SampleCount timestamp, - const URI& uri) +Get::Get(Engine& engine, + Interface* client, + int32_t id, + SampleCount timestamp, + const URI& uri) : Event(engine, client, id, timestamp) , _uri(uri) , _object(NULL) diff --git a/src/server/events/Get.hpp b/src/server/events/Get.hpp index 919db0f9..45b7bcd7 100644 --- a/src/server/events/Get.hpp +++ b/src/server/events/Get.hpp @@ -40,7 +40,7 @@ class Get : public Event { public: Get(Engine& engine, - ClientInterface* client, + Interface* client, int32_t id, SampleCount timestamp, const Raul::URI& uri); diff --git a/src/server/events/Move.cpp b/src/server/events/Move.cpp index 878f21f0..5f3fbff2 100644 --- a/src/server/events/Move.cpp +++ b/src/server/events/Move.cpp @@ -34,12 +34,12 @@ namespace Ingen { namespace Server { namespace Events { -Move::Move(Engine& engine, - ClientInterface* client, - int32_t id, - SampleCount timestamp, - const Path& path, - const Path& new_path) +Move::Move(Engine& engine, + Interface* client, + int32_t id, + SampleCount timestamp, + const Path& path, + const Path& new_path) : Event(engine, client, id, timestamp) , _old_path(path) , _new_path(new_path) diff --git a/src/server/events/Move.hpp b/src/server/events/Move.hpp index 4a167656..b67e9672 100644 --- a/src/server/events/Move.hpp +++ b/src/server/events/Move.hpp @@ -46,7 +46,7 @@ class Move : public Event { public: Move(Engine& engine, - ClientInterface* client, + Interface* client, int32_t id, SampleCount timestamp, const Raul::Path& old_path, diff --git a/src/server/events/Ping.hpp b/src/server/events/Ping.hpp index 4a2a13dc..de24b643 100644 --- a/src/server/events/Ping.hpp +++ b/src/server/events/Ping.hpp @@ -36,10 +36,10 @@ namespace Events { class Ping : public Event { public: - Ping(Engine& engine, - ClientInterface* client, - int32_t id, - SampleCount timestamp) + Ping(Engine& engine, + Interface* client, + int32_t id, + SampleCount timestamp) : Event(engine, client, id, timestamp) {} diff --git a/src/server/events/SetMetadata.cpp b/src/server/events/SetMetadata.cpp index 5b2391bd..e2621fae 100644 --- a/src/server/events/SetMetadata.cpp +++ b/src/server/events/SetMetadata.cpp @@ -53,7 +53,7 @@ namespace Events { typedef Resource::Properties Properties; SetMetadata::SetMetadata(Engine& engine, - ClientInterface* client, + Interface* client, int32_t id, SampleCount timestamp, bool create, diff --git a/src/server/events/SetMetadata.hpp b/src/server/events/SetMetadata.hpp index bcc3ab4f..71ac7414 100644 --- a/src/server/events/SetMetadata.hpp +++ b/src/server/events/SetMetadata.hpp @@ -70,7 +70,7 @@ class SetMetadata : public Event { public: SetMetadata(Engine& engine, - ClientInterface* client, + Interface* client, int32_t id, SampleCount timestamp, bool create, diff --git a/src/server/events/SetPortValue.cpp b/src/server/events/SetPortValue.cpp index 30478f5f..ecf9416e 100644 --- a/src/server/events/SetPortValue.cpp +++ b/src/server/events/SetPortValue.cpp @@ -47,7 +47,7 @@ namespace Server { namespace Events { SetPortValue::SetPortValue(Engine& engine, - ClientInterface* client, + Interface* client, int32_t id, bool queued, SampleCount timestamp, @@ -63,7 +63,7 @@ SetPortValue::SetPortValue(Engine& engine, /** Internal */ SetPortValue::SetPortValue(Engine& engine, - ClientInterface* client, + Interface* client, int32_t id, SampleCount timestamp, PortImpl* port, diff --git a/src/server/events/SetPortValue.hpp b/src/server/events/SetPortValue.hpp index 71764568..cf992fcf 100644 --- a/src/server/events/SetPortValue.hpp +++ b/src/server/events/SetPortValue.hpp @@ -44,7 +44,7 @@ class SetPortValue : public Event { public: SetPortValue(Engine& engine, - ClientInterface* client, + Interface* client, int32_t id, bool queued, SampleCount timestamp, @@ -52,7 +52,7 @@ public: const Raul::Atom& value); SetPortValue(Engine& engine, - ClientInterface* client, + Interface* client, int32_t id, SampleCount timestamp, PortImpl* port, diff --git a/src/server/ingen_lv2.cpp b/src/server/ingen_lv2.cpp index fa38b035..3e9366ae 100644 --- a/src/server/ingen_lv2.cpp +++ b/src/server/ingen_lv2.cpp @@ -30,7 +30,7 @@ #include "lv2/lv2plug.in/ns/ext/state/state.h" #include "lv2/lv2plug.in/ns/ext/urid/urid.h" -#include "ingen/ServerInterface.hpp" +#include "ingen/Interface.hpp" #include "ingen/serialisation/Parser.hpp" #include "ingen/serialisation/Serialiser.hpp" #include "ingen/shared/Configuration.hpp" @@ -416,7 +416,7 @@ ingen_cleanup(LV2_Handle instance) { IngenPlugin* me = (IngenPlugin*)instance; me->world->set_local_engine(SharedPtr()); - me->world->set_engine(SharedPtr()); + me->world->set_engine(SharedPtr()); delete me->world; free(instance); } diff --git a/src/shared/Builder.cpp b/src/shared/Builder.cpp index 9dea08f0..3b49bd41 100644 --- a/src/shared/Builder.cpp +++ b/src/shared/Builder.cpp @@ -18,7 +18,7 @@ #include "raul/Atom.hpp" #include "raul/Path.hpp" -#include "ingen/CommonInterface.hpp" +#include "ingen/Interface.hpp" #include "ingen/Connection.hpp" #include "ingen/Node.hpp" #include "ingen/Patch.hpp" @@ -34,7 +34,7 @@ using namespace Raul; namespace Ingen { namespace Shared { -Builder::Builder(SharedPtr uris, CommonInterface& interface) +Builder::Builder(SharedPtr uris, Interface& interface) : _uris(uris) , _interface(interface) { diff --git a/src/shared/World.cpp b/src/shared/World.cpp index fe5e025c..e3551302 100644 --- a/src/shared/World.cpp +++ b/src/shared/World.cpp @@ -26,6 +26,7 @@ #include "raul/Atom.hpp" #include "sord/sordmm.hpp" +#include "ingen/Interface.hpp" #include "ingen/EngineBase.hpp" #include "ingen/shared/Module.hpp" #include "ingen/shared/World.hpp" @@ -176,7 +177,7 @@ public: Sord::World* rdf_world; SharedPtr lv2_uri_map; SharedPtr uris; - SharedPtr engine; + SharedPtr engine; SharedPtr local_engine; SharedPtr serialiser; SharedPtr parser; @@ -201,7 +202,7 @@ World::~World() } void World::set_local_engine(SharedPtr e) { _impl->local_engine = e; } -void World::set_engine(SharedPtr e) { _impl->engine = e; } +void World::set_engine(SharedPtr e) { _impl->engine = e; } void World::set_serialiser(SharedPtr s) { _impl->serialiser = s; } void World::set_parser(SharedPtr p) { _impl->parser = p; } void World::set_store(SharedPtr s) { _impl->store = s; } @@ -210,7 +211,7 @@ void World::set_conf(Raul::Configuration* c) { _impl->conf int& World::argc() { return _impl->argc; } char**& World::argv() { return _impl->argv; } SharedPtr World::local_engine() { return _impl->local_engine; } -SharedPtr World::engine() { return _impl->engine; } +SharedPtr World::engine() { return _impl->engine; } SharedPtr World::serialiser() { return _impl->serialiser; } SharedPtr World::parser() { return _impl->parser; } SharedPtr World::store() { return _impl->store; } @@ -271,16 +272,15 @@ World::unload_modules() /** Get an interface for a remote engine at @a url */ -SharedPtr -World::interface( - const std::string& engine_url, - SharedPtr respond_to) +SharedPtr +World::interface(const std::string& engine_url, + SharedPtr respond_to) { const string scheme = engine_url.substr(0, engine_url.find(":")); const Pimpl::InterfaceFactories::const_iterator i = _impl->interface_factories.find(scheme); if (i == _impl->interface_factories.end()) { warn << "Unknown URI scheme `" << scheme << "'" << endl; - return SharedPtr(); + return SharedPtr(); } return i->second(this, engine_url, respond_to); -- cgit v1.2.1