diff options
Diffstat (limited to 'src/uscxml/plugins')
-rw-r--r-- | src/uscxml/plugins/EventHandler.h | 9 | ||||
-rw-r--r-- | src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp | 7 | ||||
-rw-r--r-- | src/uscxml/plugins/invoker/scxml/USCXMLInvoker.h | 1 |
3 files changed, 15 insertions, 2 deletions
diff --git a/src/uscxml/plugins/EventHandler.h b/src/uscxml/plugins/EventHandler.h index 7b38575..4078cfe 100644 --- a/src/uscxml/plugins/EventHandler.h +++ b/src/uscxml/plugins/EventHandler.h @@ -49,7 +49,10 @@ public: void setType(const std::string& type) { _type = type; } - + std::string getType() { + return _type; + } + void setElement(const Arabica::DOM::Element<std::string>& element) { _element = element; } @@ -101,9 +104,13 @@ public: void setInvokeId(const std::string& invokeId) { _impl->setInvokeId(invokeId); } + void setType(const std::string& type) { _impl->setType(type); } + std::string getType() { + return _impl->getType(); + } void setElement(const Arabica::DOM::Element<std::string>& element) { _impl->setElement(element); diff --git a/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp b/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp index f232e52..9506867 100644 --- a/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp +++ b/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp @@ -40,12 +40,16 @@ USCXMLInvoker::USCXMLInvoker() : _cancelled(false) { USCXMLInvoker::~USCXMLInvoker() { +}; + +void USCXMLInvoker::uninvoke() { _cancelled = true; Event event; event.name = "unblock.and.die"; if (_invokedInterpreter) _invokedInterpreter.receive(event); -}; + +} boost::shared_ptr<InvokerImpl> USCXMLInvoker::create(InterpreterImpl* interpreter) { boost::shared_ptr<USCXMLInvoker> invoker = boost::shared_ptr<USCXMLInvoker>(new USCXMLInvoker()); @@ -67,6 +71,7 @@ void USCXMLInvoker::cancel(const std::string sendId) { } void USCXMLInvoker::invoke(const InvokeRequest& req) { + _cancelled = false; if (req.src.length() > 0) { _invokedInterpreter = Interpreter::fromURI(req.src); } else if (req.dom) { diff --git a/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.h b/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.h index 7d10bf1..f6aa77a 100644 --- a/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.h +++ b/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.h @@ -60,6 +60,7 @@ public: virtual void send(const SendRequest& req); virtual void cancel(const std::string sendId); virtual void invoke(const InvokeRequest& req); + virtual void uninvoke(); protected: bool _cancelled; |