diff options
author | David Robillard <d@drobilla.net> | 2007-07-24 21:23:22 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-07-24 21:23:22 +0000 |
commit | bac31a50f17608c514afce5ad014316cccde3d5a (patch) | |
tree | de4ec623cc5099e3de4b9b5a1883b51694fe6bf9 /src/libs/engine/ClientBroadcaster.hpp | |
parent | bb1c49dfa484db080938cff6f8f70167c9026a1c (diff) | |
download | ingen-bac31a50f17608c514afce5ad014316cccde3d5a.tar.gz ingen-bac31a50f17608c514afce5ad014316cccde3d5a.tar.bz2 ingen-bac31a50f17608c514afce5ad014316cccde3d5a.zip |
Scrapped ClientKey in favour of a URI string (towards a simpler closer-to-straight-C engine interface).
Fixed client deregistration.
Added metadata value requesting.
git-svn-id: http://svn.drobilla.net/lad/ingen@614 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/engine/ClientBroadcaster.hpp')
-rw-r--r-- | src/libs/engine/ClientBroadcaster.hpp | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/src/libs/engine/ClientBroadcaster.hpp b/src/libs/engine/ClientBroadcaster.hpp index 87e321bb..3103c4d9 100644 --- a/src/libs/engine/ClientBroadcaster.hpp +++ b/src/libs/engine/ClientBroadcaster.hpp @@ -19,16 +19,17 @@ #define CLIENTBROADCASTER_H #include <string> -#include <iostream> -#include <utility> #include <list> +#include <map> #include <lo/lo.h> #include <pthread.h> #include <raul/SharedPtr.hpp> #include "interface/ClientInterface.hpp" #include "types.hpp" -using std::list; using std::string; using std::pair; +using std::map; +using std::string; +using std::list; namespace Ingen { @@ -37,8 +38,7 @@ class Port; class Plugin; class Patch; class Connection; -namespace Shared { class ClientKey; class Responder; } -using Shared::ClientKey; +namespace Shared { class Responder; } using Shared::ClientInterface; @@ -55,10 +55,10 @@ using Shared::ClientInterface; class ClientBroadcaster { public: - void register_client(const ClientKey key, SharedPtr<ClientInterface> client); - bool unregister_client(const ClientKey& key); + void register_client(const string& uri, SharedPtr<ClientInterface> client); + bool unregister_client(const string& uri); - SharedPtr<ClientInterface> client(const ClientKey& key); + SharedPtr<ClientInterface> client(const string& uri); // Notification band: @@ -91,9 +91,8 @@ public: void send_plugins_to(SharedPtr<ClientInterface>, const list<Plugin*>& plugin_list); private: - typedef list<pair<ClientKey, SharedPtr<ClientInterface> > > ClientList; - //list<pair<ClientKey, ClientInterface* const> > _clients; - ClientList _clients; + typedef std::map<string, SharedPtr<ClientInterface> > ClientMap; + ClientMap _clients; }; |