diff options
author | David Robillard <d@drobilla.net> | 2008-08-17 01:34:53 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2008-08-17 01:34:53 +0000 |
commit | 694b31089c8060fc6b908b146b12c0e340d004c7 (patch) | |
tree | 48b0e0195de5e7b297e65be15eda35639585ef8a /src/common/interface | |
parent | 3dc90cc95df35e5c786857336f22856c6373b00f (diff) | |
download | ingen-694b31089c8060fc6b908b146b12c0e340d004c7.tar.gz ingen-694b31089c8060fc6b908b146b12c0e340d004c7.tar.bz2 ingen-694b31089c8060fc6b908b146b12c0e340d004c7.zip |
Cloooser...
Bundling of OSC communication both ways (previous was just engine->client).
Factor out common OSC*Sender functionality (bundling stuff).
Fully type-safe and polyphony-aware port value setting/getting, from RDF through OSC through engine and back again.
git-svn-id: http://svn.drobilla.net/lad/ingen@1409 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/common/interface')
-rw-r--r-- | src/common/interface/ClientInterface.hpp | 16 | ||||
-rw-r--r-- | src/common/interface/CommonInterface.hpp | 10 | ||||
-rw-r--r-- | src/common/interface/EngineInterface.hpp | 29 |
3 files changed, 14 insertions, 41 deletions
diff --git a/src/common/interface/ClientInterface.hpp b/src/common/interface/ClientInterface.hpp index e6bb9d6d..16e17fc0 100644 --- a/src/common/interface/ClientInterface.hpp +++ b/src/common/interface/ClientInterface.hpp @@ -36,10 +36,9 @@ namespace Shared { class ClientInterface : public CommonInterface { public: - virtual ~ClientInterface() {} - inline const std::string& uri() const { return _uri; } + virtual std::string uri() const = 0; virtual void response_ok(int32_t id) = 0; virtual void response_error(int32_t id, const std::string& msg) = 0; @@ -97,9 +96,6 @@ public: virtual void object_destroyed(const std::string& path) = 0; - virtual void control_change(const std::string& port_path, - float value) = 0; - virtual void port_activity(const std::string& port_path) = 0; virtual void program_add(const std::string& node_path, @@ -110,16 +106,6 @@ public: virtual void program_remove(const std::string& node_path, uint32_t bank, uint32_t program) = 0; - -protected: - ClientInterface(const std::string& uri) : _uri(uri) {} - ClientInterface() { - static char uri_buf[20]; - snprintf(uri_buf, 127, "%p", this); - _uri = uri_buf; - } - - std::string _uri; }; diff --git a/src/common/interface/CommonInterface.hpp b/src/common/interface/CommonInterface.hpp index f8a71b94..1f760a3e 100644 --- a/src/common/interface/CommonInterface.hpp +++ b/src/common/interface/CommonInterface.hpp @@ -21,7 +21,7 @@ #include <inttypes.h> #include <string> #include <raul/SharedPtr.hpp> -#include "interface/ClientInterface.hpp" +#include <raul/Atom.hpp> #include "interface/CommonInterface.hpp" namespace Ingen { @@ -61,8 +61,12 @@ public: const std::string& predicate, const Raul::Atom& value) = 0; -protected: - CommonInterface() {} + virtual void set_port_value(const std::string& port_path, + const Raul::Atom& value) = 0; + + virtual void set_voice_value(const std::string& port_path, + uint32_t voice, + const Raul::Atom& value) = 0; }; diff --git a/src/common/interface/EngineInterface.hpp b/src/common/interface/EngineInterface.hpp index ae424e52..3983dc65 100644 --- a/src/common/interface/EngineInterface.hpp +++ b/src/common/interface/EngineInterface.hpp @@ -21,12 +21,13 @@ #include <inttypes.h> #include <string> #include <raul/SharedPtr.hpp> -#include "interface/ClientInterface.hpp" #include "interface/CommonInterface.hpp" namespace Ingen { namespace Shared { +class ClientInterface; + /** The (only) interface clients use to communicate with the engine. * Purely virtual (except for the destructor). @@ -87,27 +88,12 @@ public: virtual void disconnect_all(const std::string& parent_patch_path, const std::string& path) = 0; - virtual void set_port_value(const std::string& port_path, - const std::string& type_uri, - uint32_t data_size, - const void* data) = 0; - - virtual void set_port_value(const std::string& port_path, - const std::string& type_uri, - uint32_t voice, - uint32_t data_size, - const void* data) = 0; - virtual void set_port_value_immediate(const std::string& port_path, - const std::string& type_uri, - uint32_t data_size, - const void* data) = 0; + const Raul::Atom& value) = 0; - virtual void set_port_value_immediate(const std::string& port_path, - const std::string& type_uri, - uint32_t voice, - uint32_t data_size, - const void* data) = 0; + virtual void set_voice_value_immediate(const std::string& port_path, + uint32_t voice, + const Raul::Atom& value) = 0; virtual void enable_port_broadcasting(const std::string& port_path) = 0; @@ -135,9 +121,6 @@ public: virtual void request_plugins() = 0; virtual void request_all_objects() = 0; - -protected: - EngineInterface() {} }; |