summaryrefslogtreecommitdiffstats
path: root/src/engine/ClientBroadcaster.hpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2010-01-07 01:55:20 +0000
committerDavid Robillard <d@drobilla.net>2010-01-07 01:55:20 +0000
commitc916eafd99b2cfde0e56c3c5eb1bcc39b56c30f8 (patch)
treeeb19140bb4db1071405b2a0b1d9aadd574a5e6d4 /src/engine/ClientBroadcaster.hpp
parent10a5b76a65fb7ca7bf8c1f5869aaf763854e05a3 (diff)
downloadingen-c916eafd99b2cfde0e56c3c5eb1bcc39b56c30f8.tar.gz
ingen-c916eafd99b2cfde0e56c3c5eb1bcc39b56c30f8.tar.bz2
ingen-c916eafd99b2cfde0e56c3c5eb1bcc39b56c30f8.zip
Make ClientBroadcaster itself a ClientInterface.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2353 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/engine/ClientBroadcaster.hpp')
-rw-r--r--src/engine/ClientBroadcaster.hpp65
1 files changed, 46 insertions, 19 deletions
diff --git a/src/engine/ClientBroadcaster.hpp b/src/engine/ClientBroadcaster.hpp
index f13530ca..85524416 100644
--- a/src/engine/ClientBroadcaster.hpp
+++ b/src/engine/ClientBroadcaster.hpp
@@ -38,15 +38,12 @@ class ConnectionImpl;
/** Broadcaster for all clients.
*
- * This sends messages to all client simultaneously through the opaque
- * ClientInterface. The clients may be OSC driver, in process, theoretically
- * anything that implements ClientInterface.
- *
- * This also serves as the database of all registered clients.
+ * This is a ClientInterface that forwards all messages to all registered
+ * clients (for updating all clients on state changes in the engine).
*
* \ingroup engine
*/
-class ClientBroadcaster
+class ClientBroadcaster : public Shared::ClientInterface
{
public:
void register_client(const Raul::URI& uri, Shared::ClientInterface* client);
@@ -54,24 +51,54 @@ public:
Shared::ClientInterface* client(const Raul::URI& uri);
+ void send_plugins(const NodeFactory::Plugins& plugin_list);
+ void send_plugins_to(Shared::ClientInterface*, const NodeFactory::Plugins& plugin_list);
+
+ void send_object(const GraphObjectImpl* p, bool recursive);
+
+ // CommonInterface
+
void bundle_begin();
void bundle_end();
- // Error that isn't the direct result of a request
- void send_error(const std::string& msg);
+ void put(const Raul::URI& uri,
+ const Shared::Resource::Properties& properties);
- void send_plugins(const NodeFactory::Plugins& plugin_list);
- void send_object(const GraphObjectImpl* p, bool recursive);
- void send_deleted(const Raul::Path& path);
- void send_connection(const SharedPtr<const ConnectionImpl> connection);
- void send_disconnection(const Raul::Path& src_port_path, const Raul::Path& dst_port_path);
- void send_move(const Raul::Path& old_path, const Raul::Path& new_path);
- void send_put(const Raul::URI& subject, const Shared::Resource::Properties& properties);
- void send_property_change(const Raul::URI& subject, const Raul::URI& key, const Raul::Atom& value);
- void send_port_value(const Raul::Path& port_path, const Raul::Atom& value);
- void send_activity(const Raul::Path& path);
+ void move(const Raul::Path& old_path,
+ const Raul::Path& new_path);
- void send_plugins_to(Shared::ClientInterface*, const NodeFactory::Plugins& plugin_list);
+ void del(const Raul::Path& path);
+
+ void connect(const Raul::Path& src_port_path,
+ const Raul::Path& dst_port_path);
+
+ void disconnect(const Raul::Path& src_port_path,
+ const Raul::Path& dst_port_path);
+
+ void set_property(const Raul::URI& subject,
+ const Raul::URI& predicate,
+ const Raul::Atom& value);
+
+ void set_port_value(const Raul::Path& port_path,
+ const Raul::Atom& value);
+
+ void set_voice_value(const Raul::Path& port_path,
+ uint32_t voice,
+ const Raul::Atom& value);
+
+ // ClientInterface
+
+ Raul::URI uri() const { return "ingen:broadcaster"; } ///< N/A
+
+ void response_ok(int32_t id) {} ///< N/A
+ void response_error(int32_t id, const std::string& msg) {} ///< N/A
+
+ void transfer_begin();
+ void transfer_end();
+
+ void error(const std::string& msg);
+
+ void activity(const Raul::Path& path);
private:
typedef std::map<Raul::URI, Shared::ClientInterface*> Clients;