diff options
-rw-r--r-- | .travis.yml | 1 | ||||
-rw-r--r-- | embedding/java/src/org/uscxml/tests/TestData.java | 1 | ||||
-rw-r--r-- | src/bindings/swig/csharp/uscxml.i | 4 | ||||
-rw-r--r-- | src/bindings/swig/java/uscxml.i | 9 | ||||
-rw-r--r-- | src/bindings/swig/uscxml_ignores.i | 2 | ||||
-rw-r--r-- | src/bindings/swig/wrapped/WrappedInvoker.h | 8 | ||||
-rw-r--r-- | src/uscxml/server/HTTPServer.h | 4 |
7 files changed, 24 insertions, 5 deletions
diff --git a/.travis.yml b/.travis.yml index 95e2e7d..1e811e9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,5 +11,6 @@ before_install: - sudo apt-get install -qq expect-dev - sudo apt-get install -qq libprotobuf-dev libprotoc-dev - sudo apt-get install -qq swi-prolog + - wget http://uscxml.tk.informatik.tu-darmstadt.de script: mkdir build && cd build && cmake .. && make diff --git a/embedding/java/src/org/uscxml/tests/TestData.java b/embedding/java/src/org/uscxml/tests/TestData.java index d225dec..0a95328 100644 --- a/embedding/java/src/org/uscxml/tests/TestData.java +++ b/embedding/java/src/org/uscxml/tests/TestData.java @@ -1,7 +1,6 @@ package org.uscxml.tests; import org.uscxml.Blob; -import org.uscxml.BlobImpl; import org.uscxml.Data; public class TestData { diff --git a/src/bindings/swig/csharp/uscxml.i b/src/bindings/swig/csharp/uscxml.i index 7625c8d..359f640 100644 --- a/src/bindings/swig/csharp/uscxml.i +++ b/src/bindings/swig/csharp/uscxml.i @@ -56,6 +56,8 @@ typedef uscxml::ExecutableContentImpl ExecutableContentImpl; #include "../../../uscxml/Factory.h" #include "../../../uscxml/Interpreter.h" #include "../../../uscxml/concurrency/BlockingQueue.h" +#include "../../../uscxml/server/HTTPServer.h" +#include "../../../uscxml/debug/DebuggerServlet.h" #include "../wrapped/WrappedInvoker.h" #include "../wrapped/WrappedDataModel.h" @@ -379,6 +381,8 @@ using System.Runtime.InteropServices; %include "../../../uscxml/Message.h" %include "../../../uscxml/Interpreter.h" %include "../../../uscxml/concurrency/BlockingQueue.h" +%include "../../../uscxml/server/HTTPServer.h" +%include "../../../uscxml/debug/DebuggerServlet.h" %include "../../../uscxml/messages/Blob.h" %include "../../../uscxml/messages/Data.h" diff --git a/src/bindings/swig/java/uscxml.i b/src/bindings/swig/java/uscxml.i index 654ea91..688ca6e 100644 --- a/src/bindings/swig/java/uscxml.i +++ b/src/bindings/swig/java/uscxml.i @@ -55,6 +55,8 @@ typedef uscxml::ExecutableContentImpl ExecutableContentImpl; #include "../../../uscxml/Factory.h" #include "../../../uscxml/Interpreter.h" #include "../../../uscxml/concurrency/BlockingQueue.h" +#include "../../../uscxml/server/HTTPServer.h" +#include "../../../uscxml/debug/DebuggerServlet.h" #include "../wrapped/WrappedInvoker.h" #include "../wrapped/WrappedDataModel.h" @@ -210,9 +212,14 @@ import java.util.Map; import java.util.HashMap; import java.util.List; import java.util.LinkedList; +import java.net.URL; %} %typemap(javacode) uscxml::Interpreter %{ + public static Interpreter fromURI(URL uri) throws org.uscxml.InterpreterException { + return Interpreter.fromURI(uri.toString()); + } + public Map<String, NativeIOProcessor> getIOProcessors() { Map<String, NativeIOProcessor> ioProcs = new HashMap<String, NativeIOProcessor>(); StringVector keys = getIOProcessorKeys(); @@ -384,6 +391,8 @@ import java.util.LinkedList; %include "../../../uscxml/Message.h" %include "../../../uscxml/Interpreter.h" %include "../../../uscxml/concurrency/BlockingQueue.h" +%include "../../../uscxml/server/HTTPServer.h" +%include "../../../uscxml/debug/DebuggerServlet.h" %include "../../../uscxml/messages/Blob.h" %include "../../../uscxml/messages/Data.h" diff --git a/src/bindings/swig/uscxml_ignores.i b/src/bindings/swig/uscxml_ignores.i index 24a6ffa..c9df57f 100644 --- a/src/bindings/swig/uscxml_ignores.i +++ b/src/bindings/swig/uscxml_ignores.i @@ -38,7 +38,7 @@ %ignore uscxml::Interpreter::Interpreter(const boost::shared_ptr<InterpreterImpl>); %ignore uscxml::Interpreter::Interpreter(const Interpreter&); %ignore uscxml::Interpreter::getDelayQueue(); -%ignore uscxml::Interpreter::fromURI(const URI&); +%ignore uscxml::Interpreter::fromURI(const URL&); %ignore uscxml::Interpreter::fromDOM; %ignore uscxml::Interpreter::fromClone; %ignore uscxml::Interpreter::start(); diff --git a/src/bindings/swig/wrapped/WrappedInvoker.h b/src/bindings/swig/wrapped/WrappedInvoker.h index 6251c6e..5e0f39e 100644 --- a/src/bindings/swig/wrapped/WrappedInvoker.h +++ b/src/bindings/swig/wrapped/WrappedInvoker.h @@ -52,14 +52,18 @@ public: virtual void invoke(const InvokeRequest& req) {} virtual void uninvoke() {} - virtual WrappedInvoker* create(Interpreter interpreter) { + virtual WrappedInvoker* create(const Interpreter& interpreter) { return new WrappedInvoker(); } virtual boost::shared_ptr<InvokerImpl> create(InterpreterImpl* interpreter) { - return boost::shared_ptr<InvokerImpl>(create(interpreter->shared_from_this())); + _interpreter = interpreter->shared_from_this(); + return boost::shared_ptr<InvokerImpl>(create(_interpreter)); } +private: + Interpreter _interpreter; + }; } diff --git a/src/uscxml/server/HTTPServer.h b/src/uscxml/server/HTTPServer.h index 398bb12..b1816bc 100644 --- a/src/uscxml/server/HTTPServer.h +++ b/src/uscxml/server/HTTPServer.h @@ -134,7 +134,7 @@ private: }; HTTPServer(unsigned short port, unsigned short wsPort, SSLConfig* sslConf = NULL); - ~HTTPServer(); + virtual ~HTTPServer(); void start(); void stop(); @@ -191,6 +191,7 @@ private: class USCXML_API HTTPServlet { public: + virtual ~HTTPServlet() {} virtual bool httpRecvRequest(const HTTPServer::Request& request) = 0; virtual void setURL(const std::string& url) = 0; /// Called by the server with the actual URL virtual bool canAdaptPath() { @@ -200,6 +201,7 @@ public: class USCXML_API WebSocketServlet { public: + virtual ~WebSocketServlet() {} virtual bool wsRecvRequest(struct evws_connection *conn, const HTTPServer::WSFrame& frame) = 0; virtual void setURL(const std::string& url) = 0; /// Called by the server with the actual URL virtual bool canAdaptPath() { |