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/shared/Builder.hpp | 8 ++++---- ingen/shared/ClashAvoider.hpp | 20 +++++++++++++------- ingen/shared/World.hpp | 21 ++++++++++----------- 3 files changed, 27 insertions(+), 22 deletions(-) (limited to 'ingen/shared') 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(); -- cgit v1.2.1