summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2014-07-15 20:17:24 (GMT)
committerStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2014-07-15 20:17:24 (GMT)
commit0f02e83609309972f01fb72392fb7f96d98b9e01 (patch)
tree4fbf1ca145af597f5212cef158fded22446819d4 /src
parent445751d34fae13c231fae3db10cbac6468f003d8 (diff)
downloaduscxml-0f02e83609309972f01fb72392fb7f96d98b9e01.zip
uscxml-0f02e83609309972f01fb72392fb7f96d98b9e01.tar.gz
uscxml-0f02e83609309972f01fb72392fb7f96d98b9e01.tar.bz2
More fixes for language bindings
Diffstat (limited to 'src')
-rw-r--r--src/bindings/swig/csharp/uscxml.i4
-rw-r--r--src/bindings/swig/java/uscxml.i9
-rw-r--r--src/bindings/swig/uscxml_ignores.i2
-rw-r--r--src/bindings/swig/wrapped/WrappedInvoker.h8
-rw-r--r--src/uscxml/server/HTTPServer.h4
5 files changed, 23 insertions, 4 deletions
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() {