From 19928bb583e72802746b89e322f71ecc0fcb7427 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 13 May 2009 04:05:32 +0000 Subject: The great ID refactoring of 2009. Path is now actually URI (scheme path: for now). Therefore ingen nodes and such live in the same namespace as ... well, everything. Including plugins. Thar be profit, laddies. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@1992 a436a847-0d15-0410-975c-d299462d15a1 --- src/client/HTTPEngineSender.hpp | 123 ++++++++++++++++++++-------------------- 1 file changed, 61 insertions(+), 62 deletions(-) (limited to 'src/client/HTTPEngineSender.hpp') diff --git a/src/client/HTTPEngineSender.hpp b/src/client/HTTPEngineSender.hpp index 1579e120..7de785fc 100644 --- a/src/client/HTTPEngineSender.hpp +++ b/src/client/HTTPEngineSender.hpp @@ -21,10 +21,8 @@ #include #include #include +#include "raul/Path.hpp" #include "interface/EngineInterface.hpp" -using std::string; -using Ingen::Shared::EngineInterface; -using Ingen::Shared::ClientInterface; namespace Ingen { namespace Client { @@ -37,12 +35,12 @@ namespace Client { * * \ingroup IngenClient */ -class HTTPEngineSender : public EngineInterface { +class HTTPEngineSender : public Shared::EngineInterface { public: - HTTPEngineSender(const string& engine_url); + HTTPEngineSender(const Raul::URI& engine_url); ~HTTPEngineSender(); - string uri() const { return _engine_url; } + Raul::URI uri() const { return _engine_url; } inline int32_t next_id() { int32_t ret = (_id == -1) ? -1 : _id++; return ret; } @@ -65,8 +63,8 @@ public: void transfer_end() {} // Client registration - void register_client(ClientInterface* client); - void unregister_client(const string& uri); + void register_client(Shared::ClientInterface* client); + void unregister_client(const Raul::URI& uri); // Engine commands void load_plugins(); @@ -76,72 +74,73 @@ public: // Object commands - bool new_object(const Shared::GraphObject* object); + virtual bool new_object(const Shared::GraphObject* object); - void new_patch(const string& path, - uint32_t poly); - - void new_port(const string& path, - const string& type, - uint32_t index, - bool is_output); - - void new_node(const string& path, - const string& plugin_uri); + virtual void new_patch(const Raul::Path& path, + uint32_t poly); - void rename(const string& old_path, - const string& new_name); - - void destroy(const string& path); - - void clear_patch(const string& patch_path); + virtual void new_node(const Raul::Path& path, + const Raul::URI& plugin_uri); - void connect(const string& src_port_path, - const string& dst_port_path); - - void disconnect(const string& src_port_path, - const string& dst_port_path); - - void disconnect_all(const string& parent_patch_path, - const string& path); - - void set_port_value(const string& port_path, - const Raul::Atom& value); - - void set_voice_value(const string& port_path, - uint32_t voice, - const Raul::Atom& value); + virtual void new_port(const Raul::Path& path, + const Raul::URI& type, + uint32_t index, + bool is_output); - void set_program(const string& node_path, - uint32_t bank, - uint32_t program); - - void midi_learn(const string& node_path); - - void set_variable(const string& obj_path, - const string& predicate, - const Raul::Atom& value); + virtual void clear_patch(const Raul::Path& path); + + virtual void destroy(const Raul::Path& path); - void set_property(const string& obj_path, - const string& predicate, - const Raul::Atom& value); + virtual void rename(const Raul::Path& old_path, + const Raul::Path& new_path); + virtual void connect(const Raul::Path& src_port_path, + const Raul::Path& dst_port_path); + + virtual void disconnect(const Raul::Path& src_port_path, + const Raul::Path& dst_port_path); + + virtual void disconnect_all(const Raul::Path& parent_patch_path, + const Raul::Path& path); + + virtual void set_variable(const Raul::Path& subject_path, + const Raul::URI& predicate, + const Raul::Atom& value); + + virtual void set_property(const Raul::Path& subject_path, + const Raul::URI& predicate, + const Raul::Atom& value); + + virtual void set_port_value(const Raul::Path& port_path, + const Raul::Atom& value); + + virtual void set_voice_value(const Raul::Path& port_path, + uint32_t voice, + const Raul::Atom& value); + + virtual void set_program(const Raul::Path& node_path, + uint32_t bank, + uint32_t program); + + virtual void midi_learn(const Raul::Path& node_path); + + // Requests // void ping(); - void request_plugin(const string& uri); - void request_object(const string& path); - void request_port_value(const string& port_path); - void request_variable(const string& path, const string& key); - void request_property(const string& path, const string& key); + void request_plugin(const Raul::URI& uri); + void request_object(const Raul::Path& path); + void request_port_value(const Raul::Path& port_path); + void request_variable(const Raul::Path& path, const Raul::URI& key); + void request_property(const Raul::Path& path, const Raul::URI& key); void request_plugins(); void request_all_objects(); protected: - SoupSession* _session; - const string _engine_url; - int _client_port; - int32_t _id; - bool _enabled; + SoupSession* _session; + const Raul::URI _engine_url; + int _client_port; + int32_t _id; + bool _enabled; }; -- cgit v1.2.1