diff options
Diffstat (limited to 'src/bindings/swig')
-rw-r--r-- | src/bindings/swig/csharp/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/bindings/swig/uscxml_beautify.i | 22 | ||||
-rw-r--r-- | src/bindings/swig/uscxml_ignores.i | 6 |
3 files changed, 29 insertions, 1 deletions
diff --git a/src/bindings/swig/csharp/CMakeLists.txt b/src/bindings/swig/csharp/CMakeLists.txt index ee37bf7..384507b 100644 --- a/src/bindings/swig/csharp/CMakeLists.txt +++ b/src/bindings/swig/csharp/CMakeLists.txt @@ -78,7 +78,7 @@ if (DMCS_EXECUTABLE OR CSC_EXECUTABLE) COMMENT "Creating umundoCSharp.dll for Mono ...") endif() - add_dependencies(csharp umundoNativeCSharp) + add_dependencies(csharp uscxmlNativeCSharp) if (BUILD_TESTS) add_dependencies(ALL_TESTS csharp) endif() diff --git a/src/bindings/swig/uscxml_beautify.i b/src/bindings/swig/uscxml_beautify.i index bf54958..751be78 100644 --- a/src/bindings/swig/uscxml_beautify.i +++ b/src/bindings/swig/uscxml_beautify.i @@ -114,6 +114,10 @@ }; +%{ + #include <glog/logging.h> +%} + %extend uscxml::Data { std::vector<std::string> getCompoundKeys() { std::vector<std::string> keys; @@ -124,4 +128,22 @@ } return keys; } + + std::string getXML() { + if (!self->node) + return ""; + + std::stringstream ss; + ss << self->node; + return ss.str(); + } + + void setXML(const std::string& xml) { + NameSpacingParser parser = NameSpacingParser::fromXML(xml); + if (!parser.errorsReported()) { + self->node = parser.getDocument(); + } else { + LOG(ERROR) << "Cannot parse message as XML: " << parser.errors(); + } + } }; diff --git a/src/bindings/swig/uscxml_ignores.i b/src/bindings/swig/uscxml_ignores.i index f7d3dad..c8fc372 100644 --- a/src/bindings/swig/uscxml_ignores.i +++ b/src/bindings/swig/uscxml_ignores.i @@ -189,6 +189,12 @@ %ignore uscxml::SendRequest::fromXML; %ignore uscxml::InvokeRequest::fromXML; +// HTTPServer + +%ignore uscxml::HTTPServer::wsSend; +%ignore uscxml::HTTPServer::wsBroadcast; +%ignore uscxml::HTTPServer::reply; + // Data |