summaryrefslogtreecommitdiffstats
path: root/src/libs/client
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-07-24 21:23:22 +0000
committerDavid Robillard <d@drobilla.net>2007-07-24 21:23:22 +0000
commitbac31a50f17608c514afce5ad014316cccde3d5a (patch)
treede4ec623cc5099e3de4b9b5a1883b51694fe6bf9 /src/libs/client
parentbb1c49dfa484db080938cff6f8f70167c9026a1c (diff)
downloadingen-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/client')
-rw-r--r--src/libs/client/OSCEngineSender.cpp15
-rw-r--r--src/libs/client/OSCEngineSender.hpp7
2 files changed, 16 insertions, 6 deletions
diff --git a/src/libs/client/OSCEngineSender.cpp b/src/libs/client/OSCEngineSender.cpp
index 2e49eac3..988f2c5e 100644
--- a/src/libs/client/OSCEngineSender.cpp
+++ b/src/libs/client/OSCEngineSender.cpp
@@ -17,7 +17,6 @@
#include <iostream>
#include "OSCEngineSender.hpp"
-#include "interface/ClientKey.hpp"
#include <raul/AtomLiblo.hpp>
using std::cout; using std::cerr; using std::endl;
@@ -108,7 +107,7 @@ OSCEngineSender::attach(int32_t ping_id, bool block)
* traversal. It is a parameter to remain compatible with EngineInterface.
*/
void
-OSCEngineSender::register_client(ClientKey key, SharedPtr<ClientInterface> client)
+OSCEngineSender::register_client(const string& uri, SharedPtr<ClientInterface> client)
{
// FIXME: use parameters.. er, somehow.
assert(_engine_addr);
@@ -117,7 +116,7 @@ OSCEngineSender::register_client(ClientKey key, SharedPtr<ClientInterface> clien
void
-OSCEngineSender::unregister_client(ClientKey key)
+OSCEngineSender::unregister_client(const string& uri)
{
assert(_engine_addr);
lo_send(_engine_addr, "/ingen/unregister_client", "i", next_id());
@@ -426,6 +425,16 @@ OSCEngineSender::request_port_value(const string& port_path)
port_path.c_str());
}
+void
+OSCEngineSender::request_metadata(const string& object_path, const string& key)
+{
+ assert(_engine_addr);
+ lo_send(_engine_addr, "/ingen/request_metadata", "iss",
+ next_id(),
+ object_path.c_str(),
+ key.c_str());
+}
+
void
OSCEngineSender::request_plugins()
diff --git a/src/libs/client/OSCEngineSender.hpp b/src/libs/client/OSCEngineSender.hpp
index c9b37ec8..ea804d59 100644
--- a/src/libs/client/OSCEngineSender.hpp
+++ b/src/libs/client/OSCEngineSender.hpp
@@ -26,7 +26,6 @@
using std::string;
using Ingen::Shared::EngineInterface;
using Ingen::Shared::ClientInterface;
-using Ingen::Shared::ClientKey;
using Ingen::Shared::Responder;
namespace Ingen {
@@ -62,8 +61,8 @@ public:
/* *** EngineInterface implementation below here *** */
// Client registration
- void register_client(ClientKey key, SharedPtr<ClientInterface> client);
- void unregister_client(ClientKey key);
+ void register_client(const string& uri, SharedPtr<ClientInterface> client);
+ void unregister_client(const string& uri);
// Engine commands
@@ -140,6 +139,8 @@ public:
void request_object(const string& path);
void request_port_value(const string& port_path);
+
+ void request_metadata(const string& path, const string& key);
void request_plugins();