From 14d9e8c55895be82a8e6dcf1455ecfb41447ad12 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 28 May 2009 16:22:34 +0000 Subject: Implement PUT over OSC. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2026 a436a847-0d15-0410-975c-d299462d15a1 --- src/client/OSCClientReceiver.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src/client/OSCClientReceiver.cpp') diff --git a/src/client/OSCClientReceiver.cpp b/src/client/OSCClientReceiver.cpp index e30ff7c4..c552e82e 100644 --- a/src/client/OSCClientReceiver.cpp +++ b/src/client/OSCClientReceiver.cpp @@ -29,13 +29,14 @@ using namespace Raul; namespace Ingen { namespace Client { +using namespace Shared; OSCClientReceiver::OSCClientReceiver(int listen_port, SharedPtr target) : _target(target) , _listen_port(listen_port) , _st(NULL) { - start(false); // true = dump, false = shutup + start(true); // true = dump, false = shutup } @@ -183,6 +184,18 @@ OSCClientReceiver::_clear_patch_cb(const char* path, const char* types, lo_arg** } +int +OSCClientReceiver::_put_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg) +{ + const char* obj_path = &argv[0]->s; + Resource::Properties prop; + for (int i = 1; i < argc-1; i += 2) + prop.insert(make_pair(&argv[i]->s, AtomLiblo::lo_arg_to_atom(types[i+1], argv[i+1]))); + _target->put(obj_path, prop); + return 0; +} + + int OSCClientReceiver::_move_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg) { -- cgit v1.2.1