summaryrefslogtreecommitdiffstats
path: root/ingen/shared
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-03-16 04:13:23 +0000
committerDavid Robillard <d@drobilla.net>2012-03-16 04:13:23 +0000
commit9da093217352daa1fb61a6f2daf5195640e286a7 (patch)
treefb3489c04451dc14a61170ba2418123727414340 /ingen/shared
parent119468f621a59d86da10bedf75c4427b70f9d370 (diff)
downloadingen-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 'ingen/shared')
-rw-r--r--ingen/shared/Builder.hpp8
-rw-r--r--ingen/shared/ClashAvoider.hpp20
-rw-r--r--ingen/shared/World.hpp21
3 files changed, 27 insertions, 22 deletions
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<Shared::URIs> uris, CommonInterface& interface);
+ Builder(SharedPtr<Shared::URIs> uris, Interface& interface);
virtual ~Builder() {}
void build(SharedPtr<const GraphObject> object);
@@ -46,7 +46,7 @@ private:
void build_object(SharedPtr<const GraphObject> object);
SharedPtr<Shared::URIs> _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 <map>
-#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<ServerInterface> (*InterfaceFactory)(
- World* world,
- const std::string& engine_url,
- SharedPtr<ClientInterface> respond_to);
+ typedef SharedPtr<Interface> (*InterfaceFactory)(
+ World* world,
+ const std::string& engine_url,
+ SharedPtr<Interface> respond_to);
virtual void add_interface_factory(const std::string& scheme,
InterfaceFactory factory);
- virtual SharedPtr<ServerInterface> interface(
- const std::string& engine_url,
- SharedPtr<ClientInterface> respond_to);
+ virtual SharedPtr<Interface> interface(
+ const std::string& engine_url,
+ SharedPtr<Interface> respond_to);
virtual bool run(const std::string& mime_type,
const std::string& filename);
virtual void set_local_engine(SharedPtr<EngineBase> e);
- virtual void set_engine(SharedPtr<ServerInterface> e);
+ virtual void set_engine(SharedPtr<Interface> e);
virtual void set_serialiser(SharedPtr<Serialisation::Serialiser> s);
virtual void set_parser(SharedPtr<Serialisation::Parser> p);
virtual void set_store(SharedPtr<Store> s);
virtual SharedPtr<EngineBase> local_engine();
- virtual SharedPtr<ServerInterface> engine();
+ virtual SharedPtr<Interface> engine();
virtual SharedPtr<Serialisation::Serialiser> serialiser();
virtual SharedPtr<Serialisation::Parser> parser();
virtual SharedPtr<Store> store();