diff options
Diffstat (limited to 'src/server/OSCClientSender.cpp')
-rw-r--r-- | src/server/OSCClientSender.cpp | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/src/server/OSCClientSender.cpp b/src/server/OSCClientSender.cpp index df2a8f3a..5095eeef 100644 --- a/src/server/OSCClientSender.cpp +++ b/src/server/OSCClientSender.cpp @@ -130,7 +130,32 @@ OSCClientSender::delta(const Raul::URI& path, const Resource::Properties& remove, const Resource::Properties& add) { - warn << "FIXME: OSC DELTA" << endl; + typedef Resource::Properties::const_iterator iterator; + + const bool bundle = !_bundle; + if (bundle) + bundle_begin(); + + send("/delta_begin", "s", path.c_str(), LO_ARGS_END); + + for (iterator i = remove.begin(); i != remove.end(); ++i) { + lo_message m = lo_message_new(); + lo_message_add_string(m, i->first.c_str()); + Raul::AtomLiblo::lo_message_add_atom(m, i->second); + send_message("/delta_remove", m); + } + + for (iterator i = add.begin(); i != add.end(); ++i) { + lo_message m = lo_message_new(); + lo_message_add_string(m, i->first.c_str()); + Raul::AtomLiblo::lo_message_add_atom(m, i->second); + send_message("/delta_add", m); + } + + send("/delta_end", "", LO_ARGS_END); + + if (bundle) + bundle_end(); } /** @page client_osc_namespace |