From b149a0618be345efd4522382234970574ec2cf2c Mon Sep 17 00:00:00 2001 From: bossiel Date: Tue, 1 Jun 2010 13:43:31 +0000 Subject: [PATCH] Add support for stack events. --- .../_common/{SipDebug.cxx => DDebug.cxx} | 43 +- .../bindings/_common/{SipDebug.h => DDebug.h} | 6 +- trunk/bindings/_common/SipCallback.h | 4 + trunk/bindings/_common/SipEvent.cxx | 15 +- trunk/bindings/_common/SipEvent.h | 12 + trunk/bindings/_common/SipStack.cxx | 41 +- trunk/bindings/_common/SipStack.h | 8 +- trunk/bindings/_common/SipStack.i | 3 - trunk/bindings/_common/tinyWRAP.i | 11 + trunk/bindings/autogen.sh | 2 +- trunk/bindings/csharp/DDebugCallback.cs | 66 + trunk/bindings/csharp/DialogEvent.cs | 12 +- trunk/bindings/csharp/MessagingEvent.cs | 12 +- trunk/bindings/csharp/MessagingSession.cs | 12 +- trunk/bindings/csharp/OptionsEvent.cs | 12 +- trunk/bindings/csharp/OptionsSession.cs | 12 +- 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 | 58 +- trunk/bindings/csharp/SipDebugCallback.cs | 113 - trunk/bindings/csharp/SipEvent.cs | 12 +- trunk/bindings/csharp/SipMessage.cs | 12 +- trunk/bindings/csharp/SipSession.cs | 12 +- trunk/bindings/csharp/SipStack.cs | 16 +- trunk/bindings/csharp/SipUri.cs | 12 +- trunk/bindings/csharp/StackEvent.cs | 42 + trunk/bindings/csharp/SubscriptionEvent.cs | 12 +- trunk/bindings/csharp/SubscriptionSession.cs | 12 +- trunk/bindings/csharp/tinyWRAP.cs | 8 +- trunk/bindings/csharp/tinyWRAPPINVOKE.cs | 83 +- trunk/bindings/csharp/tinyWRAP_wrap.cxx | 729 +- trunk/bindings/csharp/tinyWRAP_wrap.h | 41 +- trunk/bindings/csharp/tsip_event_type_t.cs | 2 +- .../csharp/tsip_message_event_type_t.cs | 2 +- .../csharp/tsip_options_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/DDebugCallback.java | 58 + trunk/bindings/java/DialogEvent.java | 12 +- trunk/bindings/java/MessagingEvent.java | 12 +- trunk/bindings/java/MessagingSession.java | 12 +- trunk/bindings/java/OptionsEvent.java | 12 +- trunk/bindings/java/OptionsSession.java | 12 +- 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 | 16 +- trunk/bindings/java/SipDebugCallback.java | 72 - trunk/bindings/java/SipEvent.java | 12 +- trunk/bindings/java/SipMessage.java | 12 +- trunk/bindings/java/SipSession.java | 12 +- trunk/bindings/java/SipStack.java | 16 +- trunk/bindings/java/SipUri.java | 12 +- trunk/bindings/java/StackEvent.java | 38 + trunk/bindings/java/SubscriptionEvent.java | 12 +- trunk/bindings/java/SubscriptionSession.java | 12 +- .../bindings/java/android/DDebugCallback.java | 58 + trunk/bindings/java/android/DialogEvent.java | 12 +- .../bindings/java/android/MessagingEvent.java | 12 +- .../java/android/MessagingSession.java | 12 +- trunk/bindings/java/android/OptionsEvent.java | 12 +- .../bindings/java/android/OptionsSession.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 | 16 +- .../java/android/SipDebugCallback.java | 72 - trunk/bindings/java/android/SipEvent.java | 12 +- trunk/bindings/java/android/SipMessage.java | 12 +- trunk/bindings/java/android/SipSession.java | 12 +- trunk/bindings/java/android/SipStack.java | 16 +- trunk/bindings/java/android/SipUri.java | 12 +- trunk/bindings/java/android/StackEvent.java | 38 + .../java/android/SubscriptionEvent.java | 12 +- .../java/android/SubscriptionSession.java | 12 +- trunk/bindings/java/android/droid-makefile | 4 +- trunk/bindings/java/android/tinyWRAP.java | 2 +- .../java/android/tinyWRAPConstants.java | 8 +- trunk/bindings/java/android/tinyWRAPJNI.java | 41 +- trunk/bindings/java/android/tinyWRAP_wrap.cxx | 638 +- trunk/bindings/java/android/tinyWRAP_wrap.h | 25 +- .../java/android/tsip_event_type_t.java | 2 +- .../android/tsip_message_event_type_t.java | 2 +- .../android/tsip_options_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/tinyWRAP.java | 2 +- trunk/bindings/java/tinyWRAPConstants.java | 8 +- trunk/bindings/java/tinyWRAPJNI.java | 41 +- trunk/bindings/java/tinyWRAP_wrap.cxx | 1236 ++- trunk/bindings/java/tinyWRAP_wrap.h | 25 +- trunk/bindings/java/tsip_event_type_t.java | 2 +- .../java/tsip_message_event_type_t.java | 2 +- .../java/tsip_options_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 | 122 +- trunk/bindings/perl/tinyWRAP_wrap.cxx | 3985 ++++----- trunk/bindings/python/tinyWRAP.py | 83 +- trunk/bindings/python/tinyWRAP_wrap.cxx | 7405 ++++++++--------- trunk/bindings/python/tinyWRAP_wrap.h | 53 +- trunk/bindings/vs_2005/csharp/test/Form1.cs | 8 +- .../bindings/vs_2005/csharp/test/test.csproj | 30 +- trunk/bindings/vs_2005/csharp/tinyWRAP.vcproj | 60 +- trunk/tinyNET/src/tnet_socket.c | 2 +- .../src/transactions/tsip_transac_nict.c | 2 +- .../src/transports/tsip_transport_layer.c | 7 +- trunk/tinySIP/src/tsip.c | 201 +- trunk/vs_2005/tinyXCAP/tinyXCAP.vcproj | 2 +- 119 files changed, 8052 insertions(+), 8251 deletions(-) rename trunk/bindings/_common/{SipDebug.cxx => DDebug.cxx} (61%) rename trunk/bindings/_common/{SipDebug.h => DDebug.h} (91%) create mode 100644 trunk/bindings/csharp/DDebugCallback.cs delete mode 100644 trunk/bindings/csharp/SipDebugCallback.cs create mode 100644 trunk/bindings/csharp/StackEvent.cs create mode 100644 trunk/bindings/java/DDebugCallback.java delete mode 100644 trunk/bindings/java/SipDebugCallback.java create mode 100644 trunk/bindings/java/StackEvent.java create mode 100644 trunk/bindings/java/android/DDebugCallback.java delete mode 100644 trunk/bindings/java/android/SipDebugCallback.java create mode 100644 trunk/bindings/java/android/StackEvent.java diff --git a/trunk/bindings/_common/SipDebug.cxx b/trunk/bindings/_common/DDebug.cxx similarity index 61% rename from trunk/bindings/_common/SipDebug.cxx rename to trunk/bindings/_common/DDebug.cxx index c4ff2d76..180a4e0c 100644 --- a/trunk/bindings/_common/SipDebug.cxx +++ b/trunk/bindings/_common/DDebug.cxx @@ -19,12 +19,17 @@ * along with DOUBANGO. * */ -#include "SipDebug.h" +#include "DDebug.h" #include "SipStack.h" #include "Common.h" +#if ANDROID /* callbacks will fail with jni */ +# include +# define ANDROID_DEBUG_TAG "tinyWRAP" +#endif + /* Very Important ==> never call functions which could raise debug callbacks into callback functions * Callbacks should not used with Android (JNI). */ @@ -51,16 +56,36 @@ int debug_xxx_cb(const void* arg, const char* fmt, enum cb_type type, va_list *a switch(type){ case cb_info: - ret = stack->getDebugCallback()-> OnDebugInfo(message); + ret= +#if ANDROID + __android_log_write(ANDROID_LOG_INFO, ANDROID_DEBUG_TAG, message); +#else + stack->getDebugCallback()-> OnDebugInfo(message); +#endif break; case cb_warn: - ret = stack->getDebugCallback()-> OnDebugWarn(message); + ret= +#if ANDROID + __android_log_write(ANDROID_LOG_WARN, ANDROID_DEBUG_TAG, message); +#else + stack->getDebugCallback()-> OnDebugWarn(message); +#endif break; case cb_error: - ret = stack->getDebugCallback()-> OnDebugError(message); + ret= +#if ANDROID + __android_log_write(ANDROID_LOG_ERROR, ANDROID_DEBUG_TAG, message); +#else + stack->getDebugCallback()-> OnDebugError(message); +#endif break; case cb_fatal: - ret = stack->getDebugCallback()-> OnDebugFatal(message); + ret= +#if ANDROID + __android_log_write(ANDROID_LOG_FATAL, ANDROID_DEBUG_TAG, message); +#else + stack->getDebugCallback()-> OnDebugFatal(message); +#endif break; } @@ -70,7 +95,7 @@ int debug_xxx_cb(const void* arg, const char* fmt, enum cb_type type, va_list *a return ret; } -int SipDebugCallback::debug_info_cb(const void* arg, const char* fmt, ...) +int DDebugCallback::debug_info_cb(const void* arg, const char* fmt, ...) { va_list ap; int ret; @@ -82,7 +107,7 @@ int SipDebugCallback::debug_info_cb(const void* arg, const char* fmt, ...) return ret; } -int SipDebugCallback::debug_warn_cb(const void* arg, const char* fmt, ...){ +int DDebugCallback::debug_warn_cb(const void* arg, const char* fmt, ...){ va_list ap; int ret; @@ -93,7 +118,7 @@ int SipDebugCallback::debug_warn_cb(const void* arg, const char* fmt, ...){ return ret; } -int SipDebugCallback::debug_error_cb(const void* arg, const char* fmt, ...){ +int DDebugCallback::debug_error_cb(const void* arg, const char* fmt, ...){ va_list ap; int ret; @@ -104,7 +129,7 @@ int SipDebugCallback::debug_error_cb(const void* arg, const char* fmt, ...){ return ret; } -int SipDebugCallback::debug_fatal_cb(const void* arg, const char* fmt, ...){ +int DDebugCallback::debug_fatal_cb(const void* arg, const char* fmt, ...){ va_list ap; int ret; diff --git a/trunk/bindings/_common/SipDebug.h b/trunk/bindings/_common/DDebug.h similarity index 91% rename from trunk/bindings/_common/SipDebug.h rename to trunk/bindings/_common/DDebug.h index 37569b40..cb7b3308 100644 --- a/trunk/bindings/_common/SipDebug.h +++ b/trunk/bindings/_common/DDebug.h @@ -22,11 +22,11 @@ #ifndef TINYWRAP_SIP_DEBUG_H #define TINYWRAP_SIP_DEBUG_H -class SipDebugCallback +class DDebugCallback { public: - SipDebugCallback() { } - virtual ~SipDebugCallback() {} + DDebugCallback() { } + virtual ~DDebugCallback() {} virtual int OnDebugInfo(const char* message) { return -1; } diff --git a/trunk/bindings/_common/SipCallback.h b/trunk/bindings/_common/SipCallback.h index da19682c..e352e276 100644 --- a/trunk/bindings/_common/SipCallback.h +++ b/trunk/bindings/_common/SipCallback.h @@ -23,6 +23,8 @@ #define TINYWRAP_SIPCALLBACK_H class DialogEvent; +class StackEvent; + class MessagingEvent; class OptionsEvent; class PublicationEvent; @@ -35,6 +37,8 @@ public: SipCallback() { } virtual ~SipCallback() {} virtual int OnDialogEvent(const DialogEvent* e) { return -1; } + virtual int OnStackEvent(const StackEvent* e) { return -1; } + virtual int OnMessagingEvent(const MessagingEvent* e) { return -1; } virtual int OnOptionsEvent(const OptionsEvent* e) { return -1; } virtual int OnPublicationEvent(const PublicationEvent* e) { return -1; } diff --git a/trunk/bindings/_common/SipEvent.cxx b/trunk/bindings/_common/SipEvent.cxx index 784ba360..884b781a 100644 --- a/trunk/bindings/_common/SipEvent.cxx +++ b/trunk/bindings/_common/SipEvent.cxx @@ -74,13 +74,16 @@ const SipMessage* SipEvent::getSipMessage() const /* ======================== DialogEvent ========================*/ DialogEvent::DialogEvent(const tsip_event_t *_sipevent) -:SipEvent(_sipevent) -{ -} +:SipEvent(_sipevent){ } -DialogEvent::~DialogEvent() -{ -} +DialogEvent::~DialogEvent(){ } + + +/* ======================== DialogEvent ========================*/ +StackEvent::StackEvent(const tsip_event_t *_sipevent) +:SipEvent(_sipevent){ } + +StackEvent::~StackEvent(){ } diff --git a/trunk/bindings/_common/SipEvent.h b/trunk/bindings/_common/SipEvent.h index aeac1aac..95594b3c 100644 --- a/trunk/bindings/_common/SipEvent.h +++ b/trunk/bindings/_common/SipEvent.h @@ -67,6 +67,18 @@ public: public: /* Public API functions */ }; +/* ======================== StackEvent ========================*/ +class StackEvent: public SipEvent +{ +public: +#if !defined(SWIG) + StackEvent(const tsip_event_t *sipevent); +#endif + virtual ~StackEvent(); + +public: /* Public API functions */ +}; + /* ======================== MessagingEvent ========================*/ class MessagingEvent: public SipEvent diff --git a/trunk/bindings/_common/SipStack.cxx b/trunk/bindings/_common/SipStack.cxx index 6714d661..aae35cc2 100644 --- a/trunk/bindings/_common/SipStack.cxx +++ b/trunk/bindings/_common/SipStack.cxx @@ -24,7 +24,7 @@ #include "SipSession.h" #include "SipEvent.h" -#include "SipDebug.h" +#include "DDebug.h" #include "Common.h" @@ -83,14 +83,14 @@ bool SipStack::start() return (ret == 0); } -bool SipStack::setDebugCallback(SipDebugCallback* callback) +bool SipStack::setDebugCallback(DDebugCallback* callback) { if((this->debugCallback = callback)){ tsk_debug_set_arg_data(this); - tsk_debug_set_info_cb(SipDebugCallback::debug_info_cb); - tsk_debug_set_warn_cb(SipDebugCallback::debug_warn_cb); - tsk_debug_set_error_cb(SipDebugCallback::debug_error_cb); - tsk_debug_set_fatal_cb(SipDebugCallback::debug_fatal_cb); + tsk_debug_set_info_cb(DDebugCallback::debug_info_cb); + tsk_debug_set_warn_cb(DDebugCallback::debug_warn_cb); + tsk_debug_set_error_cb(DDebugCallback::debug_error_cb); + tsk_debug_set_fatal_cb(DDebugCallback::debug_fatal_cb); return true; } @@ -213,7 +213,7 @@ SipCallback* SipStack::getCallback()const return this->callback; } -SipDebugCallback* SipStack::getDebugCallback() const +DDebugCallback* SipStack::getDebugCallback() const { return this->debugCallback; } @@ -228,12 +228,18 @@ int stack_callback(const tsip_event_t *sipevent) TSK_DEBUG_WARN("Null SIP event."); return -1; } - else{ - /* retrive the stack from the context */ - const void* userdata; - const tsip_stack_handle_t* stack_handle = tsip_ssession_get_stack(sipevent->ss); - if(stack_handle && (userdata = tsip_stack_get_userdata(stack_handle))){ - Stack = dyn_cast((const SipStack*)userdata); + else { + if(sipevent->type == tsip_event_stack && sipevent->userdata){ + /* sessionless event */ + Stack = dyn_cast((const SipStack*)sipevent->userdata); + } + else { + const void* userdata; + /* gets the stack from the session */ + const tsip_stack_handle_t* stack_handle = tsip_ssession_get_stack(sipevent->ss); + if(stack_handle && (userdata = tsip_stack_get_userdata(stack_handle))){ + Stack = dyn_cast((const SipStack*)userdata); + } } } @@ -299,6 +305,15 @@ int stack_callback(const tsip_event_t *sipevent) break; } + case tsip_event_stack: + { /* Stack event */ + if(Stack->getCallback()){ + e = new StackEvent(sipevent); + Stack->getCallback()->OnStackEvent((const StackEvent*)e); + } + break; + } + default: { /* Unsupported */ TSK_DEBUG_WARN("%d not supported as SIP event.", sipevent->type); diff --git a/trunk/bindings/_common/SipStack.h b/trunk/bindings/_common/SipStack.h index e2b032ba..22304505 100644 --- a/trunk/bindings/_common/SipStack.h +++ b/trunk/bindings/_common/SipStack.h @@ -27,7 +27,7 @@ #include "tinysip.h" -class SipDebugCallback; +class DDebugCallback; class SipStack: public SafeObject { @@ -37,7 +37,7 @@ public: /* ctor() and dtor() */ public: /* API functions */ bool start(); - bool setDebugCallback(SipDebugCallback* callback); + bool setDebugCallback(DDebugCallback* callback); bool setRealm(const char* realm_uri); bool setIMPI(const char* impi); bool setIMPU(const char* impu_uri); @@ -58,12 +58,12 @@ public: /* Public helper function */ #if !defined(SWIG) tsip_stack_handle_t* getHandle()const; SipCallback* getCallback()const; - SipDebugCallback* getDebugCallback() const; + DDebugCallback* getDebugCallback() const; #endif private: SipCallback* callback; - SipDebugCallback* debugCallback; + DDebugCallback* debugCallback; tsip_stack_handle_t *handle; static unsigned count; diff --git a/trunk/bindings/_common/SipStack.i b/trunk/bindings/_common/SipStack.i index 8638e39c..2a2288fa 100644 --- a/trunk/bindings/_common/SipStack.i +++ b/trunk/bindings/_common/SipStack.i @@ -6,13 +6,11 @@ #include "SipSession.h" #include "SipCallback.h" -#include "SipDebug.h" #include "SafeObject.h" #include "SipStack.h" %} /* turn on director wrapping Callback */ -%feature("director") SipDebugCallback; %feature("director") SipCallback; @@ -23,7 +21,6 @@ %include "SipSession.h" %include "SipCallback.h" -%include "SipDebug.h" %include "SafeObject.h" %include "SipStack.h" %clearnodefaultctor; diff --git a/trunk/bindings/_common/tinyWRAP.i b/trunk/bindings/_common/tinyWRAP.i index 1f687ec1..ab6d7c24 100644 --- a/trunk/bindings/_common/tinyWRAP.i +++ b/trunk/bindings/_common/tinyWRAP.i @@ -1,6 +1,17 @@ /* File : tinyWRAP.i */ %module(directors="1") tinyWRAP +%{ +#include "DDebug.h" +%} + +%nodefaultctor; +%include "DDebug.h" +%clearnodefaultctor; + + +%feature("director") DDebugCallback; + %newobject getSipHeaderValue; %newobject getSipHeaderParamValue; // don't seem to work diff --git a/trunk/bindings/autogen.sh b/trunk/bindings/autogen.sh index 67427695..c3bf8077 100644 --- a/trunk/bindings/autogen.sh +++ b/trunk/bindings/autogen.sh @@ -11,7 +11,7 @@ swig -c++ -java -package org.doubango.tinyWRAP -outdir java/android -o java/andr sed -i 's/dynamic_cast/static_cast/g' java/android/tinyWRAP_wrap.cxx sed -i 's/AttachCurrentThread((void \*\*)/AttachCurrentThread((JNIEnv \*\*)/g' java/android/tinyWRAP_wrap.cxx sed -i 's/_director_connect(this, swigCPtr, swigCMemOwn, true)/_director_connect(this, swigCPtr, swigCMemOwn, false)/g' java/android/SipCallback.java -sed -i 's/_director_connect(this, swigCPtr, swigCMemOwn, true)/_director_connect(this, swigCPtr, swigCMemOwn, false)/g' java/android/SipDebugCallback.java +sed -i 's/_director_connect(this, swigCPtr, swigCMemOwn, true)/_director_connect(this, swigCPtr, swigCMemOwn, false)/g' java/android/DDebugCallback.java ##### Python diff --git a/trunk/bindings/csharp/DDebugCallback.cs b/trunk/bindings/csharp/DDebugCallback.cs new file mode 100644 index 00000000..6d004588 --- /dev/null +++ b/trunk/bindings/csharp/DDebugCallback.cs @@ -0,0 +1,66 @@ +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 1.3.40 + * + * Do not make changes to this file unless you know what you are doing--modify + * the SWIG interface file instead. + * ----------------------------------------------------------------------------- */ + + +using System; +using System.Runtime.InteropServices; + +public class DDebugCallback : IDisposable { + private HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal DDebugCallback(IntPtr cPtr, bool cMemoryOwn) { + swigCMemOwn = cMemoryOwn; + swigCPtr = new HandleRef(this, cPtr); + } + + internal static HandleRef getCPtr(DDebugCallback obj) { + return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr; + } + + ~DDebugCallback() { + Dispose(); + } + + public virtual void Dispose() { + lock(this) { + if (swigCPtr.Handle != IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_DDebugCallback(swigCPtr); + } + swigCPtr = new HandleRef(null, IntPtr.Zero); + } + GC.SuppressFinalize(this); + } + } + + public DDebugCallback() : this(tinyWRAPPINVOKE.new_DDebugCallback(), true) { + } + + public virtual int OnDebugInfo(string message) { + int ret = tinyWRAPPINVOKE.DDebugCallback_OnDebugInfo(swigCPtr, message); + return ret; + } + + public virtual int OnDebugWarn(string message) { + int ret = tinyWRAPPINVOKE.DDebugCallback_OnDebugWarn(swigCPtr, message); + return ret; + } + + public virtual int OnDebugError(string message) { + int ret = tinyWRAPPINVOKE.DDebugCallback_OnDebugError(swigCPtr, message); + return ret; + } + + public virtual int OnDebugFatal(string message) { + int ret = tinyWRAPPINVOKE.DDebugCallback_OnDebugFatal(swigCPtr, message); + return ret; + } + +} diff --git a/trunk/bindings/csharp/DialogEvent.cs b/trunk/bindings/csharp/DialogEvent.cs index 6983e2a9..4fb2041f 100644 --- a/trunk/bindings/csharp/DialogEvent.cs +++ b/trunk/bindings/csharp/DialogEvent.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.39 + * Version 1.3.40 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -27,11 +27,13 @@ public class DialogEvent : SipEvent { public override void Dispose() { lock(this) { - if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_DialogEvent(swigCPtr); + if (swigCPtr.Handle != IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_DialogEvent(swigCPtr); + } + swigCPtr = new HandleRef(null, IntPtr.Zero); } - swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); base.Dispose(); } diff --git a/trunk/bindings/csharp/MessagingEvent.cs b/trunk/bindings/csharp/MessagingEvent.cs index b4a52054..d291acc0 100644 --- a/trunk/bindings/csharp/MessagingEvent.cs +++ b/trunk/bindings/csharp/MessagingEvent.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.39 + * Version 1.3.40 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -27,11 +27,13 @@ public class MessagingEvent : SipEvent { public override void Dispose() { lock(this) { - if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_MessagingEvent(swigCPtr); + if (swigCPtr.Handle != IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_MessagingEvent(swigCPtr); + } + swigCPtr = new HandleRef(null, IntPtr.Zero); } - swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); base.Dispose(); } diff --git a/trunk/bindings/csharp/MessagingSession.cs b/trunk/bindings/csharp/MessagingSession.cs index 3cccc870..eddddf76 100644 --- a/trunk/bindings/csharp/MessagingSession.cs +++ b/trunk/bindings/csharp/MessagingSession.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.39 + * Version 1.3.40 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -27,11 +27,13 @@ public class MessagingSession : SipSession { public override void Dispose() { lock(this) { - if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_MessagingSession(swigCPtr); + if (swigCPtr.Handle != IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_MessagingSession(swigCPtr); + } + swigCPtr = new HandleRef(null, IntPtr.Zero); } - swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); base.Dispose(); } diff --git a/trunk/bindings/csharp/OptionsEvent.cs b/trunk/bindings/csharp/OptionsEvent.cs index 3c15eb59..562d6978 100644 --- a/trunk/bindings/csharp/OptionsEvent.cs +++ b/trunk/bindings/csharp/OptionsEvent.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.39 + * Version 1.3.40 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -27,11 +27,13 @@ public class OptionsEvent : SipEvent { public override void Dispose() { lock(this) { - if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_OptionsEvent(swigCPtr); + if (swigCPtr.Handle != IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_OptionsEvent(swigCPtr); + } + swigCPtr = new HandleRef(null, IntPtr.Zero); } - swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); base.Dispose(); } diff --git a/trunk/bindings/csharp/OptionsSession.cs b/trunk/bindings/csharp/OptionsSession.cs index 8968878a..6d1cc6a7 100644 --- a/trunk/bindings/csharp/OptionsSession.cs +++ b/trunk/bindings/csharp/OptionsSession.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.39 + * Version 1.3.40 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -27,11 +27,13 @@ public class OptionsSession : SipSession { public override void Dispose() { lock(this) { - if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_OptionsSession(swigCPtr); + if (swigCPtr.Handle != IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_OptionsSession(swigCPtr); + } + swigCPtr = new HandleRef(null, IntPtr.Zero); } - swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); base.Dispose(); } diff --git a/trunk/bindings/csharp/PublicationEvent.cs b/trunk/bindings/csharp/PublicationEvent.cs index 47d61790..21edf91b 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.39 + * Version 1.3.40 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -27,11 +27,13 @@ public class PublicationEvent : SipEvent { public override void Dispose() { lock(this) { - if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_PublicationEvent(swigCPtr); + if (swigCPtr.Handle != IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_PublicationEvent(swigCPtr); + } + swigCPtr = new HandleRef(null, IntPtr.Zero); } - 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 16f51f1f..d13a7d83 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.39 + * Version 1.3.40 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -27,11 +27,13 @@ public class PublicationSession : SipSession { public override void Dispose() { lock(this) { - if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_PublicationSession(swigCPtr); + if (swigCPtr.Handle != IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_PublicationSession(swigCPtr); + } + swigCPtr = new HandleRef(null, IntPtr.Zero); } - 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 f2580182..9469c7c4 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.39 + * Version 1.3.40 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -27,11 +27,13 @@ public class RegistrationEvent : SipEvent { public override void Dispose() { lock(this) { - if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_RegistrationEvent(swigCPtr); + if (swigCPtr.Handle != IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_RegistrationEvent(swigCPtr); + } + swigCPtr = new HandleRef(null, IntPtr.Zero); } - 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 a4bb38a4..712f1ded 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.39 + * Version 1.3.40 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -27,11 +27,13 @@ public class RegistrationSession : SipSession { public override void Dispose() { lock(this) { - if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_RegistrationSession(swigCPtr); + if (swigCPtr.Handle != IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_RegistrationSession(swigCPtr); + } + swigCPtr = new HandleRef(null, IntPtr.Zero); } - 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 faffa622..1995294d 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.39 + * Version 1.3.40 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -29,11 +29,13 @@ public class SafeObject : IDisposable { public virtual void Dispose() { lock(this) { - if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_SafeObject(swigCPtr); + if (swigCPtr.Handle != IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_SafeObject(swigCPtr); + } + swigCPtr = new HandleRef(null, IntPtr.Zero); } - swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); } } diff --git a/trunk/bindings/csharp/SipCallback.cs b/trunk/bindings/csharp/SipCallback.cs index 5aa9756d..892179e6 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.39 + * Version 1.3.40 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -29,11 +29,13 @@ public class SipCallback : IDisposable { public virtual void Dispose() { lock(this) { - if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_SipCallback(swigCPtr); + if (swigCPtr.Handle != IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_SipCallback(swigCPtr); + } + swigCPtr = new HandleRef(null, IntPtr.Zero); } - swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); } } @@ -47,6 +49,11 @@ public class SipCallback : IDisposable { return ret; } + public virtual int OnStackEvent(StackEvent e) { + int ret = ((this.GetType() == typeof(SipCallback)) ? tinyWRAPPINVOKE.SipCallback_OnStackEvent(swigCPtr, StackEvent.getCPtr(e)) : tinyWRAPPINVOKE.SipCallback_OnStackEventSwigExplicitSipCallback(swigCPtr, StackEvent.getCPtr(e))); + return ret; + } + public virtual int OnMessagingEvent(MessagingEvent e) { int ret = ((this.GetType() == typeof(SipCallback)) ? tinyWRAPPINVOKE.SipCallback_OnMessagingEvent(swigCPtr, MessagingEvent.getCPtr(e)) : tinyWRAPPINVOKE.SipCallback_OnMessagingEventSwigExplicitSipCallback(swigCPtr, MessagingEvent.getCPtr(e))); return ret; @@ -75,17 +82,19 @@ public class SipCallback : IDisposable { private void SwigDirectorConnect() { if (SwigDerivedClassHasMethod("OnDialogEvent", swigMethodTypes0)) swigDelegate0 = new SwigDelegateSipCallback_0(SwigDirectorOnDialogEvent); - if (SwigDerivedClassHasMethod("OnMessagingEvent", swigMethodTypes1)) - swigDelegate1 = new SwigDelegateSipCallback_1(SwigDirectorOnMessagingEvent); - if (SwigDerivedClassHasMethod("OnOptionsEvent", swigMethodTypes2)) - swigDelegate2 = new SwigDelegateSipCallback_2(SwigDirectorOnOptionsEvent); - if (SwigDerivedClassHasMethod("OnPublicationEvent", swigMethodTypes3)) - swigDelegate3 = new SwigDelegateSipCallback_3(SwigDirectorOnPublicationEvent); - if (SwigDerivedClassHasMethod("OnRegistrationEvent", swigMethodTypes4)) - swigDelegate4 = new SwigDelegateSipCallback_4(SwigDirectorOnRegistrationEvent); - if (SwigDerivedClassHasMethod("OnSubscriptionEvent", swigMethodTypes5)) - swigDelegate5 = new SwigDelegateSipCallback_5(SwigDirectorOnSubscriptionEvent); - tinyWRAPPINVOKE.SipCallback_director_connect(swigCPtr, swigDelegate0, swigDelegate1, swigDelegate2, swigDelegate3, swigDelegate4, swigDelegate5); + if (SwigDerivedClassHasMethod("OnStackEvent", swigMethodTypes1)) + swigDelegate1 = new SwigDelegateSipCallback_1(SwigDirectorOnStackEvent); + if (SwigDerivedClassHasMethod("OnMessagingEvent", swigMethodTypes2)) + swigDelegate2 = new SwigDelegateSipCallback_2(SwigDirectorOnMessagingEvent); + if (SwigDerivedClassHasMethod("OnOptionsEvent", swigMethodTypes3)) + swigDelegate3 = new SwigDelegateSipCallback_3(SwigDirectorOnOptionsEvent); + if (SwigDerivedClassHasMethod("OnPublicationEvent", swigMethodTypes4)) + swigDelegate4 = new SwigDelegateSipCallback_4(SwigDirectorOnPublicationEvent); + if (SwigDerivedClassHasMethod("OnRegistrationEvent", swigMethodTypes5)) + swigDelegate5 = new SwigDelegateSipCallback_5(SwigDirectorOnRegistrationEvent); + if (SwigDerivedClassHasMethod("OnSubscriptionEvent", swigMethodTypes6)) + swigDelegate6 = new SwigDelegateSipCallback_6(SwigDirectorOnSubscriptionEvent); + tinyWRAPPINVOKE.SipCallback_director_connect(swigCPtr, swigDelegate0, swigDelegate1, swigDelegate2, swigDelegate3, swigDelegate4, swigDelegate5, swigDelegate6); } private bool SwigDerivedClassHasMethod(string methodName, Type[] methodTypes) { @@ -98,6 +107,10 @@ public class SipCallback : IDisposable { return OnDialogEvent((e == IntPtr.Zero) ? null : new DialogEvent(e, false)); } + private int SwigDirectorOnStackEvent(IntPtr e) { + return OnStackEvent((e == IntPtr.Zero) ? null : new StackEvent(e, false)); + } + private int SwigDirectorOnMessagingEvent(IntPtr e) { return OnMessagingEvent((e == IntPtr.Zero) ? null : new MessagingEvent(e, false)); } @@ -124,6 +137,7 @@ public class SipCallback : IDisposable { public delegate int SwigDelegateSipCallback_3(IntPtr e); public delegate int SwigDelegateSipCallback_4(IntPtr e); public delegate int SwigDelegateSipCallback_5(IntPtr e); + public delegate int SwigDelegateSipCallback_6(IntPtr e); private SwigDelegateSipCallback_0 swigDelegate0; private SwigDelegateSipCallback_1 swigDelegate1; @@ -131,11 +145,13 @@ public class SipCallback : IDisposable { private SwigDelegateSipCallback_3 swigDelegate3; private SwigDelegateSipCallback_4 swigDelegate4; private SwigDelegateSipCallback_5 swigDelegate5; + private SwigDelegateSipCallback_6 swigDelegate6; private static Type[] swigMethodTypes0 = new Type[] { typeof(DialogEvent) }; - private static Type[] swigMethodTypes1 = new Type[] { typeof(MessagingEvent) }; - private static Type[] swigMethodTypes2 = new Type[] { typeof(OptionsEvent) }; - private static Type[] swigMethodTypes3 = new Type[] { typeof(PublicationEvent) }; - private static Type[] swigMethodTypes4 = new Type[] { typeof(RegistrationEvent) }; - private static Type[] swigMethodTypes5 = new Type[] { typeof(SubscriptionEvent) }; + private static Type[] swigMethodTypes1 = new Type[] { typeof(StackEvent) }; + private static Type[] swigMethodTypes2 = new Type[] { typeof(MessagingEvent) }; + private static Type[] swigMethodTypes3 = new Type[] { typeof(OptionsEvent) }; + private static Type[] swigMethodTypes4 = new Type[] { typeof(PublicationEvent) }; + private static Type[] swigMethodTypes5 = new Type[] { typeof(RegistrationEvent) }; + private static Type[] swigMethodTypes6 = new Type[] { typeof(SubscriptionEvent) }; } diff --git a/trunk/bindings/csharp/SipDebugCallback.cs b/trunk/bindings/csharp/SipDebugCallback.cs deleted file mode 100644 index 79f22348..00000000 --- a/trunk/bindings/csharp/SipDebugCallback.cs +++ /dev/null @@ -1,113 +0,0 @@ -/* ---------------------------------------------------------------------------- - * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.39 - * - * Do not make changes to this file unless you know what you are doing--modify - * the SWIG interface file instead. - * ----------------------------------------------------------------------------- */ - - -using System; -using System.Runtime.InteropServices; - -public class SipDebugCallback : IDisposable { - private HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal SipDebugCallback(IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new HandleRef(this, cPtr); - } - - internal static HandleRef getCPtr(SipDebugCallback obj) { - return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr; - } - - ~SipDebugCallback() { - Dispose(); - } - - public virtual void Dispose() { - lock(this) { - if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_SipDebugCallback(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); - GC.SuppressFinalize(this); - } - } - - public SipDebugCallback() : this(tinyWRAPPINVOKE.new_SipDebugCallback(), true) { - SwigDirectorConnect(); - } - - public virtual int OnDebugInfo(string message) { - int ret = ((this.GetType() == typeof(SipDebugCallback)) ? tinyWRAPPINVOKE.SipDebugCallback_OnDebugInfo(swigCPtr, message) : tinyWRAPPINVOKE.SipDebugCallback_OnDebugInfoSwigExplicitSipDebugCallback(swigCPtr, message)); - return ret; - } - - public virtual int OnDebugWarn(string message) { - int ret = ((this.GetType() == typeof(SipDebugCallback)) ? tinyWRAPPINVOKE.SipDebugCallback_OnDebugWarn(swigCPtr, message) : tinyWRAPPINVOKE.SipDebugCallback_OnDebugWarnSwigExplicitSipDebugCallback(swigCPtr, message)); - return ret; - } - - public virtual int OnDebugError(string message) { - int ret = ((this.GetType() == typeof(SipDebugCallback)) ? tinyWRAPPINVOKE.SipDebugCallback_OnDebugError(swigCPtr, message) : tinyWRAPPINVOKE.SipDebugCallback_OnDebugErrorSwigExplicitSipDebugCallback(swigCPtr, message)); - return ret; - } - - public virtual int OnDebugFatal(string message) { - int ret = ((this.GetType() == typeof(SipDebugCallback)) ? tinyWRAPPINVOKE.SipDebugCallback_OnDebugFatal(swigCPtr, message) : tinyWRAPPINVOKE.SipDebugCallback_OnDebugFatalSwigExplicitSipDebugCallback(swigCPtr, message)); - return ret; - } - - private void SwigDirectorConnect() { - if (SwigDerivedClassHasMethod("OnDebugInfo", swigMethodTypes0)) - swigDelegate0 = new SwigDelegateSipDebugCallback_0(SwigDirectorOnDebugInfo); - if (SwigDerivedClassHasMethod("OnDebugWarn", swigMethodTypes1)) - swigDelegate1 = new SwigDelegateSipDebugCallback_1(SwigDirectorOnDebugWarn); - if (SwigDerivedClassHasMethod("OnDebugError", swigMethodTypes2)) - swigDelegate2 = new SwigDelegateSipDebugCallback_2(SwigDirectorOnDebugError); - if (SwigDerivedClassHasMethod("OnDebugFatal", swigMethodTypes3)) - swigDelegate3 = new SwigDelegateSipDebugCallback_3(SwigDirectorOnDebugFatal); - tinyWRAPPINVOKE.SipDebugCallback_director_connect(swigCPtr, swigDelegate0, swigDelegate1, swigDelegate2, swigDelegate3); - } - - private bool SwigDerivedClassHasMethod(string methodName, Type[] methodTypes) { - System.Reflection.MethodInfo methodInfo = this.GetType().GetMethod(methodName, System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance, null, methodTypes, null); - bool hasDerivedMethod = methodInfo.DeclaringType.IsSubclassOf(typeof(SipDebugCallback)); - return hasDerivedMethod; - } - - private int SwigDirectorOnDebugInfo(string message) { - return OnDebugInfo(message); - } - - private int SwigDirectorOnDebugWarn(string message) { - return OnDebugWarn(message); - } - - private int SwigDirectorOnDebugError(string message) { - return OnDebugError(message); - } - - private int SwigDirectorOnDebugFatal(string message) { - return OnDebugFatal(message); - } - - public delegate int SwigDelegateSipDebugCallback_0(string message); - public delegate int SwigDelegateSipDebugCallback_1(string message); - public delegate int SwigDelegateSipDebugCallback_2(string message); - public delegate int SwigDelegateSipDebugCallback_3(string message); - - private SwigDelegateSipDebugCallback_0 swigDelegate0; - private SwigDelegateSipDebugCallback_1 swigDelegate1; - private SwigDelegateSipDebugCallback_2 swigDelegate2; - private SwigDelegateSipDebugCallback_3 swigDelegate3; - - private static Type[] swigMethodTypes0 = new Type[] { typeof(string) }; - private static Type[] swigMethodTypes1 = new Type[] { typeof(string) }; - private static Type[] swigMethodTypes2 = new Type[] { typeof(string) }; - private static Type[] swigMethodTypes3 = new Type[] { typeof(string) }; -} diff --git a/trunk/bindings/csharp/SipEvent.cs b/trunk/bindings/csharp/SipEvent.cs index 172c7f12..a0db3f79 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.39 + * Version 1.3.40 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -29,11 +29,13 @@ public class SipEvent : IDisposable { public virtual void Dispose() { lock(this) { - if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_SipEvent(swigCPtr); + if (swigCPtr.Handle != IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_SipEvent(swigCPtr); + } + swigCPtr = new HandleRef(null, IntPtr.Zero); } - swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); } } diff --git a/trunk/bindings/csharp/SipMessage.cs b/trunk/bindings/csharp/SipMessage.cs index 16c94620..519634e2 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.39 + * Version 1.3.40 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -29,11 +29,13 @@ public class SipMessage : IDisposable { public virtual void Dispose() { lock(this) { - if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_SipMessage(swigCPtr); + if (swigCPtr.Handle != IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_SipMessage(swigCPtr); + } + swigCPtr = new HandleRef(null, IntPtr.Zero); } - swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); } } diff --git a/trunk/bindings/csharp/SipSession.cs b/trunk/bindings/csharp/SipSession.cs index aa902516..e07fda8c 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.39 + * Version 1.3.40 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -29,11 +29,13 @@ public class SipSession : IDisposable { public virtual void Dispose() { lock(this) { - if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_SipSession(swigCPtr); + if (swigCPtr.Handle != IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_SipSession(swigCPtr); + } + swigCPtr = new HandleRef(null, IntPtr.Zero); } - swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); } } diff --git a/trunk/bindings/csharp/SipStack.cs b/trunk/bindings/csharp/SipStack.cs index bc2878a8..a08d5228 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.39 + * Version 1.3.40 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -27,11 +27,13 @@ public class SipStack : SafeObject { public override void Dispose() { lock(this) { - if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_SipStack(swigCPtr); + if (swigCPtr.Handle != IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_SipStack(swigCPtr); + } + swigCPtr = new HandleRef(null, IntPtr.Zero); } - swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); base.Dispose(); } @@ -45,8 +47,8 @@ public class SipStack : SafeObject { return ret; } - public bool setDebugCallback(SipDebugCallback callback) { - bool ret = tinyWRAPPINVOKE.SipStack_setDebugCallback(swigCPtr, SipDebugCallback.getCPtr(callback)); + public bool setDebugCallback(DDebugCallback callback) { + bool ret = tinyWRAPPINVOKE.SipStack_setDebugCallback(swigCPtr, DDebugCallback.getCPtr(callback)); return ret; } diff --git a/trunk/bindings/csharp/SipUri.cs b/trunk/bindings/csharp/SipUri.cs index 7a9dbb27..f37c07cb 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.39 + * Version 1.3.40 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -29,11 +29,13 @@ public class SipUri : IDisposable { public virtual void Dispose() { lock(this) { - if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_SipUri(swigCPtr); + if (swigCPtr.Handle != IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_SipUri(swigCPtr); + } + swigCPtr = new HandleRef(null, IntPtr.Zero); } - swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); } } diff --git a/trunk/bindings/csharp/StackEvent.cs b/trunk/bindings/csharp/StackEvent.cs new file mode 100644 index 00000000..3059cb72 --- /dev/null +++ b/trunk/bindings/csharp/StackEvent.cs @@ -0,0 +1,42 @@ +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 1.3.40 + * + * Do not make changes to this file unless you know what you are doing--modify + * the SWIG interface file instead. + * ----------------------------------------------------------------------------- */ + + +using System; +using System.Runtime.InteropServices; + +public class StackEvent : SipEvent { + private HandleRef swigCPtr; + + internal StackEvent(IntPtr cPtr, bool cMemoryOwn) : base(tinyWRAPPINVOKE.StackEventUpcast(cPtr), cMemoryOwn) { + swigCPtr = new HandleRef(this, cPtr); + } + + internal static HandleRef getCPtr(StackEvent obj) { + return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr; + } + + ~StackEvent() { + Dispose(); + } + + public override void Dispose() { + lock(this) { + if (swigCPtr.Handle != IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_StackEvent(swigCPtr); + } + swigCPtr = new HandleRef(null, IntPtr.Zero); + } + GC.SuppressFinalize(this); + base.Dispose(); + } + } + +} diff --git a/trunk/bindings/csharp/SubscriptionEvent.cs b/trunk/bindings/csharp/SubscriptionEvent.cs index b1807a79..62aac0f6 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.39 + * Version 1.3.40 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -27,11 +27,13 @@ public class SubscriptionEvent : SipEvent { public override void Dispose() { lock(this) { - if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_SubscriptionEvent(swigCPtr); + if (swigCPtr.Handle != IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_SubscriptionEvent(swigCPtr); + } + swigCPtr = new HandleRef(null, IntPtr.Zero); } - 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 4a31124a..dcee4543 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.39 + * Version 1.3.40 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -27,11 +27,13 @@ public class SubscriptionSession : SipSession { public override void Dispose() { lock(this) { - if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_SubscriptionSession(swigCPtr); + if (swigCPtr.Handle != IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_SubscriptionSession(swigCPtr); + } + swigCPtr = new HandleRef(null, IntPtr.Zero); } - swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); base.Dispose(); } diff --git a/trunk/bindings/csharp/tinyWRAP.cs b/trunk/bindings/csharp/tinyWRAP.cs index c5cca38c..ec1b7d2b 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.39 + * Version 1.3.40 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -12,7 +12,7 @@ using System.Runtime.InteropServices; public class tinyWRAP { public static readonly int tsip_event_code_dialog_transport_error = tinyWRAPPINVOKE.tsip_event_code_dialog_transport_error_get(); - public static readonly int tsip_event_code_global_error = tinyWRAPPINVOKE.tsip_event_code_global_error_get(); + public static readonly int tsip_event_code_dialog_global_error = tinyWRAPPINVOKE.tsip_event_code_dialog_global_error_get(); public static readonly int tsip_event_code_dialog_message_error = tinyWRAPPINVOKE.tsip_event_code_dialog_message_error_get(); public static readonly int tsip_event_code_dialog_request_incoming = tinyWRAPPINVOKE.tsip_event_code_dialog_request_incoming_get(); public static readonly int tsip_event_code_dialog_request_cancelled = tinyWRAPPINVOKE.tsip_event_code_dialog_request_cancelled_get(); @@ -21,4 +21,8 @@ public class tinyWRAP { public static readonly int tsip_event_code_dialog_connected = tinyWRAPPINVOKE.tsip_event_code_dialog_connected_get(); public static readonly int tsip_event_code_dialog_terminating = tinyWRAPPINVOKE.tsip_event_code_dialog_terminating_get(); public static readonly int tsip_event_code_dialog_terminated = tinyWRAPPINVOKE.tsip_event_code_dialog_terminated_get(); + public static readonly int tsip_event_code_stack_started = tinyWRAPPINVOKE.tsip_event_code_stack_started_get(); + public static readonly int tsip_event_code_stack_stopped = tinyWRAPPINVOKE.tsip_event_code_stack_stopped_get(); + public static readonly int tsip_event_code_stack_failed_to_start = tinyWRAPPINVOKE.tsip_event_code_stack_failed_to_start_get(); + public static readonly int tsip_event_code_stack_failed_to_stop = tinyWRAPPINVOKE.tsip_event_code_stack_failed_to_stop_get(); } diff --git a/trunk/bindings/csharp/tinyWRAPPINVOKE.cs b/trunk/bindings/csharp/tinyWRAPPINVOKE.cs index 3b82dbeb..ea85361b 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.39 + * Version 1.3.40 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -184,6 +184,24 @@ class tinyWRAPPINVOKE { static protected SWIGStringHelper swigStringHelper = new SWIGStringHelper(); + [DllImport("tinyWRAP", EntryPoint="CSharp_new_DDebugCallback")] + public static extern IntPtr new_DDebugCallback(); + + [DllImport("tinyWRAP", EntryPoint="CSharp_delete_DDebugCallback")] + public static extern void delete_DDebugCallback(HandleRef jarg1); + + [DllImport("tinyWRAP", EntryPoint="CSharp_DDebugCallback_OnDebugInfo")] + public static extern int DDebugCallback_OnDebugInfo(HandleRef jarg1, string jarg2); + + [DllImport("tinyWRAP", EntryPoint="CSharp_DDebugCallback_OnDebugWarn")] + public static extern int DDebugCallback_OnDebugWarn(HandleRef jarg1, string jarg2); + + [DllImport("tinyWRAP", EntryPoint="CSharp_DDebugCallback_OnDebugError")] + public static extern int DDebugCallback_OnDebugError(HandleRef jarg1, string jarg2); + + [DllImport("tinyWRAP", EntryPoint="CSharp_DDebugCallback_OnDebugFatal")] + public static extern int DDebugCallback_OnDebugFatal(HandleRef jarg1, string jarg2); + [DllImport("tinyWRAP", EntryPoint="CSharp_new_SipUri")] public static extern IntPtr new_SipUri(string jarg1); @@ -238,6 +256,9 @@ class tinyWRAPPINVOKE { [DllImport("tinyWRAP", EntryPoint="CSharp_delete_DialogEvent")] public static extern void delete_DialogEvent(HandleRef jarg1); + [DllImport("tinyWRAP", EntryPoint="CSharp_delete_StackEvent")] + public static extern void delete_StackEvent(HandleRef jarg1); + [DllImport("tinyWRAP", EntryPoint="CSharp_delete_MessagingEvent")] public static extern void delete_MessagingEvent(HandleRef jarg1); @@ -397,6 +418,12 @@ class tinyWRAPPINVOKE { [DllImport("tinyWRAP", EntryPoint="CSharp_SipCallback_OnDialogEventSwigExplicitSipCallback")] public static extern int SipCallback_OnDialogEventSwigExplicitSipCallback(HandleRef jarg1, HandleRef jarg2); + [DllImport("tinyWRAP", EntryPoint="CSharp_SipCallback_OnStackEvent")] + public static extern int SipCallback_OnStackEvent(HandleRef jarg1, HandleRef jarg2); + + [DllImport("tinyWRAP", EntryPoint="CSharp_SipCallback_OnStackEventSwigExplicitSipCallback")] + public static extern int SipCallback_OnStackEventSwigExplicitSipCallback(HandleRef jarg1, HandleRef jarg2); + [DllImport("tinyWRAP", EntryPoint="CSharp_SipCallback_OnMessagingEvent")] public static extern int SipCallback_OnMessagingEvent(HandleRef jarg1, HandleRef jarg2); @@ -428,40 +455,7 @@ class tinyWRAPPINVOKE { public static extern int SipCallback_OnSubscriptionEventSwigExplicitSipCallback(HandleRef jarg1, HandleRef jarg2); [DllImport("tinyWRAP", EntryPoint="CSharp_SipCallback_director_connect")] - public static extern void SipCallback_director_connect(HandleRef jarg1, SipCallback.SwigDelegateSipCallback_0 delegate0, SipCallback.SwigDelegateSipCallback_1 delegate1, SipCallback.SwigDelegateSipCallback_2 delegate2, SipCallback.SwigDelegateSipCallback_3 delegate3, SipCallback.SwigDelegateSipCallback_4 delegate4, SipCallback.SwigDelegateSipCallback_5 delegate5); - - [DllImport("tinyWRAP", EntryPoint="CSharp_new_SipDebugCallback")] - public static extern IntPtr new_SipDebugCallback(); - - [DllImport("tinyWRAP", EntryPoint="CSharp_delete_SipDebugCallback")] - public static extern void delete_SipDebugCallback(HandleRef jarg1); - - [DllImport("tinyWRAP", EntryPoint="CSharp_SipDebugCallback_OnDebugInfo")] - public static extern int SipDebugCallback_OnDebugInfo(HandleRef jarg1, string jarg2); - - [DllImport("tinyWRAP", EntryPoint="CSharp_SipDebugCallback_OnDebugInfoSwigExplicitSipDebugCallback")] - public static extern int SipDebugCallback_OnDebugInfoSwigExplicitSipDebugCallback(HandleRef jarg1, string jarg2); - - [DllImport("tinyWRAP", EntryPoint="CSharp_SipDebugCallback_OnDebugWarn")] - public static extern int SipDebugCallback_OnDebugWarn(HandleRef jarg1, string jarg2); - - [DllImport("tinyWRAP", EntryPoint="CSharp_SipDebugCallback_OnDebugWarnSwigExplicitSipDebugCallback")] - public static extern int SipDebugCallback_OnDebugWarnSwigExplicitSipDebugCallback(HandleRef jarg1, string jarg2); - - [DllImport("tinyWRAP", EntryPoint="CSharp_SipDebugCallback_OnDebugError")] - public static extern int SipDebugCallback_OnDebugError(HandleRef jarg1, string jarg2); - - [DllImport("tinyWRAP", EntryPoint="CSharp_SipDebugCallback_OnDebugErrorSwigExplicitSipDebugCallback")] - public static extern int SipDebugCallback_OnDebugErrorSwigExplicitSipDebugCallback(HandleRef jarg1, string jarg2); - - [DllImport("tinyWRAP", EntryPoint="CSharp_SipDebugCallback_OnDebugFatal")] - public static extern int SipDebugCallback_OnDebugFatal(HandleRef jarg1, string jarg2); - - [DllImport("tinyWRAP", EntryPoint="CSharp_SipDebugCallback_OnDebugFatalSwigExplicitSipDebugCallback")] - public static extern int SipDebugCallback_OnDebugFatalSwigExplicitSipDebugCallback(HandleRef jarg1, string jarg2); - - [DllImport("tinyWRAP", EntryPoint="CSharp_SipDebugCallback_director_connect")] - public static extern void SipDebugCallback_director_connect(HandleRef jarg1, SipDebugCallback.SwigDelegateSipDebugCallback_0 delegate0, SipDebugCallback.SwigDelegateSipDebugCallback_1 delegate1, SipDebugCallback.SwigDelegateSipDebugCallback_2 delegate2, SipDebugCallback.SwigDelegateSipDebugCallback_3 delegate3); + public static extern void SipCallback_director_connect(HandleRef jarg1, SipCallback.SwigDelegateSipCallback_0 delegate0, SipCallback.SwigDelegateSipCallback_1 delegate1, SipCallback.SwigDelegateSipCallback_2 delegate2, SipCallback.SwigDelegateSipCallback_3 delegate3, SipCallback.SwigDelegateSipCallback_4 delegate4, SipCallback.SwigDelegateSipCallback_5 delegate5, SipCallback.SwigDelegateSipCallback_6 delegate6); [DllImport("tinyWRAP", EntryPoint="CSharp_new_SafeObject")] public static extern IntPtr new_SafeObject(); @@ -532,8 +526,8 @@ class tinyWRAPPINVOKE { [DllImport("tinyWRAP", EntryPoint="CSharp_tsip_event_code_dialog_transport_error_get")] public static extern int tsip_event_code_dialog_transport_error_get(); - [DllImport("tinyWRAP", EntryPoint="CSharp_tsip_event_code_global_error_get")] - public static extern int tsip_event_code_global_error_get(); + [DllImport("tinyWRAP", EntryPoint="CSharp_tsip_event_code_dialog_global_error_get")] + public static extern int tsip_event_code_dialog_global_error_get(); [DllImport("tinyWRAP", EntryPoint="CSharp_tsip_event_code_dialog_message_error_get")] public static extern int tsip_event_code_dialog_message_error_get(); @@ -559,9 +553,24 @@ class tinyWRAPPINVOKE { [DllImport("tinyWRAP", EntryPoint="CSharp_tsip_event_code_dialog_terminated_get")] public static extern int tsip_event_code_dialog_terminated_get(); + [DllImport("tinyWRAP", EntryPoint="CSharp_tsip_event_code_stack_started_get")] + public static extern int tsip_event_code_stack_started_get(); + + [DllImport("tinyWRAP", EntryPoint="CSharp_tsip_event_code_stack_stopped_get")] + public static extern int tsip_event_code_stack_stopped_get(); + + [DllImport("tinyWRAP", EntryPoint="CSharp_tsip_event_code_stack_failed_to_start_get")] + public static extern int tsip_event_code_stack_failed_to_start_get(); + + [DllImport("tinyWRAP", EntryPoint="CSharp_tsip_event_code_stack_failed_to_stop_get")] + public static extern int tsip_event_code_stack_failed_to_stop_get(); + [DllImport("tinyWRAP", EntryPoint="CSharp_DialogEventUpcast")] public static extern IntPtr DialogEventUpcast(IntPtr objectRef); + [DllImport("tinyWRAP", EntryPoint="CSharp_StackEventUpcast")] + public static extern IntPtr StackEventUpcast(IntPtr objectRef); + [DllImport("tinyWRAP", EntryPoint="CSharp_MessagingEventUpcast")] public static extern IntPtr MessagingEventUpcast(IntPtr objectRef); diff --git a/trunk/bindings/csharp/tinyWRAP_wrap.cxx b/trunk/bindings/csharp/tinyWRAP_wrap.cxx index aa5ca837..6b8a89af 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.39 + * Version 1.3.40 * * 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,59 @@ 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 "DDebug.h" + #include "SipUri.h" #include "SipMessage.h" @@ -337,7 +340,6 @@ namespace Swig { #include "SipSession.h" #include "SipCallback.h" -#include "SipDebug.h" #include "SafeObject.h" #include "SipStack.h" @@ -373,6 +375,21 @@ int SwigDirector_SipCallback::OnDialogEvent(DialogEvent const *e) { return c_result; } +int SwigDirector_SipCallback::OnStackEvent(StackEvent const *e) { + int c_result = SwigValueInit< int >() ; + int jresult = 0 ; + void * je = 0 ; + + if (!swig_callbackOnStackEvent) { + return SipCallback::OnStackEvent(e); + } else { + je = (void *) e; + jresult = (int) swig_callbackOnStackEvent(je); + c_result = (int)jresult; + } + return c_result; +} + int SwigDirector_SipCallback::OnMessagingEvent(MessagingEvent const *e) { int c_result = SwigValueInit< int >() ; int jresult = 0 ; @@ -448,8 +465,9 @@ int SwigDirector_SipCallback::OnSubscriptionEvent(SubscriptionEvent const *e) { return c_result; } -void SwigDirector_SipCallback::swig_connect_director(SWIG_Callback0_t callbackOnDialogEvent, SWIG_Callback1_t callbackOnMessagingEvent, SWIG_Callback2_t callbackOnOptionsEvent, SWIG_Callback3_t callbackOnPublicationEvent, SWIG_Callback4_t callbackOnRegistrationEvent, SWIG_Callback5_t callbackOnSubscriptionEvent) { +void SwigDirector_SipCallback::swig_connect_director(SWIG_Callback0_t callbackOnDialogEvent, SWIG_Callback1_t callbackOnStackEvent, SWIG_Callback2_t callbackOnMessagingEvent, SWIG_Callback3_t callbackOnOptionsEvent, SWIG_Callback4_t callbackOnPublicationEvent, SWIG_Callback5_t callbackOnRegistrationEvent, SWIG_Callback6_t callbackOnSubscriptionEvent) { swig_callbackOnDialogEvent = callbackOnDialogEvent; + swig_callbackOnStackEvent = callbackOnStackEvent; swig_callbackOnMessagingEvent = callbackOnMessagingEvent; swig_callbackOnOptionsEvent = callbackOnOptionsEvent; swig_callbackOnPublicationEvent = callbackOnPublicationEvent; @@ -459,6 +477,7 @@ void SwigDirector_SipCallback::swig_connect_director(SWIG_Callback0_t callbackOn void SwigDirector_SipCallback::swig_init_callbacks() { swig_callbackOnDialogEvent = 0; + swig_callbackOnStackEvent = 0; swig_callbackOnMessagingEvent = 0; swig_callbackOnOptionsEvent = 0; swig_callbackOnPublicationEvent = 0; @@ -466,94 +485,85 @@ void SwigDirector_SipCallback::swig_init_callbacks() { swig_callbackOnSubscriptionEvent = 0; } -SwigDirector_SipDebugCallback::SwigDirector_SipDebugCallback() : SipDebugCallback(), Swig::Director() { - swig_init_callbacks(); -} - -SwigDirector_SipDebugCallback::~SwigDirector_SipDebugCallback() { - -} - - -int SwigDirector_SipDebugCallback::OnDebugInfo(char const *message) { - int c_result = SwigValueInit< int >() ; - int jresult = 0 ; - char * jmessage = 0 ; - - if (!swig_callbackOnDebugInfo) { - return SipDebugCallback::OnDebugInfo(message); - } else { - jmessage = SWIG_csharp_string_callback((const char *)message); - jresult = (int) swig_callbackOnDebugInfo(jmessage); - c_result = (int)jresult; - } - return c_result; -} - -int SwigDirector_SipDebugCallback::OnDebugWarn(char const *message) { - int c_result = SwigValueInit< int >() ; - int jresult = 0 ; - char * jmessage = 0 ; - - if (!swig_callbackOnDebugWarn) { - return SipDebugCallback::OnDebugWarn(message); - } else { - jmessage = SWIG_csharp_string_callback((const char *)message); - jresult = (int) swig_callbackOnDebugWarn(jmessage); - c_result = (int)jresult; - } - return c_result; -} - -int SwigDirector_SipDebugCallback::OnDebugError(char const *message) { - int c_result = SwigValueInit< int >() ; - int jresult = 0 ; - char * jmessage = 0 ; - - if (!swig_callbackOnDebugError) { - return SipDebugCallback::OnDebugError(message); - } else { - jmessage = SWIG_csharp_string_callback((const char *)message); - jresult = (int) swig_callbackOnDebugError(jmessage); - c_result = (int)jresult; - } - return c_result; -} - -int SwigDirector_SipDebugCallback::OnDebugFatal(char const *message) { - int c_result = SwigValueInit< int >() ; - int jresult = 0 ; - char * jmessage = 0 ; - - if (!swig_callbackOnDebugFatal) { - return SipDebugCallback::OnDebugFatal(message); - } else { - jmessage = SWIG_csharp_string_callback((const char *)message); - jresult = (int) swig_callbackOnDebugFatal(jmessage); - c_result = (int)jresult; - } - return c_result; -} - -void SwigDirector_SipDebugCallback::swig_connect_director(SWIG_Callback0_t callbackOnDebugInfo, SWIG_Callback1_t callbackOnDebugWarn, SWIG_Callback2_t callbackOnDebugError, SWIG_Callback3_t callbackOnDebugFatal) { - swig_callbackOnDebugInfo = callbackOnDebugInfo; - swig_callbackOnDebugWarn = callbackOnDebugWarn; - swig_callbackOnDebugError = callbackOnDebugError; - swig_callbackOnDebugFatal = callbackOnDebugFatal; -} - -void SwigDirector_SipDebugCallback::swig_init_callbacks() { - swig_callbackOnDebugInfo = 0; - swig_callbackOnDebugWarn = 0; - swig_callbackOnDebugError = 0; - swig_callbackOnDebugFatal = 0; -} - #ifdef __cplusplus extern "C" { #endif +SWIGEXPORT void * SWIGSTDCALL CSharp_new_DDebugCallback() { + void * jresult ; + DDebugCallback *result = 0 ; + + result = (DDebugCallback *)new DDebugCallback(); + jresult = (void *)result; + return jresult; +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_delete_DDebugCallback(void * jarg1) { + DDebugCallback *arg1 = (DDebugCallback *) 0 ; + + arg1 = (DDebugCallback *)jarg1; + delete arg1; +} + + +SWIGEXPORT int SWIGSTDCALL CSharp_DDebugCallback_OnDebugInfo(void * jarg1, char * jarg2) { + int jresult ; + DDebugCallback *arg1 = (DDebugCallback *) 0 ; + char *arg2 = (char *) 0 ; + int result; + + arg1 = (DDebugCallback *)jarg1; + arg2 = (char *)jarg2; + result = (int)(arg1)->OnDebugInfo((char const *)arg2); + jresult = result; + return jresult; +} + + +SWIGEXPORT int SWIGSTDCALL CSharp_DDebugCallback_OnDebugWarn(void * jarg1, char * jarg2) { + int jresult ; + DDebugCallback *arg1 = (DDebugCallback *) 0 ; + char *arg2 = (char *) 0 ; + int result; + + arg1 = (DDebugCallback *)jarg1; + arg2 = (char *)jarg2; + result = (int)(arg1)->OnDebugWarn((char const *)arg2); + jresult = result; + return jresult; +} + + +SWIGEXPORT int SWIGSTDCALL CSharp_DDebugCallback_OnDebugError(void * jarg1, char * jarg2) { + int jresult ; + DDebugCallback *arg1 = (DDebugCallback *) 0 ; + char *arg2 = (char *) 0 ; + int result; + + arg1 = (DDebugCallback *)jarg1; + arg2 = (char *)jarg2; + result = (int)(arg1)->OnDebugError((char const *)arg2); + jresult = result; + return jresult; +} + + +SWIGEXPORT int SWIGSTDCALL CSharp_DDebugCallback_OnDebugFatal(void * jarg1, char * jarg2) { + int jresult ; + DDebugCallback *arg1 = (DDebugCallback *) 0 ; + char *arg2 = (char *) 0 ; + int result; + + arg1 = (DDebugCallback *)jarg1; + arg2 = (char *)jarg2; + result = (int)(arg1)->OnDebugFatal((char const *)arg2); + jresult = result; + return jresult; +} + + SWIGEXPORT void * SWIGSTDCALL CSharp_new_SipUri(char * jarg1) { void * jresult ; char *arg1 = (char *) 0 ; @@ -776,6 +786,14 @@ SWIGEXPORT void SWIGSTDCALL CSharp_delete_DialogEvent(void * jarg1) { } +SWIGEXPORT void SWIGSTDCALL CSharp_delete_StackEvent(void * jarg1) { + StackEvent *arg1 = (StackEvent *) 0 ; + + arg1 = (StackEvent *)jarg1; + delete arg1; +} + + SWIGEXPORT void SWIGSTDCALL CSharp_delete_MessagingEvent(void * jarg1) { MessagingEvent *arg1 = (MessagingEvent *) 0 ; @@ -1396,6 +1414,34 @@ SWIGEXPORT int SWIGSTDCALL CSharp_SipCallback_OnDialogEventSwigExplicitSipCallba } +SWIGEXPORT int SWIGSTDCALL CSharp_SipCallback_OnStackEvent(void * jarg1, void * jarg2) { + int jresult ; + SipCallback *arg1 = (SipCallback *) 0 ; + StackEvent *arg2 = (StackEvent *) 0 ; + int result; + + arg1 = (SipCallback *)jarg1; + arg2 = (StackEvent *)jarg2; + result = (int)(arg1)->OnStackEvent((StackEvent const *)arg2); + jresult = result; + return jresult; +} + + +SWIGEXPORT int SWIGSTDCALL CSharp_SipCallback_OnStackEventSwigExplicitSipCallback(void * jarg1, void * jarg2) { + int jresult ; + SipCallback *arg1 = (SipCallback *) 0 ; + StackEvent *arg2 = (StackEvent *) 0 ; + int result; + + arg1 = (SipCallback *)jarg1; + arg2 = (StackEvent *)jarg2; + result = (int)(arg1)->SipCallback::OnStackEvent((StackEvent const *)arg2); + jresult = result; + return jresult; +} + + SWIGEXPORT int SWIGSTDCALL CSharp_SipCallback_OnMessagingEvent(void * jarg1, void * jarg2) { int jresult ; SipCallback *arg1 = (SipCallback *) 0 ; @@ -1536,150 +1582,11 @@ SWIGEXPORT int SWIGSTDCALL CSharp_SipCallback_OnSubscriptionEventSwigExplicitSip } -SWIGEXPORT void SWIGSTDCALL CSharp_SipCallback_director_connect(void *objarg, SwigDirector_SipCallback::SWIG_Callback0_t callback0, SwigDirector_SipCallback::SWIG_Callback1_t callback1, SwigDirector_SipCallback::SWIG_Callback2_t callback2, SwigDirector_SipCallback::SWIG_Callback3_t callback3, SwigDirector_SipCallback::SWIG_Callback4_t callback4, SwigDirector_SipCallback::SWIG_Callback5_t callback5) { +SWIGEXPORT void SWIGSTDCALL CSharp_SipCallback_director_connect(void *objarg, SwigDirector_SipCallback::SWIG_Callback0_t callback0, SwigDirector_SipCallback::SWIG_Callback1_t callback1, SwigDirector_SipCallback::SWIG_Callback2_t callback2, SwigDirector_SipCallback::SWIG_Callback3_t callback3, SwigDirector_SipCallback::SWIG_Callback4_t callback4, SwigDirector_SipCallback::SWIG_Callback5_t callback5, SwigDirector_SipCallback::SWIG_Callback6_t callback6) { SipCallback *obj = (SipCallback *)objarg; SwigDirector_SipCallback *director = dynamic_cast(obj); if (director) { - director->swig_connect_director(callback0, callback1, callback2, callback3, callback4, callback5); - } -} - - -SWIGEXPORT void * SWIGSTDCALL CSharp_new_SipDebugCallback() { - void * jresult ; - SipDebugCallback *result = 0 ; - - result = (SipDebugCallback *)new SwigDirector_SipDebugCallback(); - jresult = (void *)result; - return jresult; -} - - -SWIGEXPORT void SWIGSTDCALL CSharp_delete_SipDebugCallback(void * jarg1) { - SipDebugCallback *arg1 = (SipDebugCallback *) 0 ; - - arg1 = (SipDebugCallback *)jarg1; - delete arg1; -} - - -SWIGEXPORT int SWIGSTDCALL CSharp_SipDebugCallback_OnDebugInfo(void * jarg1, char * jarg2) { - int jresult ; - SipDebugCallback *arg1 = (SipDebugCallback *) 0 ; - char *arg2 = (char *) 0 ; - int result; - - arg1 = (SipDebugCallback *)jarg1; - arg2 = (char *)jarg2; - result = (int)(arg1)->OnDebugInfo((char const *)arg2); - jresult = result; - return jresult; -} - - -SWIGEXPORT int SWIGSTDCALL CSharp_SipDebugCallback_OnDebugInfoSwigExplicitSipDebugCallback(void * jarg1, char * jarg2) { - int jresult ; - SipDebugCallback *arg1 = (SipDebugCallback *) 0 ; - char *arg2 = (char *) 0 ; - int result; - - arg1 = (SipDebugCallback *)jarg1; - arg2 = (char *)jarg2; - result = (int)(arg1)->SipDebugCallback::OnDebugInfo((char const *)arg2); - jresult = result; - return jresult; -} - - -SWIGEXPORT int SWIGSTDCALL CSharp_SipDebugCallback_OnDebugWarn(void * jarg1, char * jarg2) { - int jresult ; - SipDebugCallback *arg1 = (SipDebugCallback *) 0 ; - char *arg2 = (char *) 0 ; - int result; - - arg1 = (SipDebugCallback *)jarg1; - arg2 = (char *)jarg2; - result = (int)(arg1)->OnDebugWarn((char const *)arg2); - jresult = result; - return jresult; -} - - -SWIGEXPORT int SWIGSTDCALL CSharp_SipDebugCallback_OnDebugWarnSwigExplicitSipDebugCallback(void * jarg1, char * jarg2) { - int jresult ; - SipDebugCallback *arg1 = (SipDebugCallback *) 0 ; - char *arg2 = (char *) 0 ; - int result; - - arg1 = (SipDebugCallback *)jarg1; - arg2 = (char *)jarg2; - result = (int)(arg1)->SipDebugCallback::OnDebugWarn((char const *)arg2); - jresult = result; - return jresult; -} - - -SWIGEXPORT int SWIGSTDCALL CSharp_SipDebugCallback_OnDebugError(void * jarg1, char * jarg2) { - int jresult ; - SipDebugCallback *arg1 = (SipDebugCallback *) 0 ; - char *arg2 = (char *) 0 ; - int result; - - arg1 = (SipDebugCallback *)jarg1; - arg2 = (char *)jarg2; - result = (int)(arg1)->OnDebugError((char const *)arg2); - jresult = result; - return jresult; -} - - -SWIGEXPORT int SWIGSTDCALL CSharp_SipDebugCallback_OnDebugErrorSwigExplicitSipDebugCallback(void * jarg1, char * jarg2) { - int jresult ; - SipDebugCallback *arg1 = (SipDebugCallback *) 0 ; - char *arg2 = (char *) 0 ; - int result; - - arg1 = (SipDebugCallback *)jarg1; - arg2 = (char *)jarg2; - result = (int)(arg1)->SipDebugCallback::OnDebugError((char const *)arg2); - jresult = result; - return jresult; -} - - -SWIGEXPORT int SWIGSTDCALL CSharp_SipDebugCallback_OnDebugFatal(void * jarg1, char * jarg2) { - int jresult ; - SipDebugCallback *arg1 = (SipDebugCallback *) 0 ; - char *arg2 = (char *) 0 ; - int result; - - arg1 = (SipDebugCallback *)jarg1; - arg2 = (char *)jarg2; - result = (int)(arg1)->OnDebugFatal((char const *)arg2); - jresult = result; - return jresult; -} - - -SWIGEXPORT int SWIGSTDCALL CSharp_SipDebugCallback_OnDebugFatalSwigExplicitSipDebugCallback(void * jarg1, char * jarg2) { - int jresult ; - SipDebugCallback *arg1 = (SipDebugCallback *) 0 ; - char *arg2 = (char *) 0 ; - int result; - - arg1 = (SipDebugCallback *)jarg1; - arg2 = (char *)jarg2; - result = (int)(arg1)->SipDebugCallback::OnDebugFatal((char const *)arg2); - jresult = result; - return jresult; -} - - -SWIGEXPORT void SWIGSTDCALL CSharp_SipDebugCallback_director_connect(void *objarg, SwigDirector_SipDebugCallback::SWIG_Callback0_t callback0, SwigDirector_SipDebugCallback::SWIG_Callback1_t callback1, SwigDirector_SipDebugCallback::SWIG_Callback2_t callback2, SwigDirector_SipDebugCallback::SWIG_Callback3_t callback3) { - SipDebugCallback *obj = (SipDebugCallback *)objarg; - SwigDirector_SipDebugCallback *director = dynamic_cast(obj); - if (director) { - director->swig_connect_director(callback0, callback1, callback2, callback3); + director->swig_connect_director(callback0, callback1, callback2, callback3, callback4, callback5, callback6); } } @@ -1767,11 +1674,11 @@ SWIGEXPORT unsigned int SWIGSTDCALL CSharp_SipStack_start(void * jarg1) { SWIGEXPORT unsigned int SWIGSTDCALL CSharp_SipStack_setDebugCallback(void * jarg1, void * jarg2) { unsigned int jresult ; SipStack *arg1 = (SipStack *) 0 ; - SipDebugCallback *arg2 = (SipDebugCallback *) 0 ; + DDebugCallback *arg2 = (DDebugCallback *) 0 ; bool result; arg1 = (SipStack *)jarg1; - arg2 = (SipDebugCallback *)jarg2; + arg2 = (DDebugCallback *)jarg2; result = (bool)(arg1)->setDebugCallback(arg2); jresult = result; return jresult; @@ -1990,7 +1897,7 @@ SWIGEXPORT int SWIGSTDCALL CSharp_tsip_event_code_dialog_transport_error_get() { } -SWIGEXPORT int SWIGSTDCALL CSharp_tsip_event_code_global_error_get() { +SWIGEXPORT int SWIGSTDCALL CSharp_tsip_event_code_dialog_global_error_get() { int jresult ; int result; @@ -2080,10 +1987,54 @@ SWIGEXPORT int SWIGSTDCALL CSharp_tsip_event_code_dialog_terminated_get() { } +SWIGEXPORT int SWIGSTDCALL CSharp_tsip_event_code_stack_started_get() { + int jresult ; + int result; + + result = (int) 950; + jresult = result; + return jresult; +} + + +SWIGEXPORT int SWIGSTDCALL CSharp_tsip_event_code_stack_stopped_get() { + int jresult ; + int result; + + result = (int) 951; + jresult = result; + return jresult; +} + + +SWIGEXPORT int SWIGSTDCALL CSharp_tsip_event_code_stack_failed_to_start_get() { + int jresult ; + int result; + + result = (int) 952; + jresult = result; + return jresult; +} + + +SWIGEXPORT int SWIGSTDCALL CSharp_tsip_event_code_stack_failed_to_stop_get() { + int jresult ; + int result; + + result = (int) 953; + jresult = result; + return jresult; +} + + SWIGEXPORT SipEvent * SWIGSTDCALL CSharp_DialogEventUpcast(DialogEvent *objectRef) { return (SipEvent *)objectRef; } +SWIGEXPORT SipEvent * SWIGSTDCALL CSharp_StackEventUpcast(StackEvent *objectRef) { + return (SipEvent *)objectRef; +} + SWIGEXPORT SipEvent * SWIGSTDCALL CSharp_MessagingEventUpcast(MessagingEvent *objectRef) { return (SipEvent *)objectRef; } diff --git a/trunk/bindings/csharp/tinyWRAP_wrap.h b/trunk/bindings/csharp/tinyWRAP_wrap.h index 02c8b2bc..f0097444 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.39 + * Version 1.3.40 * * 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 @@ -17,6 +17,7 @@ public: SwigDirector_SipCallback(); virtual ~SwigDirector_SipCallback(); virtual int OnDialogEvent(DialogEvent const *e); + virtual int OnStackEvent(StackEvent const *e); virtual int OnMessagingEvent(MessagingEvent const *e); virtual int OnOptionsEvent(OptionsEvent const *e); virtual int OnPublicationEvent(PublicationEvent const *e); @@ -29,39 +30,17 @@ public: typedef int (SWIGSTDCALL* SWIG_Callback3_t)(void *); typedef int (SWIGSTDCALL* SWIG_Callback4_t)(void *); typedef int (SWIGSTDCALL* SWIG_Callback5_t)(void *); - void swig_connect_director(SWIG_Callback0_t callbackOnDialogEvent, SWIG_Callback1_t callbackOnMessagingEvent, SWIG_Callback2_t callbackOnOptionsEvent, SWIG_Callback3_t callbackOnPublicationEvent, SWIG_Callback4_t callbackOnRegistrationEvent, SWIG_Callback5_t callbackOnSubscriptionEvent); + typedef int (SWIGSTDCALL* SWIG_Callback6_t)(void *); + void swig_connect_director(SWIG_Callback0_t callbackOnDialogEvent, SWIG_Callback1_t callbackOnStackEvent, SWIG_Callback2_t callbackOnMessagingEvent, SWIG_Callback3_t callbackOnOptionsEvent, SWIG_Callback4_t callbackOnPublicationEvent, SWIG_Callback5_t callbackOnRegistrationEvent, SWIG_Callback6_t callbackOnSubscriptionEvent); private: SWIG_Callback0_t swig_callbackOnDialogEvent; - SWIG_Callback1_t swig_callbackOnMessagingEvent; - SWIG_Callback2_t swig_callbackOnOptionsEvent; - SWIG_Callback3_t swig_callbackOnPublicationEvent; - SWIG_Callback4_t swig_callbackOnRegistrationEvent; - SWIG_Callback5_t swig_callbackOnSubscriptionEvent; - void swig_init_callbacks(); -}; - -class SwigDirector_SipDebugCallback : public SipDebugCallback, public Swig::Director { - -public: - SwigDirector_SipDebugCallback(); - virtual ~SwigDirector_SipDebugCallback(); - virtual int OnDebugInfo(char const *message); - virtual int OnDebugWarn(char const *message); - virtual int OnDebugError(char const *message); - virtual int OnDebugFatal(char const *message); - - typedef int (SWIGSTDCALL* SWIG_Callback0_t)(char *); - typedef int (SWIGSTDCALL* SWIG_Callback1_t)(char *); - typedef int (SWIGSTDCALL* SWIG_Callback2_t)(char *); - typedef int (SWIGSTDCALL* SWIG_Callback3_t)(char *); - void swig_connect_director(SWIG_Callback0_t callbackOnDebugInfo, SWIG_Callback1_t callbackOnDebugWarn, SWIG_Callback2_t callbackOnDebugError, SWIG_Callback3_t callbackOnDebugFatal); - -private: - SWIG_Callback0_t swig_callbackOnDebugInfo; - SWIG_Callback1_t swig_callbackOnDebugWarn; - SWIG_Callback2_t swig_callbackOnDebugError; - SWIG_Callback3_t swig_callbackOnDebugFatal; + SWIG_Callback1_t swig_callbackOnStackEvent; + SWIG_Callback2_t swig_callbackOnMessagingEvent; + SWIG_Callback3_t swig_callbackOnOptionsEvent; + SWIG_Callback4_t swig_callbackOnPublicationEvent; + SWIG_Callback5_t swig_callbackOnRegistrationEvent; + SWIG_Callback6_t swig_callbackOnSubscriptionEvent; void swig_init_callbacks(); }; diff --git a/trunk/bindings/csharp/tsip_event_type_t.cs b/trunk/bindings/csharp/tsip_event_type_t.cs index 16321d11..4074d78b 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.39 + * Version 1.3.40 * * 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_message_event_type_t.cs b/trunk/bindings/csharp/tsip_message_event_type_t.cs index 8ff95512..8a5a2616 100644 --- a/trunk/bindings/csharp/tsip_message_event_type_t.cs +++ b/trunk/bindings/csharp/tsip_message_event_type_t.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.39 + * Version 1.3.40 * * 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_options_event_type_t.cs b/trunk/bindings/csharp/tsip_options_event_type_t.cs index 56ff1a1f..729e4690 100644 --- a/trunk/bindings/csharp/tsip_options_event_type_t.cs +++ b/trunk/bindings/csharp/tsip_options_event_type_t.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.39 + * Version 1.3.40 * * 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 cae8a599..f6a4f588 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.39 + * Version 1.3.40 * * 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 a8992b94..56fb8c59 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.39 + * Version 1.3.40 * * 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 a3b825f7..ae9b16a3 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.39 + * Version 1.3.40 * * 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/DDebugCallback.java b/trunk/bindings/java/DDebugCallback.java new file mode 100644 index 00000000..a5ee1a64 --- /dev/null +++ b/trunk/bindings/java/DDebugCallback.java @@ -0,0 +1,58 @@ +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 1.3.40 + * + * Do not make changes to this file unless you know what you are doing--modify + * the SWIG interface file instead. + * ----------------------------------------------------------------------------- */ + +package org.doubango.tinyWRAP; + +public class DDebugCallback { + private long swigCPtr; + protected boolean swigCMemOwn; + + protected DDebugCallback(long cPtr, boolean cMemoryOwn) { + swigCMemOwn = cMemoryOwn; + swigCPtr = cPtr; + } + + protected static long getCPtr(DDebugCallback obj) { + return (obj == null) ? 0 : obj.swigCPtr; + } + + protected void finalize() { + delete(); + } + + public synchronized void delete() { + if (swigCPtr != 0) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_DDebugCallback(swigCPtr); + } + swigCPtr = 0; + } + } + + public DDebugCallback() { + this(tinyWRAPJNI.new_DDebugCallback(), true); + } + + public int OnDebugInfo(String message) { + return tinyWRAPJNI.DDebugCallback_OnDebugInfo(swigCPtr, this, message); + } + + public int OnDebugWarn(String message) { + return tinyWRAPJNI.DDebugCallback_OnDebugWarn(swigCPtr, this, message); + } + + public int OnDebugError(String message) { + return tinyWRAPJNI.DDebugCallback_OnDebugError(swigCPtr, this, message); + } + + public int OnDebugFatal(String message) { + return tinyWRAPJNI.DDebugCallback_OnDebugFatal(swigCPtr, this, message); + } + +} diff --git a/trunk/bindings/java/DialogEvent.java b/trunk/bindings/java/DialogEvent.java index ac409f64..93ec1f60 100644 --- a/trunk/bindings/java/DialogEvent.java +++ b/trunk/bindings/java/DialogEvent.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.39 + * Version 1.3.40 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -25,11 +25,13 @@ public class DialogEvent extends SipEvent { } public synchronized void delete() { - if(swigCPtr != 0 && swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_DialogEvent(swigCPtr); + if (swigCPtr != 0) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_DialogEvent(swigCPtr); + } + swigCPtr = 0; } - swigCPtr = 0; super.delete(); } diff --git a/trunk/bindings/java/MessagingEvent.java b/trunk/bindings/java/MessagingEvent.java index c502d313..041945eb 100644 --- a/trunk/bindings/java/MessagingEvent.java +++ b/trunk/bindings/java/MessagingEvent.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.39 + * Version 1.3.40 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -25,11 +25,13 @@ public class MessagingEvent extends SipEvent { } public synchronized void delete() { - if(swigCPtr != 0 && swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_MessagingEvent(swigCPtr); + if (swigCPtr != 0) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_MessagingEvent(swigCPtr); + } + swigCPtr = 0; } - swigCPtr = 0; super.delete(); } diff --git a/trunk/bindings/java/MessagingSession.java b/trunk/bindings/java/MessagingSession.java index 577f18aa..3b15b89b 100644 --- a/trunk/bindings/java/MessagingSession.java +++ b/trunk/bindings/java/MessagingSession.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.39 + * Version 1.3.40 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -25,11 +25,13 @@ public class MessagingSession extends SipSession { } public synchronized void delete() { - if(swigCPtr != 0 && swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_MessagingSession(swigCPtr); + if (swigCPtr != 0) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_MessagingSession(swigCPtr); + } + swigCPtr = 0; } - swigCPtr = 0; super.delete(); } diff --git a/trunk/bindings/java/OptionsEvent.java b/trunk/bindings/java/OptionsEvent.java index ca776844..aa6054f6 100644 --- a/trunk/bindings/java/OptionsEvent.java +++ b/trunk/bindings/java/OptionsEvent.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.39 + * Version 1.3.40 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -25,11 +25,13 @@ public class OptionsEvent extends SipEvent { } public synchronized void delete() { - if(swigCPtr != 0 && swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_OptionsEvent(swigCPtr); + if (swigCPtr != 0) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_OptionsEvent(swigCPtr); + } + swigCPtr = 0; } - swigCPtr = 0; super.delete(); } diff --git a/trunk/bindings/java/OptionsSession.java b/trunk/bindings/java/OptionsSession.java index 1a662e04..f3c8041c 100644 --- a/trunk/bindings/java/OptionsSession.java +++ b/trunk/bindings/java/OptionsSession.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.39 + * Version 1.3.40 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -25,11 +25,13 @@ public class OptionsSession extends SipSession { } public synchronized void delete() { - if(swigCPtr != 0 && swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_OptionsSession(swigCPtr); + if (swigCPtr != 0) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_OptionsSession(swigCPtr); + } + swigCPtr = 0; } - swigCPtr = 0; super.delete(); } diff --git a/trunk/bindings/java/PublicationEvent.java b/trunk/bindings/java/PublicationEvent.java index 88541683..bfbe2ab9 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.39 + * Version 1.3.40 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -25,11 +25,13 @@ public class PublicationEvent extends SipEvent { } public synchronized void delete() { - if(swigCPtr != 0 && swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_PublicationEvent(swigCPtr); + if (swigCPtr != 0) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_PublicationEvent(swigCPtr); + } + swigCPtr = 0; } - swigCPtr = 0; super.delete(); } diff --git a/trunk/bindings/java/PublicationSession.java b/trunk/bindings/java/PublicationSession.java index ecc12876..b1588380 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.39 + * Version 1.3.40 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -25,11 +25,13 @@ public class PublicationSession extends SipSession { } public synchronized void delete() { - if(swigCPtr != 0 && swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_PublicationSession(swigCPtr); + if (swigCPtr != 0) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_PublicationSession(swigCPtr); + } + swigCPtr = 0; } - swigCPtr = 0; super.delete(); } diff --git a/trunk/bindings/java/RegistrationEvent.java b/trunk/bindings/java/RegistrationEvent.java index 921479aa..ac092053 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.39 + * Version 1.3.40 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -25,11 +25,13 @@ public class RegistrationEvent extends SipEvent { } public synchronized void delete() { - if(swigCPtr != 0 && swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_RegistrationEvent(swigCPtr); + if (swigCPtr != 0) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_RegistrationEvent(swigCPtr); + } + swigCPtr = 0; } - swigCPtr = 0; super.delete(); } diff --git a/trunk/bindings/java/RegistrationSession.java b/trunk/bindings/java/RegistrationSession.java index 79a36e5f..77eb31f6 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.39 + * Version 1.3.40 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -25,11 +25,13 @@ public class RegistrationSession extends SipSession { } public synchronized void delete() { - if(swigCPtr != 0 && swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_RegistrationSession(swigCPtr); + if (swigCPtr != 0) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_RegistrationSession(swigCPtr); + } + swigCPtr = 0; } - swigCPtr = 0; super.delete(); } diff --git a/trunk/bindings/java/SafeObject.java b/trunk/bindings/java/SafeObject.java index 4cef0759..bc54590b 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.39 + * Version 1.3.40 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -26,11 +26,13 @@ public class SafeObject { } public synchronized void delete() { - if(swigCPtr != 0 && swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SafeObject(swigCPtr); + if (swigCPtr != 0) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SafeObject(swigCPtr); + } + swigCPtr = 0; } - swigCPtr = 0; } public SafeObject() { diff --git a/trunk/bindings/java/SipCallback.java b/trunk/bindings/java/SipCallback.java index d3d86e53..958b2515 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.39 + * Version 1.3.40 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -26,11 +26,13 @@ public class SipCallback { } public synchronized void delete() { - if(swigCPtr != 0 && swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SipCallback(swigCPtr); + if (swigCPtr != 0) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SipCallback(swigCPtr); + } + swigCPtr = 0; } - swigCPtr = 0; } protected void swigDirectorDisconnect() { @@ -57,6 +59,10 @@ public class SipCallback { return (getClass() == SipCallback.class) ? tinyWRAPJNI.SipCallback_OnDialogEvent(swigCPtr, this, DialogEvent.getCPtr(e), e) : tinyWRAPJNI.SipCallback_OnDialogEventSwigExplicitSipCallback(swigCPtr, this, DialogEvent.getCPtr(e), e); } + public int OnStackEvent(StackEvent e) { + return (getClass() == SipCallback.class) ? tinyWRAPJNI.SipCallback_OnStackEvent(swigCPtr, this, StackEvent.getCPtr(e), e) : tinyWRAPJNI.SipCallback_OnStackEventSwigExplicitSipCallback(swigCPtr, this, StackEvent.getCPtr(e), e); + } + public int OnMessagingEvent(MessagingEvent e) { return (getClass() == SipCallback.class) ? tinyWRAPJNI.SipCallback_OnMessagingEvent(swigCPtr, this, MessagingEvent.getCPtr(e), e) : tinyWRAPJNI.SipCallback_OnMessagingEventSwigExplicitSipCallback(swigCPtr, this, MessagingEvent.getCPtr(e), e); } diff --git a/trunk/bindings/java/SipDebugCallback.java b/trunk/bindings/java/SipDebugCallback.java deleted file mode 100644 index 57c95328..00000000 --- a/trunk/bindings/java/SipDebugCallback.java +++ /dev/null @@ -1,72 +0,0 @@ -/* ---------------------------------------------------------------------------- - * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.39 - * - * Do not make changes to this file unless you know what you are doing--modify - * the SWIG interface file instead. - * ----------------------------------------------------------------------------- */ - -package org.doubango.tinyWRAP; - -public class SipDebugCallback { - private long swigCPtr; - protected boolean swigCMemOwn; - - protected SipDebugCallback(long cPtr, boolean cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = cPtr; - } - - protected static long getCPtr(SipDebugCallback obj) { - return (obj == null) ? 0 : obj.swigCPtr; - } - - protected void finalize() { - delete(); - } - - public synchronized void delete() { - if(swigCPtr != 0 && swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SipDebugCallback(swigCPtr); - } - swigCPtr = 0; - } - - protected void swigDirectorDisconnect() { - swigCMemOwn = false; - delete(); - } - - public void swigReleaseOwnership() { - swigCMemOwn = false; - tinyWRAPJNI.SipDebugCallback_change_ownership(this, swigCPtr, false); - } - - public void swigTakeOwnership() { - swigCMemOwn = true; - tinyWRAPJNI.SipDebugCallback_change_ownership(this, swigCPtr, true); - } - - public SipDebugCallback() { - this(tinyWRAPJNI.new_SipDebugCallback(), true); - tinyWRAPJNI.SipDebugCallback_director_connect(this, swigCPtr, swigCMemOwn, true); - } - - public int OnDebugInfo(String message) { - return (getClass() == SipDebugCallback.class) ? tinyWRAPJNI.SipDebugCallback_OnDebugInfo(swigCPtr, this, message) : tinyWRAPJNI.SipDebugCallback_OnDebugInfoSwigExplicitSipDebugCallback(swigCPtr, this, message); - } - - public int OnDebugWarn(String message) { - return (getClass() == SipDebugCallback.class) ? tinyWRAPJNI.SipDebugCallback_OnDebugWarn(swigCPtr, this, message) : tinyWRAPJNI.SipDebugCallback_OnDebugWarnSwigExplicitSipDebugCallback(swigCPtr, this, message); - } - - public int OnDebugError(String message) { - return (getClass() == SipDebugCallback.class) ? tinyWRAPJNI.SipDebugCallback_OnDebugError(swigCPtr, this, message) : tinyWRAPJNI.SipDebugCallback_OnDebugErrorSwigExplicitSipDebugCallback(swigCPtr, this, message); - } - - public int OnDebugFatal(String message) { - return (getClass() == SipDebugCallback.class) ? tinyWRAPJNI.SipDebugCallback_OnDebugFatal(swigCPtr, this, message) : tinyWRAPJNI.SipDebugCallback_OnDebugFatalSwigExplicitSipDebugCallback(swigCPtr, this, message); - } - -} diff --git a/trunk/bindings/java/SipEvent.java b/trunk/bindings/java/SipEvent.java index 48cab3a9..e446bf63 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.39 + * Version 1.3.40 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -26,11 +26,13 @@ public class SipEvent { } public synchronized void delete() { - if(swigCPtr != 0 && swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SipEvent(swigCPtr); + if (swigCPtr != 0) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SipEvent(swigCPtr); + } + swigCPtr = 0; } - swigCPtr = 0; } public short getCode() { diff --git a/trunk/bindings/java/SipMessage.java b/trunk/bindings/java/SipMessage.java index 29cea744..36a9f812 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.39 + * Version 1.3.40 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -26,11 +26,13 @@ public class SipMessage { } public synchronized void delete() { - if(swigCPtr != 0 && swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SipMessage(swigCPtr); + if (swigCPtr != 0) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SipMessage(swigCPtr); + } + swigCPtr = 0; } - swigCPtr = 0; } public byte[] getSipContent() { diff --git a/trunk/bindings/java/SipSession.java b/trunk/bindings/java/SipSession.java index c9f7e433..31784d11 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.39 + * Version 1.3.40 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -26,11 +26,13 @@ public class SipSession { } public synchronized void delete() { - if(swigCPtr != 0 && swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SipSession(swigCPtr); + if (swigCPtr != 0) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SipSession(swigCPtr); + } + swigCPtr = 0; } - swigCPtr = 0; } protected java.nio.ByteBuffer getByteBuffer(byte[] bytes) { diff --git a/trunk/bindings/java/SipStack.java b/trunk/bindings/java/SipStack.java index af6b2847..c7e3cb0a 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.39 + * Version 1.3.40 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -25,11 +25,13 @@ public class SipStack extends SafeObject { } public synchronized void delete() { - if(swigCPtr != 0 && swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SipStack(swigCPtr); + if (swigCPtr != 0) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SipStack(swigCPtr); + } + swigCPtr = 0; } - swigCPtr = 0; super.delete(); } @@ -41,8 +43,8 @@ public class SipStack extends SafeObject { return tinyWRAPJNI.SipStack_start(swigCPtr, this); } - public boolean setDebugCallback(SipDebugCallback callback) { - return tinyWRAPJNI.SipStack_setDebugCallback(swigCPtr, this, SipDebugCallback.getCPtr(callback), callback); + public boolean setDebugCallback(DDebugCallback callback) { + return tinyWRAPJNI.SipStack_setDebugCallback(swigCPtr, this, DDebugCallback.getCPtr(callback), callback); } public boolean setRealm(String realm_uri) { diff --git a/trunk/bindings/java/SipUri.java b/trunk/bindings/java/SipUri.java index 81dc1aae..a97a40de 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.39 + * Version 1.3.40 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -26,11 +26,13 @@ public class SipUri { } public synchronized void delete() { - if(swigCPtr != 0 && swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SipUri(swigCPtr); + if (swigCPtr != 0) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SipUri(swigCPtr); + } + swigCPtr = 0; } - swigCPtr = 0; } public SipUri(String arg0) { diff --git a/trunk/bindings/java/StackEvent.java b/trunk/bindings/java/StackEvent.java new file mode 100644 index 00000000..fb27e804 --- /dev/null +++ b/trunk/bindings/java/StackEvent.java @@ -0,0 +1,38 @@ +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 1.3.40 + * + * Do not make changes to this file unless you know what you are doing--modify + * the SWIG interface file instead. + * ----------------------------------------------------------------------------- */ + +package org.doubango.tinyWRAP; + +public class StackEvent extends SipEvent { + private long swigCPtr; + + protected StackEvent(long cPtr, boolean cMemoryOwn) { + super(tinyWRAPJNI.SWIGStackEventUpcast(cPtr), cMemoryOwn); + swigCPtr = cPtr; + } + + protected static long getCPtr(StackEvent obj) { + return (obj == null) ? 0 : obj.swigCPtr; + } + + protected void finalize() { + delete(); + } + + public synchronized void delete() { + if (swigCPtr != 0) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_StackEvent(swigCPtr); + } + swigCPtr = 0; + } + super.delete(); + } + +} diff --git a/trunk/bindings/java/SubscriptionEvent.java b/trunk/bindings/java/SubscriptionEvent.java index 03d6345c..8112ee5a 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.39 + * Version 1.3.40 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -25,11 +25,13 @@ public class SubscriptionEvent extends SipEvent { } public synchronized void delete() { - if(swigCPtr != 0 && swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SubscriptionEvent(swigCPtr); + if (swigCPtr != 0) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SubscriptionEvent(swigCPtr); + } + swigCPtr = 0; } - swigCPtr = 0; super.delete(); } diff --git a/trunk/bindings/java/SubscriptionSession.java b/trunk/bindings/java/SubscriptionSession.java index 64111e8e..481c140d 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.39 + * Version 1.3.40 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -25,11 +25,13 @@ public class SubscriptionSession extends SipSession { } public synchronized void delete() { - if(swigCPtr != 0 && swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SubscriptionSession(swigCPtr); + if (swigCPtr != 0) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SubscriptionSession(swigCPtr); + } + swigCPtr = 0; } - swigCPtr = 0; super.delete(); } diff --git a/trunk/bindings/java/android/DDebugCallback.java b/trunk/bindings/java/android/DDebugCallback.java new file mode 100644 index 00000000..a5ee1a64 --- /dev/null +++ b/trunk/bindings/java/android/DDebugCallback.java @@ -0,0 +1,58 @@ +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 1.3.40 + * + * Do not make changes to this file unless you know what you are doing--modify + * the SWIG interface file instead. + * ----------------------------------------------------------------------------- */ + +package org.doubango.tinyWRAP; + +public class DDebugCallback { + private long swigCPtr; + protected boolean swigCMemOwn; + + protected DDebugCallback(long cPtr, boolean cMemoryOwn) { + swigCMemOwn = cMemoryOwn; + swigCPtr = cPtr; + } + + protected static long getCPtr(DDebugCallback obj) { + return (obj == null) ? 0 : obj.swigCPtr; + } + + protected void finalize() { + delete(); + } + + public synchronized void delete() { + if (swigCPtr != 0) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_DDebugCallback(swigCPtr); + } + swigCPtr = 0; + } + } + + public DDebugCallback() { + this(tinyWRAPJNI.new_DDebugCallback(), true); + } + + public int OnDebugInfo(String message) { + return tinyWRAPJNI.DDebugCallback_OnDebugInfo(swigCPtr, this, message); + } + + public int OnDebugWarn(String message) { + return tinyWRAPJNI.DDebugCallback_OnDebugWarn(swigCPtr, this, message); + } + + public int OnDebugError(String message) { + return tinyWRAPJNI.DDebugCallback_OnDebugError(swigCPtr, this, message); + } + + public int OnDebugFatal(String message) { + return tinyWRAPJNI.DDebugCallback_OnDebugFatal(swigCPtr, this, message); + } + +} diff --git a/trunk/bindings/java/android/DialogEvent.java b/trunk/bindings/java/android/DialogEvent.java index ac409f64..93ec1f60 100644 --- a/trunk/bindings/java/android/DialogEvent.java +++ b/trunk/bindings/java/android/DialogEvent.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.39 + * Version 1.3.40 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -25,11 +25,13 @@ public class DialogEvent extends SipEvent { } public synchronized void delete() { - if(swigCPtr != 0 && swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_DialogEvent(swigCPtr); + if (swigCPtr != 0) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_DialogEvent(swigCPtr); + } + swigCPtr = 0; } - swigCPtr = 0; super.delete(); } diff --git a/trunk/bindings/java/android/MessagingEvent.java b/trunk/bindings/java/android/MessagingEvent.java index c502d313..041945eb 100644 --- a/trunk/bindings/java/android/MessagingEvent.java +++ b/trunk/bindings/java/android/MessagingEvent.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.39 + * Version 1.3.40 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -25,11 +25,13 @@ public class MessagingEvent extends SipEvent { } public synchronized void delete() { - if(swigCPtr != 0 && swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_MessagingEvent(swigCPtr); + if (swigCPtr != 0) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_MessagingEvent(swigCPtr); + } + swigCPtr = 0; } - swigCPtr = 0; super.delete(); } diff --git a/trunk/bindings/java/android/MessagingSession.java b/trunk/bindings/java/android/MessagingSession.java index 577f18aa..3b15b89b 100644 --- a/trunk/bindings/java/android/MessagingSession.java +++ b/trunk/bindings/java/android/MessagingSession.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.39 + * Version 1.3.40 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -25,11 +25,13 @@ public class MessagingSession extends SipSession { } public synchronized void delete() { - if(swigCPtr != 0 && swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_MessagingSession(swigCPtr); + if (swigCPtr != 0) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_MessagingSession(swigCPtr); + } + swigCPtr = 0; } - swigCPtr = 0; super.delete(); } diff --git a/trunk/bindings/java/android/OptionsEvent.java b/trunk/bindings/java/android/OptionsEvent.java index ca776844..aa6054f6 100644 --- a/trunk/bindings/java/android/OptionsEvent.java +++ b/trunk/bindings/java/android/OptionsEvent.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.39 + * Version 1.3.40 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -25,11 +25,13 @@ public class OptionsEvent extends SipEvent { } public synchronized void delete() { - if(swigCPtr != 0 && swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_OptionsEvent(swigCPtr); + if (swigCPtr != 0) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_OptionsEvent(swigCPtr); + } + swigCPtr = 0; } - swigCPtr = 0; super.delete(); } diff --git a/trunk/bindings/java/android/OptionsSession.java b/trunk/bindings/java/android/OptionsSession.java index 1a662e04..f3c8041c 100644 --- a/trunk/bindings/java/android/OptionsSession.java +++ b/trunk/bindings/java/android/OptionsSession.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.39 + * Version 1.3.40 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -25,11 +25,13 @@ public class OptionsSession extends SipSession { } public synchronized void delete() { - if(swigCPtr != 0 && swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_OptionsSession(swigCPtr); + if (swigCPtr != 0) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_OptionsSession(swigCPtr); + } + swigCPtr = 0; } - swigCPtr = 0; super.delete(); } diff --git a/trunk/bindings/java/android/PublicationEvent.java b/trunk/bindings/java/android/PublicationEvent.java index 88541683..bfbe2ab9 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.39 + * Version 1.3.40 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -25,11 +25,13 @@ public class PublicationEvent extends SipEvent { } public synchronized void delete() { - if(swigCPtr != 0 && swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_PublicationEvent(swigCPtr); + if (swigCPtr != 0) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_PublicationEvent(swigCPtr); + } + swigCPtr = 0; } - swigCPtr = 0; super.delete(); } diff --git a/trunk/bindings/java/android/PublicationSession.java b/trunk/bindings/java/android/PublicationSession.java index ecc12876..b1588380 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.39 + * Version 1.3.40 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -25,11 +25,13 @@ public class PublicationSession extends SipSession { } public synchronized void delete() { - if(swigCPtr != 0 && swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_PublicationSession(swigCPtr); + if (swigCPtr != 0) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_PublicationSession(swigCPtr); + } + swigCPtr = 0; } - swigCPtr = 0; super.delete(); } diff --git a/trunk/bindings/java/android/RegistrationEvent.java b/trunk/bindings/java/android/RegistrationEvent.java index 921479aa..ac092053 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.39 + * Version 1.3.40 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -25,11 +25,13 @@ public class RegistrationEvent extends SipEvent { } public synchronized void delete() { - if(swigCPtr != 0 && swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_RegistrationEvent(swigCPtr); + if (swigCPtr != 0) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_RegistrationEvent(swigCPtr); + } + swigCPtr = 0; } - swigCPtr = 0; super.delete(); } diff --git a/trunk/bindings/java/android/RegistrationSession.java b/trunk/bindings/java/android/RegistrationSession.java index 79a36e5f..77eb31f6 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.39 + * Version 1.3.40 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -25,11 +25,13 @@ public class RegistrationSession extends SipSession { } public synchronized void delete() { - if(swigCPtr != 0 && swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_RegistrationSession(swigCPtr); + if (swigCPtr != 0) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_RegistrationSession(swigCPtr); + } + swigCPtr = 0; } - swigCPtr = 0; super.delete(); } diff --git a/trunk/bindings/java/android/SafeObject.java b/trunk/bindings/java/android/SafeObject.java index 4cef0759..bc54590b 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.39 + * Version 1.3.40 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -26,11 +26,13 @@ public class SafeObject { } public synchronized void delete() { - if(swigCPtr != 0 && swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SafeObject(swigCPtr); + if (swigCPtr != 0) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SafeObject(swigCPtr); + } + swigCPtr = 0; } - swigCPtr = 0; } public SafeObject() { diff --git a/trunk/bindings/java/android/SipCallback.java b/trunk/bindings/java/android/SipCallback.java index 00075255..aeb42efa 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.39 + * Version 1.3.40 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -26,11 +26,13 @@ public class SipCallback { } public synchronized void delete() { - if(swigCPtr != 0 && swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SipCallback(swigCPtr); + if (swigCPtr != 0) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SipCallback(swigCPtr); + } + swigCPtr = 0; } - swigCPtr = 0; } protected void swigDirectorDisconnect() { @@ -57,6 +59,10 @@ public class SipCallback { return (getClass() == SipCallback.class) ? tinyWRAPJNI.SipCallback_OnDialogEvent(swigCPtr, this, DialogEvent.getCPtr(e), e) : tinyWRAPJNI.SipCallback_OnDialogEventSwigExplicitSipCallback(swigCPtr, this, DialogEvent.getCPtr(e), e); } + public int OnStackEvent(StackEvent e) { + return (getClass() == SipCallback.class) ? tinyWRAPJNI.SipCallback_OnStackEvent(swigCPtr, this, StackEvent.getCPtr(e), e) : tinyWRAPJNI.SipCallback_OnStackEventSwigExplicitSipCallback(swigCPtr, this, StackEvent.getCPtr(e), e); + } + public int OnMessagingEvent(MessagingEvent e) { return (getClass() == SipCallback.class) ? tinyWRAPJNI.SipCallback_OnMessagingEvent(swigCPtr, this, MessagingEvent.getCPtr(e), e) : tinyWRAPJNI.SipCallback_OnMessagingEventSwigExplicitSipCallback(swigCPtr, this, MessagingEvent.getCPtr(e), e); } diff --git a/trunk/bindings/java/android/SipDebugCallback.java b/trunk/bindings/java/android/SipDebugCallback.java deleted file mode 100644 index 05ae1214..00000000 --- a/trunk/bindings/java/android/SipDebugCallback.java +++ /dev/null @@ -1,72 +0,0 @@ -/* ---------------------------------------------------------------------------- - * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.39 - * - * Do not make changes to this file unless you know what you are doing--modify - * the SWIG interface file instead. - * ----------------------------------------------------------------------------- */ - -package org.doubango.tinyWRAP; - -public class SipDebugCallback { - private long swigCPtr; - protected boolean swigCMemOwn; - - protected SipDebugCallback(long cPtr, boolean cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = cPtr; - } - - protected static long getCPtr(SipDebugCallback obj) { - return (obj == null) ? 0 : obj.swigCPtr; - } - - protected void finalize() { - delete(); - } - - public synchronized void delete() { - if(swigCPtr != 0 && swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SipDebugCallback(swigCPtr); - } - swigCPtr = 0; - } - - protected void swigDirectorDisconnect() { - swigCMemOwn = false; - delete(); - } - - public void swigReleaseOwnership() { - swigCMemOwn = false; - tinyWRAPJNI.SipDebugCallback_change_ownership(this, swigCPtr, false); - } - - public void swigTakeOwnership() { - swigCMemOwn = true; - tinyWRAPJNI.SipDebugCallback_change_ownership(this, swigCPtr, true); - } - - public SipDebugCallback() { - this(tinyWRAPJNI.new_SipDebugCallback(), true); - tinyWRAPJNI.SipDebugCallback_director_connect(this, swigCPtr, swigCMemOwn, false); - } - - public int OnDebugInfo(String message) { - return (getClass() == SipDebugCallback.class) ? tinyWRAPJNI.SipDebugCallback_OnDebugInfo(swigCPtr, this, message) : tinyWRAPJNI.SipDebugCallback_OnDebugInfoSwigExplicitSipDebugCallback(swigCPtr, this, message); - } - - public int OnDebugWarn(String message) { - return (getClass() == SipDebugCallback.class) ? tinyWRAPJNI.SipDebugCallback_OnDebugWarn(swigCPtr, this, message) : tinyWRAPJNI.SipDebugCallback_OnDebugWarnSwigExplicitSipDebugCallback(swigCPtr, this, message); - } - - public int OnDebugError(String message) { - return (getClass() == SipDebugCallback.class) ? tinyWRAPJNI.SipDebugCallback_OnDebugError(swigCPtr, this, message) : tinyWRAPJNI.SipDebugCallback_OnDebugErrorSwigExplicitSipDebugCallback(swigCPtr, this, message); - } - - public int OnDebugFatal(String message) { - return (getClass() == SipDebugCallback.class) ? tinyWRAPJNI.SipDebugCallback_OnDebugFatal(swigCPtr, this, message) : tinyWRAPJNI.SipDebugCallback_OnDebugFatalSwigExplicitSipDebugCallback(swigCPtr, this, message); - } - -} diff --git a/trunk/bindings/java/android/SipEvent.java b/trunk/bindings/java/android/SipEvent.java index 48cab3a9..e446bf63 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.39 + * Version 1.3.40 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -26,11 +26,13 @@ public class SipEvent { } public synchronized void delete() { - if(swigCPtr != 0 && swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SipEvent(swigCPtr); + if (swigCPtr != 0) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SipEvent(swigCPtr); + } + swigCPtr = 0; } - swigCPtr = 0; } public short getCode() { diff --git a/trunk/bindings/java/android/SipMessage.java b/trunk/bindings/java/android/SipMessage.java index 29cea744..36a9f812 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.39 + * Version 1.3.40 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -26,11 +26,13 @@ public class SipMessage { } public synchronized void delete() { - if(swigCPtr != 0 && swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SipMessage(swigCPtr); + if (swigCPtr != 0) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SipMessage(swigCPtr); + } + swigCPtr = 0; } - swigCPtr = 0; } public byte[] getSipContent() { diff --git a/trunk/bindings/java/android/SipSession.java b/trunk/bindings/java/android/SipSession.java index c9f7e433..31784d11 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.39 + * Version 1.3.40 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -26,11 +26,13 @@ public class SipSession { } public synchronized void delete() { - if(swigCPtr != 0 && swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SipSession(swigCPtr); + if (swigCPtr != 0) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SipSession(swigCPtr); + } + swigCPtr = 0; } - swigCPtr = 0; } protected java.nio.ByteBuffer getByteBuffer(byte[] bytes) { diff --git a/trunk/bindings/java/android/SipStack.java b/trunk/bindings/java/android/SipStack.java index af6b2847..c7e3cb0a 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.39 + * Version 1.3.40 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -25,11 +25,13 @@ public class SipStack extends SafeObject { } public synchronized void delete() { - if(swigCPtr != 0 && swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SipStack(swigCPtr); + if (swigCPtr != 0) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SipStack(swigCPtr); + } + swigCPtr = 0; } - swigCPtr = 0; super.delete(); } @@ -41,8 +43,8 @@ public class SipStack extends SafeObject { return tinyWRAPJNI.SipStack_start(swigCPtr, this); } - public boolean setDebugCallback(SipDebugCallback callback) { - return tinyWRAPJNI.SipStack_setDebugCallback(swigCPtr, this, SipDebugCallback.getCPtr(callback), callback); + public boolean setDebugCallback(DDebugCallback callback) { + return tinyWRAPJNI.SipStack_setDebugCallback(swigCPtr, this, DDebugCallback.getCPtr(callback), callback); } public boolean setRealm(String realm_uri) { diff --git a/trunk/bindings/java/android/SipUri.java b/trunk/bindings/java/android/SipUri.java index 81dc1aae..a97a40de 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.39 + * Version 1.3.40 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -26,11 +26,13 @@ public class SipUri { } public synchronized void delete() { - if(swigCPtr != 0 && swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SipUri(swigCPtr); + if (swigCPtr != 0) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SipUri(swigCPtr); + } + swigCPtr = 0; } - swigCPtr = 0; } public SipUri(String arg0) { diff --git a/trunk/bindings/java/android/StackEvent.java b/trunk/bindings/java/android/StackEvent.java new file mode 100644 index 00000000..fb27e804 --- /dev/null +++ b/trunk/bindings/java/android/StackEvent.java @@ -0,0 +1,38 @@ +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 1.3.40 + * + * Do not make changes to this file unless you know what you are doing--modify + * the SWIG interface file instead. + * ----------------------------------------------------------------------------- */ + +package org.doubango.tinyWRAP; + +public class StackEvent extends SipEvent { + private long swigCPtr; + + protected StackEvent(long cPtr, boolean cMemoryOwn) { + super(tinyWRAPJNI.SWIGStackEventUpcast(cPtr), cMemoryOwn); + swigCPtr = cPtr; + } + + protected static long getCPtr(StackEvent obj) { + return (obj == null) ? 0 : obj.swigCPtr; + } + + protected void finalize() { + delete(); + } + + public synchronized void delete() { + if (swigCPtr != 0) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_StackEvent(swigCPtr); + } + swigCPtr = 0; + } + super.delete(); + } + +} diff --git a/trunk/bindings/java/android/SubscriptionEvent.java b/trunk/bindings/java/android/SubscriptionEvent.java index 03d6345c..8112ee5a 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.39 + * Version 1.3.40 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -25,11 +25,13 @@ public class SubscriptionEvent extends SipEvent { } public synchronized void delete() { - if(swigCPtr != 0 && swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SubscriptionEvent(swigCPtr); + if (swigCPtr != 0) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SubscriptionEvent(swigCPtr); + } + swigCPtr = 0; } - swigCPtr = 0; super.delete(); } diff --git a/trunk/bindings/java/android/SubscriptionSession.java b/trunk/bindings/java/android/SubscriptionSession.java index 64111e8e..481c140d 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.39 + * Version 1.3.40 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -25,11 +25,13 @@ public class SubscriptionSession extends SipSession { } public synchronized void delete() { - if(swigCPtr != 0 && swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SubscriptionSession(swigCPtr); + if (swigCPtr != 0) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SubscriptionSession(swigCPtr); + } + swigCPtr = 0; } - swigCPtr = 0; super.delete(); } diff --git a/trunk/bindings/java/android/droid-makefile b/trunk/bindings/java/android/droid-makefile index e66033ce..308e4f4a 100644 --- a/trunk/bindings/java/android/droid-makefile +++ b/trunk/bindings/java/android/droid-makefile @@ -1,16 +1,16 @@ APP := lib$(PROJECT).$(EXT) CFLAGS := $(CFLAGS_LIB) -fno-rtti -fno-exceptions -I../../_common -I../../. -I../../../tinySAK/src -I../../../tinyNET/src -I../../../tinyHTTP/include -I../../../tinySIP/include -LDFLAGS := $(LDFLAGS_LIB) -lstdc++ -ltinySAK -ltinyHTTP -ltinyIPSec -ltinyNET -ltinySIP +LDFLAGS := $(LDFLAGS_LIB) -lstdc++ -llog -ltinySAK -ltinyHTTP -ltinyIPSec -ltinyNET -ltinySIP all: $(APP) OBJS = tinyWRAP_wrap.o\ + ../../_common/DDebug.o \ ../../_common/SafeObject.o \ ../../_common/SipCallback.o \ - ../../_common/SipDebug.o \ ../../_common/SipEvent.o \ ../../_common/SipMessage.o \ ../../_common/SipSession.o \ diff --git a/trunk/bindings/java/android/tinyWRAP.java b/trunk/bindings/java/android/tinyWRAP.java index d10c59ad..9b29ff1c 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.39 + * Version 1.3.40 * * 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/tinyWRAPConstants.java b/trunk/bindings/java/android/tinyWRAPConstants.java index 40444189..673ed5c0 100644 --- a/trunk/bindings/java/android/tinyWRAPConstants.java +++ b/trunk/bindings/java/android/tinyWRAPConstants.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.39 + * Version 1.3.40 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -10,7 +10,7 @@ package org.doubango.tinyWRAP; public interface tinyWRAPConstants { public final static int tsip_event_code_dialog_transport_error = 702; - public final static int tsip_event_code_global_error = 703; + public final static int tsip_event_code_dialog_global_error = 703; public final static int tsip_event_code_dialog_message_error = 704; public final static int tsip_event_code_dialog_request_incoming = 800; public final static int tsip_event_code_dialog_request_cancelled = 801; @@ -19,4 +19,8 @@ public interface tinyWRAPConstants { public final static int tsip_event_code_dialog_connected = 901; public final static int tsip_event_code_dialog_terminating = 902; public final static int tsip_event_code_dialog_terminated = 903; + public final static int tsip_event_code_stack_started = 950; + public final static int tsip_event_code_stack_stopped = 951; + public final static int tsip_event_code_stack_failed_to_start = 952; + public final static int tsip_event_code_stack_failed_to_stop = 953; } diff --git a/trunk/bindings/java/android/tinyWRAPJNI.java b/trunk/bindings/java/android/tinyWRAPJNI.java index 00d8f2dc..9b27d72b 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.39 + * Version 1.3.40 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -9,6 +9,12 @@ package org.doubango.tinyWRAP; class tinyWRAPJNI { + public final static native long new_DDebugCallback(); + public final static native void delete_DDebugCallback(long jarg1); + public final static native int DDebugCallback_OnDebugInfo(long jarg1, DDebugCallback jarg1_, String jarg2); + public final static native int DDebugCallback_OnDebugWarn(long jarg1, DDebugCallback jarg1_, String jarg2); + public final static native int DDebugCallback_OnDebugError(long jarg1, DDebugCallback jarg1_, String jarg2); + public final static native int DDebugCallback_OnDebugFatal(long jarg1, DDebugCallback jarg1_, String jarg2); public final static native long new_SipUri(String jarg1); public final static native void delete_SipUri(long jarg1); public final static native boolean SipUri_isValid__SWIG_0(String jarg1); @@ -27,6 +33,7 @@ class tinyWRAPJNI { public final static native long SipEvent_getBaseSession(long jarg1, SipEvent jarg1_); public final static native long SipEvent_getSipMessage(long jarg1, SipEvent jarg1_); public final static native void delete_DialogEvent(long jarg1); + public final static native void delete_StackEvent(long jarg1); public final static native void delete_MessagingEvent(long jarg1); public final static native int MessagingEvent_getType(long jarg1, MessagingEvent jarg1_); public final static native long MessagingEvent_getSession(long jarg1, MessagingEvent jarg1_); @@ -80,6 +87,8 @@ class tinyWRAPJNI { public final static native void delete_SipCallback(long jarg1); public final static native int SipCallback_OnDialogEvent(long jarg1, SipCallback jarg1_, long jarg2, DialogEvent jarg2_); public final static native int SipCallback_OnDialogEventSwigExplicitSipCallback(long jarg1, SipCallback jarg1_, long jarg2, DialogEvent jarg2_); + public final static native int SipCallback_OnStackEvent(long jarg1, SipCallback jarg1_, long jarg2, StackEvent jarg2_); + public final static native int SipCallback_OnStackEventSwigExplicitSipCallback(long jarg1, SipCallback jarg1_, long jarg2, StackEvent jarg2_); public final static native int SipCallback_OnMessagingEvent(long jarg1, SipCallback jarg1_, long jarg2, MessagingEvent jarg2_); public final static native int SipCallback_OnMessagingEventSwigExplicitSipCallback(long jarg1, SipCallback jarg1_, long jarg2, MessagingEvent jarg2_); public final static native int SipCallback_OnOptionsEvent(long jarg1, SipCallback jarg1_, long jarg2, OptionsEvent jarg2_); @@ -92,18 +101,6 @@ class tinyWRAPJNI { public final static native int SipCallback_OnSubscriptionEventSwigExplicitSipCallback(long jarg1, SipCallback jarg1_, long jarg2, SubscriptionEvent jarg2_); public final static native void SipCallback_director_connect(SipCallback obj, long cptr, boolean mem_own, boolean weak_global); public final static native void SipCallback_change_ownership(SipCallback obj, long cptr, boolean take_or_release); - public final static native long new_SipDebugCallback(); - public final static native void delete_SipDebugCallback(long jarg1); - public final static native int SipDebugCallback_OnDebugInfo(long jarg1, SipDebugCallback jarg1_, String jarg2); - public final static native int SipDebugCallback_OnDebugInfoSwigExplicitSipDebugCallback(long jarg1, SipDebugCallback jarg1_, String jarg2); - public final static native int SipDebugCallback_OnDebugWarn(long jarg1, SipDebugCallback jarg1_, String jarg2); - public final static native int SipDebugCallback_OnDebugWarnSwigExplicitSipDebugCallback(long jarg1, SipDebugCallback jarg1_, String jarg2); - public final static native int SipDebugCallback_OnDebugError(long jarg1, SipDebugCallback jarg1_, String jarg2); - public final static native int SipDebugCallback_OnDebugErrorSwigExplicitSipDebugCallback(long jarg1, SipDebugCallback jarg1_, String jarg2); - public final static native int SipDebugCallback_OnDebugFatal(long jarg1, SipDebugCallback jarg1_, String jarg2); - public final static native int SipDebugCallback_OnDebugFatalSwigExplicitSipDebugCallback(long jarg1, SipDebugCallback jarg1_, String jarg2); - public final static native void SipDebugCallback_director_connect(SipDebugCallback obj, long cptr, boolean mem_own, boolean weak_global); - public final static native void SipDebugCallback_change_ownership(SipDebugCallback obj, long cptr, boolean take_or_release); public final static native long new_SafeObject(); public final static native void delete_SafeObject(long jarg1); public final static native int SafeObject_Lock(long jarg1, SafeObject jarg1_); @@ -111,7 +108,7 @@ class tinyWRAPJNI { public final static native long new_SipStack(long jarg1, SipCallback jarg1_, String jarg2, String jarg3, String jarg4); public final static native void delete_SipStack(long jarg1); public final static native boolean SipStack_start(long jarg1, SipStack jarg1_); - public final static native boolean SipStack_setDebugCallback(long jarg1, SipStack jarg1_, long jarg2, SipDebugCallback jarg2_); + public final static native boolean SipStack_setDebugCallback(long jarg1, SipStack jarg1_, long jarg2, DDebugCallback jarg2_); public final static native boolean SipStack_setRealm(long jarg1, SipStack jarg1_, String jarg2); public final static native boolean SipStack_setIMPI(long jarg1, SipStack jarg1_, String jarg2); public final static native boolean SipStack_setIMPU(long jarg1, SipStack jarg1_, String jarg2); @@ -127,6 +124,7 @@ class tinyWRAPJNI { public final static native boolean SipStack_isValid(long jarg1, SipStack jarg1_); public final static native boolean SipStack_stop(long jarg1, SipStack jarg1_); public final static native long SWIGDialogEventUpcast(long jarg1); + public final static native long SWIGStackEventUpcast(long jarg1); public final static native long SWIGMessagingEventUpcast(long jarg1); public final static native long SWIGOptionsEventUpcast(long jarg1); public final static native long SWIGPublicationEventUpcast(long jarg1); @@ -142,6 +140,9 @@ class tinyWRAPJNI { public static int SwigDirector_SipCallback_OnDialogEvent(SipCallback self, long e) { return self.OnDialogEvent((e == 0) ? null : new DialogEvent(e, false)); } + public static int SwigDirector_SipCallback_OnStackEvent(SipCallback self, long e) { + return self.OnStackEvent((e == 0) ? null : new StackEvent(e, false)); + } public static int SwigDirector_SipCallback_OnMessagingEvent(SipCallback self, long e) { return self.OnMessagingEvent((e == 0) ? null : new MessagingEvent(e, false)); } @@ -157,18 +158,6 @@ class tinyWRAPJNI { public static int SwigDirector_SipCallback_OnSubscriptionEvent(SipCallback self, long e) { return self.OnSubscriptionEvent((e == 0) ? null : new SubscriptionEvent(e, false)); } - public static int SwigDirector_SipDebugCallback_OnDebugInfo(SipDebugCallback self, String message) { - return self.OnDebugInfo(message); - } - public static int SwigDirector_SipDebugCallback_OnDebugWarn(SipDebugCallback self, String message) { - return self.OnDebugWarn(message); - } - public static int SwigDirector_SipDebugCallback_OnDebugError(SipDebugCallback self, String message) { - return self.OnDebugError(message); - } - public static int SwigDirector_SipDebugCallback_OnDebugFatal(SipDebugCallback self, String message) { - return self.OnDebugFatal(message); - } private final static native void swig_module_init(); static { diff --git a/trunk/bindings/java/android/tinyWRAP_wrap.cxx b/trunk/bindings/java/android/tinyWRAP_wrap.cxx index db208a72..06eaa0e9 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.39 + * Version 1.3.40 * * 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,7 +193,8 @@ 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) @@ -403,16 +404,18 @@ namespace Swig { namespace Swig { static jclass jclass_tinyWRAPJNI = NULL; - static jmethodID director_methids[10]; + static jmethodID director_methids[7]; } +#include "DDebug.h" + + #include "SipUri.h" #include "SipMessage.h" #include "SipEvent.h" #include "SipSession.h" #include "SipCallback.h" -#include "SipDebug.h" #include "SafeObject.h" #include "SipStack.h" @@ -456,7 +459,7 @@ int SwigDirector_SipCallback::OnDialogEvent(DialogEvent const *e) { return c_result; } -int SwigDirector_SipCallback::OnMessagingEvent(MessagingEvent const *e) { +int SwigDirector_SipCallback::OnStackEvent(StackEvent const *e) { int c_result = SwigValueInit< int >() ; jint jresult = 0 ; JNIEnvWrapper swigjnienv(this) ; @@ -465,12 +468,36 @@ int SwigDirector_SipCallback::OnMessagingEvent(MessagingEvent const *e) { jlong je = 0 ; if (!swig_override[1]) { + return SipCallback::OnStackEvent(e); + } + swigjobj = swig_get_self(jenv); + if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) { + *((StackEvent **)&je) = (StackEvent *) e; + jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[1], swigjobj, je); + if (jenv->ExceptionOccurred()) return c_result; + c_result = (int)jresult; + } else { + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null upcall object"); + } + if (swigjobj) jenv->DeleteLocalRef(swigjobj); + return c_result; +} + +int SwigDirector_SipCallback::OnMessagingEvent(MessagingEvent const *e) { + int c_result = SwigValueInit< int >() ; + jint jresult = 0 ; + JNIEnvWrapper swigjnienv(this) ; + JNIEnv * jenv = swigjnienv.getJNIEnv() ; + jobject swigjobj = (jobject) NULL ; + jlong je = 0 ; + + if (!swig_override[2]) { return SipCallback::OnMessagingEvent(e); } swigjobj = swig_get_self(jenv); if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) { *((MessagingEvent **)&je) = (MessagingEvent *) e; - jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[1], swigjobj, je); + jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[2], swigjobj, je); if (jenv->ExceptionOccurred()) return c_result; c_result = (int)jresult; } else { @@ -488,13 +515,13 @@ int SwigDirector_SipCallback::OnOptionsEvent(OptionsEvent const *e) { jobject swigjobj = (jobject) NULL ; jlong je = 0 ; - if (!swig_override[2]) { + if (!swig_override[3]) { return SipCallback::OnOptionsEvent(e); } swigjobj = swig_get_self(jenv); if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) { *((OptionsEvent **)&je) = (OptionsEvent *) e; - jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[2], swigjobj, je); + jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[3], swigjobj, je); if (jenv->ExceptionOccurred()) return c_result; c_result = (int)jresult; } else { @@ -512,13 +539,13 @@ int SwigDirector_SipCallback::OnPublicationEvent(PublicationEvent const *e) { jobject swigjobj = (jobject) NULL ; jlong je = 0 ; - if (!swig_override[3]) { + if (!swig_override[4]) { return SipCallback::OnPublicationEvent(e); } swigjobj = swig_get_self(jenv); if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) { *((PublicationEvent **)&je) = (PublicationEvent *) e; - jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[3], swigjobj, je); + jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[4], swigjobj, je); if (jenv->ExceptionOccurred()) return c_result; c_result = (int)jresult; } else { @@ -536,13 +563,13 @@ int SwigDirector_SipCallback::OnRegistrationEvent(RegistrationEvent const *e) { jobject swigjobj = (jobject) NULL ; jlong je = 0 ; - if (!swig_override[4]) { + if (!swig_override[5]) { return SipCallback::OnRegistrationEvent(e); } swigjobj = swig_get_self(jenv); if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) { *((RegistrationEvent **)&je) = (RegistrationEvent *) e; - jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[4], swigjobj, je); + jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[5], swigjobj, je); if (jenv->ExceptionOccurred()) return c_result; c_result = (int)jresult; } else { @@ -560,13 +587,13 @@ int SwigDirector_SipCallback::OnSubscriptionEvent(SubscriptionEvent const *e) { jobject swigjobj = (jobject) NULL ; jlong je = 0 ; - if (!swig_override[5]) { + if (!swig_override[6]) { return SipCallback::OnSubscriptionEvent(e); } swigjobj = swig_get_self(jenv); if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) { *((SubscriptionEvent **)&je) = (SubscriptionEvent *) e; - jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[5], swigjobj, je); + jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[6], swigjobj, je); if (jenv->ExceptionOccurred()) return c_result; c_result = (int)jresult; } else { @@ -585,6 +612,9 @@ void SwigDirector_SipCallback::swig_connect_director(JNIEnv *jenv, jobject jself { "OnDialogEvent", "(Lorg/doubango/tinyWRAP/DialogEvent;)I", NULL }, + { + "OnStackEvent", "(Lorg/doubango/tinyWRAP/StackEvent;)I", NULL + }, { "OnMessagingEvent", "(Lorg/doubango/tinyWRAP/MessagingEvent;)I", NULL }, @@ -611,172 +641,7 @@ void SwigDirector_SipCallback::swig_connect_director(JNIEnv *jenv, jobject jself baseclass = (jclass) jenv->NewGlobalRef(baseclass); } bool derived = (jenv->IsSameObject(baseclass, jcls) ? false : true); - for (int i = 0; i < 6; ++i) { - if (!methods[i].base_methid) { - methods[i].base_methid = jenv->GetMethodID(baseclass, methods[i].mname, methods[i].mdesc); - if (!methods[i].base_methid) return; - } - swig_override[i] = false; - if (derived) { - jmethodID methid = jenv->GetMethodID(jcls, methods[i].mname, methods[i].mdesc); - swig_override[i] = (methid != methods[i].base_methid); - jenv->ExceptionClear(); - } - } - } -} - - -SwigDirector_SipDebugCallback::SwigDirector_SipDebugCallback(JNIEnv *jenv) : SipDebugCallback(), Swig::Director(jenv) { -} - -SwigDirector_SipDebugCallback::~SwigDirector_SipDebugCallback() { - swig_disconnect_director_self("swigDirectorDisconnect"); -} - - -int SwigDirector_SipDebugCallback::OnDebugInfo(char const *message) { - int c_result = SwigValueInit< int >() ; - jint jresult = 0 ; - JNIEnvWrapper swigjnienv(this) ; - JNIEnv * jenv = swigjnienv.getJNIEnv() ; - jobject swigjobj = (jobject) NULL ; - jstring jmessage = 0 ; - - if (!swig_override[0]) { - return SipDebugCallback::OnDebugInfo(message); - } - swigjobj = swig_get_self(jenv); - if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) { - jmessage = 0; - if (message) { - jmessage = jenv->NewStringUTF((const char *)message); - if (!jmessage) return c_result; - } - jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[6], swigjobj, jmessage); - if (jenv->ExceptionOccurred()) return c_result; - c_result = (int)jresult; - } else { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null upcall object"); - } - if (swigjobj) jenv->DeleteLocalRef(swigjobj); - return c_result; -} - -int SwigDirector_SipDebugCallback::OnDebugWarn(char const *message) { - int c_result = SwigValueInit< int >() ; - jint jresult = 0 ; - JNIEnvWrapper swigjnienv(this) ; - JNIEnv * jenv = swigjnienv.getJNIEnv() ; - jobject swigjobj = (jobject) NULL ; - jstring jmessage = 0 ; - - if (!swig_override[1]) { - return SipDebugCallback::OnDebugWarn(message); - } - swigjobj = swig_get_self(jenv); - if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) { - jmessage = 0; - if (message) { - jmessage = jenv->NewStringUTF((const char *)message); - if (!jmessage) return c_result; - } - jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[7], swigjobj, jmessage); - if (jenv->ExceptionOccurred()) return c_result; - c_result = (int)jresult; - } else { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null upcall object"); - } - if (swigjobj) jenv->DeleteLocalRef(swigjobj); - return c_result; -} - -int SwigDirector_SipDebugCallback::OnDebugError(char const *message) { - int c_result = SwigValueInit< int >() ; - jint jresult = 0 ; - JNIEnvWrapper swigjnienv(this) ; - JNIEnv * jenv = swigjnienv.getJNIEnv() ; - jobject swigjobj = (jobject) NULL ; - jstring jmessage = 0 ; - - if (!swig_override[2]) { - return SipDebugCallback::OnDebugError(message); - } - swigjobj = swig_get_self(jenv); - if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) { - jmessage = 0; - if (message) { - jmessage = jenv->NewStringUTF((const char *)message); - if (!jmessage) return c_result; - } - jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[8], swigjobj, jmessage); - if (jenv->ExceptionOccurred()) return c_result; - c_result = (int)jresult; - } else { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null upcall object"); - } - if (swigjobj) jenv->DeleteLocalRef(swigjobj); - return c_result; -} - -int SwigDirector_SipDebugCallback::OnDebugFatal(char const *message) { - int c_result = SwigValueInit< int >() ; - jint jresult = 0 ; - JNIEnvWrapper swigjnienv(this) ; - JNIEnv * jenv = swigjnienv.getJNIEnv() ; - jobject swigjobj = (jobject) NULL ; - jstring jmessage = 0 ; - - if (!swig_override[3]) { - return SipDebugCallback::OnDebugFatal(message); - } - swigjobj = swig_get_self(jenv); - if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) { - jmessage = 0; - if (message) { - jmessage = jenv->NewStringUTF((const char *)message); - if (!jmessage) return c_result; - } - jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[9], swigjobj, jmessage); - if (jenv->ExceptionOccurred()) return c_result; - c_result = (int)jresult; - } else { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null upcall object"); - } - if (swigjobj) jenv->DeleteLocalRef(swigjobj); - return c_result; -} - -void SwigDirector_SipDebugCallback::swig_connect_director(JNIEnv *jenv, jobject jself, jclass jcls, bool swig_mem_own, bool weak_global) { - static struct { - const char *mname; - const char *mdesc; - jmethodID base_methid; - } methods[] = { - { - "OnDebugInfo", "(Ljava/lang/String;)I", NULL - }, - { - "OnDebugWarn", "(Ljava/lang/String;)I", NULL - }, - { - "OnDebugError", "(Ljava/lang/String;)I", NULL - }, - { - "OnDebugFatal", "(Ljava/lang/String;)I", NULL - } - }; - - static jclass baseclass = 0 ; - - if (swig_set_self(jenv, jself, swig_mem_own, weak_global)) { - if (!baseclass) { - baseclass = jenv->FindClass("org/doubango/tinyWRAP/SipDebugCallback"); - if (!baseclass) return; - baseclass = (jclass) jenv->NewGlobalRef(baseclass); - } - bool derived = (jenv->IsSameObject(baseclass, jcls) ? false : true); - for (int i = 0; i < 4; ++i) { + for (int i = 0; i < 7; ++i) { if (!methods[i].base_methid) { methods[i].base_methid = jenv->GetMethodID(baseclass, methods[i].mname, methods[i].mdesc); if (!methods[i].base_methid) return; @@ -797,6 +662,116 @@ void SwigDirector_SipDebugCallback::swig_connect_director(JNIEnv *jenv, jobject extern "C" { #endif +SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_new_1DDebugCallback(JNIEnv *jenv, jclass jcls) { + jlong jresult = 0 ; + DDebugCallback *result = 0 ; + + (void)jenv; + (void)jcls; + result = (DDebugCallback *)new DDebugCallback(); + *(DDebugCallback **)&jresult = result; + return jresult; +} + + +SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_delete_1DDebugCallback(JNIEnv *jenv, jclass jcls, jlong jarg1) { + DDebugCallback *arg1 = (DDebugCallback *) 0 ; + + (void)jenv; + (void)jcls; + arg1 = *(DDebugCallback **)&jarg1; + delete arg1; +} + + +SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_DDebugCallback_1OnDebugInfo(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) { + jint jresult = 0 ; + DDebugCallback *arg1 = (DDebugCallback *) 0 ; + char *arg2 = (char *) 0 ; + int result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(DDebugCallback **)&jarg1; + arg2 = 0; + if (jarg2) { + arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0); + if (!arg2) return 0; + } + result = (int)(arg1)->OnDebugInfo((char const *)arg2); + jresult = (jint)result; + if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); + return jresult; +} + + +SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_DDebugCallback_1OnDebugWarn(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) { + jint jresult = 0 ; + DDebugCallback *arg1 = (DDebugCallback *) 0 ; + char *arg2 = (char *) 0 ; + int result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(DDebugCallback **)&jarg1; + arg2 = 0; + if (jarg2) { + arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0); + if (!arg2) return 0; + } + result = (int)(arg1)->OnDebugWarn((char const *)arg2); + jresult = (jint)result; + if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); + return jresult; +} + + +SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_DDebugCallback_1OnDebugError(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) { + jint jresult = 0 ; + DDebugCallback *arg1 = (DDebugCallback *) 0 ; + char *arg2 = (char *) 0 ; + int result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(DDebugCallback **)&jarg1; + arg2 = 0; + if (jarg2) { + arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0); + if (!arg2) return 0; + } + result = (int)(arg1)->OnDebugError((char const *)arg2); + jresult = (jint)result; + if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); + return jresult; +} + + +SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_DDebugCallback_1OnDebugFatal(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) { + jint jresult = 0 ; + DDebugCallback *arg1 = (DDebugCallback *) 0 ; + char *arg2 = (char *) 0 ; + int result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(DDebugCallback **)&jarg1; + arg2 = 0; + if (jarg2) { + arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0); + if (!arg2) return 0; + } + result = (int)(arg1)->OnDebugFatal((char const *)arg2); + jresult = (jint)result; + if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); + return jresult; +} + + SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_new_1SipUri(JNIEnv *jenv, jclass jcls, jstring jarg1) { jlong jresult = 0 ; char *arg1 = (char *) 0 ; @@ -900,7 +875,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; @@ -923,7 +898,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; @@ -954,7 +929,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); delete [] result; @@ -984,7 +959,7 @@ 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); delete [] result; @@ -1063,7 +1038,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; } @@ -1108,6 +1083,16 @@ SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_delete_1DialogEve } +SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_delete_1StackEvent(JNIEnv *jenv, jclass jcls, jlong jarg1) { + StackEvent *arg1 = (StackEvent *) 0 ; + + (void)jenv; + (void)jcls; + arg1 = *(StackEvent **)&jarg1; + delete arg1; +} + + SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_delete_1MessagingEvent(JNIEnv *jenv, jclass jcls, jlong jarg1) { MessagingEvent *arg1 = (MessagingEvent *) 0 ; @@ -1925,6 +1910,42 @@ SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipCallback_1OnDi } +SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipCallback_1OnStackEvent(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) { + jint jresult = 0 ; + SipCallback *arg1 = (SipCallback *) 0 ; + StackEvent *arg2 = (StackEvent *) 0 ; + int result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + (void)jarg2_; + arg1 = *(SipCallback **)&jarg1; + arg2 = *(StackEvent **)&jarg2; + result = (int)(arg1)->OnStackEvent((StackEvent const *)arg2); + jresult = (jint)result; + return jresult; +} + + +SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipCallback_1OnStackEventSwigExplicitSipCallback(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) { + jint jresult = 0 ; + SipCallback *arg1 = (SipCallback *) 0 ; + StackEvent *arg2 = (StackEvent *) 0 ; + int result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + (void)jarg2_; + arg1 = *(SipCallback **)&jarg1; + arg2 = *(StackEvent **)&jarg2; + result = (int)(arg1)->SipCallback::OnStackEvent((StackEvent const *)arg2); + jresult = (jint)result; + return jresult; +} + + SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipCallback_1OnMessagingEvent(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) { jint jresult = 0 ; SipCallback *arg1 = (SipCallback *) 0 ; @@ -2125,224 +2146,6 @@ SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipCallback_1chan } -SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_new_1SipDebugCallback(JNIEnv *jenv, jclass jcls) { - jlong jresult = 0 ; - SipDebugCallback *result = 0 ; - - (void)jenv; - (void)jcls; - result = (SipDebugCallback *)new SwigDirector_SipDebugCallback(jenv); - *(SipDebugCallback **)&jresult = result; - return jresult; -} - - -SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_delete_1SipDebugCallback(JNIEnv *jenv, jclass jcls, jlong jarg1) { - SipDebugCallback *arg1 = (SipDebugCallback *) 0 ; - - (void)jenv; - (void)jcls; - arg1 = *(SipDebugCallback **)&jarg1; - delete arg1; -} - - -SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipDebugCallback_1OnDebugInfo(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) { - jint jresult = 0 ; - SipDebugCallback *arg1 = (SipDebugCallback *) 0 ; - char *arg2 = (char *) 0 ; - int result; - - (void)jenv; - (void)jcls; - (void)jarg1_; - arg1 = *(SipDebugCallback **)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0); - if (!arg2) return 0; - } - result = (int)(arg1)->OnDebugInfo((char const *)arg2); - jresult = (jint)result; - if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipDebugCallback_1OnDebugInfoSwigExplicitSipDebugCallback(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) { - jint jresult = 0 ; - SipDebugCallback *arg1 = (SipDebugCallback *) 0 ; - char *arg2 = (char *) 0 ; - int result; - - (void)jenv; - (void)jcls; - (void)jarg1_; - arg1 = *(SipDebugCallback **)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0); - if (!arg2) return 0; - } - result = (int)(arg1)->SipDebugCallback::OnDebugInfo((char const *)arg2); - jresult = (jint)result; - if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipDebugCallback_1OnDebugWarn(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) { - jint jresult = 0 ; - SipDebugCallback *arg1 = (SipDebugCallback *) 0 ; - char *arg2 = (char *) 0 ; - int result; - - (void)jenv; - (void)jcls; - (void)jarg1_; - arg1 = *(SipDebugCallback **)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0); - if (!arg2) return 0; - } - result = (int)(arg1)->OnDebugWarn((char const *)arg2); - jresult = (jint)result; - if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipDebugCallback_1OnDebugWarnSwigExplicitSipDebugCallback(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) { - jint jresult = 0 ; - SipDebugCallback *arg1 = (SipDebugCallback *) 0 ; - char *arg2 = (char *) 0 ; - int result; - - (void)jenv; - (void)jcls; - (void)jarg1_; - arg1 = *(SipDebugCallback **)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0); - if (!arg2) return 0; - } - result = (int)(arg1)->SipDebugCallback::OnDebugWarn((char const *)arg2); - jresult = (jint)result; - if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipDebugCallback_1OnDebugError(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) { - jint jresult = 0 ; - SipDebugCallback *arg1 = (SipDebugCallback *) 0 ; - char *arg2 = (char *) 0 ; - int result; - - (void)jenv; - (void)jcls; - (void)jarg1_; - arg1 = *(SipDebugCallback **)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0); - if (!arg2) return 0; - } - result = (int)(arg1)->OnDebugError((char const *)arg2); - jresult = (jint)result; - if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipDebugCallback_1OnDebugErrorSwigExplicitSipDebugCallback(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) { - jint jresult = 0 ; - SipDebugCallback *arg1 = (SipDebugCallback *) 0 ; - char *arg2 = (char *) 0 ; - int result; - - (void)jenv; - (void)jcls; - (void)jarg1_; - arg1 = *(SipDebugCallback **)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0); - if (!arg2) return 0; - } - result = (int)(arg1)->SipDebugCallback::OnDebugError((char const *)arg2); - jresult = (jint)result; - if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipDebugCallback_1OnDebugFatal(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) { - jint jresult = 0 ; - SipDebugCallback *arg1 = (SipDebugCallback *) 0 ; - char *arg2 = (char *) 0 ; - int result; - - (void)jenv; - (void)jcls; - (void)jarg1_; - arg1 = *(SipDebugCallback **)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0); - if (!arg2) return 0; - } - result = (int)(arg1)->OnDebugFatal((char const *)arg2); - jresult = (jint)result; - if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipDebugCallback_1OnDebugFatalSwigExplicitSipDebugCallback(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) { - jint jresult = 0 ; - SipDebugCallback *arg1 = (SipDebugCallback *) 0 ; - char *arg2 = (char *) 0 ; - int result; - - (void)jenv; - (void)jcls; - (void)jarg1_; - arg1 = *(SipDebugCallback **)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0); - if (!arg2) return 0; - } - result = (int)(arg1)->SipDebugCallback::OnDebugFatal((char const *)arg2); - jresult = (jint)result; - if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); - return jresult; -} - - -SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipDebugCallback_1director_1connect(JNIEnv *jenv, jclass jcls, jobject jself, jlong objarg, jboolean jswig_mem_own, jboolean jweak_global) { - SipDebugCallback *obj = *((SipDebugCallback **)&objarg); - (void)jcls; - SwigDirector_SipDebugCallback *director = static_cast(obj); - if (director) { - director->swig_connect_director(jenv, jself, jenv->GetObjectClass(jself), (jswig_mem_own == JNI_TRUE), (jweak_global == JNI_TRUE)); - } -} - - -SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipDebugCallback_1change_1ownership(JNIEnv *jenv, jclass jcls, jobject jself, jlong objarg, jboolean jtake_or_release) { - SipDebugCallback *obj = *((SipDebugCallback **)&objarg); - SwigDirector_SipDebugCallback *director = static_cast(obj); - (void)jcls; - if (director) { - director->swig_java_change_ownership(jenv, jself, jtake_or_release ? true : false); - } -} - - SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_new_1SafeObject(JNIEnv *jenv, jclass jcls) { jlong jresult = 0 ; SafeObject *result = 0 ; @@ -2459,7 +2262,7 @@ SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipStack_1sta SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipStack_1setDebugCallback(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) { jboolean jresult = 0 ; SipStack *arg1 = (SipStack *) 0 ; - SipDebugCallback *arg2 = (SipDebugCallback *) 0 ; + DDebugCallback *arg2 = (DDebugCallback *) 0 ; bool result; (void)jenv; @@ -2467,7 +2270,7 @@ SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipStack_1set (void)jarg1_; (void)jarg2_; arg1 = *(SipStack **)&jarg1; - arg2 = *(SipDebugCallback **)&jarg2; + arg2 = *(DDebugCallback **)&jarg2; result = (bool)(arg1)->setDebugCallback(arg2); jresult = (jboolean)result; return jresult; @@ -2791,6 +2594,14 @@ SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SWIGDialogEventU return baseptr; } +SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SWIGStackEventUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jlong baseptr = 0; + (void)jenv; + (void)jcls; + *(SipEvent **)&baseptr = *(StackEvent **)&jarg1; + return baseptr; +} + SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SWIGMessagingEventUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { jlong baseptr = 0; (void)jenv; @@ -2885,10 +2696,13 @@ SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_swig_1module_1ini static struct { const char *method; const char *signature; - } methods[10] = { + } methods[7] = { { "SwigDirector_SipCallback_OnDialogEvent", "(Lorg/doubango/tinyWRAP/SipCallback;J)I" }, + { + "SwigDirector_SipCallback_OnStackEvent", "(Lorg/doubango/tinyWRAP/SipCallback;J)I" + }, { "SwigDirector_SipCallback_OnMessagingEvent", "(Lorg/doubango/tinyWRAP/SipCallback;J)I" }, @@ -2903,18 +2717,6 @@ SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_swig_1module_1ini }, { "SwigDirector_SipCallback_OnSubscriptionEvent", "(Lorg/doubango/tinyWRAP/SipCallback;J)I" - }, - { - "SwigDirector_SipDebugCallback_OnDebugInfo", "(Lorg/doubango/tinyWRAP/SipDebugCallback;Ljava/lang/String;)I" - }, - { - "SwigDirector_SipDebugCallback_OnDebugWarn", "(Lorg/doubango/tinyWRAP/SipDebugCallback;Ljava/lang/String;)I" - }, - { - "SwigDirector_SipDebugCallback_OnDebugError", "(Lorg/doubango/tinyWRAP/SipDebugCallback;Ljava/lang/String;)I" - }, - { - "SwigDirector_SipDebugCallback_OnDebugFatal", "(Lorg/doubango/tinyWRAP/SipDebugCallback;Ljava/lang/String;)I" } }; Swig::jclass_tinyWRAPJNI = (jclass) jenv->NewGlobalRef(jcls); diff --git a/trunk/bindings/java/android/tinyWRAP_wrap.h b/trunk/bindings/java/android/tinyWRAP_wrap.h index 080188f2..d7fbc26c 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.39 + * Version 1.3.40 * * 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 @@ -18,6 +18,7 @@ public: SwigDirector_SipCallback(JNIEnv *jenv); virtual ~SwigDirector_SipCallback(); virtual int OnDialogEvent(DialogEvent const *e); + virtual int OnStackEvent(StackEvent const *e); virtual int OnMessagingEvent(MessagingEvent const *e); virtual int OnOptionsEvent(OptionsEvent const *e); virtual int OnPublicationEvent(PublicationEvent const *e); @@ -25,28 +26,10 @@ public: virtual int OnSubscriptionEvent(SubscriptionEvent const *e); public: bool swig_overrides(int n) { - return (n < 6 ? swig_override[n] : false); + return (n < 7 ? swig_override[n] : false); } protected: - bool swig_override[6]; -}; - -class SwigDirector_SipDebugCallback : public SipDebugCallback, public Swig::Director { - -public: - void swig_connect_director(JNIEnv *jenv, jobject jself, jclass jcls, bool swig_mem_own, bool weak_global); - SwigDirector_SipDebugCallback(JNIEnv *jenv); - virtual ~SwigDirector_SipDebugCallback(); - virtual int OnDebugInfo(char const *message); - virtual int OnDebugWarn(char const *message); - virtual int OnDebugError(char const *message); - virtual int OnDebugFatal(char const *message); -public: - bool swig_overrides(int n) { - return (n < 4 ? swig_override[n] : false); - } -protected: - bool swig_override[4]; + bool swig_override[7]; }; diff --git a/trunk/bindings/java/android/tsip_event_type_t.java b/trunk/bindings/java/android/tsip_event_type_t.java index 6527ee1e..819967fb 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.39 + * Version 1.3.40 * * 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_message_event_type_t.java b/trunk/bindings/java/android/tsip_message_event_type_t.java index 280845ac..da69c10b 100644 --- a/trunk/bindings/java/android/tsip_message_event_type_t.java +++ b/trunk/bindings/java/android/tsip_message_event_type_t.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.39 + * Version 1.3.40 * * 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_options_event_type_t.java b/trunk/bindings/java/android/tsip_options_event_type_t.java index 70166763..6d1d33f0 100644 --- a/trunk/bindings/java/android/tsip_options_event_type_t.java +++ b/trunk/bindings/java/android/tsip_options_event_type_t.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.39 + * Version 1.3.40 * * 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 a9ec14a0..e5d47e39 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.39 + * Version 1.3.40 * * 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 d8715ea9..039f2ead 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.39 + * Version 1.3.40 * * 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 5091b658..34231525 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.39 + * Version 1.3.40 * * 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.java b/trunk/bindings/java/tinyWRAP.java index d10c59ad..9b29ff1c 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.39 + * Version 1.3.40 * * 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/tinyWRAPConstants.java b/trunk/bindings/java/tinyWRAPConstants.java index 40444189..673ed5c0 100644 --- a/trunk/bindings/java/tinyWRAPConstants.java +++ b/trunk/bindings/java/tinyWRAPConstants.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.39 + * Version 1.3.40 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -10,7 +10,7 @@ package org.doubango.tinyWRAP; public interface tinyWRAPConstants { public final static int tsip_event_code_dialog_transport_error = 702; - public final static int tsip_event_code_global_error = 703; + public final static int tsip_event_code_dialog_global_error = 703; public final static int tsip_event_code_dialog_message_error = 704; public final static int tsip_event_code_dialog_request_incoming = 800; public final static int tsip_event_code_dialog_request_cancelled = 801; @@ -19,4 +19,8 @@ public interface tinyWRAPConstants { public final static int tsip_event_code_dialog_connected = 901; public final static int tsip_event_code_dialog_terminating = 902; public final static int tsip_event_code_dialog_terminated = 903; + public final static int tsip_event_code_stack_started = 950; + public final static int tsip_event_code_stack_stopped = 951; + public final static int tsip_event_code_stack_failed_to_start = 952; + public final static int tsip_event_code_stack_failed_to_stop = 953; } diff --git a/trunk/bindings/java/tinyWRAPJNI.java b/trunk/bindings/java/tinyWRAPJNI.java index 00d8f2dc..9b27d72b 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.39 + * Version 1.3.40 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -9,6 +9,12 @@ package org.doubango.tinyWRAP; class tinyWRAPJNI { + public final static native long new_DDebugCallback(); + public final static native void delete_DDebugCallback(long jarg1); + public final static native int DDebugCallback_OnDebugInfo(long jarg1, DDebugCallback jarg1_, String jarg2); + public final static native int DDebugCallback_OnDebugWarn(long jarg1, DDebugCallback jarg1_, String jarg2); + public final static native int DDebugCallback_OnDebugError(long jarg1, DDebugCallback jarg1_, String jarg2); + public final static native int DDebugCallback_OnDebugFatal(long jarg1, DDebugCallback jarg1_, String jarg2); public final static native long new_SipUri(String jarg1); public final static native void delete_SipUri(long jarg1); public final static native boolean SipUri_isValid__SWIG_0(String jarg1); @@ -27,6 +33,7 @@ class tinyWRAPJNI { public final static native long SipEvent_getBaseSession(long jarg1, SipEvent jarg1_); public final static native long SipEvent_getSipMessage(long jarg1, SipEvent jarg1_); public final static native void delete_DialogEvent(long jarg1); + public final static native void delete_StackEvent(long jarg1); public final static native void delete_MessagingEvent(long jarg1); public final static native int MessagingEvent_getType(long jarg1, MessagingEvent jarg1_); public final static native long MessagingEvent_getSession(long jarg1, MessagingEvent jarg1_); @@ -80,6 +87,8 @@ class tinyWRAPJNI { public final static native void delete_SipCallback(long jarg1); public final static native int SipCallback_OnDialogEvent(long jarg1, SipCallback jarg1_, long jarg2, DialogEvent jarg2_); public final static native int SipCallback_OnDialogEventSwigExplicitSipCallback(long jarg1, SipCallback jarg1_, long jarg2, DialogEvent jarg2_); + public final static native int SipCallback_OnStackEvent(long jarg1, SipCallback jarg1_, long jarg2, StackEvent jarg2_); + public final static native int SipCallback_OnStackEventSwigExplicitSipCallback(long jarg1, SipCallback jarg1_, long jarg2, StackEvent jarg2_); public final static native int SipCallback_OnMessagingEvent(long jarg1, SipCallback jarg1_, long jarg2, MessagingEvent jarg2_); public final static native int SipCallback_OnMessagingEventSwigExplicitSipCallback(long jarg1, SipCallback jarg1_, long jarg2, MessagingEvent jarg2_); public final static native int SipCallback_OnOptionsEvent(long jarg1, SipCallback jarg1_, long jarg2, OptionsEvent jarg2_); @@ -92,18 +101,6 @@ class tinyWRAPJNI { public final static native int SipCallback_OnSubscriptionEventSwigExplicitSipCallback(long jarg1, SipCallback jarg1_, long jarg2, SubscriptionEvent jarg2_); public final static native void SipCallback_director_connect(SipCallback obj, long cptr, boolean mem_own, boolean weak_global); public final static native void SipCallback_change_ownership(SipCallback obj, long cptr, boolean take_or_release); - public final static native long new_SipDebugCallback(); - public final static native void delete_SipDebugCallback(long jarg1); - public final static native int SipDebugCallback_OnDebugInfo(long jarg1, SipDebugCallback jarg1_, String jarg2); - public final static native int SipDebugCallback_OnDebugInfoSwigExplicitSipDebugCallback(long jarg1, SipDebugCallback jarg1_, String jarg2); - public final static native int SipDebugCallback_OnDebugWarn(long jarg1, SipDebugCallback jarg1_, String jarg2); - public final static native int SipDebugCallback_OnDebugWarnSwigExplicitSipDebugCallback(long jarg1, SipDebugCallback jarg1_, String jarg2); - public final static native int SipDebugCallback_OnDebugError(long jarg1, SipDebugCallback jarg1_, String jarg2); - public final static native int SipDebugCallback_OnDebugErrorSwigExplicitSipDebugCallback(long jarg1, SipDebugCallback jarg1_, String jarg2); - public final static native int SipDebugCallback_OnDebugFatal(long jarg1, SipDebugCallback jarg1_, String jarg2); - public final static native int SipDebugCallback_OnDebugFatalSwigExplicitSipDebugCallback(long jarg1, SipDebugCallback jarg1_, String jarg2); - public final static native void SipDebugCallback_director_connect(SipDebugCallback obj, long cptr, boolean mem_own, boolean weak_global); - public final static native void SipDebugCallback_change_ownership(SipDebugCallback obj, long cptr, boolean take_or_release); public final static native long new_SafeObject(); public final static native void delete_SafeObject(long jarg1); public final static native int SafeObject_Lock(long jarg1, SafeObject jarg1_); @@ -111,7 +108,7 @@ class tinyWRAPJNI { public final static native long new_SipStack(long jarg1, SipCallback jarg1_, String jarg2, String jarg3, String jarg4); public final static native void delete_SipStack(long jarg1); public final static native boolean SipStack_start(long jarg1, SipStack jarg1_); - public final static native boolean SipStack_setDebugCallback(long jarg1, SipStack jarg1_, long jarg2, SipDebugCallback jarg2_); + public final static native boolean SipStack_setDebugCallback(long jarg1, SipStack jarg1_, long jarg2, DDebugCallback jarg2_); public final static native boolean SipStack_setRealm(long jarg1, SipStack jarg1_, String jarg2); public final static native boolean SipStack_setIMPI(long jarg1, SipStack jarg1_, String jarg2); public final static native boolean SipStack_setIMPU(long jarg1, SipStack jarg1_, String jarg2); @@ -127,6 +124,7 @@ class tinyWRAPJNI { public final static native boolean SipStack_isValid(long jarg1, SipStack jarg1_); public final static native boolean SipStack_stop(long jarg1, SipStack jarg1_); public final static native long SWIGDialogEventUpcast(long jarg1); + public final static native long SWIGStackEventUpcast(long jarg1); public final static native long SWIGMessagingEventUpcast(long jarg1); public final static native long SWIGOptionsEventUpcast(long jarg1); public final static native long SWIGPublicationEventUpcast(long jarg1); @@ -142,6 +140,9 @@ class tinyWRAPJNI { public static int SwigDirector_SipCallback_OnDialogEvent(SipCallback self, long e) { return self.OnDialogEvent((e == 0) ? null : new DialogEvent(e, false)); } + public static int SwigDirector_SipCallback_OnStackEvent(SipCallback self, long e) { + return self.OnStackEvent((e == 0) ? null : new StackEvent(e, false)); + } public static int SwigDirector_SipCallback_OnMessagingEvent(SipCallback self, long e) { return self.OnMessagingEvent((e == 0) ? null : new MessagingEvent(e, false)); } @@ -157,18 +158,6 @@ class tinyWRAPJNI { public static int SwigDirector_SipCallback_OnSubscriptionEvent(SipCallback self, long e) { return self.OnSubscriptionEvent((e == 0) ? null : new SubscriptionEvent(e, false)); } - public static int SwigDirector_SipDebugCallback_OnDebugInfo(SipDebugCallback self, String message) { - return self.OnDebugInfo(message); - } - public static int SwigDirector_SipDebugCallback_OnDebugWarn(SipDebugCallback self, String message) { - return self.OnDebugWarn(message); - } - public static int SwigDirector_SipDebugCallback_OnDebugError(SipDebugCallback self, String message) { - return self.OnDebugError(message); - } - public static int SwigDirector_SipDebugCallback_OnDebugFatal(SipDebugCallback self, String message) { - return self.OnDebugFatal(message); - } private final static native void swig_module_init(); static { diff --git a/trunk/bindings/java/tinyWRAP_wrap.cxx b/trunk/bindings/java/tinyWRAP_wrap.cxx index bed9a76a..8a6bdda3 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.39 + * Version 1.3.40 * * 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,7 +193,8 @@ 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) @@ -210,209 +211,211 @@ 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[10]; + static jmethodID director_methids[7]; } +#include "DDebug.h" + + #include "SipUri.h" #include "SipMessage.h" #include "SipEvent.h" #include "SipSession.h" #include "SipCallback.h" -#include "SipDebug.h" #include "SafeObject.h" #include "SipStack.h" @@ -456,7 +459,7 @@ int SwigDirector_SipCallback::OnDialogEvent(DialogEvent const *e) { return c_result; } -int SwigDirector_SipCallback::OnMessagingEvent(MessagingEvent const *e) { +int SwigDirector_SipCallback::OnStackEvent(StackEvent const *e) { int c_result = SwigValueInit< int >() ; jint jresult = 0 ; JNIEnvWrapper swigjnienv(this) ; @@ -465,12 +468,36 @@ int SwigDirector_SipCallback::OnMessagingEvent(MessagingEvent const *e) { jlong je = 0 ; if (!swig_override[1]) { + return SipCallback::OnStackEvent(e); + } + swigjobj = swig_get_self(jenv); + if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) { + *((StackEvent **)&je) = (StackEvent *) e; + jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[1], swigjobj, je); + if (jenv->ExceptionOccurred()) return c_result; + c_result = (int)jresult; + } else { + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null upcall object"); + } + if (swigjobj) jenv->DeleteLocalRef(swigjobj); + return c_result; +} + +int SwigDirector_SipCallback::OnMessagingEvent(MessagingEvent const *e) { + int c_result = SwigValueInit< int >() ; + jint jresult = 0 ; + JNIEnvWrapper swigjnienv(this) ; + JNIEnv * jenv = swigjnienv.getJNIEnv() ; + jobject swigjobj = (jobject) NULL ; + jlong je = 0 ; + + if (!swig_override[2]) { return SipCallback::OnMessagingEvent(e); } swigjobj = swig_get_self(jenv); if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) { *((MessagingEvent **)&je) = (MessagingEvent *) e; - jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[1], swigjobj, je); + jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[2], swigjobj, je); if (jenv->ExceptionOccurred()) return c_result; c_result = (int)jresult; } else { @@ -488,13 +515,13 @@ int SwigDirector_SipCallback::OnOptionsEvent(OptionsEvent const *e) { jobject swigjobj = (jobject) NULL ; jlong je = 0 ; - if (!swig_override[2]) { + if (!swig_override[3]) { return SipCallback::OnOptionsEvent(e); } swigjobj = swig_get_self(jenv); if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) { *((OptionsEvent **)&je) = (OptionsEvent *) e; - jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[2], swigjobj, je); + jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[3], swigjobj, je); if (jenv->ExceptionOccurred()) return c_result; c_result = (int)jresult; } else { @@ -512,13 +539,13 @@ int SwigDirector_SipCallback::OnPublicationEvent(PublicationEvent const *e) { jobject swigjobj = (jobject) NULL ; jlong je = 0 ; - if (!swig_override[3]) { + if (!swig_override[4]) { return SipCallback::OnPublicationEvent(e); } swigjobj = swig_get_self(jenv); if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) { *((PublicationEvent **)&je) = (PublicationEvent *) e; - jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[3], swigjobj, je); + jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[4], swigjobj, je); if (jenv->ExceptionOccurred()) return c_result; c_result = (int)jresult; } else { @@ -536,13 +563,13 @@ int SwigDirector_SipCallback::OnRegistrationEvent(RegistrationEvent const *e) { jobject swigjobj = (jobject) NULL ; jlong je = 0 ; - if (!swig_override[4]) { + if (!swig_override[5]) { return SipCallback::OnRegistrationEvent(e); } swigjobj = swig_get_self(jenv); if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) { *((RegistrationEvent **)&je) = (RegistrationEvent *) e; - jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[4], swigjobj, je); + jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[5], swigjobj, je); if (jenv->ExceptionOccurred()) return c_result; c_result = (int)jresult; } else { @@ -560,13 +587,13 @@ int SwigDirector_SipCallback::OnSubscriptionEvent(SubscriptionEvent const *e) { jobject swigjobj = (jobject) NULL ; jlong je = 0 ; - if (!swig_override[5]) { + if (!swig_override[6]) { return SipCallback::OnSubscriptionEvent(e); } swigjobj = swig_get_self(jenv); if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) { *((SubscriptionEvent **)&je) = (SubscriptionEvent *) e; - jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[5], swigjobj, je); + jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[6], swigjobj, je); if (jenv->ExceptionOccurred()) return c_result; c_result = (int)jresult; } else { @@ -585,6 +612,9 @@ void SwigDirector_SipCallback::swig_connect_director(JNIEnv *jenv, jobject jself { "OnDialogEvent", "(Lorg/doubango/tinyWRAP/DialogEvent;)I", NULL }, + { + "OnStackEvent", "(Lorg/doubango/tinyWRAP/StackEvent;)I", NULL + }, { "OnMessagingEvent", "(Lorg/doubango/tinyWRAP/MessagingEvent;)I", NULL }, @@ -611,172 +641,7 @@ void SwigDirector_SipCallback::swig_connect_director(JNIEnv *jenv, jobject jself baseclass = (jclass) jenv->NewGlobalRef(baseclass); } bool derived = (jenv->IsSameObject(baseclass, jcls) ? false : true); - for (int i = 0; i < 6; ++i) { - if (!methods[i].base_methid) { - methods[i].base_methid = jenv->GetMethodID(baseclass, methods[i].mname, methods[i].mdesc); - if (!methods[i].base_methid) return; - } - swig_override[i] = false; - if (derived) { - jmethodID methid = jenv->GetMethodID(jcls, methods[i].mname, methods[i].mdesc); - swig_override[i] = (methid != methods[i].base_methid); - jenv->ExceptionClear(); - } - } - } -} - - -SwigDirector_SipDebugCallback::SwigDirector_SipDebugCallback(JNIEnv *jenv) : SipDebugCallback(), Swig::Director(jenv) { -} - -SwigDirector_SipDebugCallback::~SwigDirector_SipDebugCallback() { - swig_disconnect_director_self("swigDirectorDisconnect"); -} - - -int SwigDirector_SipDebugCallback::OnDebugInfo(char const *message) { - int c_result = SwigValueInit< int >() ; - jint jresult = 0 ; - JNIEnvWrapper swigjnienv(this) ; - JNIEnv * jenv = swigjnienv.getJNIEnv() ; - jobject swigjobj = (jobject) NULL ; - jstring jmessage = 0 ; - - if (!swig_override[0]) { - return SipDebugCallback::OnDebugInfo(message); - } - swigjobj = swig_get_self(jenv); - if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) { - jmessage = 0; - if (message) { - jmessage = jenv->NewStringUTF((const char *)message); - if (!jmessage) return c_result; - } - jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[6], swigjobj, jmessage); - if (jenv->ExceptionOccurred()) return c_result; - c_result = (int)jresult; - } else { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null upcall object"); - } - if (swigjobj) jenv->DeleteLocalRef(swigjobj); - return c_result; -} - -int SwigDirector_SipDebugCallback::OnDebugWarn(char const *message) { - int c_result = SwigValueInit< int >() ; - jint jresult = 0 ; - JNIEnvWrapper swigjnienv(this) ; - JNIEnv * jenv = swigjnienv.getJNIEnv() ; - jobject swigjobj = (jobject) NULL ; - jstring jmessage = 0 ; - - if (!swig_override[1]) { - return SipDebugCallback::OnDebugWarn(message); - } - swigjobj = swig_get_self(jenv); - if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) { - jmessage = 0; - if (message) { - jmessage = jenv->NewStringUTF((const char *)message); - if (!jmessage) return c_result; - } - jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[7], swigjobj, jmessage); - if (jenv->ExceptionOccurred()) return c_result; - c_result = (int)jresult; - } else { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null upcall object"); - } - if (swigjobj) jenv->DeleteLocalRef(swigjobj); - return c_result; -} - -int SwigDirector_SipDebugCallback::OnDebugError(char const *message) { - int c_result = SwigValueInit< int >() ; - jint jresult = 0 ; - JNIEnvWrapper swigjnienv(this) ; - JNIEnv * jenv = swigjnienv.getJNIEnv() ; - jobject swigjobj = (jobject) NULL ; - jstring jmessage = 0 ; - - if (!swig_override[2]) { - return SipDebugCallback::OnDebugError(message); - } - swigjobj = swig_get_self(jenv); - if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) { - jmessage = 0; - if (message) { - jmessage = jenv->NewStringUTF((const char *)message); - if (!jmessage) return c_result; - } - jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[8], swigjobj, jmessage); - if (jenv->ExceptionOccurred()) return c_result; - c_result = (int)jresult; - } else { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null upcall object"); - } - if (swigjobj) jenv->DeleteLocalRef(swigjobj); - return c_result; -} - -int SwigDirector_SipDebugCallback::OnDebugFatal(char const *message) { - int c_result = SwigValueInit< int >() ; - jint jresult = 0 ; - JNIEnvWrapper swigjnienv(this) ; - JNIEnv * jenv = swigjnienv.getJNIEnv() ; - jobject swigjobj = (jobject) NULL ; - jstring jmessage = 0 ; - - if (!swig_override[3]) { - return SipDebugCallback::OnDebugFatal(message); - } - swigjobj = swig_get_self(jenv); - if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) { - jmessage = 0; - if (message) { - jmessage = jenv->NewStringUTF((const char *)message); - if (!jmessage) return c_result; - } - jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[9], swigjobj, jmessage); - if (jenv->ExceptionOccurred()) return c_result; - c_result = (int)jresult; - } else { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null upcall object"); - } - if (swigjobj) jenv->DeleteLocalRef(swigjobj); - return c_result; -} - -void SwigDirector_SipDebugCallback::swig_connect_director(JNIEnv *jenv, jobject jself, jclass jcls, bool swig_mem_own, bool weak_global) { - static struct { - const char *mname; - const char *mdesc; - jmethodID base_methid; - } methods[] = { - { - "OnDebugInfo", "(Ljava/lang/String;)I", NULL - }, - { - "OnDebugWarn", "(Ljava/lang/String;)I", NULL - }, - { - "OnDebugError", "(Ljava/lang/String;)I", NULL - }, - { - "OnDebugFatal", "(Ljava/lang/String;)I", NULL - } - }; - - static jclass baseclass = 0 ; - - if (swig_set_self(jenv, jself, swig_mem_own, weak_global)) { - if (!baseclass) { - baseclass = jenv->FindClass("org/doubango/tinyWRAP/SipDebugCallback"); - if (!baseclass) return; - baseclass = (jclass) jenv->NewGlobalRef(baseclass); - } - bool derived = (jenv->IsSameObject(baseclass, jcls) ? false : true); - for (int i = 0; i < 4; ++i) { + for (int i = 0; i < 7; ++i) { if (!methods[i].base_methid) { methods[i].base_methid = jenv->GetMethodID(baseclass, methods[i].mname, methods[i].mdesc); if (!methods[i].base_methid) return; @@ -797,6 +662,116 @@ void SwigDirector_SipDebugCallback::swig_connect_director(JNIEnv *jenv, jobject extern "C" { #endif +SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_new_1DDebugCallback(JNIEnv *jenv, jclass jcls) { + jlong jresult = 0 ; + DDebugCallback *result = 0 ; + + (void)jenv; + (void)jcls; + result = (DDebugCallback *)new DDebugCallback(); + *(DDebugCallback **)&jresult = result; + return jresult; +} + + +SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_delete_1DDebugCallback(JNIEnv *jenv, jclass jcls, jlong jarg1) { + DDebugCallback *arg1 = (DDebugCallback *) 0 ; + + (void)jenv; + (void)jcls; + arg1 = *(DDebugCallback **)&jarg1; + delete arg1; +} + + +SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_DDebugCallback_1OnDebugInfo(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) { + jint jresult = 0 ; + DDebugCallback *arg1 = (DDebugCallback *) 0 ; + char *arg2 = (char *) 0 ; + int result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(DDebugCallback **)&jarg1; + arg2 = 0; + if (jarg2) { + arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0); + if (!arg2) return 0; + } + result = (int)(arg1)->OnDebugInfo((char const *)arg2); + jresult = (jint)result; + if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); + return jresult; +} + + +SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_DDebugCallback_1OnDebugWarn(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) { + jint jresult = 0 ; + DDebugCallback *arg1 = (DDebugCallback *) 0 ; + char *arg2 = (char *) 0 ; + int result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(DDebugCallback **)&jarg1; + arg2 = 0; + if (jarg2) { + arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0); + if (!arg2) return 0; + } + result = (int)(arg1)->OnDebugWarn((char const *)arg2); + jresult = (jint)result; + if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); + return jresult; +} + + +SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_DDebugCallback_1OnDebugError(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) { + jint jresult = 0 ; + DDebugCallback *arg1 = (DDebugCallback *) 0 ; + char *arg2 = (char *) 0 ; + int result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(DDebugCallback **)&jarg1; + arg2 = 0; + if (jarg2) { + arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0); + if (!arg2) return 0; + } + result = (int)(arg1)->OnDebugError((char const *)arg2); + jresult = (jint)result; + if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); + return jresult; +} + + +SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_DDebugCallback_1OnDebugFatal(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) { + jint jresult = 0 ; + DDebugCallback *arg1 = (DDebugCallback *) 0 ; + char *arg2 = (char *) 0 ; + int result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(DDebugCallback **)&jarg1; + arg2 = 0; + if (jarg2) { + arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0); + if (!arg2) return 0; + } + result = (int)(arg1)->OnDebugFatal((char const *)arg2); + jresult = (jint)result; + if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); + return jresult; +} + + SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_new_1SipUri(JNIEnv *jenv, jclass jcls, jstring jarg1) { jlong jresult = 0 ; char *arg1 = (char *) 0 ; @@ -900,7 +875,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; @@ -923,7 +898,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; @@ -954,7 +929,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); delete [] result; @@ -984,7 +959,7 @@ 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); delete [] result; @@ -1063,7 +1038,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; } @@ -1108,6 +1083,16 @@ SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_delete_1DialogEve } +SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_delete_1StackEvent(JNIEnv *jenv, jclass jcls, jlong jarg1) { + StackEvent *arg1 = (StackEvent *) 0 ; + + (void)jenv; + (void)jcls; + arg1 = *(StackEvent **)&jarg1; + delete arg1; +} + + SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_delete_1MessagingEvent(JNIEnv *jenv, jclass jcls, jlong jarg1) { MessagingEvent *arg1 = (MessagingEvent *) 0 ; @@ -1925,6 +1910,42 @@ SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipCallback_1OnDi } +SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipCallback_1OnStackEvent(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) { + jint jresult = 0 ; + SipCallback *arg1 = (SipCallback *) 0 ; + StackEvent *arg2 = (StackEvent *) 0 ; + int result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + (void)jarg2_; + arg1 = *(SipCallback **)&jarg1; + arg2 = *(StackEvent **)&jarg2; + result = (int)(arg1)->OnStackEvent((StackEvent const *)arg2); + jresult = (jint)result; + return jresult; +} + + +SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipCallback_1OnStackEventSwigExplicitSipCallback(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) { + jint jresult = 0 ; + SipCallback *arg1 = (SipCallback *) 0 ; + StackEvent *arg2 = (StackEvent *) 0 ; + int result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + (void)jarg2_; + arg1 = *(SipCallback **)&jarg1; + arg2 = *(StackEvent **)&jarg2; + result = (int)(arg1)->SipCallback::OnStackEvent((StackEvent const *)arg2); + jresult = (jint)result; + return jresult; +} + + SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipCallback_1OnMessagingEvent(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) { jint jresult = 0 ; SipCallback *arg1 = (SipCallback *) 0 ; @@ -2125,224 +2146,6 @@ SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipCallback_1chan } -SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_new_1SipDebugCallback(JNIEnv *jenv, jclass jcls) { - jlong jresult = 0 ; - SipDebugCallback *result = 0 ; - - (void)jenv; - (void)jcls; - result = (SipDebugCallback *)new SwigDirector_SipDebugCallback(jenv); - *(SipDebugCallback **)&jresult = result; - return jresult; -} - - -SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_delete_1SipDebugCallback(JNIEnv *jenv, jclass jcls, jlong jarg1) { - SipDebugCallback *arg1 = (SipDebugCallback *) 0 ; - - (void)jenv; - (void)jcls; - arg1 = *(SipDebugCallback **)&jarg1; - delete arg1; -} - - -SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipDebugCallback_1OnDebugInfo(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) { - jint jresult = 0 ; - SipDebugCallback *arg1 = (SipDebugCallback *) 0 ; - char *arg2 = (char *) 0 ; - int result; - - (void)jenv; - (void)jcls; - (void)jarg1_; - arg1 = *(SipDebugCallback **)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0); - if (!arg2) return 0; - } - result = (int)(arg1)->OnDebugInfo((char const *)arg2); - jresult = (jint)result; - if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipDebugCallback_1OnDebugInfoSwigExplicitSipDebugCallback(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) { - jint jresult = 0 ; - SipDebugCallback *arg1 = (SipDebugCallback *) 0 ; - char *arg2 = (char *) 0 ; - int result; - - (void)jenv; - (void)jcls; - (void)jarg1_; - arg1 = *(SipDebugCallback **)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0); - if (!arg2) return 0; - } - result = (int)(arg1)->SipDebugCallback::OnDebugInfo((char const *)arg2); - jresult = (jint)result; - if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipDebugCallback_1OnDebugWarn(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) { - jint jresult = 0 ; - SipDebugCallback *arg1 = (SipDebugCallback *) 0 ; - char *arg2 = (char *) 0 ; - int result; - - (void)jenv; - (void)jcls; - (void)jarg1_; - arg1 = *(SipDebugCallback **)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0); - if (!arg2) return 0; - } - result = (int)(arg1)->OnDebugWarn((char const *)arg2); - jresult = (jint)result; - if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipDebugCallback_1OnDebugWarnSwigExplicitSipDebugCallback(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) { - jint jresult = 0 ; - SipDebugCallback *arg1 = (SipDebugCallback *) 0 ; - char *arg2 = (char *) 0 ; - int result; - - (void)jenv; - (void)jcls; - (void)jarg1_; - arg1 = *(SipDebugCallback **)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0); - if (!arg2) return 0; - } - result = (int)(arg1)->SipDebugCallback::OnDebugWarn((char const *)arg2); - jresult = (jint)result; - if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipDebugCallback_1OnDebugError(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) { - jint jresult = 0 ; - SipDebugCallback *arg1 = (SipDebugCallback *) 0 ; - char *arg2 = (char *) 0 ; - int result; - - (void)jenv; - (void)jcls; - (void)jarg1_; - arg1 = *(SipDebugCallback **)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0); - if (!arg2) return 0; - } - result = (int)(arg1)->OnDebugError((char const *)arg2); - jresult = (jint)result; - if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipDebugCallback_1OnDebugErrorSwigExplicitSipDebugCallback(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) { - jint jresult = 0 ; - SipDebugCallback *arg1 = (SipDebugCallback *) 0 ; - char *arg2 = (char *) 0 ; - int result; - - (void)jenv; - (void)jcls; - (void)jarg1_; - arg1 = *(SipDebugCallback **)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0); - if (!arg2) return 0; - } - result = (int)(arg1)->SipDebugCallback::OnDebugError((char const *)arg2); - jresult = (jint)result; - if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipDebugCallback_1OnDebugFatal(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) { - jint jresult = 0 ; - SipDebugCallback *arg1 = (SipDebugCallback *) 0 ; - char *arg2 = (char *) 0 ; - int result; - - (void)jenv; - (void)jcls; - (void)jarg1_; - arg1 = *(SipDebugCallback **)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0); - if (!arg2) return 0; - } - result = (int)(arg1)->OnDebugFatal((char const *)arg2); - jresult = (jint)result; - if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipDebugCallback_1OnDebugFatalSwigExplicitSipDebugCallback(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) { - jint jresult = 0 ; - SipDebugCallback *arg1 = (SipDebugCallback *) 0 ; - char *arg2 = (char *) 0 ; - int result; - - (void)jenv; - (void)jcls; - (void)jarg1_; - arg1 = *(SipDebugCallback **)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0); - if (!arg2) return 0; - } - result = (int)(arg1)->SipDebugCallback::OnDebugFatal((char const *)arg2); - jresult = (jint)result; - if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); - return jresult; -} - - -SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipDebugCallback_1director_1connect(JNIEnv *jenv, jclass jcls, jobject jself, jlong objarg, jboolean jswig_mem_own, jboolean jweak_global) { - SipDebugCallback *obj = *((SipDebugCallback **)&objarg); - (void)jcls; - SwigDirector_SipDebugCallback *director = dynamic_cast(obj); - if (director) { - director->swig_connect_director(jenv, jself, jenv->GetObjectClass(jself), (jswig_mem_own == JNI_TRUE), (jweak_global == JNI_TRUE)); - } -} - - -SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipDebugCallback_1change_1ownership(JNIEnv *jenv, jclass jcls, jobject jself, jlong objarg, jboolean jtake_or_release) { - SipDebugCallback *obj = *((SipDebugCallback **)&objarg); - SwigDirector_SipDebugCallback *director = dynamic_cast(obj); - (void)jcls; - if (director) { - director->swig_java_change_ownership(jenv, jself, jtake_or_release ? true : false); - } -} - - SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_new_1SafeObject(JNIEnv *jenv, jclass jcls) { jlong jresult = 0 ; SafeObject *result = 0 ; @@ -2459,7 +2262,7 @@ SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipStack_1sta SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipStack_1setDebugCallback(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) { jboolean jresult = 0 ; SipStack *arg1 = (SipStack *) 0 ; - SipDebugCallback *arg2 = (SipDebugCallback *) 0 ; + DDebugCallback *arg2 = (DDebugCallback *) 0 ; bool result; (void)jenv; @@ -2467,7 +2270,7 @@ SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipStack_1set (void)jarg1_; (void)jarg2_; arg1 = *(SipStack **)&jarg1; - arg2 = *(SipDebugCallback **)&jarg2; + arg2 = *(DDebugCallback **)&jarg2; result = (bool)(arg1)->setDebugCallback(arg2); jresult = (jboolean)result; return jresult; @@ -2791,6 +2594,14 @@ SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SWIGDialogEventU return baseptr; } +SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SWIGStackEventUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jlong baseptr = 0; + (void)jenv; + (void)jcls; + *(SipEvent **)&baseptr = *(StackEvent **)&jarg1; + return baseptr; +} + SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SWIGMessagingEventUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { jlong baseptr = 0; (void)jenv; @@ -2885,10 +2696,13 @@ SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_swig_1module_1ini static struct { const char *method; const char *signature; - } methods[10] = { + } methods[7] = { { "SwigDirector_SipCallback_OnDialogEvent", "(Lorg/doubango/tinyWRAP/SipCallback;J)I" }, + { + "SwigDirector_SipCallback_OnStackEvent", "(Lorg/doubango/tinyWRAP/SipCallback;J)I" + }, { "SwigDirector_SipCallback_OnMessagingEvent", "(Lorg/doubango/tinyWRAP/SipCallback;J)I" }, @@ -2903,18 +2717,6 @@ SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_swig_1module_1ini }, { "SwigDirector_SipCallback_OnSubscriptionEvent", "(Lorg/doubango/tinyWRAP/SipCallback;J)I" - }, - { - "SwigDirector_SipDebugCallback_OnDebugInfo", "(Lorg/doubango/tinyWRAP/SipDebugCallback;Ljava/lang/String;)I" - }, - { - "SwigDirector_SipDebugCallback_OnDebugWarn", "(Lorg/doubango/tinyWRAP/SipDebugCallback;Ljava/lang/String;)I" - }, - { - "SwigDirector_SipDebugCallback_OnDebugError", "(Lorg/doubango/tinyWRAP/SipDebugCallback;Ljava/lang/String;)I" - }, - { - "SwigDirector_SipDebugCallback_OnDebugFatal", "(Lorg/doubango/tinyWRAP/SipDebugCallback;Ljava/lang/String;)I" } }; Swig::jclass_tinyWRAPJNI = (jclass) jenv->NewGlobalRef(jcls); diff --git a/trunk/bindings/java/tinyWRAP_wrap.h b/trunk/bindings/java/tinyWRAP_wrap.h index 080188f2..d7fbc26c 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.39 + * Version 1.3.40 * * 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 @@ -18,6 +18,7 @@ public: SwigDirector_SipCallback(JNIEnv *jenv); virtual ~SwigDirector_SipCallback(); virtual int OnDialogEvent(DialogEvent const *e); + virtual int OnStackEvent(StackEvent const *e); virtual int OnMessagingEvent(MessagingEvent const *e); virtual int OnOptionsEvent(OptionsEvent const *e); virtual int OnPublicationEvent(PublicationEvent const *e); @@ -25,28 +26,10 @@ public: virtual int OnSubscriptionEvent(SubscriptionEvent const *e); public: bool swig_overrides(int n) { - return (n < 6 ? swig_override[n] : false); + return (n < 7 ? swig_override[n] : false); } protected: - bool swig_override[6]; -}; - -class SwigDirector_SipDebugCallback : public SipDebugCallback, public Swig::Director { - -public: - void swig_connect_director(JNIEnv *jenv, jobject jself, jclass jcls, bool swig_mem_own, bool weak_global); - SwigDirector_SipDebugCallback(JNIEnv *jenv); - virtual ~SwigDirector_SipDebugCallback(); - virtual int OnDebugInfo(char const *message); - virtual int OnDebugWarn(char const *message); - virtual int OnDebugError(char const *message); - virtual int OnDebugFatal(char const *message); -public: - bool swig_overrides(int n) { - return (n < 4 ? swig_override[n] : false); - } -protected: - bool swig_override[4]; + bool swig_override[7]; }; diff --git a/trunk/bindings/java/tsip_event_type_t.java b/trunk/bindings/java/tsip_event_type_t.java index 6527ee1e..819967fb 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.39 + * Version 1.3.40 * * 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_message_event_type_t.java b/trunk/bindings/java/tsip_message_event_type_t.java index 280845ac..da69c10b 100644 --- a/trunk/bindings/java/tsip_message_event_type_t.java +++ b/trunk/bindings/java/tsip_message_event_type_t.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.39 + * Version 1.3.40 * * 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_options_event_type_t.java b/trunk/bindings/java/tsip_options_event_type_t.java index 70166763..6d1d33f0 100644 --- a/trunk/bindings/java/tsip_options_event_type_t.java +++ b/trunk/bindings/java/tsip_options_event_type_t.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.39 + * Version 1.3.40 * * 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 a9ec14a0..e5d47e39 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.39 + * Version 1.3.40 * * 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 d8715ea9..039f2ead 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.39 + * Version 1.3.40 * * 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 5091b658..34231525 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.39 + * Version 1.3.40 * * 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 741251ae..38d73836 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.39 +# Version 1.3.40 # # Do not make changes to this file unless you know what you are doing--modify # the SWIG interface file instead. @@ -50,6 +50,47 @@ sub this { package tinyWRAP; +############# Class : tinyWRAP::DDebugCallback ############## + +package tinyWRAP::DDebugCallback; +use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); +@ISA = qw( tinyWRAP ); +%OWNER = (); +%ITERATORS = (); +sub new { + my $pkg = shift; + my $self = tinyWRAPc::new_DDebugCallback(@_); + bless $self, $pkg if defined($self); +} + +sub DESTROY { + return unless $_[0]->isa('HASH'); + my $self = tied(%{$_[0]}); + return unless defined $self; + delete $ITERATORS{$self}; + if (exists $OWNER{$self}) { + tinyWRAPc::delete_DDebugCallback($self); + delete $OWNER{$self}; + } +} + +*OnDebugInfo = *tinyWRAPc::DDebugCallback_OnDebugInfo; +*OnDebugWarn = *tinyWRAPc::DDebugCallback_OnDebugWarn; +*OnDebugError = *tinyWRAPc::DDebugCallback_OnDebugError; +*OnDebugFatal = *tinyWRAPc::DDebugCallback_OnDebugFatal; +sub DISOWN { + my $self = shift; + my $ptr = tied(%$self); + delete $OWNER{$ptr}; +} + +sub ACQUIRE { + my $self = shift; + my $ptr = tied(%$self); + $OWNER{$ptr} = 1; +} + + ############# Class : tinyWRAP::SipUri ############## package tinyWRAP::SipUri; @@ -195,6 +236,37 @@ sub ACQUIRE { } +############# Class : tinyWRAP::StackEvent ############## + +package tinyWRAP::StackEvent; +use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); +@ISA = qw( tinyWRAP::SipEvent tinyWRAP ); +%OWNER = (); +%ITERATORS = (); +sub DESTROY { + return unless $_[0]->isa('HASH'); + my $self = tied(%{$_[0]}); + return unless defined $self; + delete $ITERATORS{$self}; + if (exists $OWNER{$self}) { + tinyWRAPc::delete_StackEvent($self); + delete $OWNER{$self}; + } +} + +sub DISOWN { + my $self = shift; + my $ptr = tied(%$self); + delete $OWNER{$ptr}; +} + +sub ACQUIRE { + my $self = shift; + my $ptr = tied(%$self); + $OWNER{$ptr} = 1; +} + + ############# Class : tinyWRAP::MessagingEvent ############## package tinyWRAP::MessagingEvent; @@ -628,6 +700,7 @@ sub DESTROY { } *OnDialogEvent = *tinyWRAPc::SipCallback_OnDialogEvent; +*OnStackEvent = *tinyWRAPc::SipCallback_OnStackEvent; *OnMessagingEvent = *tinyWRAPc::SipCallback_OnMessagingEvent; *OnOptionsEvent = *tinyWRAPc::SipCallback_OnOptionsEvent; *OnPublicationEvent = *tinyWRAPc::SipCallback_OnPublicationEvent; @@ -646,47 +719,6 @@ sub ACQUIRE { } -############# Class : tinyWRAP::SipDebugCallback ############## - -package tinyWRAP::SipDebugCallback; -use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); -@ISA = qw( tinyWRAP ); -%OWNER = (); -%ITERATORS = (); -sub new { - my $pkg = shift; - my $self = tinyWRAPc::new_SipDebugCallback(@_); - bless $self, $pkg if defined($self); -} - -sub DESTROY { - return unless $_[0]->isa('HASH'); - my $self = tied(%{$_[0]}); - return unless defined $self; - delete $ITERATORS{$self}; - if (exists $OWNER{$self}) { - tinyWRAPc::delete_SipDebugCallback($self); - delete $OWNER{$self}; - } -} - -*OnDebugInfo = *tinyWRAPc::SipDebugCallback_OnDebugInfo; -*OnDebugWarn = *tinyWRAPc::SipDebugCallback_OnDebugWarn; -*OnDebugError = *tinyWRAPc::SipDebugCallback_OnDebugError; -*OnDebugFatal = *tinyWRAPc::SipDebugCallback_OnDebugFatal; -sub DISOWN { - my $self = shift; - my $ptr = tied(%$self); - delete $OWNER{$ptr}; -} - -sub ACQUIRE { - my $self = shift; - my $ptr = tied(%$self); - $OWNER{$ptr} = 1; -} - - ############# Class : tinyWRAP::SafeObject ############## package tinyWRAP::SafeObject; @@ -791,7 +823,7 @@ package tinyWRAP; *tsip_event_subscribe = *tinyWRAPc::tsip_event_subscribe; *tsip_event_dialog = *tinyWRAPc::tsip_event_dialog; *tsip_event_code_dialog_transport_error = *tinyWRAPc::tsip_event_code_dialog_transport_error; -*tsip_event_code_global_error = *tinyWRAPc::tsip_event_code_global_error; +*tsip_event_code_dialog_global_error = *tinyWRAPc::tsip_event_code_dialog_global_error; *tsip_event_code_dialog_message_error = *tinyWRAPc::tsip_event_code_dialog_message_error; *tsip_event_code_dialog_request_incoming = *tinyWRAPc::tsip_event_code_dialog_request_incoming; *tsip_event_code_dialog_request_cancelled = *tinyWRAPc::tsip_event_code_dialog_request_cancelled; @@ -800,6 +832,10 @@ package tinyWRAP; *tsip_event_code_dialog_connected = *tinyWRAPc::tsip_event_code_dialog_connected; *tsip_event_code_dialog_terminating = *tinyWRAPc::tsip_event_code_dialog_terminating; *tsip_event_code_dialog_terminated = *tinyWRAPc::tsip_event_code_dialog_terminated; +*tsip_event_code_stack_started = *tinyWRAPc::tsip_event_code_stack_started; +*tsip_event_code_stack_stopped = *tinyWRAPc::tsip_event_code_stack_stopped; +*tsip_event_code_stack_failed_to_start = *tinyWRAPc::tsip_event_code_stack_failed_to_start; +*tsip_event_code_stack_failed_to_stop = *tinyWRAPc::tsip_event_code_stack_failed_to_stop; *tsip_i_register = *tinyWRAPc::tsip_i_register; *tsip_ao_register = *tinyWRAPc::tsip_ao_register; *tsip_i_unregister = *tinyWRAPc::tsip_i_unregister; diff --git a/trunk/bindings/perl/tinyWRAP_wrap.cxx b/trunk/bindings/perl/tinyWRAP_wrap.cxx index 6b5fd1be..5814f9e8 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.39 + * Version 1.3.40 * * 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,1455 +35,1472 @@ 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. + * ----------------------------------------------------------------------------- */ -/* ----------------------------------------------------------------------------- - * 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 +/* 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 -/* 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 - - +/* inline attribute */ +#ifndef SWIGINLINE +# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) +# define SWIGINLINE inline +# else +# define SWIGINLINE +# endif +#endif -#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 +/* 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 -/* ----------------------------------------------------------------------------- - * 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; -} - - - +#ifndef SWIG_MSC_UNSUPPRESS_4505 +# if defined(_MSC_VER) +# pragma warning(disable : 4505) /* unreferenced local function has been removed */ +# endif +#endif -/* ----------------------------------------------------------------------------- - * 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 +#ifndef SWIGUNUSEDPARM +# ifdef __cplusplus +# define SWIGUNUSEDPARM(p) +# else +# define SWIGUNUSEDPARM(p) p SWIGUNUSED +# endif +#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 +/* 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 @@ -1495,34 +1512,35 @@ SWIG_Perl_SetModule(swig_module_info *module) { /* -------- TYPES TABLE (BEGIN) -------- */ -#define SWIGTYPE_p_DialogEvent swig_types[0] -#define SWIGTYPE_p_MessagingEvent swig_types[1] -#define SWIGTYPE_p_MessagingSession swig_types[2] -#define SWIGTYPE_p_OptionsEvent swig_types[3] -#define SWIGTYPE_p_OptionsSession swig_types[4] -#define SWIGTYPE_p_PublicationEvent swig_types[5] -#define SWIGTYPE_p_PublicationSession swig_types[6] -#define SWIGTYPE_p_RegistrationEvent swig_types[7] -#define SWIGTYPE_p_RegistrationSession swig_types[8] -#define SWIGTYPE_p_SafeObject swig_types[9] -#define SWIGTYPE_p_SipCallback swig_types[10] -#define SWIGTYPE_p_SipDebugCallback swig_types[11] +#define SWIGTYPE_p_DDebugCallback swig_types[0] +#define SWIGTYPE_p_DialogEvent swig_types[1] +#define SWIGTYPE_p_MessagingEvent swig_types[2] +#define SWIGTYPE_p_MessagingSession swig_types[3] +#define SWIGTYPE_p_OptionsEvent swig_types[4] +#define SWIGTYPE_p_OptionsSession swig_types[5] +#define SWIGTYPE_p_PublicationEvent swig_types[6] +#define SWIGTYPE_p_PublicationSession swig_types[7] +#define SWIGTYPE_p_RegistrationEvent swig_types[8] +#define SWIGTYPE_p_RegistrationSession swig_types[9] +#define SWIGTYPE_p_SafeObject swig_types[10] +#define SWIGTYPE_p_SipCallback swig_types[11] #define SWIGTYPE_p_SipEvent swig_types[12] #define SWIGTYPE_p_SipMessage swig_types[13] #define SWIGTYPE_p_SipSession swig_types[14] #define SWIGTYPE_p_SipStack swig_types[15] #define SWIGTYPE_p_SipUri swig_types[16] -#define SWIGTYPE_p_SubscriptionEvent swig_types[17] -#define SWIGTYPE_p_SubscriptionSession swig_types[18] -#define SWIGTYPE_p_char swig_types[19] -#define SWIGTYPE_p_tsip_event_type_e swig_types[20] -#define SWIGTYPE_p_tsip_message_event_type_e swig_types[21] -#define SWIGTYPE_p_tsip_options_event_type_e swig_types[22] -#define SWIGTYPE_p_tsip_publish_event_type_e swig_types[23] -#define SWIGTYPE_p_tsip_register_event_type_e swig_types[24] -#define SWIGTYPE_p_tsip_subscribe_event_type_e swig_types[25] -static swig_type_info *swig_types[27]; -static swig_module_info swig_module = {swig_types, 26, 0, 0, 0, 0}; +#define SWIGTYPE_p_StackEvent swig_types[17] +#define SWIGTYPE_p_SubscriptionEvent swig_types[18] +#define SWIGTYPE_p_SubscriptionSession swig_types[19] +#define SWIGTYPE_p_char swig_types[20] +#define SWIGTYPE_p_tsip_event_type_e swig_types[21] +#define SWIGTYPE_p_tsip_message_event_type_e swig_types[22] +#define SWIGTYPE_p_tsip_options_event_type_e swig_types[23] +#define SWIGTYPE_p_tsip_publish_event_type_e swig_types[24] +#define SWIGTYPE_p_tsip_register_event_type_e swig_types[25] +#define SWIGTYPE_p_tsip_subscribe_event_type_e swig_types[26] +static swig_type_info *swig_types[28]; +static swig_module_info swig_module = {swig_types, 27, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -1533,7 +1551,7 @@ static swig_module_info swig_module = {swig_types, 26, 0, 0, 0, 0}; #define SWIG_name "tinyWRAPc::boot_tinyWRAP" #define SWIG_prefix "tinyWRAPc::" -#define SWIGVERSION 0x010339 +#define SWIGVERSION 0x010340 #define SWIG_VERSION SWIGVERSION @@ -1558,15 +1576,7 @@ SWIGEXPORT void SWIG_init (CV *cv, CPerlObj *); #endif -#include "SipUri.h" -#include "SipMessage.h" -#include "SipEvent.h" -#include "SipSession.h" - -#include "SipCallback.h" -#include "SipDebug.h" -#include "SafeObject.h" -#include "SipStack.h" +#include "DDebug.h" SWIGINTERN swig_type_info* @@ -1625,6 +1635,32 @@ SWIG_AsCharPtrAndSize(SV *obj, char** cptr, size_t* psize, int *alloc) +SWIGINTERNINLINE SV * +SWIG_From_long SWIG_PERL_DECL_ARGS_1(long value) +{ + SV *obj = sv_newmortal(); + sv_setiv(obj, (IV) value); + return obj; +} + + +SWIGINTERNINLINE SV * +SWIG_From_int SWIG_PERL_DECL_ARGS_1(int value) +{ + return SWIG_From_long SWIG_PERL_CALL_ARGS_1(value); +} + + +#include "SipUri.h" +#include "SipMessage.h" +#include "SipEvent.h" +#include "SipSession.h" + +#include "SipCallback.h" +#include "SafeObject.h" +#include "SipStack.h" + + SWIGINTERNINLINE SV * SWIG_From_bool SWIG_PERL_DECL_ARGS_1(bool value) { @@ -1810,15 +1846,6 @@ SWIG_From_unsigned_SS_int SWIG_PERL_DECL_ARGS_1(unsigned int value) } -SWIGINTERNINLINE SV * -SWIG_From_long SWIG_PERL_DECL_ARGS_1(long value) -{ - SV *obj = sv_newmortal(); - sv_setiv(obj, (IV) value); - return obj; -} - - SWIGINTERNINLINE SV * SWIG_From_short SWIG_PERL_DECL_ARGS_1(short value) { @@ -1826,13 +1853,6 @@ SWIG_From_short SWIG_PERL_DECL_ARGS_1(short value) } -SWIGINTERNINLINE SV * -SWIG_From_int SWIG_PERL_DECL_ARGS_1(int value) -{ - return SWIG_From_long SWIG_PERL_CALL_ARGS_1(value); -} - - SWIGINTERN int SWIG_AsVal_bool SWIG_PERL_DECL_ARGS_2(SV *obj, bool* val) { @@ -1931,6 +1951,207 @@ SWIGCLASS_STATIC int swig_magic_readonly(pTHX_ SV *SWIGUNUSEDPARM(sv), MAGIC *SW #ifdef __cplusplus extern "C" { #endif +XS(_wrap_new_DDebugCallback) { + { + int argvi = 0; + DDebugCallback *result = 0 ; + dXSARGS; + + if ((items < 0) || (items > 0)) { + SWIG_croak("Usage: new_DDebugCallback();"); + } + result = (DDebugCallback *)new DDebugCallback(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DDebugCallback, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_delete_DDebugCallback) { + { + DDebugCallback *arg1 = (DDebugCallback *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: delete_DDebugCallback(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_DDebugCallback, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DDebugCallback" "', argument " "1"" of type '" "DDebugCallback *""'"); + } + arg1 = reinterpret_cast< DDebugCallback * >(argp1); + delete arg1; + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_DDebugCallback_OnDebugInfo) { + { + DDebugCallback *arg1 = (DDebugCallback *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int argvi = 0; + int result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: DDebugCallback_OnDebugInfo(self,message);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_DDebugCallback, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DDebugCallback_OnDebugInfo" "', argument " "1"" of type '" "DDebugCallback *""'"); + } + arg1 = reinterpret_cast< DDebugCallback * >(argp1); + res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DDebugCallback_OnDebugInfo" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + result = (int)(arg1)->OnDebugInfo((char const *)arg2); + ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + XSRETURN(argvi); + fail: + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + SWIG_croak_null(); + } +} + + +XS(_wrap_DDebugCallback_OnDebugWarn) { + { + DDebugCallback *arg1 = (DDebugCallback *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int argvi = 0; + int result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: DDebugCallback_OnDebugWarn(self,message);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_DDebugCallback, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DDebugCallback_OnDebugWarn" "', argument " "1"" of type '" "DDebugCallback *""'"); + } + arg1 = reinterpret_cast< DDebugCallback * >(argp1); + res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DDebugCallback_OnDebugWarn" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + result = (int)(arg1)->OnDebugWarn((char const *)arg2); + ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + XSRETURN(argvi); + fail: + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + SWIG_croak_null(); + } +} + + +XS(_wrap_DDebugCallback_OnDebugError) { + { + DDebugCallback *arg1 = (DDebugCallback *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int argvi = 0; + int result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: DDebugCallback_OnDebugError(self,message);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_DDebugCallback, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DDebugCallback_OnDebugError" "', argument " "1"" of type '" "DDebugCallback *""'"); + } + arg1 = reinterpret_cast< DDebugCallback * >(argp1); + res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DDebugCallback_OnDebugError" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + result = (int)(arg1)->OnDebugError((char const *)arg2); + ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + XSRETURN(argvi); + fail: + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + SWIG_croak_null(); + } +} + + +XS(_wrap_DDebugCallback_OnDebugFatal) { + { + DDebugCallback *arg1 = (DDebugCallback *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int argvi = 0; + int result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: DDebugCallback_OnDebugFatal(self,message);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_DDebugCallback, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DDebugCallback_OnDebugFatal" "', argument " "1"" of type '" "DDebugCallback *""'"); + } + arg1 = reinterpret_cast< DDebugCallback * >(argp1); + res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DDebugCallback_OnDebugFatal" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + result = (int)(arg1)->OnDebugFatal((char const *)arg2); + ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + XSRETURN(argvi); + fail: + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + SWIG_croak_null(); + } +} + + XS(_wrap_new_SipUri) { { char *arg1 = (char *) 0 ; @@ -2784,6 +3005,33 @@ XS(_wrap_delete_DialogEvent) { } +XS(_wrap_delete_StackEvent) { + { + StackEvent *arg1 = (StackEvent *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: delete_StackEvent(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_StackEvent, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_StackEvent" "', argument " "1"" of type '" "StackEvent *""'"); + } + arg1 = reinterpret_cast< StackEvent * >(argp1); + delete arg1; + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + XS(_wrap_delete_MessagingEvent) { { MessagingEvent *arg1 = (MessagingEvent *) 0 ; @@ -4469,6 +4717,44 @@ XS(_wrap_SipCallback_OnDialogEvent) { } +XS(_wrap_SipCallback_OnStackEvent) { + { + SipCallback *arg1 = (SipCallback *) 0 ; + StackEvent *arg2 = (StackEvent *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int argvi = 0; + int result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: SipCallback_OnStackEvent(self,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SipCallback, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SipCallback_OnStackEvent" "', argument " "1"" of type '" "SipCallback *""'"); + } + arg1 = reinterpret_cast< SipCallback * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_StackEvent, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SipCallback_OnStackEvent" "', argument " "2"" of type '" "StackEvent const *""'"); + } + arg2 = reinterpret_cast< StackEvent * >(argp2); + result = (int)(arg1)->OnStackEvent((StackEvent const *)arg2); + ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + XS(_wrap_SipCallback_OnMessagingEvent) { { SipCallback *arg1 = (SipCallback *) 0 ; @@ -4659,207 +4945,6 @@ XS(_wrap_SipCallback_OnSubscriptionEvent) { } -XS(_wrap_new_SipDebugCallback) { - { - int argvi = 0; - SipDebugCallback *result = 0 ; - dXSARGS; - - if ((items < 0) || (items > 0)) { - SWIG_croak("Usage: new_SipDebugCallback();"); - } - result = (SipDebugCallback *)new SipDebugCallback(); - ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SipDebugCallback, SWIG_OWNER | SWIG_SHADOW); argvi++ ; - XSRETURN(argvi); - fail: - SWIG_croak_null(); - } -} - - -XS(_wrap_delete_SipDebugCallback) { - { - SipDebugCallback *arg1 = (SipDebugCallback *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int argvi = 0; - dXSARGS; - - if ((items < 1) || (items > 1)) { - SWIG_croak("Usage: delete_SipDebugCallback(self);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SipDebugCallback, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SipDebugCallback" "', argument " "1"" of type '" "SipDebugCallback *""'"); - } - arg1 = reinterpret_cast< SipDebugCallback * >(argp1); - delete arg1; - ST(argvi) = sv_newmortal(); - - XSRETURN(argvi); - fail: - - SWIG_croak_null(); - } -} - - -XS(_wrap_SipDebugCallback_OnDebugInfo) { - { - SipDebugCallback *arg1 = (SipDebugCallback *) 0 ; - char *arg2 = (char *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - int argvi = 0; - int result; - dXSARGS; - - if ((items < 2) || (items > 2)) { - SWIG_croak("Usage: SipDebugCallback_OnDebugInfo(self,message);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SipDebugCallback, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SipDebugCallback_OnDebugInfo" "', argument " "1"" of type '" "SipDebugCallback *""'"); - } - arg1 = reinterpret_cast< SipDebugCallback * >(argp1); - res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SipDebugCallback_OnDebugInfo" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = reinterpret_cast< char * >(buf2); - result = (int)(arg1)->OnDebugInfo((char const *)arg2); - ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; - - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - XSRETURN(argvi); - fail: - - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - SWIG_croak_null(); - } -} - - -XS(_wrap_SipDebugCallback_OnDebugWarn) { - { - SipDebugCallback *arg1 = (SipDebugCallback *) 0 ; - char *arg2 = (char *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - int argvi = 0; - int result; - dXSARGS; - - if ((items < 2) || (items > 2)) { - SWIG_croak("Usage: SipDebugCallback_OnDebugWarn(self,message);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SipDebugCallback, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SipDebugCallback_OnDebugWarn" "', argument " "1"" of type '" "SipDebugCallback *""'"); - } - arg1 = reinterpret_cast< SipDebugCallback * >(argp1); - res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SipDebugCallback_OnDebugWarn" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = reinterpret_cast< char * >(buf2); - result = (int)(arg1)->OnDebugWarn((char const *)arg2); - ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; - - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - XSRETURN(argvi); - fail: - - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - SWIG_croak_null(); - } -} - - -XS(_wrap_SipDebugCallback_OnDebugError) { - { - SipDebugCallback *arg1 = (SipDebugCallback *) 0 ; - char *arg2 = (char *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - int argvi = 0; - int result; - dXSARGS; - - if ((items < 2) || (items > 2)) { - SWIG_croak("Usage: SipDebugCallback_OnDebugError(self,message);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SipDebugCallback, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SipDebugCallback_OnDebugError" "', argument " "1"" of type '" "SipDebugCallback *""'"); - } - arg1 = reinterpret_cast< SipDebugCallback * >(argp1); - res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SipDebugCallback_OnDebugError" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = reinterpret_cast< char * >(buf2); - result = (int)(arg1)->OnDebugError((char const *)arg2); - ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; - - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - XSRETURN(argvi); - fail: - - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - SWIG_croak_null(); - } -} - - -XS(_wrap_SipDebugCallback_OnDebugFatal) { - { - SipDebugCallback *arg1 = (SipDebugCallback *) 0 ; - char *arg2 = (char *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - int argvi = 0; - int result; - dXSARGS; - - if ((items < 2) || (items > 2)) { - SWIG_croak("Usage: SipDebugCallback_OnDebugFatal(self,message);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SipDebugCallback, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SipDebugCallback_OnDebugFatal" "', argument " "1"" of type '" "SipDebugCallback *""'"); - } - arg1 = reinterpret_cast< SipDebugCallback * >(argp1); - res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SipDebugCallback_OnDebugFatal" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = reinterpret_cast< char * >(buf2); - result = (int)(arg1)->OnDebugFatal((char const *)arg2); - ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; - - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - XSRETURN(argvi); - fail: - - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - SWIG_croak_null(); - } -} - - XS(_wrap_new_SafeObject) { { int argvi = 0; @@ -5080,7 +5165,7 @@ XS(_wrap_SipStack_start) { XS(_wrap_SipStack_setDebugCallback) { { SipStack *arg1 = (SipStack *) 0 ; - SipDebugCallback *arg2 = (SipDebugCallback *) 0 ; + DDebugCallback *arg2 = (DDebugCallback *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -5097,11 +5182,11 @@ XS(_wrap_SipStack_setDebugCallback) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SipStack_setDebugCallback" "', argument " "1"" of type '" "SipStack *""'"); } arg1 = reinterpret_cast< SipStack * >(argp1); - res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_SipDebugCallback, 0 | 0 ); + res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_DDebugCallback, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SipStack_setDebugCallback" "', argument " "2"" of type '" "SipDebugCallback *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SipStack_setDebugCallback" "', argument " "2"" of type '" "DDebugCallback *""'"); } - arg2 = reinterpret_cast< SipDebugCallback * >(argp2); + arg2 = reinterpret_cast< DDebugCallback * >(argp2); result = (bool)(arg1)->setDebugCallback(arg2); ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; @@ -5726,9 +5811,13 @@ static void *_p_RegistrationEventTo_p_SipEvent(void *x, int *SWIGUNUSEDPARM(newm static void *_p_SubscriptionEventTo_p_SipEvent(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((SipEvent *) ((SubscriptionEvent *) x)); } +static void *_p_StackEventTo_p_SipEvent(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((SipEvent *) ((StackEvent *) x)); +} static void *_p_MessagingEventTo_p_SipEvent(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((SipEvent *) ((MessagingEvent *) x)); } +static swig_type_info _swigt__p_DDebugCallback = {"_p_DDebugCallback", "DDebugCallback *", 0, 0, (void*)"tinyWRAP::DDebugCallback", 0}; static swig_type_info _swigt__p_DialogEvent = {"_p_DialogEvent", "DialogEvent *", 0, 0, (void*)"tinyWRAP::DialogEvent", 0}; static swig_type_info _swigt__p_MessagingEvent = {"_p_MessagingEvent", "MessagingEvent *", 0, 0, (void*)"tinyWRAP::MessagingEvent", 0}; static swig_type_info _swigt__p_MessagingSession = {"_p_MessagingSession", "MessagingSession *", 0, 0, (void*)"tinyWRAP::MessagingSession", 0}; @@ -5740,12 +5829,12 @@ static swig_type_info _swigt__p_RegistrationEvent = {"_p_RegistrationEvent", "Re static swig_type_info _swigt__p_RegistrationSession = {"_p_RegistrationSession", "RegistrationSession *", 0, 0, (void*)"tinyWRAP::RegistrationSession", 0}; static swig_type_info _swigt__p_SafeObject = {"_p_SafeObject", "SafeObject *", 0, 0, (void*)"tinyWRAP::SafeObject", 0}; static swig_type_info _swigt__p_SipCallback = {"_p_SipCallback", "SipCallback *", 0, 0, (void*)"tinyWRAP::SipCallback", 0}; -static swig_type_info _swigt__p_SipDebugCallback = {"_p_SipDebugCallback", "SipDebugCallback *", 0, 0, (void*)"tinyWRAP::SipDebugCallback", 0}; static swig_type_info _swigt__p_SipEvent = {"_p_SipEvent", "SipEvent *", 0, 0, (void*)"tinyWRAP::SipEvent", 0}; static swig_type_info _swigt__p_SipMessage = {"_p_SipMessage", "SipMessage *", 0, 0, (void*)"tinyWRAP::SipMessage", 0}; static swig_type_info _swigt__p_SipSession = {"_p_SipSession", "SipSession *", 0, 0, (void*)"tinyWRAP::SipSession", 0}; static swig_type_info _swigt__p_SipStack = {"_p_SipStack", "SipStack *", 0, 0, (void*)"tinyWRAP::SipStack", 0}; static swig_type_info _swigt__p_SipUri = {"_p_SipUri", "SipUri *", 0, 0, (void*)"tinyWRAP::SipUri", 0}; +static swig_type_info _swigt__p_StackEvent = {"_p_StackEvent", "StackEvent *", 0, 0, (void*)"tinyWRAP::StackEvent", 0}; static swig_type_info _swigt__p_SubscriptionEvent = {"_p_SubscriptionEvent", "SubscriptionEvent *", 0, 0, (void*)"tinyWRAP::SubscriptionEvent", 0}; static swig_type_info _swigt__p_SubscriptionSession = {"_p_SubscriptionSession", "SubscriptionSession *", 0, 0, (void*)"tinyWRAP::SubscriptionSession", 0}; static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0}; @@ -5757,6 +5846,7 @@ static swig_type_info _swigt__p_tsip_register_event_type_e = {"_p_tsip_register_ static swig_type_info _swigt__p_tsip_subscribe_event_type_e = {"_p_tsip_subscribe_event_type_e", "enum tsip_subscribe_event_type_e *|tsip_subscribe_event_type_t *", 0, 0, (void*)0, 0}; static swig_type_info *swig_type_initial[] = { + &_swigt__p_DDebugCallback, &_swigt__p_DialogEvent, &_swigt__p_MessagingEvent, &_swigt__p_MessagingSession, @@ -5768,12 +5858,12 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_RegistrationSession, &_swigt__p_SafeObject, &_swigt__p_SipCallback, - &_swigt__p_SipDebugCallback, &_swigt__p_SipEvent, &_swigt__p_SipMessage, &_swigt__p_SipSession, &_swigt__p_SipStack, &_swigt__p_SipUri, + &_swigt__p_StackEvent, &_swigt__p_SubscriptionEvent, &_swigt__p_SubscriptionSession, &_swigt__p_char, @@ -5785,6 +5875,7 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_tsip_subscribe_event_type_e, }; +static swig_cast_info _swigc__p_DDebugCallback[] = { {&_swigt__p_DDebugCallback, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_DialogEvent[] = { {&_swigt__p_DialogEvent, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_MessagingEvent[] = { {&_swigt__p_MessagingEvent, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_MessagingSession[] = { {&_swigt__p_MessagingSession, 0, 0, 0},{0, 0, 0, 0}}; @@ -5796,12 +5887,12 @@ static swig_cast_info _swigc__p_RegistrationEvent[] = { {&_swigt__p_Registratio static swig_cast_info _swigc__p_RegistrationSession[] = { {&_swigt__p_RegistrationSession, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_SafeObject[] = { {&_swigt__p_SipStack, _p_SipStackTo_p_SafeObject, 0, 0}, {&_swigt__p_SafeObject, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_SipCallback[] = { {&_swigt__p_SipCallback, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_SipDebugCallback[] = { {&_swigt__p_SipDebugCallback, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_SipEvent[] = { {&_swigt__p_SipEvent, 0, 0, 0}, {&_swigt__p_OptionsEvent, _p_OptionsEventTo_p_SipEvent, 0, 0}, {&_swigt__p_DialogEvent, _p_DialogEventTo_p_SipEvent, 0, 0}, {&_swigt__p_PublicationEvent, _p_PublicationEventTo_p_SipEvent, 0, 0}, {&_swigt__p_RegistrationEvent, _p_RegistrationEventTo_p_SipEvent, 0, 0}, {&_swigt__p_SubscriptionEvent, _p_SubscriptionEventTo_p_SipEvent, 0, 0}, {&_swigt__p_MessagingEvent, _p_MessagingEventTo_p_SipEvent, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_SipEvent[] = { {&_swigt__p_SipEvent, 0, 0, 0}, {&_swigt__p_OptionsEvent, _p_OptionsEventTo_p_SipEvent, 0, 0}, {&_swigt__p_DialogEvent, _p_DialogEventTo_p_SipEvent, 0, 0}, {&_swigt__p_PublicationEvent, _p_PublicationEventTo_p_SipEvent, 0, 0}, {&_swigt__p_RegistrationEvent, _p_RegistrationEventTo_p_SipEvent, 0, 0}, {&_swigt__p_SubscriptionEvent, _p_SubscriptionEventTo_p_SipEvent, 0, 0}, {&_swigt__p_StackEvent, _p_StackEventTo_p_SipEvent, 0, 0}, {&_swigt__p_MessagingEvent, _p_MessagingEventTo_p_SipEvent, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_SipMessage[] = { {&_swigt__p_SipMessage, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_SipSession[] = { {&_swigt__p_SipSession, 0, 0, 0}, {&_swigt__p_MessagingSession, _p_MessagingSessionTo_p_SipSession, 0, 0}, {&_swigt__p_OptionsSession, _p_OptionsSessionTo_p_SipSession, 0, 0}, {&_swigt__p_PublicationSession, _p_PublicationSessionTo_p_SipSession, 0, 0}, {&_swigt__p_RegistrationSession, _p_RegistrationSessionTo_p_SipSession, 0, 0}, {&_swigt__p_SubscriptionSession, _p_SubscriptionSessionTo_p_SipSession, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_SipStack[] = { {&_swigt__p_SipStack, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_SipUri[] = { {&_swigt__p_SipUri, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_StackEvent[] = { {&_swigt__p_StackEvent, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_SubscriptionEvent[] = { {&_swigt__p_SubscriptionEvent, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_SubscriptionSession[] = { {&_swigt__p_SubscriptionSession, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}}; @@ -5813,6 +5904,7 @@ static swig_cast_info _swigc__p_tsip_register_event_type_e[] = { {&_swigt__p_ts static swig_cast_info _swigc__p_tsip_subscribe_event_type_e[] = { {&_swigt__p_tsip_subscribe_event_type_e, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info *swig_cast_initial[] = { + _swigc__p_DDebugCallback, _swigc__p_DialogEvent, _swigc__p_MessagingEvent, _swigc__p_MessagingSession, @@ -5824,12 +5916,12 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_RegistrationSession, _swigc__p_SafeObject, _swigc__p_SipCallback, - _swigc__p_SipDebugCallback, _swigc__p_SipEvent, _swigc__p_SipMessage, _swigc__p_SipSession, _swigc__p_SipStack, _swigc__p_SipUri, + _swigc__p_StackEvent, _swigc__p_SubscriptionEvent, _swigc__p_SubscriptionSession, _swigc__p_char, @@ -5854,6 +5946,12 @@ static swig_variable_info swig_variables[] = { {0,0,0,0} }; static swig_command_info swig_commands[] = { +{"tinyWRAPc::new_DDebugCallback", _wrap_new_DDebugCallback}, +{"tinyWRAPc::delete_DDebugCallback", _wrap_delete_DDebugCallback}, +{"tinyWRAPc::DDebugCallback_OnDebugInfo", _wrap_DDebugCallback_OnDebugInfo}, +{"tinyWRAPc::DDebugCallback_OnDebugWarn", _wrap_DDebugCallback_OnDebugWarn}, +{"tinyWRAPc::DDebugCallback_OnDebugError", _wrap_DDebugCallback_OnDebugError}, +{"tinyWRAPc::DDebugCallback_OnDebugFatal", _wrap_DDebugCallback_OnDebugFatal}, {"tinyWRAPc::new_SipUri", _wrap_new_SipUri}, {"tinyWRAPc::delete_SipUri", _wrap_delete_SipUri}, {"tinyWRAPc::SipUri_isValid", _wrap_SipUri_isValid}, @@ -5869,6 +5967,7 @@ static swig_command_info swig_commands[] = { {"tinyWRAPc::SipEvent_getBaseSession", _wrap_SipEvent_getBaseSession}, {"tinyWRAPc::SipEvent_getSipMessage", _wrap_SipEvent_getSipMessage}, {"tinyWRAPc::delete_DialogEvent", _wrap_delete_DialogEvent}, +{"tinyWRAPc::delete_StackEvent", _wrap_delete_StackEvent}, {"tinyWRAPc::delete_MessagingEvent", _wrap_delete_MessagingEvent}, {"tinyWRAPc::MessagingEvent_getType", _wrap_MessagingEvent_getType}, {"tinyWRAPc::MessagingEvent_getSession", _wrap_MessagingEvent_getSession}, @@ -5920,17 +6019,12 @@ static swig_command_info swig_commands[] = { {"tinyWRAPc::new_SipCallback", _wrap_new_SipCallback}, {"tinyWRAPc::delete_SipCallback", _wrap_delete_SipCallback}, {"tinyWRAPc::SipCallback_OnDialogEvent", _wrap_SipCallback_OnDialogEvent}, +{"tinyWRAPc::SipCallback_OnStackEvent", _wrap_SipCallback_OnStackEvent}, {"tinyWRAPc::SipCallback_OnMessagingEvent", _wrap_SipCallback_OnMessagingEvent}, {"tinyWRAPc::SipCallback_OnOptionsEvent", _wrap_SipCallback_OnOptionsEvent}, {"tinyWRAPc::SipCallback_OnPublicationEvent", _wrap_SipCallback_OnPublicationEvent}, {"tinyWRAPc::SipCallback_OnRegistrationEvent", _wrap_SipCallback_OnRegistrationEvent}, {"tinyWRAPc::SipCallback_OnSubscriptionEvent", _wrap_SipCallback_OnSubscriptionEvent}, -{"tinyWRAPc::new_SipDebugCallback", _wrap_new_SipDebugCallback}, -{"tinyWRAPc::delete_SipDebugCallback", _wrap_delete_SipDebugCallback}, -{"tinyWRAPc::SipDebugCallback_OnDebugInfo", _wrap_SipDebugCallback_OnDebugInfo}, -{"tinyWRAPc::SipDebugCallback_OnDebugWarn", _wrap_SipDebugCallback_OnDebugWarn}, -{"tinyWRAPc::SipDebugCallback_OnDebugError", _wrap_SipDebugCallback_OnDebugError}, -{"tinyWRAPc::SipDebugCallback_OnDebugFatal", _wrap_SipDebugCallback_OnDebugFatal}, {"tinyWRAPc::new_SafeObject", _wrap_new_SafeObject}, {"tinyWRAPc::delete_SafeObject", _wrap_delete_SafeObject}, {"tinyWRAPc::SafeObject_Lock", _wrap_SafeObject_Lock}, @@ -5955,242 +6049,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 @@ -6247,10 +6341,12 @@ XS(SWIG_init) { SvREADONLY_on(sv); } + SWIG_TypeClientData(SWIGTYPE_p_DDebugCallback, (void*) "tinyWRAP::DDebugCallback"); SWIG_TypeClientData(SWIGTYPE_p_SipUri, (void*) "tinyWRAP::SipUri"); SWIG_TypeClientData(SWIGTYPE_p_SipMessage, (void*) "tinyWRAP::SipMessage"); SWIG_TypeClientData(SWIGTYPE_p_SipEvent, (void*) "tinyWRAP::SipEvent"); SWIG_TypeClientData(SWIGTYPE_p_DialogEvent, (void*) "tinyWRAP::DialogEvent"); + SWIG_TypeClientData(SWIGTYPE_p_StackEvent, (void*) "tinyWRAP::StackEvent"); SWIG_TypeClientData(SWIGTYPE_p_MessagingEvent, (void*) "tinyWRAP::MessagingEvent"); SWIG_TypeClientData(SWIGTYPE_p_OptionsEvent, (void*) "tinyWRAP::OptionsEvent"); SWIG_TypeClientData(SWIGTYPE_p_PublicationEvent, (void*) "tinyWRAP::PublicationEvent"); @@ -6263,180 +6359,199 @@ XS(SWIG_init) { SWIG_TypeClientData(SWIGTYPE_p_RegistrationSession, (void*) "tinyWRAP::RegistrationSession"); SWIG_TypeClientData(SWIGTYPE_p_SubscriptionSession, (void*) "tinyWRAP::SubscriptionSession"); SWIG_TypeClientData(SWIGTYPE_p_SipCallback, (void*) "tinyWRAP::SipCallback"); - 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.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.40/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.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.40/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.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.40/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.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.40/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.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.40/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.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.40/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.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.40/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.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_event_code_dialog_transport_error", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(702))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { - SV *sv = get_sv((char*) SWIG_prefix "tsip_event_code_global_error", TRUE | 0x2 | GV_ADDMULTI); + /*@SWIG:/usr/local/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "tsip_event_code_dialog_global_error", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(703))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_event_code_dialog_message_error", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(704))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_event_code_dialog_request_incoming", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(800))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_event_code_dialog_request_cancelled", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(801))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_event_code_dialog_request_sent", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(802))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_event_code_dialog_connecting", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(900))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_event_code_dialog_connected", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(901))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_event_code_dialog_terminating", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(902))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_event_code_dialog_terminated", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(903))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "tsip_event_code_stack_started", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(950))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/local/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "tsip_event_code_stack_stopped", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(951))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/local/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "tsip_event_code_stack_failed_to_start", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(952))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/local/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "tsip_event_code_stack_failed_to_stop", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(953))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/local/share/swig/1.3.40/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.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.40/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.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.40/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.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.40/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.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.40/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.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.40/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.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.40/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.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.40/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.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.40/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.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.40/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.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.40/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.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.40/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.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.40/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.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.40/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); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_i_message", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_i_message))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_ao_message", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_ao_message))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_i_options", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_i_options))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_ao_options", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_ao_options))); SvREADONLY_on(sv); diff --git a/trunk/bindings/python/tinyWRAP.py b/trunk/bindings/python/tinyWRAP.py index 12e96f3c..9ef8f5ad 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.39 +# Version 1.3.40 # # Do not make changes to this file unless you know what you are doing--modify # the SWIG interface file instead. @@ -10,12 +10,18 @@ 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__)]) - _mod = imp.load_module('_tinyWRAP', fp, pathname, description) - finally: - if fp is not None: fp.close() - return _mod + 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 _tinyWRAP = swig_import_helper() del swig_import_helper else: @@ -67,6 +73,25 @@ except: weakref_proxy = lambda x: x +class DDebugCallback(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, DDebugCallback, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, DDebugCallback, name) + __repr__ = _swig_repr + def __init__(self): + this = _tinyWRAP.new_DDebugCallback() + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _tinyWRAP.delete_DDebugCallback + __del__ = lambda self : None; + def OnDebugInfo(self, *args): return _tinyWRAP.DDebugCallback_OnDebugInfo(self, *args) + def OnDebugWarn(self, *args): return _tinyWRAP.DDebugCallback_OnDebugWarn(self, *args) + def OnDebugError(self, *args): return _tinyWRAP.DDebugCallback_OnDebugError(self, *args) + def OnDebugFatal(self, *args): return _tinyWRAP.DDebugCallback_OnDebugFatal(self, *args) +DDebugCallback_swigregister = _tinyWRAP.DDebugCallback_swigregister +DDebugCallback_swigregister(DDebugCallback) + class SipUri(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, SipUri, name, value) @@ -132,6 +157,20 @@ class DialogEvent(SipEvent): DialogEvent_swigregister = _tinyWRAP.DialogEvent_swigregister DialogEvent_swigregister(DialogEvent) +class StackEvent(SipEvent): + __swig_setmethods__ = {} + for _s in [SipEvent]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, StackEvent, name, value) + __swig_getmethods__ = {} + for _s in [SipEvent]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, StackEvent, name) + def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") + __repr__ = _swig_repr + __swig_destroy__ = _tinyWRAP.delete_StackEvent + __del__ = lambda self : None; +StackEvent_swigregister = _tinyWRAP.StackEvent_swigregister +StackEvent_swigregister(StackEvent) + class MessagingEvent(SipEvent): __swig_setmethods__ = {} for _s in [SipEvent]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) @@ -350,6 +389,7 @@ class SipCallback(_object): __swig_destroy__ = _tinyWRAP.delete_SipCallback __del__ = lambda self : None; def OnDialogEvent(self, *args): return _tinyWRAP.SipCallback_OnDialogEvent(self, *args) + def OnStackEvent(self, *args): return _tinyWRAP.SipCallback_OnStackEvent(self, *args) def OnMessagingEvent(self, *args): return _tinyWRAP.SipCallback_OnMessagingEvent(self, *args) def OnOptionsEvent(self, *args): return _tinyWRAP.SipCallback_OnOptionsEvent(self, *args) def OnPublicationEvent(self, *args): return _tinyWRAP.SipCallback_OnPublicationEvent(self, *args) @@ -362,33 +402,6 @@ class SipCallback(_object): SipCallback_swigregister = _tinyWRAP.SipCallback_swigregister SipCallback_swigregister(SipCallback) -class SipDebugCallback(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, SipDebugCallback, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, SipDebugCallback, name) - __repr__ = _swig_repr - def __init__(self): - if self.__class__ == SipDebugCallback: - _self = None - else: - _self = self - this = _tinyWRAP.new_SipDebugCallback(_self, ) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _tinyWRAP.delete_SipDebugCallback - __del__ = lambda self : None; - def OnDebugInfo(self, *args): return _tinyWRAP.SipDebugCallback_OnDebugInfo(self, *args) - def OnDebugWarn(self, *args): return _tinyWRAP.SipDebugCallback_OnDebugWarn(self, *args) - def OnDebugError(self, *args): return _tinyWRAP.SipDebugCallback_OnDebugError(self, *args) - def OnDebugFatal(self, *args): return _tinyWRAP.SipDebugCallback_OnDebugFatal(self, *args) - def __disown__(self): - self.this.disown() - _tinyWRAP.disown_SipDebugCallback(self) - return weakref_proxy(self) -SipDebugCallback_swigregister = _tinyWRAP.SipDebugCallback_swigregister -SipDebugCallback_swigregister(SipDebugCallback) - class SafeObject(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, SafeObject, name, value) @@ -447,7 +460,7 @@ tsip_event_register = _tinyWRAP.tsip_event_register tsip_event_subscribe = _tinyWRAP.tsip_event_subscribe tsip_event_dialog = _tinyWRAP.tsip_event_dialog tsip_event_code_dialog_transport_error = _tinyWRAP.tsip_event_code_dialog_transport_error -tsip_event_code_global_error = _tinyWRAP.tsip_event_code_global_error +tsip_event_code_dialog_global_error = _tinyWRAP.tsip_event_code_dialog_global_error tsip_event_code_dialog_message_error = _tinyWRAP.tsip_event_code_dialog_message_error tsip_event_code_dialog_request_incoming = _tinyWRAP.tsip_event_code_dialog_request_incoming tsip_event_code_dialog_request_cancelled = _tinyWRAP.tsip_event_code_dialog_request_cancelled @@ -456,6 +469,10 @@ tsip_event_code_dialog_connecting = _tinyWRAP.tsip_event_code_dialog_connecting tsip_event_code_dialog_connected = _tinyWRAP.tsip_event_code_dialog_connected tsip_event_code_dialog_terminating = _tinyWRAP.tsip_event_code_dialog_terminating tsip_event_code_dialog_terminated = _tinyWRAP.tsip_event_code_dialog_terminated +tsip_event_code_stack_started = _tinyWRAP.tsip_event_code_stack_started +tsip_event_code_stack_stopped = _tinyWRAP.tsip_event_code_stack_stopped +tsip_event_code_stack_failed_to_start = _tinyWRAP.tsip_event_code_stack_failed_to_start +tsip_event_code_stack_failed_to_stop = _tinyWRAP.tsip_event_code_stack_failed_to_stop tsip_i_register = _tinyWRAP.tsip_i_register tsip_ao_register = _tinyWRAP.tsip_ao_register tsip_i_unregister = _tinyWRAP.tsip_i_unregister diff --git a/trunk/bindings/python/tinyWRAP_wrap.cxx b/trunk/bindings/python/tinyWRAP_wrap.cxx index 607a11e1..2a1f556f 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.39 + * Version 1.3.40 * * 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,2605 +36,2642 @@ 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 +/* ----------------------------------------------------------------------------- + * swigrun.swg + * + * This file contains generic C API SWIG runtime support for pointer + * type checking. + * ----------------------------------------------------------------------------- */ -/* 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 - - +/* 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" -/* 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 +/* 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 -/* ----------------------------------------------------------------------------- - * 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); - } -} +/* + 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. +*/ -#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 +#ifndef SWIGRUNTIME +# define SWIGRUNTIME SWIGINTERN +#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 - +#ifndef SWIGRUNTIMEINLINE +# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE +#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 +/* 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 @@ -2643,512 +2680,513 @@ 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 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 +/* ----------------------------------------------------------------------------- + * 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 /* -------- TYPES TABLE (BEGIN) -------- */ -#define SWIGTYPE_p_DialogEvent swig_types[0] -#define SWIGTYPE_p_MessagingEvent swig_types[1] -#define SWIGTYPE_p_MessagingSession swig_types[2] -#define SWIGTYPE_p_OptionsEvent swig_types[3] -#define SWIGTYPE_p_OptionsSession swig_types[4] -#define SWIGTYPE_p_PublicationEvent swig_types[5] -#define SWIGTYPE_p_PublicationSession swig_types[6] -#define SWIGTYPE_p_RegistrationEvent swig_types[7] -#define SWIGTYPE_p_RegistrationSession swig_types[8] -#define SWIGTYPE_p_SafeObject swig_types[9] -#define SWIGTYPE_p_SipCallback swig_types[10] -#define SWIGTYPE_p_SipDebugCallback swig_types[11] +#define SWIGTYPE_p_DDebugCallback swig_types[0] +#define SWIGTYPE_p_DialogEvent swig_types[1] +#define SWIGTYPE_p_MessagingEvent swig_types[2] +#define SWIGTYPE_p_MessagingSession swig_types[3] +#define SWIGTYPE_p_OptionsEvent swig_types[4] +#define SWIGTYPE_p_OptionsSession swig_types[5] +#define SWIGTYPE_p_PublicationEvent swig_types[6] +#define SWIGTYPE_p_PublicationSession swig_types[7] +#define SWIGTYPE_p_RegistrationEvent swig_types[8] +#define SWIGTYPE_p_RegistrationSession swig_types[9] +#define SWIGTYPE_p_SafeObject swig_types[10] +#define SWIGTYPE_p_SipCallback swig_types[11] #define SWIGTYPE_p_SipEvent swig_types[12] #define SWIGTYPE_p_SipMessage swig_types[13] #define SWIGTYPE_p_SipSession swig_types[14] #define SWIGTYPE_p_SipStack swig_types[15] #define SWIGTYPE_p_SipUri swig_types[16] -#define SWIGTYPE_p_SubscriptionEvent swig_types[17] -#define SWIGTYPE_p_SubscriptionSession swig_types[18] -#define SWIGTYPE_p_char swig_types[19] -#define SWIGTYPE_p_tsip_event_type_e swig_types[20] -#define SWIGTYPE_p_tsip_message_event_type_e swig_types[21] -#define SWIGTYPE_p_tsip_options_event_type_e swig_types[22] -#define SWIGTYPE_p_tsip_publish_event_type_e swig_types[23] -#define SWIGTYPE_p_tsip_register_event_type_e swig_types[24] -#define SWIGTYPE_p_tsip_subscribe_event_type_e swig_types[25] -static swig_type_info *swig_types[27]; -static swig_module_info swig_module = {swig_types, 26, 0, 0, 0, 0}; +#define SWIGTYPE_p_StackEvent swig_types[17] +#define SWIGTYPE_p_SubscriptionEvent swig_types[18] +#define SWIGTYPE_p_SubscriptionSession swig_types[19] +#define SWIGTYPE_p_char swig_types[20] +#define SWIGTYPE_p_tsip_event_type_e swig_types[21] +#define SWIGTYPE_p_tsip_message_event_type_e swig_types[22] +#define SWIGTYPE_p_tsip_options_event_type_e swig_types[23] +#define SWIGTYPE_p_tsip_publish_event_type_e swig_types[24] +#define SWIGTYPE_p_tsip_register_event_type_e swig_types[25] +#define SWIGTYPE_p_tsip_subscribe_event_type_e swig_types[26] +static swig_type_info *swig_types[28]; +static swig_module_info swig_module = {swig_types, 27, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -3172,7 +3210,7 @@ static swig_module_info swig_module = {swig_types, 26, 0, 0, 0, 0}; #endif #define SWIG_name "_tinyWRAP" -#define SWIGVERSION 0x010339 +#define SWIGVERSION 0x010340 #define SWIG_VERSION SWIGVERSION @@ -3245,15 +3283,7 @@ namespace swig { } -#include "SipUri.h" -#include "SipMessage.h" -#include "SipEvent.h" -#include "SipSession.h" - -#include "SipCallback.h" -#include "SipDebug.h" -#include "SafeObject.h" -#include "SipStack.h" +#include "DDebug.h" SWIGINTERN swig_type_info* @@ -3273,19 +3303,27 @@ 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 @@ -3310,10 +3348,16 @@ 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(); @@ -3334,6 +3378,26 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) + #define SWIG_From_long PyInt_FromLong + + +SWIGINTERNINLINE PyObject * +SWIG_From_int (int value) +{ + return SWIG_From_long (value); +} + + +#include "SipUri.h" +#include "SipMessage.h" +#include "SipEvent.h" +#include "SipSession.h" + +#include "SipCallback.h" +#include "SafeObject.h" +#include "SipStack.h" + + SWIGINTERNINLINE PyObject* SWIG_From_bool (bool value) { @@ -3519,9 +3583,6 @@ SWIG_FromCharPtr(const char *cptr) } - #define SWIG_From_long PyInt_FromLong - - SWIGINTERNINLINE PyObject* SWIG_From_unsigned_SS_long (unsigned long value) { @@ -3544,13 +3605,6 @@ SWIG_From_short (short value) } -SWIGINTERNINLINE PyObject * -SWIG_From_int (int value) -{ - return SWIG_From_long (value); -} - - SWIGINTERN int SWIG_AsVal_long (PyObject *obj, long* val) { @@ -3665,6 +3719,37 @@ int SwigDirector_SipCallback::OnDialogEvent(DialogEvent const *e) { } +int SwigDirector_SipCallback::OnStackEvent(StackEvent const *e) { + int c_result; + swig::SwigVar_PyObject obj0; + obj0 = SWIG_NewPointerObj(SWIG_as_voidptr(e), SWIGTYPE_p_StackEvent, 0 ); + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call SipCallback.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 1; + const char * const swig_method_name = "OnStackEvent"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::SwigVar_PyObject result = PyObject_CallFunction(method, (char *)"(O)" ,(PyObject *)obj0); +#else + swig::SwigVar_PyObject result = PyObject_CallMethod(swig_get_self(), (char *)"OnStackEvent", (char *)"(O)" ,(PyObject *)obj0); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'SipCallback.OnStackEvent'"); + } + } + int swig_val; + int swig_res = SWIG_AsVal_int(result, &swig_val); + if (!SWIG_IsOK(swig_res)) { + Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""int""'"); + } + c_result = static_cast< int >(swig_val); + return (int) c_result; +} + + int SwigDirector_SipCallback::OnMessagingEvent(MessagingEvent const *e) { int c_result; swig::SwigVar_PyObject obj0; @@ -3673,7 +3758,7 @@ int SwigDirector_SipCallback::OnMessagingEvent(MessagingEvent const *e) { Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call SipCallback.__init__."); } #if defined(SWIG_PYTHON_DIRECTOR_VTABLE) - const size_t swig_method_index = 1; + const size_t swig_method_index = 2; const char * const swig_method_name = "OnMessagingEvent"; PyObject* method = swig_get_method(swig_method_index, swig_method_name); swig::SwigVar_PyObject result = PyObject_CallFunction(method, (char *)"(O)" ,(PyObject *)obj0); @@ -3704,7 +3789,7 @@ int SwigDirector_SipCallback::OnOptionsEvent(OptionsEvent const *e) { Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call SipCallback.__init__."); } #if defined(SWIG_PYTHON_DIRECTOR_VTABLE) - const size_t swig_method_index = 2; + const size_t swig_method_index = 3; const char * const swig_method_name = "OnOptionsEvent"; PyObject* method = swig_get_method(swig_method_index, swig_method_name); swig::SwigVar_PyObject result = PyObject_CallFunction(method, (char *)"(O)" ,(PyObject *)obj0); @@ -3735,7 +3820,7 @@ int SwigDirector_SipCallback::OnPublicationEvent(PublicationEvent const *e) { Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call SipCallback.__init__."); } #if defined(SWIG_PYTHON_DIRECTOR_VTABLE) - const size_t swig_method_index = 3; + const size_t swig_method_index = 4; const char * const swig_method_name = "OnPublicationEvent"; PyObject* method = swig_get_method(swig_method_index, swig_method_name); swig::SwigVar_PyObject result = PyObject_CallFunction(method, (char *)"(O)" ,(PyObject *)obj0); @@ -3766,7 +3851,7 @@ int SwigDirector_SipCallback::OnRegistrationEvent(RegistrationEvent const *e) { Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call SipCallback.__init__."); } #if defined(SWIG_PYTHON_DIRECTOR_VTABLE) - const size_t swig_method_index = 4; + const size_t swig_method_index = 5; const char * const swig_method_name = "OnRegistrationEvent"; PyObject* method = swig_get_method(swig_method_index, swig_method_name); swig::SwigVar_PyObject result = PyObject_CallFunction(method, (char *)"(O)" ,(PyObject *)obj0); @@ -3797,7 +3882,7 @@ int SwigDirector_SipCallback::OnSubscriptionEvent(SubscriptionEvent const *e) { Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call SipCallback.__init__."); } #if defined(SWIG_PYTHON_DIRECTOR_VTABLE) - const size_t swig_method_index = 5; + const size_t swig_method_index = 6; const char * const swig_method_name = "OnSubscriptionEvent"; PyObject* method = swig_get_method(swig_method_index, swig_method_name); swig::SwigVar_PyObject result = PyObject_CallFunction(method, (char *)"(O)" ,(PyObject *)obj0); @@ -3820,143 +3905,186 @@ int SwigDirector_SipCallback::OnSubscriptionEvent(SubscriptionEvent const *e) { } -SwigDirector_SipDebugCallback::SwigDirector_SipDebugCallback(PyObject *self): SipDebugCallback(), Swig::Director(self) { - SWIG_DIRECTOR_RGTR((SipDebugCallback *)this, this); -} - - - - -SwigDirector_SipDebugCallback::~SwigDirector_SipDebugCallback() { -} - -int SwigDirector_SipDebugCallback::OnDebugInfo(char const *message) { - int c_result; - swig::SwigVar_PyObject obj0; - obj0 = SWIG_FromCharPtr((const char *)message); - if (!swig_get_self()) { - Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call SipDebugCallback.__init__."); - } -#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) - const size_t swig_method_index = 0; - const char * const swig_method_name = "OnDebugInfo"; - PyObject* method = swig_get_method(swig_method_index, swig_method_name); - swig::SwigVar_PyObject result = PyObject_CallFunction(method, (char *)"(O)" ,(PyObject *)obj0); -#else - swig::SwigVar_PyObject result = PyObject_CallMethod(swig_get_self(), (char *)"OnDebugInfo", (char *)"(O)" ,(PyObject *)obj0); -#endif - if (result == NULL) { - PyObject *error = PyErr_Occurred(); - if (error != NULL) { - Swig::DirectorMethodException::raise("Error detected when calling 'SipDebugCallback.OnDebugInfo'"); - } - } - int swig_val; - int swig_res = SWIG_AsVal_int(result, &swig_val); - if (!SWIG_IsOK(swig_res)) { - Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""int""'"); - } - c_result = static_cast< int >(swig_val); - return (int) c_result; -} - - -int SwigDirector_SipDebugCallback::OnDebugWarn(char const *message) { - int c_result; - swig::SwigVar_PyObject obj0; - obj0 = SWIG_FromCharPtr((const char *)message); - if (!swig_get_self()) { - Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call SipDebugCallback.__init__."); - } -#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) - const size_t swig_method_index = 1; - const char * const swig_method_name = "OnDebugWarn"; - PyObject* method = swig_get_method(swig_method_index, swig_method_name); - swig::SwigVar_PyObject result = PyObject_CallFunction(method, (char *)"(O)" ,(PyObject *)obj0); -#else - swig::SwigVar_PyObject result = PyObject_CallMethod(swig_get_self(), (char *)"OnDebugWarn", (char *)"(O)" ,(PyObject *)obj0); -#endif - if (result == NULL) { - PyObject *error = PyErr_Occurred(); - if (error != NULL) { - Swig::DirectorMethodException::raise("Error detected when calling 'SipDebugCallback.OnDebugWarn'"); - } - } - int swig_val; - int swig_res = SWIG_AsVal_int(result, &swig_val); - if (!SWIG_IsOK(swig_res)) { - Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""int""'"); - } - c_result = static_cast< int >(swig_val); - return (int) c_result; -} - - -int SwigDirector_SipDebugCallback::OnDebugError(char const *message) { - int c_result; - swig::SwigVar_PyObject obj0; - obj0 = SWIG_FromCharPtr((const char *)message); - if (!swig_get_self()) { - Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call SipDebugCallback.__init__."); - } -#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) - const size_t swig_method_index = 2; - const char * const swig_method_name = "OnDebugError"; - PyObject* method = swig_get_method(swig_method_index, swig_method_name); - swig::SwigVar_PyObject result = PyObject_CallFunction(method, (char *)"(O)" ,(PyObject *)obj0); -#else - swig::SwigVar_PyObject result = PyObject_CallMethod(swig_get_self(), (char *)"OnDebugError", (char *)"(O)" ,(PyObject *)obj0); -#endif - if (result == NULL) { - PyObject *error = PyErr_Occurred(); - if (error != NULL) { - Swig::DirectorMethodException::raise("Error detected when calling 'SipDebugCallback.OnDebugError'"); - } - } - int swig_val; - int swig_res = SWIG_AsVal_int(result, &swig_val); - if (!SWIG_IsOK(swig_res)) { - Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""int""'"); - } - c_result = static_cast< int >(swig_val); - return (int) c_result; -} - - -int SwigDirector_SipDebugCallback::OnDebugFatal(char const *message) { - int c_result; - swig::SwigVar_PyObject obj0; - obj0 = SWIG_FromCharPtr((const char *)message); - if (!swig_get_self()) { - Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call SipDebugCallback.__init__."); - } -#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) - const size_t swig_method_index = 3; - const char * const swig_method_name = "OnDebugFatal"; - PyObject* method = swig_get_method(swig_method_index, swig_method_name); - swig::SwigVar_PyObject result = PyObject_CallFunction(method, (char *)"(O)" ,(PyObject *)obj0); -#else - swig::SwigVar_PyObject result = PyObject_CallMethod(swig_get_self(), (char *)"OnDebugFatal", (char *)"(O)" ,(PyObject *)obj0); -#endif - if (result == NULL) { - PyObject *error = PyErr_Occurred(); - if (error != NULL) { - Swig::DirectorMethodException::raise("Error detected when calling 'SipDebugCallback.OnDebugFatal'"); - } - } - int swig_val; - int swig_res = SWIG_AsVal_int(result, &swig_val); - if (!SWIG_IsOK(swig_res)) { - Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""int""'"); - } - c_result = static_cast< int >(swig_val); - return (int) c_result; -} - - #ifdef __cplusplus extern "C" { #endif +SWIGINTERN PyObject *_wrap_new_DDebugCallback(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + DDebugCallback *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_DDebugCallback")) SWIG_fail; + result = (DDebugCallback *)new DDebugCallback(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DDebugCallback, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_DDebugCallback(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + DDebugCallback *arg1 = (DDebugCallback *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_DDebugCallback",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_DDebugCallback, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DDebugCallback" "', argument " "1"" of type '" "DDebugCallback *""'"); + } + arg1 = reinterpret_cast< DDebugCallback * >(argp1); + delete arg1; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DDebugCallback_OnDebugInfo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + DDebugCallback *arg1 = (DDebugCallback *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + int result; + + if (!PyArg_ParseTuple(args,(char *)"OO:DDebugCallback_OnDebugInfo",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_DDebugCallback, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DDebugCallback_OnDebugInfo" "', argument " "1"" of type '" "DDebugCallback *""'"); + } + arg1 = reinterpret_cast< DDebugCallback * >(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DDebugCallback_OnDebugInfo" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + result = (int)(arg1)->OnDebugInfo((char const *)arg2); + resultobj = SWIG_From_int(static_cast< int >(result)); + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DDebugCallback_OnDebugWarn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + DDebugCallback *arg1 = (DDebugCallback *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + int result; + + if (!PyArg_ParseTuple(args,(char *)"OO:DDebugCallback_OnDebugWarn",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_DDebugCallback, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DDebugCallback_OnDebugWarn" "', argument " "1"" of type '" "DDebugCallback *""'"); + } + arg1 = reinterpret_cast< DDebugCallback * >(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DDebugCallback_OnDebugWarn" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + result = (int)(arg1)->OnDebugWarn((char const *)arg2); + resultobj = SWIG_From_int(static_cast< int >(result)); + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DDebugCallback_OnDebugError(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + DDebugCallback *arg1 = (DDebugCallback *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + int result; + + if (!PyArg_ParseTuple(args,(char *)"OO:DDebugCallback_OnDebugError",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_DDebugCallback, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DDebugCallback_OnDebugError" "', argument " "1"" of type '" "DDebugCallback *""'"); + } + arg1 = reinterpret_cast< DDebugCallback * >(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DDebugCallback_OnDebugError" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + result = (int)(arg1)->OnDebugError((char const *)arg2); + resultobj = SWIG_From_int(static_cast< int >(result)); + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DDebugCallback_OnDebugFatal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + DDebugCallback *arg1 = (DDebugCallback *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + int result; + + if (!PyArg_ParseTuple(args,(char *)"OO:DDebugCallback_OnDebugFatal",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_DDebugCallback, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DDebugCallback_OnDebugFatal" "', argument " "1"" of type '" "DDebugCallback *""'"); + } + arg1 = reinterpret_cast< DDebugCallback * >(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DDebugCallback_OnDebugFatal" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + result = (int)(arg1)->OnDebugFatal((char const *)arg2); + resultobj = SWIG_From_int(static_cast< int >(result)); + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return NULL; +} + + +SWIGINTERN PyObject *DDebugCallback_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_DDebugCallback, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + SWIGINTERN PyObject *_wrap_new_SipUri(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; @@ -4633,6 +4761,34 @@ SWIGINTERN PyObject *DialogEvent_swigregister(PyObject *SWIGUNUSEDPARM(self), Py return SWIG_Py_Void(); } +SWIGINTERN PyObject *_wrap_delete_StackEvent(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StackEvent *arg1 = (StackEvent *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_StackEvent",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StackEvent, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_StackEvent" "', argument " "1"" of type '" "StackEvent *""'"); + } + arg1 = reinterpret_cast< StackEvent * >(argp1); + delete arg1; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *StackEvent_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_StackEvent, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + SWIGINTERN PyObject *_wrap_delete_MessagingEvent(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; MessagingEvent *arg1 = (MessagingEvent *) 0 ; @@ -6071,6 +6227,49 @@ fail: } +SWIGINTERN PyObject *_wrap_SipCallback_OnStackEvent(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SipCallback *arg1 = (SipCallback *) 0 ; + StackEvent *arg2 = (StackEvent *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + Swig::Director *director = 0; + bool upcall = false; + int result; + + if (!PyArg_ParseTuple(args,(char *)"OO:SipCallback_OnStackEvent",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SipCallback, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SipCallback_OnStackEvent" "', argument " "1"" of type '" "SipCallback *""'"); + } + arg1 = reinterpret_cast< SipCallback * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_StackEvent, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SipCallback_OnStackEvent" "', argument " "2"" of type '" "StackEvent const *""'"); + } + arg2 = reinterpret_cast< StackEvent * >(argp2); + director = SWIG_DIRECTOR_CAST(arg1); + upcall = (director && (director->swig_get_self()==obj0)); + try { + if (upcall) { + result = (int)(arg1)->SipCallback::OnStackEvent((StackEvent const *)arg2); + } else { + result = (int)(arg1)->OnStackEvent((StackEvent const *)arg2); + } + } catch (Swig::DirectorException&) { + SWIG_fail; + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_SipCallback_OnMessagingEvent(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; SipCallback *arg1 = (SipCallback *) 0 ; @@ -6300,7 +6499,7 @@ SWIGINTERN PyObject *_wrap_disown_SipCallback(PyObject *SWIGUNUSEDPARM(self), Py } arg1 = reinterpret_cast< SipCallback * >(argp1); { - Swig::Director *director = SWIG_DIRECTOR_CAST(arg1); + Swig::Director *director = dynamic_cast(arg1); if (director) director->swig_disown(); } @@ -6318,265 +6517,6 @@ SWIGINTERN PyObject *SipCallback_swigregister(PyObject *SWIGUNUSEDPARM(self), Py return SWIG_Py_Void(); } -SWIGINTERN PyObject *_wrap_new_SipDebugCallback(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - PyObject *arg1 = (PyObject *) 0 ; - PyObject * obj0 = 0 ; - SipDebugCallback *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:new_SipDebugCallback",&obj0)) SWIG_fail; - arg1 = obj0; - if ( arg1 != Py_None ) { - /* subclassed */ - result = (SipDebugCallback *)new SwigDirector_SipDebugCallback(arg1); - } else { - result = (SipDebugCallback *)new SipDebugCallback(); - } - - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SipDebugCallback, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_SipDebugCallback(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - SipDebugCallback *arg1 = (SipDebugCallback *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:delete_SipDebugCallback",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SipDebugCallback, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SipDebugCallback" "', argument " "1"" of type '" "SipDebugCallback *""'"); - } - arg1 = reinterpret_cast< SipDebugCallback * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SipDebugCallback_OnDebugInfo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - SipDebugCallback *arg1 = (SipDebugCallback *) 0 ; - char *arg2 = (char *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - Swig::Director *director = 0; - bool upcall = false; - int result; - - if (!PyArg_ParseTuple(args,(char *)"OO:SipDebugCallback_OnDebugInfo",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SipDebugCallback, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SipDebugCallback_OnDebugInfo" "', argument " "1"" of type '" "SipDebugCallback *""'"); - } - arg1 = reinterpret_cast< SipDebugCallback * >(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SipDebugCallback_OnDebugInfo" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = reinterpret_cast< char * >(buf2); - director = SWIG_DIRECTOR_CAST(arg1); - upcall = (director && (director->swig_get_self()==obj0)); - try { - if (upcall) { - result = (int)(arg1)->SipDebugCallback::OnDebugInfo((char const *)arg2); - } else { - result = (int)(arg1)->OnDebugInfo((char const *)arg2); - } - } catch (Swig::DirectorException&) { - SWIG_fail; - } - resultobj = SWIG_From_int(static_cast< int >(result)); - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return resultobj; -fail: - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SipDebugCallback_OnDebugWarn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - SipDebugCallback *arg1 = (SipDebugCallback *) 0 ; - char *arg2 = (char *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - Swig::Director *director = 0; - bool upcall = false; - int result; - - if (!PyArg_ParseTuple(args,(char *)"OO:SipDebugCallback_OnDebugWarn",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SipDebugCallback, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SipDebugCallback_OnDebugWarn" "', argument " "1"" of type '" "SipDebugCallback *""'"); - } - arg1 = reinterpret_cast< SipDebugCallback * >(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SipDebugCallback_OnDebugWarn" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = reinterpret_cast< char * >(buf2); - director = SWIG_DIRECTOR_CAST(arg1); - upcall = (director && (director->swig_get_self()==obj0)); - try { - if (upcall) { - result = (int)(arg1)->SipDebugCallback::OnDebugWarn((char const *)arg2); - } else { - result = (int)(arg1)->OnDebugWarn((char const *)arg2); - } - } catch (Swig::DirectorException&) { - SWIG_fail; - } - resultobj = SWIG_From_int(static_cast< int >(result)); - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return resultobj; -fail: - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SipDebugCallback_OnDebugError(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - SipDebugCallback *arg1 = (SipDebugCallback *) 0 ; - char *arg2 = (char *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - Swig::Director *director = 0; - bool upcall = false; - int result; - - if (!PyArg_ParseTuple(args,(char *)"OO:SipDebugCallback_OnDebugError",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SipDebugCallback, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SipDebugCallback_OnDebugError" "', argument " "1"" of type '" "SipDebugCallback *""'"); - } - arg1 = reinterpret_cast< SipDebugCallback * >(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SipDebugCallback_OnDebugError" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = reinterpret_cast< char * >(buf2); - director = SWIG_DIRECTOR_CAST(arg1); - upcall = (director && (director->swig_get_self()==obj0)); - try { - if (upcall) { - result = (int)(arg1)->SipDebugCallback::OnDebugError((char const *)arg2); - } else { - result = (int)(arg1)->OnDebugError((char const *)arg2); - } - } catch (Swig::DirectorException&) { - SWIG_fail; - } - resultobj = SWIG_From_int(static_cast< int >(result)); - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return resultobj; -fail: - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SipDebugCallback_OnDebugFatal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - SipDebugCallback *arg1 = (SipDebugCallback *) 0 ; - char *arg2 = (char *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - Swig::Director *director = 0; - bool upcall = false; - int result; - - if (!PyArg_ParseTuple(args,(char *)"OO:SipDebugCallback_OnDebugFatal",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SipDebugCallback, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SipDebugCallback_OnDebugFatal" "', argument " "1"" of type '" "SipDebugCallback *""'"); - } - arg1 = reinterpret_cast< SipDebugCallback * >(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SipDebugCallback_OnDebugFatal" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = reinterpret_cast< char * >(buf2); - director = SWIG_DIRECTOR_CAST(arg1); - upcall = (director && (director->swig_get_self()==obj0)); - try { - if (upcall) { - result = (int)(arg1)->SipDebugCallback::OnDebugFatal((char const *)arg2); - } else { - result = (int)(arg1)->OnDebugFatal((char const *)arg2); - } - } catch (Swig::DirectorException&) { - SWIG_fail; - } - resultobj = SWIG_From_int(static_cast< int >(result)); - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return resultobj; -fail: - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_disown_SipDebugCallback(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - SipDebugCallback *arg1 = (SipDebugCallback *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:disown_SipDebugCallback",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SipDebugCallback, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_SipDebugCallback" "', argument " "1"" of type '" "SipDebugCallback *""'"); - } - arg1 = reinterpret_cast< SipDebugCallback * >(argp1); - { - Swig::Director *director = SWIG_DIRECTOR_CAST(arg1); - if (director) director->swig_disown(); - } - - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *SipDebugCallback_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_SipDebugCallback, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - SWIGINTERN PyObject *_wrap_new_SafeObject(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; SafeObject *result = 0 ; @@ -6766,7 +6706,7 @@ fail: SWIGINTERN PyObject *_wrap_SipStack_setDebugCallback(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; SipStack *arg1 = (SipStack *) 0 ; - SipDebugCallback *arg2 = (SipDebugCallback *) 0 ; + DDebugCallback *arg2 = (DDebugCallback *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -6781,11 +6721,11 @@ SWIGINTERN PyObject *_wrap_SipStack_setDebugCallback(PyObject *SWIGUNUSEDPARM(se SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SipStack_setDebugCallback" "', argument " "1"" of type '" "SipStack *""'"); } arg1 = reinterpret_cast< SipStack * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_SipDebugCallback, 0 | 0 ); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_DDebugCallback, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SipStack_setDebugCallback" "', argument " "2"" of type '" "SipDebugCallback *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SipStack_setDebugCallback" "', argument " "2"" of type '" "DDebugCallback *""'"); } - arg2 = reinterpret_cast< SipDebugCallback * >(argp2); + arg2 = reinterpret_cast< DDebugCallback * >(argp2); result = (bool)(arg1)->setDebugCallback(arg2); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; @@ -7303,6 +7243,13 @@ SWIGINTERN PyObject *SipStack_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObj static PyMethodDef SwigMethods[] = { { (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL}, + { (char *)"new_DDebugCallback", _wrap_new_DDebugCallback, METH_VARARGS, NULL}, + { (char *)"delete_DDebugCallback", _wrap_delete_DDebugCallback, METH_VARARGS, NULL}, + { (char *)"DDebugCallback_OnDebugInfo", _wrap_DDebugCallback_OnDebugInfo, METH_VARARGS, NULL}, + { (char *)"DDebugCallback_OnDebugWarn", _wrap_DDebugCallback_OnDebugWarn, METH_VARARGS, NULL}, + { (char *)"DDebugCallback_OnDebugError", _wrap_DDebugCallback_OnDebugError, METH_VARARGS, NULL}, + { (char *)"DDebugCallback_OnDebugFatal", _wrap_DDebugCallback_OnDebugFatal, METH_VARARGS, NULL}, + { (char *)"DDebugCallback_swigregister", DDebugCallback_swigregister, METH_VARARGS, NULL}, { (char *)"new_SipUri", _wrap_new_SipUri, METH_VARARGS, NULL}, { (char *)"delete_SipUri", _wrap_delete_SipUri, METH_VARARGS, NULL}, { (char *)"SipUri_isValid", _wrap_SipUri_isValid, METH_VARARGS, NULL}, @@ -7322,6 +7269,8 @@ static PyMethodDef SwigMethods[] = { { (char *)"SipEvent_swigregister", SipEvent_swigregister, METH_VARARGS, NULL}, { (char *)"delete_DialogEvent", _wrap_delete_DialogEvent, METH_VARARGS, NULL}, { (char *)"DialogEvent_swigregister", DialogEvent_swigregister, METH_VARARGS, NULL}, + { (char *)"delete_StackEvent", _wrap_delete_StackEvent, METH_VARARGS, NULL}, + { (char *)"StackEvent_swigregister", StackEvent_swigregister, METH_VARARGS, NULL}, { (char *)"delete_MessagingEvent", _wrap_delete_MessagingEvent, METH_VARARGS, NULL}, { (char *)"MessagingEvent_getType", _wrap_MessagingEvent_getType, METH_VARARGS, NULL}, { (char *)"MessagingEvent_getSession", _wrap_MessagingEvent_getSession, METH_VARARGS, NULL}, @@ -7384,6 +7333,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"new_SipCallback", _wrap_new_SipCallback, METH_VARARGS, NULL}, { (char *)"delete_SipCallback", _wrap_delete_SipCallback, METH_VARARGS, NULL}, { (char *)"SipCallback_OnDialogEvent", _wrap_SipCallback_OnDialogEvent, METH_VARARGS, NULL}, + { (char *)"SipCallback_OnStackEvent", _wrap_SipCallback_OnStackEvent, METH_VARARGS, NULL}, { (char *)"SipCallback_OnMessagingEvent", _wrap_SipCallback_OnMessagingEvent, METH_VARARGS, NULL}, { (char *)"SipCallback_OnOptionsEvent", _wrap_SipCallback_OnOptionsEvent, METH_VARARGS, NULL}, { (char *)"SipCallback_OnPublicationEvent", _wrap_SipCallback_OnPublicationEvent, METH_VARARGS, NULL}, @@ -7391,14 +7341,6 @@ static PyMethodDef SwigMethods[] = { { (char *)"SipCallback_OnSubscriptionEvent", _wrap_SipCallback_OnSubscriptionEvent, METH_VARARGS, NULL}, { (char *)"disown_SipCallback", _wrap_disown_SipCallback, METH_VARARGS, NULL}, { (char *)"SipCallback_swigregister", SipCallback_swigregister, METH_VARARGS, NULL}, - { (char *)"new_SipDebugCallback", _wrap_new_SipDebugCallback, METH_VARARGS, NULL}, - { (char *)"delete_SipDebugCallback", _wrap_delete_SipDebugCallback, METH_VARARGS, NULL}, - { (char *)"SipDebugCallback_OnDebugInfo", _wrap_SipDebugCallback_OnDebugInfo, METH_VARARGS, NULL}, - { (char *)"SipDebugCallback_OnDebugWarn", _wrap_SipDebugCallback_OnDebugWarn, METH_VARARGS, NULL}, - { (char *)"SipDebugCallback_OnDebugError", _wrap_SipDebugCallback_OnDebugError, METH_VARARGS, NULL}, - { (char *)"SipDebugCallback_OnDebugFatal", _wrap_SipDebugCallback_OnDebugFatal, METH_VARARGS, NULL}, - { (char *)"disown_SipDebugCallback", _wrap_disown_SipDebugCallback, METH_VARARGS, NULL}, - { (char *)"SipDebugCallback_swigregister", SipDebugCallback_swigregister, METH_VARARGS, NULL}, { (char *)"new_SafeObject", _wrap_new_SafeObject, METH_VARARGS, NULL}, { (char *)"delete_SafeObject", _wrap_delete_SafeObject, METH_VARARGS, NULL}, { (char *)"SafeObject_Lock", _wrap_SafeObject_Lock, METH_VARARGS, NULL}, @@ -7462,9 +7404,13 @@ static void *_p_RegistrationEventTo_p_SipEvent(void *x, int *SWIGUNUSEDPARM(newm static void *_p_SubscriptionEventTo_p_SipEvent(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((SipEvent *) ((SubscriptionEvent *) x)); } +static void *_p_StackEventTo_p_SipEvent(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((SipEvent *) ((StackEvent *) x)); +} static void *_p_MessagingEventTo_p_SipEvent(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((SipEvent *) ((MessagingEvent *) x)); } +static swig_type_info _swigt__p_DDebugCallback = {"_p_DDebugCallback", "DDebugCallback *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_DialogEvent = {"_p_DialogEvent", "DialogEvent *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_MessagingEvent = {"_p_MessagingEvent", "MessagingEvent *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_MessagingSession = {"_p_MessagingSession", "MessagingSession *", 0, 0, (void*)0, 0}; @@ -7476,12 +7422,12 @@ static swig_type_info _swigt__p_RegistrationEvent = {"_p_RegistrationEvent", "Re static swig_type_info _swigt__p_RegistrationSession = {"_p_RegistrationSession", "RegistrationSession *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_SafeObject = {"_p_SafeObject", "SafeObject *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_SipCallback = {"_p_SipCallback", "SipCallback *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_SipDebugCallback = {"_p_SipDebugCallback", "SipDebugCallback *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_SipEvent = {"_p_SipEvent", "SipEvent *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_SipMessage = {"_p_SipMessage", "SipMessage *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_SipSession = {"_p_SipSession", "SipSession *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_SipStack = {"_p_SipStack", "SipStack *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_SipUri = {"_p_SipUri", "SipUri *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_StackEvent = {"_p_StackEvent", "StackEvent *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_SubscriptionEvent = {"_p_SubscriptionEvent", "SubscriptionEvent *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_SubscriptionSession = {"_p_SubscriptionSession", "SubscriptionSession *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0}; @@ -7493,6 +7439,7 @@ static swig_type_info _swigt__p_tsip_register_event_type_e = {"_p_tsip_register_ static swig_type_info _swigt__p_tsip_subscribe_event_type_e = {"_p_tsip_subscribe_event_type_e", "enum tsip_subscribe_event_type_e *|tsip_subscribe_event_type_t *", 0, 0, (void*)0, 0}; static swig_type_info *swig_type_initial[] = { + &_swigt__p_DDebugCallback, &_swigt__p_DialogEvent, &_swigt__p_MessagingEvent, &_swigt__p_MessagingSession, @@ -7504,12 +7451,12 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_RegistrationSession, &_swigt__p_SafeObject, &_swigt__p_SipCallback, - &_swigt__p_SipDebugCallback, &_swigt__p_SipEvent, &_swigt__p_SipMessage, &_swigt__p_SipSession, &_swigt__p_SipStack, &_swigt__p_SipUri, + &_swigt__p_StackEvent, &_swigt__p_SubscriptionEvent, &_swigt__p_SubscriptionSession, &_swigt__p_char, @@ -7521,6 +7468,7 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_tsip_subscribe_event_type_e, }; +static swig_cast_info _swigc__p_DDebugCallback[] = { {&_swigt__p_DDebugCallback, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_DialogEvent[] = { {&_swigt__p_DialogEvent, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_MessagingEvent[] = { {&_swigt__p_MessagingEvent, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_MessagingSession[] = { {&_swigt__p_MessagingSession, 0, 0, 0},{0, 0, 0, 0}}; @@ -7532,12 +7480,12 @@ static swig_cast_info _swigc__p_RegistrationEvent[] = { {&_swigt__p_Registratio static swig_cast_info _swigc__p_RegistrationSession[] = { {&_swigt__p_RegistrationSession, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_SafeObject[] = { {&_swigt__p_SipStack, _p_SipStackTo_p_SafeObject, 0, 0}, {&_swigt__p_SafeObject, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_SipCallback[] = { {&_swigt__p_SipCallback, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_SipDebugCallback[] = { {&_swigt__p_SipDebugCallback, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_SipEvent[] = { {&_swigt__p_SipEvent, 0, 0, 0}, {&_swigt__p_OptionsEvent, _p_OptionsEventTo_p_SipEvent, 0, 0}, {&_swigt__p_DialogEvent, _p_DialogEventTo_p_SipEvent, 0, 0}, {&_swigt__p_PublicationEvent, _p_PublicationEventTo_p_SipEvent, 0, 0}, {&_swigt__p_RegistrationEvent, _p_RegistrationEventTo_p_SipEvent, 0, 0}, {&_swigt__p_SubscriptionEvent, _p_SubscriptionEventTo_p_SipEvent, 0, 0}, {&_swigt__p_MessagingEvent, _p_MessagingEventTo_p_SipEvent, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_SipEvent[] = { {&_swigt__p_SipEvent, 0, 0, 0}, {&_swigt__p_OptionsEvent, _p_OptionsEventTo_p_SipEvent, 0, 0}, {&_swigt__p_DialogEvent, _p_DialogEventTo_p_SipEvent, 0, 0}, {&_swigt__p_PublicationEvent, _p_PublicationEventTo_p_SipEvent, 0, 0}, {&_swigt__p_RegistrationEvent, _p_RegistrationEventTo_p_SipEvent, 0, 0}, {&_swigt__p_SubscriptionEvent, _p_SubscriptionEventTo_p_SipEvent, 0, 0}, {&_swigt__p_StackEvent, _p_StackEventTo_p_SipEvent, 0, 0}, {&_swigt__p_MessagingEvent, _p_MessagingEventTo_p_SipEvent, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_SipMessage[] = { {&_swigt__p_SipMessage, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_SipSession[] = { {&_swigt__p_SipSession, 0, 0, 0}, {&_swigt__p_MessagingSession, _p_MessagingSessionTo_p_SipSession, 0, 0}, {&_swigt__p_OptionsSession, _p_OptionsSessionTo_p_SipSession, 0, 0}, {&_swigt__p_PublicationSession, _p_PublicationSessionTo_p_SipSession, 0, 0}, {&_swigt__p_RegistrationSession, _p_RegistrationSessionTo_p_SipSession, 0, 0}, {&_swigt__p_SubscriptionSession, _p_SubscriptionSessionTo_p_SipSession, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_SipStack[] = { {&_swigt__p_SipStack, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_SipUri[] = { {&_swigt__p_SipUri, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_StackEvent[] = { {&_swigt__p_StackEvent, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_SubscriptionEvent[] = { {&_swigt__p_SubscriptionEvent, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_SubscriptionSession[] = { {&_swigt__p_SubscriptionSession, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}}; @@ -7549,6 +7497,7 @@ static swig_cast_info _swigc__p_tsip_register_event_type_e[] = { {&_swigt__p_ts static swig_cast_info _swigc__p_tsip_subscribe_event_type_e[] = { {&_swigt__p_tsip_subscribe_event_type_e, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info *swig_cast_initial[] = { + _swigc__p_DDebugCallback, _swigc__p_DialogEvent, _swigc__p_MessagingEvent, _swigc__p_MessagingSession, @@ -7560,12 +7509,12 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_RegistrationSession, _swigc__p_SafeObject, _swigc__p_SipCallback, - _swigc__p_SipDebugCallback, _swigc__p_SipEvent, _swigc__p_SipMessage, _swigc__p_SipSession, _swigc__p_SipStack, _swigc__p_SipUri, + _swigc__p_StackEvent, _swigc__p_SubscriptionEvent, _swigc__p_SubscriptionSession, _swigc__p_char, @@ -7586,242 +7535,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 @@ -7899,9 +7848,11 @@ 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", SWIG_Python_str_AsChar(str)); + fprintf(fp,"%s\n", tmp = SWIG_Python_str_AsChar(str)); + SWIG_Python_str_DelForPy3(tmp); Py_DECREF(str); return 0; } @@ -7969,7 +7920,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) */ @@ -7980,7 +7931,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 */ @@ -8001,7 +7952,7 @@ extern "C" { #endif }; varlink_type = tmp; - /* for Python 3 we already assigned the ob_type in PyVarObject_HEAD_INIT() */ + /* for Python 3 we already assigned ob_type in PyVarObject_HEAD_INIT() */ #if PY_VERSION_HEX < 0x03000000 varlink_type.ob_type = &PyType_Type; #endif @@ -8137,10 +8088,7 @@ PyObject* void #endif SWIG_init(void) { - PyObject *m, *d; - - /* Fix SwigMethods to carry the callback ptrs when needed */ - SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial); + PyObject *m, *d; #if PY_VERSION_HEX >= 0x03000000 static struct PyModuleDef SWIG_module = { PyModuleDef_HEAD_INIT, @@ -8153,7 +8101,12 @@ 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); @@ -8172,7 +8125,7 @@ SWIG_init(void) { SWIG_Python_SetConstant(d, "tsip_event_subscribe",SWIG_From_int(static_cast< int >(tsip_event_subscribe))); SWIG_Python_SetConstant(d, "tsip_event_dialog",SWIG_From_int(static_cast< int >(tsip_event_dialog))); SWIG_Python_SetConstant(d, "tsip_event_code_dialog_transport_error",SWIG_From_int(static_cast< int >(702))); - SWIG_Python_SetConstant(d, "tsip_event_code_global_error",SWIG_From_int(static_cast< int >(703))); + SWIG_Python_SetConstant(d, "tsip_event_code_dialog_global_error",SWIG_From_int(static_cast< int >(703))); SWIG_Python_SetConstant(d, "tsip_event_code_dialog_message_error",SWIG_From_int(static_cast< int >(704))); SWIG_Python_SetConstant(d, "tsip_event_code_dialog_request_incoming",SWIG_From_int(static_cast< int >(800))); SWIG_Python_SetConstant(d, "tsip_event_code_dialog_request_cancelled",SWIG_From_int(static_cast< int >(801))); @@ -8181,6 +8134,10 @@ SWIG_init(void) { SWIG_Python_SetConstant(d, "tsip_event_code_dialog_connected",SWIG_From_int(static_cast< int >(901))); SWIG_Python_SetConstant(d, "tsip_event_code_dialog_terminating",SWIG_From_int(static_cast< int >(902))); SWIG_Python_SetConstant(d, "tsip_event_code_dialog_terminated",SWIG_From_int(static_cast< int >(903))); + SWIG_Python_SetConstant(d, "tsip_event_code_stack_started",SWIG_From_int(static_cast< int >(950))); + SWIG_Python_SetConstant(d, "tsip_event_code_stack_stopped",SWIG_From_int(static_cast< int >(951))); + SWIG_Python_SetConstant(d, "tsip_event_code_stack_failed_to_start",SWIG_From_int(static_cast< int >(952))); + SWIG_Python_SetConstant(d, "tsip_event_code_stack_failed_to_stop",SWIG_From_int(static_cast< int >(953))); SWIG_Python_SetConstant(d, "tsip_i_register",SWIG_From_int(static_cast< int >(tsip_i_register))); SWIG_Python_SetConstant(d, "tsip_ao_register",SWIG_From_int(static_cast< int >(tsip_ao_register))); SWIG_Python_SetConstant(d, "tsip_i_unregister",SWIG_From_int(static_cast< int >(tsip_i_unregister))); diff --git a/trunk/bindings/python/tinyWRAP_wrap.h b/trunk/bindings/python/tinyWRAP_wrap.h index 64583f4d..88ea9203 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.39 + * Version 1.3.40 * * 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 @@ -21,6 +21,7 @@ public: SwigDirector_SipCallback(PyObject *self); virtual ~SwigDirector_SipCallback(); virtual int OnDialogEvent(DialogEvent const *e); + virtual int OnStackEvent(StackEvent const *e); virtual int OnMessagingEvent(MessagingEvent const *e); virtual int OnOptionsEvent(OptionsEvent const *e); virtual int OnPublicationEvent(PublicationEvent const *e); @@ -59,55 +60,7 @@ private: return method; } private: - mutable swig::SwigVar_PyObject vtable[6]; -#endif - -}; - - -class SwigDirector_SipDebugCallback : public SipDebugCallback, public Swig::Director { - -public: - SwigDirector_SipDebugCallback(PyObject *self); - virtual ~SwigDirector_SipDebugCallback(); - virtual int OnDebugInfo(char const *message); - virtual int OnDebugWarn(char const *message); - virtual int OnDebugError(char const *message); - virtual int OnDebugFatal(char const *message); - - -/* Internal Director utilities */ -public: - bool swig_get_inner(const char* name) const { - std::map::const_iterator iv = inner.find(name); - return (iv != inner.end() ? iv->second : false); - } - - void swig_set_inner(const char* name, bool val) const - { inner[name] = val;} - -private: - mutable std::map inner; - - -#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) -/* VTable implementation */ - PyObject *swig_get_method(size_t method_index, const char *method_name) const { - PyObject *method = vtable[method_index]; - if (!method) { - swig::SwigVar_PyObject name = SWIG_Python_str_FromChar(method_name); - method = PyObject_GetAttr(swig_get_self(), name); - if (method == NULL) { - std::string msg = "Method in class SipDebugCallback doesn't exist, undefined "; - msg += method_name; - Swig::DirectorMethodException::raise(msg.c_str()); - } - vtable[method_index] = method; - }; - return method; - } -private: - mutable swig::SwigVar_PyObject vtable[4]; + mutable swig::SwigVar_PyObject vtable[7]; #endif }; diff --git a/trunk/bindings/vs_2005/csharp/test/Form1.cs b/trunk/bindings/vs_2005/csharp/test/Form1.cs index d8d200e2..b0790a7c 100644 --- a/trunk/bindings/vs_2005/csharp/test/Form1.cs +++ b/trunk/bindings/vs_2005/csharp/test/Form1.cs @@ -161,7 +161,7 @@ namespace test this.form = form; } - public override int OnRegistrationChanged(RegistrationEvent e) + public override int OnRegistrationEvent(RegistrationEvent e) { short code = e.getCode(); tsip_register_event_type_t type = e.getType(); @@ -172,12 +172,8 @@ namespace test switch (type) { case tsip_register_event_type_t.tsip_i_register: - case tsip_register_event_type_t.tsip_ai_register: - case tsip_register_event_type_t.tsip_o_register: case tsip_register_event_type_t.tsip_ao_register: case tsip_register_event_type_t.tsip_i_unregister: - case tsip_register_event_type_t.tsip_ai_unregister: - case tsip_register_event_type_t.tsip_o_unregister: case tsip_register_event_type_t.tsip_ao_unregister: break; } @@ -192,7 +188,7 @@ namespace test return 0; } - public override int OnPublicationChanged(PublicationEvent e) + public override int OnPublicationEvent(PublicationEvent e) { short code = e.getCode(); tsip_publish_event_type_t type = e.getType(); diff --git a/trunk/bindings/vs_2005/csharp/test/test.csproj b/trunk/bindings/vs_2005/csharp/test/test.csproj index 9db28f82..0de94599 100644 --- a/trunk/bindings/vs_2005/csharp/test/test.csproj +++ b/trunk/bindings/vs_2005/csharp/test/test.csproj @@ -36,6 +36,24 @@ + + DDebugCallback.cs + + + DialogEvent.cs + + + MessagingEvent.cs + + + MessagingSession.cs + + + OptionsEvent.cs + + + OptionsSession.cs + PublicationEvent.cs @@ -54,9 +72,6 @@ SipCallback.cs - - SipDebugCallback.cs - SipEvent.cs @@ -72,6 +87,9 @@ SipUri.cs + + StackEvent.cs + SubscriptionEvent.cs @@ -87,6 +105,12 @@ tsip_event_type_t.cs + + tsip_message_event_type_t.cs + + + tsip_options_event_type_t.cs + tsip_publish_event_type_t.cs diff --git a/trunk/bindings/vs_2005/csharp/tinyWRAP.vcproj b/trunk/bindings/vs_2005/csharp/tinyWRAP.vcproj index d691dca4..eb5c4571 100644 --- a/trunk/bindings/vs_2005/csharp/tinyWRAP.vcproj +++ b/trunk/bindings/vs_2005/csharp/tinyWRAP.vcproj @@ -179,23 +179,7 @@ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" > - - - - - - - - - - @@ -230,14 +210,6 @@ RelativePath="..\..\_common\SipUri.cxx" > - - - - @@ -257,23 +229,7 @@ > - - - - - - - - - - @@ -308,14 +260,6 @@ RelativePath="..\..\_common\SipUri.h" > - - - - diff --git a/trunk/tinyNET/src/tnet_socket.c b/trunk/tinyNET/src/tnet_socket.c index f315b91e..244e1ea6 100644 --- a/trunk/tinyNET/src/tnet_socket.c +++ b/trunk/tinyNET/src/tnet_socket.c @@ -248,7 +248,7 @@ static tsk_object_t* tnet_socket_ctor(tsk_object_t * self, va_list * app) } /* sets the real socket type (if ipv46) */ - if(ptr->ai_family == AF_INET6){ + if(ptr->ai_family == AF_INET6) { TNET_SOCKET_TYPE_SET_IPV6Only(sock->type); } else{ diff --git a/trunk/tinySIP/src/transactions/tsip_transac_nict.c b/trunk/tinySIP/src/transactions/tsip_transac_nict.c index 62694ac0..597e43fb 100644 --- a/trunk/tinySIP/src/transactions/tsip_transac_nict.c +++ b/trunk/tinySIP/src/transactions/tsip_transac_nict.c @@ -75,7 +75,7 @@ #include "tsk_debug.h" -#define DEBUG_STATE_MACHINE 0 +#define DEBUG_STATE_MACHINE 1 #define TRANSAC_NICT_TIMER_SCHEDULE(TX) TRANSAC_TIMER_SCHEDULE(nict, TX) diff --git a/trunk/tinySIP/src/transports/tsip_transport_layer.c b/trunk/tinySIP/src/transports/tsip_transport_layer.c index 575c893f..24d3b252 100644 --- a/trunk/tinySIP/src/transports/tsip_transport_layer.c +++ b/trunk/tinySIP/src/transports/tsip_transport_layer.c @@ -531,10 +531,13 @@ int tsip_transport_layer_shutdown(tsip_transport_layer_t* self) return 0; } else{ - return 0; /* Already running */ + return 0; /* not running */ } } - return -1; + else{ + TSK_DEBUG_ERROR("Invalid parameter"); + return -1; + } } diff --git a/trunk/tinySIP/src/tsip.c b/trunk/tinySIP/src/tsip.c index 0f712149..dc96697c 100644 --- a/trunk/tinySIP/src/tsip.c +++ b/trunk/tinySIP/src/tsip.c @@ -460,111 +460,128 @@ int tsip_stack_start(tsip_stack_handle_t *self) int ret = -1; tsip_stack_t *stack = self; - if(stack){ + if(!stack){ + TSK_DEBUG_ERROR("Invalid parameter"); + return -1; + } - if(stack->started){ - TSK_DEBUG_WARN("Stack Already started"); - return 0; - } - - /* === Timer manager === */ - if((ret = tsk_timer_manager_start(stack->timer_mgr))){ - goto bail; - } + if(stack->started){ + TSK_DEBUG_WARN("Stack Already started"); + return 0; + } + + /* === Timer manager === */ + if((ret = tsk_timer_manager_start(stack->timer_mgr))){ + goto bail; + } - /* === Set P-Preferred-Identity === */ - if(!stack->identity.preferred && stack->identity.impu){ - stack->identity.preferred = tsk_object_ref((void*)stack->identity.impu); - } - /* === Transport type === */ - if(!tsk_strnullORempty(stack->security.secagree_mech)){ - if(tsk_striequals(stack->security.secagree_mech, "ipsec-3gpp")){ - TNET_SOCKET_TYPE_SET_IPSEC(stack->network.proxy_cscf_type); - } - //else if if(tsk_striquals(stack->security.secagree_mech, "ipsec-ike")) + /* === Set P-Preferred-Identity === */ + if(!stack->identity.preferred && stack->identity.impu){ + stack->identity.preferred = tsk_object_ref((void*)stack->identity.impu); + } + /* === Transport type === */ + if(!tsk_strnullORempty(stack->security.secagree_mech)){ + if(tsk_striequals(stack->security.secagree_mech, "ipsec-3gpp")){ + TNET_SOCKET_TYPE_SET_IPSEC(stack->network.proxy_cscf_type); } + //else if if(tsk_striquals(stack->security.secagree_mech, "ipsec-ike")) + } - /* === Use DNS NAPTR+SRV for the P-CSCF discovery? === */ - if(!stack->network.proxy_cscf || (stack->network.discovery_dhcp || stack->network.discovery_naptr)){ - if(stack->network.discovery_dhcp){ /* DHCP v4/v6 */ - /* FIXME: */ - ret = -2; - } /* DHCP */ - else{ /* DNS NAPTR + SRV*/ - char* hostname = tsk_null; - tnet_port_t port = 0; + /* === Use DNS NAPTR+SRV for the P-CSCF discovery? === */ + if(!stack->network.proxy_cscf || (stack->network.discovery_dhcp || stack->network.discovery_naptr)){ + if(stack->network.discovery_dhcp){ /* DHCP v4/v6 */ + /* FIXME: */ + ret = -2; + } /* DHCP */ + else{ /* DNS NAPTR + SRV*/ + char* hostname = tsk_null; + tnet_port_t port = 0; - if(!(ret = tnet_dns_query_naptr_srv(stack->dns_ctx, stack->network.realm->host, - TNET_SOCKET_TYPE_IS_DGRAM(stack->network.proxy_cscf_type) ? "SIP+D2U" : - (TNET_SOCKET_TYPE_IS_TLS(stack->network.proxy_cscf_type) ? "SIPS+D2T" : "SIP+D2T"), - &hostname, &port))){ - tsk_strupdate(&stack->network.proxy_cscf, hostname); - if(!stack->network.proxy_cscf_port || stack->network.proxy_cscf_port==5060){ /* Only if the Proxy-CSCF port is missing or default */ - stack->network.proxy_cscf_port = port; - } + if(!(ret = tnet_dns_query_naptr_srv(stack->dns_ctx, stack->network.realm->host, + TNET_SOCKET_TYPE_IS_DGRAM(stack->network.proxy_cscf_type) ? "SIP+D2U" : + (TNET_SOCKET_TYPE_IS_TLS(stack->network.proxy_cscf_type) ? "SIPS+D2T" : "SIP+D2T"), + &hostname, &port))){ + tsk_strupdate(&stack->network.proxy_cscf, hostname); + if(!stack->network.proxy_cscf_port || stack->network.proxy_cscf_port==5060){ /* Only if the Proxy-CSCF port is missing or default */ + stack->network.proxy_cscf_port = port; } - else{ - TSK_DEBUG_ERROR("P-CSCF discovery using DNS NAPTR failed. The stack will use the user supplied address and port."); - } - - TSK_FREE(hostname); - } /* NAPTR */ - } - - /* Check Proxy-CSCF IP address */ - if(stack->network.proxy_cscf){ - TSK_DEBUG_INFO("Proxy-CSCF=[%s]:%d", stack->network.proxy_cscf, stack->network.proxy_cscf_port); - } - else{ - TSK_DEBUG_ERROR("Proxy-CSCF IP address is Null."); - goto bail; - } - - /* === Get Best source address === */ - if(!stack->network.local_ip){ /* loacal-ip is missing? */ - tnet_ip_t bestsource; - if((ret = tnet_getbestsource(stack->network.proxy_cscf, stack->network.proxy_cscf_port, stack->network.proxy_cscf_type, &bestsource))){ /* FIXME: what about linux version? */ - TSK_DEBUG_ERROR("Failed to get best source [%d].", ret); - /* do not exit ==> will use default IP address */ } else{ - tsk_strupdate(&stack->network.local_ip, bestsource); + TSK_DEBUG_ERROR("P-CSCF discovery using DNS NAPTR failed. The stack will use the user supplied address and port."); } - } - - /* === Runnable === */ - TSK_RUNNABLE(stack)->run = run; - if((ret = tsk_runnable_start(TSK_RUNNABLE(stack), tsip_event_def_t))){ - goto bail; - } - - /* === Transport Layer === */ - /* Adds the default transport to the transport Layer */ - if((ret = tsip_transport_layer_add(stack->layer_transport, stack->network.local_ip, stack->network.local_port, stack->network.proxy_cscf_type, "SIP transport"))){ - goto bail; - } - /* Starts the transport Layer */ - if((ret = tsip_transport_layer_start(stack->layer_transport))){ - goto bail; - } - - /* === ALL IS OK === */ - if(stack->layer_transac){ /* For transaction layer */ - stack->layer_transac->reliable = TNET_SOCKET_TYPE_IS_STREAM(stack->network.proxy_cscf_type); - } - - stack->started = tsk_true; - - /* Signal to the end-user that the stack has been started */ - TSIP_STACK_SIGNAL(self, tsip_event_code_stack_started, "Stack started"); - - TSK_DEBUG_INFO("SIP STACK -- START"); - - return ret; + + TSK_FREE(hostname); + } /* NAPTR */ } + /* Check Proxy-CSCF IP address */ + if(stack->network.proxy_cscf){ + TSK_DEBUG_INFO("Proxy-CSCF=[%s]:%d", stack->network.proxy_cscf, stack->network.proxy_cscf_port); + } + else{ + TSK_DEBUG_ERROR("Proxy-CSCF IP address is Null."); + goto bail; + } + + /* === Get Best source address === */ + if(!stack->network.local_ip){ /* loacal-ip is missing? */ + tnet_ip_t bestsource; + if((ret = tnet_getbestsource(stack->network.proxy_cscf, stack->network.proxy_cscf_port, stack->network.proxy_cscf_type, &bestsource))){ /* FIXME: what about linux version? */ + TSK_DEBUG_ERROR("Failed to get best source [%d].", ret); + /* do not exit ==> will use default IP address */ + } + else{ + tsk_strupdate(&stack->network.local_ip, bestsource); + } + } + + /* === Runnable === */ + TSK_RUNNABLE(stack)->run = run; + if((ret = tsk_runnable_start(TSK_RUNNABLE(stack), tsip_event_def_t))){ + TSK_DEBUG_ERROR("Failed to start timer manager"); + goto bail; + } + + /* === Transport Layer === */ + /* Adds the default transport to the transport Layer */ + if((ret = tsip_transport_layer_add(stack->layer_transport, stack->network.local_ip, stack->network.local_port, stack->network.proxy_cscf_type, "SIP transport"))){ + TSK_DEBUG_ERROR("Failed to add new transport"); + goto bail; + } + /* Starts the transport Layer */ + if((ret = tsip_transport_layer_start(stack->layer_transport))){ + TSK_DEBUG_ERROR("Failed to start sip transport"); + goto bail; + } + + /* === ALL IS OK === */ + if(stack->layer_transac){ /* For transaction layer */ + stack->layer_transac->reliable = TNET_SOCKET_TYPE_IS_STREAM(stack->network.proxy_cscf_type); + } + + stack->started = tsk_true; + + /* Signal to the end-user that the stack has been started */ + TSIP_STACK_SIGNAL(self, tsip_event_code_stack_started, "Stack started"); + + TSK_DEBUG_INFO("SIP STACK -- START"); + + return 0; + + bail: TSIP_STACK_SIGNAL(self, tsip_event_code_stack_failed_to_start, "Stack failed to start"); + /* stop all running instances */ + if(stack->timer_mgr && TSK_RUNNABLE(stack->timer_mgr)->running){ + tsk_timer_manager_stop(stack->timer_mgr); + } + if(stack->layer_transport){ + tsip_transport_layer_shutdown(stack->layer_transport); + } + if(TSK_RUNNABLE(stack)->running){ + tsk_runnable_stop(TSK_RUNNABLE(stack)); + } + return ret; } diff --git a/trunk/vs_2005/tinyXCAP/tinyXCAP.vcproj b/trunk/vs_2005/tinyXCAP/tinyXCAP.vcproj index a8dd63e9..20f33c79 100644 --- a/trunk/vs_2005/tinyXCAP/tinyXCAP.vcproj +++ b/trunk/vs_2005/tinyXCAP/tinyXCAP.vcproj @@ -40,7 +40,7 @@