diff options
Diffstat (limited to 'src/bindings')
-rw-r--r-- | src/bindings/swig/java/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/bindings/swig/php/uscxmlNativePHP.php | 18 |
2 files changed, 19 insertions, 1 deletions
diff --git a/src/bindings/swig/java/CMakeLists.txt b/src/bindings/swig/java/CMakeLists.txt index 2b604f3..fb02b17 100644 --- a/src/bindings/swig/java/CMakeLists.txt +++ b/src/bindings/swig/java/CMakeLists.txt @@ -16,7 +16,7 @@ SET(SCXMLPL_JAVA_PACKAGE "org.uscxml") SET(SCXMLPL_JAVA_DIR "org/uscxml") # we need ; to produce a space with the package .. weird -SET_SOURCE_FILES_PROPERTIES(uscxml.i PROPERTIES SWIG_FLAGS "-package;${SCXMLPL_JAVA_PACKAGE}") +SET_SOURCE_FILES_PROPERTIES(uscxml.i PROPERTIES SWIG_FLAGS "-w473 -package;${SCXMLPL_JAVA_PACKAGE}") SET_SOURCE_FILES_PROPERTIES(uscxml.i PROPERTIES CPLUSPLUS ON) SET(CMAKE_SWIG_OUTDIR "${CMAKE_CURRENT_BINARY_DIR}/${SCXMLPL_JAVA_DIR}") diff --git a/src/bindings/swig/php/uscxmlNativePHP.php b/src/bindings/swig/php/uscxmlNativePHP.php index 4a9c37b..a0c8cd2 100644 --- a/src/bindings/swig/php/uscxmlNativePHP.php +++ b/src/bindings/swig/php/uscxmlNativePHP.php @@ -260,6 +260,24 @@ class Blob { default: $this->_cPtr=new_Blob($size_or_data,$size,$adopt); } } + + function md5() { + return Blob_md5($this->_cPtr); + } + + function base64() { + return Blob_base64($this->_cPtr); + } + + function fromBase64($base64) { + $r=Blob_fromBase64($this->_cPtr,$base64); + if (is_resource($r)) { + $c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3)); + if (class_exists($c)) return new $c($r); + return new Blob($r); + } + return $r; + } } class Data { |