summaryrefslogtreecommitdiffstats
path: root/ingen/AtomWriter.hpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2017-12-16 17:57:49 +0100
committerDavid Robillard <d@drobilla.net>2017-12-16 18:05:19 +0100
commit7513e0b53a36e96b9e1fa1884b78077a95da3081 (patch)
treefc96befa9b2c2f5255ada0d589c524e22626c16d /ingen/AtomWriter.hpp
parent2b88ebdcb7a438a8419ab6a815742b115b2dce03 (diff)
downloadingen-7513e0b53a36e96b9e1fa1884b78077a95da3081.tar.gz
ingen-7513e0b53a36e96b9e1fa1884b78077a95da3081.tar.bz2
ingen-7513e0b53a36e96b9e1fa1884b78077a95da3081.zip
Add Message struct and remove tons of interface boilerplate
Diffstat (limited to 'ingen/AtomWriter.hpp')
-rw-r--r--ingen/AtomWriter.hpp62
1 files changed, 18 insertions, 44 deletions
diff --git a/ingen/AtomWriter.hpp b/ingen/AtomWriter.hpp
index e7a02049..21fcb933 100644
--- a/ingen/AtomWriter.hpp
+++ b/ingen/AtomWriter.hpp
@@ -42,52 +42,26 @@ public:
return Raul::URI("ingen:/clients/atom_writer");
}
- void bundle_begin();
-
- void bundle_end();
-
- void put(const Raul::URI& uri,
- const Properties& properties,
- Resource::Graph ctx = Resource::Graph::DEFAULT);
-
- 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 del(const Raul::URI& uri);
-
- 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 set_property(const Raul::URI& subject,
- const Raul::URI& predicate,
- const Atom& value,
- Resource::Graph ctx = Resource::Graph::DEFAULT);
-
- 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);
+ void message(const Message& message) 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&);
private:
void forge_uri(const Raul::URI& uri);