summaryrefslogtreecommitdiffstats
path: root/src/osc/OSCClientSender.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-03-12 02:28:21 +0000
committerDavid Robillard <d@drobilla.net>2012-03-12 02:28:21 +0000
commite9d9569271ee962c09ab66c6babed1ca5655a6c6 (patch)
treef77142b08c2bf2488eb382e993da1477c0b94307 /src/osc/OSCClientSender.cpp
parent7835b3d8c9b5b4a6f4959f56083d62826e6f7b8e (diff)
downloadingen-e9d9569271ee962c09ab66c6babed1ca5655a6c6.tar.gz
ingen-e9d9569271ee962c09ab66c6babed1ca5655a6c6.tar.bz2
ingen-e9d9569271ee962c09ab66c6babed1ca5655a6c6.zip
Unify event response mechanism and make it more appropriate for wire transmission.
The downside being more cryptic error messages until the client side error reporting stuff gets more fancy, but the important part is that belongs client side. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4053 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/osc/OSCClientSender.cpp')
-rw-r--r--src/osc/OSCClientSender.cpp33
1 files changed, 7 insertions, 26 deletions
diff --git a/src/osc/OSCClientSender.cpp b/src/osc/OSCClientSender.cpp
index a0b7979c..1a6289f4 100644
--- a/src/osc/OSCClientSender.cpp
+++ b/src/osc/OSCClientSender.cpp
@@ -39,41 +39,22 @@ namespace Server {
*/
/** @page client_osc_namespace
- * <h2>/ok</h2>
+ * <h2>/response</h2>
* @arg @p response-id :: Integer
+ * @arg @p status :: Integer
*
* @par
- * Successful response to some command.
+ * Response to some command.
*/
void
-OSCClientSender::response_ok(int32_t id)
-{
- if (!_enabled)
- return;
-
- if (lo_send(_address, "/ok", "i", id, LO_ARGS_END) < 0) {
- Raul::error << "Unable to send OK " << id << "! ("
- << lo_address_errstr(_address) << ")" << endl;
- }
-}
-
-/** @page client_osc_namespace
- * <h2>/error</h2>
- * @arg @p response-id :: Integer
- * @arg @p message :: String
- *
- * @par
- * Unsuccessful response to some command.
- */
-void
-OSCClientSender::response_error(int32_t id, const std::string& msg)
+OSCClientSender::response(int32_t id, Status status)
{
if (!_enabled)
return;
- if (lo_send(_address, "/error", "is", id, msg.c_str(), LO_ARGS_END) < 0) {
- Raul::error << "Unable to send error " << id << "! ("
- << lo_address_errstr(_address) << ")" << endl;
+ if (lo_send(_address, "/response", "ii", id, status, LO_ARGS_END) < 0) {
+ Raul::error << "Unable to send response " << id << "! ("
+ << lo_address_errstr(_address) << ")" << endl;
}
}