summaryrefslogtreecommitdiffstats
path: root/include/ingen/client
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 /include/ingen/client
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 'include/ingen/client')
-rw-r--r--include/ingen/client/SigClientInterface.hpp10
-rw-r--r--include/ingen/client/ThreadedSigClientInterface.hpp13
2 files changed, 7 insertions, 16 deletions
diff --git a/include/ingen/client/SigClientInterface.hpp b/include/ingen/client/SigClientInterface.hpp
index ae42b169..559d1b15 100644
--- a/include/ingen/client/SigClientInterface.hpp
+++ b/include/ingen/client/SigClientInterface.hpp
@@ -44,8 +44,7 @@ public:
Raul::URI uri() const { return "http://drobilla.net/ns/ingen#internal"; }
- INGEN_SIGNAL(response_ok, void, int32_t)
- INGEN_SIGNAL(response_error, void, int32_t, std::string)
+ INGEN_SIGNAL(response, void, int32_t, Status)
INGEN_SIGNAL(bundle_begin, void)
INGEN_SIGNAL(bundle_end, void)
INGEN_SIGNAL(error, void, std::string)
@@ -78,11 +77,8 @@ protected:
void bundle_end()
{ EMIT(bundle_end); }
- void response_ok(int32_t id)
- { EMIT(response_ok, id); }
-
- void response_error(int32_t id, const std::string& msg)
- { EMIT(response_error, id, msg); }
+ void response(int32_t id, Status status)
+ { EMIT(response, id, status); }
void error(const std::string& msg)
{ EMIT(error, msg); }
diff --git a/include/ingen/client/ThreadedSigClientInterface.hpp b/include/ingen/client/ThreadedSigClientInterface.hpp
index 3de2eaea..6ded560e 100644
--- a/include/ingen/client/ThreadedSigClientInterface.hpp
+++ b/include/ingen/client/ThreadedSigClientInterface.hpp
@@ -53,8 +53,7 @@ class ThreadedSigClientInterface : public SigClientInterface
public:
ThreadedSigClientInterface(uint32_t queue_size)
: _sigs(queue_size)
- , response_ok_slot(_signal_response_ok.make_slot())
- , response_error_slot(_signal_response_error.make_slot())
+ , response_slot(_signal_response.make_slot())
, error_slot(_signal_error.make_slot())
, new_port_slot(_signal_new_port.make_slot())
, put_slot(_signal_put.make_slot())
@@ -77,11 +76,8 @@ public:
void bundle_end()
{ push_sig(bundle_end_slot); }
- void response_ok(int32_t id)
- { push_sig(sigc::bind(response_ok_slot, id)); }
-
- void response_error(int32_t id, const std::string& msg)
- { push_sig(sigc::bind(response_error_slot, id, msg)); }
+ void response(int32_t id, Status status)
+ { push_sig(sigc::bind(response_slot, id, status)); }
void error(const std::string& msg)
{ push_sig(sigc::bind(error_slot, msg)); }
@@ -130,8 +126,7 @@ private:
sigc::slot<void> bundle_begin_slot;
sigc::slot<void> bundle_end_slot;
- sigc::slot<void, int32_t> response_ok_slot;
- sigc::slot<void, int32_t, std::string> response_error_slot;
+ sigc::slot<void, int32_t, Status> response_slot;
sigc::slot<void, std::string> error_slot;
sigc::slot<void, Raul::URI, Raul::URI, Raul::Symbol> new_plugin_slot;
sigc::slot<void, Raul::Path, Raul::URI, uint32_t, bool> new_port_slot;