diff options
author | David Robillard <d@drobilla.net> | 2012-03-16 04:13:23 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-03-16 04:13:23 +0000 |
commit | 9da093217352daa1fb61a6f2daf5195640e286a7 (patch) | |
tree | fb3489c04451dc14a61170ba2418123727414340 /src | |
parent | 119468f621a59d86da10bedf75c4427b70f9d370 (diff) | |
download | ingen-9da093217352daa1fb61a6f2daf5195640e286a7.tar.gz ingen-9da093217352daa1fb61a6f2daf5195640e286a7.tar.bz2 ingen-9da093217352daa1fb61a6f2daf5195640e286a7.zip |
Merge ClientInterface and ServerInterface.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4067 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
71 files changed, 188 insertions, 196 deletions
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<Shared::URIs> uris, - SharedPtr<ServerInterface> engine, + SharedPtr<Interface> engine, SharedPtr<SigClientInterface> 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<PatchModel>(_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 <gtk/gtkwindow.h> #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<ServerInterface>()); + _world->set_engine(SharedPtr<Interface>()); } } 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<Gdk::Pixbuf> icon_from_path(const std::string& path, int size); Raul::Forge& forge() const { return _world->forge(); } - SharedPtr<Ingen::ServerInterface> engine() const { return _world->engine(); } + SharedPtr<Ingen::Interface> engine() const { return _world->engine(); } SharedPtr<Client::SigClientInterface> client() const { return _client; } SharedPtr<Client::ClientStore> store() const { return _store; } SharedPtr<ThreadedLoader> 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<ServerInterface> engine) +ConnectWindow::set_connected_to(SharedPtr<Ingen::Interface> 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<Ingen::ServerInterface>()); + set_connected_to(SharedPtr<Ingen::Interface>()); 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<Gtk::Builder>& xml); - void set_connected_to(SharedPtr<ServerInterface> engine); + void set_connected_to(SharedPtr<Ingen::Interface> 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 <cmath> #include <algorithm> #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 <cassert> #include <boost/optional.hpp> #include <glibmm/miscutils.h> -#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 <cassert> #include <algorithm> -#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 <cmath> -#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 <gtkmm.h> -#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 <cassert> #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 <gtkmm.h> -#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 <cassert> #include <utility> #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 <cassert> #include <fstream> #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 <cassert> #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 <math.h> #include <gtkmm.h> #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 <cassert> #include <string> -#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 <cassert> #include <utility> -#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<ServerInterface> engine) +ThreadedLoader::ThreadedLoader(App& app, SharedPtr<Interface> 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 <glibmm/thread.h> -#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<ServerInterface> engine); + ThreadedLoader(App& app, + SharedPtr<Interface> engine); void load_patch(bool merge, const Glib::ustring& document_uri, @@ -75,10 +75,10 @@ private: void _whipped(); - App& _app; - SharedPtr<ServerInterface> _engine; - Glib::Mutex _mutex; - list<Closure> _events; + App& _app; + SharedPtr<Interface> _engine; + Glib::Mutex _mutex; + list<Closure> _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<ServerInterface> engine_interface; + SharedPtr<Interface> 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<ClientInterface> client(new Client::SigClientInterface()); + SharedPtr<Interface> 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 <boost/utility.hpp> #include <lo/lo.h> -#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 <lo/lo.h> -#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<Raul::Path> parse( Shared::World* world, - CommonInterface* target, + Interface* target, Sord::Model& model, Glib::ustring document_uri, - boost::optional<Raul::Path> parent = boost::optional<Raul::Path>(), - boost::optional<Raul::Symbol> symbol = boost::optional<Raul::Symbol>(), - boost::optional<Resource::Properties> data = boost::optional<Resource::Properties>()); + boost::optional<Raul::Path> parent = boost::optional<Raul::Path>(), + boost::optional<Raul::Symbol> symbol = boost::optional<Raul::Symbol>(), + boost::optional<Resource::Properties> data = boost::optional<Resource::Properties>()); static boost::optional<Raul::Path> parse_patch( Shared::World* world, - CommonInterface* target, + Interface* target, Sord::Model& model, const Sord::Node& subject, boost::optional<Raul::Path> parent = boost::optional<Raul::Path>(), @@ -179,7 +179,7 @@ parse_patch( static boost::optional<Raul::Path> 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<Resource::Properties> data = boost::optional<Resource::Properties>()); 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<Path> 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<Path> parse_patch(Ingen::Shared::World* world, - Ingen::CommonInterface* target, + Ingen::Interface* target, Sord::Model& model, const Sord::Node& subject_node, boost::optional<Raul::Path> 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<Path> parse(Ingen::Shared::World* world, - Ingen::CommonInterface* target, + Ingen::Interface* target, Sord::Model& model, Glib::ustring document_uri, boost::optional<Raul::Path> 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<Raul::Path> parent, boost::optional<Raul::Symbol> 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<Raul::Path> 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 <cassert> #include <unistd.h> #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<Raul::URI, ClientInterface*> Clients; + typedef std::map<Raul::URI, Interface*> 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<Event> _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 <string> #include <memory> #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<Ingen::Server::Engine>()); - me->world->set_engine(SharedPtr<Ingen::ServerInterface>()); + me->world->set_engine(SharedPtr<Ingen::Interface>()); 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<Shared::URIs> uris, CommonInterface& interface) +Builder::Builder(SharedPtr<Shared::URIs> 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<LV2URIMap> lv2_uri_map; SharedPtr<URIs> uris; - SharedPtr<ServerInterface> engine; + SharedPtr<Interface> engine; SharedPtr<EngineBase> local_engine; SharedPtr<Serialisation::Serialiser> serialiser; SharedPtr<Serialisation::Parser> parser; @@ -201,7 +202,7 @@ World::~World() } void World::set_local_engine(SharedPtr<EngineBase> e) { _impl->local_engine = e; } -void World::set_engine(SharedPtr<ServerInterface> e) { _impl->engine = e; } +void World::set_engine(SharedPtr<Interface> e) { _impl->engine = e; } void World::set_serialiser(SharedPtr<Serialisation::Serialiser> s) { _impl->serialiser = s; } void World::set_parser(SharedPtr<Serialisation::Parser> p) { _impl->parser = p; } void World::set_store(SharedPtr<Store> 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<EngineBase> World::local_engine() { return _impl->local_engine; } -SharedPtr<ServerInterface> World::engine() { return _impl->engine; } +SharedPtr<Interface> World::engine() { return _impl->engine; } SharedPtr<Serialisation::Serialiser> World::serialiser() { return _impl->serialiser; } SharedPtr<Serialisation::Parser> World::parser() { return _impl->parser; } SharedPtr<Store> World::store() { return _impl->store; } @@ -271,16 +272,15 @@ World::unload_modules() /** Get an interface for a remote engine at @a url */ -SharedPtr<ServerInterface> -World::interface( - const std::string& engine_url, - SharedPtr<ClientInterface> respond_to) +SharedPtr<Interface> +World::interface(const std::string& engine_url, + SharedPtr<Interface> 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<ServerInterface>(); + return SharedPtr<Interface>(); } return i->second(this, engine_url, respond_to); |