diff options
author | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2014-08-26 08:54:58 (GMT) |
---|---|---|
committer | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2014-08-26 08:54:58 (GMT) |
commit | d90b15c96271d2afd45d649e3e22030004359d6e (patch) | |
tree | db773868e71fd51fb05e5160e1138bec8087eac9 /src/uscxml/plugins | |
parent | 93802c6eab1f798ccf57e863127aef6e7f9d073c (diff) | |
download | uscxml-d90b15c96271d2afd45d649e3e22030004359d6e.zip uscxml-d90b15c96271d2afd45d649e3e22030004359d6e.tar.gz uscxml-d90b15c96271d2afd45d649e3e22030004359d6e.tar.bz2 |
API changes with receiveEvent
- receiveEvent will deliver to external queue now per default
- switched Interpreter implementations to the new algorithm from spec
Diffstat (limited to 'src/uscxml/plugins')
4 files changed, 6 insertions, 5 deletions
diff --git a/src/uscxml/plugins/EventHandler.h b/src/uscxml/plugins/EventHandler.h index 2b41ae5..8ac31b1 100644 --- a/src/uscxml/plugins/EventHandler.h +++ b/src/uscxml/plugins/EventHandler.h @@ -65,16 +65,17 @@ public: virtual void send(const SendRequest& req) = 0; virtual void runOnMainThread() {}; - void returnEvent(Event& event, bool external = false); void returnErrorExecution(const std::string&); void returnErrorCommunication(const std::string&); + void returnEvent(Event& event, bool internal = false); protected: InterpreterImpl* _interpreter; Arabica::DOM::Element<std::string> _element; std::string _invokeId; std::string _type; - + + }; class USCXML_API EventHandler { diff --git a/src/uscxml/plugins/invoker/heartbeat/HeartbeatInvoker.cpp b/src/uscxml/plugins/invoker/heartbeat/HeartbeatInvoker.cpp index cc06b52..f8b4904 100644 --- a/src/uscxml/plugins/invoker/heartbeat/HeartbeatInvoker.cpp +++ b/src/uscxml/plugins/invoker/heartbeat/HeartbeatInvoker.cpp @@ -98,7 +98,7 @@ void HeartbeatInvoker::invoke(const InvokeRequest& req) { void HeartbeatInvoker::dispatch(void* instance, std::string name) { HeartbeatInvoker* invoker = (HeartbeatInvoker*)instance; - invoker->returnEvent(invoker->_event, true); + invoker->returnEvent(invoker->_event); } HeartbeatDispatcher* HeartbeatDispatcher::_instance = NULL; diff --git a/src/uscxml/plugins/invoker/xhtml/XHTMLInvoker.cpp b/src/uscxml/plugins/invoker/xhtml/XHTMLInvoker.cpp index 861e922..e2b32df 100644 --- a/src/uscxml/plugins/invoker/xhtml/XHTMLInvoker.cpp +++ b/src/uscxml/plugins/invoker/xhtml/XHTMLInvoker.cpp @@ -101,7 +101,7 @@ bool XHTMLInvoker::httpRecvRequest(const HTTPServer::Request& req) { HTTPServer::Reply reply(req); HTTPServer::reply(reply); - returnEvent(ev, true); + returnEvent(ev); return true; } } diff --git a/src/uscxml/plugins/ioprocessor/basichttp/BasicHTTPIOProcessor.cpp b/src/uscxml/plugins/ioprocessor/basichttp/BasicHTTPIOProcessor.cpp index 845e142..cf7c8e7 100644 --- a/src/uscxml/plugins/ioprocessor/basichttp/BasicHTTPIOProcessor.cpp +++ b/src/uscxml/plugins/ioprocessor/basichttp/BasicHTTPIOProcessor.cpp @@ -157,7 +157,7 @@ bool BasicHTTPIOProcessor::httpRecvRequest(const HTTPServer::Request& req) { if (reqEvent.name.length() == 0) reqEvent.name = "http." + req.data.compound.at("type").atom; - returnEvent(reqEvent, true); + returnEvent(reqEvent); evhttp_send_reply(req.evhttpReq, 200, "OK", NULL); return true; } |