From 7513e0b53a36e96b9e1fa1884b78077a95da3081 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 16 Dec 2017 17:57:49 +0100 Subject: Add Message struct and remove tons of interface boilerplate --- ingen/client/ClientStore.hpp | 56 ++++++++++++++------------------------------ 1 file changed, 18 insertions(+), 38 deletions(-) (limited to 'ingen/client/ClientStore.hpp') diff --git a/ingen/client/ClientStore.hpp b/ingen/client/ClientStore.hpp index 1887bed3..899273dc 100644 --- a/ingen/client/ClientStore.hpp +++ b/ingen/client/ClientStore.hpp @@ -73,43 +73,26 @@ public: URIs& uris() { return _uris; } - void put(const Raul::URI& uri, - const Properties& properties, - Resource::Graph ctx = Resource::Graph::DEFAULT); + void message(const Message& msg) override; + + void operator()(const BundleBegin&) {} + void operator()(const BundleEnd&) {} + void operator()(const Connect&); + void operator()(const Copy&); + void operator()(const Del&); + void operator()(const Delta&); + void operator()(const Disconnect&); + void operator()(const DisconnectAll&); + void operator()(const Error&) {} + void operator()(const Get&) {} + void operator()(const Move&); + void operator()(const Put&); + void operator()(const Redo&) {} + void operator()(const Response&) {} + void operator()(const SetProperty&); + void operator()(const Undo&) {} - void delta(const Raul::URI& uri, - const Properties& remove, - const Properties& add, - Resource::Graph ctx = Resource::Graph::DEFAULT); - - void copy(const Raul::URI& old_uri, - const Raul::URI& new_uri); - - void move(const Raul::Path& old_path, - const Raul::Path& new_path); - - void set_property(const Raul::URI& subject_path, - const Raul::URI& predicate, - const Atom& value, - Resource::Graph ctx = Resource::Graph::DEFAULT); - - void connect(const Raul::Path& tail, - const Raul::Path& head); - - void disconnect(const Raul::Path& tail, - const Raul::Path& head); - - void disconnect_all(const Raul::Path& graph, - const Raul::Path& path); - - void del(const Raul::URI& uri); - - void undo() {} - void redo() {} void set_response_id(int32_t id) {} - void get(const Raul::URI& uri) {} - void response(int32_t id, Status status, const std::string& subject) {} - void error(const std::string& msg) {} INGEN_SIGNAL(new_object, void, SPtr); INGEN_SIGNAL(new_plugin, void, SPtr); @@ -129,9 +112,6 @@ private: SPtr connection_graph(const Raul::Path& tail_path, const Raul::Path& head_path); - void bundle_begin() {} - void bundle_end() {} - // Slots for SigClientInterface signals bool attempt_connection(const Raul::Path& tail_path, const Raul::Path& head_path); -- cgit v1.2.1