From ea515cec17a4a5fe3cb43a6c2d4360ac413ec613 Mon Sep 17 00:00:00 2001 From: bossiel Date: Thu, 27 May 2010 00:56:24 +0000 Subject: [PATCH] General Update. --- trunk/bindings/_common/PublicationEvent.cxx | 8 +- trunk/bindings/_common/PublicationEvent.h | 1 - trunk/bindings/_common/RegistrationEvent.cxx | 4 +- trunk/bindings/_common/SipMessage.cxx | 34 +- trunk/bindings/_common/SipMessage.h | 6 +- trunk/bindings/csharp/PublicationEvent.cs | 12 +- trunk/bindings/csharp/PublicationSession.cs | 12 +- trunk/bindings/csharp/RegistrationEvent.cs | 12 +- trunk/bindings/csharp/RegistrationSession.cs | 12 +- trunk/bindings/csharp/SafeObject.cs | 12 +- trunk/bindings/csharp/SipCallback.cs | 12 +- trunk/bindings/csharp/SipDebugCallback.cs | 12 +- trunk/bindings/csharp/SipEvent.cs | 12 +- trunk/bindings/csharp/SipMessage.cs | 22 +- trunk/bindings/csharp/SipSession.cs | 12 +- trunk/bindings/csharp/SipStack.cs | 12 +- trunk/bindings/csharp/SipUri.cs | 12 +- trunk/bindings/csharp/SubscriptionEvent.cs | 12 +- trunk/bindings/csharp/SubscriptionSession.cs | 12 +- trunk/bindings/csharp/csharp.i | 9 + trunk/bindings/csharp/test/Program.cs | 61 +- trunk/bindings/csharp/test/test.csproj | 9 + trunk/bindings/csharp/tinyWRAP.cs | 2 +- trunk/bindings/csharp/tinyWRAP.suo | Bin 102912 -> 108544 bytes trunk/bindings/csharp/tinyWRAP.vcproj | 16 + trunk/bindings/csharp/tinyWRAPPINVOKE.cs | 8 +- trunk/bindings/csharp/tinyWRAP_wrap.cxx | 348 +- trunk/bindings/csharp/tinyWRAP_wrap.h | 2 +- trunk/bindings/csharp/tsip_event_type_t.cs | 2 +- .../csharp/tsip_publish_event_type_t.cs | 2 +- .../csharp/tsip_register_event_type_t.cs | 2 +- .../csharp/tsip_subscribe_event_type_t.cs | 2 +- trunk/bindings/java/PublicationEvent.java | 12 +- trunk/bindings/java/PublicationSession.java | 12 +- trunk/bindings/java/RegistrationEvent.java | 12 +- trunk/bindings/java/RegistrationSession.java | 12 +- trunk/bindings/java/SafeObject.java | 12 +- trunk/bindings/java/SipCallback.java | 12 +- trunk/bindings/java/SipDebugCallback.java | 12 +- trunk/bindings/java/SipEvent.java | 12 +- trunk/bindings/java/SipMessage.java | 20 +- trunk/bindings/java/SipSession.java | 12 +- trunk/bindings/java/SipStack.java | 12 +- trunk/bindings/java/SipUri.java | 12 +- trunk/bindings/java/SubscriptionEvent.java | 12 +- trunk/bindings/java/SubscriptionSession.java | 12 +- .../java/android/PublicationEvent.java | 12 +- .../java/android/PublicationSession.java | 12 +- .../java/android/RegistrationEvent.java | 12 +- .../java/android/RegistrationSession.java | 12 +- trunk/bindings/java/android/SafeObject.java | 12 +- trunk/bindings/java/android/SipCallback.java | 12 +- .../java/android/SipDebugCallback.java | 12 +- trunk/bindings/java/android/SipEvent.java | 12 +- trunk/bindings/java/android/SipMessage.java | 20 +- trunk/bindings/java/android/SipSession.java | 12 +- trunk/bindings/java/android/SipStack.java | 12 +- trunk/bindings/java/android/SipUri.java | 12 +- .../java/android/SubscriptionEvent.java | 12 +- .../java/android/SubscriptionSession.java | 12 +- trunk/bindings/java/android/tinyWRAP.java | 2 +- trunk/bindings/java/android/tinyWRAPJNI.java | 4 +- trunk/bindings/java/android/tinyWRAP_wrap.cxx | 59 +- trunk/bindings/java/android/tinyWRAP_wrap.h | 2 +- .../java/android/tsip_event_type_t.java | 2 +- .../android/tsip_publish_event_type_t.java | 2 +- .../android/tsip_register_event_type_t.java | 2 +- .../android/tsip_subscribe_event_type_t.java | 2 +- trunk/bindings/java/java.i | 14 +- trunk/bindings/java/tinyWRAP.java | 2 +- trunk/bindings/java/tinyWRAP.sln | 284 + trunk/bindings/java/tinyWRAP.vcproj | 372 + trunk/bindings/java/tinyWRAPJNI.java | 4 +- trunk/bindings/java/tinyWRAP_wrap.cxx | 657 +- trunk/bindings/java/tinyWRAP_wrap.h | 2 +- trunk/bindings/java/tsip_event_type_t.java | 2 +- .../java/tsip_publish_event_type_t.java | 2 +- .../java/tsip_register_event_type_t.java | 2 +- .../java/tsip_subscribe_event_type_t.java | 2 +- trunk/bindings/perl/tinyWRAP.pm | 4 +- trunk/bindings/perl/tinyWRAP_wrap.cxx | 3459 ++++----- trunk/bindings/python/tinyWRAP.py | 18 +- trunk/bindings/python/tinyWRAP_wrap.cxx | 6678 +++++++++-------- trunk/bindings/python/tinyWRAP_wrap.h | 2 +- trunk/bindings/vs_2005/csharp/test/Form1.cs | 4 +- trunk/tinySIP/include/tinysip/tsip_message.h | 13 +- 86 files changed, 6774 insertions(+), 5868 deletions(-) create mode 100644 trunk/bindings/java/tinyWRAP.sln create mode 100644 trunk/bindings/java/tinyWRAP.vcproj diff --git a/trunk/bindings/_common/PublicationEvent.cxx b/trunk/bindings/_common/PublicationEvent.cxx index 7e9505a8..9478aaf8 100644 --- a/trunk/bindings/_common/PublicationEvent.cxx +++ b/trunk/bindings/_common/PublicationEvent.cxx @@ -25,12 +25,12 @@ #include "Common.h" PublicationEvent::PublicationEvent() -:SipEvent(sipevent) +:SipEvent(tsk_null) { } -PublicationEvent::PublicationEvent(const tsip_event_t *sipevent) -:SipEvent(sipevent) +PublicationEvent::PublicationEvent(const tsip_event_t *_sipevent) +:SipEvent(_sipevent) { } @@ -46,4 +46,4 @@ tsip_publish_event_type_t PublicationEvent::getType() const const PublicationSession* PublicationEvent::getSession() const { return dyn_cast(this->getBaseSession()); -} +} \ No newline at end of file diff --git a/trunk/bindings/_common/PublicationEvent.h b/trunk/bindings/_common/PublicationEvent.h index cb63deba..f45533e4 100644 --- a/trunk/bindings/_common/PublicationEvent.h +++ b/trunk/bindings/_common/PublicationEvent.h @@ -38,7 +38,6 @@ public: public: /* Public API functions */ tsip_publish_event_type_t getType() const; const PublicationSession* getSession() const; - }; #endif /* TINYWRAP_PUBLICATIONEVENT_H */ diff --git a/trunk/bindings/_common/RegistrationEvent.cxx b/trunk/bindings/_common/RegistrationEvent.cxx index b0da3700..7f45a916 100644 --- a/trunk/bindings/_common/RegistrationEvent.cxx +++ b/trunk/bindings/_common/RegistrationEvent.cxx @@ -29,8 +29,8 @@ RegistrationEvent::RegistrationEvent() { } -RegistrationEvent::RegistrationEvent(const tsip_event_t *sipevent) -:SipEvent(sipevent) +RegistrationEvent::RegistrationEvent(const tsip_event_t *_sipevent) +:SipEvent(_sipevent) { } diff --git a/trunk/bindings/_common/SipMessage.cxx b/trunk/bindings/_common/SipMessage.cxx index 17ba6e2f..a2442ce5 100644 --- a/trunk/bindings/_common/SipMessage.cxx +++ b/trunk/bindings/_common/SipMessage.cxx @@ -36,16 +36,6 @@ SipMessage::~SipMessage() } -const void* SipMessage::getSipContent() const -{ - if(this->sipmessage){ - return TSIP_MESSAGE_CONTENT_DATA(this->sipmessage); - } - else{ - return tsk_null; - } -} - const tsip_header_t* SipMessage::getSipHeader(const char* name, unsigned index /* =0 */) { /* Do not worry about calling tsk_striequals() several times because the function @@ -144,3 +134,27 @@ const char* SipMessage::getSipHeaderParamValue(const char* name, const char* par } return tsk_null; } + +/** Returns the content length. +*/ +unsigned SipMessage::getSipContentLength() +{ + return TSIP_MESSAGE_CONTENT_DATA_LENGTH(this->sipmessage); +} + +/** Gets the message content +* @param output A pointer to the output buffer where to copy the data. MUST +* be allocated by the caller. +* @param maxsize The maximum number of octets to copy. Should be less than the size of the +* @a output buffer. You can use @a getSipContentLength() to get the right value to use. +* @retval The number of octet copied in the @a output buffer. +*/ +unsigned SipMessage::getSipContent(void* output, unsigned maxsize) +{ + unsigned retsize = 0; + if(output && maxsize && TSIP_MESSAGE_HAS_CONTENT(this->sipmessage)){ + retsize = (this->sipmessage->Content->size > maxsize) ? maxsize : this->sipmessage->Content->size; + memcpy(output, this->sipmessage->Content->data, retsize); + } + return retsize; +} diff --git a/trunk/bindings/_common/SipMessage.h b/trunk/bindings/_common/SipMessage.h index 6ffbcac7..b68ae01b 100644 --- a/trunk/bindings/_common/SipMessage.h +++ b/trunk/bindings/_common/SipMessage.h @@ -32,14 +32,12 @@ public: SipMessage(const tsip_message_t *sipmessage); #endif virtual ~SipMessage(); - -#if !defined(SWIG) - const void* getSipContent() const; -#endif //%newobject getHeaderValueAt; char* getSipHeaderValue(const char* name, unsigned index = 0); const char* getSipHeaderParamValue(const char* name, const char* param, unsigned index = 0); + unsigned getSipContentLength(); + unsigned getSipContent(void* output, unsigned maxsize); private: const tsip_header_t* getSipHeader(const char* name, unsigned index = 0); diff --git a/trunk/bindings/csharp/PublicationEvent.cs b/trunk/bindings/csharp/PublicationEvent.cs index 87f414bc..599d5d4f 100644 --- a/trunk/bindings/csharp/PublicationEvent.cs +++ b/trunk/bindings/csharp/PublicationEvent.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -27,13 +27,11 @@ public class PublicationEvent : SipEvent { public override void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_PublicationEvent(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_PublicationEvent(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); base.Dispose(); } diff --git a/trunk/bindings/csharp/PublicationSession.cs b/trunk/bindings/csharp/PublicationSession.cs index d13a7d83..16f51f1f 100644 --- a/trunk/bindings/csharp/PublicationSession.cs +++ b/trunk/bindings/csharp/PublicationSession.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -27,13 +27,11 @@ public class PublicationSession : SipSession { public override void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_PublicationSession(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_PublicationSession(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); base.Dispose(); } diff --git a/trunk/bindings/csharp/RegistrationEvent.cs b/trunk/bindings/csharp/RegistrationEvent.cs index 9dda40cf..7bbca8a8 100644 --- a/trunk/bindings/csharp/RegistrationEvent.cs +++ b/trunk/bindings/csharp/RegistrationEvent.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -27,13 +27,11 @@ public class RegistrationEvent : SipEvent { public override void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_RegistrationEvent(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_RegistrationEvent(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); base.Dispose(); } diff --git a/trunk/bindings/csharp/RegistrationSession.cs b/trunk/bindings/csharp/RegistrationSession.cs index 712f1ded..a4bb38a4 100644 --- a/trunk/bindings/csharp/RegistrationSession.cs +++ b/trunk/bindings/csharp/RegistrationSession.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -27,13 +27,11 @@ public class RegistrationSession : SipSession { public override void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_RegistrationSession(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_RegistrationSession(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); base.Dispose(); } diff --git a/trunk/bindings/csharp/SafeObject.cs b/trunk/bindings/csharp/SafeObject.cs index 1995294d..faffa622 100644 --- a/trunk/bindings/csharp/SafeObject.cs +++ b/trunk/bindings/csharp/SafeObject.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -29,13 +29,11 @@ public class SafeObject : IDisposable { public virtual void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_SafeObject(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_SafeObject(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); } } diff --git a/trunk/bindings/csharp/SipCallback.cs b/trunk/bindings/csharp/SipCallback.cs index c6c2dfa3..034caab8 100644 --- a/trunk/bindings/csharp/SipCallback.cs +++ b/trunk/bindings/csharp/SipCallback.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -29,13 +29,11 @@ public class SipCallback : IDisposable { public virtual void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_SipCallback(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_SipCallback(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); } } diff --git a/trunk/bindings/csharp/SipDebugCallback.cs b/trunk/bindings/csharp/SipDebugCallback.cs index f1201ba0..79f22348 100644 --- a/trunk/bindings/csharp/SipDebugCallback.cs +++ b/trunk/bindings/csharp/SipDebugCallback.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -29,13 +29,11 @@ public class SipDebugCallback : IDisposable { public virtual void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_SipDebugCallback(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_SipDebugCallback(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); } } diff --git a/trunk/bindings/csharp/SipEvent.cs b/trunk/bindings/csharp/SipEvent.cs index 23c754c1..40288b3b 100644 --- a/trunk/bindings/csharp/SipEvent.cs +++ b/trunk/bindings/csharp/SipEvent.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -29,13 +29,11 @@ public class SipEvent : IDisposable { public virtual void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_SipEvent(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_SipEvent(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); } } diff --git a/trunk/bindings/csharp/SipMessage.cs b/trunk/bindings/csharp/SipMessage.cs index 5cf840ea..7cbfa47b 100644 --- a/trunk/bindings/csharp/SipMessage.cs +++ b/trunk/bindings/csharp/SipMessage.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -29,13 +29,11 @@ public class SipMessage : IDisposable { public virtual void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_SipMessage(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_SipMessage(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); } } @@ -63,4 +61,14 @@ public class SipMessage : IDisposable { return ret; } + public uint getSipContentLength() { + uint ret = tinyWRAPPINVOKE.SipMessage_getSipContentLength(swigCPtr); + return ret; + } + + public uint getSipContent(byte[] output, uint maxsize) { + uint ret = tinyWRAPPINVOKE.SipMessage_getSipContent(swigCPtr, output, maxsize); + return ret; + } + } diff --git a/trunk/bindings/csharp/SipSession.cs b/trunk/bindings/csharp/SipSession.cs index 568dfe9e..0d5e3015 100644 --- a/trunk/bindings/csharp/SipSession.cs +++ b/trunk/bindings/csharp/SipSession.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -29,13 +29,11 @@ public class SipSession : IDisposable { public virtual void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_SipSession(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_SipSession(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); } } diff --git a/trunk/bindings/csharp/SipStack.cs b/trunk/bindings/csharp/SipStack.cs index ca6548ea..3242aa7c 100644 --- a/trunk/bindings/csharp/SipStack.cs +++ b/trunk/bindings/csharp/SipStack.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -27,13 +27,11 @@ public class SipStack : SafeObject { public override void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_SipStack(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_SipStack(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); base.Dispose(); } diff --git a/trunk/bindings/csharp/SipUri.cs b/trunk/bindings/csharp/SipUri.cs index f37c07cb..7a9dbb27 100644 --- a/trunk/bindings/csharp/SipUri.cs +++ b/trunk/bindings/csharp/SipUri.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -29,13 +29,11 @@ public class SipUri : IDisposable { public virtual void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_SipUri(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_SipUri(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); } } diff --git a/trunk/bindings/csharp/SubscriptionEvent.cs b/trunk/bindings/csharp/SubscriptionEvent.cs index c3487ca6..404002b8 100644 --- a/trunk/bindings/csharp/SubscriptionEvent.cs +++ b/trunk/bindings/csharp/SubscriptionEvent.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -27,13 +27,11 @@ public class SubscriptionEvent : SipEvent { public override void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_SubscriptionEvent(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_SubscriptionEvent(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); base.Dispose(); } diff --git a/trunk/bindings/csharp/SubscriptionSession.cs b/trunk/bindings/csharp/SubscriptionSession.cs index dcee4543..4a31124a 100644 --- a/trunk/bindings/csharp/SubscriptionSession.cs +++ b/trunk/bindings/csharp/SubscriptionSession.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -27,13 +27,11 @@ public class SubscriptionSession : SipSession { public override void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_SubscriptionSession(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_SubscriptionSession(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); base.Dispose(); } diff --git a/trunk/bindings/csharp/csharp.i b/trunk/bindings/csharp/csharp.i index dc4afc7a..5217b09a 100644 --- a/trunk/bindings/csharp/csharp.i +++ b/trunk/bindings/csharp/csharp.i @@ -3,6 +3,15 @@ */ +%define %cs_marshal_array(TYPE, CSTYPE) +%typemap(ctype) TYPE[] "void*" +%typemap(imtype, +inattributes="[MarshalAs(UnmanagedType.LPArray)]") TYPE[] "CSTYPE[]" +%typemap(cstype) TYPE[] "CSTYPE[]" +%typemap(in) TYPE[] %{ $1 = (TYPE*)$input; %} +%typemap(csin) TYPE[] "$csinput" +%enddef + // Mapping void* as byte[] %typemap(ctype) void * "void *" %typemap(imtype) void * "byte[]" diff --git a/trunk/bindings/csharp/test/Program.cs b/trunk/bindings/csharp/test/Program.cs index b0dfde95..72b29374 100644 --- a/trunk/bindings/csharp/test/Program.cs +++ b/trunk/bindings/csharp/test/Program.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; +using System.Threading; namespace test { @@ -25,9 +26,12 @@ namespace test { Boolean success; + String s = "mamadou"; + byte[] b = Encoding.UTF8.GetBytes(s); + /* Create callbacks */ sipCallback = new MySipCallback(); - sipDebugCallback = new MySipDebugCallback(); + //sipDebugCallback = new MySipDebugCallback(); /* Create and configure the IMS/LTE stack */ sipStack = new SipStack(sipCallback, String.Format("sip:{0}", REALM), String.Format("{0}@{1}", USER, REALM), String.Format("sip:{0}@{1}", USER, REALM)); @@ -53,6 +57,8 @@ namespace test regSession.setExpires(35); regSession.Register(); + Thread.Sleep(2000); + /* Send SUBSCRIBE(reg) */ subSession = new SubscriptionSession(sipStack); subSession.addHeader("Event", "reg"); @@ -60,13 +66,7 @@ namespace test subSession.addHeader("Allow-Events", "refer, presence, presence.winfo, xcap-diff, conference"); subSession.setExpires(35); - //while (true){ - // byte[] bytes = Encoding.UTF8.GetBytes("Salut comment tu vas?"); - //subSession.setPayload(bytes, (uint)bytes.Length); - //} - - - //subSession.Subscribe(); + subSession.Subscribe(); Console.Read(); @@ -165,7 +165,16 @@ namespace test { case tsip_subscribe_event_type_t.tsip_ao_subscribe: case tsip_subscribe_event_type_t.tsip_ao_unsubscribe: + break; + case tsip_subscribe_event_type_t.tsip_i_notify: + uint content_len = message.getSipContentLength(); + if (content_len>0) + { + byte[] content = new byte[content_len]; + uint read = message.getSipContent(content, (uint)content.Length); + Console.WriteLine("Notify Content ==> {0}", Encoding.UTF8.GetString(content, 0, (int)read)); + } break; } @@ -174,5 +183,41 @@ namespace test return 0; } + + + const String PUBLISH_PAYLOAD = "" + +"" + + "" + + "" + + "open" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "http://doubango.org" + + "Come share with me RCS Experience" + + "" + + "" + + "" + + "open" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "urn:uuid:3ca50bcb-7a67-44f1-afd0-994a55f930f4" + + "" + +""; } } diff --git a/trunk/bindings/csharp/test/test.csproj b/trunk/bindings/csharp/test/test.csproj index e95fe7b7..5bbb8efd 100644 --- a/trunk/bindings/csharp/test/test.csproj +++ b/trunk/bindings/csharp/test/test.csproj @@ -45,6 +45,12 @@ + + PublicationEvent.cs + + + PublicationSession.cs + RegistrationEvent.cs @@ -87,6 +93,9 @@ tsip_event_type_t.cs + + tsip_publish_event_type_t.cs + tsip_register_event_type_t.cs diff --git a/trunk/bindings/csharp/tinyWRAP.cs b/trunk/bindings/csharp/tinyWRAP.cs index 65203ad0..b8ef1af9 100644 --- a/trunk/bindings/csharp/tinyWRAP.cs +++ b/trunk/bindings/csharp/tinyWRAP.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/trunk/bindings/csharp/tinyWRAP.suo b/trunk/bindings/csharp/tinyWRAP.suo index 41d078d0a222ad1bff1e1d8f23ee99611f75776e..ea1d3f4d301b2dc4af4b578a4aae689755310abb 100644 GIT binary patch delta 5627 zcmbVQ2~?9;7XEKYLfAtHk=?KqP{Jw#f?(JLl~quYq7{X@p+pR;6%xeOTCBiTpB-DO zmSdOcRL6M4)}^6!demBqPS3PDoeu5TcG}aaZ3j5)?+xQwSoA&`q-isIep2!gPbFqbfokVA;WXd7=>h`Bal;ty$zPuTqE z^vj?A;Cu4|*w9$}CN_yLNPa_)683osOvWg&BN}94Q-eeau3;iU7#KHGFUD*a z4eA~8r68p#GV43jkVAn;A|{!mRfc+Jn&&_=KdTJ<@rHArWsei|;%#4Sa+xb3odtXA z9H}b}{|k7=$qTh%nkiDjT>w(lgT(%XNrVr68>_fJ{QU@*8)(c3Y0SS6+-NORvpfLE zgyo%KsB_hTfG@bN#CAoTsZ_BBx|Dk8#9F0A3mj4oNXRB5O6&Fx?zGld+yZ2?A8V)J zcWz3&tWu&C;91FRa*{e=6&j)`Pnae|k_UAe$5op;#X8#}Wg<^QgzW zA}IvZTqo<&IOJ6z*+(K5t4Nwi!@Oi{@@|44(+%$yk=-LCkr4#ExxwGm?YB^3$Cu&8 z6V9)ZELE^bd@z#_+zvi zTM!6AxUD1v|5@VgNsHX!i%=RT5GGrEp-|JK8{xLQP~H%M@;W(F+k;qUq<3#|kI54L z1uSM3_~7%&_Lx^9m#v~#XFfP`6V+A9a9^^v-1)N1wOyI~t!)HJKC5 zw&=V#h6lG0wIZ>spr(3F}l4n*1MxPq0pZf=L&umyc}@1s~>fvp=74%UcJRIS2+4N;OvI^r(YR|G9gy987cZq*tDpLq@i zLane|s1jBSD_DLN_`*~8SnXEq+8JQiPLt?xf-`m=;M%D1vz>DEnI@AslC%opP$lm7 zmw|$9c7b(}OiJgoi=LpcSx#X%YXR(#7-%BxGiM1d9a7<2d!kTYuf{5-!q`(9%aS?g z6|f3BpIe6+_57Fttlth)*zuegwSyh-7#`@E$Fe;k0@h&*dl70(Bb$sMs#v|p9a7M| zx!8^pOUOzqN{_?N{zdq0vr2l-RTbxc)6~(NV1sM6=1n}KHT!#ma-h-}Kd!!yw5@%bAlzvvQrrnM)|g!Zu&iwQb!t_)dBa1mNd& z`RMpZIV{7&Z=|vmPjE!_z7Fm`b|eRau_{9a70l=Y<=mGrYs`lz@3F_F-S%T9!2ZoD zn7jKl9EL=bvAqTGmF+WeX4h;MlL-lE=yk^To)5sw-EB~TeUE428{I)rH)>{u#V0xA zX}})4U-ZMCo+j3o1M_jvpv3MT>8J}hPw)u}9P||fu)l^7eaP!P@YB7a_#K^QDR)0V zKq&gPI^)10Y1g6kc=Y9F&|~W2M=2e>AdGw;kA95`^m*B5^cb{S^BqlT$NK#AG{ zHKbzrE7e?6pLus%lH&ep?5v)QU!>2K@Z6q;$#GjjPG()f%n8tdgLPuOR@;V(hGrI< z2|R$TEC;q^&9!LodE)5)29c6iF*VOjx(AHjvHhT$vQ%j@A9MsKp2M~Drh!n8rx$s< zHIL5YZ*&4DkLh^2aWfV-R-xhN*%;LrgxVVmVYS6?eD8rxQ-Q)esSwX>Rg?auc)Do` z%`e8hXB+5Vfbv`q@WP!t>#e?R*y%+k?eoZGc_pBL$H%3*J<7sVAj9g8q@%B8i=fO} z15EnY^TAG7OgeGxIAc4=i0*ierwd>0Sb&Ca^pK59I=A4_H*`c0eICg;d_&rGBwY%N zXj198)sD2=xHSr8LX9Qh8-)nUf1c7~q;fTdVt4;cF$7xA%A+Lqm>SBcXii7-VGXRo z)RdJLPie65*rQ!14KVvw4phluF+FjDqI_Nq&ae_U9B(96(NJjFA3Pz(v|X{d=D7VW zQ=s1|6*D_PD=Z>&T!99Yv5TVK{7fi@o+&+QPPg(jgFbgwrqbO zs8QP=%&vNX-%Hx_64p8sQrK`TDB0y$h-e{t5O{SYbB(Jqg23Aoe*(X5S06#(W$|8e zPI_EEaUEWaqwXQ+^E8~UKQzvAq37{?@CG7|!1Wq0m(!S+-H1Eo$Twy=<0Z={Ldn!#*$2p)n~Jj~Jctlc$ul=0{h~wRqD{dF)X1 z7_Jy>Mn(ke+>q>AF07z>89{#==$|0m&En6X_Rp;n1HG#uJ!TyIR3$2pK=Zj2llCXE zTzraNFbdYTAf9W-X>^j%OXw%ONqCEJj=wE-XTB8v7wkWqy@2k z0btw_z>%BfC-vbJEj#=Zyv1E;{O4R)NZcxdQ|*}{%bg$$A8Q5vqZ zW?Zjc10RXtiE)BRXczO)6nHPICXB@aX2@e@>xoS^5zr7Hx~CAdw!D?qk)=C|z!wKq zQr_>7({z-=)xsJ+pi3^S5-Npqp#n!XyW8-N^O7v}-c?(op!us1JUkD@5#=0IMe$gn z9k=0!-T64!?1*~{LtzTKG!#+`;lWC)z!@Vls9|M~g+e(LVCrxtt4jg-AuWj5J5#6} z>sqJM3a;Fej3~qduhos#^b+EL6;?{fl3a=`H43=!;l45wp zW%u{cEJ_r5i8{`Km@>>#LYV$>Xh%b=8seCLGz3ca(vk{mj7s!W5ZkaZHUws{1LY9H zKkcL~G^ZVU|FaUZfKAJU_;LM63HoQbO?2TT)>!}xS=MTBjfxRj=#!QZ5`LE?;dg$i zU$;D4$G4<{;Kj5>l*uhyXJF2GIh$4ixlFzu>?m*C1%qvwjXmeI(M7RyeIWLKuAmmn z(!=QLz3@aw6b}9@?fqmPF_MOJ`ck2AD=8toVX;{W5O@Ej(6!f8(73T z$iX>Rf5w?t*;LI`&>&1Hr&_ z6(Hwkb7VQI!SP|0i)9_zaFRm$(uPScl|mg6%z8m@sTdpgWJ3}AvH)D}r)g6*%!h>g zYkHSO<6sjN$Ta%Dj^^G3R+dXmR8LO|5wJ6w+d?T@L&q9b8M~MZ_SpP!ilmYIi}f`? zJUiYAGkeXAu+0{HtpVMuH^N1GT+YJ^$)Aclg))P(;c**9Re3rm7`aJ@d$q4Td z_&i?8#$>#XaT%{+T*h09J_6;9rKWKiCu&{=`SagK@BAbCdJg^J6aPCZ%=6;gmMFKCe;_Jqu#? z`v!`v9Yrt=TXrW|S)IMT7E-NIBBB1nT}YN*5RFeRzS)FKV0ndLVn^a2hP}HMlC2Be z3bXq}gyn}AH7AB)0TlmV#1K4647-asxfDOJ%9J%9^U9>SQ)OHBbpbftKbu5sX+C(e ztRiUS)|<$3o_AXD)`}0CYjKubn{xXzbOjZ2J@w|*lye&?^ET4ITO;1F@%&r%uzSQ< z_ITvpd)zC(PtJLG;*J_+wE8L2ar&YE;996c#2WaQEuU6j0w~J4`;DH-T(jq delta 4205 zcmbVP3sjTm8UEite?qtzV+`SHjDaEoLQtmG3nW~u7p_9RwCF$qsYPxEg~%nKMUS%- zcrl-~^9IOf+gT)*bk??Eb)9vUqIRu4^*G#V*KTvIdT{GjD|`PSsXfPbJNt5;{NML} z_xJu;hh)}nS??Jh+VBm2I?Tt<__@-R9LKH0X&!z!Pojo7m?nu7?v0L)Vy)!Xgy8^T z^WF0xp)uAoXc5j!_fu8MuCIovXb^nRDi`e4QZ-BpC3*uvoGM}+9+Z7FwotXlJVDQM z9G>z>h7auj@(2P?YH|t!;Izcac7x|+kby{(yO)-Un}!K!@k$4on~Eb|IpFbK)9jsr zNxqBve3E%7?K2_Yb5o*|&doac>p zqyG+G#)Z-R3GP*KBrp@tUW=6ywQ@dMf-LZe{Z3E=?=6m#6R6;5#Z>zt?MkWVT57qD zfbZ{Hj`t1)+Si8;%UnDX`DBV*fUm7iYL7ZAuceXVolyBrIF3Y-fQaAmL^MuD%gkkX zHrrqyndt-Uk9v57?FoUPE@KRjZ$+BW8L2_TTu+=DGYyTg4R+%!rvQblO%Idta%?KQ z?hjL86U&T)@VqKoaSuU9xbRY(>Z^NSjskF8CUJZ#$)KF8zF@CU*z!iR*92v-On^PH6Xj4D{XDk}ERRQa6n1>rA* zzY_jNxIy?k;Y-3-gqsAH?`X?k(7xJ=bLPfiZDcYQ&J99q;w)%J@K5NnuJLBq^$mYa zpEsj3sl=n0#59|1@`w$xaOkyYNW_x|cQNNYsK(xd0(SJLV(K?a$i|b$V$f>w$GpR# zcxm4fvL7uPAG5#$Z0jMlukpg&cNExrOu(Dnn{a1$37Ksa9bb>>DdA}C7I5d`T90y4 zYL5E}%~^||np4rx9EL4DGCXyxSXxBtGv7YCy%7*%w5VI7<8uqqS(oD(I+^1hOUzE1 zgZYga*plUiH|o_gokq25?Ol6o{X7W)&8szvqyIZ2iz5SN@`aeUJuYr^`I9q21$AS*FA9oyg zx>tqqCp4I|EsEG4j3Fso-`uUB4AU^CYLOI zE-N7qvrdSLrAI|_80gu=6j+Yh=h~rwHBN+lQN^&nRpwGTCCR5GS%Z8>5w2)Efqln} zE=~>BX)xl7hHjE59?}Q%mI~4|x^)3UQ3_k^MHhY?7tP)Q6Uf^>1zT~zKdJ9XHLspV zywQ!D3K?Sv)p2j9P91fh7){?8!WM$v+35qb%~Y!*R1>xlL@TSIuZ6IkP)lea)Dy(M zeLTmk`yhxor^aZT3{vqGTiJJ9vf5^m_)LXKxZe_vHyA~j`+^O$xmYbFC(IS2X<;@R z3YB+tC;l*+D9XdHdxwCywdTAP`$)lqAZm=j+HGidg&%P-5!ya%O!LilKt6 zEe4%E!8m*%_`X>5*m^(?t*mi3Y-XiDgHY)X+HSpl^!QR9R=J~_-TZO}#~(`Y6-^eln6#ucCy$v(P#WBHN)5T=s)~WHM$;kG z?Y&7Zw`=a*E5Y_tIqlbTU@hJ%H{p>+Ek-}*gT1fHNni3%*}oHwh2>C-S&kYUAxh_& z<}u?bpCoj?CLmv?#X*w_;z+$SFttd9&2LmQYXLZ=&(I;ON${~)|5g(oc{We9#dWq_ z;OuiI0lqyz0bt;M02p{rhWzb#n=cso%JMGbyHdP+E({x2tNrq;%w-!3#T$!a5g|tL zO=G^mq@B`5EgypT4Ir2Ze6~CUbogSOhR=_77=6Ji@yOkMfw`4sW#;J3Pg4&kTUc6EQX*c5ihE!!>i|X%ozekmb?p;OxXix7~cSitfdKVdq-2esHPvsrL%?<$UsA>7ke=t zbnG9~;nVx!ClrU4g|VR-AfR<|t;9f=Y>>l~6z%E~>L3gkW$loPxot6J!i(BZY8~1L z2;-$s5NWg9>Kx`M_<)Bg4-jHtui!nF4i!?O6HXcw60Rft5*PCzj2BT~zh0k}@Q%mj zNv+wOGoyd#{7Yd`^o*w+6@j}dtMlYbN& zTur16r0=WPW;1A5Ycjo7R4GsnxeO+f5EPe`kS}t$4*P7bIKvdnA#^;*U`wZ`9mm$KumXN$08?~9AiJ7MxsW?t4_;S60e%})$A;2K zrp9}m4Q+}Jt;mo|HtfGt3qP9+WB4m;5{C_h} zapxlD%mAaU6WW-x8=mle=rmRx2S&yBEt{S00K0>(mH=$H9IOs!HW-x%WmAb&YPRth zq&dhxo&%WZRw!mJg1xx9E}Wht!E(`p#6s^6gZq6#PVD;~20`dA1{1K0X7KwFHacci z!ZOhQuwIcH;vEOJKo~GnC+Ni_gB_}dXy6K8fZB^V369qJN+_Abfo;!F{9OOgY)Hd$>LJ*1Xa}qp*xnY + + + + @@ -247,6 +255,14 @@ RelativePath="..\_common\MessagingEvent.h" > + + + + diff --git a/trunk/bindings/csharp/tinyWRAPPINVOKE.cs b/trunk/bindings/csharp/tinyWRAPPINVOKE.cs index f11c4401..ac664999 100644 --- a/trunk/bindings/csharp/tinyWRAPPINVOKE.cs +++ b/trunk/bindings/csharp/tinyWRAPPINVOKE.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -214,6 +214,12 @@ class tinyWRAPPINVOKE { [DllImport("tinyWRAP", EntryPoint="CSharp_SipMessage_getSipHeaderParamValue__SWIG_1")] public static extern string SipMessage_getSipHeaderParamValue__SWIG_1(HandleRef jarg1, string jarg2, string jarg3); + [DllImport("tinyWRAP", EntryPoint="CSharp_SipMessage_getSipContentLength")] + public static extern uint SipMessage_getSipContentLength(HandleRef jarg1); + + [DllImport("tinyWRAP", EntryPoint="CSharp_SipMessage_getSipContent")] + public static extern uint SipMessage_getSipContent(HandleRef jarg1, byte[] jarg2, uint jarg3); + [DllImport("tinyWRAP", EntryPoint="CSharp_new_SipEvent")] public static extern IntPtr new_SipEvent(); diff --git a/trunk/bindings/csharp/tinyWRAP_wrap.cxx b/trunk/bindings/csharp/tinyWRAP_wrap.cxx index 5865f10d..83d34043 100644 --- a/trunk/bindings/csharp/tinyWRAP_wrap.cxx +++ b/trunk/bindings/csharp/tinyWRAP_wrap.cxx @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make @@ -35,114 +35,114 @@ template T SwigValueInit() { } #endif -/* ----------------------------------------------------------------------------- - * This section contains generic SWIG labels for method/variable - * declarations/attributes, and other compiler dependent labels. - * ----------------------------------------------------------------------------- */ - -/* template workaround for compilers that cannot correctly implement the C++ standard */ -#ifndef SWIGTEMPLATEDISAMBIGUATOR -# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) -# define SWIGTEMPLATEDISAMBIGUATOR template -# elif defined(__HP_aCC) -/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ -/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ -# define SWIGTEMPLATEDISAMBIGUATOR template -# else -# define SWIGTEMPLATEDISAMBIGUATOR -# endif -#endif - -/* inline attribute */ -#ifndef SWIGINLINE -# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) -# define SWIGINLINE inline -# else -# define SWIGINLINE -# endif -#endif - -/* attribute recognised by some compilers to avoid 'unused' warnings */ -#ifndef SWIGUNUSED -# if defined(__GNUC__) -# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) -# define SWIGUNUSED __attribute__ ((__unused__)) -# else -# define SWIGUNUSED -# endif -# elif defined(__ICC) -# define SWIGUNUSED __attribute__ ((__unused__)) -# else -# define SWIGUNUSED -# endif -#endif - -#ifndef SWIG_MSC_UNSUPPRESS_4505 -# if defined(_MSC_VER) -# pragma warning(disable : 4505) /* unreferenced local function has been removed */ -# endif -#endif - -#ifndef SWIGUNUSEDPARM -# ifdef __cplusplus -# define SWIGUNUSEDPARM(p) -# else -# define SWIGUNUSEDPARM(p) p SWIGUNUSED -# endif -#endif - -/* internal SWIG method */ -#ifndef SWIGINTERN -# define SWIGINTERN static SWIGUNUSED -#endif - -/* internal inline SWIG method */ -#ifndef SWIGINTERNINLINE -# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE -#endif - -/* exporting methods */ -#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) -# ifndef GCC_HASCLASSVISIBILITY -# define GCC_HASCLASSVISIBILITY -# endif -#endif - -#ifndef SWIGEXPORT -# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) -# if defined(STATIC_LINKED) -# define SWIGEXPORT -# else -# define SWIGEXPORT __declspec(dllexport) -# endif -# else -# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) -# define SWIGEXPORT __attribute__ ((visibility("default"))) -# else -# define SWIGEXPORT -# endif -# endif -#endif - -/* calling conventions for Windows */ -#ifndef SWIGSTDCALL -# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) -# define SWIGSTDCALL __stdcall -# else -# define SWIGSTDCALL -# endif -#endif - -/* Deal with Microsoft's attempt at deprecating C standard runtime functions */ -#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) -# define _CRT_SECURE_NO_DEPRECATE -#endif - -/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ -#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) -# define _SCL_SECURE_NO_DEPRECATE -#endif - +/* ----------------------------------------------------------------------------- + * This section contains generic SWIG labels for method/variable + * declarations/attributes, and other compiler dependent labels. + * ----------------------------------------------------------------------------- */ + +/* template workaround for compilers that cannot correctly implement the C++ standard */ +#ifndef SWIGTEMPLATEDISAMBIGUATOR +# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) +# define SWIGTEMPLATEDISAMBIGUATOR template +# elif defined(__HP_aCC) +/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ +/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ +# define SWIGTEMPLATEDISAMBIGUATOR template +# else +# define SWIGTEMPLATEDISAMBIGUATOR +# endif +#endif + +/* inline attribute */ +#ifndef SWIGINLINE +# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) +# define SWIGINLINE inline +# else +# define SWIGINLINE +# endif +#endif + +/* attribute recognised by some compilers to avoid 'unused' warnings */ +#ifndef SWIGUNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define SWIGUNUSED __attribute__ ((__unused__)) +# else +# define SWIGUNUSED +# endif +# elif defined(__ICC) +# define SWIGUNUSED __attribute__ ((__unused__)) +# else +# define SWIGUNUSED +# endif +#endif + +#ifndef SWIG_MSC_UNSUPPRESS_4505 +# if defined(_MSC_VER) +# pragma warning(disable : 4505) /* unreferenced local function has been removed */ +# endif +#endif + +#ifndef SWIGUNUSEDPARM +# ifdef __cplusplus +# define SWIGUNUSEDPARM(p) +# else +# define SWIGUNUSEDPARM(p) p SWIGUNUSED +# endif +#endif + +/* internal SWIG method */ +#ifndef SWIGINTERN +# define SWIGINTERN static SWIGUNUSED +#endif + +/* internal inline SWIG method */ +#ifndef SWIGINTERNINLINE +# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE +#endif + +/* exporting methods */ +#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) +# ifndef GCC_HASCLASSVISIBILITY +# define GCC_HASCLASSVISIBILITY +# endif +#endif + +#ifndef SWIGEXPORT +# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# if defined(STATIC_LINKED) +# define SWIGEXPORT +# else +# define SWIGEXPORT __declspec(dllexport) +# endif +# else +# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) +# define SWIGEXPORT __attribute__ ((visibility("default"))) +# else +# define SWIGEXPORT +# endif +# endif +#endif + +/* calling conventions for Windows */ +#ifndef SWIGSTDCALL +# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# define SWIGSTDCALL __stdcall +# else +# define SWIGSTDCALL +# endif +#endif + +/* Deal with Microsoft's attempt at deprecating C standard runtime functions */ +#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) +# define _CRT_SECURE_NO_DEPRECATE +#endif + +/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ +#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) +# define _SCL_SECURE_NO_DEPRECATE +#endif + #include @@ -202,7 +202,7 @@ static SWIG_CSharpException_t SWIG_csharp_exceptions[] = { static SWIG_CSharpExceptionArgument_t SWIG_csharp_exceptions_argument[] = { { SWIG_CSharpArgumentException, NULL }, { SWIG_CSharpArgumentNullException, NULL }, - { SWIG_CSharpArgumentOutOfRangeException, NULL } + { SWIG_CSharpArgumentOutOfRangeException, NULL }, }; static void SWIGUNUSED SWIG_CSharpSetPendingException(SWIG_CSharpExceptionCodes code, const char *msg) { @@ -280,56 +280,56 @@ SWIGEXPORT void SWIGSTDCALL SWIGRegisterStringCallback_tinyWRAP(SWIG_CSharpStrin #define SWIG_contract_assert(nullreturn, expr, msg) if (!(expr)) {SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentOutOfRangeException, msg, ""); return nullreturn; } else -/* ----------------------------------------------------------------------------- - * See the LICENSE file for information on copyright, usage and redistribution - * of SWIG, and the README file for authors - http://www.swig.org/release.html. - * - * director.swg - * - * This file contains support for director classes so that C# proxy - * methods can be called from C++. - * ----------------------------------------------------------------------------- */ - -#ifdef __cplusplus - -#if defined(DEBUG_DIRECTOR_OWNED) -#include -#endif -#include - -namespace Swig { - /* Director base class - not currently used in C# directors */ - class Director { - }; - - /* Base class for director exceptions */ - class DirectorException { - protected: - std::string swig_msg; - - public: - DirectorException(const char* msg) : swig_msg(msg) { - } - DirectorException(const std::string &msg) : swig_msg(msg) { - } - const std::string& what() const { - return swig_msg; - } - virtual ~DirectorException() { - } - }; - - /* Pure virtual method exception */ - class DirectorPureVirtualException : public Swig::DirectorException { - public: - DirectorPureVirtualException(const char* msg) : DirectorException(std::string("Attempt to invoke pure virtual method ") + msg) { - } - }; -} - -#endif /* __cplusplus */ - - +/* ----------------------------------------------------------------------------- + * See the LICENSE file for information on copyright, usage and redistribution + * of SWIG, and the README file for authors - http://www.swig.org/release.html. + * + * director.swg + * + * This file contains support for director classes so that C# proxy + * methods can be called from C++. + * ----------------------------------------------------------------------------- */ + +#ifdef __cplusplus + +#if defined(DEBUG_DIRECTOR_OWNED) +#include +#endif +#include + +namespace Swig { + /* Director base class - not currently used in C# directors */ + class Director { + }; + + /* Base class for director exceptions */ + class DirectorException { + protected: + std::string swig_msg; + + public: + DirectorException(const char* msg) : swig_msg(msg) { + } + DirectorException(const std::string &msg) : swig_msg(msg) { + } + const std::string& what() const { + return swig_msg; + } + virtual ~DirectorException() { + } + }; + + /* Pure virtual method exception */ + class DirectorPureVirtualException : public Swig::DirectorException { + public: + DirectorPureVirtualException(const char* msg) : DirectorException(std::string("Attempt to invoke pure virtual method ") + msg) { + } + }; +} + +#endif /* __cplusplus */ + + #include "SipUri.h" #include "SipMessage.h" @@ -636,6 +636,34 @@ SWIGEXPORT char * SWIGSTDCALL CSharp_SipMessage_getSipHeaderParamValue__SWIG_1(v } +SWIGEXPORT unsigned int SWIGSTDCALL CSharp_SipMessage_getSipContentLength(void * jarg1) { + unsigned int jresult ; + SipMessage *arg1 = (SipMessage *) 0 ; + unsigned int result; + + arg1 = (SipMessage *)jarg1; + result = (unsigned int)(arg1)->getSipContentLength(); + jresult = result; + return jresult; +} + + +SWIGEXPORT unsigned int SWIGSTDCALL CSharp_SipMessage_getSipContent(void * jarg1, void * jarg2, unsigned int jarg3) { + unsigned int jresult ; + SipMessage *arg1 = (SipMessage *) 0 ; + void *arg2 = (void *) 0 ; + unsigned int arg3 ; + unsigned int result; + + arg1 = (SipMessage *)jarg1; + arg2 = jarg2; + arg3 = (unsigned int)jarg3; + result = (unsigned int)(arg1)->getSipContent(arg2,arg3); + jresult = result; + return jresult; +} + + SWIGEXPORT void * SWIGSTDCALL CSharp_new_SipEvent() { void * jresult ; SipEvent *result = 0 ; diff --git a/trunk/bindings/csharp/tinyWRAP_wrap.h b/trunk/bindings/csharp/tinyWRAP_wrap.h index 5f6d5459..f9ccd6da 100644 --- a/trunk/bindings/csharp/tinyWRAP_wrap.h +++ b/trunk/bindings/csharp/tinyWRAP_wrap.h @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make diff --git a/trunk/bindings/csharp/tsip_event_type_t.cs b/trunk/bindings/csharp/tsip_event_type_t.cs index 4074d78b..16321d11 100644 --- a/trunk/bindings/csharp/tsip_event_type_t.cs +++ b/trunk/bindings/csharp/tsip_event_type_t.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/trunk/bindings/csharp/tsip_publish_event_type_t.cs b/trunk/bindings/csharp/tsip_publish_event_type_t.cs index 5fed51b7..3bf092ff 100644 --- a/trunk/bindings/csharp/tsip_publish_event_type_t.cs +++ b/trunk/bindings/csharp/tsip_publish_event_type_t.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/trunk/bindings/csharp/tsip_register_event_type_t.cs b/trunk/bindings/csharp/tsip_register_event_type_t.cs index 40ab9908..ab7187a2 100644 --- a/trunk/bindings/csharp/tsip_register_event_type_t.cs +++ b/trunk/bindings/csharp/tsip_register_event_type_t.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/trunk/bindings/csharp/tsip_subscribe_event_type_t.cs b/trunk/bindings/csharp/tsip_subscribe_event_type_t.cs index 0c7a3a7a..f922d96a 100644 --- a/trunk/bindings/csharp/tsip_subscribe_event_type_t.cs +++ b/trunk/bindings/csharp/tsip_subscribe_event_type_t.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/trunk/bindings/java/PublicationEvent.java b/trunk/bindings/java/PublicationEvent.java index 267ec31a..5ee69b67 100644 --- a/trunk/bindings/java/PublicationEvent.java +++ b/trunk/bindings/java/PublicationEvent.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -25,13 +25,11 @@ public class PublicationEvent extends SipEvent { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_PublicationEvent(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_PublicationEvent(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/trunk/bindings/java/PublicationSession.java b/trunk/bindings/java/PublicationSession.java index ad3f5102..1d369ec4 100644 --- a/trunk/bindings/java/PublicationSession.java +++ b/trunk/bindings/java/PublicationSession.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -25,13 +25,11 @@ public class PublicationSession extends SipSession { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_PublicationSession(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_PublicationSession(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/trunk/bindings/java/RegistrationEvent.java b/trunk/bindings/java/RegistrationEvent.java index 9563a01a..5fe923d9 100644 --- a/trunk/bindings/java/RegistrationEvent.java +++ b/trunk/bindings/java/RegistrationEvent.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -25,13 +25,11 @@ public class RegistrationEvent extends SipEvent { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_RegistrationEvent(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_RegistrationEvent(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/trunk/bindings/java/RegistrationSession.java b/trunk/bindings/java/RegistrationSession.java index 77eb31f6..79a36e5f 100644 --- a/trunk/bindings/java/RegistrationSession.java +++ b/trunk/bindings/java/RegistrationSession.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -25,13 +25,11 @@ public class RegistrationSession extends SipSession { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_RegistrationSession(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_RegistrationSession(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/trunk/bindings/java/SafeObject.java b/trunk/bindings/java/SafeObject.java index bc54590b..4cef0759 100644 --- a/trunk/bindings/java/SafeObject.java +++ b/trunk/bindings/java/SafeObject.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -26,13 +26,11 @@ public class SafeObject { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SafeObject(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SafeObject(swigCPtr); } + swigCPtr = 0; } public SafeObject() { diff --git a/trunk/bindings/java/SipCallback.java b/trunk/bindings/java/SipCallback.java index 474609e7..d0a4c3cb 100644 --- a/trunk/bindings/java/SipCallback.java +++ b/trunk/bindings/java/SipCallback.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -26,13 +26,11 @@ public class SipCallback { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SipCallback(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SipCallback(swigCPtr); } + swigCPtr = 0; } protected void swigDirectorDisconnect() { diff --git a/trunk/bindings/java/SipDebugCallback.java b/trunk/bindings/java/SipDebugCallback.java index e9772fdc..57c95328 100644 --- a/trunk/bindings/java/SipDebugCallback.java +++ b/trunk/bindings/java/SipDebugCallback.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -26,13 +26,11 @@ public class SipDebugCallback { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SipDebugCallback(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SipDebugCallback(swigCPtr); } + swigCPtr = 0; } protected void swigDirectorDisconnect() { diff --git a/trunk/bindings/java/SipEvent.java b/trunk/bindings/java/SipEvent.java index 3484f725..262f64fd 100644 --- a/trunk/bindings/java/SipEvent.java +++ b/trunk/bindings/java/SipEvent.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -26,13 +26,11 @@ public class SipEvent { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SipEvent(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SipEvent(swigCPtr); } + swigCPtr = 0; } public SipEvent() { diff --git a/trunk/bindings/java/SipMessage.java b/trunk/bindings/java/SipMessage.java index fad168b2..268a7975 100644 --- a/trunk/bindings/java/SipMessage.java +++ b/trunk/bindings/java/SipMessage.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -26,13 +26,11 @@ public class SipMessage { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SipMessage(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SipMessage(swigCPtr); } + swigCPtr = 0; } public SipMessage() { @@ -55,4 +53,12 @@ public class SipMessage { return tinyWRAPJNI.SipMessage_getSipHeaderParamValue__SWIG_1(swigCPtr, this, name, param); } + public long getSipContentLength() { + return tinyWRAPJNI.SipMessage_getSipContentLength(swigCPtr, this); + } + + public long getSipContent(byte[] output, long maxsize) { + return tinyWRAPJNI.SipMessage_getSipContent(swigCPtr, this, output, maxsize); + } + } diff --git a/trunk/bindings/java/SipSession.java b/trunk/bindings/java/SipSession.java index 4582b648..5feff4f3 100644 --- a/trunk/bindings/java/SipSession.java +++ b/trunk/bindings/java/SipSession.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -26,13 +26,11 @@ public class SipSession { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SipSession(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SipSession(swigCPtr); } + swigCPtr = 0; } public SipSession(SipStack stack) { diff --git a/trunk/bindings/java/SipStack.java b/trunk/bindings/java/SipStack.java index da445d96..e075ef67 100644 --- a/trunk/bindings/java/SipStack.java +++ b/trunk/bindings/java/SipStack.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -25,13 +25,11 @@ public class SipStack extends SafeObject { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SipStack(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SipStack(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/trunk/bindings/java/SipUri.java b/trunk/bindings/java/SipUri.java index a97a40de..81dc1aae 100644 --- a/trunk/bindings/java/SipUri.java +++ b/trunk/bindings/java/SipUri.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -26,13 +26,11 @@ public class SipUri { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SipUri(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SipUri(swigCPtr); } + swigCPtr = 0; } public SipUri(String arg0) { diff --git a/trunk/bindings/java/SubscriptionEvent.java b/trunk/bindings/java/SubscriptionEvent.java index cdc00f08..e60c5e67 100644 --- a/trunk/bindings/java/SubscriptionEvent.java +++ b/trunk/bindings/java/SubscriptionEvent.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -25,13 +25,11 @@ public class SubscriptionEvent extends SipEvent { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SubscriptionEvent(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SubscriptionEvent(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/trunk/bindings/java/SubscriptionSession.java b/trunk/bindings/java/SubscriptionSession.java index 481c140d..64111e8e 100644 --- a/trunk/bindings/java/SubscriptionSession.java +++ b/trunk/bindings/java/SubscriptionSession.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -25,13 +25,11 @@ public class SubscriptionSession extends SipSession { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SubscriptionSession(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SubscriptionSession(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/trunk/bindings/java/android/PublicationEvent.java b/trunk/bindings/java/android/PublicationEvent.java index 267ec31a..5ee69b67 100644 --- a/trunk/bindings/java/android/PublicationEvent.java +++ b/trunk/bindings/java/android/PublicationEvent.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -25,13 +25,11 @@ public class PublicationEvent extends SipEvent { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_PublicationEvent(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_PublicationEvent(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/trunk/bindings/java/android/PublicationSession.java b/trunk/bindings/java/android/PublicationSession.java index ad3f5102..1d369ec4 100644 --- a/trunk/bindings/java/android/PublicationSession.java +++ b/trunk/bindings/java/android/PublicationSession.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -25,13 +25,11 @@ public class PublicationSession extends SipSession { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_PublicationSession(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_PublicationSession(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/trunk/bindings/java/android/RegistrationEvent.java b/trunk/bindings/java/android/RegistrationEvent.java index 9563a01a..5fe923d9 100644 --- a/trunk/bindings/java/android/RegistrationEvent.java +++ b/trunk/bindings/java/android/RegistrationEvent.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -25,13 +25,11 @@ public class RegistrationEvent extends SipEvent { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_RegistrationEvent(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_RegistrationEvent(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/trunk/bindings/java/android/RegistrationSession.java b/trunk/bindings/java/android/RegistrationSession.java index 77eb31f6..79a36e5f 100644 --- a/trunk/bindings/java/android/RegistrationSession.java +++ b/trunk/bindings/java/android/RegistrationSession.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -25,13 +25,11 @@ public class RegistrationSession extends SipSession { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_RegistrationSession(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_RegistrationSession(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/trunk/bindings/java/android/SafeObject.java b/trunk/bindings/java/android/SafeObject.java index bc54590b..4cef0759 100644 --- a/trunk/bindings/java/android/SafeObject.java +++ b/trunk/bindings/java/android/SafeObject.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -26,13 +26,11 @@ public class SafeObject { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SafeObject(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SafeObject(swigCPtr); } + swigCPtr = 0; } public SafeObject() { diff --git a/trunk/bindings/java/android/SipCallback.java b/trunk/bindings/java/android/SipCallback.java index 16bc014a..a3c4598d 100644 --- a/trunk/bindings/java/android/SipCallback.java +++ b/trunk/bindings/java/android/SipCallback.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -26,13 +26,11 @@ public class SipCallback { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SipCallback(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SipCallback(swigCPtr); } + swigCPtr = 0; } protected void swigDirectorDisconnect() { diff --git a/trunk/bindings/java/android/SipDebugCallback.java b/trunk/bindings/java/android/SipDebugCallback.java index 122085b9..05ae1214 100644 --- a/trunk/bindings/java/android/SipDebugCallback.java +++ b/trunk/bindings/java/android/SipDebugCallback.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -26,13 +26,11 @@ public class SipDebugCallback { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SipDebugCallback(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SipDebugCallback(swigCPtr); } + swigCPtr = 0; } protected void swigDirectorDisconnect() { diff --git a/trunk/bindings/java/android/SipEvent.java b/trunk/bindings/java/android/SipEvent.java index 3484f725..262f64fd 100644 --- a/trunk/bindings/java/android/SipEvent.java +++ b/trunk/bindings/java/android/SipEvent.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -26,13 +26,11 @@ public class SipEvent { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SipEvent(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SipEvent(swigCPtr); } + swigCPtr = 0; } public SipEvent() { diff --git a/trunk/bindings/java/android/SipMessage.java b/trunk/bindings/java/android/SipMessage.java index fad168b2..268a7975 100644 --- a/trunk/bindings/java/android/SipMessage.java +++ b/trunk/bindings/java/android/SipMessage.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -26,13 +26,11 @@ public class SipMessage { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SipMessage(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SipMessage(swigCPtr); } + swigCPtr = 0; } public SipMessage() { @@ -55,4 +53,12 @@ public class SipMessage { return tinyWRAPJNI.SipMessage_getSipHeaderParamValue__SWIG_1(swigCPtr, this, name, param); } + public long getSipContentLength() { + return tinyWRAPJNI.SipMessage_getSipContentLength(swigCPtr, this); + } + + public long getSipContent(byte[] output, long maxsize) { + return tinyWRAPJNI.SipMessage_getSipContent(swigCPtr, this, output, maxsize); + } + } diff --git a/trunk/bindings/java/android/SipSession.java b/trunk/bindings/java/android/SipSession.java index 4582b648..5feff4f3 100644 --- a/trunk/bindings/java/android/SipSession.java +++ b/trunk/bindings/java/android/SipSession.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -26,13 +26,11 @@ public class SipSession { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SipSession(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SipSession(swigCPtr); } + swigCPtr = 0; } public SipSession(SipStack stack) { diff --git a/trunk/bindings/java/android/SipStack.java b/trunk/bindings/java/android/SipStack.java index da445d96..e075ef67 100644 --- a/trunk/bindings/java/android/SipStack.java +++ b/trunk/bindings/java/android/SipStack.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -25,13 +25,11 @@ public class SipStack extends SafeObject { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SipStack(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SipStack(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/trunk/bindings/java/android/SipUri.java b/trunk/bindings/java/android/SipUri.java index a97a40de..81dc1aae 100644 --- a/trunk/bindings/java/android/SipUri.java +++ b/trunk/bindings/java/android/SipUri.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -26,13 +26,11 @@ public class SipUri { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SipUri(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SipUri(swigCPtr); } + swigCPtr = 0; } public SipUri(String arg0) { diff --git a/trunk/bindings/java/android/SubscriptionEvent.java b/trunk/bindings/java/android/SubscriptionEvent.java index cdc00f08..e60c5e67 100644 --- a/trunk/bindings/java/android/SubscriptionEvent.java +++ b/trunk/bindings/java/android/SubscriptionEvent.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -25,13 +25,11 @@ public class SubscriptionEvent extends SipEvent { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SubscriptionEvent(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SubscriptionEvent(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/trunk/bindings/java/android/SubscriptionSession.java b/trunk/bindings/java/android/SubscriptionSession.java index 481c140d..64111e8e 100644 --- a/trunk/bindings/java/android/SubscriptionSession.java +++ b/trunk/bindings/java/android/SubscriptionSession.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -25,13 +25,11 @@ public class SubscriptionSession extends SipSession { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SubscriptionSession(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SubscriptionSession(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/trunk/bindings/java/android/tinyWRAP.java b/trunk/bindings/java/android/tinyWRAP.java index bc075da7..b4149d69 100644 --- a/trunk/bindings/java/android/tinyWRAP.java +++ b/trunk/bindings/java/android/tinyWRAP.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/trunk/bindings/java/android/tinyWRAPJNI.java b/trunk/bindings/java/android/tinyWRAPJNI.java index 33ca4298..ee86591e 100644 --- a/trunk/bindings/java/android/tinyWRAPJNI.java +++ b/trunk/bindings/java/android/tinyWRAPJNI.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -19,6 +19,8 @@ class tinyWRAPJNI { public final static native String SipMessage_getSipHeaderValue__SWIG_1(long jarg1, SipMessage jarg1_, String jarg2); public final static native String SipMessage_getSipHeaderParamValue__SWIG_0(long jarg1, SipMessage jarg1_, String jarg2, String jarg3, long jarg4); public final static native String SipMessage_getSipHeaderParamValue__SWIG_1(long jarg1, SipMessage jarg1_, String jarg2, String jarg3); + public final static native long SipMessage_getSipContentLength(long jarg1, SipMessage jarg1_); + public final static native long SipMessage_getSipContent(long jarg1, SipMessage jarg1_, byte[] jarg2, long jarg3); public final static native long new_SipEvent(); public final static native void delete_SipEvent(long jarg1); public final static native short SipEvent_getCode(long jarg1, SipEvent jarg1_); diff --git a/trunk/bindings/java/android/tinyWRAP_wrap.cxx b/trunk/bindings/java/android/tinyWRAP_wrap.cxx index 2f8814cf..63a2cbf6 100644 --- a/trunk/bindings/java/android/tinyWRAP_wrap.cxx +++ b/trunk/bindings/java/android/tinyWRAP_wrap.cxx @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make @@ -193,8 +193,7 @@ static void SWIGUNUSED SWIG_JavaThrowException(JNIEnv *jenv, SWIG_JavaExceptionC { SWIG_JavaNullPointerException, "java/lang/NullPointerException" }, { SWIG_JavaDirectorPureVirtual, "java/lang/RuntimeException" }, { SWIG_JavaUnknownError, "java/lang/UnknownError" }, - { (SWIG_JavaExceptionCodes)0, "java/lang/UnknownError" } - }; + { (SWIG_JavaExceptionCodes)0, "java/lang/UnknownError" } }; const SWIG_JavaExceptions_t *except_ptr = java_exceptions; while (except_ptr->code != code && except_ptr->code) @@ -825,7 +824,7 @@ SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipMessage_1ge } arg3 = (unsigned int)jarg3; result = (char *)(arg1)->getSipHeaderValue((char const *)arg2,arg3); - if (result) jresult = jenv->NewStringUTF((const char *)result); + if(result) jresult = jenv->NewStringUTF((const char *)result); if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); delete [] result; return jresult; @@ -848,7 +847,7 @@ SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipMessage_1ge if (!arg2) return 0; } result = (char *)(arg1)->getSipHeaderValue((char const *)arg2); - if (result) jresult = jenv->NewStringUTF((const char *)result); + if(result) jresult = jenv->NewStringUTF((const char *)result); if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); delete [] result; return jresult; @@ -879,7 +878,7 @@ SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipMessage_1ge } arg4 = (unsigned int)jarg4; result = (char *)(arg1)->getSipHeaderParamValue((char const *)arg2,(char const *)arg3,arg4); - if (result) jresult = jenv->NewStringUTF((const char *)result); + if(result) jresult = jenv->NewStringUTF((const char *)result); if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3); return jresult; @@ -908,13 +907,50 @@ SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipMessage_1ge if (!arg3) return 0; } result = (char *)(arg1)->getSipHeaderParamValue((char const *)arg2,(char const *)arg3); - if (result) jresult = jenv->NewStringUTF((const char *)result); + if(result) jresult = jenv->NewStringUTF((const char *)result); if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3); return jresult; } +SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipMessage_1getSipContentLength(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { + jlong jresult = 0 ; + SipMessage *arg1 = (SipMessage *) 0 ; + unsigned int result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(SipMessage **)&jarg1; + result = (unsigned int)(arg1)->getSipContentLength(); + jresult = (jlong)result; + return jresult; +} + + +SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipMessage_1getSipContent(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jbyteArray jarg2, jlong jarg3) { + jlong jresult = 0 ; + SipMessage *arg1 = (SipMessage *) 0 ; + void *arg2 = (void *) 0 ; + unsigned int arg3 ; + unsigned int result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(SipMessage **)&jarg1; + + arg2 = jarg2; + //arg2 = "mamadou"; + + arg3 = (unsigned int)jarg3; + result = (unsigned int)(arg1)->getSipContent(arg2,arg3); + jresult = (jlong)result; + return jresult; +} + + SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_new_1SipEvent(JNIEnv *jenv, jclass jcls) { jlong jresult = 0 ; SipEvent *result = 0 ; @@ -962,7 +998,7 @@ SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipEvent_1getP (void)jarg1_; arg1 = *(SipEvent **)&jarg1; result = (char *)((SipEvent const *)arg1)->getPhrase(); - if (result) jresult = jenv->NewStringUTF((const char *)result); + if(result) jresult = jenv->NewStringUTF((const char *)result); return jresult; } @@ -1284,7 +1320,7 @@ SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_delete_1Publicati } -SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_PublicationSession_1Publish(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, void * jarg2, jlong jarg3) { +SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_PublicationSession_1Publish(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jbyteArray jarg2, jlong jarg3) { jboolean jresult = 0 ; PublicationSession *arg1 = (PublicationSession *) 0 ; void *arg2 = (void *) 0 ; @@ -1295,7 +1331,10 @@ SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_PublicationSe (void)jcls; (void)jarg1_; arg1 = *(PublicationSession **)&jarg1; - arg2 = jarg2; + + arg2 = jarg2; + //arg2 = "mamadou"; + arg3 = (unsigned int)jarg3; result = (bool)(arg1)->Publish((void const *)arg2,arg3); jresult = (jboolean)result; diff --git a/trunk/bindings/java/android/tinyWRAP_wrap.h b/trunk/bindings/java/android/tinyWRAP_wrap.h index 1ec69de4..9e47d4a4 100644 --- a/trunk/bindings/java/android/tinyWRAP_wrap.h +++ b/trunk/bindings/java/android/tinyWRAP_wrap.h @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make diff --git a/trunk/bindings/java/android/tsip_event_type_t.java b/trunk/bindings/java/android/tsip_event_type_t.java index 819967fb..6527ee1e 100644 --- a/trunk/bindings/java/android/tsip_event_type_t.java +++ b/trunk/bindings/java/android/tsip_event_type_t.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/trunk/bindings/java/android/tsip_publish_event_type_t.java b/trunk/bindings/java/android/tsip_publish_event_type_t.java index 83b125c7..639fa514 100644 --- a/trunk/bindings/java/android/tsip_publish_event_type_t.java +++ b/trunk/bindings/java/android/tsip_publish_event_type_t.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/trunk/bindings/java/android/tsip_register_event_type_t.java b/trunk/bindings/java/android/tsip_register_event_type_t.java index e6de02c8..8e497d94 100644 --- a/trunk/bindings/java/android/tsip_register_event_type_t.java +++ b/trunk/bindings/java/android/tsip_register_event_type_t.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/trunk/bindings/java/android/tsip_subscribe_event_type_t.java b/trunk/bindings/java/android/tsip_subscribe_event_type_t.java index f3fea2ed..ae77c65f 100644 --- a/trunk/bindings/java/android/tsip_subscribe_event_type_t.java +++ b/trunk/bindings/java/android/tsip_subscribe_event_type_t.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/trunk/bindings/java/java.i b/trunk/bindings/java/java.i index ad4091a7..8a9b0e50 100644 --- a/trunk/bindings/java/java.i +++ b/trunk/bindings/java/java.i @@ -7,15 +7,21 @@ %javaconst(1); -// Mapping void* as byte[] -%typemap(jni) void * "void *" +//================== Mapping void* as byte[] +%typemap(jni) void * "jbyteArray" %typemap(jtype) void * "byte[]" %typemap(jstype) void * "byte[]" %typemap(javain) void * "$javainput" %typemap(javaout) void * { return $jnicall; } -%typemap(in) void * %{ $1 = $input; %} + +// (From Java to C) +%typemap(in) void * %{ + $1 = $input; + //$1 = "mamadou"; +%} + %typemap(out) void * %{ $result = $1; %} %typemap(javadirectorin) void * "$jniinput" - +//================== %include ../_common/tinyWRAP.i diff --git a/trunk/bindings/java/tinyWRAP.java b/trunk/bindings/java/tinyWRAP.java index bc075da7..b4149d69 100644 --- a/trunk/bindings/java/tinyWRAP.java +++ b/trunk/bindings/java/tinyWRAP.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/trunk/bindings/java/tinyWRAP.sln b/trunk/bindings/java/tinyWRAP.sln new file mode 100644 index 00000000..977bbcb2 --- /dev/null +++ b/trunk/bindings/java/tinyWRAP.sln @@ -0,0 +1,284 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tinyWRAP", "tinyWRAP.vcproj", "{6B60DF14-D5D7-4654-B8F9-1CBC8892CFC8}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tinyNET", "..\..\tinyNET\tinyNET.vcproj", "{7522A458-92F4-4259-B906-E84C2A65D9F1}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tinyHTTP", "..\..\tinyHTTP\tinyHTTP.vcproj", "{B3E45009-C7C3-4090-837C-2D30C9058443}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tinySIP", "..\..\tinySIP\tinySIP.vcproj", "{4CE20732-9978-4A88-B586-CFEFCB63E82D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tinySDP", "..\..\tinySDP\tinySDP.vcproj", "{E45DB518-6562-4033-80E8-60030F0B169F}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tinyMEDIA", "..\..\tinyMEDIA\tinyMEDIA.vcproj", "{52814B0D-7DCA-45B8-9A16-8B147040D619}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tinyIPSec", "..\..\tinyIPSec\tinyIPSec.vcproj", "{002FF064-588F-402E-A096-C8D033F49F40}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tinySAK", "..\..\tinySAK\tinySAK.vcproj", "{6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|Mixed Platforms = Debug|Mixed Platforms + Debug|Win32 = Debug|Win32 + Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + Release|Any CPU = Release|Any CPU + Release|Mixed Platforms = Release|Mixed Platforms + Release|Win32 = Release|Win32 + Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + Static_Debug|Any CPU = Static_Debug|Any CPU + Static_Debug|Mixed Platforms = Static_Debug|Mixed Platforms + Static_Debug|Win32 = Static_Debug|Win32 + Static_Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) = Static_Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + Static_Release|Any CPU = Static_Release|Any CPU + Static_Release|Mixed Platforms = Static_Release|Mixed Platforms + Static_Release|Win32 = Static_Release|Win32 + Static_Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) = Static_Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {6B60DF14-D5D7-4654-B8F9-1CBC8892CFC8}.Debug|Any CPU.ActiveCfg = Debug|Win32 + {6B60DF14-D5D7-4654-B8F9-1CBC8892CFC8}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {6B60DF14-D5D7-4654-B8F9-1CBC8892CFC8}.Debug|Mixed Platforms.Build.0 = Debug|Win32 + {6B60DF14-D5D7-4654-B8F9-1CBC8892CFC8}.Debug|Win32.ActiveCfg = Debug|Win32 + {6B60DF14-D5D7-4654-B8F9-1CBC8892CFC8}.Debug|Win32.Build.0 = Debug|Win32 + {6B60DF14-D5D7-4654-B8F9-1CBC8892CFC8}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 + {6B60DF14-D5D7-4654-B8F9-1CBC8892CFC8}.Release|Any CPU.ActiveCfg = Release|Win32 + {6B60DF14-D5D7-4654-B8F9-1CBC8892CFC8}.Release|Mixed Platforms.ActiveCfg = Release|Win32 + {6B60DF14-D5D7-4654-B8F9-1CBC8892CFC8}.Release|Mixed Platforms.Build.0 = Release|Win32 + {6B60DF14-D5D7-4654-B8F9-1CBC8892CFC8}.Release|Win32.ActiveCfg = Release|Win32 + {6B60DF14-D5D7-4654-B8F9-1CBC8892CFC8}.Release|Win32.Build.0 = Release|Win32 + {6B60DF14-D5D7-4654-B8F9-1CBC8892CFC8}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 + {6B60DF14-D5D7-4654-B8F9-1CBC8892CFC8}.Static_Debug|Any CPU.ActiveCfg = Debug|Win32 + {6B60DF14-D5D7-4654-B8F9-1CBC8892CFC8}.Static_Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {6B60DF14-D5D7-4654-B8F9-1CBC8892CFC8}.Static_Debug|Mixed Platforms.Build.0 = Debug|Win32 + {6B60DF14-D5D7-4654-B8F9-1CBC8892CFC8}.Static_Debug|Win32.ActiveCfg = Debug|Win32 + {6B60DF14-D5D7-4654-B8F9-1CBC8892CFC8}.Static_Debug|Win32.Build.0 = Debug|Win32 + {6B60DF14-D5D7-4654-B8F9-1CBC8892CFC8}.Static_Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 + {6B60DF14-D5D7-4654-B8F9-1CBC8892CFC8}.Static_Release|Any CPU.ActiveCfg = Release|Win32 + {6B60DF14-D5D7-4654-B8F9-1CBC8892CFC8}.Static_Release|Mixed Platforms.ActiveCfg = Release|Win32 + {6B60DF14-D5D7-4654-B8F9-1CBC8892CFC8}.Static_Release|Mixed Platforms.Build.0 = Release|Win32 + {6B60DF14-D5D7-4654-B8F9-1CBC8892CFC8}.Static_Release|Win32.ActiveCfg = Release|Win32 + {6B60DF14-D5D7-4654-B8F9-1CBC8892CFC8}.Static_Release|Win32.Build.0 = Release|Win32 + {6B60DF14-D5D7-4654-B8F9-1CBC8892CFC8}.Static_Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 + {7522A458-92F4-4259-B906-E84C2A65D9F1}.Debug|Any CPU.ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {7522A458-92F4-4259-B906-E84C2A65D9F1}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {7522A458-92F4-4259-B906-E84C2A65D9F1}.Debug|Mixed Platforms.Build.0 = Debug|Win32 + {7522A458-92F4-4259-B906-E84C2A65D9F1}.Debug|Mixed Platforms.Deploy.0 = Debug|Win32 + {7522A458-92F4-4259-B906-E84C2A65D9F1}.Debug|Win32.ActiveCfg = Debug|Win32 + {7522A458-92F4-4259-B906-E84C2A65D9F1}.Debug|Win32.Build.0 = Debug|Win32 + {7522A458-92F4-4259-B906-E84C2A65D9F1}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {7522A458-92F4-4259-B906-E84C2A65D9F1}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {7522A458-92F4-4259-B906-E84C2A65D9F1}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {7522A458-92F4-4259-B906-E84C2A65D9F1}.Release|Any CPU.ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {7522A458-92F4-4259-B906-E84C2A65D9F1}.Release|Mixed Platforms.ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {7522A458-92F4-4259-B906-E84C2A65D9F1}.Release|Mixed Platforms.Build.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {7522A458-92F4-4259-B906-E84C2A65D9F1}.Release|Mixed Platforms.Deploy.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {7522A458-92F4-4259-B906-E84C2A65D9F1}.Release|Win32.ActiveCfg = Release|Win32 + {7522A458-92F4-4259-B906-E84C2A65D9F1}.Release|Win32.Build.0 = Release|Win32 + {7522A458-92F4-4259-B906-E84C2A65D9F1}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {7522A458-92F4-4259-B906-E84C2A65D9F1}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {7522A458-92F4-4259-B906-E84C2A65D9F1}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {7522A458-92F4-4259-B906-E84C2A65D9F1}.Static_Debug|Any CPU.ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {7522A458-92F4-4259-B906-E84C2A65D9F1}.Static_Debug|Mixed Platforms.ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {7522A458-92F4-4259-B906-E84C2A65D9F1}.Static_Debug|Mixed Platforms.Build.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {7522A458-92F4-4259-B906-E84C2A65D9F1}.Static_Debug|Mixed Platforms.Deploy.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {7522A458-92F4-4259-B906-E84C2A65D9F1}.Static_Debug|Win32.ActiveCfg = Debug|Win32 + {7522A458-92F4-4259-B906-E84C2A65D9F1}.Static_Debug|Win32.Build.0 = Debug|Win32 + {7522A458-92F4-4259-B906-E84C2A65D9F1}.Static_Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {7522A458-92F4-4259-B906-E84C2A65D9F1}.Static_Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {7522A458-92F4-4259-B906-E84C2A65D9F1}.Static_Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {7522A458-92F4-4259-B906-E84C2A65D9F1}.Static_Release|Any CPU.ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {7522A458-92F4-4259-B906-E84C2A65D9F1}.Static_Release|Mixed Platforms.ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {7522A458-92F4-4259-B906-E84C2A65D9F1}.Static_Release|Mixed Platforms.Build.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {7522A458-92F4-4259-B906-E84C2A65D9F1}.Static_Release|Mixed Platforms.Deploy.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {7522A458-92F4-4259-B906-E84C2A65D9F1}.Static_Release|Win32.ActiveCfg = Release|Win32 + {7522A458-92F4-4259-B906-E84C2A65D9F1}.Static_Release|Win32.Build.0 = Release|Win32 + {7522A458-92F4-4259-B906-E84C2A65D9F1}.Static_Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {7522A458-92F4-4259-B906-E84C2A65D9F1}.Static_Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {7522A458-92F4-4259-B906-E84C2A65D9F1}.Static_Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {B3E45009-C7C3-4090-837C-2D30C9058443}.Debug|Any CPU.ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {B3E45009-C7C3-4090-837C-2D30C9058443}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {B3E45009-C7C3-4090-837C-2D30C9058443}.Debug|Mixed Platforms.Build.0 = Debug|Win32 + {B3E45009-C7C3-4090-837C-2D30C9058443}.Debug|Mixed Platforms.Deploy.0 = Debug|Win32 + {B3E45009-C7C3-4090-837C-2D30C9058443}.Debug|Win32.ActiveCfg = Debug|Win32 + {B3E45009-C7C3-4090-837C-2D30C9058443}.Debug|Win32.Build.0 = Debug|Win32 + {B3E45009-C7C3-4090-837C-2D30C9058443}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {B3E45009-C7C3-4090-837C-2D30C9058443}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {B3E45009-C7C3-4090-837C-2D30C9058443}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {B3E45009-C7C3-4090-837C-2D30C9058443}.Release|Any CPU.ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {B3E45009-C7C3-4090-837C-2D30C9058443}.Release|Mixed Platforms.ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {B3E45009-C7C3-4090-837C-2D30C9058443}.Release|Mixed Platforms.Build.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {B3E45009-C7C3-4090-837C-2D30C9058443}.Release|Mixed Platforms.Deploy.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {B3E45009-C7C3-4090-837C-2D30C9058443}.Release|Win32.ActiveCfg = Release|Win32 + {B3E45009-C7C3-4090-837C-2D30C9058443}.Release|Win32.Build.0 = Release|Win32 + {B3E45009-C7C3-4090-837C-2D30C9058443}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {B3E45009-C7C3-4090-837C-2D30C9058443}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {B3E45009-C7C3-4090-837C-2D30C9058443}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {B3E45009-C7C3-4090-837C-2D30C9058443}.Static_Debug|Any CPU.ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {B3E45009-C7C3-4090-837C-2D30C9058443}.Static_Debug|Mixed Platforms.ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {B3E45009-C7C3-4090-837C-2D30C9058443}.Static_Debug|Mixed Platforms.Build.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {B3E45009-C7C3-4090-837C-2D30C9058443}.Static_Debug|Mixed Platforms.Deploy.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {B3E45009-C7C3-4090-837C-2D30C9058443}.Static_Debug|Win32.ActiveCfg = Debug|Win32 + {B3E45009-C7C3-4090-837C-2D30C9058443}.Static_Debug|Win32.Build.0 = Debug|Win32 + {B3E45009-C7C3-4090-837C-2D30C9058443}.Static_Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {B3E45009-C7C3-4090-837C-2D30C9058443}.Static_Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {B3E45009-C7C3-4090-837C-2D30C9058443}.Static_Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {B3E45009-C7C3-4090-837C-2D30C9058443}.Static_Release|Any CPU.ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {B3E45009-C7C3-4090-837C-2D30C9058443}.Static_Release|Mixed Platforms.ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {B3E45009-C7C3-4090-837C-2D30C9058443}.Static_Release|Mixed Platforms.Build.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {B3E45009-C7C3-4090-837C-2D30C9058443}.Static_Release|Mixed Platforms.Deploy.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {B3E45009-C7C3-4090-837C-2D30C9058443}.Static_Release|Win32.ActiveCfg = Release|Win32 + {B3E45009-C7C3-4090-837C-2D30C9058443}.Static_Release|Win32.Build.0 = Release|Win32 + {B3E45009-C7C3-4090-837C-2D30C9058443}.Static_Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {B3E45009-C7C3-4090-837C-2D30C9058443}.Static_Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {B3E45009-C7C3-4090-837C-2D30C9058443}.Static_Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {4CE20732-9978-4A88-B586-CFEFCB63E82D}.Debug|Any CPU.ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {4CE20732-9978-4A88-B586-CFEFCB63E82D}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {4CE20732-9978-4A88-B586-CFEFCB63E82D}.Debug|Mixed Platforms.Build.0 = Debug|Win32 + {4CE20732-9978-4A88-B586-CFEFCB63E82D}.Debug|Mixed Platforms.Deploy.0 = Debug|Win32 + {4CE20732-9978-4A88-B586-CFEFCB63E82D}.Debug|Win32.ActiveCfg = Debug|Win32 + {4CE20732-9978-4A88-B586-CFEFCB63E82D}.Debug|Win32.Build.0 = Debug|Win32 + {4CE20732-9978-4A88-B586-CFEFCB63E82D}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {4CE20732-9978-4A88-B586-CFEFCB63E82D}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {4CE20732-9978-4A88-B586-CFEFCB63E82D}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {4CE20732-9978-4A88-B586-CFEFCB63E82D}.Release|Any CPU.ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {4CE20732-9978-4A88-B586-CFEFCB63E82D}.Release|Mixed Platforms.ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {4CE20732-9978-4A88-B586-CFEFCB63E82D}.Release|Mixed Platforms.Build.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {4CE20732-9978-4A88-B586-CFEFCB63E82D}.Release|Mixed Platforms.Deploy.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {4CE20732-9978-4A88-B586-CFEFCB63E82D}.Release|Win32.ActiveCfg = Release|Win32 + {4CE20732-9978-4A88-B586-CFEFCB63E82D}.Release|Win32.Build.0 = Release|Win32 + {4CE20732-9978-4A88-B586-CFEFCB63E82D}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {4CE20732-9978-4A88-B586-CFEFCB63E82D}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {4CE20732-9978-4A88-B586-CFEFCB63E82D}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {4CE20732-9978-4A88-B586-CFEFCB63E82D}.Static_Debug|Any CPU.ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {4CE20732-9978-4A88-B586-CFEFCB63E82D}.Static_Debug|Mixed Platforms.ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {4CE20732-9978-4A88-B586-CFEFCB63E82D}.Static_Debug|Mixed Platforms.Build.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {4CE20732-9978-4A88-B586-CFEFCB63E82D}.Static_Debug|Mixed Platforms.Deploy.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {4CE20732-9978-4A88-B586-CFEFCB63E82D}.Static_Debug|Win32.ActiveCfg = Debug|Win32 + {4CE20732-9978-4A88-B586-CFEFCB63E82D}.Static_Debug|Win32.Build.0 = Debug|Win32 + {4CE20732-9978-4A88-B586-CFEFCB63E82D}.Static_Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {4CE20732-9978-4A88-B586-CFEFCB63E82D}.Static_Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {4CE20732-9978-4A88-B586-CFEFCB63E82D}.Static_Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {4CE20732-9978-4A88-B586-CFEFCB63E82D}.Static_Release|Any CPU.ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {4CE20732-9978-4A88-B586-CFEFCB63E82D}.Static_Release|Mixed Platforms.ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {4CE20732-9978-4A88-B586-CFEFCB63E82D}.Static_Release|Mixed Platforms.Build.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {4CE20732-9978-4A88-B586-CFEFCB63E82D}.Static_Release|Mixed Platforms.Deploy.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {4CE20732-9978-4A88-B586-CFEFCB63E82D}.Static_Release|Win32.ActiveCfg = Release|Win32 + {4CE20732-9978-4A88-B586-CFEFCB63E82D}.Static_Release|Win32.Build.0 = Release|Win32 + {4CE20732-9978-4A88-B586-CFEFCB63E82D}.Static_Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {4CE20732-9978-4A88-B586-CFEFCB63E82D}.Static_Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {4CE20732-9978-4A88-B586-CFEFCB63E82D}.Static_Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {E45DB518-6562-4033-80E8-60030F0B169F}.Debug|Any CPU.ActiveCfg = Debug|Win32 + {E45DB518-6562-4033-80E8-60030F0B169F}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {E45DB518-6562-4033-80E8-60030F0B169F}.Debug|Mixed Platforms.Build.0 = Debug|Win32 + {E45DB518-6562-4033-80E8-60030F0B169F}.Debug|Win32.ActiveCfg = Debug|Win32 + {E45DB518-6562-4033-80E8-60030F0B169F}.Debug|Win32.Build.0 = Debug|Win32 + {E45DB518-6562-4033-80E8-60030F0B169F}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 + {E45DB518-6562-4033-80E8-60030F0B169F}.Release|Any CPU.ActiveCfg = Release|Win32 + {E45DB518-6562-4033-80E8-60030F0B169F}.Release|Mixed Platforms.ActiveCfg = Release|Win32 + {E45DB518-6562-4033-80E8-60030F0B169F}.Release|Mixed Platforms.Build.0 = Release|Win32 + {E45DB518-6562-4033-80E8-60030F0B169F}.Release|Win32.ActiveCfg = Release|Win32 + {E45DB518-6562-4033-80E8-60030F0B169F}.Release|Win32.Build.0 = Release|Win32 + {E45DB518-6562-4033-80E8-60030F0B169F}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 + {E45DB518-6562-4033-80E8-60030F0B169F}.Static_Debug|Any CPU.ActiveCfg = Debug|Win32 + {E45DB518-6562-4033-80E8-60030F0B169F}.Static_Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {E45DB518-6562-4033-80E8-60030F0B169F}.Static_Debug|Mixed Platforms.Build.0 = Debug|Win32 + {E45DB518-6562-4033-80E8-60030F0B169F}.Static_Debug|Win32.ActiveCfg = Debug|Win32 + {E45DB518-6562-4033-80E8-60030F0B169F}.Static_Debug|Win32.Build.0 = Debug|Win32 + {E45DB518-6562-4033-80E8-60030F0B169F}.Static_Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 + {E45DB518-6562-4033-80E8-60030F0B169F}.Static_Release|Any CPU.ActiveCfg = Release|Win32 + {E45DB518-6562-4033-80E8-60030F0B169F}.Static_Release|Mixed Platforms.ActiveCfg = Release|Win32 + {E45DB518-6562-4033-80E8-60030F0B169F}.Static_Release|Mixed Platforms.Build.0 = Release|Win32 + {E45DB518-6562-4033-80E8-60030F0B169F}.Static_Release|Win32.ActiveCfg = Release|Win32 + {E45DB518-6562-4033-80E8-60030F0B169F}.Static_Release|Win32.Build.0 = Release|Win32 + {E45DB518-6562-4033-80E8-60030F0B169F}.Static_Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 + {52814B0D-7DCA-45B8-9A16-8B147040D619}.Debug|Any CPU.ActiveCfg = Debug|Win32 + {52814B0D-7DCA-45B8-9A16-8B147040D619}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {52814B0D-7DCA-45B8-9A16-8B147040D619}.Debug|Mixed Platforms.Build.0 = Debug|Win32 + {52814B0D-7DCA-45B8-9A16-8B147040D619}.Debug|Win32.ActiveCfg = Debug|Win32 + {52814B0D-7DCA-45B8-9A16-8B147040D619}.Debug|Win32.Build.0 = Debug|Win32 + {52814B0D-7DCA-45B8-9A16-8B147040D619}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 + {52814B0D-7DCA-45B8-9A16-8B147040D619}.Release|Any CPU.ActiveCfg = Release|Win32 + {52814B0D-7DCA-45B8-9A16-8B147040D619}.Release|Mixed Platforms.ActiveCfg = Release|Win32 + {52814B0D-7DCA-45B8-9A16-8B147040D619}.Release|Mixed Platforms.Build.0 = Release|Win32 + {52814B0D-7DCA-45B8-9A16-8B147040D619}.Release|Win32.ActiveCfg = Release|Win32 + {52814B0D-7DCA-45B8-9A16-8B147040D619}.Release|Win32.Build.0 = Release|Win32 + {52814B0D-7DCA-45B8-9A16-8B147040D619}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 + {52814B0D-7DCA-45B8-9A16-8B147040D619}.Static_Debug|Any CPU.ActiveCfg = Debug|Win32 + {52814B0D-7DCA-45B8-9A16-8B147040D619}.Static_Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {52814B0D-7DCA-45B8-9A16-8B147040D619}.Static_Debug|Mixed Platforms.Build.0 = Debug|Win32 + {52814B0D-7DCA-45B8-9A16-8B147040D619}.Static_Debug|Win32.ActiveCfg = Debug|Win32 + {52814B0D-7DCA-45B8-9A16-8B147040D619}.Static_Debug|Win32.Build.0 = Debug|Win32 + {52814B0D-7DCA-45B8-9A16-8B147040D619}.Static_Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 + {52814B0D-7DCA-45B8-9A16-8B147040D619}.Static_Release|Any CPU.ActiveCfg = Release|Win32 + {52814B0D-7DCA-45B8-9A16-8B147040D619}.Static_Release|Mixed Platforms.ActiveCfg = Release|Win32 + {52814B0D-7DCA-45B8-9A16-8B147040D619}.Static_Release|Mixed Platforms.Build.0 = Release|Win32 + {52814B0D-7DCA-45B8-9A16-8B147040D619}.Static_Release|Win32.ActiveCfg = Release|Win32 + {52814B0D-7DCA-45B8-9A16-8B147040D619}.Static_Release|Win32.Build.0 = Release|Win32 + {52814B0D-7DCA-45B8-9A16-8B147040D619}.Static_Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 + {002FF064-588F-402E-A096-C8D033F49F40}.Debug|Any CPU.ActiveCfg = Debug|Win32 + {002FF064-588F-402E-A096-C8D033F49F40}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {002FF064-588F-402E-A096-C8D033F49F40}.Debug|Mixed Platforms.Build.0 = Debug|Win32 + {002FF064-588F-402E-A096-C8D033F49F40}.Debug|Win32.ActiveCfg = Debug|Win32 + {002FF064-588F-402E-A096-C8D033F49F40}.Debug|Win32.Build.0 = Debug|Win32 + {002FF064-588F-402E-A096-C8D033F49F40}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 + {002FF064-588F-402E-A096-C8D033F49F40}.Release|Any CPU.ActiveCfg = Release|Win32 + {002FF064-588F-402E-A096-C8D033F49F40}.Release|Mixed Platforms.ActiveCfg = Release|Win32 + {002FF064-588F-402E-A096-C8D033F49F40}.Release|Mixed Platforms.Build.0 = Release|Win32 + {002FF064-588F-402E-A096-C8D033F49F40}.Release|Win32.ActiveCfg = Release|Win32 + {002FF064-588F-402E-A096-C8D033F49F40}.Release|Win32.Build.0 = Release|Win32 + {002FF064-588F-402E-A096-C8D033F49F40}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 + {002FF064-588F-402E-A096-C8D033F49F40}.Static_Debug|Any CPU.ActiveCfg = Debug|Win32 + {002FF064-588F-402E-A096-C8D033F49F40}.Static_Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {002FF064-588F-402E-A096-C8D033F49F40}.Static_Debug|Mixed Platforms.Build.0 = Debug|Win32 + {002FF064-588F-402E-A096-C8D033F49F40}.Static_Debug|Win32.ActiveCfg = Debug|Win32 + {002FF064-588F-402E-A096-C8D033F49F40}.Static_Debug|Win32.Build.0 = Debug|Win32 + {002FF064-588F-402E-A096-C8D033F49F40}.Static_Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 + {002FF064-588F-402E-A096-C8D033F49F40}.Static_Release|Any CPU.ActiveCfg = Release|Win32 + {002FF064-588F-402E-A096-C8D033F49F40}.Static_Release|Mixed Platforms.ActiveCfg = Release|Win32 + {002FF064-588F-402E-A096-C8D033F49F40}.Static_Release|Mixed Platforms.Build.0 = Release|Win32 + {002FF064-588F-402E-A096-C8D033F49F40}.Static_Release|Win32.ActiveCfg = Release|Win32 + {002FF064-588F-402E-A096-C8D033F49F40}.Static_Release|Win32.Build.0 = Release|Win32 + {002FF064-588F-402E-A096-C8D033F49F40}.Static_Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 + {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Debug|Any CPU.ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Debug|Mixed Platforms.Build.0 = Debug|Win32 + {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Debug|Mixed Platforms.Deploy.0 = Debug|Win32 + {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Debug|Win32.ActiveCfg = Debug|Win32 + {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Debug|Win32.Build.0 = Debug|Win32 + {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Release|Any CPU.ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Release|Mixed Platforms.ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Release|Mixed Platforms.Build.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Release|Mixed Platforms.Deploy.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Release|Win32.ActiveCfg = Release|Win32 + {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Release|Win32.Build.0 = Release|Win32 + {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Static_Debug|Any CPU.ActiveCfg = Static_Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Static_Debug|Mixed Platforms.ActiveCfg = Static_Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Static_Debug|Mixed Platforms.Build.0 = Static_Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Static_Debug|Mixed Platforms.Deploy.0 = Static_Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Static_Debug|Win32.ActiveCfg = Static_Debug|Win32 + {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Static_Debug|Win32.Build.0 = Static_Debug|Win32 + {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Static_Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Static_Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Static_Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Static_Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Static_Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Static_Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Static_Release|Any CPU.ActiveCfg = Static_Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Static_Release|Mixed Platforms.ActiveCfg = Static_Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Static_Release|Mixed Platforms.Build.0 = Static_Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Static_Release|Mixed Platforms.Deploy.0 = Static_Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Static_Release|Win32.ActiveCfg = Static_Release|Win32 + {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Static_Release|Win32.Build.0 = Static_Release|Win32 + {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Static_Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Static_Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Static_Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Static_Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Static_Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Static_Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/trunk/bindings/java/tinyWRAP.vcproj b/trunk/bindings/java/tinyWRAP.vcproj new file mode 100644 index 00000000..24c8011f --- /dev/null +++ b/trunk/bindings/java/tinyWRAP.vcproj @@ -0,0 +1,372 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trunk/bindings/java/tinyWRAPJNI.java b/trunk/bindings/java/tinyWRAPJNI.java index 33ca4298..ee86591e 100644 --- a/trunk/bindings/java/tinyWRAPJNI.java +++ b/trunk/bindings/java/tinyWRAPJNI.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -19,6 +19,8 @@ class tinyWRAPJNI { public final static native String SipMessage_getSipHeaderValue__SWIG_1(long jarg1, SipMessage jarg1_, String jarg2); public final static native String SipMessage_getSipHeaderParamValue__SWIG_0(long jarg1, SipMessage jarg1_, String jarg2, String jarg3, long jarg4); public final static native String SipMessage_getSipHeaderParamValue__SWIG_1(long jarg1, SipMessage jarg1_, String jarg2, String jarg3); + public final static native long SipMessage_getSipContentLength(long jarg1, SipMessage jarg1_); + public final static native long SipMessage_getSipContent(long jarg1, SipMessage jarg1_, byte[] jarg2, long jarg3); public final static native long new_SipEvent(); public final static native void delete_SipEvent(long jarg1); public final static native short SipEvent_getCode(long jarg1, SipEvent jarg1_); diff --git a/trunk/bindings/java/tinyWRAP_wrap.cxx b/trunk/bindings/java/tinyWRAP_wrap.cxx index c7d6370c..faa787c2 100644 --- a/trunk/bindings/java/tinyWRAP_wrap.cxx +++ b/trunk/bindings/java/tinyWRAP_wrap.cxx @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make @@ -35,114 +35,114 @@ template T SwigValueInit() { } #endif -/* ----------------------------------------------------------------------------- - * This section contains generic SWIG labels for method/variable - * declarations/attributes, and other compiler dependent labels. - * ----------------------------------------------------------------------------- */ - -/* template workaround for compilers that cannot correctly implement the C++ standard */ -#ifndef SWIGTEMPLATEDISAMBIGUATOR -# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) -# define SWIGTEMPLATEDISAMBIGUATOR template -# elif defined(__HP_aCC) -/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ -/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ -# define SWIGTEMPLATEDISAMBIGUATOR template -# else -# define SWIGTEMPLATEDISAMBIGUATOR -# endif -#endif - -/* inline attribute */ -#ifndef SWIGINLINE -# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) -# define SWIGINLINE inline -# else -# define SWIGINLINE -# endif -#endif - -/* attribute recognised by some compilers to avoid 'unused' warnings */ -#ifndef SWIGUNUSED -# if defined(__GNUC__) -# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) -# define SWIGUNUSED __attribute__ ((__unused__)) -# else -# define SWIGUNUSED -# endif -# elif defined(__ICC) -# define SWIGUNUSED __attribute__ ((__unused__)) -# else -# define SWIGUNUSED -# endif -#endif - -#ifndef SWIG_MSC_UNSUPPRESS_4505 -# if defined(_MSC_VER) -# pragma warning(disable : 4505) /* unreferenced local function has been removed */ -# endif -#endif - -#ifndef SWIGUNUSEDPARM -# ifdef __cplusplus -# define SWIGUNUSEDPARM(p) -# else -# define SWIGUNUSEDPARM(p) p SWIGUNUSED -# endif -#endif - -/* internal SWIG method */ -#ifndef SWIGINTERN -# define SWIGINTERN static SWIGUNUSED -#endif - -/* internal inline SWIG method */ -#ifndef SWIGINTERNINLINE -# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE -#endif - -/* exporting methods */ -#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) -# ifndef GCC_HASCLASSVISIBILITY -# define GCC_HASCLASSVISIBILITY -# endif -#endif - -#ifndef SWIGEXPORT -# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) -# if defined(STATIC_LINKED) -# define SWIGEXPORT -# else -# define SWIGEXPORT __declspec(dllexport) -# endif -# else -# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) -# define SWIGEXPORT __attribute__ ((visibility("default"))) -# else -# define SWIGEXPORT -# endif -# endif -#endif - -/* calling conventions for Windows */ -#ifndef SWIGSTDCALL -# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) -# define SWIGSTDCALL __stdcall -# else -# define SWIGSTDCALL -# endif -#endif - -/* Deal with Microsoft's attempt at deprecating C standard runtime functions */ -#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) -# define _CRT_SECURE_NO_DEPRECATE -#endif - -/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ -#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) -# define _SCL_SECURE_NO_DEPRECATE -#endif - +/* ----------------------------------------------------------------------------- + * This section contains generic SWIG labels for method/variable + * declarations/attributes, and other compiler dependent labels. + * ----------------------------------------------------------------------------- */ + +/* template workaround for compilers that cannot correctly implement the C++ standard */ +#ifndef SWIGTEMPLATEDISAMBIGUATOR +# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) +# define SWIGTEMPLATEDISAMBIGUATOR template +# elif defined(__HP_aCC) +/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ +/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ +# define SWIGTEMPLATEDISAMBIGUATOR template +# else +# define SWIGTEMPLATEDISAMBIGUATOR +# endif +#endif + +/* inline attribute */ +#ifndef SWIGINLINE +# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) +# define SWIGINLINE inline +# else +# define SWIGINLINE +# endif +#endif + +/* attribute recognised by some compilers to avoid 'unused' warnings */ +#ifndef SWIGUNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define SWIGUNUSED __attribute__ ((__unused__)) +# else +# define SWIGUNUSED +# endif +# elif defined(__ICC) +# define SWIGUNUSED __attribute__ ((__unused__)) +# else +# define SWIGUNUSED +# endif +#endif + +#ifndef SWIG_MSC_UNSUPPRESS_4505 +# if defined(_MSC_VER) +# pragma warning(disable : 4505) /* unreferenced local function has been removed */ +# endif +#endif + +#ifndef SWIGUNUSEDPARM +# ifdef __cplusplus +# define SWIGUNUSEDPARM(p) +# else +# define SWIGUNUSEDPARM(p) p SWIGUNUSED +# endif +#endif + +/* internal SWIG method */ +#ifndef SWIGINTERN +# define SWIGINTERN static SWIGUNUSED +#endif + +/* internal inline SWIG method */ +#ifndef SWIGINTERNINLINE +# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE +#endif + +/* exporting methods */ +#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) +# ifndef GCC_HASCLASSVISIBILITY +# define GCC_HASCLASSVISIBILITY +# endif +#endif + +#ifndef SWIGEXPORT +# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# if defined(STATIC_LINKED) +# define SWIGEXPORT +# else +# define SWIGEXPORT __declspec(dllexport) +# endif +# else +# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) +# define SWIGEXPORT __attribute__ ((visibility("default"))) +# else +# define SWIGEXPORT +# endif +# endif +#endif + +/* calling conventions for Windows */ +#ifndef SWIGSTDCALL +# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# define SWIGSTDCALL __stdcall +# else +# define SWIGSTDCALL +# endif +#endif + +/* Deal with Microsoft's attempt at deprecating C standard runtime functions */ +#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) +# define _CRT_SECURE_NO_DEPRECATE +#endif + +/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ +#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) +# define _SCL_SECURE_NO_DEPRECATE +#endif + /* Fix for jlong on some versions of gcc on Windows */ @@ -193,8 +193,7 @@ static void SWIGUNUSED SWIG_JavaThrowException(JNIEnv *jenv, SWIG_JavaExceptionC { SWIG_JavaNullPointerException, "java/lang/NullPointerException" }, { SWIG_JavaDirectorPureVirtual, "java/lang/RuntimeException" }, { SWIG_JavaUnknownError, "java/lang/UnknownError" }, - { (SWIG_JavaExceptionCodes)0, "java/lang/UnknownError" } - }; + { (SWIG_JavaExceptionCodes)0, "java/lang/UnknownError" } }; const SWIG_JavaExceptions_t *except_ptr = java_exceptions; while (except_ptr->code != code && except_ptr->code) @@ -211,197 +210,197 @@ static void SWIGUNUSED SWIG_JavaThrowException(JNIEnv *jenv, SWIG_JavaExceptionC #define SWIG_contract_assert(nullreturn, expr, msg) if (!(expr)) {SWIG_JavaThrowException(jenv, SWIG_JavaIllegalArgumentException, msg); return nullreturn; } else -/* ----------------------------------------------------------------------------- - * See the LICENSE file for information on copyright, usage and redistribution - * of SWIG, and the README file for authors - http://www.swig.org/release.html. - * - * director.swg - * - * This file contains support for director classes that proxy - * method calls from C++ to Java extensions. - * ----------------------------------------------------------------------------- */ - -#ifdef __cplusplus - -#if defined(DEBUG_DIRECTOR_OWNED) -#include -#endif - -namespace Swig { - /* Java object wrapper */ - class JObjectWrapper { - public: - JObjectWrapper() : jthis_(NULL), weak_global_(true) { - } - - ~JObjectWrapper() { - jthis_ = NULL; - weak_global_ = true; - } - - bool set(JNIEnv *jenv, jobject jobj, bool mem_own, bool weak_global) { - if (!jthis_) { - weak_global_ = weak_global; - if (jobj) - jthis_ = ((weak_global_ || !mem_own) ? jenv->NewWeakGlobalRef(jobj) : jenv->NewGlobalRef(jobj)); -#if defined(DEBUG_DIRECTOR_OWNED) - std::cout << "JObjectWrapper::set(" << jobj << ", " << (weak_global ? "weak_global" : "global_ref") << ") -> " << jthis_ << std::endl; -#endif - return true; - } else { -#if defined(DEBUG_DIRECTOR_OWNED) - std::cout << "JObjectWrapper::set(" << jobj << ", " << (weak_global ? "weak_global" : "global_ref") << ") -> already set" << std::endl; -#endif - return false; - } - } - - jobject get(JNIEnv *jenv) const { -#if defined(DEBUG_DIRECTOR_OWNED) - std::cout << "JObjectWrapper::get("; - if (jthis_) - std::cout << jthis_; - else - std::cout << "null"; - std::cout << ") -> return new local ref" << std::endl; -#endif - return (jthis_ ? jenv->NewLocalRef(jthis_) : jthis_); - } - - void release(JNIEnv *jenv) { -#if defined(DEBUG_DIRECTOR_OWNED) - std::cout << "JObjectWrapper::release(" << jthis_ << "): " << (weak_global_ ? "weak global ref" : "global ref") << std::endl; -#endif - if (jthis_) { - if (weak_global_) { - if (jenv->IsSameObject(jthis_, NULL) == JNI_FALSE) - jenv->DeleteWeakGlobalRef((jweak)jthis_); - } else - jenv->DeleteGlobalRef(jthis_); - } - - jthis_ = NULL; - weak_global_ = true; - } - - jobject peek() { - return jthis_; - } - - /* Java proxy releases ownership of C++ object, C++ object is now - responsible for destruction (creates NewGlobalRef to pin Java - proxy) */ - void java_change_ownership(JNIEnv *jenv, jobject jself, bool take_or_release) { - if (take_or_release) { /* Java takes ownership of C++ object's lifetime. */ - if (!weak_global_) { - jenv->DeleteGlobalRef(jthis_); - jthis_ = jenv->NewWeakGlobalRef(jself); - weak_global_ = true; - } - } else { /* Java releases ownership of C++ object's lifetime */ - if (weak_global_) { - jenv->DeleteWeakGlobalRef((jweak)jthis_); - jthis_ = jenv->NewGlobalRef(jself); - weak_global_ = false; - } - } - } - - private: - /* pointer to Java object */ - jobject jthis_; - /* Local or global reference flag */ - bool weak_global_; - }; - - /* director base class */ - class Director { - /* pointer to Java virtual machine */ - JavaVM *swig_jvm_; - - protected: -#if defined (_MSC_VER) && (_MSC_VER<1300) - class JNIEnvWrapper; - friend class JNIEnvWrapper; -#endif - /* Utility class for managing the JNI environment */ - class JNIEnvWrapper { - const Director *director_; - JNIEnv *jenv_; - public: - JNIEnvWrapper(const Director *director) : director_(director), jenv_(0) { -#if defined(SWIG_JAVA_ATTACH_CURRENT_THREAD_AS_DAEMON) - // Attach a daemon thread to the JVM. Useful when the JVM should not wait for - // the thread to exit upon shutdown. Only for jdk-1.4 and later. - director_->swig_jvm_->AttachCurrentThreadAsDaemon((void **) &jenv_, NULL); -#else - director_->swig_jvm_->AttachCurrentThread((void **) &jenv_, NULL); -#endif - } - ~JNIEnvWrapper() { -#if !defined(SWIG_JAVA_NO_DETACH_CURRENT_THREAD) - // Some JVMs, eg jdk-1.4.2 and lower on Solaris have a bug and crash with the DetachCurrentThread call. - // However, without this call, the JVM hangs on exit when the thread was not created by the JVM and creates a memory leak. - director_->swig_jvm_->DetachCurrentThread(); -#endif - } - JNIEnv *getJNIEnv() const { - return jenv_; - } - }; - - /* Java object wrapper */ - JObjectWrapper swig_self_; - - /* Disconnect director from Java object */ - void swig_disconnect_director_self(const char *disconn_method) { - JNIEnvWrapper jnienv(this) ; - JNIEnv *jenv = jnienv.getJNIEnv() ; - jobject jobj = swig_self_.peek(); -#if defined(DEBUG_DIRECTOR_OWNED) - std::cout << "Swig::Director::disconnect_director_self(" << jobj << ")" << std::endl; -#endif - if (jobj && jenv->IsSameObject(jobj, NULL) == JNI_FALSE) { - jmethodID disconn_meth = jenv->GetMethodID(jenv->GetObjectClass(jobj), disconn_method, "()V"); - if (disconn_meth) { -#if defined(DEBUG_DIRECTOR_OWNED) - std::cout << "Swig::Director::disconnect_director_self upcall to " << disconn_method << std::endl; -#endif - jenv->CallVoidMethod(jobj, disconn_meth); - } - } - } - - public: - Director(JNIEnv *jenv) : swig_jvm_((JavaVM *) NULL), swig_self_() { - /* Acquire the Java VM pointer */ - jenv->GetJavaVM(&swig_jvm_); - } - - virtual ~Director() { - JNIEnvWrapper jnienv(this) ; - JNIEnv *jenv = jnienv.getJNIEnv() ; - swig_self_.release(jenv); - } - - bool swig_set_self(JNIEnv *jenv, jobject jself, bool mem_own, bool weak_global) { - return swig_self_.set(jenv, jself, mem_own, weak_global); - } - - jobject swig_get_self(JNIEnv *jenv) const { - return swig_self_.get(jenv); - } - - // Change C++ object's ownership, relative to Java - void swig_java_change_ownership(JNIEnv *jenv, jobject jself, bool take_or_release) { - swig_self_.java_change_ownership(jenv, jself, take_or_release); - } - }; -} - -#endif /* __cplusplus */ - - +/* ----------------------------------------------------------------------------- + * See the LICENSE file for information on copyright, usage and redistribution + * of SWIG, and the README file for authors - http://www.swig.org/release.html. + * + * director.swg + * + * This file contains support for director classes that proxy + * method calls from C++ to Java extensions. + * ----------------------------------------------------------------------------- */ + +#ifdef __cplusplus + +#if defined(DEBUG_DIRECTOR_OWNED) +#include +#endif + +namespace Swig { + /* Java object wrapper */ + class JObjectWrapper { + public: + JObjectWrapper() : jthis_(NULL), weak_global_(true) { + } + + ~JObjectWrapper() { + jthis_ = NULL; + weak_global_ = true; + } + + bool set(JNIEnv *jenv, jobject jobj, bool mem_own, bool weak_global) { + if (!jthis_) { + weak_global_ = weak_global; + if (jobj) + jthis_ = ((weak_global_ || !mem_own) ? jenv->NewWeakGlobalRef(jobj) : jenv->NewGlobalRef(jobj)); +#if defined(DEBUG_DIRECTOR_OWNED) + std::cout << "JObjectWrapper::set(" << jobj << ", " << (weak_global ? "weak_global" : "global_ref") << ") -> " << jthis_ << std::endl; +#endif + return true; + } else { +#if defined(DEBUG_DIRECTOR_OWNED) + std::cout << "JObjectWrapper::set(" << jobj << ", " << (weak_global ? "weak_global" : "global_ref") << ") -> already set" << std::endl; +#endif + return false; + } + } + + jobject get(JNIEnv *jenv) const { +#if defined(DEBUG_DIRECTOR_OWNED) + std::cout << "JObjectWrapper::get("; + if (jthis_) + std::cout << jthis_; + else + std::cout << "null"; + std::cout << ") -> return new local ref" << std::endl; +#endif + return (jthis_ ? jenv->NewLocalRef(jthis_) : jthis_); + } + + void release(JNIEnv *jenv) { +#if defined(DEBUG_DIRECTOR_OWNED) + std::cout << "JObjectWrapper::release(" << jthis_ << "): " << (weak_global_ ? "weak global ref" : "global ref") << std::endl; +#endif + if (jthis_) { + if (weak_global_) { + if (jenv->IsSameObject(jthis_, NULL) == JNI_FALSE) + jenv->DeleteWeakGlobalRef((jweak)jthis_); + } else + jenv->DeleteGlobalRef(jthis_); + } + + jthis_ = NULL; + weak_global_ = true; + } + + jobject peek() { + return jthis_; + } + + /* Java proxy releases ownership of C++ object, C++ object is now + responsible for destruction (creates NewGlobalRef to pin Java + proxy) */ + void java_change_ownership(JNIEnv *jenv, jobject jself, bool take_or_release) { + if (take_or_release) { /* Java takes ownership of C++ object's lifetime. */ + if (!weak_global_) { + jenv->DeleteGlobalRef(jthis_); + jthis_ = jenv->NewWeakGlobalRef(jself); + weak_global_ = true; + } + } else { /* Java releases ownership of C++ object's lifetime */ + if (weak_global_) { + jenv->DeleteWeakGlobalRef((jweak)jthis_); + jthis_ = jenv->NewGlobalRef(jself); + weak_global_ = false; + } + } + } + + private: + /* pointer to Java object */ + jobject jthis_; + /* Local or global reference flag */ + bool weak_global_; + }; + + /* director base class */ + class Director { + /* pointer to Java virtual machine */ + JavaVM *swig_jvm_; + + protected: +#if defined (_MSC_VER) && (_MSC_VER<1300) + class JNIEnvWrapper; + friend class JNIEnvWrapper; +#endif + /* Utility class for managing the JNI environment */ + class JNIEnvWrapper { + const Director *director_; + JNIEnv *jenv_; + public: + JNIEnvWrapper(const Director *director) : director_(director), jenv_(0) { +#if defined(SWIG_JAVA_ATTACH_CURRENT_THREAD_AS_DAEMON) + // Attach a daemon thread to the JVM. Useful when the JVM should not wait for + // the thread to exit upon shutdown. Only for jdk-1.4 and later. + director_->swig_jvm_->AttachCurrentThreadAsDaemon((void **) &jenv_, NULL); +#else + director_->swig_jvm_->AttachCurrentThread((void **) &jenv_, NULL); +#endif + } + ~JNIEnvWrapper() { +#if !defined(SWIG_JAVA_NO_DETACH_CURRENT_THREAD) + // Some JVMs, eg jdk-1.4.2 and lower on Solaris have a bug and crash with the DetachCurrentThread call. + // However, without this call, the JVM hangs on exit when the thread was not created by the JVM and creates a memory leak. + director_->swig_jvm_->DetachCurrentThread(); +#endif + } + JNIEnv *getJNIEnv() const { + return jenv_; + } + }; + + /* Java object wrapper */ + JObjectWrapper swig_self_; + + /* Disconnect director from Java object */ + void swig_disconnect_director_self(const char *disconn_method) { + JNIEnvWrapper jnienv(this) ; + JNIEnv *jenv = jnienv.getJNIEnv() ; + jobject jobj = swig_self_.peek(); +#if defined(DEBUG_DIRECTOR_OWNED) + std::cout << "Swig::Director::disconnect_director_self(" << jobj << ")" << std::endl; +#endif + if (jobj && jenv->IsSameObject(jobj, NULL) == JNI_FALSE) { + jmethodID disconn_meth = jenv->GetMethodID(jenv->GetObjectClass(jobj), disconn_method, "()V"); + if (disconn_meth) { +#if defined(DEBUG_DIRECTOR_OWNED) + std::cout << "Swig::Director::disconnect_director_self upcall to " << disconn_method << std::endl; +#endif + jenv->CallVoidMethod(jobj, disconn_meth); + } + } + } + + public: + Director(JNIEnv *jenv) : swig_jvm_((JavaVM *) NULL), swig_self_() { + /* Acquire the Java VM pointer */ + jenv->GetJavaVM(&swig_jvm_); + } + + virtual ~Director() { + JNIEnvWrapper jnienv(this) ; + JNIEnv *jenv = jnienv.getJNIEnv() ; + swig_self_.release(jenv); + } + + bool swig_set_self(JNIEnv *jenv, jobject jself, bool mem_own, bool weak_global) { + return swig_self_.set(jenv, jself, mem_own, weak_global); + } + + jobject swig_get_self(JNIEnv *jenv) const { + return swig_self_.get(jenv); + } + + // Change C++ object's ownership, relative to Java + void swig_java_change_ownership(JNIEnv *jenv, jobject jself, bool take_or_release) { + swig_self_.java_change_ownership(jenv, jself, take_or_release); + } + }; +} + +#endif /* __cplusplus */ + + namespace Swig { static jclass jclass_tinyWRAPJNI = NULL; static jmethodID director_methids[7]; @@ -825,7 +824,7 @@ SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipMessage_1ge } arg3 = (unsigned int)jarg3; result = (char *)(arg1)->getSipHeaderValue((char const *)arg2,arg3); - if (result) jresult = jenv->NewStringUTF((const char *)result); + if(result) jresult = jenv->NewStringUTF((const char *)result); if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); delete [] result; return jresult; @@ -848,7 +847,7 @@ SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipMessage_1ge if (!arg2) return 0; } result = (char *)(arg1)->getSipHeaderValue((char const *)arg2); - if (result) jresult = jenv->NewStringUTF((const char *)result); + if(result) jresult = jenv->NewStringUTF((const char *)result); if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); delete [] result; return jresult; @@ -879,7 +878,7 @@ SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipMessage_1ge } arg4 = (unsigned int)jarg4; result = (char *)(arg1)->getSipHeaderParamValue((char const *)arg2,(char const *)arg3,arg4); - if (result) jresult = jenv->NewStringUTF((const char *)result); + if(result) jresult = jenv->NewStringUTF((const char *)result); if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3); return jresult; @@ -908,13 +907,50 @@ SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipMessage_1ge if (!arg3) return 0; } result = (char *)(arg1)->getSipHeaderParamValue((char const *)arg2,(char const *)arg3); - if (result) jresult = jenv->NewStringUTF((const char *)result); + if(result) jresult = jenv->NewStringUTF((const char *)result); if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3); return jresult; } +SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipMessage_1getSipContentLength(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { + jlong jresult = 0 ; + SipMessage *arg1 = (SipMessage *) 0 ; + unsigned int result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(SipMessage **)&jarg1; + result = (unsigned int)(arg1)->getSipContentLength(); + jresult = (jlong)result; + return jresult; +} + + +SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipMessage_1getSipContent(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jbyteArray jarg2, jlong jarg3) { + jlong jresult = 0 ; + SipMessage *arg1 = (SipMessage *) 0 ; + void *arg2 = (void *) 0 ; + unsigned int arg3 ; + unsigned int result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(SipMessage **)&jarg1; + + arg2 = jarg2; + //arg2 = "mamadou"; + + arg3 = (unsigned int)jarg3; + result = (unsigned int)(arg1)->getSipContent(arg2,arg3); + jresult = (jlong)result; + return jresult; +} + + SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_new_1SipEvent(JNIEnv *jenv, jclass jcls) { jlong jresult = 0 ; SipEvent *result = 0 ; @@ -962,7 +998,7 @@ SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipEvent_1getP (void)jarg1_; arg1 = *(SipEvent **)&jarg1; result = (char *)((SipEvent const *)arg1)->getPhrase(); - if (result) jresult = jenv->NewStringUTF((const char *)result); + if(result) jresult = jenv->NewStringUTF((const char *)result); return jresult; } @@ -1284,7 +1320,7 @@ SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_delete_1Publicati } -SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_PublicationSession_1Publish(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, void * jarg2, jlong jarg3) { +SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_PublicationSession_1Publish(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jbyteArray jarg2, jlong jarg3) { jboolean jresult = 0 ; PublicationSession *arg1 = (PublicationSession *) 0 ; void *arg2 = (void *) 0 ; @@ -1295,7 +1331,10 @@ SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_PublicationSe (void)jcls; (void)jarg1_; arg1 = *(PublicationSession **)&jarg1; - arg2 = jarg2; + + arg2 = jarg2; + //arg2 = "mamadou"; + arg3 = (unsigned int)jarg3; result = (bool)(arg1)->Publish((void const *)arg2,arg3); jresult = (jboolean)result; diff --git a/trunk/bindings/java/tinyWRAP_wrap.h b/trunk/bindings/java/tinyWRAP_wrap.h index 1ec69de4..9e47d4a4 100644 --- a/trunk/bindings/java/tinyWRAP_wrap.h +++ b/trunk/bindings/java/tinyWRAP_wrap.h @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make diff --git a/trunk/bindings/java/tsip_event_type_t.java b/trunk/bindings/java/tsip_event_type_t.java index 819967fb..6527ee1e 100644 --- a/trunk/bindings/java/tsip_event_type_t.java +++ b/trunk/bindings/java/tsip_event_type_t.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/trunk/bindings/java/tsip_publish_event_type_t.java b/trunk/bindings/java/tsip_publish_event_type_t.java index 83b125c7..639fa514 100644 --- a/trunk/bindings/java/tsip_publish_event_type_t.java +++ b/trunk/bindings/java/tsip_publish_event_type_t.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/trunk/bindings/java/tsip_register_event_type_t.java b/trunk/bindings/java/tsip_register_event_type_t.java index e6de02c8..8e497d94 100644 --- a/trunk/bindings/java/tsip_register_event_type_t.java +++ b/trunk/bindings/java/tsip_register_event_type_t.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/trunk/bindings/java/tsip_subscribe_event_type_t.java b/trunk/bindings/java/tsip_subscribe_event_type_t.java index f3fea2ed..ae77c65f 100644 --- a/trunk/bindings/java/tsip_subscribe_event_type_t.java +++ b/trunk/bindings/java/tsip_subscribe_event_type_t.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/trunk/bindings/perl/tinyWRAP.pm b/trunk/bindings/perl/tinyWRAP.pm index d0d70213..1c56a3d4 100644 --- a/trunk/bindings/perl/tinyWRAP.pm +++ b/trunk/bindings/perl/tinyWRAP.pm @@ -1,5 +1,5 @@ # This file was automatically generated by SWIG (http://www.swig.org). -# Version 1.3.40 +# Version 1.3.39 # # Do not make changes to this file unless you know what you are doing--modify # the SWIG interface file instead. @@ -114,6 +114,8 @@ sub DESTROY { *getSipHeaderValue = *tinyWRAPc::SipMessage_getSipHeaderValue; *getSipHeaderParamValue = *tinyWRAPc::SipMessage_getSipHeaderParamValue; +*getSipContentLength = *tinyWRAPc::SipMessage_getSipContentLength; +*getSipContent = *tinyWRAPc::SipMessage_getSipContent; sub DISOWN { my $self = shift; my $ptr = tied(%$self); diff --git a/trunk/bindings/perl/tinyWRAP_wrap.cxx b/trunk/bindings/perl/tinyWRAP_wrap.cxx index 3ba9657c..608fd748 100644 --- a/trunk/bindings/perl/tinyWRAP_wrap.cxx +++ b/trunk/bindings/perl/tinyWRAP_wrap.cxx @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make @@ -35,1472 +35,1455 @@ template T SwigValueInit() { } #endif -/* ----------------------------------------------------------------------------- - * This section contains generic SWIG labels for method/variable - * declarations/attributes, and other compiler dependent labels. - * ----------------------------------------------------------------------------- */ - -/* template workaround for compilers that cannot correctly implement the C++ standard */ -#ifndef SWIGTEMPLATEDISAMBIGUATOR -# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) -# define SWIGTEMPLATEDISAMBIGUATOR template -# elif defined(__HP_aCC) -/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ -/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ -# define SWIGTEMPLATEDISAMBIGUATOR template -# else -# define SWIGTEMPLATEDISAMBIGUATOR -# endif -#endif - -/* inline attribute */ -#ifndef SWIGINLINE -# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) -# define SWIGINLINE inline -# else -# define SWIGINLINE -# endif -#endif - -/* attribute recognised by some compilers to avoid 'unused' warnings */ -#ifndef SWIGUNUSED -# if defined(__GNUC__) -# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) -# define SWIGUNUSED __attribute__ ((__unused__)) -# else -# define SWIGUNUSED -# endif -# elif defined(__ICC) -# define SWIGUNUSED __attribute__ ((__unused__)) -# else -# define SWIGUNUSED -# endif -#endif - -#ifndef SWIG_MSC_UNSUPPRESS_4505 -# if defined(_MSC_VER) -# pragma warning(disable : 4505) /* unreferenced local function has been removed */ -# endif -#endif - -#ifndef SWIGUNUSEDPARM -# ifdef __cplusplus -# define SWIGUNUSEDPARM(p) -# else -# define SWIGUNUSEDPARM(p) p SWIGUNUSED -# endif -#endif - -/* internal SWIG method */ -#ifndef SWIGINTERN -# define SWIGINTERN static SWIGUNUSED -#endif - -/* internal inline SWIG method */ -#ifndef SWIGINTERNINLINE -# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE -#endif - -/* exporting methods */ -#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) -# ifndef GCC_HASCLASSVISIBILITY -# define GCC_HASCLASSVISIBILITY -# endif -#endif - -#ifndef SWIGEXPORT -# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) -# if defined(STATIC_LINKED) -# define SWIGEXPORT -# else -# define SWIGEXPORT __declspec(dllexport) -# endif -# else -# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) -# define SWIGEXPORT __attribute__ ((visibility("default"))) -# else -# define SWIGEXPORT -# endif -# endif -#endif - -/* calling conventions for Windows */ -#ifndef SWIGSTDCALL -# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) -# define SWIGSTDCALL __stdcall -# else -# define SWIGSTDCALL -# endif -#endif - -/* Deal with Microsoft's attempt at deprecating C standard runtime functions */ -#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) -# define _CRT_SECURE_NO_DEPRECATE -#endif - -/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ -#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) -# define _SCL_SECURE_NO_DEPRECATE -#endif - - -/* ----------------------------------------------------------------------------- - * swigrun.swg - * - * This file contains generic C API SWIG runtime support for pointer - * type checking. - * ----------------------------------------------------------------------------- */ - -/* This should only be incremented when either the layout of swig_type_info changes, - or for whatever reason, the runtime changes incompatibly */ -#define SWIG_RUNTIME_VERSION "4" - -/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */ -#ifdef SWIG_TYPE_TABLE -# define SWIG_QUOTE_STRING(x) #x -# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x) -# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE) -#else -# define SWIG_TYPE_TABLE_NAME -#endif - -/* - You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for - creating a static or dynamic library from the SWIG runtime code. - In 99.9% of the cases, SWIG just needs to declare them as 'static'. - - But only do this if strictly necessary, ie, if you have problems - with your compiler or suchlike. -*/ - -#ifndef SWIGRUNTIME -# define SWIGRUNTIME SWIGINTERN -#endif - -#ifndef SWIGRUNTIMEINLINE -# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE -#endif - -/* Generic buffer size */ -#ifndef SWIG_BUFFER_SIZE -# define SWIG_BUFFER_SIZE 1024 -#endif - -/* Flags for pointer conversions */ -#define SWIG_POINTER_DISOWN 0x1 -#define SWIG_CAST_NEW_MEMORY 0x2 - -/* Flags for new pointer objects */ -#define SWIG_POINTER_OWN 0x1 - - -/* - Flags/methods for returning states. - - The SWIG conversion methods, as ConvertPtr, return and integer - that tells if the conversion was successful or not. And if not, - an error code can be returned (see swigerrors.swg for the codes). - - Use the following macros/flags to set or process the returning - states. - - In old versions of SWIG, code such as the following was usually written: - - if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) { - // success code - } else { - //fail code - } - - Now you can be more explicit: - - int res = SWIG_ConvertPtr(obj,vptr,ty.flags); - if (SWIG_IsOK(res)) { - // success code - } else { - // fail code - } - - which is the same really, but now you can also do - - Type *ptr; - int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags); - if (SWIG_IsOK(res)) { - // success code - if (SWIG_IsNewObj(res) { - ... - delete *ptr; - } else { - ... - } - } else { - // fail code - } - - I.e., now SWIG_ConvertPtr can return new objects and you can - identify the case and take care of the deallocation. Of course that - also requires SWIG_ConvertPtr to return new result values, such as - - int SWIG_ConvertPtr(obj, ptr,...) { - if () { - if () { - *ptr = ; - return SWIG_NEWOBJ; - } else { - *ptr = ; - return SWIG_OLDOBJ; - } - } else { - return SWIG_BADOBJ; - } - } - - Of course, returning the plain '0(success)/-1(fail)' still works, but you can be - more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the - SWIG errors code. - - Finally, if the SWIG_CASTRANK_MODE is enabled, the result code - allows to return the 'cast rank', for example, if you have this - - int food(double) - int fooi(int); - - and you call - - food(1) // cast rank '1' (1 -> 1.0) - fooi(1) // cast rank '0' - - just use the SWIG_AddCast()/SWIG_CheckState() -*/ - -#define SWIG_OK (0) -#define SWIG_ERROR (-1) -#define SWIG_IsOK(r) (r >= 0) -#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) - -/* The CastRankLimit says how many bits are used for the cast rank */ -#define SWIG_CASTRANKLIMIT (1 << 8) -/* The NewMask denotes the object was created (using new/malloc) */ -#define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1) -/* The TmpMask is for in/out typemaps that use temporal objects */ -#define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1) -/* Simple returning values */ -#define SWIG_BADOBJ (SWIG_ERROR) -#define SWIG_OLDOBJ (SWIG_OK) -#define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK) -#define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK) -/* Check, add and del mask methods */ -#define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r) -#define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r) -#define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK)) -#define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r) -#define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r) -#define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK)) - -/* Cast-Rank Mode */ -#if defined(SWIG_CASTRANK_MODE) -# ifndef SWIG_TypeRank -# define SWIG_TypeRank unsigned long -# endif -# ifndef SWIG_MAXCASTRANK /* Default cast allowed */ -# define SWIG_MAXCASTRANK (2) -# endif -# define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1) -# define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK) -SWIGINTERNINLINE int SWIG_AddCast(int r) { - return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r; -} -SWIGINTERNINLINE int SWIG_CheckState(int r) { - return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; -} -#else /* no cast-rank mode */ -# define SWIG_AddCast -# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) -#endif - - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -typedef void *(*swig_converter_func)(void *, int *); -typedef struct swig_type_info *(*swig_dycast_func)(void **); - -/* Structure to store information on one type */ -typedef struct swig_type_info { - const char *name; /* mangled name of this type */ - const char *str; /* human readable name of this type */ - swig_dycast_func dcast; /* dynamic cast function down a hierarchy */ - struct swig_cast_info *cast; /* linked list of types that can cast into this type */ - void *clientdata; /* language specific type data */ - int owndata; /* flag if the structure owns the clientdata */ -} swig_type_info; - -/* Structure to store a type and conversion function used for casting */ -typedef struct swig_cast_info { - swig_type_info *type; /* pointer to type that is equivalent to this type */ - swig_converter_func converter; /* function to cast the void pointers */ - struct swig_cast_info *next; /* pointer to next cast in linked list */ - struct swig_cast_info *prev; /* pointer to the previous cast */ -} swig_cast_info; - -/* Structure used to store module information - * Each module generates one structure like this, and the runtime collects - * all of these structures and stores them in a circularly linked list.*/ -typedef struct swig_module_info { - swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */ - size_t size; /* Number of types in this module */ - struct swig_module_info *next; /* Pointer to next element in circularly linked list */ - swig_type_info **type_initial; /* Array of initially generated type structures */ - swig_cast_info **cast_initial; /* Array of initially generated casting structures */ - void *clientdata; /* Language specific module data */ -} swig_module_info; - -/* - Compare two type names skipping the space characters, therefore - "char*" == "char *" and "Class" == "Class", etc. - - Return 0 when the two name types are equivalent, as in - strncmp, but skipping ' '. -*/ -SWIGRUNTIME int -SWIG_TypeNameComp(const char *f1, const char *l1, - const char *f2, const char *l2) { - for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) { - while ((*f1 == ' ') && (f1 != l1)) ++f1; - while ((*f2 == ' ') && (f2 != l2)) ++f2; - if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1; - } - return (int)((l1 - f1) - (l2 - f2)); -} - -/* - Check type equivalence in a name list like ||... - Return 0 if not equal, 1 if equal -*/ -SWIGRUNTIME int -SWIG_TypeEquiv(const char *nb, const char *tb) { - int equiv = 0; - const char* te = tb + strlen(tb); - const char* ne = nb; - while (!equiv && *ne) { - for (nb = ne; *ne; ++ne) { - if (*ne == '|') break; - } - equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; - if (*ne) ++ne; - } - return equiv; -} - -/* - Check type equivalence in a name list like ||... - Return 0 if equal, -1 if nb < tb, 1 if nb > tb -*/ -SWIGRUNTIME int -SWIG_TypeCompare(const char *nb, const char *tb) { - int equiv = 0; - const char* te = tb + strlen(tb); - const char* ne = nb; - while (!equiv && *ne) { - for (nb = ne; *ne; ++ne) { - if (*ne == '|') break; - } - equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; - if (*ne) ++ne; - } - return equiv; -} - - -/* - Check the typename -*/ -SWIGRUNTIME swig_cast_info * -SWIG_TypeCheck(const char *c, swig_type_info *ty) { - if (ty) { - swig_cast_info *iter = ty->cast; - while (iter) { - if (strcmp(iter->type->name, c) == 0) { - if (iter == ty->cast) - return iter; - /* Move iter to the top of the linked list */ - iter->prev->next = iter->next; - if (iter->next) - iter->next->prev = iter->prev; - iter->next = ty->cast; - iter->prev = 0; - if (ty->cast) ty->cast->prev = iter; - ty->cast = iter; - return iter; - } - iter = iter->next; - } - } - return 0; -} - -/* - Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison -*/ -SWIGRUNTIME swig_cast_info * -SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) { - if (ty) { - swig_cast_info *iter = ty->cast; - while (iter) { - if (iter->type == from) { - if (iter == ty->cast) - return iter; - /* Move iter to the top of the linked list */ - iter->prev->next = iter->next; - if (iter->next) - iter->next->prev = iter->prev; - iter->next = ty->cast; - iter->prev = 0; - if (ty->cast) ty->cast->prev = iter; - ty->cast = iter; - return iter; - } - iter = iter->next; - } - } - return 0; -} - -/* - Cast a pointer up an inheritance hierarchy -*/ -SWIGRUNTIMEINLINE void * -SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) { - return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory); -} - -/* - Dynamic pointer casting. Down an inheritance hierarchy -*/ -SWIGRUNTIME swig_type_info * -SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) { - swig_type_info *lastty = ty; - if (!ty || !ty->dcast) return ty; - while (ty && (ty->dcast)) { - ty = (*ty->dcast)(ptr); - if (ty) lastty = ty; - } - return lastty; -} - -/* - Return the name associated with this type -*/ -SWIGRUNTIMEINLINE const char * -SWIG_TypeName(const swig_type_info *ty) { - return ty->name; -} - -/* - Return the pretty name associated with this type, - that is an unmangled type name in a form presentable to the user. -*/ -SWIGRUNTIME const char * -SWIG_TypePrettyName(const swig_type_info *type) { - /* The "str" field contains the equivalent pretty names of the - type, separated by vertical-bar characters. We choose - to print the last name, as it is often (?) the most - specific. */ - if (!type) return NULL; - if (type->str != NULL) { - const char *last_name = type->str; - const char *s; - for (s = type->str; *s; s++) - if (*s == '|') last_name = s+1; - return last_name; - } - else - return type->name; -} - -/* - Set the clientdata field for a type -*/ -SWIGRUNTIME void -SWIG_TypeClientData(swig_type_info *ti, void *clientdata) { - swig_cast_info *cast = ti->cast; - /* if (ti->clientdata == clientdata) return; */ - ti->clientdata = clientdata; - - while (cast) { - if (!cast->converter) { - swig_type_info *tc = cast->type; - if (!tc->clientdata) { - SWIG_TypeClientData(tc, clientdata); - } - } - cast = cast->next; - } -} -SWIGRUNTIME void -SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) { - SWIG_TypeClientData(ti, clientdata); - ti->owndata = 1; -} - -/* - Search for a swig_type_info structure only by mangled name - Search is a O(log #types) - - We start searching at module start, and finish searching when start == end. - Note: if start == end at the beginning of the function, we go all the way around - the circular list. -*/ -SWIGRUNTIME swig_type_info * -SWIG_MangledTypeQueryModule(swig_module_info *start, - swig_module_info *end, - const char *name) { - swig_module_info *iter = start; - do { - if (iter->size) { - register size_t l = 0; - register size_t r = iter->size - 1; - do { - /* since l+r >= 0, we can (>> 1) instead (/ 2) */ - register size_t i = (l + r) >> 1; - const char *iname = iter->types[i]->name; - if (iname) { - register int compare = strcmp(name, iname); - if (compare == 0) { - return iter->types[i]; - } else if (compare < 0) { - if (i) { - r = i - 1; - } else { - break; - } - } else if (compare > 0) { - l = i + 1; - } - } else { - break; /* should never happen */ - } - } while (l <= r); - } - iter = iter->next; - } while (iter != end); - return 0; -} - -/* - Search for a swig_type_info structure for either a mangled name or a human readable name. - It first searches the mangled names of the types, which is a O(log #types) - If a type is not found it then searches the human readable names, which is O(#types). - - We start searching at module start, and finish searching when start == end. - Note: if start == end at the beginning of the function, we go all the way around - the circular list. -*/ -SWIGRUNTIME swig_type_info * -SWIG_TypeQueryModule(swig_module_info *start, - swig_module_info *end, - const char *name) { - /* STEP 1: Search the name field using binary search */ - swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name); - if (ret) { - return ret; - } else { - /* STEP 2: If the type hasn't been found, do a complete search - of the str field (the human readable name) */ - swig_module_info *iter = start; - do { - register size_t i = 0; - for (; i < iter->size; ++i) { - if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name))) - return iter->types[i]; - } - iter = iter->next; - } while (iter != end); - } - - /* neither found a match */ - return 0; -} - -/* - Pack binary data into a string -*/ -SWIGRUNTIME char * -SWIG_PackData(char *c, void *ptr, size_t sz) { - static const char hex[17] = "0123456789abcdef"; - register const unsigned char *u = (unsigned char *) ptr; - register const unsigned char *eu = u + sz; - for (; u != eu; ++u) { - register unsigned char uu = *u; - *(c++) = hex[(uu & 0xf0) >> 4]; - *(c++) = hex[uu & 0xf]; - } - return c; -} - -/* - Unpack binary data from a string -*/ -SWIGRUNTIME const char * -SWIG_UnpackData(const char *c, void *ptr, size_t sz) { - register unsigned char *u = (unsigned char *) ptr; - register const unsigned char *eu = u + sz; - for (; u != eu; ++u) { - register char d = *(c++); - register unsigned char uu; - if ((d >= '0') && (d <= '9')) - uu = ((d - '0') << 4); - else if ((d >= 'a') && (d <= 'f')) - uu = ((d - ('a'-10)) << 4); - else - return (char *) 0; - d = *(c++); - if ((d >= '0') && (d <= '9')) - uu |= (d - '0'); - else if ((d >= 'a') && (d <= 'f')) - uu |= (d - ('a'-10)); - else - return (char *) 0; - *u = uu; - } - return c; -} - -/* - Pack 'void *' into a string buffer. -*/ -SWIGRUNTIME char * -SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) { - char *r = buff; - if ((2*sizeof(void *) + 2) > bsz) return 0; - *(r++) = '_'; - r = SWIG_PackData(r,&ptr,sizeof(void *)); - if (strlen(name) + 1 > (bsz - (r - buff))) return 0; - strcpy(r,name); - return buff; -} - -SWIGRUNTIME const char * -SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) { - if (*c != '_') { - if (strcmp(c,"NULL") == 0) { - *ptr = (void *) 0; - return name; - } else { - return 0; - } - } - return SWIG_UnpackData(++c,ptr,sizeof(void *)); -} - -SWIGRUNTIME char * -SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) { - char *r = buff; - size_t lname = (name ? strlen(name) : 0); - if ((2*sz + 2 + lname) > bsz) return 0; - *(r++) = '_'; - r = SWIG_PackData(r,ptr,sz); - if (lname) { - strncpy(r,name,lname+1); - } else { - *r = 0; - } - return buff; -} - -SWIGRUNTIME const char * -SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { - if (*c != '_') { - if (strcmp(c,"NULL") == 0) { - memset(ptr,0,sz); - return name; - } else { - return 0; - } - } - return SWIG_UnpackData(++c,ptr,sz); -} - -#ifdef __cplusplus -} -#endif - -/* Errors in SWIG */ -#define SWIG_UnknownError -1 -#define SWIG_IOError -2 -#define SWIG_RuntimeError -3 -#define SWIG_IndexError -4 -#define SWIG_TypeError -5 -#define SWIG_DivisionByZero -6 -#define SWIG_OverflowError -7 -#define SWIG_SyntaxError -8 -#define SWIG_ValueError -9 -#define SWIG_SystemError -10 -#define SWIG_AttributeError -11 -#define SWIG_MemoryError -12 -#define SWIG_NullReferenceError -13 - - - -#ifdef __cplusplus -/* Needed on some windows machines---since MS plays funny games with the header files under C++ */ -#include -#include -extern "C" { -#endif -#include "EXTERN.h" -#include "perl.h" -#include "XSUB.h" - -/* Add in functionality missing in older versions of Perl. Much of this is based on Devel-PPPort on cpan. */ - -/* Add PERL_REVISION, PERL_VERSION, PERL_SUBVERSION if missing */ -#ifndef PERL_REVISION -# if !defined(__PATCHLEVEL_H_INCLUDED__) && !(defined(PATCHLEVEL) && defined(SUBVERSION)) -# define PERL_PATCHLEVEL_H_IMPLICIT -# include -# endif -# if !(defined(PERL_VERSION) || (defined(SUBVERSION) && defined(PATCHLEVEL))) -# include -# endif -# ifndef PERL_REVISION -# define PERL_REVISION (5) -# define PERL_VERSION PATCHLEVEL -# define PERL_SUBVERSION SUBVERSION -# endif -#endif - -#if defined(WIN32) && defined(PERL_OBJECT) && !defined(PerlIO_exportFILE) -#define PerlIO_exportFILE(fh,fl) (FILE*)(fh) -#endif - -#ifndef SvIOK_UV -# define SvIOK_UV(sv) (SvIOK(sv) && (SvUVX(sv) == SvIVX(sv))) -#endif - -#ifndef SvUOK -# define SvUOK(sv) SvIOK_UV(sv) -#endif - -#if ((PERL_VERSION < 4) || ((PERL_VERSION == 4) && (PERL_SUBVERSION <= 5))) -# define PL_sv_undef sv_undef -# define PL_na na -# define PL_errgv errgv -# define PL_sv_no sv_no -# define PL_sv_yes sv_yes -# define PL_markstack_ptr markstack_ptr -#endif - -#ifndef IVSIZE -# ifdef LONGSIZE -# define IVSIZE LONGSIZE -# else -# define IVSIZE 4 /* A bold guess, but the best we can make. */ -# endif -#endif - -#ifndef INT2PTR -# if (IVSIZE == PTRSIZE) && (UVSIZE == PTRSIZE) -# define PTRV UV -# define INT2PTR(any,d) (any)(d) -# else -# if PTRSIZE == LONGSIZE -# define PTRV unsigned long -# else -# define PTRV unsigned -# endif -# define INT2PTR(any,d) (any)(PTRV)(d) -# endif - -# define NUM2PTR(any,d) (any)(PTRV)(d) -# define PTR2IV(p) INT2PTR(IV,p) -# define PTR2UV(p) INT2PTR(UV,p) -# define PTR2NV(p) NUM2PTR(NV,p) - -# if PTRSIZE == LONGSIZE -# define PTR2ul(p) (unsigned long)(p) -# else -# define PTR2ul(p) INT2PTR(unsigned long,p) -# endif -#endif /* !INT2PTR */ - -#ifndef SvPV_nolen -# define SvPV_nolen(x) SvPV(x,PL_na) -#endif - -#ifndef get_sv -# define get_sv perl_get_sv -#endif - -#ifndef ERRSV -# define ERRSV get_sv("@",FALSE) -#endif - -#ifndef pTHX_ -#define pTHX_ -#endif - -#include -#ifdef __cplusplus -} -#endif - -/* ----------------------------------------------------------------------------- - * error manipulation - * ----------------------------------------------------------------------------- */ - -SWIGINTERN const char* -SWIG_Perl_ErrorType(int code) { - const char* type = 0; - switch(code) { - case SWIG_MemoryError: - type = "MemoryError"; - break; - case SWIG_IOError: - type = "IOError"; - break; - case SWIG_RuntimeError: - type = "RuntimeError"; - break; - case SWIG_IndexError: - type = "IndexError"; - break; - case SWIG_TypeError: - type = "TypeError"; - break; - case SWIG_DivisionByZero: - type = "ZeroDivisionError"; - break; - case SWIG_OverflowError: - type = "OverflowError"; - break; - case SWIG_SyntaxError: - type = "SyntaxError"; - break; - case SWIG_ValueError: - type = "ValueError"; - break; - case SWIG_SystemError: - type = "SystemError"; - break; - case SWIG_AttributeError: - type = "AttributeError"; - break; - default: - type = "RuntimeError"; - } - return type; -} - - - - -/* ----------------------------------------------------------------------------- - * perlrun.swg - * - * This file contains the runtime support for Perl modules - * and includes code for managing global variables and pointer - * type checking. - * ----------------------------------------------------------------------------- */ - -#ifdef PERL_OBJECT -#define SWIG_PERL_OBJECT_DECL CPerlObj *SWIGUNUSEDPARM(pPerl), -#define SWIG_PERL_OBJECT_CALL pPerl, -#else -#define SWIG_PERL_OBJECT_DECL -#define SWIG_PERL_OBJECT_CALL -#endif - -/* Common SWIG API */ - -/* for raw pointers */ -#define SWIG_ConvertPtr(obj, pp, type, flags) SWIG_Perl_ConvertPtr(SWIG_PERL_OBJECT_CALL obj, pp, type, flags) -#define SWIG_ConvertPtrAndOwn(obj, pp, type, flags,own) SWIG_Perl_ConvertPtrAndOwn(SWIG_PERL_OBJECT_CALL obj, pp, type, flags, own) -#define SWIG_NewPointerObj(p, type, flags) SWIG_Perl_NewPointerObj(SWIG_PERL_OBJECT_CALL p, type, flags) - -/* for raw packed data */ -#define SWIG_ConvertPacked(obj, p, s, type) SWIG_Perl_ConvertPacked(SWIG_PERL_OBJECT_CALL obj, p, s, type) -#define SWIG_NewPackedObj(p, s, type) SWIG_Perl_NewPackedObj(SWIG_PERL_OBJECT_CALL p, s, type) - -/* for class or struct pointers */ -#define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags) -#define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags) - -/* for C or C++ function pointers */ -#define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_ConvertPtr(obj, pptr, type, 0) -#define SWIG_NewFunctionPtrObj(ptr, type) SWIG_NewPointerObj(ptr, type, 0) - -/* for C++ member pointers, ie, member methods */ -#define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_ConvertPacked(obj, ptr, sz, ty) -#define SWIG_NewMemberObj(ptr, sz, type) SWIG_NewPackedObj(ptr, sz, type) - - -/* Runtime API */ - -#define SWIG_GetModule(clientdata) SWIG_Perl_GetModule() -#define SWIG_SetModule(clientdata, pointer) SWIG_Perl_SetModule(pointer) - - -/* Error manipulation */ - -#define SWIG_ErrorType(code) SWIG_Perl_ErrorType(code) -#define SWIG_Error(code, msg) sv_setpvf(GvSV(PL_errgv),"%s %s\n", SWIG_ErrorType(code), msg) -#define SWIG_fail goto fail - -/* Perl-specific SWIG API */ - -#define SWIG_MakePtr(sv, ptr, type, flags) SWIG_Perl_MakePtr(SWIG_PERL_OBJECT_CALL sv, ptr, type, flags) -#define SWIG_MakePackedObj(sv, p, s, type) SWIG_Perl_MakePackedObj(SWIG_PERL_OBJECT_CALL sv, p, s, type) -#define SWIG_SetError(str) SWIG_Error(SWIG_RuntimeError, str) - - -#define SWIG_PERL_DECL_ARGS_1(arg1) (SWIG_PERL_OBJECT_DECL arg1) -#define SWIG_PERL_CALL_ARGS_1(arg1) (SWIG_PERL_OBJECT_CALL arg1) -#define SWIG_PERL_DECL_ARGS_2(arg1, arg2) (SWIG_PERL_OBJECT_DECL arg1, arg2) -#define SWIG_PERL_CALL_ARGS_2(arg1, arg2) (SWIG_PERL_OBJECT_CALL arg1, arg2) - -/* ----------------------------------------------------------------------------- - * pointers/data manipulation - * ----------------------------------------------------------------------------- */ - -/* For backward compatibility only */ -#define SWIG_POINTER_EXCEPTION 0 - -#ifdef __cplusplus -extern "C" { -#endif - -#define SWIG_OWNER SWIG_POINTER_OWN -#define SWIG_SHADOW SWIG_OWNER << 1 - -#define SWIG_MAYBE_PERL_OBJECT SWIG_PERL_OBJECT_DECL - -/* SWIG Perl macros */ - -/* Macro to declare an XS function */ -#ifndef XSPROTO -# define XSPROTO(name) void name(pTHX_ CV* cv) -#endif - -/* Macro to call an XS function */ -#ifdef PERL_OBJECT -# define SWIG_CALLXS(_name) _name(cv,pPerl) -#else -# ifndef MULTIPLICITY -# define SWIG_CALLXS(_name) _name(cv) -# else -# define SWIG_CALLXS(_name) _name(PERL_GET_THX, cv) -# endif -#endif - -#ifdef PERL_OBJECT -#define MAGIC_PPERL CPerlObj *pPerl = (CPerlObj *) this; - -#ifdef __cplusplus -extern "C" { -#endif -typedef int (CPerlObj::*SwigMagicFunc)(SV *, MAGIC *); -#ifdef __cplusplus -} -#endif - -#define SWIG_MAGIC(a,b) (SV *a, MAGIC *b) -#define SWIGCLASS_STATIC - -#else /* PERL_OBJECT */ - -#define MAGIC_PPERL -#define SWIGCLASS_STATIC static SWIGUNUSED - -#ifndef MULTIPLICITY -#define SWIG_MAGIC(a,b) (SV *a, MAGIC *b) - -#ifdef __cplusplus -extern "C" { -#endif -typedef int (*SwigMagicFunc)(SV *, MAGIC *); -#ifdef __cplusplus -} -#endif - -#else /* MULTIPLICITY */ - -#define SWIG_MAGIC(a,b) (struct interpreter *interp, SV *a, MAGIC *b) - -#ifdef __cplusplus -extern "C" { -#endif -typedef int (*SwigMagicFunc)(struct interpreter *, SV *, MAGIC *); -#ifdef __cplusplus -} -#endif - -#endif /* MULTIPLICITY */ -#endif /* PERL_OBJECT */ - -/* Workaround for bug in perl 5.6.x croak and earlier */ -#if (PERL_VERSION < 8) -# ifdef PERL_OBJECT -# define SWIG_croak_null() SWIG_Perl_croak_null(pPerl) -static void SWIG_Perl_croak_null(CPerlObj *pPerl) -# else -static void SWIG_croak_null() -# endif -{ - SV *err=ERRSV; -# if (PERL_VERSION < 6) - croak("%_", err); -# else - if (SvOK(err) && !SvROK(err)) croak("%_", err); - croak(Nullch); -# endif -} -#else -# define SWIG_croak_null() croak(Nullch) -#endif - - -/* - Define how strict is the cast between strings and integers/doubles - when overloading between these types occurs. - - The default is making it as strict as possible by using SWIG_AddCast - when needed. - - You can use -DSWIG_PERL_NO_STRICT_STR2NUM at compilation time to - disable the SWIG_AddCast, making the casting between string and - numbers less strict. - - In the end, we try to solve the overloading between strings and - numerical types in the more natural way, but if you can avoid it, - well, avoid it using %rename, for example. -*/ -#ifndef SWIG_PERL_NO_STRICT_STR2NUM -# ifndef SWIG_PERL_STRICT_STR2NUM -# define SWIG_PERL_STRICT_STR2NUM -# endif -#endif -#ifdef SWIG_PERL_STRICT_STR2NUM -/* string takes precedence */ -#define SWIG_Str2NumCast(x) SWIG_AddCast(x) -#else -/* number takes precedence */ -#define SWIG_Str2NumCast(x) x -#endif - - - -#include - -SWIGRUNTIME const char * -SWIG_Perl_TypeProxyName(const swig_type_info *type) { - if (!type) return NULL; - if (type->clientdata != NULL) { - return (const char*) type->clientdata; - } - else { - return type->name; - } -} - -/* Identical to SWIG_TypeCheck, except for strcmp comparison */ -SWIGRUNTIME swig_cast_info * -SWIG_TypeProxyCheck(const char *c, swig_type_info *ty) { - if (ty) { - swig_cast_info *iter = ty->cast; - while (iter) { - if ( (!iter->type->clientdata && (strcmp(iter->type->name, c) == 0)) || - (iter->type->clientdata && (strcmp((char*)iter->type->clientdata, c) == 0)) ) { - if (iter == ty->cast) - return iter; - /* Move iter to the top of the linked list */ - iter->prev->next = iter->next; - if (iter->next) - iter->next->prev = iter->prev; - iter->next = ty->cast; - iter->prev = 0; - if (ty->cast) ty->cast->prev = iter; - ty->cast = iter; - return iter; - } - iter = iter->next; - } - } - return 0; -} - -/* Function for getting a pointer value */ - -SWIGRUNTIME int -SWIG_Perl_ConvertPtrAndOwn(SWIG_MAYBE_PERL_OBJECT SV *sv, void **ptr, swig_type_info *_t, int flags, int *own) { - swig_cast_info *tc; - void *voidptr = (void *)0; - SV *tsv = 0; - - if (own) - *own = 0; - - /* If magical, apply more magic */ - if (SvGMAGICAL(sv)) - mg_get(sv); - - /* Check to see if this is an object */ - if (sv_isobject(sv)) { - IV tmp = 0; - tsv = (SV*) SvRV(sv); - if ((SvTYPE(tsv) == SVt_PVHV)) { - MAGIC *mg; - if (SvMAGICAL(tsv)) { - mg = mg_find(tsv,'P'); - if (mg) { - sv = mg->mg_obj; - if (sv_isobject(sv)) { - tsv = (SV*)SvRV(sv); - tmp = SvIV(tsv); - } - } - } else { - return SWIG_ERROR; - } - } else { - tmp = SvIV(tsv); - } - voidptr = INT2PTR(void *,tmp); - } else if (! SvOK(sv)) { /* Check for undef */ - *(ptr) = (void *) 0; - return SWIG_OK; - } else if (SvTYPE(sv) == SVt_RV) { /* Check for NULL pointer */ - if (!SvROK(sv)) { - *(ptr) = (void *) 0; - return SWIG_OK; - } else { - return SWIG_ERROR; - } - } else { /* Don't know what it is */ - return SWIG_ERROR; - } - if (_t) { - /* Now see if the types match */ - char *_c = HvNAME(SvSTASH(SvRV(sv))); - tc = SWIG_TypeProxyCheck(_c,_t); - if (!tc) { - return SWIG_ERROR; - } - { - int newmemory = 0; - *ptr = SWIG_TypeCast(tc,voidptr,&newmemory); - if (newmemory == SWIG_CAST_NEW_MEMORY) { - assert(own); - if (own) - *own = *own | SWIG_CAST_NEW_MEMORY; - } - } - } else { - *ptr = voidptr; - } - - /* - * DISOWN implementation: we need a perl guru to check this one. - */ - if (tsv && (flags & SWIG_POINTER_DISOWN)) { - /* - * almost copy paste code from below SWIG_POINTER_OWN setting - */ - SV *obj = sv; - HV *stash = SvSTASH(SvRV(obj)); - GV *gv = *(GV**) hv_fetch(stash, "OWNER", 5, TRUE); - if (isGV(gv)) { - HV *hv = GvHVn(gv); - /* - * To set ownership (see below), a newSViv(1) entry is added. - * Hence, to remove ownership, we delete the entry. - */ - if (hv_exists_ent(hv, obj, 0)) { - hv_delete_ent(hv, obj, 0, 0); - } - } - } - return SWIG_OK; -} - -SWIGRUNTIME int -SWIG_Perl_ConvertPtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void **ptr, swig_type_info *_t, int flags) { - return SWIG_Perl_ConvertPtrAndOwn(sv, ptr, _t, flags, 0); -} - -SWIGRUNTIME void -SWIG_Perl_MakePtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void *ptr, swig_type_info *t, int flags) { - if (ptr && (flags & (SWIG_SHADOW | SWIG_POINTER_OWN))) { - SV *self; - SV *obj=newSV(0); - HV *hash=newHV(); - HV *stash; - sv_setref_pv(obj, (char *) SWIG_Perl_TypeProxyName(t), ptr); - stash=SvSTASH(SvRV(obj)); - if (flags & SWIG_POINTER_OWN) { - HV *hv; - GV *gv=*(GV**)hv_fetch(stash, "OWNER", 5, TRUE); - if (!isGV(gv)) - gv_init(gv, stash, "OWNER", 5, FALSE); - hv=GvHVn(gv); - hv_store_ent(hv, obj, newSViv(1), 0); - } - sv_magic((SV *)hash, (SV *)obj, 'P', Nullch, 0); - SvREFCNT_dec(obj); - self=newRV_noinc((SV *)hash); - sv_setsv(sv, self); - SvREFCNT_dec((SV *)self); - sv_bless(sv, stash); - } - else { - sv_setref_pv(sv, (char *) SWIG_Perl_TypeProxyName(t), ptr); - } -} - -SWIGRUNTIMEINLINE SV * -SWIG_Perl_NewPointerObj(SWIG_MAYBE_PERL_OBJECT void *ptr, swig_type_info *t, int flags) { - SV *result = sv_newmortal(); - SWIG_MakePtr(result, ptr, t, flags); - return result; -} - -SWIGRUNTIME void -SWIG_Perl_MakePackedObj(SWIG_MAYBE_PERL_OBJECT SV *sv, void *ptr, int sz, swig_type_info *type) { - char result[1024]; - char *r = result; - if ((2*sz + 1 + strlen(SWIG_Perl_TypeProxyName(type))) > 1000) return; - *(r++) = '_'; - r = SWIG_PackData(r,ptr,sz); - strcpy(r,SWIG_Perl_TypeProxyName(type)); - sv_setpv(sv, result); -} - -SWIGRUNTIME SV * -SWIG_Perl_NewPackedObj(SWIG_MAYBE_PERL_OBJECT void *ptr, int sz, swig_type_info *type) { - SV *result = sv_newmortal(); - SWIG_Perl_MakePackedObj(result, ptr, sz, type); - return result; -} - -/* Convert a packed value value */ -SWIGRUNTIME int -SWIG_Perl_ConvertPacked(SWIG_MAYBE_PERL_OBJECT SV *obj, void *ptr, int sz, swig_type_info *ty) { - swig_cast_info *tc; - const char *c = 0; - - if ((!obj) || (!SvOK(obj))) return SWIG_ERROR; - c = SvPV_nolen(obj); - /* Pointer values must start with leading underscore */ - if (*c != '_') return SWIG_ERROR; - c++; - c = SWIG_UnpackData(c,ptr,sz); - if (ty) { - tc = SWIG_TypeCheck(c,ty); - if (!tc) return SWIG_ERROR; - } - return SWIG_OK; -} - - -/* Macros for low-level exception handling */ -#define SWIG_croak(x) { SWIG_Error(SWIG_RuntimeError, x); SWIG_fail; } - - -typedef XSPROTO(SwigPerlWrapper); -typedef SwigPerlWrapper *SwigPerlWrapperPtr; - -/* Structure for command table */ -typedef struct { - const char *name; - SwigPerlWrapperPtr wrapper; -} swig_command_info; - -/* Information for constant table */ - -#define SWIG_INT 1 -#define SWIG_FLOAT 2 -#define SWIG_STRING 3 -#define SWIG_POINTER 4 -#define SWIG_BINARY 5 - -/* Constant information structure */ -typedef struct swig_constant_info { - int type; - const char *name; - long lvalue; - double dvalue; - void *pvalue; - swig_type_info **ptype; -} swig_constant_info; - - -/* Structure for variable table */ -typedef struct { - const char *name; - SwigMagicFunc set; - SwigMagicFunc get; - swig_type_info **type; -} swig_variable_info; - -/* Magic variable code */ -#ifndef PERL_OBJECT -#define swig_create_magic(s,a,b,c) _swig_create_magic(s,a,b,c) - #ifndef MULTIPLICITY - SWIGRUNTIME void _swig_create_magic(SV *sv, char *name, int (*set)(SV *, MAGIC *), int (*get)(SV *,MAGIC *)) - #else - SWIGRUNTIME void _swig_create_magic(SV *sv, char *name, int (*set)(struct interpreter*, SV *, MAGIC *), int (*get)(struct interpreter*, SV *,MAGIC *)) - #endif -#else -# define swig_create_magic(s,a,b,c) _swig_create_magic(pPerl,s,a,b,c) -SWIGRUNTIME void _swig_create_magic(CPerlObj *pPerl, SV *sv, const char *name, int (CPerlObj::*set)(SV *, MAGIC *), int (CPerlObj::*get)(SV *, MAGIC *)) -#endif -{ - MAGIC *mg; - sv_magic(sv,sv,'U',(char *) name,strlen(name)); - mg = mg_find(sv,'U'); - mg->mg_virtual = (MGVTBL *) malloc(sizeof(MGVTBL)); - mg->mg_virtual->svt_get = (SwigMagicFunc) get; - mg->mg_virtual->svt_set = (SwigMagicFunc) set; - mg->mg_virtual->svt_len = 0; - mg->mg_virtual->svt_clear = 0; - mg->mg_virtual->svt_free = 0; -} - - -SWIGRUNTIME swig_module_info * -SWIG_Perl_GetModule(void) { - static void *type_pointer = (void *)0; - SV *pointer; - - /* first check if pointer already created */ - if (!type_pointer) { - pointer = get_sv("swig_runtime_data::type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, FALSE | GV_ADDMULTI); - if (pointer && SvOK(pointer)) { - type_pointer = INT2PTR(swig_type_info **, SvIV(pointer)); - } - } - - return (swig_module_info *) type_pointer; -} - -SWIGRUNTIME void -SWIG_Perl_SetModule(swig_module_info *module) { - SV *pointer; - - /* create a new pointer */ - pointer = get_sv("swig_runtime_data::type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, TRUE | GV_ADDMULTI); - sv_setiv(pointer, PTR2IV(module)); -} - -#ifdef __cplusplus -} -#endif - -/* Workaround perl5 global namespace pollution. Note that undefining library - * functions like fopen will not solve the problem on all platforms as fopen - * might be a macro on Windows but not necessarily on other operating systems. */ -#ifdef do_open - #undef do_open -#endif -#ifdef do_close - #undef do_close -#endif -#ifdef do_exec - #undef do_exec -#endif -#ifdef scalar - #undef scalar -#endif -#ifdef list - #undef list -#endif -#ifdef apply - #undef apply -#endif -#ifdef convert - #undef convert -#endif -#ifdef Error - #undef Error -#endif -#ifdef form - #undef form -#endif -#ifdef vform - #undef vform -#endif -#ifdef LABEL - #undef LABEL -#endif -#ifdef METHOD - #undef METHOD -#endif -#ifdef Move - #undef Move -#endif -#ifdef yylex - #undef yylex -#endif -#ifdef yyparse - #undef yyparse -#endif -#ifdef yyerror - #undef yyerror -#endif -#ifdef invert - #undef invert -#endif -#ifdef ref - #undef ref -#endif -#ifdef read - #undef read -#endif -#ifdef write - #undef write -#endif -#ifdef eof - #undef eof -#endif -#ifdef bool - #undef bool -#endif -#ifdef close - #undef close -#endif -#ifdef rewind - #undef rewind -#endif -#ifdef free - #undef free -#endif -#ifdef malloc - #undef malloc -#endif -#ifdef calloc - #undef calloc -#endif -#ifdef Stat - #undef Stat -#endif -#ifdef check - #undef check -#endif -#ifdef seekdir - #undef seekdir -#endif -#ifdef open - #undef open -#endif -#ifdef readdir - #undef readdir -#endif -#ifdef bind - #undef bind -#endif +/* ----------------------------------------------------------------------------- + * This section contains generic SWIG labels for method/variable + * declarations/attributes, and other compiler dependent labels. + * ----------------------------------------------------------------------------- */ + +/* template workaround for compilers that cannot correctly implement the C++ standard */ +#ifndef SWIGTEMPLATEDISAMBIGUATOR +# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) +# define SWIGTEMPLATEDISAMBIGUATOR template +# elif defined(__HP_aCC) +/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ +/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ +# define SWIGTEMPLATEDISAMBIGUATOR template +# else +# define SWIGTEMPLATEDISAMBIGUATOR +# endif +#endif + +/* inline attribute */ +#ifndef SWIGINLINE +# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) +# define SWIGINLINE inline +# else +# define SWIGINLINE +# endif +#endif + +/* attribute recognised by some compilers to avoid 'unused' warnings */ +#ifndef SWIGUNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define SWIGUNUSED __attribute__ ((__unused__)) +# else +# define SWIGUNUSED +# endif +# elif defined(__ICC) +# define SWIGUNUSED __attribute__ ((__unused__)) +# else +# define SWIGUNUSED +# endif +#endif + +#ifndef SWIG_MSC_UNSUPPRESS_4505 +# if defined(_MSC_VER) +# pragma warning(disable : 4505) /* unreferenced local function has been removed */ +# endif +#endif + +#ifndef SWIGUNUSEDPARM +# ifdef __cplusplus +# define SWIGUNUSEDPARM(p) +# else +# define SWIGUNUSEDPARM(p) p SWIGUNUSED +# endif +#endif + +/* internal SWIG method */ +#ifndef SWIGINTERN +# define SWIGINTERN static SWIGUNUSED +#endif + +/* internal inline SWIG method */ +#ifndef SWIGINTERNINLINE +# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE +#endif + +/* exporting methods */ +#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) +# ifndef GCC_HASCLASSVISIBILITY +# define GCC_HASCLASSVISIBILITY +# endif +#endif + +#ifndef SWIGEXPORT +# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# if defined(STATIC_LINKED) +# define SWIGEXPORT +# else +# define SWIGEXPORT __declspec(dllexport) +# endif +# else +# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) +# define SWIGEXPORT __attribute__ ((visibility("default"))) +# else +# define SWIGEXPORT +# endif +# endif +#endif + +/* calling conventions for Windows */ +#ifndef SWIGSTDCALL +# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# define SWIGSTDCALL __stdcall +# else +# define SWIGSTDCALL +# endif +#endif + +/* Deal with Microsoft's attempt at deprecating C standard runtime functions */ +#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) +# define _CRT_SECURE_NO_DEPRECATE +#endif + +/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ +#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) +# define _SCL_SECURE_NO_DEPRECATE +#endif + + +/* ----------------------------------------------------------------------------- + * swigrun.swg + * + * This file contains generic C API SWIG runtime support for pointer + * type checking. + * ----------------------------------------------------------------------------- */ + +/* This should only be incremented when either the layout of swig_type_info changes, + or for whatever reason, the runtime changes incompatibly */ +#define SWIG_RUNTIME_VERSION "4" + +/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */ +#ifdef SWIG_TYPE_TABLE +# define SWIG_QUOTE_STRING(x) #x +# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x) +# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE) +#else +# define SWIG_TYPE_TABLE_NAME +#endif + +/* + You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for + creating a static or dynamic library from the SWIG runtime code. + In 99.9% of the cases, SWIG just needs to declare them as 'static'. + + But only do this if strictly necessary, ie, if you have problems + with your compiler or suchlike. +*/ + +#ifndef SWIGRUNTIME +# define SWIGRUNTIME SWIGINTERN +#endif + +#ifndef SWIGRUNTIMEINLINE +# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE +#endif + +/* Generic buffer size */ +#ifndef SWIG_BUFFER_SIZE +# define SWIG_BUFFER_SIZE 1024 +#endif + +/* Flags for pointer conversions */ +#define SWIG_POINTER_DISOWN 0x1 +#define SWIG_CAST_NEW_MEMORY 0x2 + +/* Flags for new pointer objects */ +#define SWIG_POINTER_OWN 0x1 + + +/* + Flags/methods for returning states. + + The SWIG conversion methods, as ConvertPtr, return and integer + that tells if the conversion was successful or not. And if not, + an error code can be returned (see swigerrors.swg for the codes). + + Use the following macros/flags to set or process the returning + states. + + In old versions of SWIG, code such as the following was usually written: + + if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) { + // success code + } else { + //fail code + } + + Now you can be more explicit: + + int res = SWIG_ConvertPtr(obj,vptr,ty.flags); + if (SWIG_IsOK(res)) { + // success code + } else { + // fail code + } + + which is the same really, but now you can also do + + Type *ptr; + int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags); + if (SWIG_IsOK(res)) { + // success code + if (SWIG_IsNewObj(res) { + ... + delete *ptr; + } else { + ... + } + } else { + // fail code + } + + I.e., now SWIG_ConvertPtr can return new objects and you can + identify the case and take care of the deallocation. Of course that + also requires SWIG_ConvertPtr to return new result values, such as + + int SWIG_ConvertPtr(obj, ptr,...) { + if () { + if () { + *ptr = ; + return SWIG_NEWOBJ; + } else { + *ptr = ; + return SWIG_OLDOBJ; + } + } else { + return SWIG_BADOBJ; + } + } + + Of course, returning the plain '0(success)/-1(fail)' still works, but you can be + more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the + SWIG errors code. + + Finally, if the SWIG_CASTRANK_MODE is enabled, the result code + allows to return the 'cast rank', for example, if you have this + + int food(double) + int fooi(int); + + and you call + + food(1) // cast rank '1' (1 -> 1.0) + fooi(1) // cast rank '0' + + just use the SWIG_AddCast()/SWIG_CheckState() +*/ + +#define SWIG_OK (0) +#define SWIG_ERROR (-1) +#define SWIG_IsOK(r) (r >= 0) +#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) + +/* The CastRankLimit says how many bits are used for the cast rank */ +#define SWIG_CASTRANKLIMIT (1 << 8) +/* The NewMask denotes the object was created (using new/malloc) */ +#define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1) +/* The TmpMask is for in/out typemaps that use temporal objects */ +#define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1) +/* Simple returning values */ +#define SWIG_BADOBJ (SWIG_ERROR) +#define SWIG_OLDOBJ (SWIG_OK) +#define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK) +#define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK) +/* Check, add and del mask methods */ +#define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r) +#define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r) +#define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK)) +#define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r) +#define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r) +#define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK)) + +/* Cast-Rank Mode */ +#if defined(SWIG_CASTRANK_MODE) +# ifndef SWIG_TypeRank +# define SWIG_TypeRank unsigned long +# endif +# ifndef SWIG_MAXCASTRANK /* Default cast allowed */ +# define SWIG_MAXCASTRANK (2) +# endif +# define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1) +# define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK) +SWIGINTERNINLINE int SWIG_AddCast(int r) { + return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r; +} +SWIGINTERNINLINE int SWIG_CheckState(int r) { + return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; +} +#else /* no cast-rank mode */ +# define SWIG_AddCast +# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) +#endif + + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef void *(*swig_converter_func)(void *, int *); +typedef struct swig_type_info *(*swig_dycast_func)(void **); + +/* Structure to store information on one type */ +typedef struct swig_type_info { + const char *name; /* mangled name of this type */ + const char *str; /* human readable name of this type */ + swig_dycast_func dcast; /* dynamic cast function down a hierarchy */ + struct swig_cast_info *cast; /* linked list of types that can cast into this type */ + void *clientdata; /* language specific type data */ + int owndata; /* flag if the structure owns the clientdata */ +} swig_type_info; + +/* Structure to store a type and conversion function used for casting */ +typedef struct swig_cast_info { + swig_type_info *type; /* pointer to type that is equivalent to this type */ + swig_converter_func converter; /* function to cast the void pointers */ + struct swig_cast_info *next; /* pointer to next cast in linked list */ + struct swig_cast_info *prev; /* pointer to the previous cast */ +} swig_cast_info; + +/* Structure used to store module information + * Each module generates one structure like this, and the runtime collects + * all of these structures and stores them in a circularly linked list.*/ +typedef struct swig_module_info { + swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */ + size_t size; /* Number of types in this module */ + struct swig_module_info *next; /* Pointer to next element in circularly linked list */ + swig_type_info **type_initial; /* Array of initially generated type structures */ + swig_cast_info **cast_initial; /* Array of initially generated casting structures */ + void *clientdata; /* Language specific module data */ +} swig_module_info; + +/* + Compare two type names skipping the space characters, therefore + "char*" == "char *" and "Class" == "Class", etc. + + Return 0 when the two name types are equivalent, as in + strncmp, but skipping ' '. +*/ +SWIGRUNTIME int +SWIG_TypeNameComp(const char *f1, const char *l1, + const char *f2, const char *l2) { + for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) { + while ((*f1 == ' ') && (f1 != l1)) ++f1; + while ((*f2 == ' ') && (f2 != l2)) ++f2; + if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1; + } + return (int)((l1 - f1) - (l2 - f2)); +} + +/* + Check type equivalence in a name list like ||... + Return 0 if not equal, 1 if equal +*/ +SWIGRUNTIME int +SWIG_TypeEquiv(const char *nb, const char *tb) { + int equiv = 0; + const char* te = tb + strlen(tb); + const char* ne = nb; + while (!equiv && *ne) { + for (nb = ne; *ne; ++ne) { + if (*ne == '|') break; + } + equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; + if (*ne) ++ne; + } + return equiv; +} + +/* + Check type equivalence in a name list like ||... + Return 0 if equal, -1 if nb < tb, 1 if nb > tb +*/ +SWIGRUNTIME int +SWIG_TypeCompare(const char *nb, const char *tb) { + int equiv = 0; + const char* te = tb + strlen(tb); + const char* ne = nb; + while (!equiv && *ne) { + for (nb = ne; *ne; ++ne) { + if (*ne == '|') break; + } + equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; + if (*ne) ++ne; + } + return equiv; +} + + +/* + Check the typename +*/ +SWIGRUNTIME swig_cast_info * +SWIG_TypeCheck(const char *c, swig_type_info *ty) { + if (ty) { + swig_cast_info *iter = ty->cast; + while (iter) { + if (strcmp(iter->type->name, c) == 0) { + if (iter == ty->cast) + return iter; + /* Move iter to the top of the linked list */ + iter->prev->next = iter->next; + if (iter->next) + iter->next->prev = iter->prev; + iter->next = ty->cast; + iter->prev = 0; + if (ty->cast) ty->cast->prev = iter; + ty->cast = iter; + return iter; + } + iter = iter->next; + } + } + return 0; +} + +/* + Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison +*/ +SWIGRUNTIME swig_cast_info * +SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) { + if (ty) { + swig_cast_info *iter = ty->cast; + while (iter) { + if (iter->type == from) { + if (iter == ty->cast) + return iter; + /* Move iter to the top of the linked list */ + iter->prev->next = iter->next; + if (iter->next) + iter->next->prev = iter->prev; + iter->next = ty->cast; + iter->prev = 0; + if (ty->cast) ty->cast->prev = iter; + ty->cast = iter; + return iter; + } + iter = iter->next; + } + } + return 0; +} + +/* + Cast a pointer up an inheritance hierarchy +*/ +SWIGRUNTIMEINLINE void * +SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) { + return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory); +} + +/* + Dynamic pointer casting. Down an inheritance hierarchy +*/ +SWIGRUNTIME swig_type_info * +SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) { + swig_type_info *lastty = ty; + if (!ty || !ty->dcast) return ty; + while (ty && (ty->dcast)) { + ty = (*ty->dcast)(ptr); + if (ty) lastty = ty; + } + return lastty; +} + +/* + Return the name associated with this type +*/ +SWIGRUNTIMEINLINE const char * +SWIG_TypeName(const swig_type_info *ty) { + return ty->name; +} + +/* + Return the pretty name associated with this type, + that is an unmangled type name in a form presentable to the user. +*/ +SWIGRUNTIME const char * +SWIG_TypePrettyName(const swig_type_info *type) { + /* The "str" field contains the equivalent pretty names of the + type, separated by vertical-bar characters. We choose + to print the last name, as it is often (?) the most + specific. */ + if (!type) return NULL; + if (type->str != NULL) { + const char *last_name = type->str; + const char *s; + for (s = type->str; *s; s++) + if (*s == '|') last_name = s+1; + return last_name; + } + else + return type->name; +} + +/* + Set the clientdata field for a type +*/ +SWIGRUNTIME void +SWIG_TypeClientData(swig_type_info *ti, void *clientdata) { + swig_cast_info *cast = ti->cast; + /* if (ti->clientdata == clientdata) return; */ + ti->clientdata = clientdata; + + while (cast) { + if (!cast->converter) { + swig_type_info *tc = cast->type; + if (!tc->clientdata) { + SWIG_TypeClientData(tc, clientdata); + } + } + cast = cast->next; + } +} +SWIGRUNTIME void +SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) { + SWIG_TypeClientData(ti, clientdata); + ti->owndata = 1; +} + +/* + Search for a swig_type_info structure only by mangled name + Search is a O(log #types) + + We start searching at module start, and finish searching when start == end. + Note: if start == end at the beginning of the function, we go all the way around + the circular list. +*/ +SWIGRUNTIME swig_type_info * +SWIG_MangledTypeQueryModule(swig_module_info *start, + swig_module_info *end, + const char *name) { + swig_module_info *iter = start; + do { + if (iter->size) { + register size_t l = 0; + register size_t r = iter->size - 1; + do { + /* since l+r >= 0, we can (>> 1) instead (/ 2) */ + register size_t i = (l + r) >> 1; + const char *iname = iter->types[i]->name; + if (iname) { + register int compare = strcmp(name, iname); + if (compare == 0) { + return iter->types[i]; + } else if (compare < 0) { + if (i) { + r = i - 1; + } else { + break; + } + } else if (compare > 0) { + l = i + 1; + } + } else { + break; /* should never happen */ + } + } while (l <= r); + } + iter = iter->next; + } while (iter != end); + return 0; +} + +/* + Search for a swig_type_info structure for either a mangled name or a human readable name. + It first searches the mangled names of the types, which is a O(log #types) + If a type is not found it then searches the human readable names, which is O(#types). + + We start searching at module start, and finish searching when start == end. + Note: if start == end at the beginning of the function, we go all the way around + the circular list. +*/ +SWIGRUNTIME swig_type_info * +SWIG_TypeQueryModule(swig_module_info *start, + swig_module_info *end, + const char *name) { + /* STEP 1: Search the name field using binary search */ + swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name); + if (ret) { + return ret; + } else { + /* STEP 2: If the type hasn't been found, do a complete search + of the str field (the human readable name) */ + swig_module_info *iter = start; + do { + register size_t i = 0; + for (; i < iter->size; ++i) { + if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name))) + return iter->types[i]; + } + iter = iter->next; + } while (iter != end); + } + + /* neither found a match */ + return 0; +} + +/* + Pack binary data into a string +*/ +SWIGRUNTIME char * +SWIG_PackData(char *c, void *ptr, size_t sz) { + static const char hex[17] = "0123456789abcdef"; + register const unsigned char *u = (unsigned char *) ptr; + register const unsigned char *eu = u + sz; + for (; u != eu; ++u) { + register unsigned char uu = *u; + *(c++) = hex[(uu & 0xf0) >> 4]; + *(c++) = hex[uu & 0xf]; + } + return c; +} + +/* + Unpack binary data from a string +*/ +SWIGRUNTIME const char * +SWIG_UnpackData(const char *c, void *ptr, size_t sz) { + register unsigned char *u = (unsigned char *) ptr; + register const unsigned char *eu = u + sz; + for (; u != eu; ++u) { + register char d = *(c++); + register unsigned char uu; + if ((d >= '0') && (d <= '9')) + uu = ((d - '0') << 4); + else if ((d >= 'a') && (d <= 'f')) + uu = ((d - ('a'-10)) << 4); + else + return (char *) 0; + d = *(c++); + if ((d >= '0') && (d <= '9')) + uu |= (d - '0'); + else if ((d >= 'a') && (d <= 'f')) + uu |= (d - ('a'-10)); + else + return (char *) 0; + *u = uu; + } + return c; +} + +/* + Pack 'void *' into a string buffer. +*/ +SWIGRUNTIME char * +SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) { + char *r = buff; + if ((2*sizeof(void *) + 2) > bsz) return 0; + *(r++) = '_'; + r = SWIG_PackData(r,&ptr,sizeof(void *)); + if (strlen(name) + 1 > (bsz - (r - buff))) return 0; + strcpy(r,name); + return buff; +} + +SWIGRUNTIME const char * +SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) { + if (*c != '_') { + if (strcmp(c,"NULL") == 0) { + *ptr = (void *) 0; + return name; + } else { + return 0; + } + } + return SWIG_UnpackData(++c,ptr,sizeof(void *)); +} + +SWIGRUNTIME char * +SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) { + char *r = buff; + size_t lname = (name ? strlen(name) : 0); + if ((2*sz + 2 + lname) > bsz) return 0; + *(r++) = '_'; + r = SWIG_PackData(r,ptr,sz); + if (lname) { + strncpy(r,name,lname+1); + } else { + *r = 0; + } + return buff; +} + +SWIGRUNTIME const char * +SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { + if (*c != '_') { + if (strcmp(c,"NULL") == 0) { + memset(ptr,0,sz); + return name; + } else { + return 0; + } + } + return SWIG_UnpackData(++c,ptr,sz); +} + +#ifdef __cplusplus +} +#endif + +/* Errors in SWIG */ +#define SWIG_UnknownError -1 +#define SWIG_IOError -2 +#define SWIG_RuntimeError -3 +#define SWIG_IndexError -4 +#define SWIG_TypeError -5 +#define SWIG_DivisionByZero -6 +#define SWIG_OverflowError -7 +#define SWIG_SyntaxError -8 +#define SWIG_ValueError -9 +#define SWIG_SystemError -10 +#define SWIG_AttributeError -11 +#define SWIG_MemoryError -12 +#define SWIG_NullReferenceError -13 + + + +#ifdef __cplusplus +/* Needed on some windows machines---since MS plays funny games with the header files under C++ */ +#include +#include +extern "C" { +#endif +#include "EXTERN.h" +#include "perl.h" +#include "XSUB.h" + +/* Add in functionality missing in older versions of Perl. Much of this is based on Devel-PPPort on cpan. */ + +/* Add PERL_REVISION, PERL_VERSION, PERL_SUBVERSION if missing */ +#ifndef PERL_REVISION +# if !defined(__PATCHLEVEL_H_INCLUDED__) && !(defined(PATCHLEVEL) && defined(SUBVERSION)) +# define PERL_PATCHLEVEL_H_IMPLICIT +# include +# endif +# if !(defined(PERL_VERSION) || (defined(SUBVERSION) && defined(PATCHLEVEL))) +# include +# endif +# ifndef PERL_REVISION +# define PERL_REVISION (5) +# define PERL_VERSION PATCHLEVEL +# define PERL_SUBVERSION SUBVERSION +# endif +#endif + +#if defined(WIN32) && defined(PERL_OBJECT) && !defined(PerlIO_exportFILE) +#define PerlIO_exportFILE(fh,fl) (FILE*)(fh) +#endif + +#ifndef SvIOK_UV +# define SvIOK_UV(sv) (SvIOK(sv) && (SvUVX(sv) == SvIVX(sv))) +#endif + +#ifndef SvUOK +# define SvUOK(sv) SvIOK_UV(sv) +#endif + +#if ((PERL_VERSION < 4) || ((PERL_VERSION == 4) && (PERL_SUBVERSION <= 5))) +# define PL_sv_undef sv_undef +# define PL_na na +# define PL_errgv errgv +# define PL_sv_no sv_no +# define PL_sv_yes sv_yes +# define PL_markstack_ptr markstack_ptr +#endif + +#ifndef IVSIZE +# ifdef LONGSIZE +# define IVSIZE LONGSIZE +# else +# define IVSIZE 4 /* A bold guess, but the best we can make. */ +# endif +#endif + +#ifndef INT2PTR +# if (IVSIZE == PTRSIZE) && (UVSIZE == PTRSIZE) +# define PTRV UV +# define INT2PTR(any,d) (any)(d) +# else +# if PTRSIZE == LONGSIZE +# define PTRV unsigned long +# else +# define PTRV unsigned +# endif +# define INT2PTR(any,d) (any)(PTRV)(d) +# endif + +# define NUM2PTR(any,d) (any)(PTRV)(d) +# define PTR2IV(p) INT2PTR(IV,p) +# define PTR2UV(p) INT2PTR(UV,p) +# define PTR2NV(p) NUM2PTR(NV,p) + +# if PTRSIZE == LONGSIZE +# define PTR2ul(p) (unsigned long)(p) +# else +# define PTR2ul(p) INT2PTR(unsigned long,p) +# endif +#endif /* !INT2PTR */ + +#ifndef SvPV_nolen +# define SvPV_nolen(x) SvPV(x,PL_na) +#endif + +#ifndef get_sv +# define get_sv perl_get_sv +#endif + +#ifndef ERRSV +# define ERRSV get_sv("@",FALSE) +#endif + +#ifndef pTHX_ +#define pTHX_ +#endif + +#include +#ifdef __cplusplus +} +#endif + +/* ----------------------------------------------------------------------------- + * error manipulation + * ----------------------------------------------------------------------------- */ + +SWIGINTERN const char* +SWIG_Perl_ErrorType(int code) { + const char* type = 0; + switch(code) { + case SWIG_MemoryError: + type = "MemoryError"; + break; + case SWIG_IOError: + type = "IOError"; + break; + case SWIG_RuntimeError: + type = "RuntimeError"; + break; + case SWIG_IndexError: + type = "IndexError"; + break; + case SWIG_TypeError: + type = "TypeError"; + break; + case SWIG_DivisionByZero: + type = "ZeroDivisionError"; + break; + case SWIG_OverflowError: + type = "OverflowError"; + break; + case SWIG_SyntaxError: + type = "SyntaxError"; + break; + case SWIG_ValueError: + type = "ValueError"; + break; + case SWIG_SystemError: + type = "SystemError"; + break; + case SWIG_AttributeError: + type = "AttributeError"; + break; + default: + type = "RuntimeError"; + } + return type; +} + + + + +/* ----------------------------------------------------------------------------- + * perlrun.swg + * + * This file contains the runtime support for Perl modules + * and includes code for managing global variables and pointer + * type checking. + * ----------------------------------------------------------------------------- */ + +#ifdef PERL_OBJECT +#define SWIG_PERL_OBJECT_DECL CPerlObj *SWIGUNUSEDPARM(pPerl), +#define SWIG_PERL_OBJECT_CALL pPerl, +#else +#define SWIG_PERL_OBJECT_DECL +#define SWIG_PERL_OBJECT_CALL +#endif + +/* Common SWIG API */ + +/* for raw pointers */ +#define SWIG_ConvertPtr(obj, pp, type, flags) SWIG_Perl_ConvertPtr(SWIG_PERL_OBJECT_CALL obj, pp, type, flags) +#define SWIG_NewPointerObj(p, type, flags) SWIG_Perl_NewPointerObj(SWIG_PERL_OBJECT_CALL p, type, flags) + +/* for raw packed data */ +#define SWIG_ConvertPacked(obj, p, s, type) SWIG_Perl_ConvertPacked(SWIG_PERL_OBJECT_CALL obj, p, s, type) +#define SWIG_NewPackedObj(p, s, type) SWIG_Perl_NewPackedObj(SWIG_PERL_OBJECT_CALL p, s, type) + +/* for class or struct pointers */ +#define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags) +#define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags) + +/* for C or C++ function pointers */ +#define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_ConvertPtr(obj, pptr, type, 0) +#define SWIG_NewFunctionPtrObj(ptr, type) SWIG_NewPointerObj(ptr, type, 0) + +/* for C++ member pointers, ie, member methods */ +#define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_ConvertPacked(obj, ptr, sz, ty) +#define SWIG_NewMemberObj(ptr, sz, type) SWIG_NewPackedObj(ptr, sz, type) + + +/* Runtime API */ + +#define SWIG_GetModule(clientdata) SWIG_Perl_GetModule() +#define SWIG_SetModule(clientdata, pointer) SWIG_Perl_SetModule(pointer) + + +/* Error manipulation */ + +#define SWIG_ErrorType(code) SWIG_Perl_ErrorType(code) +#define SWIG_Error(code, msg) sv_setpvf(GvSV(PL_errgv),"%s %s\n", SWIG_ErrorType(code), msg) +#define SWIG_fail goto fail + +/* Perl-specific SWIG API */ + +#define SWIG_MakePtr(sv, ptr, type, flags) SWIG_Perl_MakePtr(SWIG_PERL_OBJECT_CALL sv, ptr, type, flags) +#define SWIG_MakePackedObj(sv, p, s, type) SWIG_Perl_MakePackedObj(SWIG_PERL_OBJECT_CALL sv, p, s, type) +#define SWIG_SetError(str) SWIG_Error(SWIG_RuntimeError, str) + + +#define SWIG_PERL_DECL_ARGS_1(arg1) (SWIG_PERL_OBJECT_DECL arg1) +#define SWIG_PERL_CALL_ARGS_1(arg1) (SWIG_PERL_OBJECT_CALL arg1) +#define SWIG_PERL_DECL_ARGS_2(arg1, arg2) (SWIG_PERL_OBJECT_DECL arg1, arg2) +#define SWIG_PERL_CALL_ARGS_2(arg1, arg2) (SWIG_PERL_OBJECT_CALL arg1, arg2) + +/* ----------------------------------------------------------------------------- + * pointers/data manipulation + * ----------------------------------------------------------------------------- */ + +/* For backward compatibility only */ +#define SWIG_POINTER_EXCEPTION 0 + +#ifdef __cplusplus +extern "C" { +#endif + +#define SWIG_OWNER SWIG_POINTER_OWN +#define SWIG_SHADOW SWIG_OWNER << 1 + +#define SWIG_MAYBE_PERL_OBJECT SWIG_PERL_OBJECT_DECL + +/* SWIG Perl macros */ + +/* Macro to declare an XS function */ +#ifndef XSPROTO +# define XSPROTO(name) void name(pTHX_ CV* cv) +#endif + +/* Macro to call an XS function */ +#ifdef PERL_OBJECT +# define SWIG_CALLXS(_name) _name(cv,pPerl) +#else +# ifndef MULTIPLICITY +# define SWIG_CALLXS(_name) _name(cv) +# else +# define SWIG_CALLXS(_name) _name(PERL_GET_THX, cv) +# endif +#endif + +#ifdef PERL_OBJECT +#define MAGIC_PPERL CPerlObj *pPerl = (CPerlObj *) this; + +#ifdef __cplusplus +extern "C" { +#endif +typedef int (CPerlObj::*SwigMagicFunc)(SV *, MAGIC *); +#ifdef __cplusplus +} +#endif + +#define SWIG_MAGIC(a,b) (SV *a, MAGIC *b) +#define SWIGCLASS_STATIC + +#else /* PERL_OBJECT */ + +#define MAGIC_PPERL +#define SWIGCLASS_STATIC static SWIGUNUSED + +#ifndef MULTIPLICITY +#define SWIG_MAGIC(a,b) (SV *a, MAGIC *b) + +#ifdef __cplusplus +extern "C" { +#endif +typedef int (*SwigMagicFunc)(SV *, MAGIC *); +#ifdef __cplusplus +} +#endif + +#else /* MULTIPLICITY */ + +#define SWIG_MAGIC(a,b) (struct interpreter *interp, SV *a, MAGIC *b) + +#ifdef __cplusplus +extern "C" { +#endif +typedef int (*SwigMagicFunc)(struct interpreter *, SV *, MAGIC *); +#ifdef __cplusplus +} +#endif + +#endif /* MULTIPLICITY */ +#endif /* PERL_OBJECT */ + +/* Workaround for bug in perl 5.6.x croak and earlier */ +#if (PERL_VERSION < 8) +# ifdef PERL_OBJECT +# define SWIG_croak_null() SWIG_Perl_croak_null(pPerl) +static void SWIG_Perl_croak_null(CPerlObj *pPerl) +# else +static void SWIG_croak_null() +# endif +{ + SV *err=ERRSV; +# if (PERL_VERSION < 6) + croak("%_", err); +# else + if (SvOK(err) && !SvROK(err)) croak("%_", err); + croak(Nullch); +# endif +} +#else +# define SWIG_croak_null() croak(Nullch) +#endif + + +/* + Define how strict is the cast between strings and integers/doubles + when overloading between these types occurs. + + The default is making it as strict as possible by using SWIG_AddCast + when needed. + + You can use -DSWIG_PERL_NO_STRICT_STR2NUM at compilation time to + disable the SWIG_AddCast, making the casting between string and + numbers less strict. + + In the end, we try to solve the overloading between strings and + numerical types in the more natural way, but if you can avoid it, + well, avoid it using %rename, for example. +*/ +#ifndef SWIG_PERL_NO_STRICT_STR2NUM +# ifndef SWIG_PERL_STRICT_STR2NUM +# define SWIG_PERL_STRICT_STR2NUM +# endif +#endif +#ifdef SWIG_PERL_STRICT_STR2NUM +/* string takes precedence */ +#define SWIG_Str2NumCast(x) SWIG_AddCast(x) +#else +/* number takes precedence */ +#define SWIG_Str2NumCast(x) x +#endif + + + +#include + +SWIGRUNTIME const char * +SWIG_Perl_TypeProxyName(const swig_type_info *type) { + if (!type) return NULL; + if (type->clientdata != NULL) { + return (const char*) type->clientdata; + } + else { + return type->name; + } +} + +/* Identical to SWIG_TypeCheck, except for strcmp comparison */ +SWIGRUNTIME swig_cast_info * +SWIG_TypeProxyCheck(const char *c, swig_type_info *ty) { + if (ty) { + swig_cast_info *iter = ty->cast; + while (iter) { + if ( (!iter->type->clientdata && (strcmp(iter->type->name, c) == 0)) || + (iter->type->clientdata && (strcmp((char*)iter->type->clientdata, c) == 0)) ) { + if (iter == ty->cast) + return iter; + /* Move iter to the top of the linked list */ + iter->prev->next = iter->next; + if (iter->next) + iter->next->prev = iter->prev; + iter->next = ty->cast; + iter->prev = 0; + if (ty->cast) ty->cast->prev = iter; + ty->cast = iter; + return iter; + } + iter = iter->next; + } + } + return 0; +} + +/* Function for getting a pointer value */ + +SWIGRUNTIME int +SWIG_Perl_ConvertPtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void **ptr, swig_type_info *_t, int flags) { + swig_cast_info *tc; + void *voidptr = (void *)0; + SV *tsv = 0; + /* If magical, apply more magic */ + if (SvGMAGICAL(sv)) + mg_get(sv); + + /* Check to see if this is an object */ + if (sv_isobject(sv)) { + IV tmp = 0; + tsv = (SV*) SvRV(sv); + if ((SvTYPE(tsv) == SVt_PVHV)) { + MAGIC *mg; + if (SvMAGICAL(tsv)) { + mg = mg_find(tsv,'P'); + if (mg) { + sv = mg->mg_obj; + if (sv_isobject(sv)) { + tsv = (SV*)SvRV(sv); + tmp = SvIV(tsv); + } + } + } else { + return SWIG_ERROR; + } + } else { + tmp = SvIV(tsv); + } + voidptr = INT2PTR(void *,tmp); + } else if (! SvOK(sv)) { /* Check for undef */ + *(ptr) = (void *) 0; + return SWIG_OK; + } else if (SvTYPE(sv) == SVt_RV) { /* Check for NULL pointer */ + if (!SvROK(sv)) { + *(ptr) = (void *) 0; + return SWIG_OK; + } else { + return SWIG_ERROR; + } + } else { /* Don't know what it is */ + return SWIG_ERROR; + } + if (_t) { + /* Now see if the types match */ + char *_c = HvNAME(SvSTASH(SvRV(sv))); + tc = SWIG_TypeProxyCheck(_c,_t); + if (!tc) { + return SWIG_ERROR; + } + { + int newmemory = 0; + *ptr = SWIG_TypeCast(tc,voidptr,&newmemory); + assert(!newmemory); /* newmemory handling not yet implemented */ + } + } else { + *ptr = voidptr; + } + + /* + * DISOWN implementation: we need a perl guru to check this one. + */ + if (tsv && (flags & SWIG_POINTER_DISOWN)) { + /* + * almost copy paste code from below SWIG_POINTER_OWN setting + */ + SV *obj = sv; + HV *stash = SvSTASH(SvRV(obj)); + GV *gv = *(GV**) hv_fetch(stash, "OWNER", 5, TRUE); + if (isGV(gv)) { + HV *hv = GvHVn(gv); + /* + * To set ownership (see below), a newSViv(1) entry is added. + * Hence, to remove ownership, we delete the entry. + */ + if (hv_exists_ent(hv, obj, 0)) { + hv_delete_ent(hv, obj, 0, 0); + } + } + } + return SWIG_OK; +} + +SWIGRUNTIME void +SWIG_Perl_MakePtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void *ptr, swig_type_info *t, int flags) { + if (ptr && (flags & SWIG_SHADOW)) { + SV *self; + SV *obj=newSV(0); + HV *hash=newHV(); + HV *stash; + sv_setref_pv(obj, (char *) SWIG_Perl_TypeProxyName(t), ptr); + stash=SvSTASH(SvRV(obj)); + if (flags & SWIG_POINTER_OWN) { + HV *hv; + GV *gv=*(GV**)hv_fetch(stash, "OWNER", 5, TRUE); + if (!isGV(gv)) + gv_init(gv, stash, "OWNER", 5, FALSE); + hv=GvHVn(gv); + hv_store_ent(hv, obj, newSViv(1), 0); + } + sv_magic((SV *)hash, (SV *)obj, 'P', Nullch, 0); + SvREFCNT_dec(obj); + self=newRV_noinc((SV *)hash); + sv_setsv(sv, self); + SvREFCNT_dec((SV *)self); + sv_bless(sv, stash); + } + else { + sv_setref_pv(sv, (char *) SWIG_Perl_TypeProxyName(t), ptr); + } +} + +SWIGRUNTIMEINLINE SV * +SWIG_Perl_NewPointerObj(SWIG_MAYBE_PERL_OBJECT void *ptr, swig_type_info *t, int flags) { + SV *result = sv_newmortal(); + SWIG_MakePtr(result, ptr, t, flags); + return result; +} + +SWIGRUNTIME void +SWIG_Perl_MakePackedObj(SWIG_MAYBE_PERL_OBJECT SV *sv, void *ptr, int sz, swig_type_info *type) { + char result[1024]; + char *r = result; + if ((2*sz + 1 + strlen(SWIG_Perl_TypeProxyName(type))) > 1000) return; + *(r++) = '_'; + r = SWIG_PackData(r,ptr,sz); + strcpy(r,SWIG_Perl_TypeProxyName(type)); + sv_setpv(sv, result); +} + +SWIGRUNTIME SV * +SWIG_Perl_NewPackedObj(SWIG_MAYBE_PERL_OBJECT void *ptr, int sz, swig_type_info *type) { + SV *result = sv_newmortal(); + SWIG_Perl_MakePackedObj(result, ptr, sz, type); + return result; +} + +/* Convert a packed value value */ +SWIGRUNTIME int +SWIG_Perl_ConvertPacked(SWIG_MAYBE_PERL_OBJECT SV *obj, void *ptr, int sz, swig_type_info *ty) { + swig_cast_info *tc; + const char *c = 0; + + if ((!obj) || (!SvOK(obj))) return SWIG_ERROR; + c = SvPV_nolen(obj); + /* Pointer values must start with leading underscore */ + if (*c != '_') return SWIG_ERROR; + c++; + c = SWIG_UnpackData(c,ptr,sz); + if (ty) { + tc = SWIG_TypeCheck(c,ty); + if (!tc) return SWIG_ERROR; + } + return SWIG_OK; +} + + +/* Macros for low-level exception handling */ +#define SWIG_croak(x) { SWIG_Error(SWIG_RuntimeError, x); SWIG_fail; } + + +typedef XSPROTO(SwigPerlWrapper); +typedef SwigPerlWrapper *SwigPerlWrapperPtr; + +/* Structure for command table */ +typedef struct { + const char *name; + SwigPerlWrapperPtr wrapper; +} swig_command_info; + +/* Information for constant table */ + +#define SWIG_INT 1 +#define SWIG_FLOAT 2 +#define SWIG_STRING 3 +#define SWIG_POINTER 4 +#define SWIG_BINARY 5 + +/* Constant information structure */ +typedef struct swig_constant_info { + int type; + const char *name; + long lvalue; + double dvalue; + void *pvalue; + swig_type_info **ptype; +} swig_constant_info; + + +/* Structure for variable table */ +typedef struct { + const char *name; + SwigMagicFunc set; + SwigMagicFunc get; + swig_type_info **type; +} swig_variable_info; + +/* Magic variable code */ +#ifndef PERL_OBJECT +#define swig_create_magic(s,a,b,c) _swig_create_magic(s,a,b,c) + #ifndef MULTIPLICITY + SWIGRUNTIME void _swig_create_magic(SV *sv, char *name, int (*set)(SV *, MAGIC *), int (*get)(SV *,MAGIC *)) + #else + SWIGRUNTIME void _swig_create_magic(SV *sv, char *name, int (*set)(struct interpreter*, SV *, MAGIC *), int (*get)(struct interpreter*, SV *,MAGIC *)) + #endif +#else +# define swig_create_magic(s,a,b,c) _swig_create_magic(pPerl,s,a,b,c) +SWIGRUNTIME void _swig_create_magic(CPerlObj *pPerl, SV *sv, const char *name, int (CPerlObj::*set)(SV *, MAGIC *), int (CPerlObj::*get)(SV *, MAGIC *)) +#endif +{ + MAGIC *mg; + sv_magic(sv,sv,'U',(char *) name,strlen(name)); + mg = mg_find(sv,'U'); + mg->mg_virtual = (MGVTBL *) malloc(sizeof(MGVTBL)); + mg->mg_virtual->svt_get = (SwigMagicFunc) get; + mg->mg_virtual->svt_set = (SwigMagicFunc) set; + mg->mg_virtual->svt_len = 0; + mg->mg_virtual->svt_clear = 0; + mg->mg_virtual->svt_free = 0; +} + + +SWIGRUNTIME swig_module_info * +SWIG_Perl_GetModule(void) { + static void *type_pointer = (void *)0; + SV *pointer; + + /* first check if pointer already created */ + if (!type_pointer) { + pointer = get_sv("swig_runtime_data::type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, FALSE | GV_ADDMULTI); + if (pointer && SvOK(pointer)) { + type_pointer = INT2PTR(swig_type_info **, SvIV(pointer)); + } + } + + return (swig_module_info *) type_pointer; +} + +SWIGRUNTIME void +SWIG_Perl_SetModule(swig_module_info *module) { + SV *pointer; + + /* create a new pointer */ + pointer = get_sv("swig_runtime_data::type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, TRUE | GV_ADDMULTI); + sv_setiv(pointer, PTR2IV(module)); +} + +#ifdef __cplusplus +} +#endif + +/* Workaround perl5 global namespace pollution. Note that undefining library + * functions like fopen will not solve the problem on all platforms as fopen + * might be a macro on Windows but not necessarily on other operating systems. */ +#ifdef do_open + #undef do_open +#endif +#ifdef do_close + #undef do_close +#endif +#ifdef scalar + #undef scalar +#endif +#ifdef list + #undef list +#endif +#ifdef apply + #undef apply +#endif +#ifdef convert + #undef convert +#endif +#ifdef Error + #undef Error +#endif +#ifdef form + #undef form +#endif +#ifdef vform + #undef vform +#endif +#ifdef LABEL + #undef LABEL +#endif +#ifdef METHOD + #undef METHOD +#endif +#ifdef Move + #undef Move +#endif +#ifdef yylex + #undef yylex +#endif +#ifdef yyparse + #undef yyparse +#endif +#ifdef yyerror + #undef yyerror +#endif +#ifdef invert + #undef invert +#endif +#ifdef ref + #undef ref +#endif +#ifdef read + #undef read +#endif +#ifdef write + #undef write +#endif +#ifdef eof + #undef eof +#endif +#ifdef bool + #undef bool +#endif +#ifdef close + #undef close +#endif +#ifdef rewind + #undef rewind +#endif +#ifdef free + #undef free +#endif +#ifdef malloc + #undef malloc +#endif +#ifdef calloc + #undef calloc +#endif +#ifdef Stat + #undef Stat +#endif +#ifdef check + #undef check +#endif +#ifdef seekdir + #undef seekdir +#endif +#ifdef open + #undef open +#endif +#ifdef readdir + #undef readdir +#endif +#ifdef bind + #undef bind +#endif @@ -1543,7 +1526,7 @@ static swig_module_info swig_module = {swig_types, 19, 0, 0, 0, 0}; #define SWIG_name "tinyWRAPc::boot_tinyWRAP" #define SWIG_prefix "tinyWRAPc::" -#define SWIGVERSION 0x010340 +#define SWIGVERSION 0x010339 #define SWIG_VERSION SWIGVERSION @@ -1809,6 +1792,22 @@ SWIG_FromCharPtr(const char *cptr) } +SWIGINTERNINLINE SV * +SWIG_From_unsigned_SS_long SWIG_PERL_DECL_ARGS_1(unsigned long value) +{ + SV *obj = sv_newmortal(); + sv_setuv(obj, (UV) value); + return obj; +} + + +SWIGINTERNINLINE SV * +SWIG_From_unsigned_SS_int SWIG_PERL_DECL_ARGS_1(unsigned int value) +{ + return SWIG_From_unsigned_SS_long SWIG_PERL_CALL_ARGS_1(value); +} + + SWIGINTERNINLINE SV * SWIG_From_long SWIG_PERL_DECL_ARGS_1(long value) { @@ -2488,6 +2487,80 @@ XS(_wrap_SipMessage_getSipHeaderParamValue) { } +XS(_wrap_SipMessage_getSipContentLength) { + { + SipMessage *arg1 = (SipMessage *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + unsigned int result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: SipMessage_getSipContentLength(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SipMessage, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SipMessage_getSipContentLength" "', argument " "1"" of type '" "SipMessage *""'"); + } + arg1 = reinterpret_cast< SipMessage * >(argp1); + result = (unsigned int)(arg1)->getSipContentLength(); + ST(argvi) = SWIG_From_unsigned_SS_int SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_SipMessage_getSipContent) { + { + SipMessage *arg1 = (SipMessage *) 0 ; + void *arg2 = (void *) 0 ; + unsigned int arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + unsigned int val3 ; + int ecode3 = 0 ; + int argvi = 0; + unsigned int result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: SipMessage_getSipContent(self,output,maxsize);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SipMessage, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SipMessage_getSipContent" "', argument " "1"" of type '" "SipMessage *""'"); + } + arg1 = reinterpret_cast< SipMessage * >(argp1); + res2 = SWIG_ConvertPtr(ST(1),SWIG_as_voidptrptr(&arg2), 0, 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SipMessage_getSipContent" "', argument " "2"" of type '" "void *""'"); + } + ecode3 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SipMessage_getSipContent" "', argument " "3"" of type '" "unsigned int""'"); + } + arg3 = static_cast< unsigned int >(val3); + result = (unsigned int)(arg1)->getSipContent(arg2,arg3); + ST(argvi) = SWIG_From_unsigned_SS_int SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ; + + + + XSRETURN(argvi); + fail: + + + + SWIG_croak_null(); + } +} + + XS(_wrap_new_SipEvent) { { int argvi = 0; @@ -5042,6 +5115,8 @@ static swig_command_info swig_commands[] = { {"tinyWRAPc::delete_SipMessage", _wrap_delete_SipMessage}, {"tinyWRAPc::SipMessage_getSipHeaderValue", _wrap_SipMessage_getSipHeaderValue}, {"tinyWRAPc::SipMessage_getSipHeaderParamValue", _wrap_SipMessage_getSipHeaderParamValue}, +{"tinyWRAPc::SipMessage_getSipContentLength", _wrap_SipMessage_getSipContentLength}, +{"tinyWRAPc::SipMessage_getSipContent", _wrap_SipMessage_getSipContent}, {"tinyWRAPc::new_SipEvent", _wrap_new_SipEvent}, {"tinyWRAPc::delete_SipEvent", _wrap_delete_SipEvent}, {"tinyWRAPc::SipEvent_getCode", _wrap_SipEvent_getCode}, @@ -5115,242 +5190,242 @@ static swig_command_info swig_commands[] = { {"tinyWRAPc::SipStack_stop", _wrap_SipStack_stop}, {0,0} }; -/* ----------------------------------------------------------------------------- - * Type initialization: - * This problem is tough by the requirement that no dynamic - * memory is used. Also, since swig_type_info structures store pointers to - * swig_cast_info structures and swig_cast_info structures store pointers back - * to swig_type_info structures, we need some lookup code at initialization. - * The idea is that swig generates all the structures that are needed. - * The runtime then collects these partially filled structures. - * The SWIG_InitializeModule function takes these initial arrays out of - * swig_module, and does all the lookup, filling in the swig_module.types - * array with the correct data and linking the correct swig_cast_info - * structures together. - * - * The generated swig_type_info structures are assigned staticly to an initial - * array. We just loop through that array, and handle each type individually. - * First we lookup if this type has been already loaded, and if so, use the - * loaded structure instead of the generated one. Then we have to fill in the - * cast linked list. The cast data is initially stored in something like a - * two-dimensional array. Each row corresponds to a type (there are the same - * number of rows as there are in the swig_type_initial array). Each entry in - * a column is one of the swig_cast_info structures for that type. - * The cast_initial array is actually an array of arrays, because each row has - * a variable number of columns. So to actually build the cast linked list, - * we find the array of casts associated with the type, and loop through it - * adding the casts to the list. The one last trick we need to do is making - * sure the type pointer in the swig_cast_info struct is correct. - * - * First off, we lookup the cast->type name to see if it is already loaded. - * There are three cases to handle: - * 1) If the cast->type has already been loaded AND the type we are adding - * casting info to has not been loaded (it is in this module), THEN we - * replace the cast->type pointer with the type pointer that has already - * been loaded. - * 2) If BOTH types (the one we are adding casting info to, and the - * cast->type) are loaded, THEN the cast info has already been loaded by - * the previous module so we just ignore it. - * 3) Finally, if cast->type has not already been loaded, then we add that - * swig_cast_info to the linked list (because the cast->type) pointer will - * be correct. - * ----------------------------------------------------------------------------- */ +/* ----------------------------------------------------------------------------- + * Type initialization: + * This problem is tough by the requirement that no dynamic + * memory is used. Also, since swig_type_info structures store pointers to + * swig_cast_info structures and swig_cast_info structures store pointers back + * to swig_type_info structures, we need some lookup code at initialization. + * The idea is that swig generates all the structures that are needed. + * The runtime then collects these partially filled structures. + * The SWIG_InitializeModule function takes these initial arrays out of + * swig_module, and does all the lookup, filling in the swig_module.types + * array with the correct data and linking the correct swig_cast_info + * structures together. + * + * The generated swig_type_info structures are assigned staticly to an initial + * array. We just loop through that array, and handle each type individually. + * First we lookup if this type has been already loaded, and if so, use the + * loaded structure instead of the generated one. Then we have to fill in the + * cast linked list. The cast data is initially stored in something like a + * two-dimensional array. Each row corresponds to a type (there are the same + * number of rows as there are in the swig_type_initial array). Each entry in + * a column is one of the swig_cast_info structures for that type. + * The cast_initial array is actually an array of arrays, because each row has + * a variable number of columns. So to actually build the cast linked list, + * we find the array of casts associated with the type, and loop through it + * adding the casts to the list. The one last trick we need to do is making + * sure the type pointer in the swig_cast_info struct is correct. + * + * First off, we lookup the cast->type name to see if it is already loaded. + * There are three cases to handle: + * 1) If the cast->type has already been loaded AND the type we are adding + * casting info to has not been loaded (it is in this module), THEN we + * replace the cast->type pointer with the type pointer that has already + * been loaded. + * 2) If BOTH types (the one we are adding casting info to, and the + * cast->type) are loaded, THEN the cast info has already been loaded by + * the previous module so we just ignore it. + * 3) Finally, if cast->type has not already been loaded, then we add that + * swig_cast_info to the linked list (because the cast->type) pointer will + * be correct. + * ----------------------------------------------------------------------------- */ -#ifdef __cplusplus +#ifdef __cplusplus extern "C" { -#if 0 -} /* c-mode */ -#endif -#endif +#if 0 +} /* c-mode */ +#endif +#endif -#if 0 -#define SWIGRUNTIME_DEBUG -#endif +#if 0 +#define SWIGRUNTIME_DEBUG +#endif -SWIGRUNTIME void +SWIGRUNTIME void SWIG_InitializeModule(void *clientdata) { - size_t i; - swig_module_info *module_head, *iter; - int found, init; + size_t i; + swig_module_info *module_head, *iter; + int found, init; - clientdata = clientdata; + clientdata = clientdata; - /* check to see if the circular list has been setup, if not, set it up */ + /* check to see if the circular list has been setup, if not, set it up */ if (swig_module.next==0) { - /* Initialize the swig_module */ - swig_module.type_initial = swig_type_initial; - swig_module.cast_initial = swig_cast_initial; - swig_module.next = &swig_module; - init = 1; + /* Initialize the swig_module */ + swig_module.type_initial = swig_type_initial; + swig_module.cast_initial = swig_cast_initial; + swig_module.next = &swig_module; + init = 1; } else { - init = 0; - } + init = 0; + } - /* Try and load any already created modules */ - module_head = SWIG_GetModule(clientdata); + /* Try and load any already created modules */ + module_head = SWIG_GetModule(clientdata); if (!module_head) { - /* This is the first module loaded for this interpreter */ - /* so set the swig module into the interpreter */ - SWIG_SetModule(clientdata, &swig_module); - module_head = &swig_module; + /* This is the first module loaded for this interpreter */ + /* so set the swig module into the interpreter */ + SWIG_SetModule(clientdata, &swig_module); + module_head = &swig_module; } else { - /* the interpreter has loaded a SWIG module, but has it loaded this one? */ - found=0; - iter=module_head; + /* the interpreter has loaded a SWIG module, but has it loaded this one? */ + found=0; + iter=module_head; do { if (iter==&swig_module) { - found=1; - break; - } - iter=iter->next; - } while (iter!= module_head); + found=1; + break; + } + iter=iter->next; + } while (iter!= module_head); - /* if the is found in the list, then all is done and we may leave */ - if (found) return; - /* otherwise we must add out module into the list */ - swig_module.next = module_head->next; - module_head->next = &swig_module; - } + /* if the is found in the list, then all is done and we may leave */ + if (found) return; + /* otherwise we must add out module into the list */ + swig_module.next = module_head->next; + module_head->next = &swig_module; + } - /* When multiple interpeters are used, a module could have already been initialized in - a different interpreter, but not yet have a pointer in this interpreter. - In this case, we do not want to continue adding types... everything should be - set up already */ - if (init == 0) return; + /* When multiple interpeters are used, a module could have already been initialized in + a different interpreter, but not yet have a pointer in this interpreter. + In this case, we do not want to continue adding types... everything should be + set up already */ + if (init == 0) return; - /* Now work on filling in swig_module.types */ -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: size %d\n", swig_module.size); -#endif + /* Now work on filling in swig_module.types */ +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: size %d\n", swig_module.size); +#endif for (i = 0; i < swig_module.size; ++i) { - swig_type_info *type = 0; - swig_type_info *ret; - swig_cast_info *cast; + swig_type_info *type = 0; + swig_type_info *ret; + swig_cast_info *cast; -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); -#endif +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); +#endif - /* if there is another module already loaded */ + /* if there is another module already loaded */ if (swig_module.next != &swig_module) { - type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name); - } + type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name); + } if (type) { - /* Overwrite clientdata field */ -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: found type %s\n", type->name); -#endif + /* Overwrite clientdata field */ +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: found type %s\n", type->name); +#endif if (swig_module.type_initial[i]->clientdata) { - type->clientdata = swig_module.type_initial[i]->clientdata; -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name); -#endif - } + type->clientdata = swig_module.type_initial[i]->clientdata; +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name); +#endif + } } else { - type = swig_module.type_initial[i]; - } + type = swig_module.type_initial[i]; + } - /* Insert casting types */ - cast = swig_module.cast_initial[i]; + /* Insert casting types */ + cast = swig_module.cast_initial[i]; while (cast->type) { - /* Don't need to add information already in the list */ - ret = 0; -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: look cast %s\n", cast->type->name); -#endif + /* Don't need to add information already in the list */ + ret = 0; +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: look cast %s\n", cast->type->name); +#endif if (swig_module.next != &swig_module) { - ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name); -#ifdef SWIGRUNTIME_DEBUG - if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name); -#endif - } + ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name); +#ifdef SWIGRUNTIME_DEBUG + if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name); +#endif + } if (ret) { if (type == swig_module.type_initial[i]) { -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: skip old type %s\n", ret->name); -#endif - cast->type = ret; - ret = 0; +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: skip old type %s\n", ret->name); +#endif + cast->type = ret; + ret = 0; } else { - /* Check for casting already in the list */ - swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type); -#ifdef SWIGRUNTIME_DEBUG - if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name); -#endif - if (!ocast) ret = 0; - } - } + /* Check for casting already in the list */ + swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type); +#ifdef SWIGRUNTIME_DEBUG + if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name); +#endif + if (!ocast) ret = 0; + } + } if (!ret) { -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name); -#endif +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name); +#endif if (type->cast) { - type->cast->prev = cast; - cast->next = type->cast; - } - type->cast = cast; - } - cast++; - } - /* Set entry in modules->types array equal to the type */ - swig_module.types[i] = type; - } - swig_module.types[i] = 0; + type->cast->prev = cast; + cast->next = type->cast; + } + type->cast = cast; + } + cast++; + } + /* Set entry in modules->types array equal to the type */ + swig_module.types[i] = type; + } + swig_module.types[i] = 0; -#ifdef SWIGRUNTIME_DEBUG - printf("**** SWIG_InitializeModule: Cast List ******\n"); +#ifdef SWIGRUNTIME_DEBUG + printf("**** SWIG_InitializeModule: Cast List ******\n"); for (i = 0; i < swig_module.size; ++i) { - int j = 0; - swig_cast_info *cast = swig_module.cast_initial[i]; - printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); + int j = 0; + swig_cast_info *cast = swig_module.cast_initial[i]; + printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); while (cast->type) { - printf("SWIG_InitializeModule: cast type %s\n", cast->type->name); - cast++; - ++j; - } - printf("---- Total casts: %d\n",j); - } - printf("**** SWIG_InitializeModule: Cast List ******\n"); -#endif -} + printf("SWIG_InitializeModule: cast type %s\n", cast->type->name); + cast++; + ++j; + } + printf("---- Total casts: %d\n",j); + } + printf("**** SWIG_InitializeModule: Cast List ******\n"); +#endif +} -/* This function will propagate the clientdata field of type to -* any new swig_type_info structures that have been added into the list -* of equivalent types. It is like calling -* SWIG_TypeClientData(type, clientdata) a second time. -*/ -SWIGRUNTIME void +/* This function will propagate the clientdata field of type to +* any new swig_type_info structures that have been added into the list +* of equivalent types. It is like calling +* SWIG_TypeClientData(type, clientdata) a second time. +*/ +SWIGRUNTIME void SWIG_PropagateClientData(void) { - size_t i; - swig_cast_info *equiv; - static int init_run = 0; + size_t i; + swig_cast_info *equiv; + static int init_run = 0; - if (init_run) return; - init_run = 1; + if (init_run) return; + init_run = 1; for (i = 0; i < swig_module.size; i++) { if (swig_module.types[i]->clientdata) { - equiv = swig_module.types[i]->cast; + equiv = swig_module.types[i]->cast; while (equiv) { if (!equiv->converter) { - if (equiv->type && !equiv->type->clientdata) - SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata); - } - equiv = equiv->next; - } - } - } -} + if (equiv->type && !equiv->type->clientdata) + SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata); + } + equiv = equiv->next; + } + } + } +} -#ifdef __cplusplus -#if 0 +#ifdef __cplusplus +#if 0 { - /* c-mode */ -#endif -} -#endif + /* c-mode */ +#endif +} +#endif @@ -5421,177 +5496,177 @@ XS(SWIG_init) { SWIG_TypeClientData(SWIGTYPE_p_SipDebugCallback, (void*) "tinyWRAP::SipDebugCallback"); SWIG_TypeClientData(SWIGTYPE_p_SafeObject, (void*) "tinyWRAP::SafeObject"); SWIG_TypeClientData(SWIGTYPE_p_SipStack, (void*) "tinyWRAP::SipStack"); - /*@SWIG:/usr/local/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_event_invite", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_event_invite))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_event_message", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_event_message))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_event_options", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_event_options))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_event_publish", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_event_publish))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_event_register", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_event_register))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_event_subscribe", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_event_subscribe))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_event_dialog", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_event_dialog))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_i_register", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_i_register))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_ai_register", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_ai_register))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_o_register", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_o_register))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_ao_register", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_ao_register))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_i_unregister", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_i_unregister))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_ai_unregister", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_ai_unregister))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_o_unregister", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_o_unregister))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_ao_unregister", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_ao_unregister))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_i_subscribe", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_i_subscribe))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_ai_subscribe", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_ai_subscribe))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_o_subscribe", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_o_subscribe))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_ao_subscribe", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_ao_subscribe))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_i_unsubscribe", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_i_unsubscribe))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_ai_unsubscribe", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_ai_unsubscribe))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_o_unsubscribe", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_o_unsubscribe))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_ao_unsubscribe", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_ao_unsubscribe))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_i_notify", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_i_notify))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_ai_notify", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_ai_notify))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_o_notify", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_o_notify))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_ao_notify", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_ao_notify))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_i_publish", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_i_publish))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_ai_publish", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_ai_publish))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_o_publish", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_o_publish))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_ao_publish", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_ao_publish))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_i_unpublish", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_i_unpublish))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_ai_unpublish", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_ai_unpublish))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_o_unpublish", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_o_unpublish))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_ao_unpublish", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_ao_unpublish))); SvREADONLY_on(sv); diff --git a/trunk/bindings/python/tinyWRAP.py b/trunk/bindings/python/tinyWRAP.py index ad6597c5..05fd6cf1 100644 --- a/trunk/bindings/python/tinyWRAP.py +++ b/trunk/bindings/python/tinyWRAP.py @@ -1,5 +1,5 @@ # This file was automatically generated by SWIG (http://www.swig.org). -# Version 1.3.40 +# Version 1.3.39 # # Do not make changes to this file unless you know what you are doing--modify # the SWIG interface file instead. @@ -10,18 +10,12 @@ if version_info >= (2,6,0): def swig_import_helper(): from os.path import dirname import imp - fp = None try: fp, pathname, description = imp.find_module('_tinyWRAP', [dirname(__file__)]) - except ImportError: - import _tinyWRAP - return _tinyWRAP - if fp is not None: - try: - _mod = imp.load_module('_tinyWRAP', fp, pathname, description) - finally: - fp.close() - return _mod + _mod = imp.load_module('_tinyWRAP', fp, pathname, description) + finally: + if fp is not None: fp.close() + return _mod _tinyWRAP = swig_import_helper() del swig_import_helper else: @@ -103,6 +97,8 @@ class SipMessage(_object): __del__ = lambda self : None; def getSipHeaderValue(self, *args): return _tinyWRAP.SipMessage_getSipHeaderValue(self, *args) def getSipHeaderParamValue(self, *args): return _tinyWRAP.SipMessage_getSipHeaderParamValue(self, *args) + def getSipContentLength(self): return _tinyWRAP.SipMessage_getSipContentLength(self) + def getSipContent(self, *args): return _tinyWRAP.SipMessage_getSipContent(self, *args) SipMessage_swigregister = _tinyWRAP.SipMessage_swigregister SipMessage_swigregister(SipMessage) diff --git a/trunk/bindings/python/tinyWRAP_wrap.cxx b/trunk/bindings/python/tinyWRAP_wrap.cxx index ad1b2faf..ee8bae72 100644 --- a/trunk/bindings/python/tinyWRAP_wrap.cxx +++ b/trunk/bindings/python/tinyWRAP_wrap.cxx @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make @@ -36,2642 +36,2605 @@ template T SwigValueInit() { } #endif -/* ----------------------------------------------------------------------------- - * This section contains generic SWIG labels for method/variable - * declarations/attributes, and other compiler dependent labels. - * ----------------------------------------------------------------------------- */ - -/* template workaround for compilers that cannot correctly implement the C++ standard */ -#ifndef SWIGTEMPLATEDISAMBIGUATOR -# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) -# define SWIGTEMPLATEDISAMBIGUATOR template -# elif defined(__HP_aCC) -/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ -/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ -# define SWIGTEMPLATEDISAMBIGUATOR template -# else -# define SWIGTEMPLATEDISAMBIGUATOR -# endif -#endif - -/* inline attribute */ -#ifndef SWIGINLINE -# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) -# define SWIGINLINE inline -# else -# define SWIGINLINE -# endif -#endif - -/* attribute recognised by some compilers to avoid 'unused' warnings */ -#ifndef SWIGUNUSED -# if defined(__GNUC__) -# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) -# define SWIGUNUSED __attribute__ ((__unused__)) -# else -# define SWIGUNUSED -# endif -# elif defined(__ICC) -# define SWIGUNUSED __attribute__ ((__unused__)) -# else -# define SWIGUNUSED -# endif -#endif - -#ifndef SWIG_MSC_UNSUPPRESS_4505 -# if defined(_MSC_VER) -# pragma warning(disable : 4505) /* unreferenced local function has been removed */ -# endif -#endif - -#ifndef SWIGUNUSEDPARM -# ifdef __cplusplus -# define SWIGUNUSEDPARM(p) -# else -# define SWIGUNUSEDPARM(p) p SWIGUNUSED -# endif -#endif - -/* internal SWIG method */ -#ifndef SWIGINTERN -# define SWIGINTERN static SWIGUNUSED -#endif - -/* internal inline SWIG method */ -#ifndef SWIGINTERNINLINE -# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE -#endif - -/* exporting methods */ -#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) -# ifndef GCC_HASCLASSVISIBILITY -# define GCC_HASCLASSVISIBILITY -# endif -#endif - -#ifndef SWIGEXPORT -# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) -# if defined(STATIC_LINKED) -# define SWIGEXPORT -# else -# define SWIGEXPORT __declspec(dllexport) -# endif -# else -# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) -# define SWIGEXPORT __attribute__ ((visibility("default"))) -# else -# define SWIGEXPORT -# endif -# endif -#endif - -/* calling conventions for Windows */ -#ifndef SWIGSTDCALL -# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) -# define SWIGSTDCALL __stdcall -# else -# define SWIGSTDCALL -# endif -#endif - -/* Deal with Microsoft's attempt at deprecating C standard runtime functions */ -#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) -# define _CRT_SECURE_NO_DEPRECATE -#endif - -/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ -#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) -# define _SCL_SECURE_NO_DEPRECATE -#endif - +/* ----------------------------------------------------------------------------- + * This section contains generic SWIG labels for method/variable + * declarations/attributes, and other compiler dependent labels. + * ----------------------------------------------------------------------------- */ + +/* template workaround for compilers that cannot correctly implement the C++ standard */ +#ifndef SWIGTEMPLATEDISAMBIGUATOR +# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) +# define SWIGTEMPLATEDISAMBIGUATOR template +# elif defined(__HP_aCC) +/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ +/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ +# define SWIGTEMPLATEDISAMBIGUATOR template +# else +# define SWIGTEMPLATEDISAMBIGUATOR +# endif +#endif + +/* inline attribute */ +#ifndef SWIGINLINE +# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) +# define SWIGINLINE inline +# else +# define SWIGINLINE +# endif +#endif + +/* attribute recognised by some compilers to avoid 'unused' warnings */ +#ifndef SWIGUNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define SWIGUNUSED __attribute__ ((__unused__)) +# else +# define SWIGUNUSED +# endif +# elif defined(__ICC) +# define SWIGUNUSED __attribute__ ((__unused__)) +# else +# define SWIGUNUSED +# endif +#endif + +#ifndef SWIG_MSC_UNSUPPRESS_4505 +# if defined(_MSC_VER) +# pragma warning(disable : 4505) /* unreferenced local function has been removed */ +# endif +#endif + +#ifndef SWIGUNUSEDPARM +# ifdef __cplusplus +# define SWIGUNUSEDPARM(p) +# else +# define SWIGUNUSEDPARM(p) p SWIGUNUSED +# endif +#endif + +/* internal SWIG method */ +#ifndef SWIGINTERN +# define SWIGINTERN static SWIGUNUSED +#endif + +/* internal inline SWIG method */ +#ifndef SWIGINTERNINLINE +# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE +#endif + +/* exporting methods */ +#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) +# ifndef GCC_HASCLASSVISIBILITY +# define GCC_HASCLASSVISIBILITY +# endif +#endif + +#ifndef SWIGEXPORT +# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# if defined(STATIC_LINKED) +# define SWIGEXPORT +# else +# define SWIGEXPORT __declspec(dllexport) +# endif +# else +# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) +# define SWIGEXPORT __attribute__ ((visibility("default"))) +# else +# define SWIGEXPORT +# endif +# endif +#endif + +/* calling conventions for Windows */ +#ifndef SWIGSTDCALL +# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# define SWIGSTDCALL __stdcall +# else +# define SWIGSTDCALL +# endif +#endif + +/* Deal with Microsoft's attempt at deprecating C standard runtime functions */ +#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) +# define _CRT_SECURE_NO_DEPRECATE +#endif + +/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ +#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) +# define _SCL_SECURE_NO_DEPRECATE +#endif + /* Python.h has to appear first */ #include -/* ----------------------------------------------------------------------------- - * swigrun.swg - * - * This file contains generic C API SWIG runtime support for pointer - * type checking. - * ----------------------------------------------------------------------------- */ - -/* This should only be incremented when either the layout of swig_type_info changes, - or for whatever reason, the runtime changes incompatibly */ -#define SWIG_RUNTIME_VERSION "4" - -/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */ -#ifdef SWIG_TYPE_TABLE -# define SWIG_QUOTE_STRING(x) #x -# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x) -# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE) -#else -# define SWIG_TYPE_TABLE_NAME -#endif - -/* - You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for - creating a static or dynamic library from the SWIG runtime code. - In 99.9% of the cases, SWIG just needs to declare them as 'static'. - - But only do this if strictly necessary, ie, if you have problems - with your compiler or suchlike. -*/ - -#ifndef SWIGRUNTIME -# define SWIGRUNTIME SWIGINTERN -#endif - -#ifndef SWIGRUNTIMEINLINE -# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE -#endif - -/* Generic buffer size */ -#ifndef SWIG_BUFFER_SIZE -# define SWIG_BUFFER_SIZE 1024 -#endif - -/* Flags for pointer conversions */ -#define SWIG_POINTER_DISOWN 0x1 -#define SWIG_CAST_NEW_MEMORY 0x2 - -/* Flags for new pointer objects */ -#define SWIG_POINTER_OWN 0x1 - - -/* - Flags/methods for returning states. - - The SWIG conversion methods, as ConvertPtr, return and integer - that tells if the conversion was successful or not. And if not, - an error code can be returned (see swigerrors.swg for the codes). - - Use the following macros/flags to set or process the returning - states. - - In old versions of SWIG, code such as the following was usually written: - - if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) { - // success code - } else { - //fail code - } - - Now you can be more explicit: - - int res = SWIG_ConvertPtr(obj,vptr,ty.flags); - if (SWIG_IsOK(res)) { - // success code - } else { - // fail code - } - - which is the same really, but now you can also do - - Type *ptr; - int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags); - if (SWIG_IsOK(res)) { - // success code - if (SWIG_IsNewObj(res) { - ... - delete *ptr; - } else { - ... - } - } else { - // fail code - } - - I.e., now SWIG_ConvertPtr can return new objects and you can - identify the case and take care of the deallocation. Of course that - also requires SWIG_ConvertPtr to return new result values, such as - - int SWIG_ConvertPtr(obj, ptr,...) { - if () { - if () { - *ptr = ; - return SWIG_NEWOBJ; - } else { - *ptr = ; - return SWIG_OLDOBJ; - } - } else { - return SWIG_BADOBJ; - } - } - - Of course, returning the plain '0(success)/-1(fail)' still works, but you can be - more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the - SWIG errors code. - - Finally, if the SWIG_CASTRANK_MODE is enabled, the result code - allows to return the 'cast rank', for example, if you have this - - int food(double) - int fooi(int); - - and you call - - food(1) // cast rank '1' (1 -> 1.0) - fooi(1) // cast rank '0' - - just use the SWIG_AddCast()/SWIG_CheckState() -*/ - -#define SWIG_OK (0) -#define SWIG_ERROR (-1) -#define SWIG_IsOK(r) (r >= 0) -#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) - -/* The CastRankLimit says how many bits are used for the cast rank */ -#define SWIG_CASTRANKLIMIT (1 << 8) -/* The NewMask denotes the object was created (using new/malloc) */ -#define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1) -/* The TmpMask is for in/out typemaps that use temporal objects */ -#define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1) -/* Simple returning values */ -#define SWIG_BADOBJ (SWIG_ERROR) -#define SWIG_OLDOBJ (SWIG_OK) -#define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK) -#define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK) -/* Check, add and del mask methods */ -#define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r) -#define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r) -#define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK)) -#define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r) -#define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r) -#define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK)) - -/* Cast-Rank Mode */ -#if defined(SWIG_CASTRANK_MODE) -# ifndef SWIG_TypeRank -# define SWIG_TypeRank unsigned long -# endif -# ifndef SWIG_MAXCASTRANK /* Default cast allowed */ -# define SWIG_MAXCASTRANK (2) -# endif -# define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1) -# define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK) -SWIGINTERNINLINE int SWIG_AddCast(int r) { - return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r; -} -SWIGINTERNINLINE int SWIG_CheckState(int r) { - return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; -} -#else /* no cast-rank mode */ -# define SWIG_AddCast -# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) -#endif - - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -typedef void *(*swig_converter_func)(void *, int *); -typedef struct swig_type_info *(*swig_dycast_func)(void **); - -/* Structure to store information on one type */ -typedef struct swig_type_info { - const char *name; /* mangled name of this type */ - const char *str; /* human readable name of this type */ - swig_dycast_func dcast; /* dynamic cast function down a hierarchy */ - struct swig_cast_info *cast; /* linked list of types that can cast into this type */ - void *clientdata; /* language specific type data */ - int owndata; /* flag if the structure owns the clientdata */ -} swig_type_info; - -/* Structure to store a type and conversion function used for casting */ -typedef struct swig_cast_info { - swig_type_info *type; /* pointer to type that is equivalent to this type */ - swig_converter_func converter; /* function to cast the void pointers */ - struct swig_cast_info *next; /* pointer to next cast in linked list */ - struct swig_cast_info *prev; /* pointer to the previous cast */ -} swig_cast_info; - -/* Structure used to store module information - * Each module generates one structure like this, and the runtime collects - * all of these structures and stores them in a circularly linked list.*/ -typedef struct swig_module_info { - swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */ - size_t size; /* Number of types in this module */ - struct swig_module_info *next; /* Pointer to next element in circularly linked list */ - swig_type_info **type_initial; /* Array of initially generated type structures */ - swig_cast_info **cast_initial; /* Array of initially generated casting structures */ - void *clientdata; /* Language specific module data */ -} swig_module_info; - -/* - Compare two type names skipping the space characters, therefore - "char*" == "char *" and "Class" == "Class", etc. - - Return 0 when the two name types are equivalent, as in - strncmp, but skipping ' '. -*/ -SWIGRUNTIME int -SWIG_TypeNameComp(const char *f1, const char *l1, - const char *f2, const char *l2) { - for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) { - while ((*f1 == ' ') && (f1 != l1)) ++f1; - while ((*f2 == ' ') && (f2 != l2)) ++f2; - if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1; - } - return (int)((l1 - f1) - (l2 - f2)); -} - -/* - Check type equivalence in a name list like ||... - Return 0 if not equal, 1 if equal -*/ -SWIGRUNTIME int -SWIG_TypeEquiv(const char *nb, const char *tb) { - int equiv = 0; - const char* te = tb + strlen(tb); - const char* ne = nb; - while (!equiv && *ne) { - for (nb = ne; *ne; ++ne) { - if (*ne == '|') break; - } - equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; - if (*ne) ++ne; - } - return equiv; -} - -/* - Check type equivalence in a name list like ||... - Return 0 if equal, -1 if nb < tb, 1 if nb > tb -*/ -SWIGRUNTIME int -SWIG_TypeCompare(const char *nb, const char *tb) { - int equiv = 0; - const char* te = tb + strlen(tb); - const char* ne = nb; - while (!equiv && *ne) { - for (nb = ne; *ne; ++ne) { - if (*ne == '|') break; - } - equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; - if (*ne) ++ne; - } - return equiv; -} - - -/* - Check the typename -*/ -SWIGRUNTIME swig_cast_info * -SWIG_TypeCheck(const char *c, swig_type_info *ty) { - if (ty) { - swig_cast_info *iter = ty->cast; - while (iter) { - if (strcmp(iter->type->name, c) == 0) { - if (iter == ty->cast) - return iter; - /* Move iter to the top of the linked list */ - iter->prev->next = iter->next; - if (iter->next) - iter->next->prev = iter->prev; - iter->next = ty->cast; - iter->prev = 0; - if (ty->cast) ty->cast->prev = iter; - ty->cast = iter; - return iter; - } - iter = iter->next; - } - } - return 0; -} - -/* - Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison -*/ -SWIGRUNTIME swig_cast_info * -SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) { - if (ty) { - swig_cast_info *iter = ty->cast; - while (iter) { - if (iter->type == from) { - if (iter == ty->cast) - return iter; - /* Move iter to the top of the linked list */ - iter->prev->next = iter->next; - if (iter->next) - iter->next->prev = iter->prev; - iter->next = ty->cast; - iter->prev = 0; - if (ty->cast) ty->cast->prev = iter; - ty->cast = iter; - return iter; - } - iter = iter->next; - } - } - return 0; -} - -/* - Cast a pointer up an inheritance hierarchy -*/ -SWIGRUNTIMEINLINE void * -SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) { - return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory); -} - -/* - Dynamic pointer casting. Down an inheritance hierarchy -*/ -SWIGRUNTIME swig_type_info * -SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) { - swig_type_info *lastty = ty; - if (!ty || !ty->dcast) return ty; - while (ty && (ty->dcast)) { - ty = (*ty->dcast)(ptr); - if (ty) lastty = ty; - } - return lastty; -} - -/* - Return the name associated with this type -*/ -SWIGRUNTIMEINLINE const char * -SWIG_TypeName(const swig_type_info *ty) { - return ty->name; -} - -/* - Return the pretty name associated with this type, - that is an unmangled type name in a form presentable to the user. -*/ -SWIGRUNTIME const char * -SWIG_TypePrettyName(const swig_type_info *type) { - /* The "str" field contains the equivalent pretty names of the - type, separated by vertical-bar characters. We choose - to print the last name, as it is often (?) the most - specific. */ - if (!type) return NULL; - if (type->str != NULL) { - const char *last_name = type->str; - const char *s; - for (s = type->str; *s; s++) - if (*s == '|') last_name = s+1; - return last_name; - } - else - return type->name; -} - -/* - Set the clientdata field for a type -*/ -SWIGRUNTIME void -SWIG_TypeClientData(swig_type_info *ti, void *clientdata) { - swig_cast_info *cast = ti->cast; - /* if (ti->clientdata == clientdata) return; */ - ti->clientdata = clientdata; - - while (cast) { - if (!cast->converter) { - swig_type_info *tc = cast->type; - if (!tc->clientdata) { - SWIG_TypeClientData(tc, clientdata); - } - } - cast = cast->next; - } -} -SWIGRUNTIME void -SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) { - SWIG_TypeClientData(ti, clientdata); - ti->owndata = 1; -} - -/* - Search for a swig_type_info structure only by mangled name - Search is a O(log #types) - - We start searching at module start, and finish searching when start == end. - Note: if start == end at the beginning of the function, we go all the way around - the circular list. -*/ -SWIGRUNTIME swig_type_info * -SWIG_MangledTypeQueryModule(swig_module_info *start, - swig_module_info *end, - const char *name) { - swig_module_info *iter = start; - do { - if (iter->size) { - register size_t l = 0; - register size_t r = iter->size - 1; - do { - /* since l+r >= 0, we can (>> 1) instead (/ 2) */ - register size_t i = (l + r) >> 1; - const char *iname = iter->types[i]->name; - if (iname) { - register int compare = strcmp(name, iname); - if (compare == 0) { - return iter->types[i]; - } else if (compare < 0) { - if (i) { - r = i - 1; - } else { - break; - } - } else if (compare > 0) { - l = i + 1; - } - } else { - break; /* should never happen */ - } - } while (l <= r); - } - iter = iter->next; - } while (iter != end); - return 0; -} - -/* - Search for a swig_type_info structure for either a mangled name or a human readable name. - It first searches the mangled names of the types, which is a O(log #types) - If a type is not found it then searches the human readable names, which is O(#types). - - We start searching at module start, and finish searching when start == end. - Note: if start == end at the beginning of the function, we go all the way around - the circular list. -*/ -SWIGRUNTIME swig_type_info * -SWIG_TypeQueryModule(swig_module_info *start, - swig_module_info *end, - const char *name) { - /* STEP 1: Search the name field using binary search */ - swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name); - if (ret) { - return ret; - } else { - /* STEP 2: If the type hasn't been found, do a complete search - of the str field (the human readable name) */ - swig_module_info *iter = start; - do { - register size_t i = 0; - for (; i < iter->size; ++i) { - if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name))) - return iter->types[i]; - } - iter = iter->next; - } while (iter != end); - } - - /* neither found a match */ - return 0; -} - -/* - Pack binary data into a string -*/ -SWIGRUNTIME char * -SWIG_PackData(char *c, void *ptr, size_t sz) { - static const char hex[17] = "0123456789abcdef"; - register const unsigned char *u = (unsigned char *) ptr; - register const unsigned char *eu = u + sz; - for (; u != eu; ++u) { - register unsigned char uu = *u; - *(c++) = hex[(uu & 0xf0) >> 4]; - *(c++) = hex[uu & 0xf]; - } - return c; -} - -/* - Unpack binary data from a string -*/ -SWIGRUNTIME const char * -SWIG_UnpackData(const char *c, void *ptr, size_t sz) { - register unsigned char *u = (unsigned char *) ptr; - register const unsigned char *eu = u + sz; - for (; u != eu; ++u) { - register char d = *(c++); - register unsigned char uu; - if ((d >= '0') && (d <= '9')) - uu = ((d - '0') << 4); - else if ((d >= 'a') && (d <= 'f')) - uu = ((d - ('a'-10)) << 4); - else - return (char *) 0; - d = *(c++); - if ((d >= '0') && (d <= '9')) - uu |= (d - '0'); - else if ((d >= 'a') && (d <= 'f')) - uu |= (d - ('a'-10)); - else - return (char *) 0; - *u = uu; - } - return c; -} - -/* - Pack 'void *' into a string buffer. -*/ -SWIGRUNTIME char * -SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) { - char *r = buff; - if ((2*sizeof(void *) + 2) > bsz) return 0; - *(r++) = '_'; - r = SWIG_PackData(r,&ptr,sizeof(void *)); - if (strlen(name) + 1 > (bsz - (r - buff))) return 0; - strcpy(r,name); - return buff; -} - -SWIGRUNTIME const char * -SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) { - if (*c != '_') { - if (strcmp(c,"NULL") == 0) { - *ptr = (void *) 0; - return name; - } else { - return 0; - } - } - return SWIG_UnpackData(++c,ptr,sizeof(void *)); -} - -SWIGRUNTIME char * -SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) { - char *r = buff; - size_t lname = (name ? strlen(name) : 0); - if ((2*sz + 2 + lname) > bsz) return 0; - *(r++) = '_'; - r = SWIG_PackData(r,ptr,sz); - if (lname) { - strncpy(r,name,lname+1); - } else { - *r = 0; - } - return buff; -} - -SWIGRUNTIME const char * -SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { - if (*c != '_') { - if (strcmp(c,"NULL") == 0) { - memset(ptr,0,sz); - return name; - } else { - return 0; - } - } - return SWIG_UnpackData(++c,ptr,sz); -} - -#ifdef __cplusplus -} -#endif - -/* Errors in SWIG */ -#define SWIG_UnknownError -1 -#define SWIG_IOError -2 -#define SWIG_RuntimeError -3 -#define SWIG_IndexError -4 -#define SWIG_TypeError -5 -#define SWIG_DivisionByZero -6 -#define SWIG_OverflowError -7 -#define SWIG_SyntaxError -8 -#define SWIG_ValueError -9 -#define SWIG_SystemError -10 -#define SWIG_AttributeError -11 -#define SWIG_MemoryError -12 -#define SWIG_NullReferenceError -13 - - - -/* Compatibility macros for Python 3 */ -#if PY_VERSION_HEX >= 0x03000000 - -#define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type) -#define PyInt_Check(x) PyLong_Check(x) -#define PyInt_AsLong(x) PyLong_AsLong(x) -#define PyInt_FromLong(x) PyLong_FromLong(x) -#define PyString_Format(fmt, args) PyUnicode_Format(fmt, args) - -#endif - -#ifndef Py_TYPE -# define Py_TYPE(op) ((op)->ob_type) -#endif - -/* SWIG APIs for compatibility of both Python 2 & 3 */ - -#if PY_VERSION_HEX >= 0x03000000 -# define SWIG_Python_str_FromFormat PyUnicode_FromFormat -#else -# define SWIG_Python_str_FromFormat PyString_FromFormat -#endif - - -/* Warning: This function will allocate a new string in Python 3, - * so please call SWIG_Python_str_DelForPy3(x) to free the space. - */ -SWIGINTERN char* -SWIG_Python_str_AsChar(PyObject *str) -{ -#if PY_VERSION_HEX >= 0x03000000 - char *cstr; - char *newstr; - Py_ssize_t len; - str = PyUnicode_AsUTF8String(str); - PyBytes_AsStringAndSize(str, &cstr, &len); - newstr = (char *) malloc(len+1); - memcpy(newstr, cstr, len+1); - Py_XDECREF(str); - return newstr; -#else - return PyString_AsString(str); -#endif -} - -#if PY_VERSION_HEX >= 0x03000000 -# define SWIG_Python_str_DelForPy3(x) free( (void*) (x) ) -#else -# define SWIG_Python_str_DelForPy3(x) -#endif - - -SWIGINTERN PyObject* -SWIG_Python_str_FromChar(const char *c) -{ -#if PY_VERSION_HEX >= 0x03000000 - return PyUnicode_FromString(c); -#else - return PyString_FromString(c); -#endif -} - -/* Add PyOS_snprintf for old Pythons */ -#if PY_VERSION_HEX < 0x02020000 -# if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM) -# define PyOS_snprintf _snprintf -# else -# define PyOS_snprintf snprintf -# endif -#endif - -/* A crude PyString_FromFormat implementation for old Pythons */ -#if PY_VERSION_HEX < 0x02020000 - -#ifndef SWIG_PYBUFFER_SIZE -# define SWIG_PYBUFFER_SIZE 1024 -#endif - -static PyObject * -PyString_FromFormat(const char *fmt, ...) { - va_list ap; - char buf[SWIG_PYBUFFER_SIZE * 2]; - int res; - va_start(ap, fmt); - res = vsnprintf(buf, sizeof(buf), fmt, ap); - va_end(ap); - return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf); -} -#endif - -/* Add PyObject_Del for old Pythons */ -#if PY_VERSION_HEX < 0x01060000 -# define PyObject_Del(op) PyMem_DEL((op)) -#endif -#ifndef PyObject_DEL -# define PyObject_DEL PyObject_Del -#endif - -/* A crude PyExc_StopIteration exception for old Pythons */ -#if PY_VERSION_HEX < 0x02020000 -# ifndef PyExc_StopIteration -# define PyExc_StopIteration PyExc_RuntimeError -# endif -# ifndef PyObject_GenericGetAttr -# define PyObject_GenericGetAttr 0 -# endif -#endif - -/* Py_NotImplemented is defined in 2.1 and up. */ -#if PY_VERSION_HEX < 0x02010000 -# ifndef Py_NotImplemented -# define Py_NotImplemented PyExc_RuntimeError -# endif -#endif - -/* A crude PyString_AsStringAndSize implementation for old Pythons */ -#if PY_VERSION_HEX < 0x02010000 -# ifndef PyString_AsStringAndSize -# define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;} -# endif -#endif - -/* PySequence_Size for old Pythons */ -#if PY_VERSION_HEX < 0x02000000 -# ifndef PySequence_Size -# define PySequence_Size PySequence_Length -# endif -#endif - -/* PyBool_FromLong for old Pythons */ -#if PY_VERSION_HEX < 0x02030000 -static -PyObject *PyBool_FromLong(long ok) -{ - PyObject *result = ok ? Py_True : Py_False; - Py_INCREF(result); - return result; -} -#endif - -/* Py_ssize_t for old Pythons */ -/* This code is as recommended by: */ -/* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */ -#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN) -typedef int Py_ssize_t; -# define PY_SSIZE_T_MAX INT_MAX -# define PY_SSIZE_T_MIN INT_MIN -#endif - -/* ----------------------------------------------------------------------------- - * error manipulation - * ----------------------------------------------------------------------------- */ - -SWIGRUNTIME PyObject* -SWIG_Python_ErrorType(int code) { - PyObject* type = 0; - switch(code) { - case SWIG_MemoryError: - type = PyExc_MemoryError; - break; - case SWIG_IOError: - type = PyExc_IOError; - break; - case SWIG_RuntimeError: - type = PyExc_RuntimeError; - break; - case SWIG_IndexError: - type = PyExc_IndexError; - break; - case SWIG_TypeError: - type = PyExc_TypeError; - break; - case SWIG_DivisionByZero: - type = PyExc_ZeroDivisionError; - break; - case SWIG_OverflowError: - type = PyExc_OverflowError; - break; - case SWIG_SyntaxError: - type = PyExc_SyntaxError; - break; - case SWIG_ValueError: - type = PyExc_ValueError; - break; - case SWIG_SystemError: - type = PyExc_SystemError; - break; - case SWIG_AttributeError: - type = PyExc_AttributeError; - break; - default: - type = PyExc_RuntimeError; - } - return type; -} - - -SWIGRUNTIME void -SWIG_Python_AddErrorMsg(const char* mesg) -{ - PyObject *type = 0; - PyObject *value = 0; - PyObject *traceback = 0; - - if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback); - if (value) { - char *tmp; - PyObject *old_str = PyObject_Str(value); - PyErr_Clear(); - Py_XINCREF(type); - - PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg); - SWIG_Python_str_DelForPy3(tmp); - Py_DECREF(old_str); - Py_DECREF(value); - } else { - PyErr_SetString(PyExc_RuntimeError, mesg); - } -} - -#if defined(SWIG_PYTHON_NO_THREADS) -# if defined(SWIG_PYTHON_THREADS) -# undef SWIG_PYTHON_THREADS -# endif -#endif -#if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */ -# if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL) -# if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */ -# define SWIG_PYTHON_USE_GIL -# endif -# endif -# if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */ -# ifndef SWIG_PYTHON_INITIALIZE_THREADS -# define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads() -# endif -# ifdef __cplusplus /* C++ code */ - class SWIG_Python_Thread_Block { - bool status; - PyGILState_STATE state; - public: - void end() { if (status) { PyGILState_Release(state); status = false;} } - SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {} - ~SWIG_Python_Thread_Block() { end(); } - }; - class SWIG_Python_Thread_Allow { - bool status; - PyThreadState *save; - public: - void end() { if (status) { PyEval_RestoreThread(save); status = false; }} - SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {} - ~SWIG_Python_Thread_Allow() { end(); } - }; -# define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block -# define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end() -# define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow -# define SWIG_PYTHON_THREAD_END_ALLOW _swig_thread_allow.end() -# else /* C code */ -# define SWIG_PYTHON_THREAD_BEGIN_BLOCK PyGILState_STATE _swig_thread_block = PyGILState_Ensure() -# define SWIG_PYTHON_THREAD_END_BLOCK PyGILState_Release(_swig_thread_block) -# define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread() -# define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow) -# endif -# else /* Old thread way, not implemented, user must provide it */ -# if !defined(SWIG_PYTHON_INITIALIZE_THREADS) -# define SWIG_PYTHON_INITIALIZE_THREADS -# endif -# if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK) -# define SWIG_PYTHON_THREAD_BEGIN_BLOCK -# endif -# if !defined(SWIG_PYTHON_THREAD_END_BLOCK) -# define SWIG_PYTHON_THREAD_END_BLOCK -# endif -# if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW) -# define SWIG_PYTHON_THREAD_BEGIN_ALLOW -# endif -# if !defined(SWIG_PYTHON_THREAD_END_ALLOW) -# define SWIG_PYTHON_THREAD_END_ALLOW -# endif -# endif -#else /* No thread support */ -# define SWIG_PYTHON_INITIALIZE_THREADS -# define SWIG_PYTHON_THREAD_BEGIN_BLOCK -# define SWIG_PYTHON_THREAD_END_BLOCK -# define SWIG_PYTHON_THREAD_BEGIN_ALLOW -# define SWIG_PYTHON_THREAD_END_ALLOW -#endif - -/* ----------------------------------------------------------------------------- - * Python API portion that goes into the runtime - * ----------------------------------------------------------------------------- */ - -#ifdef __cplusplus -extern "C" { -#if 0 -} /* cc-mode */ -#endif -#endif - -/* ----------------------------------------------------------------------------- - * Constant declarations - * ----------------------------------------------------------------------------- */ - -/* Constant Types */ -#define SWIG_PY_POINTER 4 -#define SWIG_PY_BINARY 5 - -/* Constant information structure */ -typedef struct swig_const_info { - int type; - char *name; - long lvalue; - double dvalue; - void *pvalue; - swig_type_info **ptype; -} swig_const_info; - - -/* ----------------------------------------------------------------------------- - * Wrapper of PyInstanceMethod_New() used in Python 3 - * It is exported to the generated module, used for -fastproxy - * ----------------------------------------------------------------------------- */ -SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *self, PyObject *func) -{ -#if PY_VERSION_HEX >= 0x03000000 - return PyInstanceMethod_New(func); -#else - return NULL; -#endif -} - -#ifdef __cplusplus -#if 0 -{ /* cc-mode */ -#endif -} -#endif - - -/* ----------------------------------------------------------------------------- - * See the LICENSE file for information on copyright, usage and redistribution - * of SWIG, and the README file for authors - http://www.swig.org/release.html. - * - * pyrun.swg - * - * This file contains the runtime support for Python modules - * and includes code for managing global variables and pointer - * type checking. - * - * ----------------------------------------------------------------------------- */ - -/* Common SWIG API */ - -/* for raw pointers */ -#define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0) -#define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags) -#define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own) -#define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(ptr, type, flags) -#define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty) -#define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src) -#define swig_owntype int - -/* for raw packed data */ -#define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty) -#define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type) - -/* for class or struct pointers */ -#define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags) -#define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags) - -/* for C or C++ function pointers */ -#define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type) -#define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(ptr, type, 0) - -/* for C++ member pointers, ie, member methods */ -#define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty) -#define SWIG_NewMemberObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type) - - -/* Runtime API */ - -#define SWIG_GetModule(clientdata) SWIG_Python_GetModule() -#define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer) -#define SWIG_NewClientData(obj) SwigPyClientData_New(obj) - -#define SWIG_SetErrorObj SWIG_Python_SetErrorObj -#define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg -#define SWIG_ErrorType(code) SWIG_Python_ErrorType(code) -#define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg) -#define SWIG_fail goto fail - - -/* Runtime API implementation */ - -/* Error manipulation */ - -SWIGINTERN void -SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) { - SWIG_PYTHON_THREAD_BEGIN_BLOCK; - PyErr_SetObject(errtype, obj); - Py_DECREF(obj); - SWIG_PYTHON_THREAD_END_BLOCK; -} - -SWIGINTERN void -SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) { - SWIG_PYTHON_THREAD_BEGIN_BLOCK; - PyErr_SetString(errtype, (char *) msg); - SWIG_PYTHON_THREAD_END_BLOCK; -} - -#define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj) - -/* Set a constant value */ - -SWIGINTERN void -SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { - PyDict_SetItemString(d, (char*) name, obj); - Py_DECREF(obj); -} - -/* Append a value to the result obj */ - -SWIGINTERN PyObject* -SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { -#if !defined(SWIG_PYTHON_OUTPUT_TUPLE) - if (!result) { - result = obj; - } else if (result == Py_None) { - Py_DECREF(result); - result = obj; - } else { - if (!PyList_Check(result)) { - PyObject *o2 = result; - result = PyList_New(1); - PyList_SetItem(result, 0, o2); - } - PyList_Append(result,obj); - Py_DECREF(obj); - } - return result; -#else - PyObject* o2; - PyObject* o3; - if (!result) { - result = obj; - } else if (result == Py_None) { - Py_DECREF(result); - result = obj; - } else { - if (!PyTuple_Check(result)) { - o2 = result; - result = PyTuple_New(1); - PyTuple_SET_ITEM(result, 0, o2); - } - o3 = PyTuple_New(1); - PyTuple_SET_ITEM(o3, 0, obj); - o2 = result; - result = PySequence_Concat(o2, o3); - Py_DECREF(o2); - Py_DECREF(o3); - } - return result; -#endif -} - -/* Unpack the argument tuple */ - -SWIGINTERN int -SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs) -{ - if (!args) { - if (!min && !max) { - return 1; - } else { - PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none", - name, (min == max ? "" : "at least "), (int)min); - return 0; - } - } - if (!PyTuple_Check(args)) { - PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple"); - return 0; - } else { - register Py_ssize_t l = PyTuple_GET_SIZE(args); - if (l < min) { - PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", - name, (min == max ? "" : "at least "), (int)min, (int)l); - return 0; - } else if (l > max) { - PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", - name, (min == max ? "" : "at most "), (int)max, (int)l); - return 0; - } else { - register int i; - for (i = 0; i < l; ++i) { - objs[i] = PyTuple_GET_ITEM(args, i); - } - for (; l < max; ++l) { - objs[l] = 0; - } - return i + 1; - } - } -} - -/* A functor is a function object with one single object argument */ -#if PY_VERSION_HEX >= 0x02020000 -#define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL); -#else -#define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunction(functor, "O", obj); -#endif - -/* - Helper for static pointer initialization for both C and C++ code, for example - static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...); -*/ -#ifdef __cplusplus -#define SWIG_STATIC_POINTER(var) var -#else -#define SWIG_STATIC_POINTER(var) var = 0; if (!var) var -#endif - -/* ----------------------------------------------------------------------------- - * Pointer declarations - * ----------------------------------------------------------------------------- */ - -/* Flags for new pointer objects */ -#define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1) -#define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN) - -#define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1) - -#ifdef __cplusplus -extern "C" { -#if 0 -} /* cc-mode */ -#endif -#endif - -/* How to access Py_None */ -#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) -# ifndef SWIG_PYTHON_NO_BUILD_NONE -# ifndef SWIG_PYTHON_BUILD_NONE -# define SWIG_PYTHON_BUILD_NONE -# endif -# endif -#endif - -#ifdef SWIG_PYTHON_BUILD_NONE -# ifdef Py_None -# undef Py_None -# define Py_None SWIG_Py_None() -# endif -SWIGRUNTIMEINLINE PyObject * -_SWIG_Py_None(void) -{ - PyObject *none = Py_BuildValue((char*)""); - Py_DECREF(none); - return none; -} -SWIGRUNTIME PyObject * -SWIG_Py_None(void) -{ - static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None(); - return none; -} -#endif - -/* The python void return value */ - -SWIGRUNTIMEINLINE PyObject * -SWIG_Py_Void(void) -{ - PyObject *none = Py_None; - Py_INCREF(none); - return none; -} - -/* SwigPyClientData */ - -typedef struct { - PyObject *klass; - PyObject *newraw; - PyObject *newargs; - PyObject *destroy; - int delargs; - int implicitconv; -} SwigPyClientData; - -SWIGRUNTIMEINLINE int -SWIG_Python_CheckImplicit(swig_type_info *ty) -{ - SwigPyClientData *data = (SwigPyClientData *)ty->clientdata; - return data ? data->implicitconv : 0; -} - -SWIGRUNTIMEINLINE PyObject * -SWIG_Python_ExceptionType(swig_type_info *desc) { - SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0; - PyObject *klass = data ? data->klass : 0; - return (klass ? klass : PyExc_RuntimeError); -} - - -SWIGRUNTIME SwigPyClientData * -SwigPyClientData_New(PyObject* obj) -{ - if (!obj) { - return 0; - } else { - SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData)); - /* the klass element */ - data->klass = obj; - Py_INCREF(data->klass); - /* the newraw method and newargs arguments used to create a new raw instance */ - if (PyClass_Check(obj)) { - data->newraw = 0; - data->newargs = obj; - Py_INCREF(obj); - } else { -#if (PY_VERSION_HEX < 0x02020000) - data->newraw = 0; -#else - data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__"); -#endif - if (data->newraw) { - Py_INCREF(data->newraw); - data->newargs = PyTuple_New(1); - PyTuple_SetItem(data->newargs, 0, obj); - } else { - data->newargs = obj; - } - Py_INCREF(data->newargs); - } - /* the destroy method, aka as the C++ delete method */ - data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__"); - if (PyErr_Occurred()) { - PyErr_Clear(); - data->destroy = 0; - } - if (data->destroy) { - int flags; - Py_INCREF(data->destroy); - flags = PyCFunction_GET_FLAGS(data->destroy); -#ifdef METH_O - data->delargs = !(flags & (METH_O)); -#else - data->delargs = 0; -#endif - } else { - data->delargs = 0; - } - data->implicitconv = 0; - return data; - } -} - -SWIGRUNTIME void -SwigPyClientData_Del(SwigPyClientData* data) -{ - Py_XDECREF(data->newraw); - Py_XDECREF(data->newargs); - Py_XDECREF(data->destroy); -} - -/* =============== SwigPyObject =====================*/ - -typedef struct { - PyObject_HEAD - void *ptr; - swig_type_info *ty; - int own; - PyObject *next; -} SwigPyObject; - -SWIGRUNTIME PyObject * -SwigPyObject_long(SwigPyObject *v) -{ - return PyLong_FromVoidPtr(v->ptr); -} - -SWIGRUNTIME PyObject * -SwigPyObject_format(const char* fmt, SwigPyObject *v) -{ - PyObject *res = NULL; - PyObject *args = PyTuple_New(1); - if (args) { - if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) { - PyObject *ofmt = SWIG_Python_str_FromChar(fmt); - if (ofmt) { -#if PY_VERSION_HEX >= 0x03000000 - res = PyUnicode_Format(ofmt,args); -#else - res = PyString_Format(ofmt,args); -#endif - Py_DECREF(ofmt); - } - Py_DECREF(args); - } - } - return res; -} - -SWIGRUNTIME PyObject * -SwigPyObject_oct(SwigPyObject *v) -{ - return SwigPyObject_format("%o",v); -} - -SWIGRUNTIME PyObject * -SwigPyObject_hex(SwigPyObject *v) -{ - return SwigPyObject_format("%x",v); -} - -SWIGRUNTIME PyObject * -#ifdef METH_NOARGS -SwigPyObject_repr(SwigPyObject *v) -#else -SwigPyObject_repr(SwigPyObject *v, PyObject *args) -#endif -{ - const char *name = SWIG_TypePrettyName(v->ty); - PyObject *repr = SWIG_Python_str_FromFormat("", name, v); - if (v->next) { -#ifdef METH_NOARGS - PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next); -#else - PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args); -#endif -#if PY_VERSION_HEX >= 0x03000000 - PyObject *joined = PyUnicode_Concat(repr, nrep); - Py_DecRef(repr); - Py_DecRef(nrep); - repr = joined; -#else - PyString_ConcatAndDel(&repr,nrep); -#endif - } - return repr; -} - -SWIGRUNTIME int -SwigPyObject_print(SwigPyObject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) -{ - char *str; -#ifdef METH_NOARGS - PyObject *repr = SwigPyObject_repr(v); -#else - PyObject *repr = SwigPyObject_repr(v, NULL); -#endif - if (repr) { - str = SWIG_Python_str_AsChar(repr); - fputs(str, fp); - SWIG_Python_str_DelForPy3(str); - Py_DECREF(repr); - return 0; - } else { - return 1; - } -} - -SWIGRUNTIME PyObject * -SwigPyObject_str(SwigPyObject *v) -{ - char result[SWIG_BUFFER_SIZE]; - return SWIG_PackVoidPtr(result, v->ptr, v->ty->name, sizeof(result)) ? - SWIG_Python_str_FromChar(result) : 0; -} - -SWIGRUNTIME int -SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w) -{ - void *i = v->ptr; - void *j = w->ptr; - return (i < j) ? -1 : ((i > j) ? 1 : 0); -} - -/* Added for Python 3.x, would it also be useful for Python 2.x? */ -SWIGRUNTIME PyObject* -SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op) -{ - PyObject* res; - if( op != Py_EQ && op != Py_NE ) { - Py_INCREF(Py_NotImplemented); - return Py_NotImplemented; - } - if( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ) - res = Py_True; - else - res = Py_False; - Py_INCREF(res); - return res; -} - - -SWIGRUNTIME PyTypeObject* _PySwigObject_type(void); - -SWIGRUNTIME PyTypeObject* -SwigPyObject_type(void) { - static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigObject_type(); - return type; -} - -SWIGRUNTIMEINLINE int -SwigPyObject_Check(PyObject *op) { - return (Py_TYPE(op) == SwigPyObject_type()) - || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0); -} - -SWIGRUNTIME PyObject * -SwigPyObject_New(void *ptr, swig_type_info *ty, int own); - -SWIGRUNTIME void -SwigPyObject_dealloc(PyObject *v) -{ - SwigPyObject *sobj = (SwigPyObject *) v; - PyObject *next = sobj->next; - if (sobj->own == SWIG_POINTER_OWN) { - swig_type_info *ty = sobj->ty; - SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0; - PyObject *destroy = data ? data->destroy : 0; - if (destroy) { - /* destroy is always a VARARGS method */ - PyObject *res; - if (data->delargs) { - /* we need to create a temporary object to carry the destroy operation */ - PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0); - res = SWIG_Python_CallFunctor(destroy, tmp); - Py_DECREF(tmp); - } else { - PyCFunction meth = PyCFunction_GET_FUNCTION(destroy); - PyObject *mself = PyCFunction_GET_SELF(destroy); - res = ((*meth)(mself, v)); - } - Py_XDECREF(res); - } -#if !defined(SWIG_PYTHON_SILENT_MEMLEAK) - else { - const char *name = SWIG_TypePrettyName(ty); - printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown")); - } -#endif - } - Py_XDECREF(next); - PyObject_DEL(v); -} - -SWIGRUNTIME PyObject* -SwigPyObject_append(PyObject* v, PyObject* next) -{ - SwigPyObject *sobj = (SwigPyObject *) v; -#ifndef METH_O - PyObject *tmp = 0; - if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL; - next = tmp; -#endif - if (!SwigPyObject_Check(next)) { - return NULL; - } - sobj->next = next; - Py_INCREF(next); - return SWIG_Py_Void(); -} - -SWIGRUNTIME PyObject* -#ifdef METH_NOARGS -SwigPyObject_next(PyObject* v) -#else -SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) -#endif -{ - SwigPyObject *sobj = (SwigPyObject *) v; - if (sobj->next) { - Py_INCREF(sobj->next); - return sobj->next; - } else { - return SWIG_Py_Void(); - } -} - -SWIGINTERN PyObject* -#ifdef METH_NOARGS -SwigPyObject_disown(PyObject *v) -#else -SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) -#endif -{ - SwigPyObject *sobj = (SwigPyObject *)v; - sobj->own = 0; - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject* -#ifdef METH_NOARGS -SwigPyObject_acquire(PyObject *v) -#else -SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) -#endif -{ - SwigPyObject *sobj = (SwigPyObject *)v; - sobj->own = SWIG_POINTER_OWN; - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject* -SwigPyObject_own(PyObject *v, PyObject *args) -{ - PyObject *val = 0; -#if (PY_VERSION_HEX < 0x02020000) - if (!PyArg_ParseTuple(args,(char *)"|O:own",&val)) -#else - if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val)) -#endif - { - return NULL; - } - else - { - SwigPyObject *sobj = (SwigPyObject *)v; - PyObject *obj = PyBool_FromLong(sobj->own); - if (val) { -#ifdef METH_NOARGS - if (PyObject_IsTrue(val)) { - SwigPyObject_acquire(v); - } else { - SwigPyObject_disown(v); - } -#else - if (PyObject_IsTrue(val)) { - SwigPyObject_acquire(v,args); - } else { - SwigPyObject_disown(v,args); - } -#endif - } - return obj; - } -} - -#ifdef METH_O -static PyMethodDef -swigobject_methods[] = { - {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"}, - {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS, (char *)"aquires ownership of the pointer"}, - {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, - {(char *)"append", (PyCFunction)SwigPyObject_append, METH_O, (char *)"appends another 'this' object"}, - {(char *)"next", (PyCFunction)SwigPyObject_next, METH_NOARGS, (char *)"returns the next 'this' object"}, - {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_NOARGS, (char *)"returns object representation"}, - {0, 0, 0, 0} -}; -#else -static PyMethodDef -swigobject_methods[] = { - {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_VARARGS, (char *)"releases ownership of the pointer"}, - {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_VARARGS, (char *)"aquires ownership of the pointer"}, - {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, - {(char *)"append", (PyCFunction)SwigPyObject_append, METH_VARARGS, (char *)"appends another 'this' object"}, - {(char *)"next", (PyCFunction)SwigPyObject_next, METH_VARARGS, (char *)"returns the next 'this' object"}, - {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_VARARGS, (char *)"returns object representation"}, - {0, 0, 0, 0} -}; -#endif - -#if PY_VERSION_HEX < 0x02020000 -SWIGINTERN PyObject * -SwigPyObject_getattr(SwigPyObject *sobj,char *name) -{ - return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name); -} -#endif - -SWIGRUNTIME PyTypeObject* -_PySwigObject_type(void) { - static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer"; - - static PyNumberMethods SwigPyObject_as_number = { - (binaryfunc)0, /*nb_add*/ - (binaryfunc)0, /*nb_subtract*/ - (binaryfunc)0, /*nb_multiply*/ - /* nb_divide removed in Python 3 */ -#if PY_VERSION_HEX < 0x03000000 - (binaryfunc)0, /*nb_divide*/ -#endif - (binaryfunc)0, /*nb_remainder*/ - (binaryfunc)0, /*nb_divmod*/ - (ternaryfunc)0,/*nb_power*/ - (unaryfunc)0, /*nb_negative*/ - (unaryfunc)0, /*nb_positive*/ - (unaryfunc)0, /*nb_absolute*/ - (inquiry)0, /*nb_nonzero*/ - 0, /*nb_invert*/ - 0, /*nb_lshift*/ - 0, /*nb_rshift*/ - 0, /*nb_and*/ - 0, /*nb_xor*/ - 0, /*nb_or*/ -#if PY_VERSION_HEX < 0x03000000 - 0, /*nb_coerce*/ -#endif - (unaryfunc)SwigPyObject_long, /*nb_int*/ -#if PY_VERSION_HEX < 0x03000000 - (unaryfunc)SwigPyObject_long, /*nb_long*/ -#else - 0, /*nb_reserved*/ -#endif - (unaryfunc)0, /*nb_float*/ -#if PY_VERSION_HEX < 0x03000000 - (unaryfunc)SwigPyObject_oct, /*nb_oct*/ - (unaryfunc)SwigPyObject_hex, /*nb_hex*/ -#endif -#if PY_VERSION_HEX >= 0x03000000 /* 3.0 */ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */ -#elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */ -#elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */ -#elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */ - 0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */ -#endif - }; - - static PyTypeObject swigpyobject_type; - static int type_init = 0; - if (!type_init) { - const PyTypeObject tmp - = { - /* PyObject header changed in Python 3 */ -#if PY_VERSION_HEX >= 0x03000000 - PyVarObject_HEAD_INIT(&PyType_Type, 0) -#else - PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ -#endif - (char *)"SwigPyObject", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - (destructor)SwigPyObject_dealloc, /* tp_dealloc */ - (printfunc)SwigPyObject_print, /* tp_print */ -#if PY_VERSION_HEX < 0x02020000 - (getattrfunc)SwigPyObject_getattr, /* tp_getattr */ -#else - (getattrfunc)0, /* tp_getattr */ -#endif - (setattrfunc)0, /* tp_setattr */ -#if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */ -#else - (cmpfunc)SwigPyObject_compare, /* tp_compare */ -#endif - (reprfunc)SwigPyObject_repr, /* tp_repr */ - &SwigPyObject_as_number, /* tp_as_number */ - 0, /* tp_as_sequence */ - 0, /* tp_as_mapping */ - (hashfunc)0, /* tp_hash */ - (ternaryfunc)0, /* tp_call */ - (reprfunc)SwigPyObject_str, /* tp_str */ - PyObject_GenericGetAttr, /* tp_getattro */ - 0, /* tp_setattro */ - 0, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT, /* tp_flags */ - swigobject_doc, /* tp_doc */ - 0, /* tp_traverse */ - 0, /* tp_clear */ - (richcmpfunc)SwigPyObject_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ -#if PY_VERSION_HEX >= 0x02020000 - 0, /* tp_iter */ - 0, /* tp_iternext */ - swigobject_methods, /* tp_methods */ - 0, /* tp_members */ - 0, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - 0, /* tp_descr_get */ - 0, /* tp_descr_set */ - 0, /* tp_dictoffset */ - 0, /* tp_init */ - 0, /* tp_alloc */ - 0, /* tp_new */ - 0, /* tp_free */ - 0, /* tp_is_gc */ - 0, /* tp_bases */ - 0, /* tp_mro */ - 0, /* tp_cache */ - 0, /* tp_subclasses */ - 0, /* tp_weaklist */ -#endif -#if PY_VERSION_HEX >= 0x02030000 - 0, /* tp_del */ -#endif -#ifdef COUNT_ALLOCS - 0,0,0,0 /* tp_alloc -> tp_next */ -#endif - }; - swigpyobject_type = tmp; - /* for Python 3 we already assigned ob_type in PyVarObject_HEAD_INIT() */ -#if PY_VERSION_HEX < 0x03000000 - swigpyobject_type.ob_type = &PyType_Type; -#endif - type_init = 1; - } - return &swigpyobject_type; -} - -SWIGRUNTIME PyObject * -SwigPyObject_New(void *ptr, swig_type_info *ty, int own) -{ - SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type()); - if (sobj) { - sobj->ptr = ptr; - sobj->ty = ty; - sobj->own = own; - sobj->next = 0; - } - return (PyObject *)sobj; -} - -/* ----------------------------------------------------------------------------- - * Implements a simple Swig Packed type, and use it instead of string - * ----------------------------------------------------------------------------- */ - -typedef struct { - PyObject_HEAD - void *pack; - swig_type_info *ty; - size_t size; -} SwigPyPacked; - -SWIGRUNTIME int -SwigPyPacked_print(SwigPyPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags)) -{ - char result[SWIG_BUFFER_SIZE]; - fputs("pack, v->size, 0, sizeof(result))) { - fputs("at ", fp); - fputs(result, fp); - } - fputs(v->ty->name,fp); - fputs(">", fp); - return 0; -} - -SWIGRUNTIME PyObject * -SwigPyPacked_repr(SwigPyPacked *v) -{ - char result[SWIG_BUFFER_SIZE]; - if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) { - return SWIG_Python_str_FromFormat("", result, v->ty->name); - } else { - return SWIG_Python_str_FromFormat("", v->ty->name); - } -} - -SWIGRUNTIME PyObject * -SwigPyPacked_str(SwigPyPacked *v) -{ - char result[SWIG_BUFFER_SIZE]; - if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){ - return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name); - } else { - return SWIG_Python_str_FromChar(v->ty->name); - } -} - -SWIGRUNTIME int -SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w) -{ - size_t i = v->size; - size_t j = w->size; - int s = (i < j) ? -1 : ((i > j) ? 1 : 0); - return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size); -} - -SWIGRUNTIME PyTypeObject* _PySwigPacked_type(void); - -SWIGRUNTIME PyTypeObject* -SwigPyPacked_type(void) { - static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigPacked_type(); - return type; -} - -SWIGRUNTIMEINLINE int -SwigPyPacked_Check(PyObject *op) { - return ((op)->ob_type == _PySwigPacked_type()) - || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0); -} - -SWIGRUNTIME void -SwigPyPacked_dealloc(PyObject *v) -{ - if (SwigPyPacked_Check(v)) { - SwigPyPacked *sobj = (SwigPyPacked *) v; - free(sobj->pack); - } - PyObject_DEL(v); -} - -SWIGRUNTIME PyTypeObject* -_PySwigPacked_type(void) { - static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer"; - static PyTypeObject swigpypacked_type; - static int type_init = 0; - if (!type_init) { - const PyTypeObject tmp - = { - /* PyObject header changed in Python 3 */ -#if PY_VERSION_HEX>=0x03000000 - PyVarObject_HEAD_INIT(&PyType_Type, 0) -#else - PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ -#endif - (char *)"SwigPyPacked", /* tp_name */ - sizeof(SwigPyPacked), /* tp_basicsize */ - 0, /* tp_itemsize */ - (destructor)SwigPyPacked_dealloc, /* tp_dealloc */ - (printfunc)SwigPyPacked_print, /* tp_print */ - (getattrfunc)0, /* tp_getattr */ - (setattrfunc)0, /* tp_setattr */ -#if PY_VERSION_HEX>=0x03000000 - 0, /* tp_reserved in 3.0.1 */ -#else - (cmpfunc)SwigPyPacked_compare, /* tp_compare */ -#endif - (reprfunc)SwigPyPacked_repr, /* tp_repr */ - 0, /* tp_as_number */ - 0, /* tp_as_sequence */ - 0, /* tp_as_mapping */ - (hashfunc)0, /* tp_hash */ - (ternaryfunc)0, /* tp_call */ - (reprfunc)SwigPyPacked_str, /* tp_str */ - PyObject_GenericGetAttr, /* tp_getattro */ - 0, /* tp_setattro */ - 0, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT, /* tp_flags */ - swigpacked_doc, /* tp_doc */ - 0, /* tp_traverse */ - 0, /* tp_clear */ - 0, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ -#if PY_VERSION_HEX >= 0x02020000 - 0, /* tp_iter */ - 0, /* tp_iternext */ - 0, /* tp_methods */ - 0, /* tp_members */ - 0, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - 0, /* tp_descr_get */ - 0, /* tp_descr_set */ - 0, /* tp_dictoffset */ - 0, /* tp_init */ - 0, /* tp_alloc */ - 0, /* tp_new */ - 0, /* tp_free */ - 0, /* tp_is_gc */ - 0, /* tp_bases */ - 0, /* tp_mro */ - 0, /* tp_cache */ - 0, /* tp_subclasses */ - 0, /* tp_weaklist */ -#endif -#if PY_VERSION_HEX >= 0x02030000 - 0, /* tp_del */ -#endif -#ifdef COUNT_ALLOCS - 0,0,0,0 /* tp_alloc -> tp_next */ -#endif - }; - swigpypacked_type = tmp; - /* for Python 3 the ob_type already assigned in PyVarObject_HEAD_INIT() */ -#if PY_VERSION_HEX < 0x03000000 - swigpypacked_type.ob_type = &PyType_Type; -#endif - type_init = 1; - } - return &swigpypacked_type; -} - -SWIGRUNTIME PyObject * -SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty) -{ - SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type()); - if (sobj) { - void *pack = malloc(size); - if (pack) { - memcpy(pack, ptr, size); - sobj->pack = pack; - sobj->ty = ty; - sobj->size = size; - } else { - PyObject_DEL((PyObject *) sobj); - sobj = 0; - } - } - return (PyObject *) sobj; -} - -SWIGRUNTIME swig_type_info * -SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size) -{ - if (SwigPyPacked_Check(obj)) { - SwigPyPacked *sobj = (SwigPyPacked *)obj; - if (sobj->size != size) return 0; - memcpy(ptr, sobj->pack, size); - return sobj->ty; - } else { - return 0; - } -} - -/* ----------------------------------------------------------------------------- - * pointers/data manipulation - * ----------------------------------------------------------------------------- */ - -SWIGRUNTIMEINLINE PyObject * -_SWIG_This(void) -{ - return SWIG_Python_str_FromChar("this"); -} - -SWIGRUNTIME PyObject * -SWIG_This(void) -{ - static PyObject *SWIG_STATIC_POINTER(swig_this) = _SWIG_This(); - return swig_this; -} - -/* #define SWIG_PYTHON_SLOW_GETSET_THIS */ - -/* TODO: I don't know how to implement the fast getset in Python 3 right now */ -#if PY_VERSION_HEX>=0x03000000 -#define SWIG_PYTHON_SLOW_GETSET_THIS -#endif - -SWIGRUNTIME SwigPyObject * -SWIG_Python_GetSwigThis(PyObject *pyobj) -{ - if (SwigPyObject_Check(pyobj)) { - return (SwigPyObject *) pyobj; - } else { - PyObject *obj = 0; -#if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000)) - if (PyInstance_Check(pyobj)) { - obj = _PyInstance_Lookup(pyobj, SWIG_This()); - } else { - PyObject **dictptr = _PyObject_GetDictPtr(pyobj); - if (dictptr != NULL) { - PyObject *dict = *dictptr; - obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0; - } else { -#ifdef PyWeakref_CheckProxy - if (PyWeakref_CheckProxy(pyobj)) { - PyObject *wobj = PyWeakref_GET_OBJECT(pyobj); - return wobj ? SWIG_Python_GetSwigThis(wobj) : 0; - } -#endif - obj = PyObject_GetAttr(pyobj,SWIG_This()); - if (obj) { - Py_DECREF(obj); - } else { - if (PyErr_Occurred()) PyErr_Clear(); - return 0; - } - } - } -#else - obj = PyObject_GetAttr(pyobj,SWIG_This()); - if (obj) { - Py_DECREF(obj); - } else { - if (PyErr_Occurred()) PyErr_Clear(); - return 0; - } -#endif - if (obj && !SwigPyObject_Check(obj)) { - /* a PyObject is called 'this', try to get the 'real this' - SwigPyObject from it */ - return SWIG_Python_GetSwigThis(obj); - } - return (SwigPyObject *)obj; - } -} - -/* Acquire a pointer value */ - -SWIGRUNTIME int -SWIG_Python_AcquirePtr(PyObject *obj, int own) { - if (own == SWIG_POINTER_OWN) { - SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj); - if (sobj) { - int oldown = sobj->own; - sobj->own = own; - return oldown; - } - } - return 0; -} - -/* Convert a pointer value */ - -SWIGRUNTIME int -SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) { - if (!obj) return SWIG_ERROR; - if (obj == Py_None) { - if (ptr) *ptr = 0; - return SWIG_OK; - } else { - SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj); - if (own) - *own = 0; - while (sobj) { - void *vptr = sobj->ptr; - if (ty) { - swig_type_info *to = sobj->ty; - if (to == ty) { - /* no type cast needed */ - if (ptr) *ptr = vptr; - break; - } else { - swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); - if (!tc) { - sobj = (SwigPyObject *)sobj->next; - } else { - if (ptr) { - int newmemory = 0; - *ptr = SWIG_TypeCast(tc,vptr,&newmemory); - if (newmemory == SWIG_CAST_NEW_MEMORY) { - assert(own); - if (own) - *own = *own | SWIG_CAST_NEW_MEMORY; - } - } - break; - } - } - } else { - if (ptr) *ptr = vptr; - break; - } - } - if (sobj) { - if (own) - *own = *own | sobj->own; - if (flags & SWIG_POINTER_DISOWN) { - sobj->own = 0; - } - return SWIG_OK; - } else { - int res = SWIG_ERROR; - if (flags & SWIG_POINTER_IMPLICIT_CONV) { - SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0; - if (data && !data->implicitconv) { - PyObject *klass = data->klass; - if (klass) { - PyObject *impconv; - data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/ - impconv = SWIG_Python_CallFunctor(klass, obj); - data->implicitconv = 0; - if (PyErr_Occurred()) { - PyErr_Clear(); - impconv = 0; - } - if (impconv) { - SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv); - if (iobj) { - void *vptr; - res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0); - if (SWIG_IsOK(res)) { - if (ptr) { - *ptr = vptr; - /* transfer the ownership to 'ptr' */ - iobj->own = 0; - res = SWIG_AddCast(res); - res = SWIG_AddNewMask(res); - } else { - res = SWIG_AddCast(res); - } - } - } - Py_DECREF(impconv); - } - } - } - } - return res; - } - } -} - -/* Convert a function ptr value */ - -SWIGRUNTIME int -SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { - if (!PyCFunction_Check(obj)) { - return SWIG_ConvertPtr(obj, ptr, ty, 0); - } else { - void *vptr = 0; - - /* here we get the method pointer for callbacks */ - const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc); - const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0; - if (desc) - desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; - if (!desc) - return SWIG_ERROR; - if (ty) { - swig_cast_info *tc = SWIG_TypeCheck(desc,ty); - if (tc) { - int newmemory = 0; - *ptr = SWIG_TypeCast(tc,vptr,&newmemory); - assert(!newmemory); /* newmemory handling not yet implemented */ - } else { - return SWIG_ERROR; - } - } else { - *ptr = vptr; - } - return SWIG_OK; - } -} - -/* Convert a packed value value */ - -SWIGRUNTIME int -SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) { - swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz); - if (!to) return SWIG_ERROR; - if (ty) { - if (to != ty) { - /* check type cast? */ - swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); - if (!tc) return SWIG_ERROR; - } - } - return SWIG_OK; -} - -/* ----------------------------------------------------------------------------- - * Create a new pointer object - * ----------------------------------------------------------------------------- */ - -/* - Create a new instance object, without calling __init__, and set the - 'this' attribute. -*/ - -SWIGRUNTIME PyObject* -SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) -{ -#if (PY_VERSION_HEX >= 0x02020000) - PyObject *inst = 0; - PyObject *newraw = data->newraw; - if (newraw) { - inst = PyObject_Call(newraw, data->newargs, NULL); - if (inst) { -#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS) - PyObject **dictptr = _PyObject_GetDictPtr(inst); - if (dictptr != NULL) { - PyObject *dict = *dictptr; - if (dict == NULL) { - dict = PyDict_New(); - *dictptr = dict; - PyDict_SetItem(dict, SWIG_This(), swig_this); - } - } -#else - PyObject *key = SWIG_This(); - PyObject_SetAttr(inst, key, swig_this); -#endif - } - } else { -#if PY_VERSION_HEX >= 0x03000000 - inst = PyBaseObject_Type.tp_new((PyTypeObject*) data->newargs, Py_None, Py_None); - PyObject_SetAttr(inst, SWIG_This(), swig_this); - Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG; -#else - PyObject *dict = PyDict_New(); - PyDict_SetItem(dict, SWIG_This(), swig_this); - inst = PyInstance_NewRaw(data->newargs, dict); - Py_DECREF(dict); -#endif - } - return inst; -#else -#if (PY_VERSION_HEX >= 0x02010000) - PyObject *inst; - PyObject *dict = PyDict_New(); - PyDict_SetItem(dict, SWIG_This(), swig_this); - inst = PyInstance_NewRaw(data->newargs, dict); - Py_DECREF(dict); - return (PyObject *) inst; -#else - PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type); - if (inst == NULL) { - return NULL; - } - inst->in_class = (PyClassObject *)data->newargs; - Py_INCREF(inst->in_class); - inst->in_dict = PyDict_New(); - if (inst->in_dict == NULL) { - Py_DECREF(inst); - return NULL; - } -#ifdef Py_TPFLAGS_HAVE_WEAKREFS - inst->in_weakreflist = NULL; -#endif -#ifdef Py_TPFLAGS_GC - PyObject_GC_Init(inst); -#endif - PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this); - return (PyObject *) inst; -#endif -#endif -} - -SWIGRUNTIME void -SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this) -{ - PyObject *dict; -#if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS) - PyObject **dictptr = _PyObject_GetDictPtr(inst); - if (dictptr != NULL) { - dict = *dictptr; - if (dict == NULL) { - dict = PyDict_New(); - *dictptr = dict; - } - PyDict_SetItem(dict, SWIG_This(), swig_this); - return; - } -#endif - dict = PyObject_GetAttrString(inst, (char*)"__dict__"); - PyDict_SetItem(dict, SWIG_This(), swig_this); - Py_DECREF(dict); -} - - -SWIGINTERN PyObject * -SWIG_Python_InitShadowInstance(PyObject *args) { - PyObject *obj[2]; - if (!SWIG_Python_UnpackTuple(args,(char*)"swiginit", 2, 2, obj)) { - return NULL; - } else { - SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]); - if (sthis) { - SwigPyObject_append((PyObject*) sthis, obj[1]); - } else { - SWIG_Python_SetSwigThis(obj[0], obj[1]); - } - return SWIG_Py_Void(); - } -} - -/* Create a new pointer object */ - -SWIGRUNTIME PyObject * -SWIG_Python_NewPointerObj(void *ptr, swig_type_info *type, int flags) { - if (!ptr) { - return SWIG_Py_Void(); - } else { - int own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0; - PyObject *robj = SwigPyObject_New(ptr, type, own); - SwigPyClientData *clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0; - if (clientdata && !(flags & SWIG_POINTER_NOSHADOW)) { - PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj); - if (inst) { - Py_DECREF(robj); - robj = inst; - } - } - return robj; - } -} - -/* Create a new packed object */ - -SWIGRUNTIMEINLINE PyObject * -SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) { - return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void(); -} - -/* -----------------------------------------------------------------------------* - * Get type list - * -----------------------------------------------------------------------------*/ - -#ifdef SWIG_LINK_RUNTIME -void *SWIG_ReturnGlobalTypeList(void *); -#endif - -SWIGRUNTIME swig_module_info * -SWIG_Python_GetModule(void) { - static void *type_pointer = (void *)0; - /* first check if module already created */ - if (!type_pointer) { -#ifdef SWIG_LINK_RUNTIME - type_pointer = SWIG_ReturnGlobalTypeList((void *)0); -#else - type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, - (char*)"type_pointer" SWIG_TYPE_TABLE_NAME); - if (PyErr_Occurred()) { - PyErr_Clear(); - type_pointer = (void *)0; - } -#endif - } - return (swig_module_info *) type_pointer; -} - -#if PY_MAJOR_VERSION < 2 -/* PyModule_AddObject function was introduced in Python 2.0. The following function - is copied out of Python/modsupport.c in python version 2.3.4 */ -SWIGINTERN int -PyModule_AddObject(PyObject *m, char *name, PyObject *o) -{ - PyObject *dict; - if (!PyModule_Check(m)) { - PyErr_SetString(PyExc_TypeError, - "PyModule_AddObject() needs module as first arg"); - return SWIG_ERROR; - } - if (!o) { - PyErr_SetString(PyExc_TypeError, - "PyModule_AddObject() needs non-NULL value"); - return SWIG_ERROR; - } - - dict = PyModule_GetDict(m); - if (dict == NULL) { - /* Internal error -- modules must have a dict! */ - PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__", - PyModule_GetName(m)); - return SWIG_ERROR; - } - if (PyDict_SetItemString(dict, name, o)) - return SWIG_ERROR; - Py_DECREF(o); - return SWIG_OK; -} -#endif - -SWIGRUNTIME void -SWIG_Python_DestroyModule(void *vptr) -{ - swig_module_info *swig_module = (swig_module_info *) vptr; - swig_type_info **types = swig_module->types; - size_t i; - for (i =0; i < swig_module->size; ++i) { - swig_type_info *ty = types[i]; - if (ty->owndata) { - SwigPyClientData *data = (SwigPyClientData *) ty->clientdata; - if (data) SwigPyClientData_Del(data); - } - } - Py_DECREF(SWIG_This()); -} - -SWIGRUNTIME void -SWIG_Python_SetModule(swig_module_info *swig_module) { - static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} };/* Sentinel */ - -#if PY_VERSION_HEX >= 0x03000000 - /* Add a dummy module object into sys.modules */ - PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION); -#else - PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, - swig_empty_runtime_method_table); -#endif - PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule); - if (pointer && module) { - PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer); - } else { - Py_XDECREF(pointer); - } -} - -/* The python cached type query */ -SWIGRUNTIME PyObject * -SWIG_Python_TypeCache(void) { - static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New(); - return cache; -} - -SWIGRUNTIME swig_type_info * -SWIG_Python_TypeQuery(const char *type) -{ - PyObject *cache = SWIG_Python_TypeCache(); - PyObject *key = SWIG_Python_str_FromChar(type); - PyObject *obj = PyDict_GetItem(cache, key); - swig_type_info *descriptor; - if (obj) { - descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj); - } else { - swig_module_info *swig_module = SWIG_Python_GetModule(); - descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type); - if (descriptor) { - obj = PyCObject_FromVoidPtr(descriptor, NULL); - PyDict_SetItem(cache, key, obj); - Py_DECREF(obj); - } - } - Py_DECREF(key); - return descriptor; -} - -/* - For backward compatibility only -*/ -#define SWIG_POINTER_EXCEPTION 0 -#define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg) -#define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags) - -SWIGRUNTIME int -SWIG_Python_AddErrMesg(const char* mesg, int infront) -{ - if (PyErr_Occurred()) { - PyObject *type = 0; - PyObject *value = 0; - PyObject *traceback = 0; - PyErr_Fetch(&type, &value, &traceback); - if (value) { - char *tmp; - PyObject *old_str = PyObject_Str(value); - Py_XINCREF(type); - PyErr_Clear(); - if (infront) { - PyErr_Format(type, "%s %s", mesg, tmp = SWIG_Python_str_AsChar(old_str)); - } else { - PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg); - } - SWIG_Python_str_DelForPy3(tmp); - Py_DECREF(old_str); - } - return 1; - } else { - return 0; - } -} - -SWIGRUNTIME int -SWIG_Python_ArgFail(int argnum) -{ - if (PyErr_Occurred()) { - /* add information about failing argument */ - char mesg[256]; - PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum); - return SWIG_Python_AddErrMesg(mesg, 1); - } else { - return 0; - } -} - -SWIGRUNTIMEINLINE const char * -SwigPyObject_GetDesc(PyObject *self) -{ - SwigPyObject *v = (SwigPyObject *)self; - swig_type_info *ty = v ? v->ty : 0; - return ty ? ty->str : (char*)""; -} - -SWIGRUNTIME void -SWIG_Python_TypeError(const char *type, PyObject *obj) -{ - if (type) { -#if defined(SWIG_COBJECT_TYPES) - if (obj && SwigPyObject_Check(obj)) { - const char *otype = (const char *) SwigPyObject_GetDesc(obj); - if (otype) { - PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received", - type, otype); - return; - } - } else -#endif - { - const char *otype = (obj ? obj->ob_type->tp_name : 0); - if (otype) { - PyObject *str = PyObject_Str(obj); - const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0; - if (cstr) { - PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received", - type, otype, cstr); - SWIG_Python_str_DelForPy3(cstr); - } else { - PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received", - type, otype); - } - Py_XDECREF(str); - return; - } - } - PyErr_Format(PyExc_TypeError, "a '%s' is expected", type); - } else { - PyErr_Format(PyExc_TypeError, "unexpected type is received"); - } -} - - -/* Convert a pointer value, signal an exception on a type mismatch */ -SWIGRUNTIME void * -SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags) { - void *result; - if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) { - PyErr_Clear(); -#if SWIG_POINTER_EXCEPTION - if (flags) { - SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj); - SWIG_Python_ArgFail(argnum); - } -#endif - } - return result; -} - - -#ifdef __cplusplus -#if 0 -{ /* cc-mode */ -#endif -} -#endif +/* ----------------------------------------------------------------------------- + * swigrun.swg + * + * This file contains generic C API SWIG runtime support for pointer + * type checking. + * ----------------------------------------------------------------------------- */ + +/* This should only be incremented when either the layout of swig_type_info changes, + or for whatever reason, the runtime changes incompatibly */ +#define SWIG_RUNTIME_VERSION "4" + +/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */ +#ifdef SWIG_TYPE_TABLE +# define SWIG_QUOTE_STRING(x) #x +# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x) +# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE) +#else +# define SWIG_TYPE_TABLE_NAME +#endif + +/* + You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for + creating a static or dynamic library from the SWIG runtime code. + In 99.9% of the cases, SWIG just needs to declare them as 'static'. + + But only do this if strictly necessary, ie, if you have problems + with your compiler or suchlike. +*/ + +#ifndef SWIGRUNTIME +# define SWIGRUNTIME SWIGINTERN +#endif + +#ifndef SWIGRUNTIMEINLINE +# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE +#endif + +/* Generic buffer size */ +#ifndef SWIG_BUFFER_SIZE +# define SWIG_BUFFER_SIZE 1024 +#endif + +/* Flags for pointer conversions */ +#define SWIG_POINTER_DISOWN 0x1 +#define SWIG_CAST_NEW_MEMORY 0x2 + +/* Flags for new pointer objects */ +#define SWIG_POINTER_OWN 0x1 + + +/* + Flags/methods for returning states. + + The SWIG conversion methods, as ConvertPtr, return and integer + that tells if the conversion was successful or not. And if not, + an error code can be returned (see swigerrors.swg for the codes). + + Use the following macros/flags to set or process the returning + states. + + In old versions of SWIG, code such as the following was usually written: + + if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) { + // success code + } else { + //fail code + } + + Now you can be more explicit: + + int res = SWIG_ConvertPtr(obj,vptr,ty.flags); + if (SWIG_IsOK(res)) { + // success code + } else { + // fail code + } + + which is the same really, but now you can also do + + Type *ptr; + int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags); + if (SWIG_IsOK(res)) { + // success code + if (SWIG_IsNewObj(res) { + ... + delete *ptr; + } else { + ... + } + } else { + // fail code + } + + I.e., now SWIG_ConvertPtr can return new objects and you can + identify the case and take care of the deallocation. Of course that + also requires SWIG_ConvertPtr to return new result values, such as + + int SWIG_ConvertPtr(obj, ptr,...) { + if () { + if () { + *ptr = ; + return SWIG_NEWOBJ; + } else { + *ptr = ; + return SWIG_OLDOBJ; + } + } else { + return SWIG_BADOBJ; + } + } + + Of course, returning the plain '0(success)/-1(fail)' still works, but you can be + more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the + SWIG errors code. + + Finally, if the SWIG_CASTRANK_MODE is enabled, the result code + allows to return the 'cast rank', for example, if you have this + + int food(double) + int fooi(int); + + and you call + + food(1) // cast rank '1' (1 -> 1.0) + fooi(1) // cast rank '0' + + just use the SWIG_AddCast()/SWIG_CheckState() +*/ + +#define SWIG_OK (0) +#define SWIG_ERROR (-1) +#define SWIG_IsOK(r) (r >= 0) +#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) + +/* The CastRankLimit says how many bits are used for the cast rank */ +#define SWIG_CASTRANKLIMIT (1 << 8) +/* The NewMask denotes the object was created (using new/malloc) */ +#define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1) +/* The TmpMask is for in/out typemaps that use temporal objects */ +#define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1) +/* Simple returning values */ +#define SWIG_BADOBJ (SWIG_ERROR) +#define SWIG_OLDOBJ (SWIG_OK) +#define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK) +#define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK) +/* Check, add and del mask methods */ +#define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r) +#define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r) +#define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK)) +#define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r) +#define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r) +#define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK)) + +/* Cast-Rank Mode */ +#if defined(SWIG_CASTRANK_MODE) +# ifndef SWIG_TypeRank +# define SWIG_TypeRank unsigned long +# endif +# ifndef SWIG_MAXCASTRANK /* Default cast allowed */ +# define SWIG_MAXCASTRANK (2) +# endif +# define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1) +# define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK) +SWIGINTERNINLINE int SWIG_AddCast(int r) { + return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r; +} +SWIGINTERNINLINE int SWIG_CheckState(int r) { + return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; +} +#else /* no cast-rank mode */ +# define SWIG_AddCast +# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) +#endif + + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef void *(*swig_converter_func)(void *, int *); +typedef struct swig_type_info *(*swig_dycast_func)(void **); + +/* Structure to store information on one type */ +typedef struct swig_type_info { + const char *name; /* mangled name of this type */ + const char *str; /* human readable name of this type */ + swig_dycast_func dcast; /* dynamic cast function down a hierarchy */ + struct swig_cast_info *cast; /* linked list of types that can cast into this type */ + void *clientdata; /* language specific type data */ + int owndata; /* flag if the structure owns the clientdata */ +} swig_type_info; + +/* Structure to store a type and conversion function used for casting */ +typedef struct swig_cast_info { + swig_type_info *type; /* pointer to type that is equivalent to this type */ + swig_converter_func converter; /* function to cast the void pointers */ + struct swig_cast_info *next; /* pointer to next cast in linked list */ + struct swig_cast_info *prev; /* pointer to the previous cast */ +} swig_cast_info; + +/* Structure used to store module information + * Each module generates one structure like this, and the runtime collects + * all of these structures and stores them in a circularly linked list.*/ +typedef struct swig_module_info { + swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */ + size_t size; /* Number of types in this module */ + struct swig_module_info *next; /* Pointer to next element in circularly linked list */ + swig_type_info **type_initial; /* Array of initially generated type structures */ + swig_cast_info **cast_initial; /* Array of initially generated casting structures */ + void *clientdata; /* Language specific module data */ +} swig_module_info; + +/* + Compare two type names skipping the space characters, therefore + "char*" == "char *" and "Class" == "Class", etc. + + Return 0 when the two name types are equivalent, as in + strncmp, but skipping ' '. +*/ +SWIGRUNTIME int +SWIG_TypeNameComp(const char *f1, const char *l1, + const char *f2, const char *l2) { + for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) { + while ((*f1 == ' ') && (f1 != l1)) ++f1; + while ((*f2 == ' ') && (f2 != l2)) ++f2; + if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1; + } + return (int)((l1 - f1) - (l2 - f2)); +} + +/* + Check type equivalence in a name list like ||... + Return 0 if not equal, 1 if equal +*/ +SWIGRUNTIME int +SWIG_TypeEquiv(const char *nb, const char *tb) { + int equiv = 0; + const char* te = tb + strlen(tb); + const char* ne = nb; + while (!equiv && *ne) { + for (nb = ne; *ne; ++ne) { + if (*ne == '|') break; + } + equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; + if (*ne) ++ne; + } + return equiv; +} + +/* + Check type equivalence in a name list like ||... + Return 0 if equal, -1 if nb < tb, 1 if nb > tb +*/ +SWIGRUNTIME int +SWIG_TypeCompare(const char *nb, const char *tb) { + int equiv = 0; + const char* te = tb + strlen(tb); + const char* ne = nb; + while (!equiv && *ne) { + for (nb = ne; *ne; ++ne) { + if (*ne == '|') break; + } + equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; + if (*ne) ++ne; + } + return equiv; +} + + +/* + Check the typename +*/ +SWIGRUNTIME swig_cast_info * +SWIG_TypeCheck(const char *c, swig_type_info *ty) { + if (ty) { + swig_cast_info *iter = ty->cast; + while (iter) { + if (strcmp(iter->type->name, c) == 0) { + if (iter == ty->cast) + return iter; + /* Move iter to the top of the linked list */ + iter->prev->next = iter->next; + if (iter->next) + iter->next->prev = iter->prev; + iter->next = ty->cast; + iter->prev = 0; + if (ty->cast) ty->cast->prev = iter; + ty->cast = iter; + return iter; + } + iter = iter->next; + } + } + return 0; +} + +/* + Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison +*/ +SWIGRUNTIME swig_cast_info * +SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) { + if (ty) { + swig_cast_info *iter = ty->cast; + while (iter) { + if (iter->type == from) { + if (iter == ty->cast) + return iter; + /* Move iter to the top of the linked list */ + iter->prev->next = iter->next; + if (iter->next) + iter->next->prev = iter->prev; + iter->next = ty->cast; + iter->prev = 0; + if (ty->cast) ty->cast->prev = iter; + ty->cast = iter; + return iter; + } + iter = iter->next; + } + } + return 0; +} + +/* + Cast a pointer up an inheritance hierarchy +*/ +SWIGRUNTIMEINLINE void * +SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) { + return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory); +} + +/* + Dynamic pointer casting. Down an inheritance hierarchy +*/ +SWIGRUNTIME swig_type_info * +SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) { + swig_type_info *lastty = ty; + if (!ty || !ty->dcast) return ty; + while (ty && (ty->dcast)) { + ty = (*ty->dcast)(ptr); + if (ty) lastty = ty; + } + return lastty; +} + +/* + Return the name associated with this type +*/ +SWIGRUNTIMEINLINE const char * +SWIG_TypeName(const swig_type_info *ty) { + return ty->name; +} + +/* + Return the pretty name associated with this type, + that is an unmangled type name in a form presentable to the user. +*/ +SWIGRUNTIME const char * +SWIG_TypePrettyName(const swig_type_info *type) { + /* The "str" field contains the equivalent pretty names of the + type, separated by vertical-bar characters. We choose + to print the last name, as it is often (?) the most + specific. */ + if (!type) return NULL; + if (type->str != NULL) { + const char *last_name = type->str; + const char *s; + for (s = type->str; *s; s++) + if (*s == '|') last_name = s+1; + return last_name; + } + else + return type->name; +} + +/* + Set the clientdata field for a type +*/ +SWIGRUNTIME void +SWIG_TypeClientData(swig_type_info *ti, void *clientdata) { + swig_cast_info *cast = ti->cast; + /* if (ti->clientdata == clientdata) return; */ + ti->clientdata = clientdata; + + while (cast) { + if (!cast->converter) { + swig_type_info *tc = cast->type; + if (!tc->clientdata) { + SWIG_TypeClientData(tc, clientdata); + } + } + cast = cast->next; + } +} +SWIGRUNTIME void +SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) { + SWIG_TypeClientData(ti, clientdata); + ti->owndata = 1; +} + +/* + Search for a swig_type_info structure only by mangled name + Search is a O(log #types) + + We start searching at module start, and finish searching when start == end. + Note: if start == end at the beginning of the function, we go all the way around + the circular list. +*/ +SWIGRUNTIME swig_type_info * +SWIG_MangledTypeQueryModule(swig_module_info *start, + swig_module_info *end, + const char *name) { + swig_module_info *iter = start; + do { + if (iter->size) { + register size_t l = 0; + register size_t r = iter->size - 1; + do { + /* since l+r >= 0, we can (>> 1) instead (/ 2) */ + register size_t i = (l + r) >> 1; + const char *iname = iter->types[i]->name; + if (iname) { + register int compare = strcmp(name, iname); + if (compare == 0) { + return iter->types[i]; + } else if (compare < 0) { + if (i) { + r = i - 1; + } else { + break; + } + } else if (compare > 0) { + l = i + 1; + } + } else { + break; /* should never happen */ + } + } while (l <= r); + } + iter = iter->next; + } while (iter != end); + return 0; +} + +/* + Search for a swig_type_info structure for either a mangled name or a human readable name. + It first searches the mangled names of the types, which is a O(log #types) + If a type is not found it then searches the human readable names, which is O(#types). + + We start searching at module start, and finish searching when start == end. + Note: if start == end at the beginning of the function, we go all the way around + the circular list. +*/ +SWIGRUNTIME swig_type_info * +SWIG_TypeQueryModule(swig_module_info *start, + swig_module_info *end, + const char *name) { + /* STEP 1: Search the name field using binary search */ + swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name); + if (ret) { + return ret; + } else { + /* STEP 2: If the type hasn't been found, do a complete search + of the str field (the human readable name) */ + swig_module_info *iter = start; + do { + register size_t i = 0; + for (; i < iter->size; ++i) { + if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name))) + return iter->types[i]; + } + iter = iter->next; + } while (iter != end); + } + + /* neither found a match */ + return 0; +} + +/* + Pack binary data into a string +*/ +SWIGRUNTIME char * +SWIG_PackData(char *c, void *ptr, size_t sz) { + static const char hex[17] = "0123456789abcdef"; + register const unsigned char *u = (unsigned char *) ptr; + register const unsigned char *eu = u + sz; + for (; u != eu; ++u) { + register unsigned char uu = *u; + *(c++) = hex[(uu & 0xf0) >> 4]; + *(c++) = hex[uu & 0xf]; + } + return c; +} + +/* + Unpack binary data from a string +*/ +SWIGRUNTIME const char * +SWIG_UnpackData(const char *c, void *ptr, size_t sz) { + register unsigned char *u = (unsigned char *) ptr; + register const unsigned char *eu = u + sz; + for (; u != eu; ++u) { + register char d = *(c++); + register unsigned char uu; + if ((d >= '0') && (d <= '9')) + uu = ((d - '0') << 4); + else if ((d >= 'a') && (d <= 'f')) + uu = ((d - ('a'-10)) << 4); + else + return (char *) 0; + d = *(c++); + if ((d >= '0') && (d <= '9')) + uu |= (d - '0'); + else if ((d >= 'a') && (d <= 'f')) + uu |= (d - ('a'-10)); + else + return (char *) 0; + *u = uu; + } + return c; +} + +/* + Pack 'void *' into a string buffer. +*/ +SWIGRUNTIME char * +SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) { + char *r = buff; + if ((2*sizeof(void *) + 2) > bsz) return 0; + *(r++) = '_'; + r = SWIG_PackData(r,&ptr,sizeof(void *)); + if (strlen(name) + 1 > (bsz - (r - buff))) return 0; + strcpy(r,name); + return buff; +} + +SWIGRUNTIME const char * +SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) { + if (*c != '_') { + if (strcmp(c,"NULL") == 0) { + *ptr = (void *) 0; + return name; + } else { + return 0; + } + } + return SWIG_UnpackData(++c,ptr,sizeof(void *)); +} + +SWIGRUNTIME char * +SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) { + char *r = buff; + size_t lname = (name ? strlen(name) : 0); + if ((2*sz + 2 + lname) > bsz) return 0; + *(r++) = '_'; + r = SWIG_PackData(r,ptr,sz); + if (lname) { + strncpy(r,name,lname+1); + } else { + *r = 0; + } + return buff; +} + +SWIGRUNTIME const char * +SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { + if (*c != '_') { + if (strcmp(c,"NULL") == 0) { + memset(ptr,0,sz); + return name; + } else { + return 0; + } + } + return SWIG_UnpackData(++c,ptr,sz); +} + +#ifdef __cplusplus +} +#endif + +/* Errors in SWIG */ +#define SWIG_UnknownError -1 +#define SWIG_IOError -2 +#define SWIG_RuntimeError -3 +#define SWIG_IndexError -4 +#define SWIG_TypeError -5 +#define SWIG_DivisionByZero -6 +#define SWIG_OverflowError -7 +#define SWIG_SyntaxError -8 +#define SWIG_ValueError -9 +#define SWIG_SystemError -10 +#define SWIG_AttributeError -11 +#define SWIG_MemoryError -12 +#define SWIG_NullReferenceError -13 + + + +/* Compatibility marcos for Python 3 */ +#if PY_VERSION_HEX >= 0x03000000 + +#define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type) +#define PyInt_Check(x) PyLong_Check(x) +#define PyInt_AsLong(x) PyLong_AsLong(x) +#define PyInt_FromLong(x) PyLong_FromLong(x) +#define PyString_Format(fmt, args) PyUnicode_Format(fmt, args) + +#endif + +#ifndef Py_TYPE +# define Py_TYPE(op) ((op)->ob_type) +#endif + +/* SWIG APIs for compatibility of both Python 2 & 3 */ + +#if PY_VERSION_HEX >= 0x03000000 +# define SWIG_Python_str_FromFormat PyUnicode_FromFormat +#else +# define SWIG_Python_str_FromFormat PyString_FromFormat +#endif + +SWIGINTERN char* +SWIG_Python_str_AsChar(PyObject *str) +{ +#if PY_VERSION_HEX >= 0x03000000 + str = PyUnicode_AsUTF8String(str); + return PyBytes_AsString(str); +#else + return PyString_AsString(str); +#endif +} + +SWIGINTERN PyObject* +SWIG_Python_str_FromChar(const char *c) +{ +#if PY_VERSION_HEX >= 0x03000000 + return PyUnicode_FromString(c); +#else + return PyString_FromString(c); +#endif +} + +/* Add PyOS_snprintf for old Pythons */ +#if PY_VERSION_HEX < 0x02020000 +# if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM) +# define PyOS_snprintf _snprintf +# else +# define PyOS_snprintf snprintf +# endif +#endif + +/* A crude PyString_FromFormat implementation for old Pythons */ +#if PY_VERSION_HEX < 0x02020000 + +#ifndef SWIG_PYBUFFER_SIZE +# define SWIG_PYBUFFER_SIZE 1024 +#endif + +static PyObject * +PyString_FromFormat(const char *fmt, ...) { + va_list ap; + char buf[SWIG_PYBUFFER_SIZE * 2]; + int res; + va_start(ap, fmt); + res = vsnprintf(buf, sizeof(buf), fmt, ap); + va_end(ap); + return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf); +} +#endif + +/* Add PyObject_Del for old Pythons */ +#if PY_VERSION_HEX < 0x01060000 +# define PyObject_Del(op) PyMem_DEL((op)) +#endif +#ifndef PyObject_DEL +# define PyObject_DEL PyObject_Del +#endif + +/* A crude PyExc_StopIteration exception for old Pythons */ +#if PY_VERSION_HEX < 0x02020000 +# ifndef PyExc_StopIteration +# define PyExc_StopIteration PyExc_RuntimeError +# endif +# ifndef PyObject_GenericGetAttr +# define PyObject_GenericGetAttr 0 +# endif +#endif + +/* Py_NotImplemented is defined in 2.1 and up. */ +#if PY_VERSION_HEX < 0x02010000 +# ifndef Py_NotImplemented +# define Py_NotImplemented PyExc_RuntimeError +# endif +#endif + +/* A crude PyString_AsStringAndSize implementation for old Pythons */ +#if PY_VERSION_HEX < 0x02010000 +# ifndef PyString_AsStringAndSize +# define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;} +# endif +#endif + +/* PySequence_Size for old Pythons */ +#if PY_VERSION_HEX < 0x02000000 +# ifndef PySequence_Size +# define PySequence_Size PySequence_Length +# endif +#endif + +/* PyBool_FromLong for old Pythons */ +#if PY_VERSION_HEX < 0x02030000 +static +PyObject *PyBool_FromLong(long ok) +{ + PyObject *result = ok ? Py_True : Py_False; + Py_INCREF(result); + return result; +} +#endif + +/* Py_ssize_t for old Pythons */ +/* This code is as recommended by: */ +/* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */ +#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN) +typedef int Py_ssize_t; +# define PY_SSIZE_T_MAX INT_MAX +# define PY_SSIZE_T_MIN INT_MIN +#endif + +/* ----------------------------------------------------------------------------- + * error manipulation + * ----------------------------------------------------------------------------- */ + +SWIGRUNTIME PyObject* +SWIG_Python_ErrorType(int code) { + PyObject* type = 0; + switch(code) { + case SWIG_MemoryError: + type = PyExc_MemoryError; + break; + case SWIG_IOError: + type = PyExc_IOError; + break; + case SWIG_RuntimeError: + type = PyExc_RuntimeError; + break; + case SWIG_IndexError: + type = PyExc_IndexError; + break; + case SWIG_TypeError: + type = PyExc_TypeError; + break; + case SWIG_DivisionByZero: + type = PyExc_ZeroDivisionError; + break; + case SWIG_OverflowError: + type = PyExc_OverflowError; + break; + case SWIG_SyntaxError: + type = PyExc_SyntaxError; + break; + case SWIG_ValueError: + type = PyExc_ValueError; + break; + case SWIG_SystemError: + type = PyExc_SystemError; + break; + case SWIG_AttributeError: + type = PyExc_AttributeError; + break; + default: + type = PyExc_RuntimeError; + } + return type; +} + + +SWIGRUNTIME void +SWIG_Python_AddErrorMsg(const char* mesg) +{ + PyObject *type = 0; + PyObject *value = 0; + PyObject *traceback = 0; + + if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback); + if (value) { + PyObject *old_str = PyObject_Str(value); + PyErr_Clear(); + Py_XINCREF(type); + + PyErr_Format(type, "%s %s", SWIG_Python_str_AsChar(old_str), mesg); + Py_DECREF(old_str); + Py_DECREF(value); + } else { + PyErr_SetString(PyExc_RuntimeError, mesg); + } +} + +#if defined(SWIG_PYTHON_NO_THREADS) +# if defined(SWIG_PYTHON_THREADS) +# undef SWIG_PYTHON_THREADS +# endif +#endif +#if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */ +# if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL) +# if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */ +# define SWIG_PYTHON_USE_GIL +# endif +# endif +# if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */ +# ifndef SWIG_PYTHON_INITIALIZE_THREADS +# define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads() +# endif +# ifdef __cplusplus /* C++ code */ + class SWIG_Python_Thread_Block { + bool status; + PyGILState_STATE state; + public: + void end() { if (status) { PyGILState_Release(state); status = false;} } + SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {} + ~SWIG_Python_Thread_Block() { end(); } + }; + class SWIG_Python_Thread_Allow { + bool status; + PyThreadState *save; + public: + void end() { if (status) { PyEval_RestoreThread(save); status = false; }} + SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {} + ~SWIG_Python_Thread_Allow() { end(); } + }; +# define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block +# define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end() +# define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow +# define SWIG_PYTHON_THREAD_END_ALLOW _swig_thread_allow.end() +# else /* C code */ +# define SWIG_PYTHON_THREAD_BEGIN_BLOCK PyGILState_STATE _swig_thread_block = PyGILState_Ensure() +# define SWIG_PYTHON_THREAD_END_BLOCK PyGILState_Release(_swig_thread_block) +# define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread() +# define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow) +# endif +# else /* Old thread way, not implemented, user must provide it */ +# if !defined(SWIG_PYTHON_INITIALIZE_THREADS) +# define SWIG_PYTHON_INITIALIZE_THREADS +# endif +# if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK) +# define SWIG_PYTHON_THREAD_BEGIN_BLOCK +# endif +# if !defined(SWIG_PYTHON_THREAD_END_BLOCK) +# define SWIG_PYTHON_THREAD_END_BLOCK +# endif +# if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW) +# define SWIG_PYTHON_THREAD_BEGIN_ALLOW +# endif +# if !defined(SWIG_PYTHON_THREAD_END_ALLOW) +# define SWIG_PYTHON_THREAD_END_ALLOW +# endif +# endif +#else /* No thread support */ +# define SWIG_PYTHON_INITIALIZE_THREADS +# define SWIG_PYTHON_THREAD_BEGIN_BLOCK +# define SWIG_PYTHON_THREAD_END_BLOCK +# define SWIG_PYTHON_THREAD_BEGIN_ALLOW +# define SWIG_PYTHON_THREAD_END_ALLOW +#endif + +/* ----------------------------------------------------------------------------- + * Python API portion that goes into the runtime + * ----------------------------------------------------------------------------- */ + +#ifdef __cplusplus +extern "C" { +#if 0 +} /* cc-mode */ +#endif +#endif + +/* ----------------------------------------------------------------------------- + * Constant declarations + * ----------------------------------------------------------------------------- */ + +/* Constant Types */ +#define SWIG_PY_POINTER 4 +#define SWIG_PY_BINARY 5 + +/* Constant information structure */ +typedef struct swig_const_info { + int type; + char *name; + long lvalue; + double dvalue; + void *pvalue; + swig_type_info **ptype; +} swig_const_info; + + +/* ----------------------------------------------------------------------------- + * Wrapper of PyInstanceMethod_New() used in Python 3 + * It is exported to the generated module, used for -fastproxy + * ----------------------------------------------------------------------------- */ +SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *self, PyObject *func) +{ +#if PY_VERSION_HEX >= 0x03000000 + return PyInstanceMethod_New(func); +#else + return NULL; +#endif +} + +#ifdef __cplusplus +#if 0 +{ /* cc-mode */ +#endif +} +#endif + + +/* ----------------------------------------------------------------------------- + * See the LICENSE file for information on copyright, usage and redistribution + * of SWIG, and the README file for authors - http://www.swig.org/release.html. + * + * pyrun.swg + * + * This file contains the runtime support for Python modules + * and includes code for managing global variables and pointer + * type checking. + * + * ----------------------------------------------------------------------------- */ + +/* Common SWIG API */ + +/* for raw pointers */ +#define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0) +#define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags) +#define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own) +#define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(ptr, type, flags) +#define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty) +#define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src) +#define swig_owntype int + +/* for raw packed data */ +#define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty) +#define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type) + +/* for class or struct pointers */ +#define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags) +#define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags) + +/* for C or C++ function pointers */ +#define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type) +#define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(ptr, type, 0) + +/* for C++ member pointers, ie, member methods */ +#define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty) +#define SWIG_NewMemberObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type) + + +/* Runtime API */ + +#define SWIG_GetModule(clientdata) SWIG_Python_GetModule() +#define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer) +#define SWIG_NewClientData(obj) SwigPyClientData_New(obj) + +#define SWIG_SetErrorObj SWIG_Python_SetErrorObj +#define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg +#define SWIG_ErrorType(code) SWIG_Python_ErrorType(code) +#define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg) +#define SWIG_fail goto fail + + +/* Runtime API implementation */ + +/* Error manipulation */ + +SWIGINTERN void +SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) { + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + PyErr_SetObject(errtype, obj); + Py_DECREF(obj); + SWIG_PYTHON_THREAD_END_BLOCK; +} + +SWIGINTERN void +SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) { + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + PyErr_SetString(errtype, (char *) msg); + SWIG_PYTHON_THREAD_END_BLOCK; +} + +#define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj) + +/* Set a constant value */ + +SWIGINTERN void +SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { + PyDict_SetItemString(d, (char*) name, obj); + Py_DECREF(obj); +} + +/* Append a value to the result obj */ + +SWIGINTERN PyObject* +SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { +#if !defined(SWIG_PYTHON_OUTPUT_TUPLE) + if (!result) { + result = obj; + } else if (result == Py_None) { + Py_DECREF(result); + result = obj; + } else { + if (!PyList_Check(result)) { + PyObject *o2 = result; + result = PyList_New(1); + PyList_SetItem(result, 0, o2); + } + PyList_Append(result,obj); + Py_DECREF(obj); + } + return result; +#else + PyObject* o2; + PyObject* o3; + if (!result) { + result = obj; + } else if (result == Py_None) { + Py_DECREF(result); + result = obj; + } else { + if (!PyTuple_Check(result)) { + o2 = result; + result = PyTuple_New(1); + PyTuple_SET_ITEM(result, 0, o2); + } + o3 = PyTuple_New(1); + PyTuple_SET_ITEM(o3, 0, obj); + o2 = result; + result = PySequence_Concat(o2, o3); + Py_DECREF(o2); + Py_DECREF(o3); + } + return result; +#endif +} + +/* Unpack the argument tuple */ + +SWIGINTERN int +SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs) +{ + if (!args) { + if (!min && !max) { + return 1; + } else { + PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none", + name, (min == max ? "" : "at least "), (int)min); + return 0; + } + } + if (!PyTuple_Check(args)) { + PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple"); + return 0; + } else { + register Py_ssize_t l = PyTuple_GET_SIZE(args); + if (l < min) { + PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", + name, (min == max ? "" : "at least "), (int)min, (int)l); + return 0; + } else if (l > max) { + PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", + name, (min == max ? "" : "at most "), (int)max, (int)l); + return 0; + } else { + register int i; + for (i = 0; i < l; ++i) { + objs[i] = PyTuple_GET_ITEM(args, i); + } + for (; l < max; ++l) { + objs[l] = 0; + } + return i + 1; + } + } +} + +/* A functor is a function object with one single object argument */ +#if PY_VERSION_HEX >= 0x02020000 +#define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL); +#else +#define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunction(functor, "O", obj); +#endif + +/* + Helper for static pointer initialization for both C and C++ code, for example + static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...); +*/ +#ifdef __cplusplus +#define SWIG_STATIC_POINTER(var) var +#else +#define SWIG_STATIC_POINTER(var) var = 0; if (!var) var +#endif + +/* ----------------------------------------------------------------------------- + * Pointer declarations + * ----------------------------------------------------------------------------- */ + +/* Flags for new pointer objects */ +#define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1) +#define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN) + +#define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1) + +#ifdef __cplusplus +extern "C" { +#if 0 +} /* cc-mode */ +#endif +#endif + +/* How to access Py_None */ +#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# ifndef SWIG_PYTHON_NO_BUILD_NONE +# ifndef SWIG_PYTHON_BUILD_NONE +# define SWIG_PYTHON_BUILD_NONE +# endif +# endif +#endif + +#ifdef SWIG_PYTHON_BUILD_NONE +# ifdef Py_None +# undef Py_None +# define Py_None SWIG_Py_None() +# endif +SWIGRUNTIMEINLINE PyObject * +_SWIG_Py_None(void) +{ + PyObject *none = Py_BuildValue((char*)""); + Py_DECREF(none); + return none; +} +SWIGRUNTIME PyObject * +SWIG_Py_None(void) +{ + static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None(); + return none; +} +#endif + +/* The python void return value */ + +SWIGRUNTIMEINLINE PyObject * +SWIG_Py_Void(void) +{ + PyObject *none = Py_None; + Py_INCREF(none); + return none; +} + +/* SwigPyClientData */ + +typedef struct { + PyObject *klass; + PyObject *newraw; + PyObject *newargs; + PyObject *destroy; + int delargs; + int implicitconv; +} SwigPyClientData; + +SWIGRUNTIMEINLINE int +SWIG_Python_CheckImplicit(swig_type_info *ty) +{ + SwigPyClientData *data = (SwigPyClientData *)ty->clientdata; + return data ? data->implicitconv : 0; +} + +SWIGRUNTIMEINLINE PyObject * +SWIG_Python_ExceptionType(swig_type_info *desc) { + SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0; + PyObject *klass = data ? data->klass : 0; + return (klass ? klass : PyExc_RuntimeError); +} + + +SWIGRUNTIME SwigPyClientData * +SwigPyClientData_New(PyObject* obj) +{ + if (!obj) { + return 0; + } else { + SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData)); + /* the klass element */ + data->klass = obj; + Py_INCREF(data->klass); + /* the newraw method and newargs arguments used to create a new raw instance */ + if (PyClass_Check(obj)) { + data->newraw = 0; + data->newargs = obj; + Py_INCREF(obj); + } else { +#if (PY_VERSION_HEX < 0x02020000) + data->newraw = 0; +#else + data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__"); +#endif + if (data->newraw) { + Py_INCREF(data->newraw); + data->newargs = PyTuple_New(1); + PyTuple_SetItem(data->newargs, 0, obj); + } else { + data->newargs = obj; + } + Py_INCREF(data->newargs); + } + /* the destroy method, aka as the C++ delete method */ + data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__"); + if (PyErr_Occurred()) { + PyErr_Clear(); + data->destroy = 0; + } + if (data->destroy) { + int flags; + Py_INCREF(data->destroy); + flags = PyCFunction_GET_FLAGS(data->destroy); +#ifdef METH_O + data->delargs = !(flags & (METH_O)); +#else + data->delargs = 0; +#endif + } else { + data->delargs = 0; + } + data->implicitconv = 0; + return data; + } +} + +SWIGRUNTIME void +SwigPyClientData_Del(SwigPyClientData* data) +{ + Py_XDECREF(data->newraw); + Py_XDECREF(data->newargs); + Py_XDECREF(data->destroy); +} + +/* =============== SwigPyObject =====================*/ + +typedef struct { + PyObject_HEAD + void *ptr; + swig_type_info *ty; + int own; + PyObject *next; +} SwigPyObject; + +SWIGRUNTIME PyObject * +SwigPyObject_long(SwigPyObject *v) +{ + return PyLong_FromVoidPtr(v->ptr); +} + +SWIGRUNTIME PyObject * +SwigPyObject_format(const char* fmt, SwigPyObject *v) +{ + PyObject *res = NULL; + PyObject *args = PyTuple_New(1); + if (args) { + if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) { + PyObject *ofmt = SWIG_Python_str_FromChar(fmt); + if (ofmt) { +#if PY_VERSION_HEX >= 0x03000000 + res = PyUnicode_Format(ofmt,args); +#else + res = PyString_Format(ofmt,args); +#endif + Py_DECREF(ofmt); + } + Py_DECREF(args); + } + } + return res; +} + +SWIGRUNTIME PyObject * +SwigPyObject_oct(SwigPyObject *v) +{ + return SwigPyObject_format("%o",v); +} + +SWIGRUNTIME PyObject * +SwigPyObject_hex(SwigPyObject *v) +{ + return SwigPyObject_format("%x",v); +} + +SWIGRUNTIME PyObject * +#ifdef METH_NOARGS +SwigPyObject_repr(SwigPyObject *v) +#else +SwigPyObject_repr(SwigPyObject *v, PyObject *args) +#endif +{ + const char *name = SWIG_TypePrettyName(v->ty); + PyObject *hex = SwigPyObject_hex(v); + PyObject *repr = SWIG_Python_str_FromFormat("", name, hex); + Py_DECREF(hex); + if (v->next) { +#ifdef METH_NOARGS + PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next); +#else + PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args); +#endif +#if PY_VERSION_HEX >= 0x03000000 + PyObject *joined = PyUnicode_Concat(repr, nrep); + Py_DecRef(repr); + Py_DecRef(nrep); + repr = joined; +#else + PyString_ConcatAndDel(&repr,nrep); +#endif + } + return repr; +} + +SWIGRUNTIME int +SwigPyObject_print(SwigPyObject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) +{ +#ifdef METH_NOARGS + PyObject *repr = SwigPyObject_repr(v); +#else + PyObject *repr = SwigPyObject_repr(v, NULL); +#endif + if (repr) { + fputs(SWIG_Python_str_AsChar(repr), fp); + Py_DECREF(repr); + return 0; + } else { + return 1; + } +} + +SWIGRUNTIME PyObject * +SwigPyObject_str(SwigPyObject *v) +{ + char result[SWIG_BUFFER_SIZE]; + return SWIG_PackVoidPtr(result, v->ptr, v->ty->name, sizeof(result)) ? + SWIG_Python_str_FromChar(result) : 0; +} + +SWIGRUNTIME int +SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w) +{ + void *i = v->ptr; + void *j = w->ptr; + return (i < j) ? -1 : ((i > j) ? 1 : 0); +} + +/* Added for Python 3.x, whould it also useful for Python 2.x? */ +SWIGRUNTIME PyObject* +SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op) +{ + PyObject* res; + if( op != Py_EQ && op != Py_NE ) { + Py_INCREF(Py_NotImplemented); + return Py_NotImplemented; + } + if( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ) + res = Py_True; + else + res = Py_False; + Py_INCREF(res); + return res; +} + + +SWIGRUNTIME PyTypeObject* _PySwigObject_type(void); + +SWIGRUNTIME PyTypeObject* +SwigPyObject_type(void) { + static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigObject_type(); + return type; +} + +SWIGRUNTIMEINLINE int +SwigPyObject_Check(PyObject *op) { + return (Py_TYPE(op) == SwigPyObject_type()) + || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0); +} + +SWIGRUNTIME PyObject * +SwigPyObject_New(void *ptr, swig_type_info *ty, int own); + +SWIGRUNTIME void +SwigPyObject_dealloc(PyObject *v) +{ + SwigPyObject *sobj = (SwigPyObject *) v; + PyObject *next = sobj->next; + if (sobj->own == SWIG_POINTER_OWN) { + swig_type_info *ty = sobj->ty; + SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0; + PyObject *destroy = data ? data->destroy : 0; + if (destroy) { + /* destroy is always a VARARGS method */ + PyObject *res; + if (data->delargs) { + /* we need to create a temporal object to carry the destroy operation */ + PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0); + res = SWIG_Python_CallFunctor(destroy, tmp); + Py_DECREF(tmp); + } else { + PyCFunction meth = PyCFunction_GET_FUNCTION(destroy); + PyObject *mself = PyCFunction_GET_SELF(destroy); + res = ((*meth)(mself, v)); + } + Py_XDECREF(res); + } +#if !defined(SWIG_PYTHON_SILENT_MEMLEAK) + else { + const char *name = SWIG_TypePrettyName(ty); + printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown")); + } +#endif + } + Py_XDECREF(next); + PyObject_DEL(v); +} + +SWIGRUNTIME PyObject* +SwigPyObject_append(PyObject* v, PyObject* next) +{ + SwigPyObject *sobj = (SwigPyObject *) v; +#ifndef METH_O + PyObject *tmp = 0; + if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL; + next = tmp; +#endif + if (!SwigPyObject_Check(next)) { + return NULL; + } + sobj->next = next; + Py_INCREF(next); + return SWIG_Py_Void(); +} + +SWIGRUNTIME PyObject* +#ifdef METH_NOARGS +SwigPyObject_next(PyObject* v) +#else +SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) +#endif +{ + SwigPyObject *sobj = (SwigPyObject *) v; + if (sobj->next) { + Py_INCREF(sobj->next); + return sobj->next; + } else { + return SWIG_Py_Void(); + } +} + +SWIGINTERN PyObject* +#ifdef METH_NOARGS +SwigPyObject_disown(PyObject *v) +#else +SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) +#endif +{ + SwigPyObject *sobj = (SwigPyObject *)v; + sobj->own = 0; + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject* +#ifdef METH_NOARGS +SwigPyObject_acquire(PyObject *v) +#else +SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) +#endif +{ + SwigPyObject *sobj = (SwigPyObject *)v; + sobj->own = SWIG_POINTER_OWN; + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject* +SwigPyObject_own(PyObject *v, PyObject *args) +{ + PyObject *val = 0; +#if (PY_VERSION_HEX < 0x02020000) + if (!PyArg_ParseTuple(args,(char *)"|O:own",&val)) +#else + if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val)) +#endif + { + return NULL; + } + else + { + SwigPyObject *sobj = (SwigPyObject *)v; + PyObject *obj = PyBool_FromLong(sobj->own); + if (val) { +#ifdef METH_NOARGS + if (PyObject_IsTrue(val)) { + SwigPyObject_acquire(v); + } else { + SwigPyObject_disown(v); + } +#else + if (PyObject_IsTrue(val)) { + SwigPyObject_acquire(v,args); + } else { + SwigPyObject_disown(v,args); + } +#endif + } + return obj; + } +} + +#ifdef METH_O +static PyMethodDef +swigobject_methods[] = { + {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"}, + {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS, (char *)"aquires ownership of the pointer"}, + {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, + {(char *)"append", (PyCFunction)SwigPyObject_append, METH_O, (char *)"appends another 'this' object"}, + {(char *)"next", (PyCFunction)SwigPyObject_next, METH_NOARGS, (char *)"returns the next 'this' object"}, + {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_NOARGS, (char *)"returns object representation"}, + {0, 0, 0, 0} +}; +#else +static PyMethodDef +swigobject_methods[] = { + {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_VARARGS, (char *)"releases ownership of the pointer"}, + {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_VARARGS, (char *)"aquires ownership of the pointer"}, + {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, + {(char *)"append", (PyCFunction)SwigPyObject_append, METH_VARARGS, (char *)"appends another 'this' object"}, + {(char *)"next", (PyCFunction)SwigPyObject_next, METH_VARARGS, (char *)"returns the next 'this' object"}, + {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_VARARGS, (char *)"returns object representation"}, + {0, 0, 0, 0} +}; +#endif + +#if PY_VERSION_HEX < 0x02020000 +SWIGINTERN PyObject * +SwigPyObject_getattr(SwigPyObject *sobj,char *name) +{ + return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name); +} +#endif + +SWIGRUNTIME PyTypeObject* +_PySwigObject_type(void) { + static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer"; + + static PyNumberMethods SwigPyObject_as_number = { + (binaryfunc)0, /*nb_add*/ + (binaryfunc)0, /*nb_subtract*/ + (binaryfunc)0, /*nb_multiply*/ + /* nb_divide removed in Python 3 */ +#if PY_VERSION_HEX < 0x03000000 + (binaryfunc)0, /*nb_divide*/ +#endif + (binaryfunc)0, /*nb_remainder*/ + (binaryfunc)0, /*nb_divmod*/ + (ternaryfunc)0,/*nb_power*/ + (unaryfunc)0, /*nb_negative*/ + (unaryfunc)0, /*nb_positive*/ + (unaryfunc)0, /*nb_absolute*/ + (inquiry)0, /*nb_nonzero*/ + 0, /*nb_invert*/ + 0, /*nb_lshift*/ + 0, /*nb_rshift*/ + 0, /*nb_and*/ + 0, /*nb_xor*/ + 0, /*nb_or*/ +#if PY_VERSION_HEX < 0x03000000 + 0, /*nb_coerce*/ +#endif + (unaryfunc)SwigPyObject_long, /*nb_int*/ + (unaryfunc)SwigPyObject_long, /*nb_long*/ + (unaryfunc)0, /*nb_float*/ +#if PY_VERSION_HEX < 0x03000000 + (unaryfunc)SwigPyObject_oct, /*nb_oct*/ + (unaryfunc)SwigPyObject_hex, /*nb_hex*/ +#endif +#if PY_VERSION_HEX >= 0x03000000 /* 3.0 */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */ +#elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */ +#elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */ +#elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */ + 0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */ +#endif + }; + + static PyTypeObject swigpyobject_type; + static int type_init = 0; + if (!type_init) { + const PyTypeObject tmp + = { + /* PyOjbect header changed in Python 3 */ +#if PY_VERSION_HEX >= 0x03000000 + PyVarObject_HEAD_INIT(&PyType_Type, 0) +#else + PyObject_HEAD_INIT(NULL) + 0, /* ob_size */ +#endif + (char *)"SwigPyObject", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + (destructor)SwigPyObject_dealloc, /* tp_dealloc */ + (printfunc)SwigPyObject_print, /* tp_print */ +#if PY_VERSION_HEX < 0x02020000 + (getattrfunc)SwigPyObject_getattr, /* tp_getattr */ +#else + (getattrfunc)0, /* tp_getattr */ +#endif + (setattrfunc)0, /* tp_setattr */ + (cmpfunc)SwigPyObject_compare, /* tp_compare */ + (reprfunc)SwigPyObject_repr, /* tp_repr */ + &SwigPyObject_as_number, /* tp_as_number */ + 0, /* tp_as_sequence */ + 0, /* tp_as_mapping */ + (hashfunc)0, /* tp_hash */ + (ternaryfunc)0, /* tp_call */ + (reprfunc)SwigPyObject_str, /* tp_str */ + PyObject_GenericGetAttr, /* tp_getattro */ + 0, /* tp_setattro */ + 0, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT, /* tp_flags */ + swigobject_doc, /* tp_doc */ + 0, /* tp_traverse */ + 0, /* tp_clear */ + (richcmpfunc)SwigPyObject_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ +#if PY_VERSION_HEX >= 0x02020000 + 0, /* tp_iter */ + 0, /* tp_iternext */ + swigobject_methods, /* tp_methods */ + 0, /* tp_members */ + 0, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + 0, /* tp_descr_get */ + 0, /* tp_descr_set */ + 0, /* tp_dictoffset */ + 0, /* tp_init */ + 0, /* tp_alloc */ + 0, /* tp_new */ + 0, /* tp_free */ + 0, /* tp_is_gc */ + 0, /* tp_bases */ + 0, /* tp_mro */ + 0, /* tp_cache */ + 0, /* tp_subclasses */ + 0, /* tp_weaklist */ +#endif +#if PY_VERSION_HEX >= 0x02030000 + 0, /* tp_del */ +#endif +#ifdef COUNT_ALLOCS + 0,0,0,0 /* tp_alloc -> tp_next */ +#endif + }; + swigpyobject_type = tmp; + /* for Python 3 we already assigned the ob_type in PyVarObject_HEAD_INIT() */ +#if PY_VERSION_HEX < 0x03000000 + swigpyobject_type.ob_type = &PyType_Type; +#endif + type_init = 1; + } + return &swigpyobject_type; +} + +SWIGRUNTIME PyObject * +SwigPyObject_New(void *ptr, swig_type_info *ty, int own) +{ + SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type()); + if (sobj) { + sobj->ptr = ptr; + sobj->ty = ty; + sobj->own = own; + sobj->next = 0; + } + return (PyObject *)sobj; +} + +/* ----------------------------------------------------------------------------- + * Implements a simple Swig Packed type, and use it instead of string + * ----------------------------------------------------------------------------- */ + +typedef struct { + PyObject_HEAD + void *pack; + swig_type_info *ty; + size_t size; +} SwigPyPacked; + +SWIGRUNTIME int +SwigPyPacked_print(SwigPyPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags)) +{ + char result[SWIG_BUFFER_SIZE]; + fputs("pack, v->size, 0, sizeof(result))) { + fputs("at ", fp); + fputs(result, fp); + } + fputs(v->ty->name,fp); + fputs(">", fp); + return 0; +} + +SWIGRUNTIME PyObject * +SwigPyPacked_repr(SwigPyPacked *v) +{ + char result[SWIG_BUFFER_SIZE]; + if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) { + return SWIG_Python_str_FromFormat("", result, v->ty->name); + } else { + return SWIG_Python_str_FromFormat("", v->ty->name); + } +} + +SWIGRUNTIME PyObject * +SwigPyPacked_str(SwigPyPacked *v) +{ + char result[SWIG_BUFFER_SIZE]; + if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){ + return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name); + } else { + return SWIG_Python_str_FromChar(v->ty->name); + } +} + +SWIGRUNTIME int +SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w) +{ + size_t i = v->size; + size_t j = w->size; + int s = (i < j) ? -1 : ((i > j) ? 1 : 0); + return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size); +} + +SWIGRUNTIME PyTypeObject* _PySwigPacked_type(void); + +SWIGRUNTIME PyTypeObject* +SwigPyPacked_type(void) { + static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigPacked_type(); + return type; +} + +SWIGRUNTIMEINLINE int +SwigPyPacked_Check(PyObject *op) { + return ((op)->ob_type == _PySwigPacked_type()) + || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0); +} + +SWIGRUNTIME void +SwigPyPacked_dealloc(PyObject *v) +{ + if (SwigPyPacked_Check(v)) { + SwigPyPacked *sobj = (SwigPyPacked *) v; + free(sobj->pack); + } + PyObject_DEL(v); +} + +SWIGRUNTIME PyTypeObject* +_PySwigPacked_type(void) { + static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer"; + static PyTypeObject swigpypacked_type; + static int type_init = 0; + if (!type_init) { + const PyTypeObject tmp + = { + /* PyObject header changed in Python 3 */ +#if PY_VERSION_HEX>=0x03000000 + PyVarObject_HEAD_INIT(&PyType_Type, 0) +#else + PyObject_HEAD_INIT(NULL) + 0, /* ob_size */ +#endif + (char *)"SwigPyPacked", /* tp_name */ + sizeof(SwigPyPacked), /* tp_basicsize */ + 0, /* tp_itemsize */ + (destructor)SwigPyPacked_dealloc, /* tp_dealloc */ + (printfunc)SwigPyPacked_print, /* tp_print */ + (getattrfunc)0, /* tp_getattr */ + (setattrfunc)0, /* tp_setattr */ + (cmpfunc)SwigPyPacked_compare, /* tp_compare */ + (reprfunc)SwigPyPacked_repr, /* tp_repr */ + 0, /* tp_as_number */ + 0, /* tp_as_sequence */ + 0, /* tp_as_mapping */ + (hashfunc)0, /* tp_hash */ + (ternaryfunc)0, /* tp_call */ + (reprfunc)SwigPyPacked_str, /* tp_str */ + PyObject_GenericGetAttr, /* tp_getattro */ + 0, /* tp_setattro */ + 0, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT, /* tp_flags */ + swigpacked_doc, /* tp_doc */ + 0, /* tp_traverse */ + 0, /* tp_clear */ + 0, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ +#if PY_VERSION_HEX >= 0x02020000 + 0, /* tp_iter */ + 0, /* tp_iternext */ + 0, /* tp_methods */ + 0, /* tp_members */ + 0, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + 0, /* tp_descr_get */ + 0, /* tp_descr_set */ + 0, /* tp_dictoffset */ + 0, /* tp_init */ + 0, /* tp_alloc */ + 0, /* tp_new */ + 0, /* tp_free */ + 0, /* tp_is_gc */ + 0, /* tp_bases */ + 0, /* tp_mro */ + 0, /* tp_cache */ + 0, /* tp_subclasses */ + 0, /* tp_weaklist */ +#endif +#if PY_VERSION_HEX >= 0x02030000 + 0, /* tp_del */ +#endif +#ifdef COUNT_ALLOCS + 0,0,0,0 /* tp_alloc -> tp_next */ +#endif + }; + swigpypacked_type = tmp; + /* for Python 3 the ob_type already assigned in PyVarObject_HEAD_INIT() */ +#if PY_VERSION_HEX < 0x03000000 + swigpypacked_type.ob_type = &PyType_Type; +#endif + type_init = 1; + } + return &swigpypacked_type; +} + +SWIGRUNTIME PyObject * +SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty) +{ + SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type()); + if (sobj) { + void *pack = malloc(size); + if (pack) { + memcpy(pack, ptr, size); + sobj->pack = pack; + sobj->ty = ty; + sobj->size = size; + } else { + PyObject_DEL((PyObject *) sobj); + sobj = 0; + } + } + return (PyObject *) sobj; +} + +SWIGRUNTIME swig_type_info * +SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size) +{ + if (SwigPyPacked_Check(obj)) { + SwigPyPacked *sobj = (SwigPyPacked *)obj; + if (sobj->size != size) return 0; + memcpy(ptr, sobj->pack, size); + return sobj->ty; + } else { + return 0; + } +} + +/* ----------------------------------------------------------------------------- + * pointers/data manipulation + * ----------------------------------------------------------------------------- */ + +SWIGRUNTIMEINLINE PyObject * +_SWIG_This(void) +{ + return SWIG_Python_str_FromChar("this"); +} + +SWIGRUNTIME PyObject * +SWIG_This(void) +{ + static PyObject *SWIG_STATIC_POINTER(swig_this) = _SWIG_This(); + return swig_this; +} + +/* #define SWIG_PYTHON_SLOW_GETSET_THIS */ + +/* TODO: I don't know how to implement the fast getset in Python 3 right now */ +#if PY_VERSION_HEX>=0x03000000 +#define SWIG_PYTHON_SLOW_GETSET_THIS +#endif + +SWIGRUNTIME SwigPyObject * +SWIG_Python_GetSwigThis(PyObject *pyobj) +{ + if (SwigPyObject_Check(pyobj)) { + return (SwigPyObject *) pyobj; + } else { + PyObject *obj = 0; +#if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000)) + if (PyInstance_Check(pyobj)) { + obj = _PyInstance_Lookup(pyobj, SWIG_This()); + } else { + PyObject **dictptr = _PyObject_GetDictPtr(pyobj); + if (dictptr != NULL) { + PyObject *dict = *dictptr; + obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0; + } else { +#ifdef PyWeakref_CheckProxy + if (PyWeakref_CheckProxy(pyobj)) { + PyObject *wobj = PyWeakref_GET_OBJECT(pyobj); + return wobj ? SWIG_Python_GetSwigThis(wobj) : 0; + } +#endif + obj = PyObject_GetAttr(pyobj,SWIG_This()); + if (obj) { + Py_DECREF(obj); + } else { + if (PyErr_Occurred()) PyErr_Clear(); + return 0; + } + } + } +#else + obj = PyObject_GetAttr(pyobj,SWIG_This()); + if (obj) { + Py_DECREF(obj); + } else { + if (PyErr_Occurred()) PyErr_Clear(); + return 0; + } +#endif + if (obj && !SwigPyObject_Check(obj)) { + /* a PyObject is called 'this', try to get the 'real this' + SwigPyObject from it */ + return SWIG_Python_GetSwigThis(obj); + } + return (SwigPyObject *)obj; + } +} + +/* Acquire a pointer value */ + +SWIGRUNTIME int +SWIG_Python_AcquirePtr(PyObject *obj, int own) { + if (own == SWIG_POINTER_OWN) { + SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj); + if (sobj) { + int oldown = sobj->own; + sobj->own = own; + return oldown; + } + } + return 0; +} + +/* Convert a pointer value */ + +SWIGRUNTIME int +SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) { + if (!obj) return SWIG_ERROR; + if (obj == Py_None) { + if (ptr) *ptr = 0; + return SWIG_OK; + } else { + SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj); + if (own) + *own = 0; + while (sobj) { + void *vptr = sobj->ptr; + if (ty) { + swig_type_info *to = sobj->ty; + if (to == ty) { + /* no type cast needed */ + if (ptr) *ptr = vptr; + break; + } else { + swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); + if (!tc) { + sobj = (SwigPyObject *)sobj->next; + } else { + if (ptr) { + int newmemory = 0; + *ptr = SWIG_TypeCast(tc,vptr,&newmemory); + if (newmemory == SWIG_CAST_NEW_MEMORY) { + assert(own); + if (own) + *own = *own | SWIG_CAST_NEW_MEMORY; + } + } + break; + } + } + } else { + if (ptr) *ptr = vptr; + break; + } + } + if (sobj) { + if (own) + *own = *own | sobj->own; + if (flags & SWIG_POINTER_DISOWN) { + sobj->own = 0; + } + return SWIG_OK; + } else { + int res = SWIG_ERROR; + if (flags & SWIG_POINTER_IMPLICIT_CONV) { + SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0; + if (data && !data->implicitconv) { + PyObject *klass = data->klass; + if (klass) { + PyObject *impconv; + data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/ + impconv = SWIG_Python_CallFunctor(klass, obj); + data->implicitconv = 0; + if (PyErr_Occurred()) { + PyErr_Clear(); + impconv = 0; + } + if (impconv) { + SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv); + if (iobj) { + void *vptr; + res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0); + if (SWIG_IsOK(res)) { + if (ptr) { + *ptr = vptr; + /* transfer the ownership to 'ptr' */ + iobj->own = 0; + res = SWIG_AddCast(res); + res = SWIG_AddNewMask(res); + } else { + res = SWIG_AddCast(res); + } + } + } + Py_DECREF(impconv); + } + } + } + } + return res; + } + } +} + +/* Convert a function ptr value */ + +SWIGRUNTIME int +SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { + if (!PyCFunction_Check(obj)) { + return SWIG_ConvertPtr(obj, ptr, ty, 0); + } else { + void *vptr = 0; + + /* here we get the method pointer for callbacks */ + const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc); + const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0; + if (desc) { + desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; + if (!desc) return SWIG_ERROR; + } + if (ty) { + swig_cast_info *tc = SWIG_TypeCheck(desc,ty); + if (tc) { + int newmemory = 0; + *ptr = SWIG_TypeCast(tc,vptr,&newmemory); + assert(!newmemory); /* newmemory handling not yet implemented */ + } else { + return SWIG_ERROR; + } + } else { + *ptr = vptr; + } + return SWIG_OK; + } +} + +/* Convert a packed value value */ + +SWIGRUNTIME int +SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) { + swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz); + if (!to) return SWIG_ERROR; + if (ty) { + if (to != ty) { + /* check type cast? */ + swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); + if (!tc) return SWIG_ERROR; + } + } + return SWIG_OK; +} + +/* ----------------------------------------------------------------------------- + * Create a new pointer object + * ----------------------------------------------------------------------------- */ + +/* + Create a new instance object, whitout calling __init__, and set the + 'this' attribute. +*/ + +SWIGRUNTIME PyObject* +SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) +{ +#if (PY_VERSION_HEX >= 0x02020000) + PyObject *inst = 0; + PyObject *newraw = data->newraw; + if (newraw) { + inst = PyObject_Call(newraw, data->newargs, NULL); + if (inst) { +#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS) + PyObject **dictptr = _PyObject_GetDictPtr(inst); + if (dictptr != NULL) { + PyObject *dict = *dictptr; + if (dict == NULL) { + dict = PyDict_New(); + *dictptr = dict; + PyDict_SetItem(dict, SWIG_This(), swig_this); + } + } +#else + PyObject *key = SWIG_This(); + PyObject_SetAttr(inst, key, swig_this); +#endif + } + } else { +#if PY_VERSION_HEX >= 0x03000000 + inst = PyBaseObject_Type.tp_new((PyTypeObject*) data->newargs, Py_None, Py_None); + Py_INCREF(data->newargs); + PyObject_SetAttr(inst, SWIG_This(), swig_this); + Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG; +#else + PyObject *dict = PyDict_New(); + PyDict_SetItem(dict, SWIG_This(), swig_this); + inst = PyInstance_NewRaw(data->newargs, dict); + Py_DECREF(dict); +#endif + } + return inst; +#else +#if (PY_VERSION_HEX >= 0x02010000) + PyObject *inst; + PyObject *dict = PyDict_New(); + PyDict_SetItem(dict, SWIG_This(), swig_this); + inst = PyInstance_NewRaw(data->newargs, dict); + Py_DECREF(dict); + return (PyObject *) inst; +#else + PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type); + if (inst == NULL) { + return NULL; + } + inst->in_class = (PyClassObject *)data->newargs; + Py_INCREF(inst->in_class); + inst->in_dict = PyDict_New(); + if (inst->in_dict == NULL) { + Py_DECREF(inst); + return NULL; + } +#ifdef Py_TPFLAGS_HAVE_WEAKREFS + inst->in_weakreflist = NULL; +#endif +#ifdef Py_TPFLAGS_GC + PyObject_GC_Init(inst); +#endif + PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this); + return (PyObject *) inst; +#endif +#endif +} + +SWIGRUNTIME void +SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this) +{ + PyObject *dict; +#if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS) + PyObject **dictptr = _PyObject_GetDictPtr(inst); + if (dictptr != NULL) { + dict = *dictptr; + if (dict == NULL) { + dict = PyDict_New(); + *dictptr = dict; + } + PyDict_SetItem(dict, SWIG_This(), swig_this); + return; + } +#endif + dict = PyObject_GetAttrString(inst, (char*)"__dict__"); + PyDict_SetItem(dict, SWIG_This(), swig_this); + Py_DECREF(dict); +} + + +SWIGINTERN PyObject * +SWIG_Python_InitShadowInstance(PyObject *args) { + PyObject *obj[2]; + if (!SWIG_Python_UnpackTuple(args,(char*)"swiginit", 2, 2, obj)) { + return NULL; + } else { + SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]); + if (sthis) { + SwigPyObject_append((PyObject*) sthis, obj[1]); + } else { + SWIG_Python_SetSwigThis(obj[0], obj[1]); + } + return SWIG_Py_Void(); + } +} + +/* Create a new pointer object */ + +SWIGRUNTIME PyObject * +SWIG_Python_NewPointerObj(void *ptr, swig_type_info *type, int flags) { + if (!ptr) { + return SWIG_Py_Void(); + } else { + int own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0; + PyObject *robj = SwigPyObject_New(ptr, type, own); + SwigPyClientData *clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0; + if (clientdata && !(flags & SWIG_POINTER_NOSHADOW)) { + PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj); + if (inst) { + Py_DECREF(robj); + robj = inst; + } + } + return robj; + } +} + +/* Create a new packed object */ + +SWIGRUNTIMEINLINE PyObject * +SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) { + return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void(); +} + +/* -----------------------------------------------------------------------------* + * Get type list + * -----------------------------------------------------------------------------*/ + +#ifdef SWIG_LINK_RUNTIME +void *SWIG_ReturnGlobalTypeList(void *); +#endif + +SWIGRUNTIME swig_module_info * +SWIG_Python_GetModule(void) { + static void *type_pointer = (void *)0; + /* first check if module already created */ + if (!type_pointer) { +#ifdef SWIG_LINK_RUNTIME + type_pointer = SWIG_ReturnGlobalTypeList((void *)0); +#else + type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, + (char*)"type_pointer" SWIG_TYPE_TABLE_NAME); + if (PyErr_Occurred()) { + PyErr_Clear(); + type_pointer = (void *)0; + } +#endif + } + return (swig_module_info *) type_pointer; +} + +#if PY_MAJOR_VERSION < 2 +/* PyModule_AddObject function was introduced in Python 2.0. The following function + is copied out of Python/modsupport.c in python version 2.3.4 */ +SWIGINTERN int +PyModule_AddObject(PyObject *m, char *name, PyObject *o) +{ + PyObject *dict; + if (!PyModule_Check(m)) { + PyErr_SetString(PyExc_TypeError, + "PyModule_AddObject() needs module as first arg"); + return SWIG_ERROR; + } + if (!o) { + PyErr_SetString(PyExc_TypeError, + "PyModule_AddObject() needs non-NULL value"); + return SWIG_ERROR; + } + + dict = PyModule_GetDict(m); + if (dict == NULL) { + /* Internal error -- modules must have a dict! */ + PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__", + PyModule_GetName(m)); + return SWIG_ERROR; + } + if (PyDict_SetItemString(dict, name, o)) + return SWIG_ERROR; + Py_DECREF(o); + return SWIG_OK; +} +#endif + +SWIGRUNTIME void +SWIG_Python_DestroyModule(void *vptr) +{ + swig_module_info *swig_module = (swig_module_info *) vptr; + swig_type_info **types = swig_module->types; + size_t i; + for (i =0; i < swig_module->size; ++i) { + swig_type_info *ty = types[i]; + if (ty->owndata) { + SwigPyClientData *data = (SwigPyClientData *) ty->clientdata; + if (data) SwigPyClientData_Del(data); + } + } + Py_DECREF(SWIG_This()); +} + +SWIGRUNTIME void +SWIG_Python_SetModule(swig_module_info *swig_module) { + static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} };/* Sentinel */ + +#if PY_VERSION_HEX >= 0x03000000 + /* Add a dummy module object into sys.modules */ + PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION); +#else + PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, + swig_empty_runtime_method_table); +#endif + PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule); + if (pointer && module) { + PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer); + } else { + Py_XDECREF(pointer); + } +} + +/* The python cached type query */ +SWIGRUNTIME PyObject * +SWIG_Python_TypeCache(void) { + static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New(); + return cache; +} + +SWIGRUNTIME swig_type_info * +SWIG_Python_TypeQuery(const char *type) +{ + PyObject *cache = SWIG_Python_TypeCache(); + PyObject *key = SWIG_Python_str_FromChar(type); + PyObject *obj = PyDict_GetItem(cache, key); + swig_type_info *descriptor; + if (obj) { + descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj); + } else { + swig_module_info *swig_module = SWIG_Python_GetModule(); + descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type); + if (descriptor) { + obj = PyCObject_FromVoidPtr(descriptor, NULL); + PyDict_SetItem(cache, key, obj); + Py_DECREF(obj); + } + } + Py_DECREF(key); + return descriptor; +} + +/* + For backward compatibility only +*/ +#define SWIG_POINTER_EXCEPTION 0 +#define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg) +#define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags) + +SWIGRUNTIME int +SWIG_Python_AddErrMesg(const char* mesg, int infront) +{ + if (PyErr_Occurred()) { + PyObject *type = 0; + PyObject *value = 0; + PyObject *traceback = 0; + PyErr_Fetch(&type, &value, &traceback); + if (value) { + PyObject *old_str = PyObject_Str(value); + Py_XINCREF(type); + PyErr_Clear(); + if (infront) { + PyErr_Format(type, "%s %s", mesg, SWIG_Python_str_AsChar(old_str)); + } else { + PyErr_Format(type, "%s %s", SWIG_Python_str_AsChar(old_str), mesg); + } + Py_DECREF(old_str); + } + return 1; + } else { + return 0; + } +} + +SWIGRUNTIME int +SWIG_Python_ArgFail(int argnum) +{ + if (PyErr_Occurred()) { + /* add information about failing argument */ + char mesg[256]; + PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum); + return SWIG_Python_AddErrMesg(mesg, 1); + } else { + return 0; + } +} + +SWIGRUNTIMEINLINE const char * +SwigPyObject_GetDesc(PyObject *self) +{ + SwigPyObject *v = (SwigPyObject *)self; + swig_type_info *ty = v ? v->ty : 0; + return ty ? ty->str : (char*)""; +} + +SWIGRUNTIME void +SWIG_Python_TypeError(const char *type, PyObject *obj) +{ + if (type) { +#if defined(SWIG_COBJECT_TYPES) + if (obj && SwigPyObject_Check(obj)) { + const char *otype = (const char *) SwigPyObject_GetDesc(obj); + if (otype) { + PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received", + type, otype); + return; + } + } else +#endif + { + const char *otype = (obj ? obj->ob_type->tp_name : 0); + if (otype) { + PyObject *str = PyObject_Str(obj); + const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0; + if (cstr) { + PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received", + type, otype, cstr); + } else { + PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received", + type, otype); + } + Py_XDECREF(str); + return; + } + } + PyErr_Format(PyExc_TypeError, "a '%s' is expected", type); + } else { + PyErr_Format(PyExc_TypeError, "unexpected type is received"); + } +} + + +/* Convert a pointer value, signal an exception on a type mismatch */ +SWIGRUNTIME void * +SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags) { + void *result; + if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) { + PyErr_Clear(); + if (flags & SWIG_POINTER_EXCEPTION) { + SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj); + SWIG_Python_ArgFail(argnum); + } + } + return result; +} + + +#ifdef __cplusplus +#if 0 +{ /* cc-mode */ +#endif +} +#endif @@ -2680,481 +2643,481 @@ SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags) #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else -/* ----------------------------------------------------------------------------- - * See the LICENSE file for information on copyright, usage and redistribution - * of SWIG, and the README file for authors - http://www.swig.org/release.html. - * - * director.swg - * - * This file contains support for director classes that proxy - * method calls from C++ to Python extensions. - * ----------------------------------------------------------------------------- */ - -#ifndef SWIG_DIRECTOR_PYTHON_HEADER_ -#define SWIG_DIRECTOR_PYTHON_HEADER_ - -#ifdef __cplusplus - -#include -#include -#include -#include -#include - - -/* - Use -DSWIG_PYTHON_DIRECTOR_NO_VTABLE if you don't want to generate a 'virtual - table', and avoid multiple GetAttr calls to retrieve the python - methods. -*/ - -#ifndef SWIG_PYTHON_DIRECTOR_NO_VTABLE -#ifndef SWIG_PYTHON_DIRECTOR_VTABLE -#define SWIG_PYTHON_DIRECTOR_VTABLE -#endif -#endif - - - -/* - Use -DSWIG_DIRECTOR_NO_UEH if you prefer to avoid the use of the - Undefined Exception Handler provided by swift -*/ -#ifndef SWIG_DIRECTOR_NO_UEH -#ifndef SWIG_DIRECTOR_UEH -#define SWIG_DIRECTOR_UEH -#endif -#endif - - -/* - Use -DSWIG_DIRECTOR_STATIC if you prefer to avoid the use of the - 'Swig' namespace. This could be useful for multi-modules projects. -*/ -#ifdef SWIG_DIRECTOR_STATIC -/* Force anonymous (static) namespace */ -#define Swig -#endif - - -/* - Use -DSWIG_DIRECTOR_NORTTI if you prefer to avoid the use of the - native C++ RTTI and dynamic_cast<>. But be aware that directors - could stop working when using this option. -*/ -#ifdef SWIG_DIRECTOR_NORTTI -/* - When we don't use the native C++ RTTI, we implement a minimal one - only for Directors. -*/ -# ifndef SWIG_DIRECTOR_RTDIR -# define SWIG_DIRECTOR_RTDIR -#include - -namespace Swig { - class Director; - SWIGINTERN std::map& get_rtdir_map() { - static std::map rtdir_map; - return rtdir_map; - } - - SWIGINTERNINLINE void set_rtdir(void *vptr, Director *rtdir) { - get_rtdir_map()[vptr] = rtdir; - } - - SWIGINTERNINLINE Director *get_rtdir(void *vptr) { - std::map::const_iterator pos = get_rtdir_map().find(vptr); - Director *rtdir = (pos != get_rtdir_map().end()) ? pos->second : 0; - return rtdir; - } -} -# endif /* SWIG_DIRECTOR_RTDIR */ - -# define SWIG_DIRECTOR_CAST(Arg) Swig::get_rtdir(static_cast(Arg)) -# define SWIG_DIRECTOR_RGTR(Arg1, Arg2) Swig::set_rtdir(static_cast(Arg1), Arg2) - -#else - -# define SWIG_DIRECTOR_CAST(Arg) dynamic_cast(Arg) -# define SWIG_DIRECTOR_RGTR(Arg1, Arg2) - -#endif /* SWIG_DIRECTOR_NORTTI */ - -extern "C" { - struct swig_type_info; -} - -namespace Swig { - - /* memory handler */ - struct GCItem - { - virtual ~GCItem() {} - - virtual int get_own() const - { - return 0; - } - }; - - struct GCItem_var - { - GCItem_var(GCItem *item = 0) : _item(item) - { - } - - GCItem_var& operator=(GCItem *item) - { - GCItem *tmp = _item; - _item = item; - delete tmp; - return *this; - } - - ~GCItem_var() - { - delete _item; - } - - GCItem * operator->() const - { - return _item; - } - - private: - GCItem *_item; - }; - - struct GCItem_Object : GCItem - { - GCItem_Object(int own) : _own(own) - { - } - - virtual ~GCItem_Object() - { - } - - int get_own() const - { - return _own; - } - - private: - int _own; - }; - - template - struct GCItem_T : GCItem - { - GCItem_T(Type *ptr) : _ptr(ptr) - { - } - - virtual ~GCItem_T() - { - delete _ptr; - } - - private: - Type *_ptr; - }; - - template - struct GCArray_T : GCItem - { - GCArray_T(Type *ptr) : _ptr(ptr) - { - } - - virtual ~GCArray_T() - { - delete[] _ptr; - } - - private: - Type *_ptr; - }; - - /* base class for director exceptions */ - class DirectorException { - protected: - std::string swig_msg; - public: - DirectorException(PyObject *error, const char* hdr ="", const char* msg ="") - : swig_msg(hdr) - { - SWIG_PYTHON_THREAD_BEGIN_BLOCK; - if (strlen(msg)) { - swig_msg += " "; - swig_msg += msg; - } - if (!PyErr_Occurred()) { - PyErr_SetString(error, getMessage()); - } - SWIG_PYTHON_THREAD_END_BLOCK; - } - - const char *getMessage() const - { - return swig_msg.c_str(); - } - - static void raise(PyObject *error, const char *msg) - { - throw DirectorException(error, msg); - } - - static void raise(const char *msg) - { - raise(PyExc_RuntimeError, msg); - } - }; - - /* unknown exception handler */ - class UnknownExceptionHandler - { -#ifdef SWIG_DIRECTOR_UEH - static void handler() { - try { - throw; - } catch (DirectorException& e) { - std::cerr << "Swig Director exception caught:" << std::endl - << e.getMessage() << std::endl; - } catch (std::exception& e) { - std::cerr << "std::exception caught: "<< e.what() << std::endl; - } catch (...) { - std::cerr << "Unknown exception caught." << std::endl; - } - - std::cerr << std::endl - << "Python interpreter traceback:" << std::endl; - PyErr_Print(); - std::cerr << std::endl; - - std::cerr << "This exception was caught by the SWIG unexpected exception handler." << std::endl - << "Try using %feature(\"director:except\") to avoid reaching this point." << std::endl - << std::endl - << "Exception is being re-thrown, program will like abort/terminate." << std::endl; - throw; - } - - public: - - std::unexpected_handler old; - UnknownExceptionHandler(std::unexpected_handler nh = handler) - { - old = std::set_unexpected(nh); - } - - ~UnknownExceptionHandler() - { - std::set_unexpected(old); - } -#endif - }; - - /* type mismatch in the return value from a python method call */ - class DirectorTypeMismatchException : public Swig::DirectorException { - public: - DirectorTypeMismatchException(PyObject *error, const char* msg="") - : Swig::DirectorException(error, "Swig director type mismatch", msg) - { - } - - DirectorTypeMismatchException(const char* msg="") - : Swig::DirectorException(PyExc_TypeError, "Swig director type mismatch", msg) - { - } - - static void raise(PyObject *error, const char *msg) - { - throw DirectorTypeMismatchException(error, msg); - } - - static void raise(const char *msg) - { - throw DirectorTypeMismatchException(msg); - } - }; - - /* any python exception that occurs during a director method call */ - class DirectorMethodException : public Swig::DirectorException { - public: - DirectorMethodException(const char* msg = "") - : DirectorException(PyExc_RuntimeError, "Swig director method error.", msg) - { - } - - static void raise(const char *msg) - { - throw DirectorMethodException(msg); - } - }; - - /* attempt to call a pure virtual method via a director method */ - class DirectorPureVirtualException : public Swig::DirectorException - { - public: - DirectorPureVirtualException(const char* msg = "") - : DirectorException(PyExc_RuntimeError, "Swig director pure virtual method called", msg) - { - } - - static void raise(const char *msg) - { - throw DirectorPureVirtualException(msg); - } - }; - - -#if defined(SWIG_PYTHON_THREADS) -/* __THREAD__ is the old macro to activate some thread support */ -# if !defined(__THREAD__) -# define __THREAD__ 1 -# endif -#endif - -#ifdef __THREAD__ -# include "pythread.h" - class Guard - { - PyThread_type_lock & mutex_; - - public: - Guard(PyThread_type_lock & mutex) : mutex_(mutex) - { - PyThread_acquire_lock(mutex_, WAIT_LOCK); - } - - ~Guard() - { - PyThread_release_lock(mutex_); - } - }; -# define SWIG_GUARD(mutex) Guard _guard(mutex) -#else -# define SWIG_GUARD(mutex) -#endif - - /* director base class */ - class Director { - private: - /* pointer to the wrapped python object */ - PyObject* swig_self; - /* flag indicating whether the object is owned by python or c++ */ - mutable bool swig_disown_flag; - - /* decrement the reference count of the wrapped python object */ - void swig_decref() const { - if (swig_disown_flag) { - SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_DECREF(swig_self); - SWIG_PYTHON_THREAD_END_BLOCK; - } - } - - public: - /* wrap a python object, optionally taking ownership */ - Director(PyObject* self) : swig_self(self), swig_disown_flag(false) { - swig_incref(); - } - - - /* discard our reference at destruction */ - virtual ~Director() { - swig_decref(); - } - - - /* return a pointer to the wrapped python object */ - PyObject *swig_get_self() const { - return swig_self; - } - - /* acquire ownership of the wrapped python object (the sense of "disown" - * is from python) */ - void swig_disown() const { - if (!swig_disown_flag) { - swig_disown_flag=true; - swig_incref(); - } - } - - /* increase the reference count of the wrapped python object */ - void swig_incref() const { - if (swig_disown_flag) { - Py_INCREF(swig_self); - } - } - - /* methods to implement pseudo protected director members */ - virtual bool swig_get_inner(const char* /* name */) const { - return true; - } - - virtual void swig_set_inner(const char* /* name */, bool /* val */) const { - } - - /* ownership management */ - private: - typedef std::map ownership_map; - mutable ownership_map owner; -#ifdef __THREAD__ - static PyThread_type_lock swig_mutex_own; -#endif - - public: - template - void swig_acquire_ownership_array(Type *vptr) const - { - if (vptr) { - SWIG_GUARD(swig_mutex_own); - owner[vptr] = new GCArray_T(vptr); - } - } - - template - void swig_acquire_ownership(Type *vptr) const - { - if (vptr) { - SWIG_GUARD(swig_mutex_own); - owner[vptr] = new GCItem_T(vptr); - } - } - - void swig_acquire_ownership_obj(void *vptr, int own) const - { - if (vptr && own) { - SWIG_GUARD(swig_mutex_own); - owner[vptr] = new GCItem_Object(own); - } - } - - int swig_release_ownership(void *vptr) const - { - int own = 0; - if (vptr) { - SWIG_GUARD(swig_mutex_own); - ownership_map::iterator iter = owner.find(vptr); - if (iter != owner.end()) { - own = iter->second->get_own(); - owner.erase(iter); - } - } - return own; - } - }; - -#ifdef __THREAD__ - PyThread_type_lock Director::swig_mutex_own = PyThread_allocate_lock(); -#endif -} - -#endif /* __cplusplus */ - - -#endif +/* ----------------------------------------------------------------------------- + * See the LICENSE file for information on copyright, usage and redistribution + * of SWIG, and the README file for authors - http://www.swig.org/release.html. + * + * director.swg + * + * This file contains support for director classes that proxy + * method calls from C++ to Python extensions. + * ----------------------------------------------------------------------------- */ + +#ifndef SWIG_DIRECTOR_PYTHON_HEADER_ +#define SWIG_DIRECTOR_PYTHON_HEADER_ + +#ifdef __cplusplus + +#include +#include +#include +#include +#include + + +/* + Use -DSWIG_PYTHON_DIRECTOR_NO_VTABLE if you don't want to generate a 'virtual + table', and avoid multiple GetAttr calls to retrieve the python + methods. +*/ + +#ifndef SWIG_PYTHON_DIRECTOR_NO_VTABLE +#ifndef SWIG_PYTHON_DIRECTOR_VTABLE +#define SWIG_PYTHON_DIRECTOR_VTABLE +#endif +#endif + + + +/* + Use -DSWIG_DIRECTOR_NO_UEH if you prefer to avoid the use of the + Undefined Exception Handler provided by swift +*/ +#ifndef SWIG_DIRECTOR_NO_UEH +#ifndef SWIG_DIRECTOR_UEH +#define SWIG_DIRECTOR_UEH +#endif +#endif + + +/* + Use -DSWIG_DIRECTOR_STATIC if you prefer to avoid the use of the + 'Swig' namespace. This could be usefull for multi-modules projects. +*/ +#ifdef SWIG_DIRECTOR_STATIC +/* Force anonymous (static) namespace */ +#define Swig +#endif + + +/* + Use -DSWIG_DIRECTOR_NORTTI if you prefer to avoid the use of the + native C++ RTTI and dynamic_cast<>. But be aware that directors + could stop working when using this option. +*/ +#ifdef SWIG_DIRECTOR_NORTTI +/* + When we don't use the native C++ RTTI, we implement a minimal one + only for Directors. +*/ +# ifndef SWIG_DIRECTOR_RTDIR +# define SWIG_DIRECTOR_RTDIR +#include + +namespace Swig { + class Director; + SWIGINTERN std::map& get_rtdir_map() { + static std::map rtdir_map; + return rtdir_map; + } + + SWIGINTERNINLINE void set_rtdir(void *vptr, Director *rtdir) { + get_rtdir_map()[vptr] = rtdir; + } + + SWIGINTERNINLINE Director *get_rtdir(void *vptr) { + std::map::const_iterator pos = get_rtdir_map().find(vptr); + Director *rtdir = (pos != get_rtdir_map().end()) ? pos->second : 0; + return rtdir; + } +} +# endif /* SWIG_DIRECTOR_RTDIR */ + +# define SWIG_DIRECTOR_CAST(Arg) Swig::get_rtdir(static_cast(Arg)) +# define SWIG_DIRECTOR_RGTR(Arg1, Arg2) Swig::set_rtdir(static_cast(Arg1), Arg2) + +#else + +# define SWIG_DIRECTOR_CAST(Arg) dynamic_cast(Arg) +# define SWIG_DIRECTOR_RGTR(Arg1, Arg2) + +#endif /* SWIG_DIRECTOR_NORTTI */ + +extern "C" { + struct swig_type_info; +} + +namespace Swig { + + /* memory handler */ + struct GCItem + { + virtual ~GCItem() {} + + virtual int get_own() const + { + return 0; + } + }; + + struct GCItem_var + { + GCItem_var(GCItem *item = 0) : _item(item) + { + } + + GCItem_var& operator=(GCItem *item) + { + GCItem *tmp = _item; + _item = item; + delete tmp; + return *this; + } + + ~GCItem_var() + { + delete _item; + } + + GCItem * operator->() const + { + return _item; + } + + private: + GCItem *_item; + }; + + struct GCItem_Object : GCItem + { + GCItem_Object(int own) : _own(own) + { + } + + virtual ~GCItem_Object() + { + } + + int get_own() const + { + return _own; + } + + private: + int _own; + }; + + template + struct GCItem_T : GCItem + { + GCItem_T(Type *ptr) : _ptr(ptr) + { + } + + virtual ~GCItem_T() + { + delete _ptr; + } + + private: + Type *_ptr; + }; + + template + struct GCArray_T : GCItem + { + GCArray_T(Type *ptr) : _ptr(ptr) + { + } + + virtual ~GCArray_T() + { + delete[] _ptr; + } + + private: + Type *_ptr; + }; + + /* base class for director exceptions */ + class DirectorException { + protected: + std::string swig_msg; + public: + DirectorException(PyObject *error, const char* hdr ="", const char* msg ="") + : swig_msg(hdr) + { + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + if (strlen(msg)) { + swig_msg += " "; + swig_msg += msg; + } + if (!PyErr_Occurred()) { + PyErr_SetString(error, getMessage()); + } + SWIG_PYTHON_THREAD_END_BLOCK; + } + + const char *getMessage() const + { + return swig_msg.c_str(); + } + + static void raise(PyObject *error, const char *msg) + { + throw DirectorException(error, msg); + } + + static void raise(const char *msg) + { + raise(PyExc_RuntimeError, msg); + } + }; + + /* unknown exception handler */ + class UnknownExceptionHandler + { +#ifdef SWIG_DIRECTOR_UEH + static void handler() { + try { + throw; + } catch (DirectorException& e) { + std::cerr << "Swig Director exception caught:" << std::endl + << e.getMessage() << std::endl; + } catch (std::exception& e) { + std::cerr << "std::exception caught: "<< e.what() << std::endl; + } catch (...) { + std::cerr << "Unknown exception caught." << std::endl; + } + + std::cerr << std::endl + << "Python interpreter traceback:" << std::endl; + PyErr_Print(); + std::cerr << std::endl; + + std::cerr << "This exception was caught by the SWIG unexpected exception handler." << std::endl + << "Try using %feature(\"director:except\") to avoid reaching this point." << std::endl + << std::endl + << "Exception is being re-thrown, program will like abort/terminate." << std::endl; + throw; + } + + public: + + std::unexpected_handler old; + UnknownExceptionHandler(std::unexpected_handler nh = handler) + { + old = std::set_unexpected(nh); + } + + ~UnknownExceptionHandler() + { + std::set_unexpected(old); + } +#endif + }; + + /* type mismatch in the return value from a python method call */ + class DirectorTypeMismatchException : public Swig::DirectorException { + public: + DirectorTypeMismatchException(PyObject *error, const char* msg="") + : Swig::DirectorException(error, "Swig director type mismatch", msg) + { + } + + DirectorTypeMismatchException(const char* msg="") + : Swig::DirectorException(PyExc_TypeError, "Swig director type mismatch", msg) + { + } + + static void raise(PyObject *error, const char *msg) + { + throw DirectorTypeMismatchException(error, msg); + } + + static void raise(const char *msg) + { + throw DirectorTypeMismatchException(msg); + } + }; + + /* any python exception that occurs during a director method call */ + class DirectorMethodException : public Swig::DirectorException { + public: + DirectorMethodException(const char* msg = "") + : DirectorException(PyExc_RuntimeError, "Swig director method error.", msg) + { + } + + static void raise(const char *msg) + { + throw DirectorMethodException(msg); + } + }; + + /* attempt to call a pure virtual method via a director method */ + class DirectorPureVirtualException : public Swig::DirectorException + { + public: + DirectorPureVirtualException(const char* msg = "") + : DirectorException(PyExc_RuntimeError, "Swig director pure virtual method called", msg) + { + } + + static void raise(const char *msg) + { + throw DirectorPureVirtualException(msg); + } + }; + + +#if defined(SWIG_PYTHON_THREADS) +/* __THREAD__ is the old macro to activate some thread support */ +# if !defined(__THREAD__) +# define __THREAD__ 1 +# endif +#endif + +#ifdef __THREAD__ +# include "pythread.h" + class Guard + { + PyThread_type_lock & mutex_; + + public: + Guard(PyThread_type_lock & mutex) : mutex_(mutex) + { + PyThread_acquire_lock(mutex_, WAIT_LOCK); + } + + ~Guard() + { + PyThread_release_lock(mutex_); + } + }; +# define SWIG_GUARD(mutex) Guard _guard(mutex) +#else +# define SWIG_GUARD(mutex) +#endif + + /* director base class */ + class Director { + private: + /* pointer to the wrapped python object */ + PyObject* swig_self; + /* flag indicating whether the object is owned by python or c++ */ + mutable bool swig_disown_flag; + + /* decrement the reference count of the wrapped python object */ + void swig_decref() const { + if (swig_disown_flag) { + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + Py_DECREF(swig_self); + SWIG_PYTHON_THREAD_END_BLOCK; + } + } + + public: + /* wrap a python object, optionally taking ownership */ + Director(PyObject* self) : swig_self(self), swig_disown_flag(false) { + swig_incref(); + } + + + /* discard our reference at destruction */ + virtual ~Director() { + swig_decref(); + } + + + /* return a pointer to the wrapped python object */ + PyObject *swig_get_self() const { + return swig_self; + } + + /* acquire ownership of the wrapped python object (the sense of "disown" + * is from python) */ + void swig_disown() const { + if (!swig_disown_flag) { + swig_disown_flag=true; + swig_incref(); + } + } + + /* increase the reference count of the wrapped python object */ + void swig_incref() const { + if (swig_disown_flag) { + Py_INCREF(swig_self); + } + } + + /* methods to implement pseudo protected director members */ + virtual bool swig_get_inner(const char* /* name */) const { + return true; + } + + virtual void swig_set_inner(const char* /* name */, bool /* val */) const { + } + + /* ownership management */ + private: + typedef std::map ownership_map; + mutable ownership_map owner; +#ifdef __THREAD__ + static PyThread_type_lock swig_mutex_own; +#endif + + public: + template + void swig_acquire_ownership_array(Type *vptr) const + { + if (vptr) { + SWIG_GUARD(swig_mutex_own); + owner[vptr] = new GCArray_T(vptr); + } + } + + template + void swig_acquire_ownership(Type *vptr) const + { + if (vptr) { + SWIG_GUARD(swig_mutex_own); + owner[vptr] = new GCItem_T(vptr); + } + } + + void swig_acquire_ownership_obj(void *vptr, int own) const + { + if (vptr && own) { + SWIG_GUARD(swig_mutex_own); + owner[vptr] = new GCItem_Object(own); + } + } + + int swig_release_ownership(void *vptr) const + { + int own = 0; + if (vptr) { + SWIG_GUARD(swig_mutex_own); + ownership_map::iterator iter = owner.find(vptr); + if (iter != owner.end()) { + own = iter->second->get_own(); + owner.erase(iter); + } + } + return own; + } + }; + +#ifdef __THREAD__ + PyThread_type_lock Director::swig_mutex_own = PyThread_allocate_lock(); +#endif +} + +#endif /* __cplusplus */ + + +#endif /* -------- TYPES TABLE (BEGIN) -------- */ @@ -3202,7 +3165,7 @@ static swig_module_info swig_module = {swig_types, 19, 0, 0, 0, 0}; #endif #define SWIG_name "_tinyWRAP" -#define SWIGVERSION 0x010340 +#define SWIGVERSION 0x010339 #define SWIG_VERSION SWIGVERSION @@ -3308,27 +3271,19 @@ SWIGINTERN int SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) { #if PY_VERSION_HEX>=0x03000000 - if (PyUnicode_Check(obj)) + if (PyUnicode_Check(obj)) #else - if (PyString_Check(obj)) + if (PyString_Check(obj)) #endif { char *cstr; Py_ssize_t len; #if PY_VERSION_HEX>=0x03000000 - if (!alloc && cptr) { - /* We can't allow converting without allocation, since the internal - representation of string in Python 3 is UCS-2/UCS-4 but we require - a UTF-8 representation. - TODO(bhy) More detailed explanation */ - return SWIG_RuntimeError; - } obj = PyUnicode_AsUTF8String(obj); PyBytes_AsStringAndSize(obj, &cstr, &len); - if(alloc) *alloc = SWIG_NEWOBJ; #else PyString_AsStringAndSize(obj, &cstr, &len); #endif - if (cptr) { + if (cptr) { if (alloc) { /* In python the user should not be able to modify the inner @@ -3353,16 +3308,10 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) *alloc = SWIG_OLDOBJ; } } else { - #if PY_VERSION_HEX>=0x03000000 - assert(0); /* Should never reach here in Python 3 */ - #endif *cptr = SWIG_Python_str_AsChar(obj); } } if (psize) *psize = len + 1; -#if PY_VERSION_HEX>=0x03000000 - Py_XDECREF(obj); -#endif return SWIG_OK; } else { swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); @@ -3571,6 +3520,21 @@ SWIG_FromCharPtr(const char *cptr) #define SWIG_From_long PyInt_FromLong +SWIGINTERNINLINE PyObject* +SWIG_From_unsigned_SS_long (unsigned long value) +{ + return (value > LONG_MAX) ? + PyLong_FromUnsignedLong(value) : PyInt_FromLong(static_cast< long >(value)); +} + + +SWIGINTERNINLINE PyObject * +SWIG_From_unsigned_SS_int (unsigned int value) +{ + return SWIG_From_unsigned_SS_long (value); +} + + SWIGINTERNINLINE PyObject * SWIG_From_short (short value) { @@ -4361,6 +4325,66 @@ fail: } +SWIGINTERN PyObject *_wrap_SipMessage_getSipContentLength(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SipMessage *arg1 = (SipMessage *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + unsigned int result; + + if (!PyArg_ParseTuple(args,(char *)"O:SipMessage_getSipContentLength",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SipMessage, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SipMessage_getSipContentLength" "', argument " "1"" of type '" "SipMessage *""'"); + } + arg1 = reinterpret_cast< SipMessage * >(argp1); + result = (unsigned int)(arg1)->getSipContentLength(); + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SipMessage_getSipContent(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SipMessage *arg1 = (SipMessage *) 0 ; + void *arg2 = (void *) 0 ; + unsigned int arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + unsigned int val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + unsigned int result; + + if (!PyArg_ParseTuple(args,(char *)"OOO:SipMessage_getSipContent",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SipMessage, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SipMessage_getSipContent" "', argument " "1"" of type '" "SipMessage *""'"); + } + arg1 = reinterpret_cast< SipMessage * >(argp1); + res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SipMessage_getSipContent" "', argument " "2"" of type '" "void *""'"); + } + ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SipMessage_getSipContent" "', argument " "3"" of type '" "unsigned int""'"); + } + arg3 = static_cast< unsigned int >(val3); + result = (unsigned int)(arg1)->getSipContent(arg2,arg3); + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *SipMessage_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; @@ -5629,7 +5653,7 @@ SWIGINTERN PyObject *_wrap_disown_SipCallback(PyObject *SWIGUNUSEDPARM(self), Py } arg1 = reinterpret_cast< SipCallback * >(argp1); { - Swig::Director *director = dynamic_cast(arg1); + Swig::Director *director = SWIG_DIRECTOR_CAST(arg1); if (director) director->swig_disown(); } @@ -5888,7 +5912,7 @@ SWIGINTERN PyObject *_wrap_disown_SipDebugCallback(PyObject *SWIGUNUSEDPARM(self } arg1 = reinterpret_cast< SipDebugCallback * >(argp1); { - Swig::Director *director = dynamic_cast(arg1); + Swig::Director *director = SWIG_DIRECTOR_CAST(arg1); if (director) director->swig_disown(); } @@ -6597,6 +6621,8 @@ static PyMethodDef SwigMethods[] = { { (char *)"delete_SipMessage", _wrap_delete_SipMessage, METH_VARARGS, NULL}, { (char *)"SipMessage_getSipHeaderValue", _wrap_SipMessage_getSipHeaderValue, METH_VARARGS, NULL}, { (char *)"SipMessage_getSipHeaderParamValue", _wrap_SipMessage_getSipHeaderParamValue, METH_VARARGS, NULL}, + { (char *)"SipMessage_getSipContentLength", _wrap_SipMessage_getSipContentLength, METH_VARARGS, NULL}, + { (char *)"SipMessage_getSipContent", _wrap_SipMessage_getSipContent, METH_VARARGS, NULL}, { (char *)"SipMessage_swigregister", SipMessage_swigregister, METH_VARARGS, NULL}, { (char *)"new_SipEvent", _wrap_new_SipEvent, METH_VARARGS, NULL}, { (char *)"delete_SipEvent", _wrap_delete_SipEvent, METH_VARARGS, NULL}, @@ -6803,242 +6829,242 @@ static swig_const_info swig_const_table[] = { #ifdef __cplusplus } #endif -/* ----------------------------------------------------------------------------- - * Type initialization: - * This problem is tough by the requirement that no dynamic - * memory is used. Also, since swig_type_info structures store pointers to - * swig_cast_info structures and swig_cast_info structures store pointers back - * to swig_type_info structures, we need some lookup code at initialization. - * The idea is that swig generates all the structures that are needed. - * The runtime then collects these partially filled structures. - * The SWIG_InitializeModule function takes these initial arrays out of - * swig_module, and does all the lookup, filling in the swig_module.types - * array with the correct data and linking the correct swig_cast_info - * structures together. - * - * The generated swig_type_info structures are assigned staticly to an initial - * array. We just loop through that array, and handle each type individually. - * First we lookup if this type has been already loaded, and if so, use the - * loaded structure instead of the generated one. Then we have to fill in the - * cast linked list. The cast data is initially stored in something like a - * two-dimensional array. Each row corresponds to a type (there are the same - * number of rows as there are in the swig_type_initial array). Each entry in - * a column is one of the swig_cast_info structures for that type. - * The cast_initial array is actually an array of arrays, because each row has - * a variable number of columns. So to actually build the cast linked list, - * we find the array of casts associated with the type, and loop through it - * adding the casts to the list. The one last trick we need to do is making - * sure the type pointer in the swig_cast_info struct is correct. - * - * First off, we lookup the cast->type name to see if it is already loaded. - * There are three cases to handle: - * 1) If the cast->type has already been loaded AND the type we are adding - * casting info to has not been loaded (it is in this module), THEN we - * replace the cast->type pointer with the type pointer that has already - * been loaded. - * 2) If BOTH types (the one we are adding casting info to, and the - * cast->type) are loaded, THEN the cast info has already been loaded by - * the previous module so we just ignore it. - * 3) Finally, if cast->type has not already been loaded, then we add that - * swig_cast_info to the linked list (because the cast->type) pointer will - * be correct. - * ----------------------------------------------------------------------------- */ +/* ----------------------------------------------------------------------------- + * Type initialization: + * This problem is tough by the requirement that no dynamic + * memory is used. Also, since swig_type_info structures store pointers to + * swig_cast_info structures and swig_cast_info structures store pointers back + * to swig_type_info structures, we need some lookup code at initialization. + * The idea is that swig generates all the structures that are needed. + * The runtime then collects these partially filled structures. + * The SWIG_InitializeModule function takes these initial arrays out of + * swig_module, and does all the lookup, filling in the swig_module.types + * array with the correct data and linking the correct swig_cast_info + * structures together. + * + * The generated swig_type_info structures are assigned staticly to an initial + * array. We just loop through that array, and handle each type individually. + * First we lookup if this type has been already loaded, and if so, use the + * loaded structure instead of the generated one. Then we have to fill in the + * cast linked list. The cast data is initially stored in something like a + * two-dimensional array. Each row corresponds to a type (there are the same + * number of rows as there are in the swig_type_initial array). Each entry in + * a column is one of the swig_cast_info structures for that type. + * The cast_initial array is actually an array of arrays, because each row has + * a variable number of columns. So to actually build the cast linked list, + * we find the array of casts associated with the type, and loop through it + * adding the casts to the list. The one last trick we need to do is making + * sure the type pointer in the swig_cast_info struct is correct. + * + * First off, we lookup the cast->type name to see if it is already loaded. + * There are three cases to handle: + * 1) If the cast->type has already been loaded AND the type we are adding + * casting info to has not been loaded (it is in this module), THEN we + * replace the cast->type pointer with the type pointer that has already + * been loaded. + * 2) If BOTH types (the one we are adding casting info to, and the + * cast->type) are loaded, THEN the cast info has already been loaded by + * the previous module so we just ignore it. + * 3) Finally, if cast->type has not already been loaded, then we add that + * swig_cast_info to the linked list (because the cast->type) pointer will + * be correct. + * ----------------------------------------------------------------------------- */ -#ifdef __cplusplus +#ifdef __cplusplus extern "C" { -#if 0 -} /* c-mode */ -#endif -#endif +#if 0 +} /* c-mode */ +#endif +#endif -#if 0 -#define SWIGRUNTIME_DEBUG -#endif +#if 0 +#define SWIGRUNTIME_DEBUG +#endif -SWIGRUNTIME void +SWIGRUNTIME void SWIG_InitializeModule(void *clientdata) { - size_t i; - swig_module_info *module_head, *iter; - int found, init; + size_t i; + swig_module_info *module_head, *iter; + int found, init; - clientdata = clientdata; + clientdata = clientdata; - /* check to see if the circular list has been setup, if not, set it up */ + /* check to see if the circular list has been setup, if not, set it up */ if (swig_module.next==0) { - /* Initialize the swig_module */ - swig_module.type_initial = swig_type_initial; - swig_module.cast_initial = swig_cast_initial; - swig_module.next = &swig_module; - init = 1; + /* Initialize the swig_module */ + swig_module.type_initial = swig_type_initial; + swig_module.cast_initial = swig_cast_initial; + swig_module.next = &swig_module; + init = 1; } else { - init = 0; - } + init = 0; + } - /* Try and load any already created modules */ - module_head = SWIG_GetModule(clientdata); + /* Try and load any already created modules */ + module_head = SWIG_GetModule(clientdata); if (!module_head) { - /* This is the first module loaded for this interpreter */ - /* so set the swig module into the interpreter */ - SWIG_SetModule(clientdata, &swig_module); - module_head = &swig_module; + /* This is the first module loaded for this interpreter */ + /* so set the swig module into the interpreter */ + SWIG_SetModule(clientdata, &swig_module); + module_head = &swig_module; } else { - /* the interpreter has loaded a SWIG module, but has it loaded this one? */ - found=0; - iter=module_head; + /* the interpreter has loaded a SWIG module, but has it loaded this one? */ + found=0; + iter=module_head; do { if (iter==&swig_module) { - found=1; - break; - } - iter=iter->next; - } while (iter!= module_head); + found=1; + break; + } + iter=iter->next; + } while (iter!= module_head); - /* if the is found in the list, then all is done and we may leave */ - if (found) return; - /* otherwise we must add out module into the list */ - swig_module.next = module_head->next; - module_head->next = &swig_module; - } + /* if the is found in the list, then all is done and we may leave */ + if (found) return; + /* otherwise we must add out module into the list */ + swig_module.next = module_head->next; + module_head->next = &swig_module; + } - /* When multiple interpeters are used, a module could have already been initialized in - a different interpreter, but not yet have a pointer in this interpreter. - In this case, we do not want to continue adding types... everything should be - set up already */ - if (init == 0) return; + /* When multiple interpeters are used, a module could have already been initialized in + a different interpreter, but not yet have a pointer in this interpreter. + In this case, we do not want to continue adding types... everything should be + set up already */ + if (init == 0) return; - /* Now work on filling in swig_module.types */ -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: size %d\n", swig_module.size); -#endif + /* Now work on filling in swig_module.types */ +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: size %d\n", swig_module.size); +#endif for (i = 0; i < swig_module.size; ++i) { - swig_type_info *type = 0; - swig_type_info *ret; - swig_cast_info *cast; + swig_type_info *type = 0; + swig_type_info *ret; + swig_cast_info *cast; -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); -#endif +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); +#endif - /* if there is another module already loaded */ + /* if there is another module already loaded */ if (swig_module.next != &swig_module) { - type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name); - } + type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name); + } if (type) { - /* Overwrite clientdata field */ -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: found type %s\n", type->name); -#endif + /* Overwrite clientdata field */ +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: found type %s\n", type->name); +#endif if (swig_module.type_initial[i]->clientdata) { - type->clientdata = swig_module.type_initial[i]->clientdata; -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name); -#endif - } + type->clientdata = swig_module.type_initial[i]->clientdata; +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name); +#endif + } } else { - type = swig_module.type_initial[i]; - } + type = swig_module.type_initial[i]; + } - /* Insert casting types */ - cast = swig_module.cast_initial[i]; + /* Insert casting types */ + cast = swig_module.cast_initial[i]; while (cast->type) { - /* Don't need to add information already in the list */ - ret = 0; -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: look cast %s\n", cast->type->name); -#endif + /* Don't need to add information already in the list */ + ret = 0; +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: look cast %s\n", cast->type->name); +#endif if (swig_module.next != &swig_module) { - ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name); -#ifdef SWIGRUNTIME_DEBUG - if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name); -#endif - } + ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name); +#ifdef SWIGRUNTIME_DEBUG + if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name); +#endif + } if (ret) { if (type == swig_module.type_initial[i]) { -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: skip old type %s\n", ret->name); -#endif - cast->type = ret; - ret = 0; +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: skip old type %s\n", ret->name); +#endif + cast->type = ret; + ret = 0; } else { - /* Check for casting already in the list */ - swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type); -#ifdef SWIGRUNTIME_DEBUG - if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name); -#endif - if (!ocast) ret = 0; - } - } + /* Check for casting already in the list */ + swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type); +#ifdef SWIGRUNTIME_DEBUG + if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name); +#endif + if (!ocast) ret = 0; + } + } if (!ret) { -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name); -#endif +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name); +#endif if (type->cast) { - type->cast->prev = cast; - cast->next = type->cast; - } - type->cast = cast; - } - cast++; - } - /* Set entry in modules->types array equal to the type */ - swig_module.types[i] = type; - } - swig_module.types[i] = 0; + type->cast->prev = cast; + cast->next = type->cast; + } + type->cast = cast; + } + cast++; + } + /* Set entry in modules->types array equal to the type */ + swig_module.types[i] = type; + } + swig_module.types[i] = 0; -#ifdef SWIGRUNTIME_DEBUG - printf("**** SWIG_InitializeModule: Cast List ******\n"); +#ifdef SWIGRUNTIME_DEBUG + printf("**** SWIG_InitializeModule: Cast List ******\n"); for (i = 0; i < swig_module.size; ++i) { - int j = 0; - swig_cast_info *cast = swig_module.cast_initial[i]; - printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); + int j = 0; + swig_cast_info *cast = swig_module.cast_initial[i]; + printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); while (cast->type) { - printf("SWIG_InitializeModule: cast type %s\n", cast->type->name); - cast++; - ++j; - } - printf("---- Total casts: %d\n",j); - } - printf("**** SWIG_InitializeModule: Cast List ******\n"); -#endif -} + printf("SWIG_InitializeModule: cast type %s\n", cast->type->name); + cast++; + ++j; + } + printf("---- Total casts: %d\n",j); + } + printf("**** SWIG_InitializeModule: Cast List ******\n"); +#endif +} -/* This function will propagate the clientdata field of type to -* any new swig_type_info structures that have been added into the list -* of equivalent types. It is like calling -* SWIG_TypeClientData(type, clientdata) a second time. -*/ -SWIGRUNTIME void +/* This function will propagate the clientdata field of type to +* any new swig_type_info structures that have been added into the list +* of equivalent types. It is like calling +* SWIG_TypeClientData(type, clientdata) a second time. +*/ +SWIGRUNTIME void SWIG_PropagateClientData(void) { - size_t i; - swig_cast_info *equiv; - static int init_run = 0; + size_t i; + swig_cast_info *equiv; + static int init_run = 0; - if (init_run) return; - init_run = 1; + if (init_run) return; + init_run = 1; for (i = 0; i < swig_module.size; i++) { if (swig_module.types[i]->clientdata) { - equiv = swig_module.types[i]->cast; + equiv = swig_module.types[i]->cast; while (equiv) { if (!equiv->converter) { - if (equiv->type && !equiv->type->clientdata) - SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata); - } - equiv = equiv->next; - } - } - } -} + if (equiv->type && !equiv->type->clientdata) + SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata); + } + equiv = equiv->next; + } + } + } +} -#ifdef __cplusplus -#if 0 +#ifdef __cplusplus +#if 0 { - /* c-mode */ -#endif -} -#endif + /* c-mode */ +#endif +} +#endif @@ -7116,11 +7142,9 @@ extern "C" { SWIGINTERN int swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) { - char *tmp; PyObject *str = swig_varlink_str(v); fprintf(fp,"Swig global variables "); - fprintf(fp,"%s\n", tmp = SWIG_Python_str_AsChar(str)); - SWIG_Python_str_DelForPy3(tmp); + fprintf(fp,"%s\n", SWIG_Python_str_AsChar(str)); Py_DECREF(str); return 0; } @@ -7188,7 +7212,7 @@ extern "C" { (char *)"swigvarlink", /* Type name (tp_name) */ sizeof(swig_varlinkobject), /* Basic size (tp_basicsize) */ 0, /* Itemsize (tp_itemsize) */ - (destructor) swig_varlink_dealloc, /* Deallocator (tp_dealloc) */ + (destructor) swig_varlink_dealloc, /* Deallocator (tp_dealloc) */ (printfunc) swig_varlink_print, /* Print (tp_print) */ (getattrfunc) swig_varlink_getattr, /* get attr (tp_getattr) */ (setattrfunc) swig_varlink_setattr, /* Set attr (tp_setattr) */ @@ -7199,7 +7223,7 @@ extern "C" { 0, /* tp_as_mapping */ 0, /* tp_hash */ 0, /* tp_call */ - (reprfunc) swig_varlink_str, /* tp_str */ + (reprfunc)swig_varlink_str, /* tp_str */ 0, /* tp_getattro */ 0, /* tp_setattro */ 0, /* tp_as_buffer */ @@ -7220,7 +7244,7 @@ extern "C" { #endif }; varlink_type = tmp; - /* for Python 3 we already assigned ob_type in PyVarObject_HEAD_INIT() */ + /* for Python 3 we already assigned the ob_type in PyVarObject_HEAD_INIT() */ #if PY_VERSION_HEX < 0x03000000 varlink_type.ob_type = &PyType_Type; #endif @@ -7356,7 +7380,10 @@ PyObject* void #endif SWIG_init(void) { - PyObject *m, *d; + PyObject *m, *d; + + /* Fix SwigMethods to carry the callback ptrs when needed */ + SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial); #if PY_VERSION_HEX >= 0x03000000 static struct PyModuleDef SWIG_module = { PyModuleDef_HEAD_INIT, @@ -7369,12 +7396,7 @@ SWIG_init(void) { NULL, NULL }; -#endif - /* Fix SwigMethods to carry the callback ptrs when needed */ - SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial); - -#if PY_VERSION_HEX >= 0x03000000 m = PyModule_Create(&SWIG_module); #else m = Py_InitModule((char *) SWIG_name, SwigMethods); diff --git a/trunk/bindings/python/tinyWRAP_wrap.h b/trunk/bindings/python/tinyWRAP_wrap.h index 3d7e36fd..bcefc495 100644 --- a/trunk/bindings/python/tinyWRAP_wrap.h +++ b/trunk/bindings/python/tinyWRAP_wrap.h @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make diff --git a/trunk/bindings/vs_2005/csharp/test/Form1.cs b/trunk/bindings/vs_2005/csharp/test/Form1.cs index f2847488..d8d200e2 100644 --- a/trunk/bindings/vs_2005/csharp/test/Form1.cs +++ b/trunk/bindings/vs_2005/csharp/test/Form1.cs @@ -42,7 +42,7 @@ namespace test "" + "" + "" + - "http://www.mercuro.net" + + "http://doubango.org" + "Come share with me RCS Experience" + "" + "" + @@ -126,7 +126,7 @@ namespace test this.pubSession = new PublicationSession(stack); this.pubSession.addHeader("Content-Type", "application/pidf+xml"); this.pubSession.addHeader("Event", "presence"); - this.regSession.setExpires(30); + this.pubSession.setExpires(30); byte[] payload = Encoding.UTF8.GetBytes(PUBLISH_PAYLOAD); this.pubSession.Publish(payload, (uint)payload.Length); diff --git a/trunk/tinySIP/include/tinysip/tsip_message.h b/trunk/tinySIP/include/tinysip/tsip_message.h index 57ae480e..f26339a4 100644 --- a/trunk/tinySIP/include/tinysip/tsip_message.h +++ b/trunk/tinySIP/include/tinysip/tsip_message.h @@ -69,12 +69,13 @@ TSIP_BEGIN_DECLS #define TSIP_REQUEST_METHOD(self) ((self)->line.request.method) #define TSIP_REQUEST_URI(self) ((self)->line.request.uri) -#define TSIP_MESSAGE_CSEQ_METHOD(self) ((self)->CSeq ? (self)->CSeq->method : tsk_null) -#define TSIP_MESSAGE_HAS_CONTENT(self) ((self) && (self)->Content && (self)->Content->data) -#define TSIP_MESSAGE_CONTENT_LENGTH(self) (uint32_t)(((self) && (self)->Content_Length) ? (self)->Content_Length->length : 0) -#define TSIP_MESSAGE_CONTENT_DATA(self) (TSIP_MESSAGE_HAS_CONTENT(self) ? (self)->Content->data : tsk_null) -#define TSIP_MESSAGE_CONTENT(self) (TSIP_MESSAGE_HAS_CONTENT(self) ? (self)->Content : tsk_null) -#define TSIP_MESSAGE_CONTENT_TYPE(self) (((self) && (self)->Content_Type) ? (self)->Content_Type->type : tsk_null) +#define TSIP_MESSAGE_CSEQ_METHOD(self) ((self)->CSeq ? (self)->CSeq->method : tsk_null) +#define TSIP_MESSAGE_HAS_CONTENT(self) ((self) && (self)->Content && (self)->Content->data) +#define TSIP_MESSAGE_CONTENT_LENGTH(self) (uint32_t)(((self) && (self)->Content_Length) ? (self)->Content_Length->length : 0) +#define TSIP_MESSAGE_CONTENT_DATA(self) (TSIP_MESSAGE_HAS_CONTENT(self) ? (self)->Content->data : tsk_null) +#define TSIP_MESSAGE_CONTENT_DATA_LENGTH(self) (TSIP_MESSAGE_HAS_CONTENT(self) ? (self)->Content->size : 0) +#define TSIP_MESSAGE_CONTENT(self) (TSIP_MESSAGE_HAS_CONTENT(self) ? (self)->Content : tsk_null) +#define TSIP_MESSAGE_CONTENT_TYPE(self) (((self) && (self)->Content_Type) ? (self)->Content_Type->type : tsk_null) #define TSIP_REQUEST_IS_ACK(self) ((self) &&((self)->line.request.request_type==tsip_ACK)) #define TSIP_REQUEST_IS_BYE(self) ((self) &&((self)->line.request.request_type==tsip_BYE))