diff options
author | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2014-07-06 16:04:18 (GMT) |
---|---|---|
committer | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2014-07-06 16:04:18 (GMT) |
commit | 9cc762d85afffea42de3e1d156a6b8838d88a00c (patch) | |
tree | bff170c0493759c7f1bffca2648960b6f43ca139 /src/bindings/swig/csharp/uscxml.i | |
parent | be98a8297b4e10e169290f497e649e803e43d791 (diff) | |
download | uscxml-9cc762d85afffea42de3e1d156a6b8838d88a00c.zip uscxml-9cc762d85afffea42de3e1d156a6b8838d88a00c.tar.gz uscxml-9cc762d85afffea42de3e1d156a6b8838d88a00c.tar.bz2 |
Made Blob into Pimpl to better support language bindings
Diffstat (limited to 'src/bindings/swig/csharp/uscxml.i')
-rw-r--r-- | src/bindings/swig/csharp/uscxml.i | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/bindings/swig/csharp/uscxml.i b/src/bindings/swig/csharp/uscxml.i index bd8c669..7625c8d 100644 --- a/src/bindings/swig/csharp/uscxml.i +++ b/src/bindings/swig/csharp/uscxml.i @@ -13,6 +13,7 @@ %include <boost_shared_ptr.i> // these are needed at least for the templates to work +typedef uscxml::Blob Blob; typedef uscxml::Data Data; typedef uscxml::Event Event; typedef uscxml::InvokeRequest InvokeRequest; @@ -161,11 +162,16 @@ WRAP_TO_STRING(uscxml::InvokeRequest); // byte[] signature for Blob get/setData // see http://permalink.gmane.org/gmane.comp.programming.swig/5804 +%csmethodmodifiers uscxml::Blob::setData(const char* data, size_t length) "private"; +%csmethodmodifiers uscxml::Blob::setMimeType(const std::string& mimeType) "private"; %csmethodmodifiers uscxml::Blob::Blob(const char* data, size_t size, const std::string& mimeType) "private"; +%csmethodmodifiers uscxml::Blob::Blob(const char* data, size_t size) "private"; + %typemap(cscode) uscxml::Blob %{ - public Blob(byte[] data, string mimeType) : this(uscxmlNativeCSharpPINVOKE.new_Blob(data, (uint)data.Length, mimeType), true) { + public Blob(byte[] data, string mimeType) : this(uscxmlNativeCSharpPINVOKE.new_Blob__SWIG_2(data, (uint)data.Length, mimeType), true) { if (uscxmlNativeCSharpPINVOKE.SWIGPendingException.Pending) throw uscxmlNativeCSharpPINVOKE.SWIGPendingException.Retrieve(); } + %} %typemap(imtype, out="System.IntPtr") const char *data "byte[]" @@ -251,6 +257,10 @@ using System.Runtime.InteropServices; %} %typemap(cscode) uscxml::Data %{ + public Data(byte[] data, String mimeType) : this() { + setBinary(new Blob(data, mimeType)); + } + public Data(List<Data> arr) : this() { setArray(arr); } |