diff --git a/trunk/android-projects/buildAll.sh b/trunk/android-projects/buildAll.sh index a854c163..5a11c8b6 100644 --- a/trunk/android-projects/buildAll.sh +++ b/trunk/android-projects/buildAll.sh @@ -1,7 +1,7 @@ #!/bin/bash # Build tinyDEMO for Google Android Systems -for project in tinySAK tinyNET tinyIPSec tinySMS tinyHTTP tinySDP tinyMEDIA tinySIP tinyDAV tinyDEMO +for project in tinySAK tinyNET tinyIPSec tinySMS tinySIGCOMP tinyHTTP tinySDP tinyRTP tinyMEDIA tinySIP tinyDAV tinyDEMO do echo -e building "$project....\n" make PROJECT=$project clean diff --git a/trunk/bindings/_common/ProxyConsumer.cxx b/trunk/bindings/_common/ProxyConsumer.cxx new file mode 100644 index 00000000..9208d510 --- /dev/null +++ b/trunk/bindings/_common/ProxyConsumer.cxx @@ -0,0 +1,229 @@ +/* +* Copyright (C) 2009 Mamadou Diop. +* +* Contact: Mamadou Diop +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file ProxyConsumer.c + * @brief Audio/Video proxy consumers. + * + * @author Mamadou Diop + * + * @date Created: Sat Nov 8 16:54:58 2009 mdiop + */ +#include "ProxyConsumer.h" + +#include "tsk_memory.h" +#include "tsk_debug.h" + +#include "tinydav/audio/tdav_consumer_audio.h" + +typedef struct twrap_consumer_proxy_audio_s +{ + TDAV_DECLARE_CONSUMER_AUDIO; + + tsk_bool_t started; +} +twrap_consumer_proxy_audio_t; + + + +/* ============ Media Consumer Interface ================= */ +int twrap_consumer_proxy_audio_prepare(tmedia_consumer_t* self, const tmedia_codec_t* codec) +{ + if(ProxyAudioConsumer::instance && codec){ + ProxyAudioConsumer::instance->takeConsumer((twrap_consumer_proxy_audio_t*)self); + ProxyAudioConsumer::instance->prepare(20, codec->plugin->rate, codec->plugin->audio.channels); + } + return 0; +} + +int twrap_consumer_proxy_audio_start(tmedia_consumer_t* self) +{ + twrap_consumer_proxy_audio_t* consumer = (twrap_consumer_proxy_audio_t*)self; + + if(ProxyAudioConsumer::instance){ + ProxyAudioConsumer::instance->start(); + } + + consumer->started = tsk_true; + + return 0; +} + +int twrap_consumer_proxy_audio_consume(tmedia_consumer_t* self, void** buffer, tsk_size_t size, const tsk_object_t* proto_hdr) +{ + twrap_consumer_proxy_audio_t* consumer = (twrap_consumer_proxy_audio_t*)self; + + if(!consumer || !buffer || !*buffer || !size){ + TSK_DEBUG_ERROR("Invalid parameter"); + return -1; + } + + if(ProxyAudioConsumer::instance){ + return tdav_consumer_audio_put(TDAV_CONSUMER_AUDIO(consumer), buffer, proto_hdr); + } + else{ + return 0; + } +} + +int twrap_consumer_proxy_audio_pause(tmedia_consumer_t* self) +{ + if(ProxyAudioConsumer::instance){ + ProxyAudioConsumer::instance->pause(); + } + + return 0; +} + +int twrap_consumer_proxy_audio_stop(tmedia_consumer_t* self) +{ + twrap_consumer_proxy_audio_t* consumer = (twrap_consumer_proxy_audio_t*)self; + + if(ProxyAudioConsumer::instance){ + ProxyAudioConsumer::instance->stop(); + ProxyAudioConsumer::instance->releaseConsumer((twrap_consumer_proxy_audio_t*)self); + } + + consumer->started = tsk_false; + + return 0; +} + + +// +// Audio consumer object definition +// +/* constructor */ +static tsk_object_t* twrap_consumer_proxy_audio_ctor(tsk_object_t * self, va_list * app) +{ + twrap_consumer_proxy_audio_t *consumer = (twrap_consumer_proxy_audio_t *)self; + if(consumer){ + /* init base */ + tdav_consumer_audio_init(TDAV_CONSUMER_AUDIO(consumer)); + /* init self */ + + /* do not call takeConsumer() */ + } + return self; +} +/* destructor */ +static tsk_object_t* twrap_consumer_proxy_audio_dtor(tsk_object_t * self) +{ + twrap_consumer_proxy_audio_t *consumer = (twrap_consumer_proxy_audio_t *)self; + if(consumer){ + + /* stop */ + if(consumer->started){ + twrap_consumer_proxy_audio_stop(TMEDIA_CONSUMER(consumer)); + } + + /* deinit base */ + tdav_consumer_audio_deinit(TDAV_CONSUMER_AUDIO(consumer)); + /* deinit self */ + + /* do not call releaseConsumer() */ + } + + return self; +} +/* object definition */ +static const tsk_object_def_t twrap_consumer_proxy_audio_def_s = +{ + sizeof(twrap_consumer_proxy_audio_t), + twrap_consumer_proxy_audio_ctor, + twrap_consumer_proxy_audio_dtor, + tdav_consumer_audio_cmp, +}; +/* plugin definition*/ +static const tmedia_consumer_plugin_def_t twrap_consumer_proxy_audio_plugin_def_s = +{ + &twrap_consumer_proxy_audio_def_s, + + tmedia_audio, + "Audio Proxy Consumer", + + twrap_consumer_proxy_audio_prepare, + twrap_consumer_proxy_audio_start, + twrap_consumer_proxy_audio_consume, + twrap_consumer_proxy_audio_pause, + twrap_consumer_proxy_audio_stop +}; +//extern "C" { +TINYWRAP_GEXTERN const tmedia_consumer_plugin_def_t *twrap_consumer_proxy_audio_plugin_def_t = &twrap_consumer_proxy_audio_plugin_def_s; +//} + + +ProxyAudioConsumer* ProxyAudioConsumer::instance = tsk_null; + +ProxyAudioConsumer::ProxyAudioConsumer() +:consumer(tsk_null) +{ +} + +ProxyAudioConsumer::~ProxyAudioConsumer() +{ + this->releaseConsumer(this->consumer); + + if(ProxyAudioConsumer::instance == this){ + ProxyAudioConsumer::instance = tsk_null; + } +} + +void ProxyAudioConsumer::setActivate() +{ + ProxyAudioConsumer::instance = this; +} + +unsigned ProxyAudioConsumer::pull(void* output, unsigned size) +{ + if(this->consumer){ + void* data; + if((data = tdav_consumer_audio_get(TDAV_CONSUMER_AUDIO(this->consumer)))){ + memcpy(output, data, size); + TSK_FREE(data); + return size; + } + } + return 0; +} + +void ProxyAudioConsumer::takeConsumer(twrap_consumer_proxy_audio_t* _consumer) +{ + if(!this->consumer){ + this->consumer = (twrap_consumer_proxy_audio_t*)tsk_object_ref(_consumer); + } +} + +void ProxyAudioConsumer::releaseConsumer(twrap_consumer_proxy_audio_t* _consumer) +{ + TSK_OBJECT_SAFE_FREE(this->consumer); +} + +bool ProxyAudioConsumer::registerPlugin() +{ + /* HACK: Unregister all other audio plugins */ + tmedia_consumer_plugin_unregister_by_type(tmedia_audio); + /* Register our proxy plugin */ + return (tmedia_consumer_plugin_register(twrap_consumer_proxy_audio_plugin_def_t) == 0); +} + + + diff --git a/trunk/bindings/_common/ProxyConsumer.h b/trunk/bindings/_common/ProxyConsumer.h new file mode 100644 index 00000000..13020c0b --- /dev/null +++ b/trunk/bindings/_common/ProxyConsumer.h @@ -0,0 +1,66 @@ +/* +* Copyright (C) 2009 Mamadou Diop. +* +* Contact: Mamadou Diop +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file ProxyConsumer.h + * @brief Audio/Video proxy consumers. + * + * @author Mamadou Diop + * + * @date Created: Sat Nov 8 16:54:58 2009 mdiop + */ +#ifndef TINYWRAP_CONSUMER_PROXY_H +#define TINYWRAP_CONSUMER_PROXY_H + +#include "tinyWRAP_config.h" + +class ProxyAudioConsumer +{ +public: + ProxyAudioConsumer(); + virtual ~ProxyAudioConsumer(); + + /* Callback functions */ + virtual int prepare(int ptime, int rate, int channels) { return 0; } + virtual int start() { return 0; } + virtual int pause() { return 0; } + virtual int stop() { return 0; } + + void setActivate(); + unsigned pull(void* output, unsigned size); + +public: + static bool registerPlugin(); + +#if !defined(SWIG) + void takeConsumer(struct twrap_consumer_proxy_audio_s*); + void releaseConsumer(struct twrap_consumer_proxy_audio_s*); + static ProxyAudioConsumer* instance; +#endif + +private: + struct twrap_consumer_proxy_audio_s* consumer; +}; + + + + +#endif /* TINYWRAP_CONSUMER_PROXY_H */ \ No newline at end of file diff --git a/trunk/bindings/_common/ProxyProducer.cxx b/trunk/bindings/_common/ProxyProducer.cxx new file mode 100644 index 00000000..443c5ce9 --- /dev/null +++ b/trunk/bindings/_common/ProxyProducer.cxx @@ -0,0 +1,206 @@ +/* +* Copyright (C) 2009 Mamadou Diop. +* +* Contact: Mamadou Diop +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file ProxyProducer.c + * @brief Audio/Video proxy producers. + * + * @author Mamadou Diop + * + * @date Created: Sat Nov 8 16:54:58 2009 mdiop + */ +#include "ProxyProducer.h" + +#include "tsk_memory.h" +#include "tsk_debug.h" + +#include "tinydav/audio/tdav_producer_audio.h" + +typedef struct twrap_producer_proxy_audio_s +{ + TDAV_DECLARE_PRODUCER_AUDIO; + + tsk_bool_t started; +} +twrap_producer_proxy_audio_t; + + + +/* ============ Media Producer Interface ================= */ +int twrap_producer_proxy_audio_prepare(tmedia_producer_t* self, const tmedia_codec_t* codec) +{ + if(ProxyAudioProducer::instance && codec){ + ProxyAudioProducer::instance->takeProducer((twrap_producer_proxy_audio_t*)self); + ProxyAudioProducer::instance->prepare(20, codec->plugin->rate, codec->plugin->audio.channels); + } + return 0; +} + +int twrap_producer_proxy_audio_start(tmedia_producer_t* self) +{ + twrap_producer_proxy_audio_t* producer = (twrap_producer_proxy_audio_t*)self; + + if(ProxyAudioProducer::instance){ + ProxyAudioProducer::instance->start(); + } + + producer->started = tsk_true; + + return 0; +} + +int twrap_producer_proxy_audio_pause(tmedia_producer_t* self) +{ + if(ProxyAudioProducer::instance){ + ProxyAudioProducer::instance->pause(); + } + + return 0; +} + +int twrap_producer_proxy_audio_stop(tmedia_producer_t* self) +{ + twrap_producer_proxy_audio_t* producer = (twrap_producer_proxy_audio_t*)self; + + if(ProxyAudioProducer::instance){ + ProxyAudioProducer::instance->stop(); + ProxyAudioProducer::instance->releaseProducer((twrap_producer_proxy_audio_t*)self); + } + + producer->started = tsk_false; + + return 0; +} + + +// +// Audio producer object definition +// +/* constructor */ +static tsk_object_t* twrap_producer_proxy_audio_ctor(tsk_object_t * self, va_list * app) +{ + twrap_producer_proxy_audio_t *producer = (twrap_producer_proxy_audio_t *)self; + if(producer){ + /* init base */ + tdav_producer_audio_init(TDAV_PRODUCER_AUDIO(producer)); + /* init self */ + + /* do not call takeProducer() */ + } + return self; +} +/* destructor */ +static tsk_object_t* twrap_producer_proxy_audio_dtor(tsk_object_t * self) +{ + twrap_producer_proxy_audio_t *producer = (twrap_producer_proxy_audio_t *)self; + if(producer){ + + /* stop */ + if(producer->started){ + twrap_producer_proxy_audio_stop(TMEDIA_PRODUCER(producer)); + } + + /* deinit base */ + tdav_producer_audio_deinit(TDAV_PRODUCER_AUDIO(producer)); + /* deinit self */ + + /* do not call releaseProducer() */ + } + + return self; +} +/* object definition */ +static const tsk_object_def_t twrap_producer_proxy_audio_def_s = +{ + sizeof(twrap_producer_proxy_audio_t), + twrap_producer_proxy_audio_ctor, + twrap_producer_proxy_audio_dtor, + tdav_producer_audio_cmp, +}; +/* plugin definition*/ +static const tmedia_producer_plugin_def_t twrap_producer_proxy_audio_plugin_def_s = +{ + &twrap_producer_proxy_audio_def_s, + + tmedia_audio, + "Audio Proxy Producer", + + twrap_producer_proxy_audio_prepare, + twrap_producer_proxy_audio_start, + twrap_producer_proxy_audio_pause, + twrap_producer_proxy_audio_stop +}; +//extern "C" { +TINYWRAP_GEXTERN const tmedia_producer_plugin_def_t *twrap_producer_proxy_audio_plugin_def_t = &twrap_producer_proxy_audio_plugin_def_s; +//} + + +ProxyAudioProducer* ProxyAudioProducer::instance = tsk_null; + +ProxyAudioProducer::ProxyAudioProducer() +:producer(tsk_null) +{ +} + +ProxyAudioProducer::~ProxyAudioProducer() +{ + this->releaseProducer(this->producer); + + if(ProxyAudioProducer::instance == this){ + ProxyAudioProducer::instance = tsk_null; + } +} + +void ProxyAudioProducer::setActivate() +{ + ProxyAudioProducer::instance = this; +} + +int ProxyAudioProducer::push(const void* buffer, unsigned size) +{ + if(this->producer && TMEDIA_PRODUCER(this->producer)->callback){ + return TMEDIA_PRODUCER(this->producer)->callback(TMEDIA_PRODUCER(this->producer)->callback_data, buffer, size); + } + return 0; +} + +void ProxyAudioProducer::takeProducer(twrap_producer_proxy_audio_t* _producer) +{ + if(!this->producer){ + this->producer = (twrap_producer_proxy_audio_t*)tsk_object_ref(_producer); + } +} + +void ProxyAudioProducer::releaseProducer(twrap_producer_proxy_audio_t* _producer) +{ + TSK_OBJECT_SAFE_FREE(this->producer); +} + +bool ProxyAudioProducer::registerPlugin() +{ + /* HACK: Unregister all other audio plugins */ + tmedia_producer_plugin_unregister_by_type(tmedia_audio); + /* Register our proxy plugin */ + return (tmedia_producer_plugin_register(twrap_producer_proxy_audio_plugin_def_t) == 0); +} + + + diff --git a/trunk/bindings/_common/ProxyProducer.h b/trunk/bindings/_common/ProxyProducer.h new file mode 100644 index 00000000..d666fc0c --- /dev/null +++ b/trunk/bindings/_common/ProxyProducer.h @@ -0,0 +1,63 @@ +/* +* Copyright (C) 2009 Mamadou Diop. +* +* Contact: Mamadou Diop +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file ProxyProducer.h + * @brief Audio/Video proxy consumers. + * + * @author Mamadou Diop + * + * @date Created: Sat Nov 8 16:54:58 2009 mdiop + */ +#ifndef TINYWRAP_PRODUCER_PROXY_H +#define TINYWRAP_PRODUCER_PROXY_H + +#include "tinyWRAP_config.h" + +class ProxyAudioProducer +{ +public: + ProxyAudioProducer(); + virtual ~ProxyAudioProducer(); + + /* Callback functions */ + virtual int prepare(int ptime, int rate, int channels) { return 0; } + virtual int start() { return 0; } + virtual int pause() { return 0; } + virtual int stop() { return 0; } + + void setActivate(); + int push(const void* buffer, unsigned size); + +public: + static bool registerPlugin(); + +#if !defined(SWIG) + void takeProducer(struct twrap_producer_proxy_audio_s*); + void releaseProducer(struct twrap_producer_proxy_audio_s*); + static ProxyAudioProducer* instance; +#endif + +private: + struct twrap_producer_proxy_audio_s* producer; +}; + +#endif /* TINYWRAP_PRODUCER_PROXY_H */ diff --git a/trunk/bindings/_common/SipSession.cxx b/trunk/bindings/_common/SipSession.cxx index ae4a5519..b78f6807 100644 --- a/trunk/bindings/_common/SipSession.cxx +++ b/trunk/bindings/_common/SipSession.cxx @@ -154,6 +154,44 @@ const SipStack* SipSession::getStack()const } + +/* ======================== CallSession ========================*/ +CallSession::CallSession(SipStack* Stack) +: SipSession(Stack) +{ +} + +CallSession::CallSession(SipStack* Stack, tsip_ssession_handle_t* handle) +: SipSession(Stack, handle) +{ +} + +CallSession::~CallSession() +{ +} + +bool CallSession::Call(const char* remoteUri) +{ + tsip_ssession_set(this->handle, + TSIP_SSESSION_SET_TO(remoteUri), + TSIP_SSESSION_SET_NULL()); + + int ret = tsip_action_INVITE(this->handle, + TSIP_ACTION_SET_NULL()); + return (ret == 0); +} + +bool CallSession::Hangup() +{ + int ret = tsip_action_BYE(this->handle, + TSIP_ACTION_SET_NULL()); + return (ret == 0); +} + + + + + /* ======================== MessagingSession ========================*/ MessagingSession::MessagingSession(SipStack* Stack) : SipSession(Stack) @@ -200,7 +238,7 @@ bool MessagingSession::Reject() } -/* ======================== PublicationSession ========================*/ +/* ======================== OptionsSession ========================*/ OptionsSession::OptionsSession(SipStack* Stack) : SipSession(Stack) { diff --git a/trunk/bindings/_common/SipSession.h b/trunk/bindings/_common/SipSession.h index 6f27258e..1f7fe513 100644 --- a/trunk/bindings/_common/SipSession.h +++ b/trunk/bindings/_common/SipSession.h @@ -63,6 +63,20 @@ protected: }; +/* ======================== CallSession ========================*/ +class CallSession : public SipSession +{ +public: /* ctor() and dtor() */ + CallSession(SipStack* Stack); +#if !defined(SWIG) + CallSession(SipStack* Stack, tsip_ssession_handle_t* handle); +#endif + virtual ~CallSession(); + +public: /* Public functions */ + bool Call(const char* remoteUri); + bool Hangup(); +}; /* ======================== MessagingSession ========================*/ class MessagingSession : public SipSession diff --git a/trunk/bindings/_common/SipStack.cxx b/trunk/bindings/_common/SipStack.cxx index aae35cc2..089d8709 100644 --- a/trunk/bindings/_common/SipStack.cxx +++ b/trunk/bindings/_common/SipStack.cxx @@ -21,6 +21,8 @@ */ #include "SipStack.h" +#include "tinydav/tdav.h" + #include "SipSession.h" #include "SipEvent.h" @@ -52,6 +54,7 @@ SipStack::SipStack(SipCallback* callback_, const char* realm_uri, const char* im /* Initialize network layer */ if(SipStack::count == 0){ + tdav_init(); tnet_startup(); } @@ -73,6 +76,7 @@ SipStack::~SipStack() /* DeInitialize the network layer (only if last stack) */ if(--SipStack::count == 0){ + tdav_deinit(); tnet_cleanup(); } } diff --git a/trunk/bindings/_common/SipStack.i b/trunk/bindings/_common/SipStack.i index 2a2288fa..95340858 100644 --- a/trunk/bindings/_common/SipStack.i +++ b/trunk/bindings/_common/SipStack.i @@ -5,13 +5,18 @@ #include "SipEvent.h" #include "SipSession.h" +#include "ProxyConsumer.h" +#include "ProxyProducer.h" + #include "SipCallback.h" #include "SafeObject.h" #include "SipStack.h" %} -/* turn on director wrapping Callback */ +/* Callbacks */ %feature("director") SipCallback; +%feature("director") ProxyAudioConsumer; +%feature("director") ProxyAudioProducer; %nodefaultctor; @@ -20,6 +25,9 @@ %include "SipEvent.h" %include "SipSession.h" +%include "ProxyConsumer.h" +%include "ProxyProducer.h" + %include "SipCallback.h" %include "SafeObject.h" %include "SipStack.h" diff --git a/trunk/bindings/_common/tinyWRAP_config.h b/trunk/bindings/_common/tinyWRAP_config.h new file mode 100644 index 00000000..a404e36c --- /dev/null +++ b/trunk/bindings/_common/tinyWRAP_config.h @@ -0,0 +1,68 @@ +/* +* Copyright (C) 2009 Mamadou Diop. +* +* Contact: Mamadou Diop +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +#ifndef TINYWRAP_CONFIG_H +#define TINYWRAP_CONFIG_H + +#ifdef __SYMBIAN32__ +#undef _WIN32 /* Because of WINSCW */ +#endif + +/* Windows (XP/Vista/7/CE and Windows Mobile) macro definition. +*/ +#if defined(WIN32)|| defined(_WIN32) || defined(_WIN32_WCE) +# define TWRAP_UNDER_WINDOWS 1 +#endif + +#if (TWRAP_UNDER_WINDOWS || defined(__SYMBIAN32__)) && defined(TINYWRAP_EXPORTS) +# define TINYWRAP_API __declspec(dllexport) +# define TINYWRAP_GEXTERN __declspec(dllexport) +#elif (TWRAP_UNDER_WINDOWS || defined(__SYMBIAN32__)) /*&& defined(TINYWRAP_IMPORTS)*/ +# define TINYWRAP_API __declspec(dllimport) +# define TINYWRAP_GEXTERN __declspec(dllimport) +#else +# define TINYWRAP_API +# define TINYWRAP_GEXTERN extern +#endif + +/* Guards against C++ name mangling +*/ +#ifdef __cplusplus +# define TWRAP_BEGIN_DECLS extern "C" { +# define TWRAP_END_DECLS } +#else +# define TWRAP_BEGIN_DECLS +# define TWRAP_END_DECLS +#endif + +/* Disable some well-known warnings +*/ +#ifdef _MSC_VER +# define _CRT_SECURE_NO_WARNINGS +#endif + + +#if HAVE_CONFIG_H + #include "../config.h" +#endif + +#endif // TINYWRAP_CONFIG_H diff --git a/trunk/bindings/autogen.sh b/trunk/bindings/autogen.sh index c3bf8077..e1911137 100644 --- a/trunk/bindings/autogen.sh +++ b/trunk/bindings/autogen.sh @@ -12,6 +12,8 @@ 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/DDebugCallback.java +sed -i 's/_director_connect(this, swigCPtr, swigCMemOwn, true)/_director_connect(this, swigCPtr, swigCMemOwn, false)/g' java/android/ProxyAudioConsumer.java +sed -i 's/_director_connect(this, swigCPtr, swigCMemOwn, true)/_director_connect(this, swigCPtr, swigCMemOwn, false)/g' java/android/ProxyAudioProducer.java ##### Python diff --git a/trunk/bindings/csharp/CallSession.cs b/trunk/bindings/csharp/CallSession.cs new file mode 100644 index 00000000..9fc0a63d --- /dev/null +++ b/trunk/bindings/csharp/CallSession.cs @@ -0,0 +1,53 @@ +/* ---------------------------------------------------------------------------- + * 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 CallSession : SipSession { + private HandleRef swigCPtr; + + internal CallSession(IntPtr cPtr, bool cMemoryOwn) : base(tinyWRAPPINVOKE.CallSessionUpcast(cPtr), cMemoryOwn) { + swigCPtr = new HandleRef(this, cPtr); + } + + internal static HandleRef getCPtr(CallSession obj) { + return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr; + } + + ~CallSession() { + Dispose(); + } + + public override void Dispose() { + lock(this) { + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_CallSession(swigCPtr); + } + swigCPtr = new HandleRef(null, IntPtr.Zero); + GC.SuppressFinalize(this); + base.Dispose(); + } + } + + public CallSession(SipStack Stack) : this(tinyWRAPPINVOKE.new_CallSession(SipStack.getCPtr(Stack)), true) { + } + + public bool Call(string remoteUri) { + bool ret = tinyWRAPPINVOKE.CallSession_Call(swigCPtr, remoteUri); + return ret; + } + + public bool Hangup() { + bool ret = tinyWRAPPINVOKE.CallSession_Hangup(swigCPtr); + return ret; + } + +} diff --git a/trunk/bindings/csharp/DDebugCallback.cs b/trunk/bindings/csharp/DDebugCallback.cs index 6d004588..d184e019 100644 --- a/trunk/bindings/csharp/DDebugCallback.cs +++ b/trunk/bindings/csharp/DDebugCallback.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -29,13 +29,11 @@ public class DDebugCallback : IDisposable { 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); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_DDebugCallback(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); } } diff --git a/trunk/bindings/csharp/DialogEvent.cs b/trunk/bindings/csharp/DialogEvent.cs index 4fb2041f..6983e2a9 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.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -27,13 +27,11 @@ public class DialogEvent : SipEvent { public override void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_DialogEvent(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_DialogEvent(swigCPtr); } + 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 d291acc0..b4a52054 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.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -27,13 +27,11 @@ public class MessagingEvent : SipEvent { public override void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_MessagingEvent(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_MessagingEvent(swigCPtr); } + 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 eddddf76..3cccc870 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.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -27,13 +27,11 @@ public class MessagingSession : SipSession { public override void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_MessagingSession(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_MessagingSession(swigCPtr); } + 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 562d6978..3c15eb59 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.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -27,13 +27,11 @@ public class OptionsEvent : SipEvent { public override void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_OptionsEvent(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_OptionsEvent(swigCPtr); } + 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 6d1cc6a7..8968878a 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.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -27,13 +27,11 @@ public class OptionsSession : SipSession { public override void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_OptionsSession(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_OptionsSession(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); base.Dispose(); } diff --git a/trunk/bindings/csharp/ProxyAudioConsumer.cs b/trunk/bindings/csharp/ProxyAudioConsumer.cs new file mode 100644 index 00000000..55d0e545 --- /dev/null +++ b/trunk/bindings/csharp/ProxyAudioConsumer.cs @@ -0,0 +1,127 @@ +/* ---------------------------------------------------------------------------- + * 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 ProxyAudioConsumer : IDisposable { + private HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal ProxyAudioConsumer(IntPtr cPtr, bool cMemoryOwn) { + swigCMemOwn = cMemoryOwn; + swigCPtr = new HandleRef(this, cPtr); + } + + internal static HandleRef getCPtr(ProxyAudioConsumer obj) { + return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr; + } + + ~ProxyAudioConsumer() { + Dispose(); + } + + public virtual void Dispose() { + lock(this) { + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_ProxyAudioConsumer(swigCPtr); + } + swigCPtr = new HandleRef(null, IntPtr.Zero); + GC.SuppressFinalize(this); + } + } + + public ProxyAudioConsumer() : this(tinyWRAPPINVOKE.new_ProxyAudioConsumer(), true) { + SwigDirectorConnect(); + } + + public virtual int prepare(int ptime, int rate, int channels) { + int ret = ((this.GetType() == typeof(ProxyAudioConsumer)) ? tinyWRAPPINVOKE.ProxyAudioConsumer_prepare(swigCPtr, ptime, rate, channels) : tinyWRAPPINVOKE.ProxyAudioConsumer_prepareSwigExplicitProxyAudioConsumer(swigCPtr, ptime, rate, channels)); + return ret; + } + + public virtual int start() { + int ret = ((this.GetType() == typeof(ProxyAudioConsumer)) ? tinyWRAPPINVOKE.ProxyAudioConsumer_start(swigCPtr) : tinyWRAPPINVOKE.ProxyAudioConsumer_startSwigExplicitProxyAudioConsumer(swigCPtr)); + return ret; + } + + public virtual int pause() { + int ret = ((this.GetType() == typeof(ProxyAudioConsumer)) ? tinyWRAPPINVOKE.ProxyAudioConsumer_pause(swigCPtr) : tinyWRAPPINVOKE.ProxyAudioConsumer_pauseSwigExplicitProxyAudioConsumer(swigCPtr)); + return ret; + } + + public virtual int stop() { + int ret = ((this.GetType() == typeof(ProxyAudioConsumer)) ? tinyWRAPPINVOKE.ProxyAudioConsumer_stop(swigCPtr) : tinyWRAPPINVOKE.ProxyAudioConsumer_stopSwigExplicitProxyAudioConsumer(swigCPtr)); + return ret; + } + + public void setActivate() { + tinyWRAPPINVOKE.ProxyAudioConsumer_setActivate(swigCPtr); + } + + public uint pull(byte[] output, uint size) { + uint ret = tinyWRAPPINVOKE.ProxyAudioConsumer_pull(swigCPtr, output, size); + return ret; + } + + public static bool registerPlugin() { + bool ret = tinyWRAPPINVOKE.ProxyAudioConsumer_registerPlugin(); + return ret; + } + + private void SwigDirectorConnect() { + if (SwigDerivedClassHasMethod("prepare", swigMethodTypes0)) + swigDelegate0 = new SwigDelegateProxyAudioConsumer_0(SwigDirectorprepare); + if (SwigDerivedClassHasMethod("start", swigMethodTypes1)) + swigDelegate1 = new SwigDelegateProxyAudioConsumer_1(SwigDirectorstart); + if (SwigDerivedClassHasMethod("pause", swigMethodTypes2)) + swigDelegate2 = new SwigDelegateProxyAudioConsumer_2(SwigDirectorpause); + if (SwigDerivedClassHasMethod("stop", swigMethodTypes3)) + swigDelegate3 = new SwigDelegateProxyAudioConsumer_3(SwigDirectorstop); + tinyWRAPPINVOKE.ProxyAudioConsumer_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(ProxyAudioConsumer)); + return hasDerivedMethod; + } + + private int SwigDirectorprepare(int ptime, int rate, int channels) { + return prepare(ptime, rate, channels); + } + + private int SwigDirectorstart() { + return start(); + } + + private int SwigDirectorpause() { + return pause(); + } + + private int SwigDirectorstop() { + return stop(); + } + + public delegate int SwigDelegateProxyAudioConsumer_0(int ptime, int rate, int channels); + public delegate int SwigDelegateProxyAudioConsumer_1(); + public delegate int SwigDelegateProxyAudioConsumer_2(); + public delegate int SwigDelegateProxyAudioConsumer_3(); + + private SwigDelegateProxyAudioConsumer_0 swigDelegate0; + private SwigDelegateProxyAudioConsumer_1 swigDelegate1; + private SwigDelegateProxyAudioConsumer_2 swigDelegate2; + private SwigDelegateProxyAudioConsumer_3 swigDelegate3; + + private static Type[] swigMethodTypes0 = new Type[] { typeof(int), typeof(int), typeof(int) }; + private static Type[] swigMethodTypes1 = new Type[] { }; + private static Type[] swigMethodTypes2 = new Type[] { }; + private static Type[] swigMethodTypes3 = new Type[] { }; +} diff --git a/trunk/bindings/csharp/ProxyAudioProducer.cs b/trunk/bindings/csharp/ProxyAudioProducer.cs new file mode 100644 index 00000000..4091b9ea --- /dev/null +++ b/trunk/bindings/csharp/ProxyAudioProducer.cs @@ -0,0 +1,127 @@ +/* ---------------------------------------------------------------------------- + * 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 ProxyAudioProducer : IDisposable { + private HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal ProxyAudioProducer(IntPtr cPtr, bool cMemoryOwn) { + swigCMemOwn = cMemoryOwn; + swigCPtr = new HandleRef(this, cPtr); + } + + internal static HandleRef getCPtr(ProxyAudioProducer obj) { + return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr; + } + + ~ProxyAudioProducer() { + Dispose(); + } + + public virtual void Dispose() { + lock(this) { + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_ProxyAudioProducer(swigCPtr); + } + swigCPtr = new HandleRef(null, IntPtr.Zero); + GC.SuppressFinalize(this); + } + } + + public ProxyAudioProducer() : this(tinyWRAPPINVOKE.new_ProxyAudioProducer(), true) { + SwigDirectorConnect(); + } + + public virtual int prepare(int ptime, int rate, int channels) { + int ret = ((this.GetType() == typeof(ProxyAudioProducer)) ? tinyWRAPPINVOKE.ProxyAudioProducer_prepare(swigCPtr, ptime, rate, channels) : tinyWRAPPINVOKE.ProxyAudioProducer_prepareSwigExplicitProxyAudioProducer(swigCPtr, ptime, rate, channels)); + return ret; + } + + public virtual int start() { + int ret = ((this.GetType() == typeof(ProxyAudioProducer)) ? tinyWRAPPINVOKE.ProxyAudioProducer_start(swigCPtr) : tinyWRAPPINVOKE.ProxyAudioProducer_startSwigExplicitProxyAudioProducer(swigCPtr)); + return ret; + } + + public virtual int pause() { + int ret = ((this.GetType() == typeof(ProxyAudioProducer)) ? tinyWRAPPINVOKE.ProxyAudioProducer_pause(swigCPtr) : tinyWRAPPINVOKE.ProxyAudioProducer_pauseSwigExplicitProxyAudioProducer(swigCPtr)); + return ret; + } + + public virtual int stop() { + int ret = ((this.GetType() == typeof(ProxyAudioProducer)) ? tinyWRAPPINVOKE.ProxyAudioProducer_stop(swigCPtr) : tinyWRAPPINVOKE.ProxyAudioProducer_stopSwigExplicitProxyAudioProducer(swigCPtr)); + return ret; + } + + public void setActivate() { + tinyWRAPPINVOKE.ProxyAudioProducer_setActivate(swigCPtr); + } + + public int push(byte[] buffer, uint size) { + int ret = tinyWRAPPINVOKE.ProxyAudioProducer_push(swigCPtr, buffer, size); + return ret; + } + + public static bool registerPlugin() { + bool ret = tinyWRAPPINVOKE.ProxyAudioProducer_registerPlugin(); + return ret; + } + + private void SwigDirectorConnect() { + if (SwigDerivedClassHasMethod("prepare", swigMethodTypes0)) + swigDelegate0 = new SwigDelegateProxyAudioProducer_0(SwigDirectorprepare); + if (SwigDerivedClassHasMethod("start", swigMethodTypes1)) + swigDelegate1 = new SwigDelegateProxyAudioProducer_1(SwigDirectorstart); + if (SwigDerivedClassHasMethod("pause", swigMethodTypes2)) + swigDelegate2 = new SwigDelegateProxyAudioProducer_2(SwigDirectorpause); + if (SwigDerivedClassHasMethod("stop", swigMethodTypes3)) + swigDelegate3 = new SwigDelegateProxyAudioProducer_3(SwigDirectorstop); + tinyWRAPPINVOKE.ProxyAudioProducer_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(ProxyAudioProducer)); + return hasDerivedMethod; + } + + private int SwigDirectorprepare(int ptime, int rate, int channels) { + return prepare(ptime, rate, channels); + } + + private int SwigDirectorstart() { + return start(); + } + + private int SwigDirectorpause() { + return pause(); + } + + private int SwigDirectorstop() { + return stop(); + } + + public delegate int SwigDelegateProxyAudioProducer_0(int ptime, int rate, int channels); + public delegate int SwigDelegateProxyAudioProducer_1(); + public delegate int SwigDelegateProxyAudioProducer_2(); + public delegate int SwigDelegateProxyAudioProducer_3(); + + private SwigDelegateProxyAudioProducer_0 swigDelegate0; + private SwigDelegateProxyAudioProducer_1 swigDelegate1; + private SwigDelegateProxyAudioProducer_2 swigDelegate2; + private SwigDelegateProxyAudioProducer_3 swigDelegate3; + + private static Type[] swigMethodTypes0 = new Type[] { typeof(int), typeof(int), typeof(int) }; + private static Type[] swigMethodTypes1 = new Type[] { }; + private static Type[] swigMethodTypes2 = new Type[] { }; + private static Type[] swigMethodTypes3 = new Type[] { }; +} diff --git a/trunk/bindings/csharp/PublicationEvent.cs b/trunk/bindings/csharp/PublicationEvent.cs index 21edf91b..47d61790 100644 --- a/trunk/bindings/csharp/PublicationEvent.cs +++ b/trunk/bindings/csharp/PublicationEvent.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -27,13 +27,11 @@ public class PublicationEvent : SipEvent { public override void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_PublicationEvent(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_PublicationEvent(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); base.Dispose(); } diff --git a/trunk/bindings/csharp/PublicationSession.cs b/trunk/bindings/csharp/PublicationSession.cs index d13a7d83..16f51f1f 100644 --- a/trunk/bindings/csharp/PublicationSession.cs +++ b/trunk/bindings/csharp/PublicationSession.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -27,13 +27,11 @@ public class PublicationSession : SipSession { public override void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_PublicationSession(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_PublicationSession(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); base.Dispose(); } diff --git a/trunk/bindings/csharp/RegistrationEvent.cs b/trunk/bindings/csharp/RegistrationEvent.cs index 9469c7c4..f2580182 100644 --- a/trunk/bindings/csharp/RegistrationEvent.cs +++ b/trunk/bindings/csharp/RegistrationEvent.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -27,13 +27,11 @@ public class RegistrationEvent : SipEvent { public override void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_RegistrationEvent(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_RegistrationEvent(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); base.Dispose(); } diff --git a/trunk/bindings/csharp/RegistrationSession.cs b/trunk/bindings/csharp/RegistrationSession.cs index 712f1ded..a4bb38a4 100644 --- a/trunk/bindings/csharp/RegistrationSession.cs +++ b/trunk/bindings/csharp/RegistrationSession.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -27,13 +27,11 @@ public class RegistrationSession : SipSession { public override void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_RegistrationSession(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_RegistrationSession(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); base.Dispose(); } diff --git a/trunk/bindings/csharp/SafeObject.cs b/trunk/bindings/csharp/SafeObject.cs index 1995294d..faffa622 100644 --- a/trunk/bindings/csharp/SafeObject.cs +++ b/trunk/bindings/csharp/SafeObject.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -29,13 +29,11 @@ public class SafeObject : IDisposable { public virtual void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_SafeObject(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_SafeObject(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); } } diff --git a/trunk/bindings/csharp/SipCallback.cs b/trunk/bindings/csharp/SipCallback.cs index 892179e6..09c1e286 100644 --- a/trunk/bindings/csharp/SipCallback.cs +++ b/trunk/bindings/csharp/SipCallback.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -29,13 +29,11 @@ public class SipCallback : IDisposable { public virtual void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_SipCallback(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_SipCallback(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); } } diff --git a/trunk/bindings/csharp/SipEvent.cs b/trunk/bindings/csharp/SipEvent.cs index a0db3f79..172c7f12 100644 --- a/trunk/bindings/csharp/SipEvent.cs +++ b/trunk/bindings/csharp/SipEvent.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -29,13 +29,11 @@ public class SipEvent : IDisposable { public virtual void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_SipEvent(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_SipEvent(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); } } diff --git a/trunk/bindings/csharp/SipMessage.cs b/trunk/bindings/csharp/SipMessage.cs index 519634e2..16c94620 100644 --- a/trunk/bindings/csharp/SipMessage.cs +++ b/trunk/bindings/csharp/SipMessage.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -29,13 +29,11 @@ public class SipMessage : IDisposable { public virtual void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_SipMessage(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_SipMessage(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); } } diff --git a/trunk/bindings/csharp/SipSession.cs b/trunk/bindings/csharp/SipSession.cs index e07fda8c..aa902516 100644 --- a/trunk/bindings/csharp/SipSession.cs +++ b/trunk/bindings/csharp/SipSession.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -29,13 +29,11 @@ public class SipSession : IDisposable { public virtual void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_SipSession(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_SipSession(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); } } diff --git a/trunk/bindings/csharp/SipStack.cs b/trunk/bindings/csharp/SipStack.cs index a08d5228..dcaa66a1 100644 --- a/trunk/bindings/csharp/SipStack.cs +++ b/trunk/bindings/csharp/SipStack.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -27,13 +27,11 @@ public class SipStack : SafeObject { public override void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_SipStack(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_SipStack(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); base.Dispose(); } diff --git a/trunk/bindings/csharp/SipUri.cs b/trunk/bindings/csharp/SipUri.cs index f37c07cb..7a9dbb27 100644 --- a/trunk/bindings/csharp/SipUri.cs +++ b/trunk/bindings/csharp/SipUri.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -29,13 +29,11 @@ public class SipUri : IDisposable { public virtual void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_SipUri(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_SipUri(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); } } diff --git a/trunk/bindings/csharp/StackEvent.cs b/trunk/bindings/csharp/StackEvent.cs index 3059cb72..861ed15a 100644 --- a/trunk/bindings/csharp/StackEvent.cs +++ b/trunk/bindings/csharp/StackEvent.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -27,13 +27,11 @@ public class StackEvent : SipEvent { 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); + if(swigCPtr.Handle != IntPtr.Zero && 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 62aac0f6..b1807a79 100644 --- a/trunk/bindings/csharp/SubscriptionEvent.cs +++ b/trunk/bindings/csharp/SubscriptionEvent.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -27,13 +27,11 @@ public class SubscriptionEvent : SipEvent { public override void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_SubscriptionEvent(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_SubscriptionEvent(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); base.Dispose(); } diff --git a/trunk/bindings/csharp/SubscriptionSession.cs b/trunk/bindings/csharp/SubscriptionSession.cs index dcee4543..4a31124a 100644 --- a/trunk/bindings/csharp/SubscriptionSession.cs +++ b/trunk/bindings/csharp/SubscriptionSession.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -27,13 +27,11 @@ public class SubscriptionSession : SipSession { public override void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_SubscriptionSession(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_SubscriptionSession(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); base.Dispose(); } diff --git a/trunk/bindings/csharp/test/Program.cs b/trunk/bindings/csharp/test/Program.cs index 101af9a9..d9bb312c 100644 --- a/trunk/bindings/csharp/test/Program.cs +++ b/trunk/bindings/csharp/test/Program.cs @@ -33,6 +33,14 @@ namespace test sipCallback = new MySipCallback(); //sipDebugCallback = new MySipDebugCallback(); + /* Create Audio consumer */ + audioConsumer = new MyProxyAudioConsumer(); + audioConsumer.setActivate(); + + /* Create Audio producer */ + audioProducer = new MyProxyAudioProducer(); + audioProducer.setActivate(); + /* Create and configure the IMS/LTE stack */ sipStack = new SipStack(sipCallback, String.Format("sip:{0}", REALM), String.Format("{0}@{1}", USER, REALM), String.Format("sip:{0}@{1}", USER, REALM)); sipStack.setDebugCallback(sipDebugCallback); @@ -40,7 +48,11 @@ namespace test sipStack.addHeader("Privacy", "header; id"); sipStack.addHeader("P-Access-Network-Info", "ADSL;utran-cell-id-3gpp=00000000"); sipStack.addHeader("User-Agent", "IM-client/OMA1.0 doubango/v1.0.0"); - + + /* Do it after stack creation */ + ProxyAudioConsumer.registerPlugin(); + ProxyAudioProducer.registerPlugin(); + /* Sets Proxy-CSCF */ success = sipStack.setProxyCSCF(PROXY_CSCF_IP, PROXY_CSCF_PORT, "tcp", "ipv4"); /* Starts the stack */ @@ -49,7 +61,7 @@ namespace test /* Set Password */ //stack.setPassword(PASSWORD); - sipStack.setAoR("127.0.0.1", 1234); + //sipStack.setAoR("127.0.0.1", 1234); /* Send REGISTER */ regSession = new RegistrationSession(sipStack); @@ -59,45 +71,75 @@ namespace test regSession.setExpires(35); regSession.Register(); - //Thread.Sleep(2000); + Console.ReadLine(); - /* Send SUBSCRIBE(reg) */ - subSession = new SubscriptionSession(sipStack); - subSession.addHeader("Event", "reg"); - subSession.addHeader("Accept", "application/reginfo+xml"); - subSession.addHeader("Allow-Events", "refer, presence, presence.winfo, xcap-diff, conference"); - subSession.setExpires(35); - //subSession.Subscribe(); + callSession = new CallSession(sipStack); + callSession.Call(String.Format("sip:bob@{0}", REALM)); - /* Send MESSAGE */ - MessagingSession msg = new MessagingSession(sipStack); - byte [] content = Encoding.ASCII.GetBytes("Hello World"); - msg.setToUri(String.Format("sip:{0}@{1}", "alice", REALM)); - msg.addHeader("NS", "imdn "); - msg.addHeader("imdn.Message-ID", "34jk324j"); - msg.addHeader("DateTime", "2006-04-04T12:16:49-05:00"); - msg.addHeader("imdn.Disposition-Notification", "positive-delivery, negative-delivery"); - msg.addHeader("Content-Type", "text/plain"); - //msg.Send(content, (uint)content.Length); + tcb = new TimerCallback(OnTimer); + timer = new Timer(tcb, new AutoResetEvent(false), 0, 20); - /* Send OPTIONS */ - OptionsSession opt = new OptionsSession(sipStack); - opt.setToUri(String.Format("sip:{0}@{1}", "hacking_the_aor", REALM)); - opt.Send(); + Console.ReadLine(); - Console.Read(); + callSession.Hangup(); + + + ////Thread.Sleep(2000); + + ///* Send SUBSCRIBE(reg) */ + //subSession = new SubscriptionSession(sipStack); + //subSession.addHeader("Event", "reg"); + //subSession.addHeader("Accept", "application/reginfo+xml"); + //subSession.addHeader("Allow-Events", "refer, presence, presence.winfo, xcap-diff, conference"); + //subSession.setExpires(35); + ////subSession.Subscribe(); + + ///* Send MESSAGE */ + //MessagingSession msg = new MessagingSession(sipStack); + //byte [] content = Encoding.ASCII.GetBytes("Hello World"); + //msg.setToUri(String.Format("sip:{0}@{1}", "alice", REALM)); + //msg.addHeader("NS", "imdn "); + //msg.addHeader("imdn.Message-ID", "34jk324j"); + //msg.addHeader("DateTime", "2006-04-04T12:16:49-05:00"); + //msg.addHeader("imdn.Disposition-Notification", "positive-delivery, negative-delivery"); + //msg.addHeader("Content-Type", "text/plain"); + ////msg.Send(content, (uint)content.Length); + + ///* Send OPTIONS */ + //OptionsSession opt = new OptionsSession(sipStack); + //opt.setToUri(String.Format("sip:{0}@{1}", "hacking_the_aor", REALM)); + //opt.Send(); + + Console.ReadLine(); sipStack.stop(); } + + public static void OnTimer(Object stateInfo) + { + byte[] bytes = new byte[320]; + uint ret = audioConsumer.pull(bytes, (uint)bytes.Length); + //Console.WriteLine("pull="+ret); + + int ret2 = audioProducer.push(bytes, (uint)bytes.Length); + //Console.WriteLine("push=" + ret); + } + + static Timer timer; + static TimerCallback tcb; + static CallSession callSession; static RegistrationSession regSession; static SubscriptionSession subSession; static MySipCallback sipCallback; static SipStack sipStack; static MySipDebugCallback sipDebugCallback; + static MyProxyAudioConsumer audioConsumer; + static MyProxyAudioProducer audioProducer; } - public class MySipDebugCallback : SipDebugCallback + + public class MySipDebugCallback : DDebugCallback { public override int OnDebugInfo(string message) { @@ -124,6 +166,52 @@ namespace test } } + public class MyProxyAudioConsumer : ProxyAudioConsumer + { + public override int prepare(int ptime, int rate, int channels) + { + return base.prepare(ptime, rate, channels); + } + + public override int start() + { + return base.start(); + } + + public override int pause() + { + return base.pause(); + } + + public override int stop() + { + return base.stop(); + } + } + + public class MyProxyAudioProducer : ProxyAudioProducer + { + public override int prepare(int ptime, int rate, int channels) + { + return base.prepare(ptime, rate, channels); + } + + public override int start() + { + return base.start(); + } + + public override int pause() + { + return base.pause(); + } + + public override int stop() + { + return base.stop(); + } + } + public class MySipCallback : SipCallback { public MySipCallback() @@ -171,6 +259,7 @@ namespace test return 0; } + public override int OnOptionsEvent(OptionsEvent e) { short code = e.getCode(); diff --git a/trunk/bindings/csharp/test/test.csproj b/trunk/bindings/csharp/test/test.csproj index 288503dc..ea2207c5 100644 --- a/trunk/bindings/csharp/test/test.csproj +++ b/trunk/bindings/csharp/test/test.csproj @@ -45,6 +45,12 @@ + + CallSession.cs + + + DDebugCallback.cs + DialogEvent.cs @@ -60,6 +66,12 @@ OptionsSession.cs + + ProxyAudioConsumer.cs + + + ProxyAudioProducer.cs + PublicationEvent.cs @@ -78,9 +90,6 @@ SipCallback.cs - - SipDebugCallback.cs - SipEvent.cs @@ -93,6 +102,9 @@ SipStack.cs + + StackEvent.cs + SubscriptionEvent.cs diff --git a/trunk/bindings/csharp/tinyWRAP.cs b/trunk/bindings/csharp/tinyWRAP.cs index ec1b7d2b..dc1929ea 100644 --- a/trunk/bindings/csharp/tinyWRAP.cs +++ b/trunk/bindings/csharp/tinyWRAP.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/trunk/bindings/csharp/tinyWRAP.sln b/trunk/bindings/csharp/tinyWRAP.sln index bbf16a1d..c61c2f51 100644 --- a/trunk/bindings/csharp/tinyWRAP.sln +++ b/trunk/bindings/csharp/tinyWRAP.sln @@ -19,6 +19,12 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tinyIPSec", "..\..\tinyIPSe EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tinySAK", "..\..\tinySAK\tinySAK.vcproj", "{6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tinySIGCOMP", "..\..\tinySIGCOMP\tinySIGCOMP.vcproj", "{76261DC8-25B3-43F4-9FB5-112C4AC0880E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tinyDAV", "..\..\tinyDAV\tinyDAV.vcproj", "{8E2F0B2E-2596-4010-BF4A-2F688975B5C1}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tinyRTP", "..\..\tinyRTP\tinyRTP.vcproj", "{99B7D02F-8C70-4B45-AF3C-92313C3CEE15}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -303,6 +309,90 @@ Global {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Static_Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Static_Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Static_Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Static_Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Static_Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Static_Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {76261DC8-25B3-43F4-9FB5-112C4AC0880E}.Debug|Any CPU.ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {76261DC8-25B3-43F4-9FB5-112C4AC0880E}.Debug|Mixed Platforms.ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {76261DC8-25B3-43F4-9FB5-112C4AC0880E}.Debug|Mixed Platforms.Build.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {76261DC8-25B3-43F4-9FB5-112C4AC0880E}.Debug|Mixed Platforms.Deploy.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {76261DC8-25B3-43F4-9FB5-112C4AC0880E}.Debug|Win32.ActiveCfg = Debug|Win32 + {76261DC8-25B3-43F4-9FB5-112C4AC0880E}.Debug|Win32.Build.0 = Debug|Win32 + {76261DC8-25B3-43F4-9FB5-112C4AC0880E}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {76261DC8-25B3-43F4-9FB5-112C4AC0880E}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {76261DC8-25B3-43F4-9FB5-112C4AC0880E}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {76261DC8-25B3-43F4-9FB5-112C4AC0880E}.Release|Any CPU.ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {76261DC8-25B3-43F4-9FB5-112C4AC0880E}.Release|Mixed Platforms.ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {76261DC8-25B3-43F4-9FB5-112C4AC0880E}.Release|Mixed Platforms.Build.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {76261DC8-25B3-43F4-9FB5-112C4AC0880E}.Release|Mixed Platforms.Deploy.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {76261DC8-25B3-43F4-9FB5-112C4AC0880E}.Release|Win32.ActiveCfg = Release|Win32 + {76261DC8-25B3-43F4-9FB5-112C4AC0880E}.Release|Win32.Build.0 = Release|Win32 + {76261DC8-25B3-43F4-9FB5-112C4AC0880E}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {76261DC8-25B3-43F4-9FB5-112C4AC0880E}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {76261DC8-25B3-43F4-9FB5-112C4AC0880E}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {76261DC8-25B3-43F4-9FB5-112C4AC0880E}.Static_Debug|Any CPU.ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {76261DC8-25B3-43F4-9FB5-112C4AC0880E}.Static_Debug|Mixed Platforms.ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {76261DC8-25B3-43F4-9FB5-112C4AC0880E}.Static_Debug|Mixed Platforms.Build.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {76261DC8-25B3-43F4-9FB5-112C4AC0880E}.Static_Debug|Mixed Platforms.Deploy.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {76261DC8-25B3-43F4-9FB5-112C4AC0880E}.Static_Debug|Win32.ActiveCfg = Debug|Win32 + {76261DC8-25B3-43F4-9FB5-112C4AC0880E}.Static_Debug|Win32.Build.0 = Debug|Win32 + {76261DC8-25B3-43F4-9FB5-112C4AC0880E}.Static_Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {76261DC8-25B3-43F4-9FB5-112C4AC0880E}.Static_Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {76261DC8-25B3-43F4-9FB5-112C4AC0880E}.Static_Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {76261DC8-25B3-43F4-9FB5-112C4AC0880E}.Static_Release|Any CPU.ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {76261DC8-25B3-43F4-9FB5-112C4AC0880E}.Static_Release|Mixed Platforms.ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {76261DC8-25B3-43F4-9FB5-112C4AC0880E}.Static_Release|Mixed Platforms.Build.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {76261DC8-25B3-43F4-9FB5-112C4AC0880E}.Static_Release|Mixed Platforms.Deploy.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {76261DC8-25B3-43F4-9FB5-112C4AC0880E}.Static_Release|Win32.ActiveCfg = Release|Win32 + {76261DC8-25B3-43F4-9FB5-112C4AC0880E}.Static_Release|Win32.Build.0 = Release|Win32 + {76261DC8-25B3-43F4-9FB5-112C4AC0880E}.Static_Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {76261DC8-25B3-43F4-9FB5-112C4AC0880E}.Static_Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {76261DC8-25B3-43F4-9FB5-112C4AC0880E}.Static_Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {8E2F0B2E-2596-4010-BF4A-2F688975B5C1}.Debug|Any CPU.ActiveCfg = Debug|Win32 + {8E2F0B2E-2596-4010-BF4A-2F688975B5C1}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {8E2F0B2E-2596-4010-BF4A-2F688975B5C1}.Debug|Mixed Platforms.Build.0 = Debug|Win32 + {8E2F0B2E-2596-4010-BF4A-2F688975B5C1}.Debug|Win32.ActiveCfg = Debug|Win32 + {8E2F0B2E-2596-4010-BF4A-2F688975B5C1}.Debug|Win32.Build.0 = Debug|Win32 + {8E2F0B2E-2596-4010-BF4A-2F688975B5C1}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 + {8E2F0B2E-2596-4010-BF4A-2F688975B5C1}.Release|Any CPU.ActiveCfg = Release|Win32 + {8E2F0B2E-2596-4010-BF4A-2F688975B5C1}.Release|Mixed Platforms.ActiveCfg = Release|Win32 + {8E2F0B2E-2596-4010-BF4A-2F688975B5C1}.Release|Mixed Platforms.Build.0 = Release|Win32 + {8E2F0B2E-2596-4010-BF4A-2F688975B5C1}.Release|Win32.ActiveCfg = Release|Win32 + {8E2F0B2E-2596-4010-BF4A-2F688975B5C1}.Release|Win32.Build.0 = Release|Win32 + {8E2F0B2E-2596-4010-BF4A-2F688975B5C1}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 + {8E2F0B2E-2596-4010-BF4A-2F688975B5C1}.Static_Debug|Any CPU.ActiveCfg = Debug|Win32 + {8E2F0B2E-2596-4010-BF4A-2F688975B5C1}.Static_Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {8E2F0B2E-2596-4010-BF4A-2F688975B5C1}.Static_Debug|Mixed Platforms.Build.0 = Debug|Win32 + {8E2F0B2E-2596-4010-BF4A-2F688975B5C1}.Static_Debug|Win32.ActiveCfg = Debug|Win32 + {8E2F0B2E-2596-4010-BF4A-2F688975B5C1}.Static_Debug|Win32.Build.0 = Debug|Win32 + {8E2F0B2E-2596-4010-BF4A-2F688975B5C1}.Static_Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 + {8E2F0B2E-2596-4010-BF4A-2F688975B5C1}.Static_Release|Any CPU.ActiveCfg = Release|Win32 + {8E2F0B2E-2596-4010-BF4A-2F688975B5C1}.Static_Release|Mixed Platforms.ActiveCfg = Release|Win32 + {8E2F0B2E-2596-4010-BF4A-2F688975B5C1}.Static_Release|Mixed Platforms.Build.0 = Release|Win32 + {8E2F0B2E-2596-4010-BF4A-2F688975B5C1}.Static_Release|Win32.ActiveCfg = Release|Win32 + {8E2F0B2E-2596-4010-BF4A-2F688975B5C1}.Static_Release|Win32.Build.0 = Release|Win32 + {8E2F0B2E-2596-4010-BF4A-2F688975B5C1}.Static_Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 + {99B7D02F-8C70-4B45-AF3C-92313C3CEE15}.Debug|Any CPU.ActiveCfg = Debug|Win32 + {99B7D02F-8C70-4B45-AF3C-92313C3CEE15}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {99B7D02F-8C70-4B45-AF3C-92313C3CEE15}.Debug|Mixed Platforms.Build.0 = Debug|Win32 + {99B7D02F-8C70-4B45-AF3C-92313C3CEE15}.Debug|Win32.ActiveCfg = Debug|Win32 + {99B7D02F-8C70-4B45-AF3C-92313C3CEE15}.Debug|Win32.Build.0 = Debug|Win32 + {99B7D02F-8C70-4B45-AF3C-92313C3CEE15}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 + {99B7D02F-8C70-4B45-AF3C-92313C3CEE15}.Release|Any CPU.ActiveCfg = Release|Win32 + {99B7D02F-8C70-4B45-AF3C-92313C3CEE15}.Release|Mixed Platforms.ActiveCfg = Release|Win32 + {99B7D02F-8C70-4B45-AF3C-92313C3CEE15}.Release|Mixed Platforms.Build.0 = Release|Win32 + {99B7D02F-8C70-4B45-AF3C-92313C3CEE15}.Release|Win32.ActiveCfg = Release|Win32 + {99B7D02F-8C70-4B45-AF3C-92313C3CEE15}.Release|Win32.Build.0 = Release|Win32 + {99B7D02F-8C70-4B45-AF3C-92313C3CEE15}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 + {99B7D02F-8C70-4B45-AF3C-92313C3CEE15}.Static_Debug|Any CPU.ActiveCfg = Debug|Win32 + {99B7D02F-8C70-4B45-AF3C-92313C3CEE15}.Static_Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {99B7D02F-8C70-4B45-AF3C-92313C3CEE15}.Static_Debug|Mixed Platforms.Build.0 = Debug|Win32 + {99B7D02F-8C70-4B45-AF3C-92313C3CEE15}.Static_Debug|Win32.ActiveCfg = Debug|Win32 + {99B7D02F-8C70-4B45-AF3C-92313C3CEE15}.Static_Debug|Win32.Build.0 = Debug|Win32 + {99B7D02F-8C70-4B45-AF3C-92313C3CEE15}.Static_Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 + {99B7D02F-8C70-4B45-AF3C-92313C3CEE15}.Static_Release|Any CPU.ActiveCfg = Release|Win32 + {99B7D02F-8C70-4B45-AF3C-92313C3CEE15}.Static_Release|Mixed Platforms.ActiveCfg = Release|Win32 + {99B7D02F-8C70-4B45-AF3C-92313C3CEE15}.Static_Release|Mixed Platforms.Build.0 = Release|Win32 + {99B7D02F-8C70-4B45-AF3C-92313C3CEE15}.Static_Release|Win32.ActiveCfg = Release|Win32 + {99B7D02F-8C70-4B45-AF3C-92313C3CEE15}.Static_Release|Win32.Build.0 = Release|Win32 + {99B7D02F-8C70-4B45-AF3C-92313C3CEE15}.Static_Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/trunk/bindings/csharp/tinyWRAP.suo b/trunk/bindings/csharp/tinyWRAP.suo index 0126ea53..95fc1b89 100644 Binary files a/trunk/bindings/csharp/tinyWRAP.suo and b/trunk/bindings/csharp/tinyWRAP.suo differ diff --git a/trunk/bindings/csharp/tinyWRAP.vcproj b/trunk/bindings/csharp/tinyWRAP.vcproj index 344fc65c..3e893ba6 100644 --- a/trunk/bindings/csharp/tinyWRAP.vcproj +++ b/trunk/bindings/csharp/tinyWRAP.vcproj @@ -41,7 +41,7 @@ + + + + + + @@ -181,10 +193,6 @@ RelativePath="..\_common\SipCallback.cxx" > - - @@ -223,6 +231,18 @@ RelativePath="..\_common\Common.h" > + + + + + + @@ -231,10 +251,6 @@ RelativePath="..\_common\SipCallback.h" > - - @@ -255,6 +271,10 @@ RelativePath="..\_common\SipUri.h" > + + diff --git a/trunk/bindings/csharp/tinyWRAPPINVOKE.cs b/trunk/bindings/csharp/tinyWRAPPINVOKE.cs index ea85361b..ea78ae37 100644 --- a/trunk/bindings/csharp/tinyWRAPPINVOKE.cs +++ b/trunk/bindings/csharp/tinyWRAPPINVOKE.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -346,6 +346,18 @@ class tinyWRAPPINVOKE { [DllImport("tinyWRAP", EntryPoint="CSharp_SipSession_getId")] public static extern uint SipSession_getId(HandleRef jarg1); + [DllImport("tinyWRAP", EntryPoint="CSharp_new_CallSession")] + public static extern IntPtr new_CallSession(HandleRef jarg1); + + [DllImport("tinyWRAP", EntryPoint="CSharp_delete_CallSession")] + public static extern void delete_CallSession(HandleRef jarg1); + + [DllImport("tinyWRAP", EntryPoint="CSharp_CallSession_Call")] + public static extern bool CallSession_Call(HandleRef jarg1, string jarg2); + + [DllImport("tinyWRAP", EntryPoint="CSharp_CallSession_Hangup")] + public static extern bool CallSession_Hangup(HandleRef jarg1); + [DllImport("tinyWRAP", EntryPoint="CSharp_new_MessagingSession")] public static extern IntPtr new_MessagingSession(HandleRef jarg1); @@ -406,6 +418,90 @@ class tinyWRAPPINVOKE { [DllImport("tinyWRAP", EntryPoint="CSharp_SubscriptionSession_UnSubscribe")] public static extern bool SubscriptionSession_UnSubscribe(HandleRef jarg1); + [DllImport("tinyWRAP", EntryPoint="CSharp_new_ProxyAudioConsumer")] + public static extern IntPtr new_ProxyAudioConsumer(); + + [DllImport("tinyWRAP", EntryPoint="CSharp_delete_ProxyAudioConsumer")] + public static extern void delete_ProxyAudioConsumer(HandleRef jarg1); + + [DllImport("tinyWRAP", EntryPoint="CSharp_ProxyAudioConsumer_prepare")] + public static extern int ProxyAudioConsumer_prepare(HandleRef jarg1, int jarg2, int jarg3, int jarg4); + + [DllImport("tinyWRAP", EntryPoint="CSharp_ProxyAudioConsumer_prepareSwigExplicitProxyAudioConsumer")] + public static extern int ProxyAudioConsumer_prepareSwigExplicitProxyAudioConsumer(HandleRef jarg1, int jarg2, int jarg3, int jarg4); + + [DllImport("tinyWRAP", EntryPoint="CSharp_ProxyAudioConsumer_start")] + public static extern int ProxyAudioConsumer_start(HandleRef jarg1); + + [DllImport("tinyWRAP", EntryPoint="CSharp_ProxyAudioConsumer_startSwigExplicitProxyAudioConsumer")] + public static extern int ProxyAudioConsumer_startSwigExplicitProxyAudioConsumer(HandleRef jarg1); + + [DllImport("tinyWRAP", EntryPoint="CSharp_ProxyAudioConsumer_pause")] + public static extern int ProxyAudioConsumer_pause(HandleRef jarg1); + + [DllImport("tinyWRAP", EntryPoint="CSharp_ProxyAudioConsumer_pauseSwigExplicitProxyAudioConsumer")] + public static extern int ProxyAudioConsumer_pauseSwigExplicitProxyAudioConsumer(HandleRef jarg1); + + [DllImport("tinyWRAP", EntryPoint="CSharp_ProxyAudioConsumer_stop")] + public static extern int ProxyAudioConsumer_stop(HandleRef jarg1); + + [DllImport("tinyWRAP", EntryPoint="CSharp_ProxyAudioConsumer_stopSwigExplicitProxyAudioConsumer")] + public static extern int ProxyAudioConsumer_stopSwigExplicitProxyAudioConsumer(HandleRef jarg1); + + [DllImport("tinyWRAP", EntryPoint="CSharp_ProxyAudioConsumer_setActivate")] + public static extern void ProxyAudioConsumer_setActivate(HandleRef jarg1); + + [DllImport("tinyWRAP", EntryPoint="CSharp_ProxyAudioConsumer_pull")] + public static extern uint ProxyAudioConsumer_pull(HandleRef jarg1, byte[] jarg2, uint jarg3); + + [DllImport("tinyWRAP", EntryPoint="CSharp_ProxyAudioConsumer_registerPlugin")] + public static extern bool ProxyAudioConsumer_registerPlugin(); + + [DllImport("tinyWRAP", EntryPoint="CSharp_ProxyAudioConsumer_director_connect")] + public static extern void ProxyAudioConsumer_director_connect(HandleRef jarg1, ProxyAudioConsumer.SwigDelegateProxyAudioConsumer_0 delegate0, ProxyAudioConsumer.SwigDelegateProxyAudioConsumer_1 delegate1, ProxyAudioConsumer.SwigDelegateProxyAudioConsumer_2 delegate2, ProxyAudioConsumer.SwigDelegateProxyAudioConsumer_3 delegate3); + + [DllImport("tinyWRAP", EntryPoint="CSharp_new_ProxyAudioProducer")] + public static extern IntPtr new_ProxyAudioProducer(); + + [DllImport("tinyWRAP", EntryPoint="CSharp_delete_ProxyAudioProducer")] + public static extern void delete_ProxyAudioProducer(HandleRef jarg1); + + [DllImport("tinyWRAP", EntryPoint="CSharp_ProxyAudioProducer_prepare")] + public static extern int ProxyAudioProducer_prepare(HandleRef jarg1, int jarg2, int jarg3, int jarg4); + + [DllImport("tinyWRAP", EntryPoint="CSharp_ProxyAudioProducer_prepareSwigExplicitProxyAudioProducer")] + public static extern int ProxyAudioProducer_prepareSwigExplicitProxyAudioProducer(HandleRef jarg1, int jarg2, int jarg3, int jarg4); + + [DllImport("tinyWRAP", EntryPoint="CSharp_ProxyAudioProducer_start")] + public static extern int ProxyAudioProducer_start(HandleRef jarg1); + + [DllImport("tinyWRAP", EntryPoint="CSharp_ProxyAudioProducer_startSwigExplicitProxyAudioProducer")] + public static extern int ProxyAudioProducer_startSwigExplicitProxyAudioProducer(HandleRef jarg1); + + [DllImport("tinyWRAP", EntryPoint="CSharp_ProxyAudioProducer_pause")] + public static extern int ProxyAudioProducer_pause(HandleRef jarg1); + + [DllImport("tinyWRAP", EntryPoint="CSharp_ProxyAudioProducer_pauseSwigExplicitProxyAudioProducer")] + public static extern int ProxyAudioProducer_pauseSwigExplicitProxyAudioProducer(HandleRef jarg1); + + [DllImport("tinyWRAP", EntryPoint="CSharp_ProxyAudioProducer_stop")] + public static extern int ProxyAudioProducer_stop(HandleRef jarg1); + + [DllImport("tinyWRAP", EntryPoint="CSharp_ProxyAudioProducer_stopSwigExplicitProxyAudioProducer")] + public static extern int ProxyAudioProducer_stopSwigExplicitProxyAudioProducer(HandleRef jarg1); + + [DllImport("tinyWRAP", EntryPoint="CSharp_ProxyAudioProducer_setActivate")] + public static extern void ProxyAudioProducer_setActivate(HandleRef jarg1); + + [DllImport("tinyWRAP", EntryPoint="CSharp_ProxyAudioProducer_push")] + public static extern int ProxyAudioProducer_push(HandleRef jarg1, byte[] jarg2, uint jarg3); + + [DllImport("tinyWRAP", EntryPoint="CSharp_ProxyAudioProducer_registerPlugin")] + public static extern bool ProxyAudioProducer_registerPlugin(); + + [DllImport("tinyWRAP", EntryPoint="CSharp_ProxyAudioProducer_director_connect")] + public static extern void ProxyAudioProducer_director_connect(HandleRef jarg1, ProxyAudioProducer.SwigDelegateProxyAudioProducer_0 delegate0, ProxyAudioProducer.SwigDelegateProxyAudioProducer_1 delegate1, ProxyAudioProducer.SwigDelegateProxyAudioProducer_2 delegate2, ProxyAudioProducer.SwigDelegateProxyAudioProducer_3 delegate3); + [DllImport("tinyWRAP", EntryPoint="CSharp_new_SipCallback")] public static extern IntPtr new_SipCallback(); @@ -586,6 +682,9 @@ class tinyWRAPPINVOKE { [DllImport("tinyWRAP", EntryPoint="CSharp_SubscriptionEventUpcast")] public static extern IntPtr SubscriptionEventUpcast(IntPtr objectRef); + [DllImport("tinyWRAP", EntryPoint="CSharp_CallSessionUpcast")] + public static extern IntPtr CallSessionUpcast(IntPtr objectRef); + [DllImport("tinyWRAP", EntryPoint="CSharp_MessagingSessionUpcast")] public static extern IntPtr MessagingSessionUpcast(IntPtr objectRef); diff --git a/trunk/bindings/csharp/tinyWRAP_wrap.cxx b/trunk/bindings/csharp/tinyWRAP_wrap.cxx index 6b8a89af..d5138dfe 100644 --- a/trunk/bindings/csharp/tinyWRAP_wrap.cxx +++ b/trunk/bindings/csharp/tinyWRAP_wrap.cxx @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make @@ -35,114 +35,114 @@ template T SwigValueInit() { } #endif -/* ----------------------------------------------------------------------------- - * This section contains generic SWIG labels for method/variable - * declarations/attributes, and other compiler dependent labels. - * ----------------------------------------------------------------------------- */ - -/* template workaround for compilers that cannot correctly implement the C++ standard */ -#ifndef SWIGTEMPLATEDISAMBIGUATOR -# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) -# define SWIGTEMPLATEDISAMBIGUATOR template -# elif defined(__HP_aCC) -/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ -/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ -# define SWIGTEMPLATEDISAMBIGUATOR template -# else -# define SWIGTEMPLATEDISAMBIGUATOR -# endif -#endif - -/* inline attribute */ -#ifndef SWIGINLINE -# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) -# define SWIGINLINE inline -# else -# define SWIGINLINE -# endif -#endif - -/* attribute recognised by some compilers to avoid 'unused' warnings */ -#ifndef SWIGUNUSED -# if defined(__GNUC__) -# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) -# define SWIGUNUSED __attribute__ ((__unused__)) -# else -# define SWIGUNUSED -# endif -# elif defined(__ICC) -# define SWIGUNUSED __attribute__ ((__unused__)) -# else -# define SWIGUNUSED -# endif -#endif - -#ifndef SWIG_MSC_UNSUPPRESS_4505 -# if defined(_MSC_VER) -# pragma warning(disable : 4505) /* unreferenced local function has been removed */ -# endif -#endif - -#ifndef SWIGUNUSEDPARM -# ifdef __cplusplus -# define SWIGUNUSEDPARM(p) -# else -# define SWIGUNUSEDPARM(p) p SWIGUNUSED -# endif -#endif - -/* internal SWIG method */ -#ifndef SWIGINTERN -# define SWIGINTERN static SWIGUNUSED -#endif - -/* internal inline SWIG method */ -#ifndef SWIGINTERNINLINE -# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE -#endif - -/* exporting methods */ -#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) -# ifndef GCC_HASCLASSVISIBILITY -# define GCC_HASCLASSVISIBILITY -# endif -#endif - -#ifndef SWIGEXPORT -# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) -# if defined(STATIC_LINKED) -# define SWIGEXPORT -# else -# define SWIGEXPORT __declspec(dllexport) -# endif -# else -# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) -# define SWIGEXPORT __attribute__ ((visibility("default"))) -# else -# define SWIGEXPORT -# endif -# endif -#endif - -/* calling conventions for Windows */ -#ifndef SWIGSTDCALL -# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) -# define SWIGSTDCALL __stdcall -# else -# define SWIGSTDCALL -# endif -#endif - -/* Deal with Microsoft's attempt at deprecating C standard runtime functions */ -#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) -# define _CRT_SECURE_NO_DEPRECATE -#endif - -/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ -#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) -# define _SCL_SECURE_NO_DEPRECATE -#endif - +/* ----------------------------------------------------------------------------- + * This section contains generic SWIG labels for method/variable + * declarations/attributes, and other compiler dependent labels. + * ----------------------------------------------------------------------------- */ + +/* template workaround for compilers that cannot correctly implement the C++ standard */ +#ifndef SWIGTEMPLATEDISAMBIGUATOR +# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) +# define SWIGTEMPLATEDISAMBIGUATOR template +# elif defined(__HP_aCC) +/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ +/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ +# define SWIGTEMPLATEDISAMBIGUATOR template +# else +# define SWIGTEMPLATEDISAMBIGUATOR +# endif +#endif + +/* inline attribute */ +#ifndef SWIGINLINE +# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) +# define SWIGINLINE inline +# else +# define SWIGINLINE +# endif +#endif + +/* attribute recognised by some compilers to avoid 'unused' warnings */ +#ifndef SWIGUNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define SWIGUNUSED __attribute__ ((__unused__)) +# else +# define SWIGUNUSED +# endif +# elif defined(__ICC) +# define SWIGUNUSED __attribute__ ((__unused__)) +# else +# define SWIGUNUSED +# endif +#endif + +#ifndef SWIG_MSC_UNSUPPRESS_4505 +# if defined(_MSC_VER) +# pragma warning(disable : 4505) /* unreferenced local function has been removed */ +# endif +#endif + +#ifndef SWIGUNUSEDPARM +# ifdef __cplusplus +# define SWIGUNUSEDPARM(p) +# else +# define SWIGUNUSEDPARM(p) p SWIGUNUSED +# endif +#endif + +/* internal SWIG method */ +#ifndef SWIGINTERN +# define SWIGINTERN static SWIGUNUSED +#endif + +/* internal inline SWIG method */ +#ifndef SWIGINTERNINLINE +# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE +#endif + +/* exporting methods */ +#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) +# ifndef GCC_HASCLASSVISIBILITY +# define GCC_HASCLASSVISIBILITY +# endif +#endif + +#ifndef SWIGEXPORT +# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# if defined(STATIC_LINKED) +# define SWIGEXPORT +# else +# define SWIGEXPORT __declspec(dllexport) +# endif +# else +# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) +# define SWIGEXPORT __attribute__ ((visibility("default"))) +# else +# define SWIGEXPORT +# endif +# endif +#endif + +/* calling conventions for Windows */ +#ifndef SWIGSTDCALL +# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# define SWIGSTDCALL __stdcall +# else +# define SWIGSTDCALL +# endif +#endif + +/* Deal with Microsoft's attempt at deprecating C standard runtime functions */ +#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) +# define _CRT_SECURE_NO_DEPRECATE +#endif + +/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ +#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) +# define _SCL_SECURE_NO_DEPRECATE +#endif + #include @@ -202,7 +202,7 @@ static SWIG_CSharpException_t SWIG_csharp_exceptions[] = { static SWIG_CSharpExceptionArgument_t SWIG_csharp_exceptions_argument[] = { { SWIG_CSharpArgumentException, NULL }, { SWIG_CSharpArgumentNullException, NULL }, - { SWIG_CSharpArgumentOutOfRangeException, NULL } + { SWIG_CSharpArgumentOutOfRangeException, NULL }, }; static void SWIGUNUSED SWIG_CSharpSetPendingException(SWIG_CSharpExceptionCodes code, const char *msg) { @@ -280,56 +280,56 @@ SWIGEXPORT void SWIGSTDCALL SWIGRegisterStringCallback_tinyWRAP(SWIG_CSharpStrin #define SWIG_contract_assert(nullreturn, expr, msg) if (!(expr)) {SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentOutOfRangeException, msg, ""); return nullreturn; } else -/* ----------------------------------------------------------------------------- - * See the LICENSE file for information on copyright, usage and redistribution - * of SWIG, and the README file for authors - http://www.swig.org/release.html. - * - * director.swg - * - * This file contains support for director classes so that C# proxy - * methods can be called from C++. - * ----------------------------------------------------------------------------- */ - -#ifdef __cplusplus - -#if defined(DEBUG_DIRECTOR_OWNED) -#include -#endif -#include - -namespace Swig { - /* Director base class - not currently used in C# directors */ - class Director { - }; - - /* Base class for director exceptions */ - class DirectorException { - protected: - std::string swig_msg; - - public: - DirectorException(const char* msg) : swig_msg(msg) { - } - DirectorException(const std::string &msg) : swig_msg(msg) { - } - const std::string& what() const { - return swig_msg; - } - virtual ~DirectorException() { - } - }; - - /* Pure virtual method exception */ - class DirectorPureVirtualException : public Swig::DirectorException { - public: - DirectorPureVirtualException(const char* msg) : DirectorException(std::string("Attempt to invoke pure virtual method ") + msg) { - } - }; -} - -#endif /* __cplusplus */ - - +/* ----------------------------------------------------------------------------- + * See the LICENSE file for information on copyright, usage and redistribution + * of SWIG, and the README file for authors - http://www.swig.org/release.html. + * + * director.swg + * + * This file contains support for director classes so that C# proxy + * methods can be called from C++. + * ----------------------------------------------------------------------------- */ + +#ifdef __cplusplus + +#if defined(DEBUG_DIRECTOR_OWNED) +#include +#endif +#include + +namespace Swig { + /* Director base class - not currently used in C# directors */ + class Director { + }; + + /* Base class for director exceptions */ + class DirectorException { + protected: + std::string swig_msg; + + public: + DirectorException(const char* msg) : swig_msg(msg) { + } + DirectorException(const std::string &msg) : swig_msg(msg) { + } + const std::string& what() const { + return swig_msg; + } + virtual ~DirectorException() { + } + }; + + /* Pure virtual method exception */ + class DirectorPureVirtualException : public Swig::DirectorException { + public: + DirectorPureVirtualException(const char* msg) : DirectorException(std::string("Attempt to invoke pure virtual method ") + msg) { + } + }; +} + +#endif /* __cplusplus */ + + #include "DDebug.h" @@ -339,6 +339,9 @@ namespace Swig { #include "SipEvent.h" #include "SipSession.h" +#include "ProxyConsumer.h" +#include "ProxyProducer.h" + #include "SipCallback.h" #include "SafeObject.h" #include "SipStack.h" @@ -351,6 +354,168 @@ namespace Swig { #include "tinyWRAP_wrap.h" +SwigDirector_ProxyAudioConsumer::SwigDirector_ProxyAudioConsumer() : ProxyAudioConsumer(), Swig::Director() { + swig_init_callbacks(); +} + +SwigDirector_ProxyAudioConsumer::~SwigDirector_ProxyAudioConsumer() { + +} + + +int SwigDirector_ProxyAudioConsumer::prepare(int ptime, int rate, int channels) { + int c_result = SwigValueInit< int >() ; + int jresult = 0 ; + int jptime ; + int jrate ; + int jchannels ; + + if (!swig_callbackprepare) { + return ProxyAudioConsumer::prepare(ptime,rate,channels); + } else { + jptime = ptime; + jrate = rate; + jchannels = channels; + jresult = (int) swig_callbackprepare(jptime, jrate, jchannels); + c_result = (int)jresult; + } + return c_result; +} + +int SwigDirector_ProxyAudioConsumer::start() { + int c_result = SwigValueInit< int >() ; + int jresult = 0 ; + + if (!swig_callbackstart) { + return ProxyAudioConsumer::start(); + } else { + jresult = (int) swig_callbackstart(); + c_result = (int)jresult; + } + return c_result; +} + +int SwigDirector_ProxyAudioConsumer::pause() { + int c_result = SwigValueInit< int >() ; + int jresult = 0 ; + + if (!swig_callbackpause) { + return ProxyAudioConsumer::pause(); + } else { + jresult = (int) swig_callbackpause(); + c_result = (int)jresult; + } + return c_result; +} + +int SwigDirector_ProxyAudioConsumer::stop() { + int c_result = SwigValueInit< int >() ; + int jresult = 0 ; + + if (!swig_callbackstop) { + return ProxyAudioConsumer::stop(); + } else { + jresult = (int) swig_callbackstop(); + c_result = (int)jresult; + } + return c_result; +} + +void SwigDirector_ProxyAudioConsumer::swig_connect_director(SWIG_Callback0_t callbackprepare, SWIG_Callback1_t callbackstart, SWIG_Callback2_t callbackpause, SWIG_Callback3_t callbackstop) { + swig_callbackprepare = callbackprepare; + swig_callbackstart = callbackstart; + swig_callbackpause = callbackpause; + swig_callbackstop = callbackstop; +} + +void SwigDirector_ProxyAudioConsumer::swig_init_callbacks() { + swig_callbackprepare = 0; + swig_callbackstart = 0; + swig_callbackpause = 0; + swig_callbackstop = 0; +} + +SwigDirector_ProxyAudioProducer::SwigDirector_ProxyAudioProducer() : ProxyAudioProducer(), Swig::Director() { + swig_init_callbacks(); +} + +SwigDirector_ProxyAudioProducer::~SwigDirector_ProxyAudioProducer() { + +} + + +int SwigDirector_ProxyAudioProducer::prepare(int ptime, int rate, int channels) { + int c_result = SwigValueInit< int >() ; + int jresult = 0 ; + int jptime ; + int jrate ; + int jchannels ; + + if (!swig_callbackprepare) { + return ProxyAudioProducer::prepare(ptime,rate,channels); + } else { + jptime = ptime; + jrate = rate; + jchannels = channels; + jresult = (int) swig_callbackprepare(jptime, jrate, jchannels); + c_result = (int)jresult; + } + return c_result; +} + +int SwigDirector_ProxyAudioProducer::start() { + int c_result = SwigValueInit< int >() ; + int jresult = 0 ; + + if (!swig_callbackstart) { + return ProxyAudioProducer::start(); + } else { + jresult = (int) swig_callbackstart(); + c_result = (int)jresult; + } + return c_result; +} + +int SwigDirector_ProxyAudioProducer::pause() { + int c_result = SwigValueInit< int >() ; + int jresult = 0 ; + + if (!swig_callbackpause) { + return ProxyAudioProducer::pause(); + } else { + jresult = (int) swig_callbackpause(); + c_result = (int)jresult; + } + return c_result; +} + +int SwigDirector_ProxyAudioProducer::stop() { + int c_result = SwigValueInit< int >() ; + int jresult = 0 ; + + if (!swig_callbackstop) { + return ProxyAudioProducer::stop(); + } else { + jresult = (int) swig_callbackstop(); + c_result = (int)jresult; + } + return c_result; +} + +void SwigDirector_ProxyAudioProducer::swig_connect_director(SWIG_Callback0_t callbackprepare, SWIG_Callback1_t callbackstart, SWIG_Callback2_t callbackpause, SWIG_Callback3_t callbackstop) { + swig_callbackprepare = callbackprepare; + swig_callbackstart = callbackstart; + swig_callbackpause = callbackpause; + swig_callbackstop = callbackstop; +} + +void SwigDirector_ProxyAudioProducer::swig_init_callbacks() { + swig_callbackprepare = 0; + swig_callbackstart = 0; + swig_callbackpause = 0; + swig_callbackstop = 0; +} + SwigDirector_SipCallback::SwigDirector_SipCallback() : SipCallback(), Swig::Director() { swig_init_callbacks(); } @@ -1140,6 +1305,52 @@ SWIGEXPORT unsigned int SWIGSTDCALL CSharp_SipSession_getId(void * jarg1) { } +SWIGEXPORT void * SWIGSTDCALL CSharp_new_CallSession(void * jarg1) { + void * jresult ; + SipStack *arg1 = (SipStack *) 0 ; + CallSession *result = 0 ; + + arg1 = (SipStack *)jarg1; + result = (CallSession *)new CallSession(arg1); + jresult = (void *)result; + return jresult; +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_delete_CallSession(void * jarg1) { + CallSession *arg1 = (CallSession *) 0 ; + + arg1 = (CallSession *)jarg1; + delete arg1; +} + + +SWIGEXPORT unsigned int SWIGSTDCALL CSharp_CallSession_Call(void * jarg1, char * jarg2) { + unsigned int jresult ; + CallSession *arg1 = (CallSession *) 0 ; + char *arg2 = (char *) 0 ; + bool result; + + arg1 = (CallSession *)jarg1; + arg2 = (char *)jarg2; + result = (bool)(arg1)->Call((char const *)arg2); + jresult = result; + return jresult; +} + + +SWIGEXPORT unsigned int SWIGSTDCALL CSharp_CallSession_Hangup(void * jarg1) { + unsigned int jresult ; + CallSession *arg1 = (CallSession *) 0 ; + bool result; + + arg1 = (CallSession *)jarg1; + result = (bool)(arg1)->Hangup(); + jresult = result; + return jresult; +} + + SWIGEXPORT void * SWIGSTDCALL CSharp_new_MessagingSession(void * jarg1) { void * jresult ; SipStack *arg1 = (SipStack *) 0 ; @@ -1368,6 +1579,344 @@ SWIGEXPORT unsigned int SWIGSTDCALL CSharp_SubscriptionSession_UnSubscribe(void } +SWIGEXPORT void * SWIGSTDCALL CSharp_new_ProxyAudioConsumer() { + void * jresult ; + ProxyAudioConsumer *result = 0 ; + + result = (ProxyAudioConsumer *)new SwigDirector_ProxyAudioConsumer(); + jresult = (void *)result; + return jresult; +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_delete_ProxyAudioConsumer(void * jarg1) { + ProxyAudioConsumer *arg1 = (ProxyAudioConsumer *) 0 ; + + arg1 = (ProxyAudioConsumer *)jarg1; + delete arg1; +} + + +SWIGEXPORT int SWIGSTDCALL CSharp_ProxyAudioConsumer_prepare(void * jarg1, int jarg2, int jarg3, int jarg4) { + int jresult ; + ProxyAudioConsumer *arg1 = (ProxyAudioConsumer *) 0 ; + int arg2 ; + int arg3 ; + int arg4 ; + int result; + + arg1 = (ProxyAudioConsumer *)jarg1; + arg2 = (int)jarg2; + arg3 = (int)jarg3; + arg4 = (int)jarg4; + result = (int)(arg1)->prepare(arg2,arg3,arg4); + jresult = result; + return jresult; +} + + +SWIGEXPORT int SWIGSTDCALL CSharp_ProxyAudioConsumer_prepareSwigExplicitProxyAudioConsumer(void * jarg1, int jarg2, int jarg3, int jarg4) { + int jresult ; + ProxyAudioConsumer *arg1 = (ProxyAudioConsumer *) 0 ; + int arg2 ; + int arg3 ; + int arg4 ; + int result; + + arg1 = (ProxyAudioConsumer *)jarg1; + arg2 = (int)jarg2; + arg3 = (int)jarg3; + arg4 = (int)jarg4; + result = (int)(arg1)->ProxyAudioConsumer::prepare(arg2,arg3,arg4); + jresult = result; + return jresult; +} + + +SWIGEXPORT int SWIGSTDCALL CSharp_ProxyAudioConsumer_start(void * jarg1) { + int jresult ; + ProxyAudioConsumer *arg1 = (ProxyAudioConsumer *) 0 ; + int result; + + arg1 = (ProxyAudioConsumer *)jarg1; + result = (int)(arg1)->start(); + jresult = result; + return jresult; +} + + +SWIGEXPORT int SWIGSTDCALL CSharp_ProxyAudioConsumer_startSwigExplicitProxyAudioConsumer(void * jarg1) { + int jresult ; + ProxyAudioConsumer *arg1 = (ProxyAudioConsumer *) 0 ; + int result; + + arg1 = (ProxyAudioConsumer *)jarg1; + result = (int)(arg1)->ProxyAudioConsumer::start(); + jresult = result; + return jresult; +} + + +SWIGEXPORT int SWIGSTDCALL CSharp_ProxyAudioConsumer_pause(void * jarg1) { + int jresult ; + ProxyAudioConsumer *arg1 = (ProxyAudioConsumer *) 0 ; + int result; + + arg1 = (ProxyAudioConsumer *)jarg1; + result = (int)(arg1)->pause(); + jresult = result; + return jresult; +} + + +SWIGEXPORT int SWIGSTDCALL CSharp_ProxyAudioConsumer_pauseSwigExplicitProxyAudioConsumer(void * jarg1) { + int jresult ; + ProxyAudioConsumer *arg1 = (ProxyAudioConsumer *) 0 ; + int result; + + arg1 = (ProxyAudioConsumer *)jarg1; + result = (int)(arg1)->ProxyAudioConsumer::pause(); + jresult = result; + return jresult; +} + + +SWIGEXPORT int SWIGSTDCALL CSharp_ProxyAudioConsumer_stop(void * jarg1) { + int jresult ; + ProxyAudioConsumer *arg1 = (ProxyAudioConsumer *) 0 ; + int result; + + arg1 = (ProxyAudioConsumer *)jarg1; + result = (int)(arg1)->stop(); + jresult = result; + return jresult; +} + + +SWIGEXPORT int SWIGSTDCALL CSharp_ProxyAudioConsumer_stopSwigExplicitProxyAudioConsumer(void * jarg1) { + int jresult ; + ProxyAudioConsumer *arg1 = (ProxyAudioConsumer *) 0 ; + int result; + + arg1 = (ProxyAudioConsumer *)jarg1; + result = (int)(arg1)->ProxyAudioConsumer::stop(); + jresult = result; + return jresult; +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_ProxyAudioConsumer_setActivate(void * jarg1) { + ProxyAudioConsumer *arg1 = (ProxyAudioConsumer *) 0 ; + + arg1 = (ProxyAudioConsumer *)jarg1; + (arg1)->setActivate(); +} + + +SWIGEXPORT unsigned int SWIGSTDCALL CSharp_ProxyAudioConsumer_pull(void * jarg1, void * jarg2, unsigned int jarg3) { + unsigned int jresult ; + ProxyAudioConsumer *arg1 = (ProxyAudioConsumer *) 0 ; + void *arg2 = (void *) 0 ; + unsigned int arg3 ; + unsigned int result; + + arg1 = (ProxyAudioConsumer *)jarg1; + arg2 = jarg2; + arg3 = (unsigned int)jarg3; + result = (unsigned int)(arg1)->pull(arg2,arg3); + jresult = result; + return jresult; +} + + +SWIGEXPORT unsigned int SWIGSTDCALL CSharp_ProxyAudioConsumer_registerPlugin() { + unsigned int jresult ; + bool result; + + result = (bool)ProxyAudioConsumer::registerPlugin(); + jresult = result; + return jresult; +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_ProxyAudioConsumer_director_connect(void *objarg, SwigDirector_ProxyAudioConsumer::SWIG_Callback0_t callback0, SwigDirector_ProxyAudioConsumer::SWIG_Callback1_t callback1, SwigDirector_ProxyAudioConsumer::SWIG_Callback2_t callback2, SwigDirector_ProxyAudioConsumer::SWIG_Callback3_t callback3) { + ProxyAudioConsumer *obj = (ProxyAudioConsumer *)objarg; + SwigDirector_ProxyAudioConsumer *director = dynamic_cast(obj); + if (director) { + director->swig_connect_director(callback0, callback1, callback2, callback3); + } +} + + +SWIGEXPORT void * SWIGSTDCALL CSharp_new_ProxyAudioProducer() { + void * jresult ; + ProxyAudioProducer *result = 0 ; + + result = (ProxyAudioProducer *)new SwigDirector_ProxyAudioProducer(); + jresult = (void *)result; + return jresult; +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_delete_ProxyAudioProducer(void * jarg1) { + ProxyAudioProducer *arg1 = (ProxyAudioProducer *) 0 ; + + arg1 = (ProxyAudioProducer *)jarg1; + delete arg1; +} + + +SWIGEXPORT int SWIGSTDCALL CSharp_ProxyAudioProducer_prepare(void * jarg1, int jarg2, int jarg3, int jarg4) { + int jresult ; + ProxyAudioProducer *arg1 = (ProxyAudioProducer *) 0 ; + int arg2 ; + int arg3 ; + int arg4 ; + int result; + + arg1 = (ProxyAudioProducer *)jarg1; + arg2 = (int)jarg2; + arg3 = (int)jarg3; + arg4 = (int)jarg4; + result = (int)(arg1)->prepare(arg2,arg3,arg4); + jresult = result; + return jresult; +} + + +SWIGEXPORT int SWIGSTDCALL CSharp_ProxyAudioProducer_prepareSwigExplicitProxyAudioProducer(void * jarg1, int jarg2, int jarg3, int jarg4) { + int jresult ; + ProxyAudioProducer *arg1 = (ProxyAudioProducer *) 0 ; + int arg2 ; + int arg3 ; + int arg4 ; + int result; + + arg1 = (ProxyAudioProducer *)jarg1; + arg2 = (int)jarg2; + arg3 = (int)jarg3; + arg4 = (int)jarg4; + result = (int)(arg1)->ProxyAudioProducer::prepare(arg2,arg3,arg4); + jresult = result; + return jresult; +} + + +SWIGEXPORT int SWIGSTDCALL CSharp_ProxyAudioProducer_start(void * jarg1) { + int jresult ; + ProxyAudioProducer *arg1 = (ProxyAudioProducer *) 0 ; + int result; + + arg1 = (ProxyAudioProducer *)jarg1; + result = (int)(arg1)->start(); + jresult = result; + return jresult; +} + + +SWIGEXPORT int SWIGSTDCALL CSharp_ProxyAudioProducer_startSwigExplicitProxyAudioProducer(void * jarg1) { + int jresult ; + ProxyAudioProducer *arg1 = (ProxyAudioProducer *) 0 ; + int result; + + arg1 = (ProxyAudioProducer *)jarg1; + result = (int)(arg1)->ProxyAudioProducer::start(); + jresult = result; + return jresult; +} + + +SWIGEXPORT int SWIGSTDCALL CSharp_ProxyAudioProducer_pause(void * jarg1) { + int jresult ; + ProxyAudioProducer *arg1 = (ProxyAudioProducer *) 0 ; + int result; + + arg1 = (ProxyAudioProducer *)jarg1; + result = (int)(arg1)->pause(); + jresult = result; + return jresult; +} + + +SWIGEXPORT int SWIGSTDCALL CSharp_ProxyAudioProducer_pauseSwigExplicitProxyAudioProducer(void * jarg1) { + int jresult ; + ProxyAudioProducer *arg1 = (ProxyAudioProducer *) 0 ; + int result; + + arg1 = (ProxyAudioProducer *)jarg1; + result = (int)(arg1)->ProxyAudioProducer::pause(); + jresult = result; + return jresult; +} + + +SWIGEXPORT int SWIGSTDCALL CSharp_ProxyAudioProducer_stop(void * jarg1) { + int jresult ; + ProxyAudioProducer *arg1 = (ProxyAudioProducer *) 0 ; + int result; + + arg1 = (ProxyAudioProducer *)jarg1; + result = (int)(arg1)->stop(); + jresult = result; + return jresult; +} + + +SWIGEXPORT int SWIGSTDCALL CSharp_ProxyAudioProducer_stopSwigExplicitProxyAudioProducer(void * jarg1) { + int jresult ; + ProxyAudioProducer *arg1 = (ProxyAudioProducer *) 0 ; + int result; + + arg1 = (ProxyAudioProducer *)jarg1; + result = (int)(arg1)->ProxyAudioProducer::stop(); + jresult = result; + return jresult; +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_ProxyAudioProducer_setActivate(void * jarg1) { + ProxyAudioProducer *arg1 = (ProxyAudioProducer *) 0 ; + + arg1 = (ProxyAudioProducer *)jarg1; + (arg1)->setActivate(); +} + + +SWIGEXPORT int SWIGSTDCALL CSharp_ProxyAudioProducer_push(void * jarg1, void * jarg2, unsigned int jarg3) { + int jresult ; + ProxyAudioProducer *arg1 = (ProxyAudioProducer *) 0 ; + void *arg2 = (void *) 0 ; + unsigned int arg3 ; + int result; + + arg1 = (ProxyAudioProducer *)jarg1; + arg2 = jarg2; + arg3 = (unsigned int)jarg3; + result = (int)(arg1)->push((void const *)arg2,arg3); + jresult = result; + return jresult; +} + + +SWIGEXPORT unsigned int SWIGSTDCALL CSharp_ProxyAudioProducer_registerPlugin() { + unsigned int jresult ; + bool result; + + result = (bool)ProxyAudioProducer::registerPlugin(); + jresult = result; + return jresult; +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_ProxyAudioProducer_director_connect(void *objarg, SwigDirector_ProxyAudioProducer::SWIG_Callback0_t callback0, SwigDirector_ProxyAudioProducer::SWIG_Callback1_t callback1, SwigDirector_ProxyAudioProducer::SWIG_Callback2_t callback2, SwigDirector_ProxyAudioProducer::SWIG_Callback3_t callback3) { + ProxyAudioProducer *obj = (ProxyAudioProducer *)objarg; + SwigDirector_ProxyAudioProducer *director = dynamic_cast(obj); + if (director) { + director->swig_connect_director(callback0, callback1, callback2, callback3); + } +} + + SWIGEXPORT void * SWIGSTDCALL CSharp_new_SipCallback() { void * jresult ; SipCallback *result = 0 ; @@ -2055,6 +2604,10 @@ SWIGEXPORT SipEvent * SWIGSTDCALL CSharp_SubscriptionEventUpcast(SubscriptionEve return (SipEvent *)objectRef; } +SWIGEXPORT SipSession * SWIGSTDCALL CSharp_CallSessionUpcast(CallSession *objectRef) { + return (SipSession *)objectRef; +} + SWIGEXPORT SipSession * SWIGSTDCALL CSharp_MessagingSessionUpcast(MessagingSession *objectRef) { return (SipSession *)objectRef; } diff --git a/trunk/bindings/csharp/tinyWRAP_wrap.h b/trunk/bindings/csharp/tinyWRAP_wrap.h index f0097444..de6a3d0b 100644 --- a/trunk/bindings/csharp/tinyWRAP_wrap.h +++ b/trunk/bindings/csharp/tinyWRAP_wrap.h @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make @@ -11,6 +11,54 @@ #ifndef SWIG_tinyWRAP_WRAP_H_ #define SWIG_tinyWRAP_WRAP_H_ +class SwigDirector_ProxyAudioConsumer : public ProxyAudioConsumer, public Swig::Director { + +public: + SwigDirector_ProxyAudioConsumer(); + virtual ~SwigDirector_ProxyAudioConsumer(); + virtual int prepare(int ptime, int rate, int channels); + virtual int start(); + virtual int pause(); + virtual int stop(); + + typedef int (SWIGSTDCALL* SWIG_Callback0_t)(int, int, int); + typedef int (SWIGSTDCALL* SWIG_Callback1_t)(); + typedef int (SWIGSTDCALL* SWIG_Callback2_t)(); + typedef int (SWIGSTDCALL* SWIG_Callback3_t)(); + void swig_connect_director(SWIG_Callback0_t callbackprepare, SWIG_Callback1_t callbackstart, SWIG_Callback2_t callbackpause, SWIG_Callback3_t callbackstop); + +private: + SWIG_Callback0_t swig_callbackprepare; + SWIG_Callback1_t swig_callbackstart; + SWIG_Callback2_t swig_callbackpause; + SWIG_Callback3_t swig_callbackstop; + void swig_init_callbacks(); +}; + +class SwigDirector_ProxyAudioProducer : public ProxyAudioProducer, public Swig::Director { + +public: + SwigDirector_ProxyAudioProducer(); + virtual ~SwigDirector_ProxyAudioProducer(); + virtual int prepare(int ptime, int rate, int channels); + virtual int start(); + virtual int pause(); + virtual int stop(); + + typedef int (SWIGSTDCALL* SWIG_Callback0_t)(int, int, int); + typedef int (SWIGSTDCALL* SWIG_Callback1_t)(); + typedef int (SWIGSTDCALL* SWIG_Callback2_t)(); + typedef int (SWIGSTDCALL* SWIG_Callback3_t)(); + void swig_connect_director(SWIG_Callback0_t callbackprepare, SWIG_Callback1_t callbackstart, SWIG_Callback2_t callbackpause, SWIG_Callback3_t callbackstop); + +private: + SWIG_Callback0_t swig_callbackprepare; + SWIG_Callback1_t swig_callbackstart; + SWIG_Callback2_t swig_callbackpause; + SWIG_Callback3_t swig_callbackstop; + void swig_init_callbacks(); +}; + class SwigDirector_SipCallback : public SipCallback, public Swig::Director { public: diff --git a/trunk/bindings/csharp/tsip_event_type_t.cs b/trunk/bindings/csharp/tsip_event_type_t.cs index 4074d78b..16321d11 100644 --- a/trunk/bindings/csharp/tsip_event_type_t.cs +++ b/trunk/bindings/csharp/tsip_event_type_t.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/trunk/bindings/csharp/tsip_message_event_type_t.cs b/trunk/bindings/csharp/tsip_message_event_type_t.cs index 8a5a2616..8ff95512 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.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/trunk/bindings/csharp/tsip_options_event_type_t.cs b/trunk/bindings/csharp/tsip_options_event_type_t.cs index 729e4690..56ff1a1f 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.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/trunk/bindings/csharp/tsip_publish_event_type_t.cs b/trunk/bindings/csharp/tsip_publish_event_type_t.cs index f6a4f588..cae8a599 100644 --- a/trunk/bindings/csharp/tsip_publish_event_type_t.cs +++ b/trunk/bindings/csharp/tsip_publish_event_type_t.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/trunk/bindings/csharp/tsip_register_event_type_t.cs b/trunk/bindings/csharp/tsip_register_event_type_t.cs index 56fb8c59..a8992b94 100644 --- a/trunk/bindings/csharp/tsip_register_event_type_t.cs +++ b/trunk/bindings/csharp/tsip_register_event_type_t.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/trunk/bindings/csharp/tsip_subscribe_event_type_t.cs b/trunk/bindings/csharp/tsip_subscribe_event_type_t.cs index ae9b16a3..a3b825f7 100644 --- a/trunk/bindings/csharp/tsip_subscribe_event_type_t.cs +++ b/trunk/bindings/csharp/tsip_subscribe_event_type_t.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/trunk/bindings/java/CallSession.java b/trunk/bindings/java/CallSession.java new file mode 100644 index 00000000..c7cb7679 --- /dev/null +++ b/trunk/bindings/java/CallSession.java @@ -0,0 +1,48 @@ +/* ---------------------------------------------------------------------------- + * 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 CallSession extends SipSession { + private long swigCPtr; + + protected CallSession(long cPtr, boolean cMemoryOwn) { + super(tinyWRAPJNI.SWIGCallSessionUpcast(cPtr), cMemoryOwn); + swigCPtr = cPtr; + } + + protected static long getCPtr(CallSession obj) { + return (obj == null) ? 0 : obj.swigCPtr; + } + + protected void finalize() { + delete(); + } + + public synchronized void delete() { + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_CallSession(swigCPtr); + } + swigCPtr = 0; + super.delete(); + } + + public CallSession(SipStack Stack) { + this(tinyWRAPJNI.new_CallSession(SipStack.getCPtr(Stack), Stack), true); + } + + public boolean Call(String remoteUri) { + return tinyWRAPJNI.CallSession_Call(swigCPtr, this, remoteUri); + } + + public boolean Hangup() { + return tinyWRAPJNI.CallSession_Hangup(swigCPtr, this); + } + +} diff --git a/trunk/bindings/java/DDebugCallback.java b/trunk/bindings/java/DDebugCallback.java index a5ee1a64..02b7abf4 100644 --- a/trunk/bindings/java/DDebugCallback.java +++ b/trunk/bindings/java/DDebugCallback.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -26,13 +26,11 @@ public class DDebugCallback { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_DDebugCallback(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_DDebugCallback(swigCPtr); } + swigCPtr = 0; } public DDebugCallback() { diff --git a/trunk/bindings/java/DialogEvent.java b/trunk/bindings/java/DialogEvent.java index 93ec1f60..ac409f64 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.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -25,13 +25,11 @@ public class DialogEvent extends SipEvent { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_DialogEvent(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_DialogEvent(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/trunk/bindings/java/MessagingEvent.java b/trunk/bindings/java/MessagingEvent.java index 041945eb..c502d313 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.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -25,13 +25,11 @@ public class MessagingEvent extends SipEvent { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_MessagingEvent(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_MessagingEvent(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/trunk/bindings/java/MessagingSession.java b/trunk/bindings/java/MessagingSession.java index 3b15b89b..577f18aa 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.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -25,13 +25,11 @@ public class MessagingSession extends SipSession { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_MessagingSession(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_MessagingSession(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/trunk/bindings/java/OptionsEvent.java b/trunk/bindings/java/OptionsEvent.java index aa6054f6..ca776844 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.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -25,13 +25,11 @@ public class OptionsEvent extends SipEvent { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_OptionsEvent(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_OptionsEvent(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/trunk/bindings/java/OptionsSession.java b/trunk/bindings/java/OptionsSession.java index f3c8041c..1a662e04 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.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -25,13 +25,11 @@ public class OptionsSession extends SipSession { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_OptionsSession(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_OptionsSession(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/trunk/bindings/java/ProxyAudioConsumer.java b/trunk/bindings/java/ProxyAudioConsumer.java new file mode 100644 index 00000000..4a71bc26 --- /dev/null +++ b/trunk/bindings/java/ProxyAudioConsumer.java @@ -0,0 +1,84 @@ +/* ---------------------------------------------------------------------------- + * 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 ProxyAudioConsumer { + private long swigCPtr; + protected boolean swigCMemOwn; + + protected ProxyAudioConsumer(long cPtr, boolean cMemoryOwn) { + swigCMemOwn = cMemoryOwn; + swigCPtr = cPtr; + } + + protected static long getCPtr(ProxyAudioConsumer obj) { + return (obj == null) ? 0 : obj.swigCPtr; + } + + protected void finalize() { + delete(); + } + + public synchronized void delete() { + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_ProxyAudioConsumer(swigCPtr); + } + swigCPtr = 0; + } + + protected void swigDirectorDisconnect() { + swigCMemOwn = false; + delete(); + } + + public void swigReleaseOwnership() { + swigCMemOwn = false; + tinyWRAPJNI.ProxyAudioConsumer_change_ownership(this, swigCPtr, false); + } + + public void swigTakeOwnership() { + swigCMemOwn = true; + tinyWRAPJNI.ProxyAudioConsumer_change_ownership(this, swigCPtr, true); + } + + public ProxyAudioConsumer() { + this(tinyWRAPJNI.new_ProxyAudioConsumer(), true); + tinyWRAPJNI.ProxyAudioConsumer_director_connect(this, swigCPtr, swigCMemOwn, true); + } + + public int prepare(int ptime, int rate, int channels) { + return (getClass() == ProxyAudioConsumer.class) ? tinyWRAPJNI.ProxyAudioConsumer_prepare(swigCPtr, this, ptime, rate, channels) : tinyWRAPJNI.ProxyAudioConsumer_prepareSwigExplicitProxyAudioConsumer(swigCPtr, this, ptime, rate, channels); + } + + public int start() { + return (getClass() == ProxyAudioConsumer.class) ? tinyWRAPJNI.ProxyAudioConsumer_start(swigCPtr, this) : tinyWRAPJNI.ProxyAudioConsumer_startSwigExplicitProxyAudioConsumer(swigCPtr, this); + } + + public int pause() { + return (getClass() == ProxyAudioConsumer.class) ? tinyWRAPJNI.ProxyAudioConsumer_pause(swigCPtr, this) : tinyWRAPJNI.ProxyAudioConsumer_pauseSwigExplicitProxyAudioConsumer(swigCPtr, this); + } + + public int stop() { + return (getClass() == ProxyAudioConsumer.class) ? tinyWRAPJNI.ProxyAudioConsumer_stop(swigCPtr, this) : tinyWRAPJNI.ProxyAudioConsumer_stopSwigExplicitProxyAudioConsumer(swigCPtr, this); + } + + public void setActivate() { + tinyWRAPJNI.ProxyAudioConsumer_setActivate(swigCPtr, this); + } + + public long pull(java.nio.ByteBuffer output, long size) { + return tinyWRAPJNI.ProxyAudioConsumer_pull(swigCPtr, this, output, size); + } + + public static boolean registerPlugin() { + return tinyWRAPJNI.ProxyAudioConsumer_registerPlugin(); + } + +} diff --git a/trunk/bindings/java/ProxyAudioProducer.java b/trunk/bindings/java/ProxyAudioProducer.java new file mode 100644 index 00000000..a198e9fe --- /dev/null +++ b/trunk/bindings/java/ProxyAudioProducer.java @@ -0,0 +1,84 @@ +/* ---------------------------------------------------------------------------- + * 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 ProxyAudioProducer { + private long swigCPtr; + protected boolean swigCMemOwn; + + protected ProxyAudioProducer(long cPtr, boolean cMemoryOwn) { + swigCMemOwn = cMemoryOwn; + swigCPtr = cPtr; + } + + protected static long getCPtr(ProxyAudioProducer obj) { + return (obj == null) ? 0 : obj.swigCPtr; + } + + protected void finalize() { + delete(); + } + + public synchronized void delete() { + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_ProxyAudioProducer(swigCPtr); + } + swigCPtr = 0; + } + + protected void swigDirectorDisconnect() { + swigCMemOwn = false; + delete(); + } + + public void swigReleaseOwnership() { + swigCMemOwn = false; + tinyWRAPJNI.ProxyAudioProducer_change_ownership(this, swigCPtr, false); + } + + public void swigTakeOwnership() { + swigCMemOwn = true; + tinyWRAPJNI.ProxyAudioProducer_change_ownership(this, swigCPtr, true); + } + + public ProxyAudioProducer() { + this(tinyWRAPJNI.new_ProxyAudioProducer(), true); + tinyWRAPJNI.ProxyAudioProducer_director_connect(this, swigCPtr, swigCMemOwn, true); + } + + public int prepare(int ptime, int rate, int channels) { + return (getClass() == ProxyAudioProducer.class) ? tinyWRAPJNI.ProxyAudioProducer_prepare(swigCPtr, this, ptime, rate, channels) : tinyWRAPJNI.ProxyAudioProducer_prepareSwigExplicitProxyAudioProducer(swigCPtr, this, ptime, rate, channels); + } + + public int start() { + return (getClass() == ProxyAudioProducer.class) ? tinyWRAPJNI.ProxyAudioProducer_start(swigCPtr, this) : tinyWRAPJNI.ProxyAudioProducer_startSwigExplicitProxyAudioProducer(swigCPtr, this); + } + + public int pause() { + return (getClass() == ProxyAudioProducer.class) ? tinyWRAPJNI.ProxyAudioProducer_pause(swigCPtr, this) : tinyWRAPJNI.ProxyAudioProducer_pauseSwigExplicitProxyAudioProducer(swigCPtr, this); + } + + public int stop() { + return (getClass() == ProxyAudioProducer.class) ? tinyWRAPJNI.ProxyAudioProducer_stop(swigCPtr, this) : tinyWRAPJNI.ProxyAudioProducer_stopSwigExplicitProxyAudioProducer(swigCPtr, this); + } + + public void setActivate() { + tinyWRAPJNI.ProxyAudioProducer_setActivate(swigCPtr, this); + } + + public int push(java.nio.ByteBuffer buffer, long size) { + return tinyWRAPJNI.ProxyAudioProducer_push(swigCPtr, this, buffer, size); + } + + public static boolean registerPlugin() { + return tinyWRAPJNI.ProxyAudioProducer_registerPlugin(); + } + +} diff --git a/trunk/bindings/java/PublicationEvent.java b/trunk/bindings/java/PublicationEvent.java index bfbe2ab9..88541683 100644 --- a/trunk/bindings/java/PublicationEvent.java +++ b/trunk/bindings/java/PublicationEvent.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -25,13 +25,11 @@ public class PublicationEvent extends SipEvent { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_PublicationEvent(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_PublicationEvent(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/trunk/bindings/java/PublicationSession.java b/trunk/bindings/java/PublicationSession.java index b1588380..ecc12876 100644 --- a/trunk/bindings/java/PublicationSession.java +++ b/trunk/bindings/java/PublicationSession.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -25,13 +25,11 @@ public class PublicationSession extends SipSession { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_PublicationSession(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_PublicationSession(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/trunk/bindings/java/RegistrationEvent.java b/trunk/bindings/java/RegistrationEvent.java index ac092053..921479aa 100644 --- a/trunk/bindings/java/RegistrationEvent.java +++ b/trunk/bindings/java/RegistrationEvent.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -25,13 +25,11 @@ public class RegistrationEvent extends SipEvent { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_RegistrationEvent(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_RegistrationEvent(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/trunk/bindings/java/RegistrationSession.java b/trunk/bindings/java/RegistrationSession.java index 77eb31f6..79a36e5f 100644 --- a/trunk/bindings/java/RegistrationSession.java +++ b/trunk/bindings/java/RegistrationSession.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -25,13 +25,11 @@ public class RegistrationSession extends SipSession { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_RegistrationSession(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_RegistrationSession(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/trunk/bindings/java/SafeObject.java b/trunk/bindings/java/SafeObject.java index bc54590b..4cef0759 100644 --- a/trunk/bindings/java/SafeObject.java +++ b/trunk/bindings/java/SafeObject.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -26,13 +26,11 @@ public class SafeObject { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SafeObject(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SafeObject(swigCPtr); } + swigCPtr = 0; } public SafeObject() { diff --git a/trunk/bindings/java/SipCallback.java b/trunk/bindings/java/SipCallback.java index 958b2515..36fe848b 100644 --- a/trunk/bindings/java/SipCallback.java +++ b/trunk/bindings/java/SipCallback.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -26,13 +26,11 @@ public class SipCallback { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SipCallback(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SipCallback(swigCPtr); } + swigCPtr = 0; } protected void swigDirectorDisconnect() { diff --git a/trunk/bindings/java/SipEvent.java b/trunk/bindings/java/SipEvent.java index e446bf63..48cab3a9 100644 --- a/trunk/bindings/java/SipEvent.java +++ b/trunk/bindings/java/SipEvent.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -26,13 +26,11 @@ public class SipEvent { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SipEvent(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SipEvent(swigCPtr); } + swigCPtr = 0; } public short getCode() { diff --git a/trunk/bindings/java/SipMessage.java b/trunk/bindings/java/SipMessage.java index 36a9f812..29cea744 100644 --- a/trunk/bindings/java/SipMessage.java +++ b/trunk/bindings/java/SipMessage.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -26,13 +26,11 @@ public class SipMessage { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SipMessage(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SipMessage(swigCPtr); } + swigCPtr = 0; } public byte[] getSipContent() { diff --git a/trunk/bindings/java/SipSession.java b/trunk/bindings/java/SipSession.java index 31784d11..c9f7e433 100644 --- a/trunk/bindings/java/SipSession.java +++ b/trunk/bindings/java/SipSession.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -26,13 +26,11 @@ public class SipSession { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SipSession(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SipSession(swigCPtr); } + swigCPtr = 0; } protected java.nio.ByteBuffer getByteBuffer(byte[] bytes) { diff --git a/trunk/bindings/java/SipStack.java b/trunk/bindings/java/SipStack.java index c7e3cb0a..998a1d72 100644 --- a/trunk/bindings/java/SipStack.java +++ b/trunk/bindings/java/SipStack.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -25,13 +25,11 @@ public class SipStack extends SafeObject { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SipStack(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SipStack(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/trunk/bindings/java/SipUri.java b/trunk/bindings/java/SipUri.java index a97a40de..81dc1aae 100644 --- a/trunk/bindings/java/SipUri.java +++ b/trunk/bindings/java/SipUri.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -26,13 +26,11 @@ public class SipUri { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SipUri(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SipUri(swigCPtr); } + swigCPtr = 0; } public SipUri(String arg0) { diff --git a/trunk/bindings/java/StackEvent.java b/trunk/bindings/java/StackEvent.java index fb27e804..ee0ba843 100644 --- a/trunk/bindings/java/StackEvent.java +++ b/trunk/bindings/java/StackEvent.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -25,13 +25,11 @@ public class StackEvent extends SipEvent { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_StackEvent(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && 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 8112ee5a..03d6345c 100644 --- a/trunk/bindings/java/SubscriptionEvent.java +++ b/trunk/bindings/java/SubscriptionEvent.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -25,13 +25,11 @@ public class SubscriptionEvent extends SipEvent { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SubscriptionEvent(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SubscriptionEvent(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/trunk/bindings/java/SubscriptionSession.java b/trunk/bindings/java/SubscriptionSession.java index 481c140d..64111e8e 100644 --- a/trunk/bindings/java/SubscriptionSession.java +++ b/trunk/bindings/java/SubscriptionSession.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -25,13 +25,11 @@ public class SubscriptionSession extends SipSession { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SubscriptionSession(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SubscriptionSession(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/trunk/bindings/java/android/CallSession.java b/trunk/bindings/java/android/CallSession.java new file mode 100644 index 00000000..c7cb7679 --- /dev/null +++ b/trunk/bindings/java/android/CallSession.java @@ -0,0 +1,48 @@ +/* ---------------------------------------------------------------------------- + * 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 CallSession extends SipSession { + private long swigCPtr; + + protected CallSession(long cPtr, boolean cMemoryOwn) { + super(tinyWRAPJNI.SWIGCallSessionUpcast(cPtr), cMemoryOwn); + swigCPtr = cPtr; + } + + protected static long getCPtr(CallSession obj) { + return (obj == null) ? 0 : obj.swigCPtr; + } + + protected void finalize() { + delete(); + } + + public synchronized void delete() { + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_CallSession(swigCPtr); + } + swigCPtr = 0; + super.delete(); + } + + public CallSession(SipStack Stack) { + this(tinyWRAPJNI.new_CallSession(SipStack.getCPtr(Stack), Stack), true); + } + + public boolean Call(String remoteUri) { + return tinyWRAPJNI.CallSession_Call(swigCPtr, this, remoteUri); + } + + public boolean Hangup() { + return tinyWRAPJNI.CallSession_Hangup(swigCPtr, this); + } + +} diff --git a/trunk/bindings/java/android/DDebugCallback.java b/trunk/bindings/java/android/DDebugCallback.java index a5ee1a64..02b7abf4 100644 --- a/trunk/bindings/java/android/DDebugCallback.java +++ b/trunk/bindings/java/android/DDebugCallback.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -26,13 +26,11 @@ public class DDebugCallback { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_DDebugCallback(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_DDebugCallback(swigCPtr); } + swigCPtr = 0; } public DDebugCallback() { diff --git a/trunk/bindings/java/android/DialogEvent.java b/trunk/bindings/java/android/DialogEvent.java index 93ec1f60..ac409f64 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.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -25,13 +25,11 @@ public class DialogEvent extends SipEvent { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_DialogEvent(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_DialogEvent(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/trunk/bindings/java/android/MessagingEvent.java b/trunk/bindings/java/android/MessagingEvent.java index 041945eb..c502d313 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.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -25,13 +25,11 @@ public class MessagingEvent extends SipEvent { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_MessagingEvent(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_MessagingEvent(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/trunk/bindings/java/android/MessagingSession.java b/trunk/bindings/java/android/MessagingSession.java index 3b15b89b..577f18aa 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.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -25,13 +25,11 @@ public class MessagingSession extends SipSession { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_MessagingSession(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_MessagingSession(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/trunk/bindings/java/android/OptionsEvent.java b/trunk/bindings/java/android/OptionsEvent.java index aa6054f6..ca776844 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.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -25,13 +25,11 @@ public class OptionsEvent extends SipEvent { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_OptionsEvent(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_OptionsEvent(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/trunk/bindings/java/android/OptionsSession.java b/trunk/bindings/java/android/OptionsSession.java index f3c8041c..1a662e04 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.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -25,13 +25,11 @@ public class OptionsSession extends SipSession { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_OptionsSession(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_OptionsSession(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/trunk/bindings/java/android/ProxyAudioConsumer.java b/trunk/bindings/java/android/ProxyAudioConsumer.java new file mode 100644 index 00000000..a9fd9802 --- /dev/null +++ b/trunk/bindings/java/android/ProxyAudioConsumer.java @@ -0,0 +1,84 @@ +/* ---------------------------------------------------------------------------- + * 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 ProxyAudioConsumer { + private long swigCPtr; + protected boolean swigCMemOwn; + + protected ProxyAudioConsumer(long cPtr, boolean cMemoryOwn) { + swigCMemOwn = cMemoryOwn; + swigCPtr = cPtr; + } + + protected static long getCPtr(ProxyAudioConsumer obj) { + return (obj == null) ? 0 : obj.swigCPtr; + } + + protected void finalize() { + delete(); + } + + public synchronized void delete() { + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_ProxyAudioConsumer(swigCPtr); + } + swigCPtr = 0; + } + + protected void swigDirectorDisconnect() { + swigCMemOwn = false; + delete(); + } + + public void swigReleaseOwnership() { + swigCMemOwn = false; + tinyWRAPJNI.ProxyAudioConsumer_change_ownership(this, swigCPtr, false); + } + + public void swigTakeOwnership() { + swigCMemOwn = true; + tinyWRAPJNI.ProxyAudioConsumer_change_ownership(this, swigCPtr, true); + } + + public ProxyAudioConsumer() { + this(tinyWRAPJNI.new_ProxyAudioConsumer(), true); + tinyWRAPJNI.ProxyAudioConsumer_director_connect(this, swigCPtr, swigCMemOwn, false); + } + + public int prepare(int ptime, int rate, int channels) { + return (getClass() == ProxyAudioConsumer.class) ? tinyWRAPJNI.ProxyAudioConsumer_prepare(swigCPtr, this, ptime, rate, channels) : tinyWRAPJNI.ProxyAudioConsumer_prepareSwigExplicitProxyAudioConsumer(swigCPtr, this, ptime, rate, channels); + } + + public int start() { + return (getClass() == ProxyAudioConsumer.class) ? tinyWRAPJNI.ProxyAudioConsumer_start(swigCPtr, this) : tinyWRAPJNI.ProxyAudioConsumer_startSwigExplicitProxyAudioConsumer(swigCPtr, this); + } + + public int pause() { + return (getClass() == ProxyAudioConsumer.class) ? tinyWRAPJNI.ProxyAudioConsumer_pause(swigCPtr, this) : tinyWRAPJNI.ProxyAudioConsumer_pauseSwigExplicitProxyAudioConsumer(swigCPtr, this); + } + + public int stop() { + return (getClass() == ProxyAudioConsumer.class) ? tinyWRAPJNI.ProxyAudioConsumer_stop(swigCPtr, this) : tinyWRAPJNI.ProxyAudioConsumer_stopSwigExplicitProxyAudioConsumer(swigCPtr, this); + } + + public void setActivate() { + tinyWRAPJNI.ProxyAudioConsumer_setActivate(swigCPtr, this); + } + + public long pull(java.nio.ByteBuffer output, long size) { + return tinyWRAPJNI.ProxyAudioConsumer_pull(swigCPtr, this, output, size); + } + + public static boolean registerPlugin() { + return tinyWRAPJNI.ProxyAudioConsumer_registerPlugin(); + } + +} diff --git a/trunk/bindings/java/android/ProxyAudioProducer.java b/trunk/bindings/java/android/ProxyAudioProducer.java new file mode 100644 index 00000000..16b28953 --- /dev/null +++ b/trunk/bindings/java/android/ProxyAudioProducer.java @@ -0,0 +1,84 @@ +/* ---------------------------------------------------------------------------- + * 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 ProxyAudioProducer { + private long swigCPtr; + protected boolean swigCMemOwn; + + protected ProxyAudioProducer(long cPtr, boolean cMemoryOwn) { + swigCMemOwn = cMemoryOwn; + swigCPtr = cPtr; + } + + protected static long getCPtr(ProxyAudioProducer obj) { + return (obj == null) ? 0 : obj.swigCPtr; + } + + protected void finalize() { + delete(); + } + + public synchronized void delete() { + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_ProxyAudioProducer(swigCPtr); + } + swigCPtr = 0; + } + + protected void swigDirectorDisconnect() { + swigCMemOwn = false; + delete(); + } + + public void swigReleaseOwnership() { + swigCMemOwn = false; + tinyWRAPJNI.ProxyAudioProducer_change_ownership(this, swigCPtr, false); + } + + public void swigTakeOwnership() { + swigCMemOwn = true; + tinyWRAPJNI.ProxyAudioProducer_change_ownership(this, swigCPtr, true); + } + + public ProxyAudioProducer() { + this(tinyWRAPJNI.new_ProxyAudioProducer(), true); + tinyWRAPJNI.ProxyAudioProducer_director_connect(this, swigCPtr, swigCMemOwn, false); + } + + public int prepare(int ptime, int rate, int channels) { + return (getClass() == ProxyAudioProducer.class) ? tinyWRAPJNI.ProxyAudioProducer_prepare(swigCPtr, this, ptime, rate, channels) : tinyWRAPJNI.ProxyAudioProducer_prepareSwigExplicitProxyAudioProducer(swigCPtr, this, ptime, rate, channels); + } + + public int start() { + return (getClass() == ProxyAudioProducer.class) ? tinyWRAPJNI.ProxyAudioProducer_start(swigCPtr, this) : tinyWRAPJNI.ProxyAudioProducer_startSwigExplicitProxyAudioProducer(swigCPtr, this); + } + + public int pause() { + return (getClass() == ProxyAudioProducer.class) ? tinyWRAPJNI.ProxyAudioProducer_pause(swigCPtr, this) : tinyWRAPJNI.ProxyAudioProducer_pauseSwigExplicitProxyAudioProducer(swigCPtr, this); + } + + public int stop() { + return (getClass() == ProxyAudioProducer.class) ? tinyWRAPJNI.ProxyAudioProducer_stop(swigCPtr, this) : tinyWRAPJNI.ProxyAudioProducer_stopSwigExplicitProxyAudioProducer(swigCPtr, this); + } + + public void setActivate() { + tinyWRAPJNI.ProxyAudioProducer_setActivate(swigCPtr, this); + } + + public int push(java.nio.ByteBuffer buffer, long size) { + return tinyWRAPJNI.ProxyAudioProducer_push(swigCPtr, this, buffer, size); + } + + public static boolean registerPlugin() { + return tinyWRAPJNI.ProxyAudioProducer_registerPlugin(); + } + +} diff --git a/trunk/bindings/java/android/PublicationEvent.java b/trunk/bindings/java/android/PublicationEvent.java index bfbe2ab9..88541683 100644 --- a/trunk/bindings/java/android/PublicationEvent.java +++ b/trunk/bindings/java/android/PublicationEvent.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -25,13 +25,11 @@ public class PublicationEvent extends SipEvent { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_PublicationEvent(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_PublicationEvent(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/trunk/bindings/java/android/PublicationSession.java b/trunk/bindings/java/android/PublicationSession.java index b1588380..ecc12876 100644 --- a/trunk/bindings/java/android/PublicationSession.java +++ b/trunk/bindings/java/android/PublicationSession.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -25,13 +25,11 @@ public class PublicationSession extends SipSession { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_PublicationSession(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_PublicationSession(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/trunk/bindings/java/android/RegistrationEvent.java b/trunk/bindings/java/android/RegistrationEvent.java index ac092053..921479aa 100644 --- a/trunk/bindings/java/android/RegistrationEvent.java +++ b/trunk/bindings/java/android/RegistrationEvent.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -25,13 +25,11 @@ public class RegistrationEvent extends SipEvent { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_RegistrationEvent(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_RegistrationEvent(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/trunk/bindings/java/android/RegistrationSession.java b/trunk/bindings/java/android/RegistrationSession.java index 77eb31f6..79a36e5f 100644 --- a/trunk/bindings/java/android/RegistrationSession.java +++ b/trunk/bindings/java/android/RegistrationSession.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -25,13 +25,11 @@ public class RegistrationSession extends SipSession { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_RegistrationSession(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_RegistrationSession(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/trunk/bindings/java/android/SafeObject.java b/trunk/bindings/java/android/SafeObject.java index bc54590b..4cef0759 100644 --- a/trunk/bindings/java/android/SafeObject.java +++ b/trunk/bindings/java/android/SafeObject.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -26,13 +26,11 @@ public class SafeObject { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SafeObject(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SafeObject(swigCPtr); } + swigCPtr = 0; } public SafeObject() { diff --git a/trunk/bindings/java/android/SipCallback.java b/trunk/bindings/java/android/SipCallback.java index aeb42efa..bd8c3b13 100644 --- a/trunk/bindings/java/android/SipCallback.java +++ b/trunk/bindings/java/android/SipCallback.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -26,13 +26,11 @@ public class SipCallback { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SipCallback(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SipCallback(swigCPtr); } + swigCPtr = 0; } protected void swigDirectorDisconnect() { diff --git a/trunk/bindings/java/android/SipEvent.java b/trunk/bindings/java/android/SipEvent.java index e446bf63..48cab3a9 100644 --- a/trunk/bindings/java/android/SipEvent.java +++ b/trunk/bindings/java/android/SipEvent.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -26,13 +26,11 @@ public class SipEvent { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SipEvent(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SipEvent(swigCPtr); } + swigCPtr = 0; } public short getCode() { diff --git a/trunk/bindings/java/android/SipMessage.java b/trunk/bindings/java/android/SipMessage.java index 36a9f812..29cea744 100644 --- a/trunk/bindings/java/android/SipMessage.java +++ b/trunk/bindings/java/android/SipMessage.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -26,13 +26,11 @@ public class SipMessage { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SipMessage(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SipMessage(swigCPtr); } + swigCPtr = 0; } public byte[] getSipContent() { diff --git a/trunk/bindings/java/android/SipSession.java b/trunk/bindings/java/android/SipSession.java index 31784d11..c9f7e433 100644 --- a/trunk/bindings/java/android/SipSession.java +++ b/trunk/bindings/java/android/SipSession.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -26,13 +26,11 @@ public class SipSession { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SipSession(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SipSession(swigCPtr); } + swigCPtr = 0; } protected java.nio.ByteBuffer getByteBuffer(byte[] bytes) { diff --git a/trunk/bindings/java/android/SipStack.java b/trunk/bindings/java/android/SipStack.java index c7e3cb0a..998a1d72 100644 --- a/trunk/bindings/java/android/SipStack.java +++ b/trunk/bindings/java/android/SipStack.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -25,13 +25,11 @@ public class SipStack extends SafeObject { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SipStack(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SipStack(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/trunk/bindings/java/android/SipUri.java b/trunk/bindings/java/android/SipUri.java index a97a40de..81dc1aae 100644 --- a/trunk/bindings/java/android/SipUri.java +++ b/trunk/bindings/java/android/SipUri.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -26,13 +26,11 @@ public class SipUri { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SipUri(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SipUri(swigCPtr); } + swigCPtr = 0; } public SipUri(String arg0) { diff --git a/trunk/bindings/java/android/StackEvent.java b/trunk/bindings/java/android/StackEvent.java index fb27e804..ee0ba843 100644 --- a/trunk/bindings/java/android/StackEvent.java +++ b/trunk/bindings/java/android/StackEvent.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -25,13 +25,11 @@ public class StackEvent extends SipEvent { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_StackEvent(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && 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 8112ee5a..03d6345c 100644 --- a/trunk/bindings/java/android/SubscriptionEvent.java +++ b/trunk/bindings/java/android/SubscriptionEvent.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -25,13 +25,11 @@ public class SubscriptionEvent extends SipEvent { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SubscriptionEvent(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SubscriptionEvent(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/trunk/bindings/java/android/SubscriptionSession.java b/trunk/bindings/java/android/SubscriptionSession.java index 481c140d..64111e8e 100644 --- a/trunk/bindings/java/android/SubscriptionSession.java +++ b/trunk/bindings/java/android/SubscriptionSession.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -25,13 +25,11 @@ public class SubscriptionSession extends SipSession { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SubscriptionSession(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SubscriptionSession(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/trunk/bindings/java/android/buildAll.sh b/trunk/bindings/java/android/buildAll.sh index 3e50473f..1c3e6469 100644 --- a/trunk/bindings/java/android/buildAll.sh +++ b/trunk/bindings/java/android/buildAll.sh @@ -3,7 +3,7 @@ #export CFLAGS="-Os" -for project in tinySAK tinyNET tinyIPSec tinySMS tinyHTTP tinySDP tinyMEDIA tinySIP +for project in tinySAK tinyNET tinyIPSec tinySMS tinyHTTP tinySIGCOMP tinySDP tinyRTP tinyMEDIA tinyDAV tinySIP do echo -e building "$project....\n" make PROJECT=$project clean diff --git a/trunk/bindings/java/android/droid-makefile b/trunk/bindings/java/android/droid-makefile index 308e4f4a..e728b312 100644 --- a/trunk/bindings/java/android/droid-makefile +++ b/trunk/bindings/java/android/droid-makefile @@ -1,7 +1,10 @@ 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++ -llog -ltinySAK -ltinyHTTP -ltinyIPSec -ltinyNET -ltinySIP +CFLAGS := $(CFLAGS_LIB) -fno-rtti -fno-exceptions -I../../_common -I../../. -I../../../tinySAK/src -I../../../tinyNET/src -I../../../tinyHTTP/include \ + -I../../../tinySDP/include -I../../../tinyMEDIA/include -I../../../tinyDAV/include -I../../../tinySIP/include + +# Because of the static build, you need all librarires +LDFLAGS := $(LDFLAGS_LIB) -lstdc++ -llog -ltinySAK -ltinyHTTP -ltinyIPSec -ltinySIGCOMP -ltinyNET -ltinySDP -ltinyRTP -ltinyMEDIA -ltinyDAV -ltinySIP -lm @@ -9,6 +12,8 @@ all: $(APP) OBJS = tinyWRAP_wrap.o\ ../../_common/DDebug.o \ + ../../_common/ProxyConsumer.o \ + ../../_common/ProxyProducer.o \ ../../_common/SafeObject.o \ ../../_common/SipCallback.o \ ../../_common/SipEvent.o \ diff --git a/trunk/bindings/java/android/tinyWRAP.java b/trunk/bindings/java/android/tinyWRAP.java index 9b29ff1c..d10c59ad 100644 --- a/trunk/bindings/java/android/tinyWRAP.java +++ b/trunk/bindings/java/android/tinyWRAP.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/trunk/bindings/java/android/tinyWRAPConstants.java b/trunk/bindings/java/android/tinyWRAPConstants.java index 673ed5c0..ae496b70 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.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/trunk/bindings/java/android/tinyWRAPJNI.java b/trunk/bindings/java/android/tinyWRAPJNI.java index 9b27d72b..dfa17b92 100644 --- a/trunk/bindings/java/android/tinyWRAPJNI.java +++ b/trunk/bindings/java/android/tinyWRAPJNI.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -63,6 +63,10 @@ class tinyWRAPJNI { public final static native boolean SipSession_setToUri(long jarg1, SipSession jarg1_, String jarg2); public final static native boolean SipSession_setSilentHangup(long jarg1, SipSession jarg1_, boolean jarg2); public final static native long SipSession_getId(long jarg1, SipSession jarg1_); + public final static native long new_CallSession(long jarg1, SipStack jarg1_); + public final static native void delete_CallSession(long jarg1); + public final static native boolean CallSession_Call(long jarg1, CallSession jarg1_, String jarg2); + public final static native boolean CallSession_Hangup(long jarg1, CallSession jarg1_); public final static native long new_MessagingSession(long jarg1, SipStack jarg1_); public final static native void delete_MessagingSession(long jarg1); public final static native boolean MessagingSession_Send(long jarg1, MessagingSession jarg1_, java.nio.ByteBuffer jarg2, long jarg3); @@ -83,6 +87,36 @@ class tinyWRAPJNI { public final static native void delete_SubscriptionSession(long jarg1); public final static native boolean SubscriptionSession_Subscribe(long jarg1, SubscriptionSession jarg1_); public final static native boolean SubscriptionSession_UnSubscribe(long jarg1, SubscriptionSession jarg1_); + public final static native long new_ProxyAudioConsumer(); + public final static native void delete_ProxyAudioConsumer(long jarg1); + public final static native int ProxyAudioConsumer_prepare(long jarg1, ProxyAudioConsumer jarg1_, int jarg2, int jarg3, int jarg4); + public final static native int ProxyAudioConsumer_prepareSwigExplicitProxyAudioConsumer(long jarg1, ProxyAudioConsumer jarg1_, int jarg2, int jarg3, int jarg4); + public final static native int ProxyAudioConsumer_start(long jarg1, ProxyAudioConsumer jarg1_); + public final static native int ProxyAudioConsumer_startSwigExplicitProxyAudioConsumer(long jarg1, ProxyAudioConsumer jarg1_); + public final static native int ProxyAudioConsumer_pause(long jarg1, ProxyAudioConsumer jarg1_); + public final static native int ProxyAudioConsumer_pauseSwigExplicitProxyAudioConsumer(long jarg1, ProxyAudioConsumer jarg1_); + public final static native int ProxyAudioConsumer_stop(long jarg1, ProxyAudioConsumer jarg1_); + public final static native int ProxyAudioConsumer_stopSwigExplicitProxyAudioConsumer(long jarg1, ProxyAudioConsumer jarg1_); + public final static native void ProxyAudioConsumer_setActivate(long jarg1, ProxyAudioConsumer jarg1_); + public final static native long ProxyAudioConsumer_pull(long jarg1, ProxyAudioConsumer jarg1_, java.nio.ByteBuffer jarg2, long jarg3); + public final static native boolean ProxyAudioConsumer_registerPlugin(); + public final static native void ProxyAudioConsumer_director_connect(ProxyAudioConsumer obj, long cptr, boolean mem_own, boolean weak_global); + public final static native void ProxyAudioConsumer_change_ownership(ProxyAudioConsumer obj, long cptr, boolean take_or_release); + public final static native long new_ProxyAudioProducer(); + public final static native void delete_ProxyAudioProducer(long jarg1); + public final static native int ProxyAudioProducer_prepare(long jarg1, ProxyAudioProducer jarg1_, int jarg2, int jarg3, int jarg4); + public final static native int ProxyAudioProducer_prepareSwigExplicitProxyAudioProducer(long jarg1, ProxyAudioProducer jarg1_, int jarg2, int jarg3, int jarg4); + public final static native int ProxyAudioProducer_start(long jarg1, ProxyAudioProducer jarg1_); + public final static native int ProxyAudioProducer_startSwigExplicitProxyAudioProducer(long jarg1, ProxyAudioProducer jarg1_); + public final static native int ProxyAudioProducer_pause(long jarg1, ProxyAudioProducer jarg1_); + public final static native int ProxyAudioProducer_pauseSwigExplicitProxyAudioProducer(long jarg1, ProxyAudioProducer jarg1_); + public final static native int ProxyAudioProducer_stop(long jarg1, ProxyAudioProducer jarg1_); + public final static native int ProxyAudioProducer_stopSwigExplicitProxyAudioProducer(long jarg1, ProxyAudioProducer jarg1_); + public final static native void ProxyAudioProducer_setActivate(long jarg1, ProxyAudioProducer jarg1_); + public final static native int ProxyAudioProducer_push(long jarg1, ProxyAudioProducer jarg1_, java.nio.ByteBuffer jarg2, long jarg3); + public final static native boolean ProxyAudioProducer_registerPlugin(); + public final static native void ProxyAudioProducer_director_connect(ProxyAudioProducer obj, long cptr, boolean mem_own, boolean weak_global); + public final static native void ProxyAudioProducer_change_ownership(ProxyAudioProducer obj, long cptr, boolean take_or_release); public final static native long new_SipCallback(); public final static native void delete_SipCallback(long jarg1); public final static native int SipCallback_OnDialogEvent(long jarg1, SipCallback jarg1_, long jarg2, DialogEvent jarg2_); @@ -130,6 +164,7 @@ class tinyWRAPJNI { public final static native long SWIGPublicationEventUpcast(long jarg1); public final static native long SWIGRegistrationEventUpcast(long jarg1); public final static native long SWIGSubscriptionEventUpcast(long jarg1); + public final static native long SWIGCallSessionUpcast(long jarg1); public final static native long SWIGMessagingSessionUpcast(long jarg1); public final static native long SWIGOptionsSessionUpcast(long jarg1); public final static native long SWIGPublicationSessionUpcast(long jarg1); @@ -137,6 +172,30 @@ class tinyWRAPJNI { public final static native long SWIGSubscriptionSessionUpcast(long jarg1); public final static native long SWIGSipStackUpcast(long jarg1); + public static int SwigDirector_ProxyAudioConsumer_prepare(ProxyAudioConsumer self, int ptime, int rate, int channels) { + return self.prepare(ptime, rate, channels); + } + public static int SwigDirector_ProxyAudioConsumer_start(ProxyAudioConsumer self) { + return self.start(); + } + public static int SwigDirector_ProxyAudioConsumer_pause(ProxyAudioConsumer self) { + return self.pause(); + } + public static int SwigDirector_ProxyAudioConsumer_stop(ProxyAudioConsumer self) { + return self.stop(); + } + public static int SwigDirector_ProxyAudioProducer_prepare(ProxyAudioProducer self, int ptime, int rate, int channels) { + return self.prepare(ptime, rate, channels); + } + public static int SwigDirector_ProxyAudioProducer_start(ProxyAudioProducer self) { + return self.start(); + } + public static int SwigDirector_ProxyAudioProducer_pause(ProxyAudioProducer self) { + return self.pause(); + } + public static int SwigDirector_ProxyAudioProducer_stop(ProxyAudioProducer self) { + return self.stop(); + } public static int SwigDirector_SipCallback_OnDialogEvent(SipCallback self, long e) { return self.OnDialogEvent((e == 0) ? null : new DialogEvent(e, false)); } diff --git a/trunk/bindings/java/android/tinyWRAP_wrap.cxx b/trunk/bindings/java/android/tinyWRAP_wrap.cxx index 06eaa0e9..76157cae 100644 --- a/trunk/bindings/java/android/tinyWRAP_wrap.cxx +++ b/trunk/bindings/java/android/tinyWRAP_wrap.cxx @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make @@ -193,8 +193,7 @@ static void SWIGUNUSED SWIG_JavaThrowException(JNIEnv *jenv, SWIG_JavaExceptionC { SWIG_JavaNullPointerException, "java/lang/NullPointerException" }, { SWIG_JavaDirectorPureVirtual, "java/lang/RuntimeException" }, { SWIG_JavaUnknownError, "java/lang/UnknownError" }, - { (SWIG_JavaExceptionCodes)0, "java/lang/UnknownError" } - }; + { (SWIG_JavaExceptionCodes)0, "java/lang/UnknownError" } }; const SWIG_JavaExceptions_t *except_ptr = java_exceptions; while (except_ptr->code != code && except_ptr->code) @@ -404,7 +403,7 @@ namespace Swig { namespace Swig { static jclass jclass_tinyWRAPJNI = NULL; - static jmethodID director_methids[7]; + static jmethodID director_methids[15]; } #include "DDebug.h" @@ -415,6 +414,9 @@ namespace Swig { #include "SipEvent.h" #include "SipSession.h" +#include "ProxyConsumer.h" +#include "ProxyProducer.h" + #include "SipCallback.h" #include "SafeObject.h" #include "SipStack.h" @@ -427,6 +429,300 @@ namespace Swig { #include "tinyWRAP_wrap.h" +SwigDirector_ProxyAudioConsumer::SwigDirector_ProxyAudioConsumer(JNIEnv *jenv) : ProxyAudioConsumer(), Swig::Director(jenv) { +} + +SwigDirector_ProxyAudioConsumer::~SwigDirector_ProxyAudioConsumer() { + swig_disconnect_director_self("swigDirectorDisconnect"); +} + + +int SwigDirector_ProxyAudioConsumer::prepare(int ptime, int rate, int channels) { + int c_result = SwigValueInit< int >() ; + jint jresult = 0 ; + JNIEnvWrapper swigjnienv(this) ; + JNIEnv * jenv = swigjnienv.getJNIEnv() ; + jobject swigjobj = (jobject) NULL ; + jint jptime ; + jint jrate ; + jint jchannels ; + + if (!swig_override[0]) { + return ProxyAudioConsumer::prepare(ptime,rate,channels); + } + swigjobj = swig_get_self(jenv); + if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) { + jptime = (jint) ptime; + jrate = (jint) rate; + jchannels = (jint) channels; + jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[0], swigjobj, jptime, jrate, jchannels); + 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_ProxyAudioConsumer::start() { + int c_result = SwigValueInit< int >() ; + jint jresult = 0 ; + JNIEnvWrapper swigjnienv(this) ; + JNIEnv * jenv = swigjnienv.getJNIEnv() ; + jobject swigjobj = (jobject) NULL ; + + if (!swig_override[1]) { + return ProxyAudioConsumer::start(); + } + swigjobj = swig_get_self(jenv); + if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) { + jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[1], swigjobj); + 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_ProxyAudioConsumer::pause() { + int c_result = SwigValueInit< int >() ; + jint jresult = 0 ; + JNIEnvWrapper swigjnienv(this) ; + JNIEnv * jenv = swigjnienv.getJNIEnv() ; + jobject swigjobj = (jobject) NULL ; + + if (!swig_override[2]) { + return ProxyAudioConsumer::pause(); + } + swigjobj = swig_get_self(jenv); + if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) { + jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[2], swigjobj); + 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_ProxyAudioConsumer::stop() { + int c_result = SwigValueInit< int >() ; + jint jresult = 0 ; + JNIEnvWrapper swigjnienv(this) ; + JNIEnv * jenv = swigjnienv.getJNIEnv() ; + jobject swigjobj = (jobject) NULL ; + + if (!swig_override[3]) { + return ProxyAudioConsumer::stop(); + } + swigjobj = swig_get_self(jenv); + if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) { + jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[3], swigjobj); + 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_ProxyAudioConsumer::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[] = { + { + "prepare", "(III)I", NULL + }, + { + "start", "()I", NULL + }, + { + "pause", "()I", NULL + }, + { + "stop", "()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/ProxyAudioConsumer"); + if (!baseclass) return; + baseclass = (jclass) jenv->NewGlobalRef(baseclass); + } + bool derived = (jenv->IsSameObject(baseclass, jcls) ? false : true); + for (int i = 0; i < 4; ++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_ProxyAudioProducer::SwigDirector_ProxyAudioProducer(JNIEnv *jenv) : ProxyAudioProducer(), Swig::Director(jenv) { +} + +SwigDirector_ProxyAudioProducer::~SwigDirector_ProxyAudioProducer() { + swig_disconnect_director_self("swigDirectorDisconnect"); +} + + +int SwigDirector_ProxyAudioProducer::prepare(int ptime, int rate, int channels) { + int c_result = SwigValueInit< int >() ; + jint jresult = 0 ; + JNIEnvWrapper swigjnienv(this) ; + JNIEnv * jenv = swigjnienv.getJNIEnv() ; + jobject swigjobj = (jobject) NULL ; + jint jptime ; + jint jrate ; + jint jchannels ; + + if (!swig_override[0]) { + return ProxyAudioProducer::prepare(ptime,rate,channels); + } + swigjobj = swig_get_self(jenv); + if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) { + jptime = (jint) ptime; + jrate = (jint) rate; + jchannels = (jint) channels; + jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[4], swigjobj, jptime, jrate, jchannels); + 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_ProxyAudioProducer::start() { + int c_result = SwigValueInit< int >() ; + jint jresult = 0 ; + JNIEnvWrapper swigjnienv(this) ; + JNIEnv * jenv = swigjnienv.getJNIEnv() ; + jobject swigjobj = (jobject) NULL ; + + if (!swig_override[1]) { + return ProxyAudioProducer::start(); + } + swigjobj = swig_get_self(jenv); + if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) { + jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[5], swigjobj); + 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_ProxyAudioProducer::pause() { + int c_result = SwigValueInit< int >() ; + jint jresult = 0 ; + JNIEnvWrapper swigjnienv(this) ; + JNIEnv * jenv = swigjnienv.getJNIEnv() ; + jobject swigjobj = (jobject) NULL ; + + if (!swig_override[2]) { + return ProxyAudioProducer::pause(); + } + swigjobj = swig_get_self(jenv); + if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) { + jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[6], swigjobj); + 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_ProxyAudioProducer::stop() { + int c_result = SwigValueInit< int >() ; + jint jresult = 0 ; + JNIEnvWrapper swigjnienv(this) ; + JNIEnv * jenv = swigjnienv.getJNIEnv() ; + jobject swigjobj = (jobject) NULL ; + + if (!swig_override[3]) { + return ProxyAudioProducer::stop(); + } + swigjobj = swig_get_self(jenv); + if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) { + jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[7], swigjobj); + 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_ProxyAudioProducer::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[] = { + { + "prepare", "(III)I", NULL + }, + { + "start", "()I", NULL + }, + { + "pause", "()I", NULL + }, + { + "stop", "()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/ProxyAudioProducer"); + if (!baseclass) return; + baseclass = (jclass) jenv->NewGlobalRef(baseclass); + } + bool derived = (jenv->IsSameObject(baseclass, jcls) ? false : true); + for (int i = 0; i < 4; ++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_SipCallback::SwigDirector_SipCallback(JNIEnv *jenv) : SipCallback(), Swig::Director(jenv) { } @@ -449,7 +745,7 @@ int SwigDirector_SipCallback::OnDialogEvent(DialogEvent const *e) { swigjobj = swig_get_self(jenv); if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) { *((DialogEvent **)&je) = (DialogEvent *) e; - jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[0], swigjobj, je); + jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[8], swigjobj, je); if (jenv->ExceptionOccurred()) return c_result; c_result = (int)jresult; } else { @@ -473,7 +769,7 @@ int SwigDirector_SipCallback::OnStackEvent(StackEvent const *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); + jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[9], swigjobj, je); if (jenv->ExceptionOccurred()) return c_result; c_result = (int)jresult; } else { @@ -497,7 +793,7 @@ int SwigDirector_SipCallback::OnMessagingEvent(MessagingEvent const *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[2], swigjobj, je); + jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[10], swigjobj, je); if (jenv->ExceptionOccurred()) return c_result; c_result = (int)jresult; } else { @@ -521,7 +817,7 @@ int SwigDirector_SipCallback::OnOptionsEvent(OptionsEvent const *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[3], swigjobj, je); + jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[11], swigjobj, je); if (jenv->ExceptionOccurred()) return c_result; c_result = (int)jresult; } else { @@ -545,7 +841,7 @@ int SwigDirector_SipCallback::OnPublicationEvent(PublicationEvent const *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[4], swigjobj, je); + jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[12], swigjobj, je); if (jenv->ExceptionOccurred()) return c_result; c_result = (int)jresult; } else { @@ -569,7 +865,7 @@ int SwigDirector_SipCallback::OnRegistrationEvent(RegistrationEvent const *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[5], swigjobj, je); + jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[13], swigjobj, je); if (jenv->ExceptionOccurred()) return c_result; c_result = (int)jresult; } else { @@ -593,7 +889,7 @@ int SwigDirector_SipCallback::OnSubscriptionEvent(SubscriptionEvent const *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[6], swigjobj, je); + jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[14], swigjobj, je); if (jenv->ExceptionOccurred()) return c_result; c_result = (int)jresult; } else { @@ -875,7 +1171,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; @@ -898,7 +1194,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; @@ -929,7 +1225,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; @@ -959,7 +1255,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; @@ -1038,7 +1334,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; } @@ -1565,6 +1861,68 @@ SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipSession_1getI } +SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_new_1CallSession(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { + jlong jresult = 0 ; + SipStack *arg1 = (SipStack *) 0 ; + CallSession *result = 0 ; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(SipStack **)&jarg1; + result = (CallSession *)new CallSession(arg1); + *(CallSession **)&jresult = result; + return jresult; +} + + +SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_delete_1CallSession(JNIEnv *jenv, jclass jcls, jlong jarg1) { + CallSession *arg1 = (CallSession *) 0 ; + + (void)jenv; + (void)jcls; + arg1 = *(CallSession **)&jarg1; + delete arg1; +} + + +SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_CallSession_1Call(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) { + jboolean jresult = 0 ; + CallSession *arg1 = (CallSession *) 0 ; + char *arg2 = (char *) 0 ; + bool result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(CallSession **)&jarg1; + arg2 = 0; + if (jarg2) { + arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0); + if (!arg2) return 0; + } + result = (bool)(arg1)->Call((char const *)arg2); + jresult = (jboolean)result; + if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); + return jresult; +} + + +SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_CallSession_1Hangup(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { + jboolean jresult = 0 ; + CallSession *arg1 = (CallSession *) 0 ; + bool result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(CallSession **)&jarg1; + result = (bool)(arg1)->Hangup(); + jresult = (jboolean)result; + return jresult; +} + + SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_new_1MessagingSession(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { jlong jresult = 0 ; SipStack *arg1 = (SipStack *) 0 ; @@ -1852,6 +2210,442 @@ SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SubscriptionS } +SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_new_1ProxyAudioConsumer(JNIEnv *jenv, jclass jcls) { + jlong jresult = 0 ; + ProxyAudioConsumer *result = 0 ; + + (void)jenv; + (void)jcls; + result = (ProxyAudioConsumer *)new SwigDirector_ProxyAudioConsumer(jenv); + *(ProxyAudioConsumer **)&jresult = result; + return jresult; +} + + +SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_delete_1ProxyAudioConsumer(JNIEnv *jenv, jclass jcls, jlong jarg1) { + ProxyAudioConsumer *arg1 = (ProxyAudioConsumer *) 0 ; + + (void)jenv; + (void)jcls; + arg1 = *(ProxyAudioConsumer **)&jarg1; + delete arg1; +} + + +SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyAudioConsumer_1prepare(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jint jarg3, jint jarg4) { + jint jresult = 0 ; + ProxyAudioConsumer *arg1 = (ProxyAudioConsumer *) 0 ; + int arg2 ; + int arg3 ; + int arg4 ; + int result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(ProxyAudioConsumer **)&jarg1; + arg2 = (int)jarg2; + arg3 = (int)jarg3; + arg4 = (int)jarg4; + result = (int)(arg1)->prepare(arg2,arg3,arg4); + jresult = (jint)result; + return jresult; +} + + +SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyAudioConsumer_1prepareSwigExplicitProxyAudioConsumer(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jint jarg3, jint jarg4) { + jint jresult = 0 ; + ProxyAudioConsumer *arg1 = (ProxyAudioConsumer *) 0 ; + int arg2 ; + int arg3 ; + int arg4 ; + int result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(ProxyAudioConsumer **)&jarg1; + arg2 = (int)jarg2; + arg3 = (int)jarg3; + arg4 = (int)jarg4; + result = (int)(arg1)->ProxyAudioConsumer::prepare(arg2,arg3,arg4); + jresult = (jint)result; + return jresult; +} + + +SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyAudioConsumer_1start(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { + jint jresult = 0 ; + ProxyAudioConsumer *arg1 = (ProxyAudioConsumer *) 0 ; + int result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(ProxyAudioConsumer **)&jarg1; + result = (int)(arg1)->start(); + jresult = (jint)result; + return jresult; +} + + +SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyAudioConsumer_1startSwigExplicitProxyAudioConsumer(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { + jint jresult = 0 ; + ProxyAudioConsumer *arg1 = (ProxyAudioConsumer *) 0 ; + int result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(ProxyAudioConsumer **)&jarg1; + result = (int)(arg1)->ProxyAudioConsumer::start(); + jresult = (jint)result; + return jresult; +} + + +SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyAudioConsumer_1pause(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { + jint jresult = 0 ; + ProxyAudioConsumer *arg1 = (ProxyAudioConsumer *) 0 ; + int result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(ProxyAudioConsumer **)&jarg1; + result = (int)(arg1)->pause(); + jresult = (jint)result; + return jresult; +} + + +SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyAudioConsumer_1pauseSwigExplicitProxyAudioConsumer(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { + jint jresult = 0 ; + ProxyAudioConsumer *arg1 = (ProxyAudioConsumer *) 0 ; + int result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(ProxyAudioConsumer **)&jarg1; + result = (int)(arg1)->ProxyAudioConsumer::pause(); + jresult = (jint)result; + return jresult; +} + + +SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyAudioConsumer_1stop(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { + jint jresult = 0 ; + ProxyAudioConsumer *arg1 = (ProxyAudioConsumer *) 0 ; + int result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(ProxyAudioConsumer **)&jarg1; + result = (int)(arg1)->stop(); + jresult = (jint)result; + return jresult; +} + + +SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyAudioConsumer_1stopSwigExplicitProxyAudioConsumer(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { + jint jresult = 0 ; + ProxyAudioConsumer *arg1 = (ProxyAudioConsumer *) 0 ; + int result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(ProxyAudioConsumer **)&jarg1; + result = (int)(arg1)->ProxyAudioConsumer::stop(); + jresult = (jint)result; + return jresult; +} + + +SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyAudioConsumer_1setActivate(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { + ProxyAudioConsumer *arg1 = (ProxyAudioConsumer *) 0 ; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(ProxyAudioConsumer **)&jarg1; + (arg1)->setActivate(); +} + + +SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyAudioConsumer_1pull(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jbyteArray jarg2, jlong jarg3) { + jlong jresult = 0 ; + ProxyAudioConsumer *arg1 = (ProxyAudioConsumer *) 0 ; + void *arg2 = (void *) 0 ; + unsigned int arg3 ; + unsigned int result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(ProxyAudioConsumer **)&jarg1; + + arg2 = jenv->GetDirectBufferAddress(jarg2); + + arg3 = (unsigned int)jarg3; + result = (unsigned int)(arg1)->pull(arg2,arg3); + jresult = (jlong)result; + return jresult; +} + + +SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyAudioConsumer_1registerPlugin(JNIEnv *jenv, jclass jcls) { + jboolean jresult = 0 ; + bool result; + + (void)jenv; + (void)jcls; + result = (bool)ProxyAudioConsumer::registerPlugin(); + jresult = (jboolean)result; + return jresult; +} + + +SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyAudioConsumer_1director_1connect(JNIEnv *jenv, jclass jcls, jobject jself, jlong objarg, jboolean jswig_mem_own, jboolean jweak_global) { + ProxyAudioConsumer *obj = *((ProxyAudioConsumer **)&objarg); + (void)jcls; + SwigDirector_ProxyAudioConsumer *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_ProxyAudioConsumer_1change_1ownership(JNIEnv *jenv, jclass jcls, jobject jself, jlong objarg, jboolean jtake_or_release) { + ProxyAudioConsumer *obj = *((ProxyAudioConsumer **)&objarg); + SwigDirector_ProxyAudioConsumer *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_1ProxyAudioProducer(JNIEnv *jenv, jclass jcls) { + jlong jresult = 0 ; + ProxyAudioProducer *result = 0 ; + + (void)jenv; + (void)jcls; + result = (ProxyAudioProducer *)new SwigDirector_ProxyAudioProducer(jenv); + *(ProxyAudioProducer **)&jresult = result; + return jresult; +} + + +SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_delete_1ProxyAudioProducer(JNIEnv *jenv, jclass jcls, jlong jarg1) { + ProxyAudioProducer *arg1 = (ProxyAudioProducer *) 0 ; + + (void)jenv; + (void)jcls; + arg1 = *(ProxyAudioProducer **)&jarg1; + delete arg1; +} + + +SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyAudioProducer_1prepare(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jint jarg3, jint jarg4) { + jint jresult = 0 ; + ProxyAudioProducer *arg1 = (ProxyAudioProducer *) 0 ; + int arg2 ; + int arg3 ; + int arg4 ; + int result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(ProxyAudioProducer **)&jarg1; + arg2 = (int)jarg2; + arg3 = (int)jarg3; + arg4 = (int)jarg4; + result = (int)(arg1)->prepare(arg2,arg3,arg4); + jresult = (jint)result; + return jresult; +} + + +SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyAudioProducer_1prepareSwigExplicitProxyAudioProducer(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jint jarg3, jint jarg4) { + jint jresult = 0 ; + ProxyAudioProducer *arg1 = (ProxyAudioProducer *) 0 ; + int arg2 ; + int arg3 ; + int arg4 ; + int result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(ProxyAudioProducer **)&jarg1; + arg2 = (int)jarg2; + arg3 = (int)jarg3; + arg4 = (int)jarg4; + result = (int)(arg1)->ProxyAudioProducer::prepare(arg2,arg3,arg4); + jresult = (jint)result; + return jresult; +} + + +SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyAudioProducer_1start(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { + jint jresult = 0 ; + ProxyAudioProducer *arg1 = (ProxyAudioProducer *) 0 ; + int result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(ProxyAudioProducer **)&jarg1; + result = (int)(arg1)->start(); + jresult = (jint)result; + return jresult; +} + + +SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyAudioProducer_1startSwigExplicitProxyAudioProducer(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { + jint jresult = 0 ; + ProxyAudioProducer *arg1 = (ProxyAudioProducer *) 0 ; + int result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(ProxyAudioProducer **)&jarg1; + result = (int)(arg1)->ProxyAudioProducer::start(); + jresult = (jint)result; + return jresult; +} + + +SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyAudioProducer_1pause(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { + jint jresult = 0 ; + ProxyAudioProducer *arg1 = (ProxyAudioProducer *) 0 ; + int result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(ProxyAudioProducer **)&jarg1; + result = (int)(arg1)->pause(); + jresult = (jint)result; + return jresult; +} + + +SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyAudioProducer_1pauseSwigExplicitProxyAudioProducer(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { + jint jresult = 0 ; + ProxyAudioProducer *arg1 = (ProxyAudioProducer *) 0 ; + int result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(ProxyAudioProducer **)&jarg1; + result = (int)(arg1)->ProxyAudioProducer::pause(); + jresult = (jint)result; + return jresult; +} + + +SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyAudioProducer_1stop(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { + jint jresult = 0 ; + ProxyAudioProducer *arg1 = (ProxyAudioProducer *) 0 ; + int result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(ProxyAudioProducer **)&jarg1; + result = (int)(arg1)->stop(); + jresult = (jint)result; + return jresult; +} + + +SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyAudioProducer_1stopSwigExplicitProxyAudioProducer(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { + jint jresult = 0 ; + ProxyAudioProducer *arg1 = (ProxyAudioProducer *) 0 ; + int result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(ProxyAudioProducer **)&jarg1; + result = (int)(arg1)->ProxyAudioProducer::stop(); + jresult = (jint)result; + return jresult; +} + + +SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyAudioProducer_1setActivate(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { + ProxyAudioProducer *arg1 = (ProxyAudioProducer *) 0 ; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(ProxyAudioProducer **)&jarg1; + (arg1)->setActivate(); +} + + +SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyAudioProducer_1push(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jbyteArray jarg2, jlong jarg3) { + jint jresult = 0 ; + ProxyAudioProducer *arg1 = (ProxyAudioProducer *) 0 ; + void *arg2 = (void *) 0 ; + unsigned int arg3 ; + int result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(ProxyAudioProducer **)&jarg1; + + arg2 = jenv->GetDirectBufferAddress(jarg2); + + arg3 = (unsigned int)jarg3; + result = (int)(arg1)->push((void const *)arg2,arg3); + jresult = (jint)result; + return jresult; +} + + +SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyAudioProducer_1registerPlugin(JNIEnv *jenv, jclass jcls) { + jboolean jresult = 0 ; + bool result; + + (void)jenv; + (void)jcls; + result = (bool)ProxyAudioProducer::registerPlugin(); + jresult = (jboolean)result; + return jresult; +} + + +SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyAudioProducer_1director_1connect(JNIEnv *jenv, jclass jcls, jobject jself, jlong objarg, jboolean jswig_mem_own, jboolean jweak_global) { + ProxyAudioProducer *obj = *((ProxyAudioProducer **)&objarg); + (void)jcls; + SwigDirector_ProxyAudioProducer *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_ProxyAudioProducer_1change_1ownership(JNIEnv *jenv, jclass jcls, jobject jself, jlong objarg, jboolean jtake_or_release) { + ProxyAudioProducer *obj = *((ProxyAudioProducer **)&objarg); + SwigDirector_ProxyAudioProducer *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_1SipCallback(JNIEnv *jenv, jclass jcls) { jlong jresult = 0 ; SipCallback *result = 0 ; @@ -2642,6 +3436,14 @@ SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SWIGSubscription return baseptr; } +SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SWIGCallSessionUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jlong baseptr = 0; + (void)jenv; + (void)jcls; + *(SipSession **)&baseptr = *(CallSession **)&jarg1; + return baseptr; +} + SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SWIGMessagingSessionUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { jlong baseptr = 0; (void)jenv; @@ -2696,7 +3498,31 @@ SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_swig_1module_1ini static struct { const char *method; const char *signature; - } methods[7] = { + } methods[15] = { + { + "SwigDirector_ProxyAudioConsumer_prepare", "(Lorg/doubango/tinyWRAP/ProxyAudioConsumer;III)I" + }, + { + "SwigDirector_ProxyAudioConsumer_start", "(Lorg/doubango/tinyWRAP/ProxyAudioConsumer;)I" + }, + { + "SwigDirector_ProxyAudioConsumer_pause", "(Lorg/doubango/tinyWRAP/ProxyAudioConsumer;)I" + }, + { + "SwigDirector_ProxyAudioConsumer_stop", "(Lorg/doubango/tinyWRAP/ProxyAudioConsumer;)I" + }, + { + "SwigDirector_ProxyAudioProducer_prepare", "(Lorg/doubango/tinyWRAP/ProxyAudioProducer;III)I" + }, + { + "SwigDirector_ProxyAudioProducer_start", "(Lorg/doubango/tinyWRAP/ProxyAudioProducer;)I" + }, + { + "SwigDirector_ProxyAudioProducer_pause", "(Lorg/doubango/tinyWRAP/ProxyAudioProducer;)I" + }, + { + "SwigDirector_ProxyAudioProducer_stop", "(Lorg/doubango/tinyWRAP/ProxyAudioProducer;)I" + }, { "SwigDirector_SipCallback_OnDialogEvent", "(Lorg/doubango/tinyWRAP/SipCallback;J)I" }, diff --git a/trunk/bindings/java/android/tinyWRAP_wrap.h b/trunk/bindings/java/android/tinyWRAP_wrap.h index d7fbc26c..58a2bd86 100644 --- a/trunk/bindings/java/android/tinyWRAP_wrap.h +++ b/trunk/bindings/java/android/tinyWRAP_wrap.h @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make @@ -11,6 +11,42 @@ #ifndef SWIG_tinyWRAP_WRAP_H_ #define SWIG_tinyWRAP_WRAP_H_ +class SwigDirector_ProxyAudioConsumer : public ProxyAudioConsumer, public Swig::Director { + +public: + void swig_connect_director(JNIEnv *jenv, jobject jself, jclass jcls, bool swig_mem_own, bool weak_global); + SwigDirector_ProxyAudioConsumer(JNIEnv *jenv); + virtual ~SwigDirector_ProxyAudioConsumer(); + virtual int prepare(int ptime, int rate, int channels); + virtual int start(); + virtual int pause(); + virtual int stop(); +public: + bool swig_overrides(int n) { + return (n < 4 ? swig_override[n] : false); + } +protected: + bool swig_override[4]; +}; + +class SwigDirector_ProxyAudioProducer : public ProxyAudioProducer, public Swig::Director { + +public: + void swig_connect_director(JNIEnv *jenv, jobject jself, jclass jcls, bool swig_mem_own, bool weak_global); + SwigDirector_ProxyAudioProducer(JNIEnv *jenv); + virtual ~SwigDirector_ProxyAudioProducer(); + virtual int prepare(int ptime, int rate, int channels); + virtual int start(); + virtual int pause(); + virtual int stop(); +public: + bool swig_overrides(int n) { + return (n < 4 ? swig_override[n] : false); + } +protected: + bool swig_override[4]; +}; + class SwigDirector_SipCallback : public SipCallback, public Swig::Director { public: diff --git a/trunk/bindings/java/android/tsip_event_type_t.java b/trunk/bindings/java/android/tsip_event_type_t.java index 819967fb..6527ee1e 100644 --- a/trunk/bindings/java/android/tsip_event_type_t.java +++ b/trunk/bindings/java/android/tsip_event_type_t.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/trunk/bindings/java/android/tsip_message_event_type_t.java b/trunk/bindings/java/android/tsip_message_event_type_t.java index da69c10b..280845ac 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.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/trunk/bindings/java/android/tsip_options_event_type_t.java b/trunk/bindings/java/android/tsip_options_event_type_t.java index 6d1d33f0..70166763 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.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/trunk/bindings/java/android/tsip_publish_event_type_t.java b/trunk/bindings/java/android/tsip_publish_event_type_t.java index e5d47e39..a9ec14a0 100644 --- a/trunk/bindings/java/android/tsip_publish_event_type_t.java +++ b/trunk/bindings/java/android/tsip_publish_event_type_t.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/trunk/bindings/java/android/tsip_register_event_type_t.java b/trunk/bindings/java/android/tsip_register_event_type_t.java index 039f2ead..d8715ea9 100644 --- a/trunk/bindings/java/android/tsip_register_event_type_t.java +++ b/trunk/bindings/java/android/tsip_register_event_type_t.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/trunk/bindings/java/android/tsip_subscribe_event_type_t.java b/trunk/bindings/java/android/tsip_subscribe_event_type_t.java index 34231525..5091b658 100644 --- a/trunk/bindings/java/android/tsip_subscribe_event_type_t.java +++ b/trunk/bindings/java/android/tsip_subscribe_event_type_t.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/trunk/bindings/java/tinyWRAP.java b/trunk/bindings/java/tinyWRAP.java index 9b29ff1c..d10c59ad 100644 --- a/trunk/bindings/java/tinyWRAP.java +++ b/trunk/bindings/java/tinyWRAP.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/trunk/bindings/java/tinyWRAPConstants.java b/trunk/bindings/java/tinyWRAPConstants.java index 673ed5c0..ae496b70 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.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/trunk/bindings/java/tinyWRAPJNI.java b/trunk/bindings/java/tinyWRAPJNI.java index 9b27d72b..dfa17b92 100644 --- a/trunk/bindings/java/tinyWRAPJNI.java +++ b/trunk/bindings/java/tinyWRAPJNI.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -63,6 +63,10 @@ class tinyWRAPJNI { public final static native boolean SipSession_setToUri(long jarg1, SipSession jarg1_, String jarg2); public final static native boolean SipSession_setSilentHangup(long jarg1, SipSession jarg1_, boolean jarg2); public final static native long SipSession_getId(long jarg1, SipSession jarg1_); + public final static native long new_CallSession(long jarg1, SipStack jarg1_); + public final static native void delete_CallSession(long jarg1); + public final static native boolean CallSession_Call(long jarg1, CallSession jarg1_, String jarg2); + public final static native boolean CallSession_Hangup(long jarg1, CallSession jarg1_); public final static native long new_MessagingSession(long jarg1, SipStack jarg1_); public final static native void delete_MessagingSession(long jarg1); public final static native boolean MessagingSession_Send(long jarg1, MessagingSession jarg1_, java.nio.ByteBuffer jarg2, long jarg3); @@ -83,6 +87,36 @@ class tinyWRAPJNI { public final static native void delete_SubscriptionSession(long jarg1); public final static native boolean SubscriptionSession_Subscribe(long jarg1, SubscriptionSession jarg1_); public final static native boolean SubscriptionSession_UnSubscribe(long jarg1, SubscriptionSession jarg1_); + public final static native long new_ProxyAudioConsumer(); + public final static native void delete_ProxyAudioConsumer(long jarg1); + public final static native int ProxyAudioConsumer_prepare(long jarg1, ProxyAudioConsumer jarg1_, int jarg2, int jarg3, int jarg4); + public final static native int ProxyAudioConsumer_prepareSwigExplicitProxyAudioConsumer(long jarg1, ProxyAudioConsumer jarg1_, int jarg2, int jarg3, int jarg4); + public final static native int ProxyAudioConsumer_start(long jarg1, ProxyAudioConsumer jarg1_); + public final static native int ProxyAudioConsumer_startSwigExplicitProxyAudioConsumer(long jarg1, ProxyAudioConsumer jarg1_); + public final static native int ProxyAudioConsumer_pause(long jarg1, ProxyAudioConsumer jarg1_); + public final static native int ProxyAudioConsumer_pauseSwigExplicitProxyAudioConsumer(long jarg1, ProxyAudioConsumer jarg1_); + public final static native int ProxyAudioConsumer_stop(long jarg1, ProxyAudioConsumer jarg1_); + public final static native int ProxyAudioConsumer_stopSwigExplicitProxyAudioConsumer(long jarg1, ProxyAudioConsumer jarg1_); + public final static native void ProxyAudioConsumer_setActivate(long jarg1, ProxyAudioConsumer jarg1_); + public final static native long ProxyAudioConsumer_pull(long jarg1, ProxyAudioConsumer jarg1_, java.nio.ByteBuffer jarg2, long jarg3); + public final static native boolean ProxyAudioConsumer_registerPlugin(); + public final static native void ProxyAudioConsumer_director_connect(ProxyAudioConsumer obj, long cptr, boolean mem_own, boolean weak_global); + public final static native void ProxyAudioConsumer_change_ownership(ProxyAudioConsumer obj, long cptr, boolean take_or_release); + public final static native long new_ProxyAudioProducer(); + public final static native void delete_ProxyAudioProducer(long jarg1); + public final static native int ProxyAudioProducer_prepare(long jarg1, ProxyAudioProducer jarg1_, int jarg2, int jarg3, int jarg4); + public final static native int ProxyAudioProducer_prepareSwigExplicitProxyAudioProducer(long jarg1, ProxyAudioProducer jarg1_, int jarg2, int jarg3, int jarg4); + public final static native int ProxyAudioProducer_start(long jarg1, ProxyAudioProducer jarg1_); + public final static native int ProxyAudioProducer_startSwigExplicitProxyAudioProducer(long jarg1, ProxyAudioProducer jarg1_); + public final static native int ProxyAudioProducer_pause(long jarg1, ProxyAudioProducer jarg1_); + public final static native int ProxyAudioProducer_pauseSwigExplicitProxyAudioProducer(long jarg1, ProxyAudioProducer jarg1_); + public final static native int ProxyAudioProducer_stop(long jarg1, ProxyAudioProducer jarg1_); + public final static native int ProxyAudioProducer_stopSwigExplicitProxyAudioProducer(long jarg1, ProxyAudioProducer jarg1_); + public final static native void ProxyAudioProducer_setActivate(long jarg1, ProxyAudioProducer jarg1_); + public final static native int ProxyAudioProducer_push(long jarg1, ProxyAudioProducer jarg1_, java.nio.ByteBuffer jarg2, long jarg3); + public final static native boolean ProxyAudioProducer_registerPlugin(); + public final static native void ProxyAudioProducer_director_connect(ProxyAudioProducer obj, long cptr, boolean mem_own, boolean weak_global); + public final static native void ProxyAudioProducer_change_ownership(ProxyAudioProducer obj, long cptr, boolean take_or_release); public final static native long new_SipCallback(); public final static native void delete_SipCallback(long jarg1); public final static native int SipCallback_OnDialogEvent(long jarg1, SipCallback jarg1_, long jarg2, DialogEvent jarg2_); @@ -130,6 +164,7 @@ class tinyWRAPJNI { public final static native long SWIGPublicationEventUpcast(long jarg1); public final static native long SWIGRegistrationEventUpcast(long jarg1); public final static native long SWIGSubscriptionEventUpcast(long jarg1); + public final static native long SWIGCallSessionUpcast(long jarg1); public final static native long SWIGMessagingSessionUpcast(long jarg1); public final static native long SWIGOptionsSessionUpcast(long jarg1); public final static native long SWIGPublicationSessionUpcast(long jarg1); @@ -137,6 +172,30 @@ class tinyWRAPJNI { public final static native long SWIGSubscriptionSessionUpcast(long jarg1); public final static native long SWIGSipStackUpcast(long jarg1); + public static int SwigDirector_ProxyAudioConsumer_prepare(ProxyAudioConsumer self, int ptime, int rate, int channels) { + return self.prepare(ptime, rate, channels); + } + public static int SwigDirector_ProxyAudioConsumer_start(ProxyAudioConsumer self) { + return self.start(); + } + public static int SwigDirector_ProxyAudioConsumer_pause(ProxyAudioConsumer self) { + return self.pause(); + } + public static int SwigDirector_ProxyAudioConsumer_stop(ProxyAudioConsumer self) { + return self.stop(); + } + public static int SwigDirector_ProxyAudioProducer_prepare(ProxyAudioProducer self, int ptime, int rate, int channels) { + return self.prepare(ptime, rate, channels); + } + public static int SwigDirector_ProxyAudioProducer_start(ProxyAudioProducer self) { + return self.start(); + } + public static int SwigDirector_ProxyAudioProducer_pause(ProxyAudioProducer self) { + return self.pause(); + } + public static int SwigDirector_ProxyAudioProducer_stop(ProxyAudioProducer self) { + return self.stop(); + } public static int SwigDirector_SipCallback_OnDialogEvent(SipCallback self, long e) { return self.OnDialogEvent((e == 0) ? null : new DialogEvent(e, false)); } diff --git a/trunk/bindings/java/tinyWRAP_wrap.cxx b/trunk/bindings/java/tinyWRAP_wrap.cxx index 8a6bdda3..c0d33f31 100644 --- a/trunk/bindings/java/tinyWRAP_wrap.cxx +++ b/trunk/bindings/java/tinyWRAP_wrap.cxx @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make @@ -35,114 +35,114 @@ template T SwigValueInit() { } #endif -/* ----------------------------------------------------------------------------- - * This section contains generic SWIG labels for method/variable - * declarations/attributes, and other compiler dependent labels. - * ----------------------------------------------------------------------------- */ - -/* template workaround for compilers that cannot correctly implement the C++ standard */ -#ifndef SWIGTEMPLATEDISAMBIGUATOR -# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) -# define SWIGTEMPLATEDISAMBIGUATOR template -# elif defined(__HP_aCC) -/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ -/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ -# define SWIGTEMPLATEDISAMBIGUATOR template -# else -# define SWIGTEMPLATEDISAMBIGUATOR -# endif -#endif - -/* inline attribute */ -#ifndef SWIGINLINE -# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) -# define SWIGINLINE inline -# else -# define SWIGINLINE -# endif -#endif - -/* attribute recognised by some compilers to avoid 'unused' warnings */ -#ifndef SWIGUNUSED -# if defined(__GNUC__) -# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) -# define SWIGUNUSED __attribute__ ((__unused__)) -# else -# define SWIGUNUSED -# endif -# elif defined(__ICC) -# define SWIGUNUSED __attribute__ ((__unused__)) -# else -# define SWIGUNUSED -# endif -#endif - -#ifndef SWIG_MSC_UNSUPPRESS_4505 -# if defined(_MSC_VER) -# pragma warning(disable : 4505) /* unreferenced local function has been removed */ -# endif -#endif - -#ifndef SWIGUNUSEDPARM -# ifdef __cplusplus -# define SWIGUNUSEDPARM(p) -# else -# define SWIGUNUSEDPARM(p) p SWIGUNUSED -# endif -#endif - -/* internal SWIG method */ -#ifndef SWIGINTERN -# define SWIGINTERN static SWIGUNUSED -#endif - -/* internal inline SWIG method */ -#ifndef SWIGINTERNINLINE -# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE -#endif - -/* exporting methods */ -#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) -# ifndef GCC_HASCLASSVISIBILITY -# define GCC_HASCLASSVISIBILITY -# endif -#endif - -#ifndef SWIGEXPORT -# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) -# if defined(STATIC_LINKED) -# define SWIGEXPORT -# else -# define SWIGEXPORT __declspec(dllexport) -# endif -# else -# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) -# define SWIGEXPORT __attribute__ ((visibility("default"))) -# else -# define SWIGEXPORT -# endif -# endif -#endif - -/* calling conventions for Windows */ -#ifndef SWIGSTDCALL -# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) -# define SWIGSTDCALL __stdcall -# else -# define SWIGSTDCALL -# endif -#endif - -/* Deal with Microsoft's attempt at deprecating C standard runtime functions */ -#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) -# define _CRT_SECURE_NO_DEPRECATE -#endif - -/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ -#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) -# define _SCL_SECURE_NO_DEPRECATE -#endif - +/* ----------------------------------------------------------------------------- + * This section contains generic SWIG labels for method/variable + * declarations/attributes, and other compiler dependent labels. + * ----------------------------------------------------------------------------- */ + +/* template workaround for compilers that cannot correctly implement the C++ standard */ +#ifndef SWIGTEMPLATEDISAMBIGUATOR +# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) +# define SWIGTEMPLATEDISAMBIGUATOR template +# elif defined(__HP_aCC) +/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ +/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ +# define SWIGTEMPLATEDISAMBIGUATOR template +# else +# define SWIGTEMPLATEDISAMBIGUATOR +# endif +#endif + +/* inline attribute */ +#ifndef SWIGINLINE +# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) +# define SWIGINLINE inline +# else +# define SWIGINLINE +# endif +#endif + +/* attribute recognised by some compilers to avoid 'unused' warnings */ +#ifndef SWIGUNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define SWIGUNUSED __attribute__ ((__unused__)) +# else +# define SWIGUNUSED +# endif +# elif defined(__ICC) +# define SWIGUNUSED __attribute__ ((__unused__)) +# else +# define SWIGUNUSED +# endif +#endif + +#ifndef SWIG_MSC_UNSUPPRESS_4505 +# if defined(_MSC_VER) +# pragma warning(disable : 4505) /* unreferenced local function has been removed */ +# endif +#endif + +#ifndef SWIGUNUSEDPARM +# ifdef __cplusplus +# define SWIGUNUSEDPARM(p) +# else +# define SWIGUNUSEDPARM(p) p SWIGUNUSED +# endif +#endif + +/* internal SWIG method */ +#ifndef SWIGINTERN +# define SWIGINTERN static SWIGUNUSED +#endif + +/* internal inline SWIG method */ +#ifndef SWIGINTERNINLINE +# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE +#endif + +/* exporting methods */ +#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) +# ifndef GCC_HASCLASSVISIBILITY +# define GCC_HASCLASSVISIBILITY +# endif +#endif + +#ifndef SWIGEXPORT +# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# if defined(STATIC_LINKED) +# define SWIGEXPORT +# else +# define SWIGEXPORT __declspec(dllexport) +# endif +# else +# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) +# define SWIGEXPORT __attribute__ ((visibility("default"))) +# else +# define SWIGEXPORT +# endif +# endif +#endif + +/* calling conventions for Windows */ +#ifndef SWIGSTDCALL +# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# define SWIGSTDCALL __stdcall +# else +# define SWIGSTDCALL +# endif +#endif + +/* Deal with Microsoft's attempt at deprecating C standard runtime functions */ +#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) +# define _CRT_SECURE_NO_DEPRECATE +#endif + +/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ +#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) +# define _SCL_SECURE_NO_DEPRECATE +#endif + /* Fix for jlong on some versions of gcc on Windows */ @@ -193,8 +193,7 @@ static void SWIGUNUSED SWIG_JavaThrowException(JNIEnv *jenv, SWIG_JavaExceptionC { SWIG_JavaNullPointerException, "java/lang/NullPointerException" }, { SWIG_JavaDirectorPureVirtual, "java/lang/RuntimeException" }, { SWIG_JavaUnknownError, "java/lang/UnknownError" }, - { (SWIG_JavaExceptionCodes)0, "java/lang/UnknownError" } - }; + { (SWIG_JavaExceptionCodes)0, "java/lang/UnknownError" } }; const SWIG_JavaExceptions_t *except_ptr = java_exceptions; while (except_ptr->code != code && except_ptr->code) @@ -211,200 +210,200 @@ static void SWIGUNUSED SWIG_JavaThrowException(JNIEnv *jenv, SWIG_JavaExceptionC #define SWIG_contract_assert(nullreturn, expr, msg) if (!(expr)) {SWIG_JavaThrowException(jenv, SWIG_JavaIllegalArgumentException, msg); return nullreturn; } else -/* ----------------------------------------------------------------------------- - * See the LICENSE file for information on copyright, usage and redistribution - * of SWIG, and the README file for authors - http://www.swig.org/release.html. - * - * director.swg - * - * This file contains support for director classes that proxy - * method calls from C++ to Java extensions. - * ----------------------------------------------------------------------------- */ - -#ifdef __cplusplus - -#if defined(DEBUG_DIRECTOR_OWNED) -#include -#endif - -namespace Swig { - /* Java object wrapper */ - class JObjectWrapper { - public: - JObjectWrapper() : jthis_(NULL), weak_global_(true) { - } - - ~JObjectWrapper() { - jthis_ = NULL; - weak_global_ = true; - } - - bool set(JNIEnv *jenv, jobject jobj, bool mem_own, bool weak_global) { - if (!jthis_) { - weak_global_ = weak_global; - if (jobj) - jthis_ = ((weak_global_ || !mem_own) ? jenv->NewWeakGlobalRef(jobj) : jenv->NewGlobalRef(jobj)); -#if defined(DEBUG_DIRECTOR_OWNED) - std::cout << "JObjectWrapper::set(" << jobj << ", " << (weak_global ? "weak_global" : "global_ref") << ") -> " << jthis_ << std::endl; -#endif - return true; - } else { -#if defined(DEBUG_DIRECTOR_OWNED) - std::cout << "JObjectWrapper::set(" << jobj << ", " << (weak_global ? "weak_global" : "global_ref") << ") -> already set" << std::endl; -#endif - return false; - } - } - - jobject get(JNIEnv *jenv) const { -#if defined(DEBUG_DIRECTOR_OWNED) - std::cout << "JObjectWrapper::get("; - if (jthis_) - std::cout << jthis_; - else - std::cout << "null"; - std::cout << ") -> return new local ref" << std::endl; -#endif - return (jthis_ ? jenv->NewLocalRef(jthis_) : jthis_); - } - - void release(JNIEnv *jenv) { -#if defined(DEBUG_DIRECTOR_OWNED) - std::cout << "JObjectWrapper::release(" << jthis_ << "): " << (weak_global_ ? "weak global ref" : "global ref") << std::endl; -#endif - if (jthis_) { - if (weak_global_) { - if (jenv->IsSameObject(jthis_, NULL) == JNI_FALSE) - jenv->DeleteWeakGlobalRef((jweak)jthis_); - } else - jenv->DeleteGlobalRef(jthis_); - } - - jthis_ = NULL; - weak_global_ = true; - } - - jobject peek() { - return jthis_; - } - - /* Java proxy releases ownership of C++ object, C++ object is now - responsible for destruction (creates NewGlobalRef to pin Java - proxy) */ - void java_change_ownership(JNIEnv *jenv, jobject jself, bool take_or_release) { - if (take_or_release) { /* Java takes ownership of C++ object's lifetime. */ - if (!weak_global_) { - jenv->DeleteGlobalRef(jthis_); - jthis_ = jenv->NewWeakGlobalRef(jself); - weak_global_ = true; - } - } else { /* Java releases ownership of C++ object's lifetime */ - if (weak_global_) { - jenv->DeleteWeakGlobalRef((jweak)jthis_); - jthis_ = jenv->NewGlobalRef(jself); - weak_global_ = false; - } - } - } - - private: - /* pointer to Java object */ - jobject jthis_; - /* Local or global reference flag */ - bool weak_global_; - }; - - /* director base class */ - class Director { - /* pointer to Java virtual machine */ - JavaVM *swig_jvm_; - - protected: -#if defined (_MSC_VER) && (_MSC_VER<1300) - class JNIEnvWrapper; - friend class JNIEnvWrapper; -#endif - /* Utility class for managing the JNI environment */ - class JNIEnvWrapper { - const Director *director_; - JNIEnv *jenv_; - public: - JNIEnvWrapper(const Director *director) : director_(director), jenv_(0) { -#if defined(SWIG_JAVA_ATTACH_CURRENT_THREAD_AS_DAEMON) - // Attach a daemon thread to the JVM. Useful when the JVM should not wait for - // the thread to exit upon shutdown. Only for jdk-1.4 and later. - director_->swig_jvm_->AttachCurrentThreadAsDaemon((void **) &jenv_, NULL); -#else - director_->swig_jvm_->AttachCurrentThread((void **) &jenv_, NULL); -#endif - } - ~JNIEnvWrapper() { -#if !defined(SWIG_JAVA_NO_DETACH_CURRENT_THREAD) - // Some JVMs, eg jdk-1.4.2 and lower on Solaris have a bug and crash with the DetachCurrentThread call. - // However, without this call, the JVM hangs on exit when the thread was not created by the JVM and creates a memory leak. - director_->swig_jvm_->DetachCurrentThread(); -#endif - } - JNIEnv *getJNIEnv() const { - return jenv_; - } - }; - - /* Java object wrapper */ - JObjectWrapper swig_self_; - - /* Disconnect director from Java object */ - void swig_disconnect_director_self(const char *disconn_method) { - JNIEnvWrapper jnienv(this) ; - JNIEnv *jenv = jnienv.getJNIEnv() ; - jobject jobj = swig_self_.peek(); -#if defined(DEBUG_DIRECTOR_OWNED) - std::cout << "Swig::Director::disconnect_director_self(" << jobj << ")" << std::endl; -#endif - if (jobj && jenv->IsSameObject(jobj, NULL) == JNI_FALSE) { - jmethodID disconn_meth = jenv->GetMethodID(jenv->GetObjectClass(jobj), disconn_method, "()V"); - if (disconn_meth) { -#if defined(DEBUG_DIRECTOR_OWNED) - std::cout << "Swig::Director::disconnect_director_self upcall to " << disconn_method << std::endl; -#endif - jenv->CallVoidMethod(jobj, disconn_meth); - } - } - } - - public: - Director(JNIEnv *jenv) : swig_jvm_((JavaVM *) NULL), swig_self_() { - /* Acquire the Java VM pointer */ - jenv->GetJavaVM(&swig_jvm_); - } - - virtual ~Director() { - JNIEnvWrapper jnienv(this) ; - JNIEnv *jenv = jnienv.getJNIEnv() ; - swig_self_.release(jenv); - } - - bool swig_set_self(JNIEnv *jenv, jobject jself, bool mem_own, bool weak_global) { - return swig_self_.set(jenv, jself, mem_own, weak_global); - } - - jobject swig_get_self(JNIEnv *jenv) const { - return swig_self_.get(jenv); - } - - // Change C++ object's ownership, relative to Java - void swig_java_change_ownership(JNIEnv *jenv, jobject jself, bool take_or_release) { - swig_self_.java_change_ownership(jenv, jself, take_or_release); - } - }; -} - -#endif /* __cplusplus */ - - +/* ----------------------------------------------------------------------------- + * See the LICENSE file for information on copyright, usage and redistribution + * of SWIG, and the README file for authors - http://www.swig.org/release.html. + * + * director.swg + * + * This file contains support for director classes that proxy + * method calls from C++ to Java extensions. + * ----------------------------------------------------------------------------- */ + +#ifdef __cplusplus + +#if defined(DEBUG_DIRECTOR_OWNED) +#include +#endif + +namespace Swig { + /* Java object wrapper */ + class JObjectWrapper { + public: + JObjectWrapper() : jthis_(NULL), weak_global_(true) { + } + + ~JObjectWrapper() { + jthis_ = NULL; + weak_global_ = true; + } + + bool set(JNIEnv *jenv, jobject jobj, bool mem_own, bool weak_global) { + if (!jthis_) { + weak_global_ = weak_global; + if (jobj) + jthis_ = ((weak_global_ || !mem_own) ? jenv->NewWeakGlobalRef(jobj) : jenv->NewGlobalRef(jobj)); +#if defined(DEBUG_DIRECTOR_OWNED) + std::cout << "JObjectWrapper::set(" << jobj << ", " << (weak_global ? "weak_global" : "global_ref") << ") -> " << jthis_ << std::endl; +#endif + return true; + } else { +#if defined(DEBUG_DIRECTOR_OWNED) + std::cout << "JObjectWrapper::set(" << jobj << ", " << (weak_global ? "weak_global" : "global_ref") << ") -> already set" << std::endl; +#endif + return false; + } + } + + jobject get(JNIEnv *jenv) const { +#if defined(DEBUG_DIRECTOR_OWNED) + std::cout << "JObjectWrapper::get("; + if (jthis_) + std::cout << jthis_; + else + std::cout << "null"; + std::cout << ") -> return new local ref" << std::endl; +#endif + return (jthis_ ? jenv->NewLocalRef(jthis_) : jthis_); + } + + void release(JNIEnv *jenv) { +#if defined(DEBUG_DIRECTOR_OWNED) + std::cout << "JObjectWrapper::release(" << jthis_ << "): " << (weak_global_ ? "weak global ref" : "global ref") << std::endl; +#endif + if (jthis_) { + if (weak_global_) { + if (jenv->IsSameObject(jthis_, NULL) == JNI_FALSE) + jenv->DeleteWeakGlobalRef((jweak)jthis_); + } else + jenv->DeleteGlobalRef(jthis_); + } + + jthis_ = NULL; + weak_global_ = true; + } + + jobject peek() { + return jthis_; + } + + /* Java proxy releases ownership of C++ object, C++ object is now + responsible for destruction (creates NewGlobalRef to pin Java + proxy) */ + void java_change_ownership(JNIEnv *jenv, jobject jself, bool take_or_release) { + if (take_or_release) { /* Java takes ownership of C++ object's lifetime. */ + if (!weak_global_) { + jenv->DeleteGlobalRef(jthis_); + jthis_ = jenv->NewWeakGlobalRef(jself); + weak_global_ = true; + } + } else { /* Java releases ownership of C++ object's lifetime */ + if (weak_global_) { + jenv->DeleteWeakGlobalRef((jweak)jthis_); + jthis_ = jenv->NewGlobalRef(jself); + weak_global_ = false; + } + } + } + + private: + /* pointer to Java object */ + jobject jthis_; + /* Local or global reference flag */ + bool weak_global_; + }; + + /* director base class */ + class Director { + /* pointer to Java virtual machine */ + JavaVM *swig_jvm_; + + protected: +#if defined (_MSC_VER) && (_MSC_VER<1300) + class JNIEnvWrapper; + friend class JNIEnvWrapper; +#endif + /* Utility class for managing the JNI environment */ + class JNIEnvWrapper { + const Director *director_; + JNIEnv *jenv_; + public: + JNIEnvWrapper(const Director *director) : director_(director), jenv_(0) { +#if defined(SWIG_JAVA_ATTACH_CURRENT_THREAD_AS_DAEMON) + // Attach a daemon thread to the JVM. Useful when the JVM should not wait for + // the thread to exit upon shutdown. Only for jdk-1.4 and later. + director_->swig_jvm_->AttachCurrentThreadAsDaemon((void **) &jenv_, NULL); +#else + director_->swig_jvm_->AttachCurrentThread((void **) &jenv_, NULL); +#endif + } + ~JNIEnvWrapper() { +#if !defined(SWIG_JAVA_NO_DETACH_CURRENT_THREAD) + // Some JVMs, eg jdk-1.4.2 and lower on Solaris have a bug and crash with the DetachCurrentThread call. + // However, without this call, the JVM hangs on exit when the thread was not created by the JVM and creates a memory leak. + director_->swig_jvm_->DetachCurrentThread(); +#endif + } + JNIEnv *getJNIEnv() const { + return jenv_; + } + }; + + /* Java object wrapper */ + JObjectWrapper swig_self_; + + /* Disconnect director from Java object */ + void swig_disconnect_director_self(const char *disconn_method) { + JNIEnvWrapper jnienv(this) ; + JNIEnv *jenv = jnienv.getJNIEnv() ; + jobject jobj = swig_self_.peek(); +#if defined(DEBUG_DIRECTOR_OWNED) + std::cout << "Swig::Director::disconnect_director_self(" << jobj << ")" << std::endl; +#endif + if (jobj && jenv->IsSameObject(jobj, NULL) == JNI_FALSE) { + jmethodID disconn_meth = jenv->GetMethodID(jenv->GetObjectClass(jobj), disconn_method, "()V"); + if (disconn_meth) { +#if defined(DEBUG_DIRECTOR_OWNED) + std::cout << "Swig::Director::disconnect_director_self upcall to " << disconn_method << std::endl; +#endif + jenv->CallVoidMethod(jobj, disconn_meth); + } + } + } + + public: + Director(JNIEnv *jenv) : swig_jvm_((JavaVM *) NULL), swig_self_() { + /* Acquire the Java VM pointer */ + jenv->GetJavaVM(&swig_jvm_); + } + + virtual ~Director() { + JNIEnvWrapper jnienv(this) ; + JNIEnv *jenv = jnienv.getJNIEnv() ; + swig_self_.release(jenv); + } + + bool swig_set_self(JNIEnv *jenv, jobject jself, bool mem_own, bool weak_global) { + return swig_self_.set(jenv, jself, mem_own, weak_global); + } + + jobject swig_get_self(JNIEnv *jenv) const { + return swig_self_.get(jenv); + } + + // Change C++ object's ownership, relative to Java + void swig_java_change_ownership(JNIEnv *jenv, jobject jself, bool take_or_release) { + swig_self_.java_change_ownership(jenv, jself, take_or_release); + } + }; +} + +#endif /* __cplusplus */ + + namespace Swig { static jclass jclass_tinyWRAPJNI = NULL; - static jmethodID director_methids[7]; + static jmethodID director_methids[15]; } #include "DDebug.h" @@ -415,6 +414,9 @@ namespace Swig { #include "SipEvent.h" #include "SipSession.h" +#include "ProxyConsumer.h" +#include "ProxyProducer.h" + #include "SipCallback.h" #include "SafeObject.h" #include "SipStack.h" @@ -427,6 +429,300 @@ namespace Swig { #include "tinyWRAP_wrap.h" +SwigDirector_ProxyAudioConsumer::SwigDirector_ProxyAudioConsumer(JNIEnv *jenv) : ProxyAudioConsumer(), Swig::Director(jenv) { +} + +SwigDirector_ProxyAudioConsumer::~SwigDirector_ProxyAudioConsumer() { + swig_disconnect_director_self("swigDirectorDisconnect"); +} + + +int SwigDirector_ProxyAudioConsumer::prepare(int ptime, int rate, int channels) { + int c_result = SwigValueInit< int >() ; + jint jresult = 0 ; + JNIEnvWrapper swigjnienv(this) ; + JNIEnv * jenv = swigjnienv.getJNIEnv() ; + jobject swigjobj = (jobject) NULL ; + jint jptime ; + jint jrate ; + jint jchannels ; + + if (!swig_override[0]) { + return ProxyAudioConsumer::prepare(ptime,rate,channels); + } + swigjobj = swig_get_self(jenv); + if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) { + jptime = (jint) ptime; + jrate = (jint) rate; + jchannels = (jint) channels; + jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[0], swigjobj, jptime, jrate, jchannels); + 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_ProxyAudioConsumer::start() { + int c_result = SwigValueInit< int >() ; + jint jresult = 0 ; + JNIEnvWrapper swigjnienv(this) ; + JNIEnv * jenv = swigjnienv.getJNIEnv() ; + jobject swigjobj = (jobject) NULL ; + + if (!swig_override[1]) { + return ProxyAudioConsumer::start(); + } + swigjobj = swig_get_self(jenv); + if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) { + jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[1], swigjobj); + 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_ProxyAudioConsumer::pause() { + int c_result = SwigValueInit< int >() ; + jint jresult = 0 ; + JNIEnvWrapper swigjnienv(this) ; + JNIEnv * jenv = swigjnienv.getJNIEnv() ; + jobject swigjobj = (jobject) NULL ; + + if (!swig_override[2]) { + return ProxyAudioConsumer::pause(); + } + swigjobj = swig_get_self(jenv); + if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) { + jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[2], swigjobj); + 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_ProxyAudioConsumer::stop() { + int c_result = SwigValueInit< int >() ; + jint jresult = 0 ; + JNIEnvWrapper swigjnienv(this) ; + JNIEnv * jenv = swigjnienv.getJNIEnv() ; + jobject swigjobj = (jobject) NULL ; + + if (!swig_override[3]) { + return ProxyAudioConsumer::stop(); + } + swigjobj = swig_get_self(jenv); + if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) { + jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[3], swigjobj); + 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_ProxyAudioConsumer::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[] = { + { + "prepare", "(III)I", NULL + }, + { + "start", "()I", NULL + }, + { + "pause", "()I", NULL + }, + { + "stop", "()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/ProxyAudioConsumer"); + if (!baseclass) return; + baseclass = (jclass) jenv->NewGlobalRef(baseclass); + } + bool derived = (jenv->IsSameObject(baseclass, jcls) ? false : true); + for (int i = 0; i < 4; ++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_ProxyAudioProducer::SwigDirector_ProxyAudioProducer(JNIEnv *jenv) : ProxyAudioProducer(), Swig::Director(jenv) { +} + +SwigDirector_ProxyAudioProducer::~SwigDirector_ProxyAudioProducer() { + swig_disconnect_director_self("swigDirectorDisconnect"); +} + + +int SwigDirector_ProxyAudioProducer::prepare(int ptime, int rate, int channels) { + int c_result = SwigValueInit< int >() ; + jint jresult = 0 ; + JNIEnvWrapper swigjnienv(this) ; + JNIEnv * jenv = swigjnienv.getJNIEnv() ; + jobject swigjobj = (jobject) NULL ; + jint jptime ; + jint jrate ; + jint jchannels ; + + if (!swig_override[0]) { + return ProxyAudioProducer::prepare(ptime,rate,channels); + } + swigjobj = swig_get_self(jenv); + if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) { + jptime = (jint) ptime; + jrate = (jint) rate; + jchannels = (jint) channels; + jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[4], swigjobj, jptime, jrate, jchannels); + 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_ProxyAudioProducer::start() { + int c_result = SwigValueInit< int >() ; + jint jresult = 0 ; + JNIEnvWrapper swigjnienv(this) ; + JNIEnv * jenv = swigjnienv.getJNIEnv() ; + jobject swigjobj = (jobject) NULL ; + + if (!swig_override[1]) { + return ProxyAudioProducer::start(); + } + swigjobj = swig_get_self(jenv); + if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) { + jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[5], swigjobj); + 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_ProxyAudioProducer::pause() { + int c_result = SwigValueInit< int >() ; + jint jresult = 0 ; + JNIEnvWrapper swigjnienv(this) ; + JNIEnv * jenv = swigjnienv.getJNIEnv() ; + jobject swigjobj = (jobject) NULL ; + + if (!swig_override[2]) { + return ProxyAudioProducer::pause(); + } + swigjobj = swig_get_self(jenv); + if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) { + jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[6], swigjobj); + 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_ProxyAudioProducer::stop() { + int c_result = SwigValueInit< int >() ; + jint jresult = 0 ; + JNIEnvWrapper swigjnienv(this) ; + JNIEnv * jenv = swigjnienv.getJNIEnv() ; + jobject swigjobj = (jobject) NULL ; + + if (!swig_override[3]) { + return ProxyAudioProducer::stop(); + } + swigjobj = swig_get_self(jenv); + if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) { + jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[7], swigjobj); + 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_ProxyAudioProducer::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[] = { + { + "prepare", "(III)I", NULL + }, + { + "start", "()I", NULL + }, + { + "pause", "()I", NULL + }, + { + "stop", "()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/ProxyAudioProducer"); + if (!baseclass) return; + baseclass = (jclass) jenv->NewGlobalRef(baseclass); + } + bool derived = (jenv->IsSameObject(baseclass, jcls) ? false : true); + for (int i = 0; i < 4; ++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_SipCallback::SwigDirector_SipCallback(JNIEnv *jenv) : SipCallback(), Swig::Director(jenv) { } @@ -449,7 +745,7 @@ int SwigDirector_SipCallback::OnDialogEvent(DialogEvent const *e) { swigjobj = swig_get_self(jenv); if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) { *((DialogEvent **)&je) = (DialogEvent *) e; - jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[0], swigjobj, je); + jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[8], swigjobj, je); if (jenv->ExceptionOccurred()) return c_result; c_result = (int)jresult; } else { @@ -473,7 +769,7 @@ int SwigDirector_SipCallback::OnStackEvent(StackEvent const *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); + jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[9], swigjobj, je); if (jenv->ExceptionOccurred()) return c_result; c_result = (int)jresult; } else { @@ -497,7 +793,7 @@ int SwigDirector_SipCallback::OnMessagingEvent(MessagingEvent const *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[2], swigjobj, je); + jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[10], swigjobj, je); if (jenv->ExceptionOccurred()) return c_result; c_result = (int)jresult; } else { @@ -521,7 +817,7 @@ int SwigDirector_SipCallback::OnOptionsEvent(OptionsEvent const *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[3], swigjobj, je); + jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[11], swigjobj, je); if (jenv->ExceptionOccurred()) return c_result; c_result = (int)jresult; } else { @@ -545,7 +841,7 @@ int SwigDirector_SipCallback::OnPublicationEvent(PublicationEvent const *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[4], swigjobj, je); + jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[12], swigjobj, je); if (jenv->ExceptionOccurred()) return c_result; c_result = (int)jresult; } else { @@ -569,7 +865,7 @@ int SwigDirector_SipCallback::OnRegistrationEvent(RegistrationEvent const *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[5], swigjobj, je); + jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[13], swigjobj, je); if (jenv->ExceptionOccurred()) return c_result; c_result = (int)jresult; } else { @@ -593,7 +889,7 @@ int SwigDirector_SipCallback::OnSubscriptionEvent(SubscriptionEvent const *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[6], swigjobj, je); + jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[14], swigjobj, je); if (jenv->ExceptionOccurred()) return c_result; c_result = (int)jresult; } else { @@ -875,7 +1171,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; @@ -898,7 +1194,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; @@ -929,7 +1225,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; @@ -959,7 +1255,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; @@ -1038,7 +1334,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; } @@ -1565,6 +1861,68 @@ SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipSession_1getI } +SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_new_1CallSession(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { + jlong jresult = 0 ; + SipStack *arg1 = (SipStack *) 0 ; + CallSession *result = 0 ; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(SipStack **)&jarg1; + result = (CallSession *)new CallSession(arg1); + *(CallSession **)&jresult = result; + return jresult; +} + + +SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_delete_1CallSession(JNIEnv *jenv, jclass jcls, jlong jarg1) { + CallSession *arg1 = (CallSession *) 0 ; + + (void)jenv; + (void)jcls; + arg1 = *(CallSession **)&jarg1; + delete arg1; +} + + +SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_CallSession_1Call(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) { + jboolean jresult = 0 ; + CallSession *arg1 = (CallSession *) 0 ; + char *arg2 = (char *) 0 ; + bool result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(CallSession **)&jarg1; + arg2 = 0; + if (jarg2) { + arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0); + if (!arg2) return 0; + } + result = (bool)(arg1)->Call((char const *)arg2); + jresult = (jboolean)result; + if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); + return jresult; +} + + +SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_CallSession_1Hangup(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { + jboolean jresult = 0 ; + CallSession *arg1 = (CallSession *) 0 ; + bool result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(CallSession **)&jarg1; + result = (bool)(arg1)->Hangup(); + jresult = (jboolean)result; + return jresult; +} + + SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_new_1MessagingSession(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { jlong jresult = 0 ; SipStack *arg1 = (SipStack *) 0 ; @@ -1852,6 +2210,442 @@ SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SubscriptionS } +SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_new_1ProxyAudioConsumer(JNIEnv *jenv, jclass jcls) { + jlong jresult = 0 ; + ProxyAudioConsumer *result = 0 ; + + (void)jenv; + (void)jcls; + result = (ProxyAudioConsumer *)new SwigDirector_ProxyAudioConsumer(jenv); + *(ProxyAudioConsumer **)&jresult = result; + return jresult; +} + + +SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_delete_1ProxyAudioConsumer(JNIEnv *jenv, jclass jcls, jlong jarg1) { + ProxyAudioConsumer *arg1 = (ProxyAudioConsumer *) 0 ; + + (void)jenv; + (void)jcls; + arg1 = *(ProxyAudioConsumer **)&jarg1; + delete arg1; +} + + +SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyAudioConsumer_1prepare(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jint jarg3, jint jarg4) { + jint jresult = 0 ; + ProxyAudioConsumer *arg1 = (ProxyAudioConsumer *) 0 ; + int arg2 ; + int arg3 ; + int arg4 ; + int result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(ProxyAudioConsumer **)&jarg1; + arg2 = (int)jarg2; + arg3 = (int)jarg3; + arg4 = (int)jarg4; + result = (int)(arg1)->prepare(arg2,arg3,arg4); + jresult = (jint)result; + return jresult; +} + + +SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyAudioConsumer_1prepareSwigExplicitProxyAudioConsumer(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jint jarg3, jint jarg4) { + jint jresult = 0 ; + ProxyAudioConsumer *arg1 = (ProxyAudioConsumer *) 0 ; + int arg2 ; + int arg3 ; + int arg4 ; + int result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(ProxyAudioConsumer **)&jarg1; + arg2 = (int)jarg2; + arg3 = (int)jarg3; + arg4 = (int)jarg4; + result = (int)(arg1)->ProxyAudioConsumer::prepare(arg2,arg3,arg4); + jresult = (jint)result; + return jresult; +} + + +SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyAudioConsumer_1start(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { + jint jresult = 0 ; + ProxyAudioConsumer *arg1 = (ProxyAudioConsumer *) 0 ; + int result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(ProxyAudioConsumer **)&jarg1; + result = (int)(arg1)->start(); + jresult = (jint)result; + return jresult; +} + + +SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyAudioConsumer_1startSwigExplicitProxyAudioConsumer(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { + jint jresult = 0 ; + ProxyAudioConsumer *arg1 = (ProxyAudioConsumer *) 0 ; + int result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(ProxyAudioConsumer **)&jarg1; + result = (int)(arg1)->ProxyAudioConsumer::start(); + jresult = (jint)result; + return jresult; +} + + +SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyAudioConsumer_1pause(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { + jint jresult = 0 ; + ProxyAudioConsumer *arg1 = (ProxyAudioConsumer *) 0 ; + int result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(ProxyAudioConsumer **)&jarg1; + result = (int)(arg1)->pause(); + jresult = (jint)result; + return jresult; +} + + +SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyAudioConsumer_1pauseSwigExplicitProxyAudioConsumer(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { + jint jresult = 0 ; + ProxyAudioConsumer *arg1 = (ProxyAudioConsumer *) 0 ; + int result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(ProxyAudioConsumer **)&jarg1; + result = (int)(arg1)->ProxyAudioConsumer::pause(); + jresult = (jint)result; + return jresult; +} + + +SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyAudioConsumer_1stop(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { + jint jresult = 0 ; + ProxyAudioConsumer *arg1 = (ProxyAudioConsumer *) 0 ; + int result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(ProxyAudioConsumer **)&jarg1; + result = (int)(arg1)->stop(); + jresult = (jint)result; + return jresult; +} + + +SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyAudioConsumer_1stopSwigExplicitProxyAudioConsumer(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { + jint jresult = 0 ; + ProxyAudioConsumer *arg1 = (ProxyAudioConsumer *) 0 ; + int result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(ProxyAudioConsumer **)&jarg1; + result = (int)(arg1)->ProxyAudioConsumer::stop(); + jresult = (jint)result; + return jresult; +} + + +SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyAudioConsumer_1setActivate(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { + ProxyAudioConsumer *arg1 = (ProxyAudioConsumer *) 0 ; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(ProxyAudioConsumer **)&jarg1; + (arg1)->setActivate(); +} + + +SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyAudioConsumer_1pull(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jbyteArray jarg2, jlong jarg3) { + jlong jresult = 0 ; + ProxyAudioConsumer *arg1 = (ProxyAudioConsumer *) 0 ; + void *arg2 = (void *) 0 ; + unsigned int arg3 ; + unsigned int result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(ProxyAudioConsumer **)&jarg1; + + arg2 = jenv->GetDirectBufferAddress(jarg2); + + arg3 = (unsigned int)jarg3; + result = (unsigned int)(arg1)->pull(arg2,arg3); + jresult = (jlong)result; + return jresult; +} + + +SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyAudioConsumer_1registerPlugin(JNIEnv *jenv, jclass jcls) { + jboolean jresult = 0 ; + bool result; + + (void)jenv; + (void)jcls; + result = (bool)ProxyAudioConsumer::registerPlugin(); + jresult = (jboolean)result; + return jresult; +} + + +SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyAudioConsumer_1director_1connect(JNIEnv *jenv, jclass jcls, jobject jself, jlong objarg, jboolean jswig_mem_own, jboolean jweak_global) { + ProxyAudioConsumer *obj = *((ProxyAudioConsumer **)&objarg); + (void)jcls; + SwigDirector_ProxyAudioConsumer *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_ProxyAudioConsumer_1change_1ownership(JNIEnv *jenv, jclass jcls, jobject jself, jlong objarg, jboolean jtake_or_release) { + ProxyAudioConsumer *obj = *((ProxyAudioConsumer **)&objarg); + SwigDirector_ProxyAudioConsumer *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_1ProxyAudioProducer(JNIEnv *jenv, jclass jcls) { + jlong jresult = 0 ; + ProxyAudioProducer *result = 0 ; + + (void)jenv; + (void)jcls; + result = (ProxyAudioProducer *)new SwigDirector_ProxyAudioProducer(jenv); + *(ProxyAudioProducer **)&jresult = result; + return jresult; +} + + +SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_delete_1ProxyAudioProducer(JNIEnv *jenv, jclass jcls, jlong jarg1) { + ProxyAudioProducer *arg1 = (ProxyAudioProducer *) 0 ; + + (void)jenv; + (void)jcls; + arg1 = *(ProxyAudioProducer **)&jarg1; + delete arg1; +} + + +SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyAudioProducer_1prepare(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jint jarg3, jint jarg4) { + jint jresult = 0 ; + ProxyAudioProducer *arg1 = (ProxyAudioProducer *) 0 ; + int arg2 ; + int arg3 ; + int arg4 ; + int result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(ProxyAudioProducer **)&jarg1; + arg2 = (int)jarg2; + arg3 = (int)jarg3; + arg4 = (int)jarg4; + result = (int)(arg1)->prepare(arg2,arg3,arg4); + jresult = (jint)result; + return jresult; +} + + +SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyAudioProducer_1prepareSwigExplicitProxyAudioProducer(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jint jarg3, jint jarg4) { + jint jresult = 0 ; + ProxyAudioProducer *arg1 = (ProxyAudioProducer *) 0 ; + int arg2 ; + int arg3 ; + int arg4 ; + int result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(ProxyAudioProducer **)&jarg1; + arg2 = (int)jarg2; + arg3 = (int)jarg3; + arg4 = (int)jarg4; + result = (int)(arg1)->ProxyAudioProducer::prepare(arg2,arg3,arg4); + jresult = (jint)result; + return jresult; +} + + +SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyAudioProducer_1start(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { + jint jresult = 0 ; + ProxyAudioProducer *arg1 = (ProxyAudioProducer *) 0 ; + int result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(ProxyAudioProducer **)&jarg1; + result = (int)(arg1)->start(); + jresult = (jint)result; + return jresult; +} + + +SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyAudioProducer_1startSwigExplicitProxyAudioProducer(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { + jint jresult = 0 ; + ProxyAudioProducer *arg1 = (ProxyAudioProducer *) 0 ; + int result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(ProxyAudioProducer **)&jarg1; + result = (int)(arg1)->ProxyAudioProducer::start(); + jresult = (jint)result; + return jresult; +} + + +SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyAudioProducer_1pause(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { + jint jresult = 0 ; + ProxyAudioProducer *arg1 = (ProxyAudioProducer *) 0 ; + int result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(ProxyAudioProducer **)&jarg1; + result = (int)(arg1)->pause(); + jresult = (jint)result; + return jresult; +} + + +SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyAudioProducer_1pauseSwigExplicitProxyAudioProducer(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { + jint jresult = 0 ; + ProxyAudioProducer *arg1 = (ProxyAudioProducer *) 0 ; + int result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(ProxyAudioProducer **)&jarg1; + result = (int)(arg1)->ProxyAudioProducer::pause(); + jresult = (jint)result; + return jresult; +} + + +SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyAudioProducer_1stop(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { + jint jresult = 0 ; + ProxyAudioProducer *arg1 = (ProxyAudioProducer *) 0 ; + int result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(ProxyAudioProducer **)&jarg1; + result = (int)(arg1)->stop(); + jresult = (jint)result; + return jresult; +} + + +SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyAudioProducer_1stopSwigExplicitProxyAudioProducer(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { + jint jresult = 0 ; + ProxyAudioProducer *arg1 = (ProxyAudioProducer *) 0 ; + int result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(ProxyAudioProducer **)&jarg1; + result = (int)(arg1)->ProxyAudioProducer::stop(); + jresult = (jint)result; + return jresult; +} + + +SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyAudioProducer_1setActivate(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { + ProxyAudioProducer *arg1 = (ProxyAudioProducer *) 0 ; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(ProxyAudioProducer **)&jarg1; + (arg1)->setActivate(); +} + + +SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyAudioProducer_1push(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jbyteArray jarg2, jlong jarg3) { + jint jresult = 0 ; + ProxyAudioProducer *arg1 = (ProxyAudioProducer *) 0 ; + void *arg2 = (void *) 0 ; + unsigned int arg3 ; + int result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(ProxyAudioProducer **)&jarg1; + + arg2 = jenv->GetDirectBufferAddress(jarg2); + + arg3 = (unsigned int)jarg3; + result = (int)(arg1)->push((void const *)arg2,arg3); + jresult = (jint)result; + return jresult; +} + + +SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyAudioProducer_1registerPlugin(JNIEnv *jenv, jclass jcls) { + jboolean jresult = 0 ; + bool result; + + (void)jenv; + (void)jcls; + result = (bool)ProxyAudioProducer::registerPlugin(); + jresult = (jboolean)result; + return jresult; +} + + +SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyAudioProducer_1director_1connect(JNIEnv *jenv, jclass jcls, jobject jself, jlong objarg, jboolean jswig_mem_own, jboolean jweak_global) { + ProxyAudioProducer *obj = *((ProxyAudioProducer **)&objarg); + (void)jcls; + SwigDirector_ProxyAudioProducer *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_ProxyAudioProducer_1change_1ownership(JNIEnv *jenv, jclass jcls, jobject jself, jlong objarg, jboolean jtake_or_release) { + ProxyAudioProducer *obj = *((ProxyAudioProducer **)&objarg); + SwigDirector_ProxyAudioProducer *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_1SipCallback(JNIEnv *jenv, jclass jcls) { jlong jresult = 0 ; SipCallback *result = 0 ; @@ -2642,6 +3436,14 @@ SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SWIGSubscription return baseptr; } +SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SWIGCallSessionUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jlong baseptr = 0; + (void)jenv; + (void)jcls; + *(SipSession **)&baseptr = *(CallSession **)&jarg1; + return baseptr; +} + SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SWIGMessagingSessionUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { jlong baseptr = 0; (void)jenv; @@ -2696,7 +3498,31 @@ SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_swig_1module_1ini static struct { const char *method; const char *signature; - } methods[7] = { + } methods[15] = { + { + "SwigDirector_ProxyAudioConsumer_prepare", "(Lorg/doubango/tinyWRAP/ProxyAudioConsumer;III)I" + }, + { + "SwigDirector_ProxyAudioConsumer_start", "(Lorg/doubango/tinyWRAP/ProxyAudioConsumer;)I" + }, + { + "SwigDirector_ProxyAudioConsumer_pause", "(Lorg/doubango/tinyWRAP/ProxyAudioConsumer;)I" + }, + { + "SwigDirector_ProxyAudioConsumer_stop", "(Lorg/doubango/tinyWRAP/ProxyAudioConsumer;)I" + }, + { + "SwigDirector_ProxyAudioProducer_prepare", "(Lorg/doubango/tinyWRAP/ProxyAudioProducer;III)I" + }, + { + "SwigDirector_ProxyAudioProducer_start", "(Lorg/doubango/tinyWRAP/ProxyAudioProducer;)I" + }, + { + "SwigDirector_ProxyAudioProducer_pause", "(Lorg/doubango/tinyWRAP/ProxyAudioProducer;)I" + }, + { + "SwigDirector_ProxyAudioProducer_stop", "(Lorg/doubango/tinyWRAP/ProxyAudioProducer;)I" + }, { "SwigDirector_SipCallback_OnDialogEvent", "(Lorg/doubango/tinyWRAP/SipCallback;J)I" }, diff --git a/trunk/bindings/java/tinyWRAP_wrap.h b/trunk/bindings/java/tinyWRAP_wrap.h index d7fbc26c..58a2bd86 100644 --- a/trunk/bindings/java/tinyWRAP_wrap.h +++ b/trunk/bindings/java/tinyWRAP_wrap.h @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make @@ -11,6 +11,42 @@ #ifndef SWIG_tinyWRAP_WRAP_H_ #define SWIG_tinyWRAP_WRAP_H_ +class SwigDirector_ProxyAudioConsumer : public ProxyAudioConsumer, public Swig::Director { + +public: + void swig_connect_director(JNIEnv *jenv, jobject jself, jclass jcls, bool swig_mem_own, bool weak_global); + SwigDirector_ProxyAudioConsumer(JNIEnv *jenv); + virtual ~SwigDirector_ProxyAudioConsumer(); + virtual int prepare(int ptime, int rate, int channels); + virtual int start(); + virtual int pause(); + virtual int stop(); +public: + bool swig_overrides(int n) { + return (n < 4 ? swig_override[n] : false); + } +protected: + bool swig_override[4]; +}; + +class SwigDirector_ProxyAudioProducer : public ProxyAudioProducer, public Swig::Director { + +public: + void swig_connect_director(JNIEnv *jenv, jobject jself, jclass jcls, bool swig_mem_own, bool weak_global); + SwigDirector_ProxyAudioProducer(JNIEnv *jenv); + virtual ~SwigDirector_ProxyAudioProducer(); + virtual int prepare(int ptime, int rate, int channels); + virtual int start(); + virtual int pause(); + virtual int stop(); +public: + bool swig_overrides(int n) { + return (n < 4 ? swig_override[n] : false); + } +protected: + bool swig_override[4]; +}; + class SwigDirector_SipCallback : public SipCallback, public Swig::Director { public: diff --git a/trunk/bindings/java/tsip_event_type_t.java b/trunk/bindings/java/tsip_event_type_t.java index 819967fb..6527ee1e 100644 --- a/trunk/bindings/java/tsip_event_type_t.java +++ b/trunk/bindings/java/tsip_event_type_t.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/trunk/bindings/java/tsip_message_event_type_t.java b/trunk/bindings/java/tsip_message_event_type_t.java index da69c10b..280845ac 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.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/trunk/bindings/java/tsip_options_event_type_t.java b/trunk/bindings/java/tsip_options_event_type_t.java index 6d1d33f0..70166763 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.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/trunk/bindings/java/tsip_publish_event_type_t.java b/trunk/bindings/java/tsip_publish_event_type_t.java index e5d47e39..a9ec14a0 100644 --- a/trunk/bindings/java/tsip_publish_event_type_t.java +++ b/trunk/bindings/java/tsip_publish_event_type_t.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/trunk/bindings/java/tsip_register_event_type_t.java b/trunk/bindings/java/tsip_register_event_type_t.java index 039f2ead..d8715ea9 100644 --- a/trunk/bindings/java/tsip_register_event_type_t.java +++ b/trunk/bindings/java/tsip_register_event_type_t.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/trunk/bindings/java/tsip_subscribe_event_type_t.java b/trunk/bindings/java/tsip_subscribe_event_type_t.java index 34231525..5091b658 100644 --- a/trunk/bindings/java/tsip_subscribe_event_type_t.java +++ b/trunk/bindings/java/tsip_subscribe_event_type_t.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/trunk/bindings/perl/tinyWRAP.pm b/trunk/bindings/perl/tinyWRAP.pm index 38d73836..5001fea0 100644 --- a/trunk/bindings/perl/tinyWRAP.pm +++ b/trunk/bindings/perl/tinyWRAP.pm @@ -1,5 +1,5 @@ # This file was automatically generated by SWIG (http://www.swig.org). -# Version 1.3.40 +# Version 1.3.39 # # Do not make changes to this file unless you know what you are doing--modify # the SWIG interface file instead. @@ -480,6 +480,45 @@ sub ACQUIRE { } +############# Class : tinyWRAP::CallSession ############## + +package tinyWRAP::CallSession; +use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); +@ISA = qw( tinyWRAP::SipSession tinyWRAP ); +%OWNER = (); +%ITERATORS = (); +sub new { + my $pkg = shift; + my $self = tinyWRAPc::new_CallSession(@_); + 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_CallSession($self); + delete $OWNER{$self}; + } +} + +*Call = *tinyWRAPc::CallSession_Call; +*Hangup = *tinyWRAPc::CallSession_Hangup; +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::MessagingSession ############## package tinyWRAP::MessagingSession; @@ -675,6 +714,94 @@ sub ACQUIRE { } +############# Class : tinyWRAP::ProxyAudioConsumer ############## + +package tinyWRAP::ProxyAudioConsumer; +use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); +@ISA = qw( tinyWRAP ); +%OWNER = (); +%ITERATORS = (); +sub new { + my $pkg = shift; + my $self = tinyWRAPc::new_ProxyAudioConsumer(@_); + 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_ProxyAudioConsumer($self); + delete $OWNER{$self}; + } +} + +*prepare = *tinyWRAPc::ProxyAudioConsumer_prepare; +*start = *tinyWRAPc::ProxyAudioConsumer_start; +*pause = *tinyWRAPc::ProxyAudioConsumer_pause; +*stop = *tinyWRAPc::ProxyAudioConsumer_stop; +*setActivate = *tinyWRAPc::ProxyAudioConsumer_setActivate; +*pull = *tinyWRAPc::ProxyAudioConsumer_pull; +*registerPlugin = *tinyWRAPc::ProxyAudioConsumer_registerPlugin; +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::ProxyAudioProducer ############## + +package tinyWRAP::ProxyAudioProducer; +use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); +@ISA = qw( tinyWRAP ); +%OWNER = (); +%ITERATORS = (); +sub new { + my $pkg = shift; + my $self = tinyWRAPc::new_ProxyAudioProducer(@_); + 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_ProxyAudioProducer($self); + delete $OWNER{$self}; + } +} + +*prepare = *tinyWRAPc::ProxyAudioProducer_prepare; +*start = *tinyWRAPc::ProxyAudioProducer_start; +*pause = *tinyWRAPc::ProxyAudioProducer_pause; +*stop = *tinyWRAPc::ProxyAudioProducer_stop; +*setActivate = *tinyWRAPc::ProxyAudioProducer_setActivate; +*push = *tinyWRAPc::ProxyAudioProducer_push; +*registerPlugin = *tinyWRAPc::ProxyAudioProducer_registerPlugin; +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::SipCallback ############## package tinyWRAP::SipCallback; diff --git a/trunk/bindings/perl/tinyWRAP_wrap.cxx b/trunk/bindings/perl/tinyWRAP_wrap.cxx index 5814f9e8..1c1430a3 100644 --- a/trunk/bindings/perl/tinyWRAP_wrap.cxx +++ b/trunk/bindings/perl/tinyWRAP_wrap.cxx @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make @@ -35,1472 +35,1455 @@ template T SwigValueInit() { } #endif -/* ----------------------------------------------------------------------------- - * This section contains generic SWIG labels for method/variable - * declarations/attributes, and other compiler dependent labels. - * ----------------------------------------------------------------------------- */ - -/* template workaround for compilers that cannot correctly implement the C++ standard */ -#ifndef SWIGTEMPLATEDISAMBIGUATOR -# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) -# define SWIGTEMPLATEDISAMBIGUATOR template -# elif defined(__HP_aCC) -/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ -/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ -# define SWIGTEMPLATEDISAMBIGUATOR template -# else -# define SWIGTEMPLATEDISAMBIGUATOR -# endif -#endif - -/* inline attribute */ -#ifndef SWIGINLINE -# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) -# define SWIGINLINE inline -# else -# define SWIGINLINE -# endif -#endif - -/* attribute recognised by some compilers to avoid 'unused' warnings */ -#ifndef SWIGUNUSED -# if defined(__GNUC__) -# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) -# define SWIGUNUSED __attribute__ ((__unused__)) -# else -# define SWIGUNUSED -# endif -# elif defined(__ICC) -# define SWIGUNUSED __attribute__ ((__unused__)) -# else -# define SWIGUNUSED -# endif -#endif - -#ifndef SWIG_MSC_UNSUPPRESS_4505 -# if defined(_MSC_VER) -# pragma warning(disable : 4505) /* unreferenced local function has been removed */ -# endif -#endif - -#ifndef SWIGUNUSEDPARM -# ifdef __cplusplus -# define SWIGUNUSEDPARM(p) -# else -# define SWIGUNUSEDPARM(p) p SWIGUNUSED -# endif -#endif - -/* internal SWIG method */ -#ifndef SWIGINTERN -# define SWIGINTERN static SWIGUNUSED -#endif - -/* internal inline SWIG method */ -#ifndef SWIGINTERNINLINE -# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE -#endif - -/* exporting methods */ -#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) -# ifndef GCC_HASCLASSVISIBILITY -# define GCC_HASCLASSVISIBILITY -# endif -#endif - -#ifndef SWIGEXPORT -# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) -# if defined(STATIC_LINKED) -# define SWIGEXPORT -# else -# define SWIGEXPORT __declspec(dllexport) -# endif -# else -# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) -# define SWIGEXPORT __attribute__ ((visibility("default"))) -# else -# define SWIGEXPORT -# endif -# endif -#endif - -/* calling conventions for Windows */ -#ifndef SWIGSTDCALL -# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) -# define SWIGSTDCALL __stdcall -# else -# define SWIGSTDCALL -# endif -#endif - -/* Deal with Microsoft's attempt at deprecating C standard runtime functions */ -#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) -# define _CRT_SECURE_NO_DEPRECATE -#endif - -/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ -#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) -# define _SCL_SECURE_NO_DEPRECATE -#endif - - -/* ----------------------------------------------------------------------------- - * swigrun.swg - * - * This file contains generic C API SWIG runtime support for pointer - * type checking. - * ----------------------------------------------------------------------------- */ - -/* This should only be incremented when either the layout of swig_type_info changes, - or for whatever reason, the runtime changes incompatibly */ -#define SWIG_RUNTIME_VERSION "4" - -/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */ -#ifdef SWIG_TYPE_TABLE -# define SWIG_QUOTE_STRING(x) #x -# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x) -# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE) -#else -# define SWIG_TYPE_TABLE_NAME -#endif - -/* - You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for - creating a static or dynamic library from the SWIG runtime code. - In 99.9% of the cases, SWIG just needs to declare them as 'static'. - - But only do this if strictly necessary, ie, if you have problems - with your compiler or suchlike. -*/ - -#ifndef SWIGRUNTIME -# define SWIGRUNTIME SWIGINTERN -#endif - -#ifndef SWIGRUNTIMEINLINE -# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE -#endif - -/* Generic buffer size */ -#ifndef SWIG_BUFFER_SIZE -# define SWIG_BUFFER_SIZE 1024 -#endif - -/* Flags for pointer conversions */ -#define SWIG_POINTER_DISOWN 0x1 -#define SWIG_CAST_NEW_MEMORY 0x2 - -/* Flags for new pointer objects */ -#define SWIG_POINTER_OWN 0x1 - - -/* - Flags/methods for returning states. - - The SWIG conversion methods, as ConvertPtr, return and integer - that tells if the conversion was successful or not. And if not, - an error code can be returned (see swigerrors.swg for the codes). - - Use the following macros/flags to set or process the returning - states. - - In old versions of SWIG, code such as the following was usually written: - - if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) { - // success code - } else { - //fail code - } - - Now you can be more explicit: - - int res = SWIG_ConvertPtr(obj,vptr,ty.flags); - if (SWIG_IsOK(res)) { - // success code - } else { - // fail code - } - - which is the same really, but now you can also do - - Type *ptr; - int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags); - if (SWIG_IsOK(res)) { - // success code - if (SWIG_IsNewObj(res) { - ... - delete *ptr; - } else { - ... - } - } else { - // fail code - } - - I.e., now SWIG_ConvertPtr can return new objects and you can - identify the case and take care of the deallocation. Of course that - also requires SWIG_ConvertPtr to return new result values, such as - - int SWIG_ConvertPtr(obj, ptr,...) { - if () { - if () { - *ptr = ; - return SWIG_NEWOBJ; - } else { - *ptr = ; - return SWIG_OLDOBJ; - } - } else { - return SWIG_BADOBJ; - } - } - - Of course, returning the plain '0(success)/-1(fail)' still works, but you can be - more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the - SWIG errors code. - - Finally, if the SWIG_CASTRANK_MODE is enabled, the result code - allows to return the 'cast rank', for example, if you have this - - int food(double) - int fooi(int); - - and you call - - food(1) // cast rank '1' (1 -> 1.0) - fooi(1) // cast rank '0' - - just use the SWIG_AddCast()/SWIG_CheckState() -*/ - -#define SWIG_OK (0) -#define SWIG_ERROR (-1) -#define SWIG_IsOK(r) (r >= 0) -#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) - -/* The CastRankLimit says how many bits are used for the cast rank */ -#define SWIG_CASTRANKLIMIT (1 << 8) -/* The NewMask denotes the object was created (using new/malloc) */ -#define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1) -/* The TmpMask is for in/out typemaps that use temporal objects */ -#define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1) -/* Simple returning values */ -#define SWIG_BADOBJ (SWIG_ERROR) -#define SWIG_OLDOBJ (SWIG_OK) -#define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK) -#define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK) -/* Check, add and del mask methods */ -#define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r) -#define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r) -#define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK)) -#define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r) -#define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r) -#define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK)) - -/* Cast-Rank Mode */ -#if defined(SWIG_CASTRANK_MODE) -# ifndef SWIG_TypeRank -# define SWIG_TypeRank unsigned long -# endif -# ifndef SWIG_MAXCASTRANK /* Default cast allowed */ -# define SWIG_MAXCASTRANK (2) -# endif -# define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1) -# define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK) -SWIGINTERNINLINE int SWIG_AddCast(int r) { - return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r; -} -SWIGINTERNINLINE int SWIG_CheckState(int r) { - return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; -} -#else /* no cast-rank mode */ -# define SWIG_AddCast -# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) -#endif - - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -typedef void *(*swig_converter_func)(void *, int *); -typedef struct swig_type_info *(*swig_dycast_func)(void **); - -/* Structure to store information on one type */ -typedef struct swig_type_info { - const char *name; /* mangled name of this type */ - const char *str; /* human readable name of this type */ - swig_dycast_func dcast; /* dynamic cast function down a hierarchy */ - struct swig_cast_info *cast; /* linked list of types that can cast into this type */ - void *clientdata; /* language specific type data */ - int owndata; /* flag if the structure owns the clientdata */ -} swig_type_info; - -/* Structure to store a type and conversion function used for casting */ -typedef struct swig_cast_info { - swig_type_info *type; /* pointer to type that is equivalent to this type */ - swig_converter_func converter; /* function to cast the void pointers */ - struct swig_cast_info *next; /* pointer to next cast in linked list */ - struct swig_cast_info *prev; /* pointer to the previous cast */ -} swig_cast_info; - -/* Structure used to store module information - * Each module generates one structure like this, and the runtime collects - * all of these structures and stores them in a circularly linked list.*/ -typedef struct swig_module_info { - swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */ - size_t size; /* Number of types in this module */ - struct swig_module_info *next; /* Pointer to next element in circularly linked list */ - swig_type_info **type_initial; /* Array of initially generated type structures */ - swig_cast_info **cast_initial; /* Array of initially generated casting structures */ - void *clientdata; /* Language specific module data */ -} swig_module_info; - -/* - Compare two type names skipping the space characters, therefore - "char*" == "char *" and "Class" == "Class", etc. - - Return 0 when the two name types are equivalent, as in - strncmp, but skipping ' '. -*/ -SWIGRUNTIME int -SWIG_TypeNameComp(const char *f1, const char *l1, - const char *f2, const char *l2) { - for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) { - while ((*f1 == ' ') && (f1 != l1)) ++f1; - while ((*f2 == ' ') && (f2 != l2)) ++f2; - if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1; - } - return (int)((l1 - f1) - (l2 - f2)); -} - -/* - Check type equivalence in a name list like ||... - Return 0 if not equal, 1 if equal -*/ -SWIGRUNTIME int -SWIG_TypeEquiv(const char *nb, const char *tb) { - int equiv = 0; - const char* te = tb + strlen(tb); - const char* ne = nb; - while (!equiv && *ne) { - for (nb = ne; *ne; ++ne) { - if (*ne == '|') break; - } - equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; - if (*ne) ++ne; - } - return equiv; -} - -/* - Check type equivalence in a name list like ||... - Return 0 if equal, -1 if nb < tb, 1 if nb > tb -*/ -SWIGRUNTIME int -SWIG_TypeCompare(const char *nb, const char *tb) { - int equiv = 0; - const char* te = tb + strlen(tb); - const char* ne = nb; - while (!equiv && *ne) { - for (nb = ne; *ne; ++ne) { - if (*ne == '|') break; - } - equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; - if (*ne) ++ne; - } - return equiv; -} - - -/* - Check the typename -*/ -SWIGRUNTIME swig_cast_info * -SWIG_TypeCheck(const char *c, swig_type_info *ty) { - if (ty) { - swig_cast_info *iter = ty->cast; - while (iter) { - if (strcmp(iter->type->name, c) == 0) { - if (iter == ty->cast) - return iter; - /* Move iter to the top of the linked list */ - iter->prev->next = iter->next; - if (iter->next) - iter->next->prev = iter->prev; - iter->next = ty->cast; - iter->prev = 0; - if (ty->cast) ty->cast->prev = iter; - ty->cast = iter; - return iter; - } - iter = iter->next; - } - } - return 0; -} - -/* - Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison -*/ -SWIGRUNTIME swig_cast_info * -SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) { - if (ty) { - swig_cast_info *iter = ty->cast; - while (iter) { - if (iter->type == from) { - if (iter == ty->cast) - return iter; - /* Move iter to the top of the linked list */ - iter->prev->next = iter->next; - if (iter->next) - iter->next->prev = iter->prev; - iter->next = ty->cast; - iter->prev = 0; - if (ty->cast) ty->cast->prev = iter; - ty->cast = iter; - return iter; - } - iter = iter->next; - } - } - return 0; -} - -/* - Cast a pointer up an inheritance hierarchy -*/ -SWIGRUNTIMEINLINE void * -SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) { - return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory); -} - -/* - Dynamic pointer casting. Down an inheritance hierarchy -*/ -SWIGRUNTIME swig_type_info * -SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) { - swig_type_info *lastty = ty; - if (!ty || !ty->dcast) return ty; - while (ty && (ty->dcast)) { - ty = (*ty->dcast)(ptr); - if (ty) lastty = ty; - } - return lastty; -} - -/* - Return the name associated with this type -*/ -SWIGRUNTIMEINLINE const char * -SWIG_TypeName(const swig_type_info *ty) { - return ty->name; -} - -/* - Return the pretty name associated with this type, - that is an unmangled type name in a form presentable to the user. -*/ -SWIGRUNTIME const char * -SWIG_TypePrettyName(const swig_type_info *type) { - /* The "str" field contains the equivalent pretty names of the - type, separated by vertical-bar characters. We choose - to print the last name, as it is often (?) the most - specific. */ - if (!type) return NULL; - if (type->str != NULL) { - const char *last_name = type->str; - const char *s; - for (s = type->str; *s; s++) - if (*s == '|') last_name = s+1; - return last_name; - } - else - return type->name; -} - -/* - Set the clientdata field for a type -*/ -SWIGRUNTIME void -SWIG_TypeClientData(swig_type_info *ti, void *clientdata) { - swig_cast_info *cast = ti->cast; - /* if (ti->clientdata == clientdata) return; */ - ti->clientdata = clientdata; - - while (cast) { - if (!cast->converter) { - swig_type_info *tc = cast->type; - if (!tc->clientdata) { - SWIG_TypeClientData(tc, clientdata); - } - } - cast = cast->next; - } -} -SWIGRUNTIME void -SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) { - SWIG_TypeClientData(ti, clientdata); - ti->owndata = 1; -} - -/* - Search for a swig_type_info structure only by mangled name - Search is a O(log #types) - - We start searching at module start, and finish searching when start == end. - Note: if start == end at the beginning of the function, we go all the way around - the circular list. -*/ -SWIGRUNTIME swig_type_info * -SWIG_MangledTypeQueryModule(swig_module_info *start, - swig_module_info *end, - const char *name) { - swig_module_info *iter = start; - do { - if (iter->size) { - register size_t l = 0; - register size_t r = iter->size - 1; - do { - /* since l+r >= 0, we can (>> 1) instead (/ 2) */ - register size_t i = (l + r) >> 1; - const char *iname = iter->types[i]->name; - if (iname) { - register int compare = strcmp(name, iname); - if (compare == 0) { - return iter->types[i]; - } else if (compare < 0) { - if (i) { - r = i - 1; - } else { - break; - } - } else if (compare > 0) { - l = i + 1; - } - } else { - break; /* should never happen */ - } - } while (l <= r); - } - iter = iter->next; - } while (iter != end); - return 0; -} - -/* - Search for a swig_type_info structure for either a mangled name or a human readable name. - It first searches the mangled names of the types, which is a O(log #types) - If a type is not found it then searches the human readable names, which is O(#types). - - We start searching at module start, and finish searching when start == end. - Note: if start == end at the beginning of the function, we go all the way around - the circular list. -*/ -SWIGRUNTIME swig_type_info * -SWIG_TypeQueryModule(swig_module_info *start, - swig_module_info *end, - const char *name) { - /* STEP 1: Search the name field using binary search */ - swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name); - if (ret) { - return ret; - } else { - /* STEP 2: If the type hasn't been found, do a complete search - of the str field (the human readable name) */ - swig_module_info *iter = start; - do { - register size_t i = 0; - for (; i < iter->size; ++i) { - if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name))) - return iter->types[i]; - } - iter = iter->next; - } while (iter != end); - } - - /* neither found a match */ - return 0; -} - -/* - Pack binary data into a string -*/ -SWIGRUNTIME char * -SWIG_PackData(char *c, void *ptr, size_t sz) { - static const char hex[17] = "0123456789abcdef"; - register const unsigned char *u = (unsigned char *) ptr; - register const unsigned char *eu = u + sz; - for (; u != eu; ++u) { - register unsigned char uu = *u; - *(c++) = hex[(uu & 0xf0) >> 4]; - *(c++) = hex[uu & 0xf]; - } - return c; -} - -/* - Unpack binary data from a string -*/ -SWIGRUNTIME const char * -SWIG_UnpackData(const char *c, void *ptr, size_t sz) { - register unsigned char *u = (unsigned char *) ptr; - register const unsigned char *eu = u + sz; - for (; u != eu; ++u) { - register char d = *(c++); - register unsigned char uu; - if ((d >= '0') && (d <= '9')) - uu = ((d - '0') << 4); - else if ((d >= 'a') && (d <= 'f')) - uu = ((d - ('a'-10)) << 4); - else - return (char *) 0; - d = *(c++); - if ((d >= '0') && (d <= '9')) - uu |= (d - '0'); - else if ((d >= 'a') && (d <= 'f')) - uu |= (d - ('a'-10)); - else - return (char *) 0; - *u = uu; - } - return c; -} - -/* - Pack 'void *' into a string buffer. -*/ -SWIGRUNTIME char * -SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) { - char *r = buff; - if ((2*sizeof(void *) + 2) > bsz) return 0; - *(r++) = '_'; - r = SWIG_PackData(r,&ptr,sizeof(void *)); - if (strlen(name) + 1 > (bsz - (r - buff))) return 0; - strcpy(r,name); - return buff; -} - -SWIGRUNTIME const char * -SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) { - if (*c != '_') { - if (strcmp(c,"NULL") == 0) { - *ptr = (void *) 0; - return name; - } else { - return 0; - } - } - return SWIG_UnpackData(++c,ptr,sizeof(void *)); -} - -SWIGRUNTIME char * -SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) { - char *r = buff; - size_t lname = (name ? strlen(name) : 0); - if ((2*sz + 2 + lname) > bsz) return 0; - *(r++) = '_'; - r = SWIG_PackData(r,ptr,sz); - if (lname) { - strncpy(r,name,lname+1); - } else { - *r = 0; - } - return buff; -} - -SWIGRUNTIME const char * -SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { - if (*c != '_') { - if (strcmp(c,"NULL") == 0) { - memset(ptr,0,sz); - return name; - } else { - return 0; - } - } - return SWIG_UnpackData(++c,ptr,sz); -} - -#ifdef __cplusplus -} -#endif - -/* Errors in SWIG */ -#define SWIG_UnknownError -1 -#define SWIG_IOError -2 -#define SWIG_RuntimeError -3 -#define SWIG_IndexError -4 -#define SWIG_TypeError -5 -#define SWIG_DivisionByZero -6 -#define SWIG_OverflowError -7 -#define SWIG_SyntaxError -8 -#define SWIG_ValueError -9 -#define SWIG_SystemError -10 -#define SWIG_AttributeError -11 -#define SWIG_MemoryError -12 -#define SWIG_NullReferenceError -13 - - - -#ifdef __cplusplus -/* Needed on some windows machines---since MS plays funny games with the header files under C++ */ -#include -#include -extern "C" { -#endif -#include "EXTERN.h" -#include "perl.h" -#include "XSUB.h" - -/* Add in functionality missing in older versions of Perl. Much of this is based on Devel-PPPort on cpan. */ - -/* Add PERL_REVISION, PERL_VERSION, PERL_SUBVERSION if missing */ -#ifndef PERL_REVISION -# if !defined(__PATCHLEVEL_H_INCLUDED__) && !(defined(PATCHLEVEL) && defined(SUBVERSION)) -# define PERL_PATCHLEVEL_H_IMPLICIT -# include -# endif -# if !(defined(PERL_VERSION) || (defined(SUBVERSION) && defined(PATCHLEVEL))) -# include -# endif -# ifndef PERL_REVISION -# define PERL_REVISION (5) -# define PERL_VERSION PATCHLEVEL -# define PERL_SUBVERSION SUBVERSION -# endif -#endif - -#if defined(WIN32) && defined(PERL_OBJECT) && !defined(PerlIO_exportFILE) -#define PerlIO_exportFILE(fh,fl) (FILE*)(fh) -#endif - -#ifndef SvIOK_UV -# define SvIOK_UV(sv) (SvIOK(sv) && (SvUVX(sv) == SvIVX(sv))) -#endif - -#ifndef SvUOK -# define SvUOK(sv) SvIOK_UV(sv) -#endif - -#if ((PERL_VERSION < 4) || ((PERL_VERSION == 4) && (PERL_SUBVERSION <= 5))) -# define PL_sv_undef sv_undef -# define PL_na na -# define PL_errgv errgv -# define PL_sv_no sv_no -# define PL_sv_yes sv_yes -# define PL_markstack_ptr markstack_ptr -#endif - -#ifndef IVSIZE -# ifdef LONGSIZE -# define IVSIZE LONGSIZE -# else -# define IVSIZE 4 /* A bold guess, but the best we can make. */ -# endif -#endif - -#ifndef INT2PTR -# if (IVSIZE == PTRSIZE) && (UVSIZE == PTRSIZE) -# define PTRV UV -# define INT2PTR(any,d) (any)(d) -# else -# if PTRSIZE == LONGSIZE -# define PTRV unsigned long -# else -# define PTRV unsigned -# endif -# define INT2PTR(any,d) (any)(PTRV)(d) -# endif - -# define NUM2PTR(any,d) (any)(PTRV)(d) -# define PTR2IV(p) INT2PTR(IV,p) -# define PTR2UV(p) INT2PTR(UV,p) -# define PTR2NV(p) NUM2PTR(NV,p) - -# if PTRSIZE == LONGSIZE -# define PTR2ul(p) (unsigned long)(p) -# else -# define PTR2ul(p) INT2PTR(unsigned long,p) -# endif -#endif /* !INT2PTR */ - -#ifndef SvPV_nolen -# define SvPV_nolen(x) SvPV(x,PL_na) -#endif - -#ifndef get_sv -# define get_sv perl_get_sv -#endif - -#ifndef ERRSV -# define ERRSV get_sv("@",FALSE) -#endif - -#ifndef pTHX_ -#define pTHX_ -#endif - -#include -#ifdef __cplusplus -} -#endif - -/* ----------------------------------------------------------------------------- - * error manipulation - * ----------------------------------------------------------------------------- */ - -SWIGINTERN const char* -SWIG_Perl_ErrorType(int code) { - const char* type = 0; - switch(code) { - case SWIG_MemoryError: - type = "MemoryError"; - break; - case SWIG_IOError: - type = "IOError"; - break; - case SWIG_RuntimeError: - type = "RuntimeError"; - break; - case SWIG_IndexError: - type = "IndexError"; - break; - case SWIG_TypeError: - type = "TypeError"; - break; - case SWIG_DivisionByZero: - type = "ZeroDivisionError"; - break; - case SWIG_OverflowError: - type = "OverflowError"; - break; - case SWIG_SyntaxError: - type = "SyntaxError"; - break; - case SWIG_ValueError: - type = "ValueError"; - break; - case SWIG_SystemError: - type = "SystemError"; - break; - case SWIG_AttributeError: - type = "AttributeError"; - break; - default: - type = "RuntimeError"; - } - return type; -} - - - - -/* ----------------------------------------------------------------------------- - * perlrun.swg - * - * This file contains the runtime support for Perl modules - * and includes code for managing global variables and pointer - * type checking. - * ----------------------------------------------------------------------------- */ - -#ifdef PERL_OBJECT -#define SWIG_PERL_OBJECT_DECL CPerlObj *SWIGUNUSEDPARM(pPerl), -#define SWIG_PERL_OBJECT_CALL pPerl, -#else -#define SWIG_PERL_OBJECT_DECL -#define SWIG_PERL_OBJECT_CALL -#endif - -/* Common SWIG API */ - -/* for raw pointers */ -#define SWIG_ConvertPtr(obj, pp, type, flags) SWIG_Perl_ConvertPtr(SWIG_PERL_OBJECT_CALL obj, pp, type, flags) -#define SWIG_ConvertPtrAndOwn(obj, pp, type, flags,own) SWIG_Perl_ConvertPtrAndOwn(SWIG_PERL_OBJECT_CALL obj, pp, type, flags, own) -#define SWIG_NewPointerObj(p, type, flags) SWIG_Perl_NewPointerObj(SWIG_PERL_OBJECT_CALL p, type, flags) - -/* for raw packed data */ -#define SWIG_ConvertPacked(obj, p, s, type) SWIG_Perl_ConvertPacked(SWIG_PERL_OBJECT_CALL obj, p, s, type) -#define SWIG_NewPackedObj(p, s, type) SWIG_Perl_NewPackedObj(SWIG_PERL_OBJECT_CALL p, s, type) - -/* for class or struct pointers */ -#define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags) -#define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags) - -/* for C or C++ function pointers */ -#define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_ConvertPtr(obj, pptr, type, 0) -#define SWIG_NewFunctionPtrObj(ptr, type) SWIG_NewPointerObj(ptr, type, 0) - -/* for C++ member pointers, ie, member methods */ -#define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_ConvertPacked(obj, ptr, sz, ty) -#define SWIG_NewMemberObj(ptr, sz, type) SWIG_NewPackedObj(ptr, sz, type) - - -/* Runtime API */ - -#define SWIG_GetModule(clientdata) SWIG_Perl_GetModule() -#define SWIG_SetModule(clientdata, pointer) SWIG_Perl_SetModule(pointer) - - -/* Error manipulation */ - -#define SWIG_ErrorType(code) SWIG_Perl_ErrorType(code) -#define SWIG_Error(code, msg) sv_setpvf(GvSV(PL_errgv),"%s %s\n", SWIG_ErrorType(code), msg) -#define SWIG_fail goto fail - -/* Perl-specific SWIG API */ - -#define SWIG_MakePtr(sv, ptr, type, flags) SWIG_Perl_MakePtr(SWIG_PERL_OBJECT_CALL sv, ptr, type, flags) -#define SWIG_MakePackedObj(sv, p, s, type) SWIG_Perl_MakePackedObj(SWIG_PERL_OBJECT_CALL sv, p, s, type) -#define SWIG_SetError(str) SWIG_Error(SWIG_RuntimeError, str) - - -#define SWIG_PERL_DECL_ARGS_1(arg1) (SWIG_PERL_OBJECT_DECL arg1) -#define SWIG_PERL_CALL_ARGS_1(arg1) (SWIG_PERL_OBJECT_CALL arg1) -#define SWIG_PERL_DECL_ARGS_2(arg1, arg2) (SWIG_PERL_OBJECT_DECL arg1, arg2) -#define SWIG_PERL_CALL_ARGS_2(arg1, arg2) (SWIG_PERL_OBJECT_CALL arg1, arg2) - -/* ----------------------------------------------------------------------------- - * pointers/data manipulation - * ----------------------------------------------------------------------------- */ - -/* For backward compatibility only */ -#define SWIG_POINTER_EXCEPTION 0 - -#ifdef __cplusplus -extern "C" { -#endif - -#define SWIG_OWNER SWIG_POINTER_OWN -#define SWIG_SHADOW SWIG_OWNER << 1 - -#define SWIG_MAYBE_PERL_OBJECT SWIG_PERL_OBJECT_DECL - -/* SWIG Perl macros */ - -/* Macro to declare an XS function */ -#ifndef XSPROTO -# define XSPROTO(name) void name(pTHX_ CV* cv) -#endif - -/* Macro to call an XS function */ -#ifdef PERL_OBJECT -# define SWIG_CALLXS(_name) _name(cv,pPerl) -#else -# ifndef MULTIPLICITY -# define SWIG_CALLXS(_name) _name(cv) -# else -# define SWIG_CALLXS(_name) _name(PERL_GET_THX, cv) -# endif -#endif - -#ifdef PERL_OBJECT -#define MAGIC_PPERL CPerlObj *pPerl = (CPerlObj *) this; - -#ifdef __cplusplus -extern "C" { -#endif -typedef int (CPerlObj::*SwigMagicFunc)(SV *, MAGIC *); -#ifdef __cplusplus -} -#endif - -#define SWIG_MAGIC(a,b) (SV *a, MAGIC *b) -#define SWIGCLASS_STATIC - -#else /* PERL_OBJECT */ - -#define MAGIC_PPERL -#define SWIGCLASS_STATIC static SWIGUNUSED - -#ifndef MULTIPLICITY -#define SWIG_MAGIC(a,b) (SV *a, MAGIC *b) - -#ifdef __cplusplus -extern "C" { -#endif -typedef int (*SwigMagicFunc)(SV *, MAGIC *); -#ifdef __cplusplus -} -#endif - -#else /* MULTIPLICITY */ - -#define SWIG_MAGIC(a,b) (struct interpreter *interp, SV *a, MAGIC *b) - -#ifdef __cplusplus -extern "C" { -#endif -typedef int (*SwigMagicFunc)(struct interpreter *, SV *, MAGIC *); -#ifdef __cplusplus -} -#endif - -#endif /* MULTIPLICITY */ -#endif /* PERL_OBJECT */ - -/* Workaround for bug in perl 5.6.x croak and earlier */ -#if (PERL_VERSION < 8) -# ifdef PERL_OBJECT -# define SWIG_croak_null() SWIG_Perl_croak_null(pPerl) -static void SWIG_Perl_croak_null(CPerlObj *pPerl) -# else -static void SWIG_croak_null() -# endif -{ - SV *err=ERRSV; -# if (PERL_VERSION < 6) - croak("%_", err); -# else - if (SvOK(err) && !SvROK(err)) croak("%_", err); - croak(Nullch); -# endif -} -#else -# define SWIG_croak_null() croak(Nullch) -#endif - - -/* - Define how strict is the cast between strings and integers/doubles - when overloading between these types occurs. - - The default is making it as strict as possible by using SWIG_AddCast - when needed. - - You can use -DSWIG_PERL_NO_STRICT_STR2NUM at compilation time to - disable the SWIG_AddCast, making the casting between string and - numbers less strict. - - In the end, we try to solve the overloading between strings and - numerical types in the more natural way, but if you can avoid it, - well, avoid it using %rename, for example. -*/ -#ifndef SWIG_PERL_NO_STRICT_STR2NUM -# ifndef SWIG_PERL_STRICT_STR2NUM -# define SWIG_PERL_STRICT_STR2NUM -# endif -#endif -#ifdef SWIG_PERL_STRICT_STR2NUM -/* string takes precedence */ -#define SWIG_Str2NumCast(x) SWIG_AddCast(x) -#else -/* number takes precedence */ -#define SWIG_Str2NumCast(x) x -#endif - - - -#include - -SWIGRUNTIME const char * -SWIG_Perl_TypeProxyName(const swig_type_info *type) { - if (!type) return NULL; - if (type->clientdata != NULL) { - return (const char*) type->clientdata; - } - else { - return type->name; - } -} - -/* Identical to SWIG_TypeCheck, except for strcmp comparison */ -SWIGRUNTIME swig_cast_info * -SWIG_TypeProxyCheck(const char *c, swig_type_info *ty) { - if (ty) { - swig_cast_info *iter = ty->cast; - while (iter) { - if ( (!iter->type->clientdata && (strcmp(iter->type->name, c) == 0)) || - (iter->type->clientdata && (strcmp((char*)iter->type->clientdata, c) == 0)) ) { - if (iter == ty->cast) - return iter; - /* Move iter to the top of the linked list */ - iter->prev->next = iter->next; - if (iter->next) - iter->next->prev = iter->prev; - iter->next = ty->cast; - iter->prev = 0; - if (ty->cast) ty->cast->prev = iter; - ty->cast = iter; - return iter; - } - iter = iter->next; - } - } - return 0; -} - -/* Function for getting a pointer value */ - -SWIGRUNTIME int -SWIG_Perl_ConvertPtrAndOwn(SWIG_MAYBE_PERL_OBJECT SV *sv, void **ptr, swig_type_info *_t, int flags, int *own) { - swig_cast_info *tc; - void *voidptr = (void *)0; - SV *tsv = 0; - - if (own) - *own = 0; - - /* If magical, apply more magic */ - if (SvGMAGICAL(sv)) - mg_get(sv); - - /* Check to see if this is an object */ - if (sv_isobject(sv)) { - IV tmp = 0; - tsv = (SV*) SvRV(sv); - if ((SvTYPE(tsv) == SVt_PVHV)) { - MAGIC *mg; - if (SvMAGICAL(tsv)) { - mg = mg_find(tsv,'P'); - if (mg) { - sv = mg->mg_obj; - if (sv_isobject(sv)) { - tsv = (SV*)SvRV(sv); - tmp = SvIV(tsv); - } - } - } else { - return SWIG_ERROR; - } - } else { - tmp = SvIV(tsv); - } - voidptr = INT2PTR(void *,tmp); - } else if (! SvOK(sv)) { /* Check for undef */ - *(ptr) = (void *) 0; - return SWIG_OK; - } else if (SvTYPE(sv) == SVt_RV) { /* Check for NULL pointer */ - if (!SvROK(sv)) { - *(ptr) = (void *) 0; - return SWIG_OK; - } else { - return SWIG_ERROR; - } - } else { /* Don't know what it is */ - return SWIG_ERROR; - } - if (_t) { - /* Now see if the types match */ - char *_c = HvNAME(SvSTASH(SvRV(sv))); - tc = SWIG_TypeProxyCheck(_c,_t); - if (!tc) { - return SWIG_ERROR; - } - { - int newmemory = 0; - *ptr = SWIG_TypeCast(tc,voidptr,&newmemory); - if (newmemory == SWIG_CAST_NEW_MEMORY) { - assert(own); - if (own) - *own = *own | SWIG_CAST_NEW_MEMORY; - } - } - } else { - *ptr = voidptr; - } - - /* - * DISOWN implementation: we need a perl guru to check this one. - */ - if (tsv && (flags & SWIG_POINTER_DISOWN)) { - /* - * almost copy paste code from below SWIG_POINTER_OWN setting - */ - SV *obj = sv; - HV *stash = SvSTASH(SvRV(obj)); - GV *gv = *(GV**) hv_fetch(stash, "OWNER", 5, TRUE); - if (isGV(gv)) { - HV *hv = GvHVn(gv); - /* - * To set ownership (see below), a newSViv(1) entry is added. - * Hence, to remove ownership, we delete the entry. - */ - if (hv_exists_ent(hv, obj, 0)) { - hv_delete_ent(hv, obj, 0, 0); - } - } - } - return SWIG_OK; -} - -SWIGRUNTIME int -SWIG_Perl_ConvertPtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void **ptr, swig_type_info *_t, int flags) { - return SWIG_Perl_ConvertPtrAndOwn(sv, ptr, _t, flags, 0); -} - -SWIGRUNTIME void -SWIG_Perl_MakePtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void *ptr, swig_type_info *t, int flags) { - if (ptr && (flags & (SWIG_SHADOW | SWIG_POINTER_OWN))) { - SV *self; - SV *obj=newSV(0); - HV *hash=newHV(); - HV *stash; - sv_setref_pv(obj, (char *) SWIG_Perl_TypeProxyName(t), ptr); - stash=SvSTASH(SvRV(obj)); - if (flags & SWIG_POINTER_OWN) { - HV *hv; - GV *gv=*(GV**)hv_fetch(stash, "OWNER", 5, TRUE); - if (!isGV(gv)) - gv_init(gv, stash, "OWNER", 5, FALSE); - hv=GvHVn(gv); - hv_store_ent(hv, obj, newSViv(1), 0); - } - sv_magic((SV *)hash, (SV *)obj, 'P', Nullch, 0); - SvREFCNT_dec(obj); - self=newRV_noinc((SV *)hash); - sv_setsv(sv, self); - SvREFCNT_dec((SV *)self); - sv_bless(sv, stash); - } - else { - sv_setref_pv(sv, (char *) SWIG_Perl_TypeProxyName(t), ptr); - } -} - -SWIGRUNTIMEINLINE SV * -SWIG_Perl_NewPointerObj(SWIG_MAYBE_PERL_OBJECT void *ptr, swig_type_info *t, int flags) { - SV *result = sv_newmortal(); - SWIG_MakePtr(result, ptr, t, flags); - return result; -} - -SWIGRUNTIME void -SWIG_Perl_MakePackedObj(SWIG_MAYBE_PERL_OBJECT SV *sv, void *ptr, int sz, swig_type_info *type) { - char result[1024]; - char *r = result; - if ((2*sz + 1 + strlen(SWIG_Perl_TypeProxyName(type))) > 1000) return; - *(r++) = '_'; - r = SWIG_PackData(r,ptr,sz); - strcpy(r,SWIG_Perl_TypeProxyName(type)); - sv_setpv(sv, result); -} - -SWIGRUNTIME SV * -SWIG_Perl_NewPackedObj(SWIG_MAYBE_PERL_OBJECT void *ptr, int sz, swig_type_info *type) { - SV *result = sv_newmortal(); - SWIG_Perl_MakePackedObj(result, ptr, sz, type); - return result; -} - -/* Convert a packed value value */ -SWIGRUNTIME int -SWIG_Perl_ConvertPacked(SWIG_MAYBE_PERL_OBJECT SV *obj, void *ptr, int sz, swig_type_info *ty) { - swig_cast_info *tc; - const char *c = 0; - - if ((!obj) || (!SvOK(obj))) return SWIG_ERROR; - c = SvPV_nolen(obj); - /* Pointer values must start with leading underscore */ - if (*c != '_') return SWIG_ERROR; - c++; - c = SWIG_UnpackData(c,ptr,sz); - if (ty) { - tc = SWIG_TypeCheck(c,ty); - if (!tc) return SWIG_ERROR; - } - return SWIG_OK; -} - - -/* Macros for low-level exception handling */ -#define SWIG_croak(x) { SWIG_Error(SWIG_RuntimeError, x); SWIG_fail; } - - -typedef XSPROTO(SwigPerlWrapper); -typedef SwigPerlWrapper *SwigPerlWrapperPtr; - -/* Structure for command table */ -typedef struct { - const char *name; - SwigPerlWrapperPtr wrapper; -} swig_command_info; - -/* Information for constant table */ - -#define SWIG_INT 1 -#define SWIG_FLOAT 2 -#define SWIG_STRING 3 -#define SWIG_POINTER 4 -#define SWIG_BINARY 5 - -/* Constant information structure */ -typedef struct swig_constant_info { - int type; - const char *name; - long lvalue; - double dvalue; - void *pvalue; - swig_type_info **ptype; -} swig_constant_info; - - -/* Structure for variable table */ -typedef struct { - const char *name; - SwigMagicFunc set; - SwigMagicFunc get; - swig_type_info **type; -} swig_variable_info; - -/* Magic variable code */ -#ifndef PERL_OBJECT -#define swig_create_magic(s,a,b,c) _swig_create_magic(s,a,b,c) - #ifndef MULTIPLICITY - SWIGRUNTIME void _swig_create_magic(SV *sv, char *name, int (*set)(SV *, MAGIC *), int (*get)(SV *,MAGIC *)) - #else - SWIGRUNTIME void _swig_create_magic(SV *sv, char *name, int (*set)(struct interpreter*, SV *, MAGIC *), int (*get)(struct interpreter*, SV *,MAGIC *)) - #endif -#else -# define swig_create_magic(s,a,b,c) _swig_create_magic(pPerl,s,a,b,c) -SWIGRUNTIME void _swig_create_magic(CPerlObj *pPerl, SV *sv, const char *name, int (CPerlObj::*set)(SV *, MAGIC *), int (CPerlObj::*get)(SV *, MAGIC *)) -#endif -{ - MAGIC *mg; - sv_magic(sv,sv,'U',(char *) name,strlen(name)); - mg = mg_find(sv,'U'); - mg->mg_virtual = (MGVTBL *) malloc(sizeof(MGVTBL)); - mg->mg_virtual->svt_get = (SwigMagicFunc) get; - mg->mg_virtual->svt_set = (SwigMagicFunc) set; - mg->mg_virtual->svt_len = 0; - mg->mg_virtual->svt_clear = 0; - mg->mg_virtual->svt_free = 0; -} - - -SWIGRUNTIME swig_module_info * -SWIG_Perl_GetModule(void) { - static void *type_pointer = (void *)0; - SV *pointer; - - /* first check if pointer already created */ - if (!type_pointer) { - pointer = get_sv("swig_runtime_data::type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, FALSE | GV_ADDMULTI); - if (pointer && SvOK(pointer)) { - type_pointer = INT2PTR(swig_type_info **, SvIV(pointer)); - } - } - - return (swig_module_info *) type_pointer; -} - -SWIGRUNTIME void -SWIG_Perl_SetModule(swig_module_info *module) { - SV *pointer; - - /* create a new pointer */ - pointer = get_sv("swig_runtime_data::type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, TRUE | GV_ADDMULTI); - sv_setiv(pointer, PTR2IV(module)); -} - -#ifdef __cplusplus -} -#endif - -/* Workaround perl5 global namespace pollution. Note that undefining library - * functions like fopen will not solve the problem on all platforms as fopen - * might be a macro on Windows but not necessarily on other operating systems. */ -#ifdef do_open - #undef do_open -#endif -#ifdef do_close - #undef do_close -#endif -#ifdef do_exec - #undef do_exec -#endif -#ifdef scalar - #undef scalar -#endif -#ifdef list - #undef list -#endif -#ifdef apply - #undef apply -#endif -#ifdef convert - #undef convert -#endif -#ifdef Error - #undef Error -#endif -#ifdef form - #undef form -#endif -#ifdef vform - #undef vform -#endif -#ifdef LABEL - #undef LABEL -#endif -#ifdef METHOD - #undef METHOD -#endif -#ifdef Move - #undef Move -#endif -#ifdef yylex - #undef yylex -#endif -#ifdef yyparse - #undef yyparse -#endif -#ifdef yyerror - #undef yyerror -#endif -#ifdef invert - #undef invert -#endif -#ifdef ref - #undef ref -#endif -#ifdef read - #undef read -#endif -#ifdef write - #undef write -#endif -#ifdef eof - #undef eof -#endif -#ifdef bool - #undef bool -#endif -#ifdef close - #undef close -#endif -#ifdef rewind - #undef rewind -#endif -#ifdef free - #undef free -#endif -#ifdef malloc - #undef malloc -#endif -#ifdef calloc - #undef calloc -#endif -#ifdef Stat - #undef Stat -#endif -#ifdef check - #undef check -#endif -#ifdef seekdir - #undef seekdir -#endif -#ifdef open - #undef open -#endif -#ifdef readdir - #undef readdir -#endif -#ifdef bind - #undef bind -#endif +/* ----------------------------------------------------------------------------- + * This section contains generic SWIG labels for method/variable + * declarations/attributes, and other compiler dependent labels. + * ----------------------------------------------------------------------------- */ + +/* template workaround for compilers that cannot correctly implement the C++ standard */ +#ifndef SWIGTEMPLATEDISAMBIGUATOR +# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) +# define SWIGTEMPLATEDISAMBIGUATOR template +# elif defined(__HP_aCC) +/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ +/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ +# define SWIGTEMPLATEDISAMBIGUATOR template +# else +# define SWIGTEMPLATEDISAMBIGUATOR +# endif +#endif + +/* inline attribute */ +#ifndef SWIGINLINE +# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) +# define SWIGINLINE inline +# else +# define SWIGINLINE +# endif +#endif + +/* attribute recognised by some compilers to avoid 'unused' warnings */ +#ifndef SWIGUNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define SWIGUNUSED __attribute__ ((__unused__)) +# else +# define SWIGUNUSED +# endif +# elif defined(__ICC) +# define SWIGUNUSED __attribute__ ((__unused__)) +# else +# define SWIGUNUSED +# endif +#endif + +#ifndef SWIG_MSC_UNSUPPRESS_4505 +# if defined(_MSC_VER) +# pragma warning(disable : 4505) /* unreferenced local function has been removed */ +# endif +#endif + +#ifndef SWIGUNUSEDPARM +# ifdef __cplusplus +# define SWIGUNUSEDPARM(p) +# else +# define SWIGUNUSEDPARM(p) p SWIGUNUSED +# endif +#endif + +/* internal SWIG method */ +#ifndef SWIGINTERN +# define SWIGINTERN static SWIGUNUSED +#endif + +/* internal inline SWIG method */ +#ifndef SWIGINTERNINLINE +# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE +#endif + +/* exporting methods */ +#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) +# ifndef GCC_HASCLASSVISIBILITY +# define GCC_HASCLASSVISIBILITY +# endif +#endif + +#ifndef SWIGEXPORT +# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# if defined(STATIC_LINKED) +# define SWIGEXPORT +# else +# define SWIGEXPORT __declspec(dllexport) +# endif +# else +# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) +# define SWIGEXPORT __attribute__ ((visibility("default"))) +# else +# define SWIGEXPORT +# endif +# endif +#endif + +/* calling conventions for Windows */ +#ifndef SWIGSTDCALL +# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# define SWIGSTDCALL __stdcall +# else +# define SWIGSTDCALL +# endif +#endif + +/* Deal with Microsoft's attempt at deprecating C standard runtime functions */ +#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) +# define _CRT_SECURE_NO_DEPRECATE +#endif + +/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ +#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) +# define _SCL_SECURE_NO_DEPRECATE +#endif + + +/* ----------------------------------------------------------------------------- + * swigrun.swg + * + * This file contains generic C API SWIG runtime support for pointer + * type checking. + * ----------------------------------------------------------------------------- */ + +/* This should only be incremented when either the layout of swig_type_info changes, + or for whatever reason, the runtime changes incompatibly */ +#define SWIG_RUNTIME_VERSION "4" + +/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */ +#ifdef SWIG_TYPE_TABLE +# define SWIG_QUOTE_STRING(x) #x +# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x) +# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE) +#else +# define SWIG_TYPE_TABLE_NAME +#endif + +/* + You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for + creating a static or dynamic library from the SWIG runtime code. + In 99.9% of the cases, SWIG just needs to declare them as 'static'. + + But only do this if strictly necessary, ie, if you have problems + with your compiler or suchlike. +*/ + +#ifndef SWIGRUNTIME +# define SWIGRUNTIME SWIGINTERN +#endif + +#ifndef SWIGRUNTIMEINLINE +# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE +#endif + +/* Generic buffer size */ +#ifndef SWIG_BUFFER_SIZE +# define SWIG_BUFFER_SIZE 1024 +#endif + +/* Flags for pointer conversions */ +#define SWIG_POINTER_DISOWN 0x1 +#define SWIG_CAST_NEW_MEMORY 0x2 + +/* Flags for new pointer objects */ +#define SWIG_POINTER_OWN 0x1 + + +/* + Flags/methods for returning states. + + The SWIG conversion methods, as ConvertPtr, return and integer + that tells if the conversion was successful or not. And if not, + an error code can be returned (see swigerrors.swg for the codes). + + Use the following macros/flags to set or process the returning + states. + + In old versions of SWIG, code such as the following was usually written: + + if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) { + // success code + } else { + //fail code + } + + Now you can be more explicit: + + int res = SWIG_ConvertPtr(obj,vptr,ty.flags); + if (SWIG_IsOK(res)) { + // success code + } else { + // fail code + } + + which is the same really, but now you can also do + + Type *ptr; + int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags); + if (SWIG_IsOK(res)) { + // success code + if (SWIG_IsNewObj(res) { + ... + delete *ptr; + } else { + ... + } + } else { + // fail code + } + + I.e., now SWIG_ConvertPtr can return new objects and you can + identify the case and take care of the deallocation. Of course that + also requires SWIG_ConvertPtr to return new result values, such as + + int SWIG_ConvertPtr(obj, ptr,...) { + if () { + if () { + *ptr = ; + return SWIG_NEWOBJ; + } else { + *ptr = ; + return SWIG_OLDOBJ; + } + } else { + return SWIG_BADOBJ; + } + } + + Of course, returning the plain '0(success)/-1(fail)' still works, but you can be + more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the + SWIG errors code. + + Finally, if the SWIG_CASTRANK_MODE is enabled, the result code + allows to return the 'cast rank', for example, if you have this + + int food(double) + int fooi(int); + + and you call + + food(1) // cast rank '1' (1 -> 1.0) + fooi(1) // cast rank '0' + + just use the SWIG_AddCast()/SWIG_CheckState() +*/ + +#define SWIG_OK (0) +#define SWIG_ERROR (-1) +#define SWIG_IsOK(r) (r >= 0) +#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) + +/* The CastRankLimit says how many bits are used for the cast rank */ +#define SWIG_CASTRANKLIMIT (1 << 8) +/* The NewMask denotes the object was created (using new/malloc) */ +#define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1) +/* The TmpMask is for in/out typemaps that use temporal objects */ +#define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1) +/* Simple returning values */ +#define SWIG_BADOBJ (SWIG_ERROR) +#define SWIG_OLDOBJ (SWIG_OK) +#define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK) +#define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK) +/* Check, add and del mask methods */ +#define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r) +#define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r) +#define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK)) +#define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r) +#define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r) +#define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK)) + +/* Cast-Rank Mode */ +#if defined(SWIG_CASTRANK_MODE) +# ifndef SWIG_TypeRank +# define SWIG_TypeRank unsigned long +# endif +# ifndef SWIG_MAXCASTRANK /* Default cast allowed */ +# define SWIG_MAXCASTRANK (2) +# endif +# define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1) +# define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK) +SWIGINTERNINLINE int SWIG_AddCast(int r) { + return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r; +} +SWIGINTERNINLINE int SWIG_CheckState(int r) { + return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; +} +#else /* no cast-rank mode */ +# define SWIG_AddCast +# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) +#endif + + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef void *(*swig_converter_func)(void *, int *); +typedef struct swig_type_info *(*swig_dycast_func)(void **); + +/* Structure to store information on one type */ +typedef struct swig_type_info { + const char *name; /* mangled name of this type */ + const char *str; /* human readable name of this type */ + swig_dycast_func dcast; /* dynamic cast function down a hierarchy */ + struct swig_cast_info *cast; /* linked list of types that can cast into this type */ + void *clientdata; /* language specific type data */ + int owndata; /* flag if the structure owns the clientdata */ +} swig_type_info; + +/* Structure to store a type and conversion function used for casting */ +typedef struct swig_cast_info { + swig_type_info *type; /* pointer to type that is equivalent to this type */ + swig_converter_func converter; /* function to cast the void pointers */ + struct swig_cast_info *next; /* pointer to next cast in linked list */ + struct swig_cast_info *prev; /* pointer to the previous cast */ +} swig_cast_info; + +/* Structure used to store module information + * Each module generates one structure like this, and the runtime collects + * all of these structures and stores them in a circularly linked list.*/ +typedef struct swig_module_info { + swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */ + size_t size; /* Number of types in this module */ + struct swig_module_info *next; /* Pointer to next element in circularly linked list */ + swig_type_info **type_initial; /* Array of initially generated type structures */ + swig_cast_info **cast_initial; /* Array of initially generated casting structures */ + void *clientdata; /* Language specific module data */ +} swig_module_info; + +/* + Compare two type names skipping the space characters, therefore + "char*" == "char *" and "Class" == "Class", etc. + + Return 0 when the two name types are equivalent, as in + strncmp, but skipping ' '. +*/ +SWIGRUNTIME int +SWIG_TypeNameComp(const char *f1, const char *l1, + const char *f2, const char *l2) { + for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) { + while ((*f1 == ' ') && (f1 != l1)) ++f1; + while ((*f2 == ' ') && (f2 != l2)) ++f2; + if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1; + } + return (int)((l1 - f1) - (l2 - f2)); +} + +/* + Check type equivalence in a name list like ||... + Return 0 if not equal, 1 if equal +*/ +SWIGRUNTIME int +SWIG_TypeEquiv(const char *nb, const char *tb) { + int equiv = 0; + const char* te = tb + strlen(tb); + const char* ne = nb; + while (!equiv && *ne) { + for (nb = ne; *ne; ++ne) { + if (*ne == '|') break; + } + equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; + if (*ne) ++ne; + } + return equiv; +} + +/* + Check type equivalence in a name list like ||... + Return 0 if equal, -1 if nb < tb, 1 if nb > tb +*/ +SWIGRUNTIME int +SWIG_TypeCompare(const char *nb, const char *tb) { + int equiv = 0; + const char* te = tb + strlen(tb); + const char* ne = nb; + while (!equiv && *ne) { + for (nb = ne; *ne; ++ne) { + if (*ne == '|') break; + } + equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; + if (*ne) ++ne; + } + return equiv; +} + + +/* + Check the typename +*/ +SWIGRUNTIME swig_cast_info * +SWIG_TypeCheck(const char *c, swig_type_info *ty) { + if (ty) { + swig_cast_info *iter = ty->cast; + while (iter) { + if (strcmp(iter->type->name, c) == 0) { + if (iter == ty->cast) + return iter; + /* Move iter to the top of the linked list */ + iter->prev->next = iter->next; + if (iter->next) + iter->next->prev = iter->prev; + iter->next = ty->cast; + iter->prev = 0; + if (ty->cast) ty->cast->prev = iter; + ty->cast = iter; + return iter; + } + iter = iter->next; + } + } + return 0; +} + +/* + Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison +*/ +SWIGRUNTIME swig_cast_info * +SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) { + if (ty) { + swig_cast_info *iter = ty->cast; + while (iter) { + if (iter->type == from) { + if (iter == ty->cast) + return iter; + /* Move iter to the top of the linked list */ + iter->prev->next = iter->next; + if (iter->next) + iter->next->prev = iter->prev; + iter->next = ty->cast; + iter->prev = 0; + if (ty->cast) ty->cast->prev = iter; + ty->cast = iter; + return iter; + } + iter = iter->next; + } + } + return 0; +} + +/* + Cast a pointer up an inheritance hierarchy +*/ +SWIGRUNTIMEINLINE void * +SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) { + return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory); +} + +/* + Dynamic pointer casting. Down an inheritance hierarchy +*/ +SWIGRUNTIME swig_type_info * +SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) { + swig_type_info *lastty = ty; + if (!ty || !ty->dcast) return ty; + while (ty && (ty->dcast)) { + ty = (*ty->dcast)(ptr); + if (ty) lastty = ty; + } + return lastty; +} + +/* + Return the name associated with this type +*/ +SWIGRUNTIMEINLINE const char * +SWIG_TypeName(const swig_type_info *ty) { + return ty->name; +} + +/* + Return the pretty name associated with this type, + that is an unmangled type name in a form presentable to the user. +*/ +SWIGRUNTIME const char * +SWIG_TypePrettyName(const swig_type_info *type) { + /* The "str" field contains the equivalent pretty names of the + type, separated by vertical-bar characters. We choose + to print the last name, as it is often (?) the most + specific. */ + if (!type) return NULL; + if (type->str != NULL) { + const char *last_name = type->str; + const char *s; + for (s = type->str; *s; s++) + if (*s == '|') last_name = s+1; + return last_name; + } + else + return type->name; +} + +/* + Set the clientdata field for a type +*/ +SWIGRUNTIME void +SWIG_TypeClientData(swig_type_info *ti, void *clientdata) { + swig_cast_info *cast = ti->cast; + /* if (ti->clientdata == clientdata) return; */ + ti->clientdata = clientdata; + + while (cast) { + if (!cast->converter) { + swig_type_info *tc = cast->type; + if (!tc->clientdata) { + SWIG_TypeClientData(tc, clientdata); + } + } + cast = cast->next; + } +} +SWIGRUNTIME void +SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) { + SWIG_TypeClientData(ti, clientdata); + ti->owndata = 1; +} + +/* + Search for a swig_type_info structure only by mangled name + Search is a O(log #types) + + We start searching at module start, and finish searching when start == end. + Note: if start == end at the beginning of the function, we go all the way around + the circular list. +*/ +SWIGRUNTIME swig_type_info * +SWIG_MangledTypeQueryModule(swig_module_info *start, + swig_module_info *end, + const char *name) { + swig_module_info *iter = start; + do { + if (iter->size) { + register size_t l = 0; + register size_t r = iter->size - 1; + do { + /* since l+r >= 0, we can (>> 1) instead (/ 2) */ + register size_t i = (l + r) >> 1; + const char *iname = iter->types[i]->name; + if (iname) { + register int compare = strcmp(name, iname); + if (compare == 0) { + return iter->types[i]; + } else if (compare < 0) { + if (i) { + r = i - 1; + } else { + break; + } + } else if (compare > 0) { + l = i + 1; + } + } else { + break; /* should never happen */ + } + } while (l <= r); + } + iter = iter->next; + } while (iter != end); + return 0; +} + +/* + Search for a swig_type_info structure for either a mangled name or a human readable name. + It first searches the mangled names of the types, which is a O(log #types) + If a type is not found it then searches the human readable names, which is O(#types). + + We start searching at module start, and finish searching when start == end. + Note: if start == end at the beginning of the function, we go all the way around + the circular list. +*/ +SWIGRUNTIME swig_type_info * +SWIG_TypeQueryModule(swig_module_info *start, + swig_module_info *end, + const char *name) { + /* STEP 1: Search the name field using binary search */ + swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name); + if (ret) { + return ret; + } else { + /* STEP 2: If the type hasn't been found, do a complete search + of the str field (the human readable name) */ + swig_module_info *iter = start; + do { + register size_t i = 0; + for (; i < iter->size; ++i) { + if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name))) + return iter->types[i]; + } + iter = iter->next; + } while (iter != end); + } + + /* neither found a match */ + return 0; +} + +/* + Pack binary data into a string +*/ +SWIGRUNTIME char * +SWIG_PackData(char *c, void *ptr, size_t sz) { + static const char hex[17] = "0123456789abcdef"; + register const unsigned char *u = (unsigned char *) ptr; + register const unsigned char *eu = u + sz; + for (; u != eu; ++u) { + register unsigned char uu = *u; + *(c++) = hex[(uu & 0xf0) >> 4]; + *(c++) = hex[uu & 0xf]; + } + return c; +} + +/* + Unpack binary data from a string +*/ +SWIGRUNTIME const char * +SWIG_UnpackData(const char *c, void *ptr, size_t sz) { + register unsigned char *u = (unsigned char *) ptr; + register const unsigned char *eu = u + sz; + for (; u != eu; ++u) { + register char d = *(c++); + register unsigned char uu; + if ((d >= '0') && (d <= '9')) + uu = ((d - '0') << 4); + else if ((d >= 'a') && (d <= 'f')) + uu = ((d - ('a'-10)) << 4); + else + return (char *) 0; + d = *(c++); + if ((d >= '0') && (d <= '9')) + uu |= (d - '0'); + else if ((d >= 'a') && (d <= 'f')) + uu |= (d - ('a'-10)); + else + return (char *) 0; + *u = uu; + } + return c; +} + +/* + Pack 'void *' into a string buffer. +*/ +SWIGRUNTIME char * +SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) { + char *r = buff; + if ((2*sizeof(void *) + 2) > bsz) return 0; + *(r++) = '_'; + r = SWIG_PackData(r,&ptr,sizeof(void *)); + if (strlen(name) + 1 > (bsz - (r - buff))) return 0; + strcpy(r,name); + return buff; +} + +SWIGRUNTIME const char * +SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) { + if (*c != '_') { + if (strcmp(c,"NULL") == 0) { + *ptr = (void *) 0; + return name; + } else { + return 0; + } + } + return SWIG_UnpackData(++c,ptr,sizeof(void *)); +} + +SWIGRUNTIME char * +SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) { + char *r = buff; + size_t lname = (name ? strlen(name) : 0); + if ((2*sz + 2 + lname) > bsz) return 0; + *(r++) = '_'; + r = SWIG_PackData(r,ptr,sz); + if (lname) { + strncpy(r,name,lname+1); + } else { + *r = 0; + } + return buff; +} + +SWIGRUNTIME const char * +SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { + if (*c != '_') { + if (strcmp(c,"NULL") == 0) { + memset(ptr,0,sz); + return name; + } else { + return 0; + } + } + return SWIG_UnpackData(++c,ptr,sz); +} + +#ifdef __cplusplus +} +#endif + +/* Errors in SWIG */ +#define SWIG_UnknownError -1 +#define SWIG_IOError -2 +#define SWIG_RuntimeError -3 +#define SWIG_IndexError -4 +#define SWIG_TypeError -5 +#define SWIG_DivisionByZero -6 +#define SWIG_OverflowError -7 +#define SWIG_SyntaxError -8 +#define SWIG_ValueError -9 +#define SWIG_SystemError -10 +#define SWIG_AttributeError -11 +#define SWIG_MemoryError -12 +#define SWIG_NullReferenceError -13 + + + +#ifdef __cplusplus +/* Needed on some windows machines---since MS plays funny games with the header files under C++ */ +#include +#include +extern "C" { +#endif +#include "EXTERN.h" +#include "perl.h" +#include "XSUB.h" + +/* Add in functionality missing in older versions of Perl. Much of this is based on Devel-PPPort on cpan. */ + +/* Add PERL_REVISION, PERL_VERSION, PERL_SUBVERSION if missing */ +#ifndef PERL_REVISION +# if !defined(__PATCHLEVEL_H_INCLUDED__) && !(defined(PATCHLEVEL) && defined(SUBVERSION)) +# define PERL_PATCHLEVEL_H_IMPLICIT +# include +# endif +# if !(defined(PERL_VERSION) || (defined(SUBVERSION) && defined(PATCHLEVEL))) +# include +# endif +# ifndef PERL_REVISION +# define PERL_REVISION (5) +# define PERL_VERSION PATCHLEVEL +# define PERL_SUBVERSION SUBVERSION +# endif +#endif + +#if defined(WIN32) && defined(PERL_OBJECT) && !defined(PerlIO_exportFILE) +#define PerlIO_exportFILE(fh,fl) (FILE*)(fh) +#endif + +#ifndef SvIOK_UV +# define SvIOK_UV(sv) (SvIOK(sv) && (SvUVX(sv) == SvIVX(sv))) +#endif + +#ifndef SvUOK +# define SvUOK(sv) SvIOK_UV(sv) +#endif + +#if ((PERL_VERSION < 4) || ((PERL_VERSION == 4) && (PERL_SUBVERSION <= 5))) +# define PL_sv_undef sv_undef +# define PL_na na +# define PL_errgv errgv +# define PL_sv_no sv_no +# define PL_sv_yes sv_yes +# define PL_markstack_ptr markstack_ptr +#endif + +#ifndef IVSIZE +# ifdef LONGSIZE +# define IVSIZE LONGSIZE +# else +# define IVSIZE 4 /* A bold guess, but the best we can make. */ +# endif +#endif + +#ifndef INT2PTR +# if (IVSIZE == PTRSIZE) && (UVSIZE == PTRSIZE) +# define PTRV UV +# define INT2PTR(any,d) (any)(d) +# else +# if PTRSIZE == LONGSIZE +# define PTRV unsigned long +# else +# define PTRV unsigned +# endif +# define INT2PTR(any,d) (any)(PTRV)(d) +# endif + +# define NUM2PTR(any,d) (any)(PTRV)(d) +# define PTR2IV(p) INT2PTR(IV,p) +# define PTR2UV(p) INT2PTR(UV,p) +# define PTR2NV(p) NUM2PTR(NV,p) + +# if PTRSIZE == LONGSIZE +# define PTR2ul(p) (unsigned long)(p) +# else +# define PTR2ul(p) INT2PTR(unsigned long,p) +# endif +#endif /* !INT2PTR */ + +#ifndef SvPV_nolen +# define SvPV_nolen(x) SvPV(x,PL_na) +#endif + +#ifndef get_sv +# define get_sv perl_get_sv +#endif + +#ifndef ERRSV +# define ERRSV get_sv("@",FALSE) +#endif + +#ifndef pTHX_ +#define pTHX_ +#endif + +#include +#ifdef __cplusplus +} +#endif + +/* ----------------------------------------------------------------------------- + * error manipulation + * ----------------------------------------------------------------------------- */ + +SWIGINTERN const char* +SWIG_Perl_ErrorType(int code) { + const char* type = 0; + switch(code) { + case SWIG_MemoryError: + type = "MemoryError"; + break; + case SWIG_IOError: + type = "IOError"; + break; + case SWIG_RuntimeError: + type = "RuntimeError"; + break; + case SWIG_IndexError: + type = "IndexError"; + break; + case SWIG_TypeError: + type = "TypeError"; + break; + case SWIG_DivisionByZero: + type = "ZeroDivisionError"; + break; + case SWIG_OverflowError: + type = "OverflowError"; + break; + case SWIG_SyntaxError: + type = "SyntaxError"; + break; + case SWIG_ValueError: + type = "ValueError"; + break; + case SWIG_SystemError: + type = "SystemError"; + break; + case SWIG_AttributeError: + type = "AttributeError"; + break; + default: + type = "RuntimeError"; + } + return type; +} + + + + +/* ----------------------------------------------------------------------------- + * perlrun.swg + * + * This file contains the runtime support for Perl modules + * and includes code for managing global variables and pointer + * type checking. + * ----------------------------------------------------------------------------- */ + +#ifdef PERL_OBJECT +#define SWIG_PERL_OBJECT_DECL CPerlObj *SWIGUNUSEDPARM(pPerl), +#define SWIG_PERL_OBJECT_CALL pPerl, +#else +#define SWIG_PERL_OBJECT_DECL +#define SWIG_PERL_OBJECT_CALL +#endif + +/* Common SWIG API */ + +/* for raw pointers */ +#define SWIG_ConvertPtr(obj, pp, type, flags) SWIG_Perl_ConvertPtr(SWIG_PERL_OBJECT_CALL obj, pp, type, flags) +#define SWIG_NewPointerObj(p, type, flags) SWIG_Perl_NewPointerObj(SWIG_PERL_OBJECT_CALL p, type, flags) + +/* for raw packed data */ +#define SWIG_ConvertPacked(obj, p, s, type) SWIG_Perl_ConvertPacked(SWIG_PERL_OBJECT_CALL obj, p, s, type) +#define SWIG_NewPackedObj(p, s, type) SWIG_Perl_NewPackedObj(SWIG_PERL_OBJECT_CALL p, s, type) + +/* for class or struct pointers */ +#define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags) +#define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags) + +/* for C or C++ function pointers */ +#define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_ConvertPtr(obj, pptr, type, 0) +#define SWIG_NewFunctionPtrObj(ptr, type) SWIG_NewPointerObj(ptr, type, 0) + +/* for C++ member pointers, ie, member methods */ +#define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_ConvertPacked(obj, ptr, sz, ty) +#define SWIG_NewMemberObj(ptr, sz, type) SWIG_NewPackedObj(ptr, sz, type) + + +/* Runtime API */ + +#define SWIG_GetModule(clientdata) SWIG_Perl_GetModule() +#define SWIG_SetModule(clientdata, pointer) SWIG_Perl_SetModule(pointer) + + +/* Error manipulation */ + +#define SWIG_ErrorType(code) SWIG_Perl_ErrorType(code) +#define SWIG_Error(code, msg) sv_setpvf(GvSV(PL_errgv),"%s %s\n", SWIG_ErrorType(code), msg) +#define SWIG_fail goto fail + +/* Perl-specific SWIG API */ + +#define SWIG_MakePtr(sv, ptr, type, flags) SWIG_Perl_MakePtr(SWIG_PERL_OBJECT_CALL sv, ptr, type, flags) +#define SWIG_MakePackedObj(sv, p, s, type) SWIG_Perl_MakePackedObj(SWIG_PERL_OBJECT_CALL sv, p, s, type) +#define SWIG_SetError(str) SWIG_Error(SWIG_RuntimeError, str) + + +#define SWIG_PERL_DECL_ARGS_1(arg1) (SWIG_PERL_OBJECT_DECL arg1) +#define SWIG_PERL_CALL_ARGS_1(arg1) (SWIG_PERL_OBJECT_CALL arg1) +#define SWIG_PERL_DECL_ARGS_2(arg1, arg2) (SWIG_PERL_OBJECT_DECL arg1, arg2) +#define SWIG_PERL_CALL_ARGS_2(arg1, arg2) (SWIG_PERL_OBJECT_CALL arg1, arg2) + +/* ----------------------------------------------------------------------------- + * pointers/data manipulation + * ----------------------------------------------------------------------------- */ + +/* For backward compatibility only */ +#define SWIG_POINTER_EXCEPTION 0 + +#ifdef __cplusplus +extern "C" { +#endif + +#define SWIG_OWNER SWIG_POINTER_OWN +#define SWIG_SHADOW SWIG_OWNER << 1 + +#define SWIG_MAYBE_PERL_OBJECT SWIG_PERL_OBJECT_DECL + +/* SWIG Perl macros */ + +/* Macro to declare an XS function */ +#ifndef XSPROTO +# define XSPROTO(name) void name(pTHX_ CV* cv) +#endif + +/* Macro to call an XS function */ +#ifdef PERL_OBJECT +# define SWIG_CALLXS(_name) _name(cv,pPerl) +#else +# ifndef MULTIPLICITY +# define SWIG_CALLXS(_name) _name(cv) +# else +# define SWIG_CALLXS(_name) _name(PERL_GET_THX, cv) +# endif +#endif + +#ifdef PERL_OBJECT +#define MAGIC_PPERL CPerlObj *pPerl = (CPerlObj *) this; + +#ifdef __cplusplus +extern "C" { +#endif +typedef int (CPerlObj::*SwigMagicFunc)(SV *, MAGIC *); +#ifdef __cplusplus +} +#endif + +#define SWIG_MAGIC(a,b) (SV *a, MAGIC *b) +#define SWIGCLASS_STATIC + +#else /* PERL_OBJECT */ + +#define MAGIC_PPERL +#define SWIGCLASS_STATIC static SWIGUNUSED + +#ifndef MULTIPLICITY +#define SWIG_MAGIC(a,b) (SV *a, MAGIC *b) + +#ifdef __cplusplus +extern "C" { +#endif +typedef int (*SwigMagicFunc)(SV *, MAGIC *); +#ifdef __cplusplus +} +#endif + +#else /* MULTIPLICITY */ + +#define SWIG_MAGIC(a,b) (struct interpreter *interp, SV *a, MAGIC *b) + +#ifdef __cplusplus +extern "C" { +#endif +typedef int (*SwigMagicFunc)(struct interpreter *, SV *, MAGIC *); +#ifdef __cplusplus +} +#endif + +#endif /* MULTIPLICITY */ +#endif /* PERL_OBJECT */ + +/* Workaround for bug in perl 5.6.x croak and earlier */ +#if (PERL_VERSION < 8) +# ifdef PERL_OBJECT +# define SWIG_croak_null() SWIG_Perl_croak_null(pPerl) +static void SWIG_Perl_croak_null(CPerlObj *pPerl) +# else +static void SWIG_croak_null() +# endif +{ + SV *err=ERRSV; +# if (PERL_VERSION < 6) + croak("%_", err); +# else + if (SvOK(err) && !SvROK(err)) croak("%_", err); + croak(Nullch); +# endif +} +#else +# define SWIG_croak_null() croak(Nullch) +#endif + + +/* + Define how strict is the cast between strings and integers/doubles + when overloading between these types occurs. + + The default is making it as strict as possible by using SWIG_AddCast + when needed. + + You can use -DSWIG_PERL_NO_STRICT_STR2NUM at compilation time to + disable the SWIG_AddCast, making the casting between string and + numbers less strict. + + In the end, we try to solve the overloading between strings and + numerical types in the more natural way, but if you can avoid it, + well, avoid it using %rename, for example. +*/ +#ifndef SWIG_PERL_NO_STRICT_STR2NUM +# ifndef SWIG_PERL_STRICT_STR2NUM +# define SWIG_PERL_STRICT_STR2NUM +# endif +#endif +#ifdef SWIG_PERL_STRICT_STR2NUM +/* string takes precedence */ +#define SWIG_Str2NumCast(x) SWIG_AddCast(x) +#else +/* number takes precedence */ +#define SWIG_Str2NumCast(x) x +#endif + + + +#include + +SWIGRUNTIME const char * +SWIG_Perl_TypeProxyName(const swig_type_info *type) { + if (!type) return NULL; + if (type->clientdata != NULL) { + return (const char*) type->clientdata; + } + else { + return type->name; + } +} + +/* Identical to SWIG_TypeCheck, except for strcmp comparison */ +SWIGRUNTIME swig_cast_info * +SWIG_TypeProxyCheck(const char *c, swig_type_info *ty) { + if (ty) { + swig_cast_info *iter = ty->cast; + while (iter) { + if ( (!iter->type->clientdata && (strcmp(iter->type->name, c) == 0)) || + (iter->type->clientdata && (strcmp((char*)iter->type->clientdata, c) == 0)) ) { + if (iter == ty->cast) + return iter; + /* Move iter to the top of the linked list */ + iter->prev->next = iter->next; + if (iter->next) + iter->next->prev = iter->prev; + iter->next = ty->cast; + iter->prev = 0; + if (ty->cast) ty->cast->prev = iter; + ty->cast = iter; + return iter; + } + iter = iter->next; + } + } + return 0; +} + +/* Function for getting a pointer value */ + +SWIGRUNTIME int +SWIG_Perl_ConvertPtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void **ptr, swig_type_info *_t, int flags) { + swig_cast_info *tc; + void *voidptr = (void *)0; + SV *tsv = 0; + /* If magical, apply more magic */ + if (SvGMAGICAL(sv)) + mg_get(sv); + + /* Check to see if this is an object */ + if (sv_isobject(sv)) { + IV tmp = 0; + tsv = (SV*) SvRV(sv); + if ((SvTYPE(tsv) == SVt_PVHV)) { + MAGIC *mg; + if (SvMAGICAL(tsv)) { + mg = mg_find(tsv,'P'); + if (mg) { + sv = mg->mg_obj; + if (sv_isobject(sv)) { + tsv = (SV*)SvRV(sv); + tmp = SvIV(tsv); + } + } + } else { + return SWIG_ERROR; + } + } else { + tmp = SvIV(tsv); + } + voidptr = INT2PTR(void *,tmp); + } else if (! SvOK(sv)) { /* Check for undef */ + *(ptr) = (void *) 0; + return SWIG_OK; + } else if (SvTYPE(sv) == SVt_RV) { /* Check for NULL pointer */ + if (!SvROK(sv)) { + *(ptr) = (void *) 0; + return SWIG_OK; + } else { + return SWIG_ERROR; + } + } else { /* Don't know what it is */ + return SWIG_ERROR; + } + if (_t) { + /* Now see if the types match */ + char *_c = HvNAME(SvSTASH(SvRV(sv))); + tc = SWIG_TypeProxyCheck(_c,_t); + if (!tc) { + return SWIG_ERROR; + } + { + int newmemory = 0; + *ptr = SWIG_TypeCast(tc,voidptr,&newmemory); + assert(!newmemory); /* newmemory handling not yet implemented */ + } + } else { + *ptr = voidptr; + } + + /* + * DISOWN implementation: we need a perl guru to check this one. + */ + if (tsv && (flags & SWIG_POINTER_DISOWN)) { + /* + * almost copy paste code from below SWIG_POINTER_OWN setting + */ + SV *obj = sv; + HV *stash = SvSTASH(SvRV(obj)); + GV *gv = *(GV**) hv_fetch(stash, "OWNER", 5, TRUE); + if (isGV(gv)) { + HV *hv = GvHVn(gv); + /* + * To set ownership (see below), a newSViv(1) entry is added. + * Hence, to remove ownership, we delete the entry. + */ + if (hv_exists_ent(hv, obj, 0)) { + hv_delete_ent(hv, obj, 0, 0); + } + } + } + return SWIG_OK; +} + +SWIGRUNTIME void +SWIG_Perl_MakePtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void *ptr, swig_type_info *t, int flags) { + if (ptr && (flags & SWIG_SHADOW)) { + SV *self; + SV *obj=newSV(0); + HV *hash=newHV(); + HV *stash; + sv_setref_pv(obj, (char *) SWIG_Perl_TypeProxyName(t), ptr); + stash=SvSTASH(SvRV(obj)); + if (flags & SWIG_POINTER_OWN) { + HV *hv; + GV *gv=*(GV**)hv_fetch(stash, "OWNER", 5, TRUE); + if (!isGV(gv)) + gv_init(gv, stash, "OWNER", 5, FALSE); + hv=GvHVn(gv); + hv_store_ent(hv, obj, newSViv(1), 0); + } + sv_magic((SV *)hash, (SV *)obj, 'P', Nullch, 0); + SvREFCNT_dec(obj); + self=newRV_noinc((SV *)hash); + sv_setsv(sv, self); + SvREFCNT_dec((SV *)self); + sv_bless(sv, stash); + } + else { + sv_setref_pv(sv, (char *) SWIG_Perl_TypeProxyName(t), ptr); + } +} + +SWIGRUNTIMEINLINE SV * +SWIG_Perl_NewPointerObj(SWIG_MAYBE_PERL_OBJECT void *ptr, swig_type_info *t, int flags) { + SV *result = sv_newmortal(); + SWIG_MakePtr(result, ptr, t, flags); + return result; +} + +SWIGRUNTIME void +SWIG_Perl_MakePackedObj(SWIG_MAYBE_PERL_OBJECT SV *sv, void *ptr, int sz, swig_type_info *type) { + char result[1024]; + char *r = result; + if ((2*sz + 1 + strlen(SWIG_Perl_TypeProxyName(type))) > 1000) return; + *(r++) = '_'; + r = SWIG_PackData(r,ptr,sz); + strcpy(r,SWIG_Perl_TypeProxyName(type)); + sv_setpv(sv, result); +} + +SWIGRUNTIME SV * +SWIG_Perl_NewPackedObj(SWIG_MAYBE_PERL_OBJECT void *ptr, int sz, swig_type_info *type) { + SV *result = sv_newmortal(); + SWIG_Perl_MakePackedObj(result, ptr, sz, type); + return result; +} + +/* Convert a packed value value */ +SWIGRUNTIME int +SWIG_Perl_ConvertPacked(SWIG_MAYBE_PERL_OBJECT SV *obj, void *ptr, int sz, swig_type_info *ty) { + swig_cast_info *tc; + const char *c = 0; + + if ((!obj) || (!SvOK(obj))) return SWIG_ERROR; + c = SvPV_nolen(obj); + /* Pointer values must start with leading underscore */ + if (*c != '_') return SWIG_ERROR; + c++; + c = SWIG_UnpackData(c,ptr,sz); + if (ty) { + tc = SWIG_TypeCheck(c,ty); + if (!tc) return SWIG_ERROR; + } + return SWIG_OK; +} + + +/* Macros for low-level exception handling */ +#define SWIG_croak(x) { SWIG_Error(SWIG_RuntimeError, x); SWIG_fail; } + + +typedef XSPROTO(SwigPerlWrapper); +typedef SwigPerlWrapper *SwigPerlWrapperPtr; + +/* Structure for command table */ +typedef struct { + const char *name; + SwigPerlWrapperPtr wrapper; +} swig_command_info; + +/* Information for constant table */ + +#define SWIG_INT 1 +#define SWIG_FLOAT 2 +#define SWIG_STRING 3 +#define SWIG_POINTER 4 +#define SWIG_BINARY 5 + +/* Constant information structure */ +typedef struct swig_constant_info { + int type; + const char *name; + long lvalue; + double dvalue; + void *pvalue; + swig_type_info **ptype; +} swig_constant_info; + + +/* Structure for variable table */ +typedef struct { + const char *name; + SwigMagicFunc set; + SwigMagicFunc get; + swig_type_info **type; +} swig_variable_info; + +/* Magic variable code */ +#ifndef PERL_OBJECT +#define swig_create_magic(s,a,b,c) _swig_create_magic(s,a,b,c) + #ifndef MULTIPLICITY + SWIGRUNTIME void _swig_create_magic(SV *sv, char *name, int (*set)(SV *, MAGIC *), int (*get)(SV *,MAGIC *)) + #else + SWIGRUNTIME void _swig_create_magic(SV *sv, char *name, int (*set)(struct interpreter*, SV *, MAGIC *), int (*get)(struct interpreter*, SV *,MAGIC *)) + #endif +#else +# define swig_create_magic(s,a,b,c) _swig_create_magic(pPerl,s,a,b,c) +SWIGRUNTIME void _swig_create_magic(CPerlObj *pPerl, SV *sv, const char *name, int (CPerlObj::*set)(SV *, MAGIC *), int (CPerlObj::*get)(SV *, MAGIC *)) +#endif +{ + MAGIC *mg; + sv_magic(sv,sv,'U',(char *) name,strlen(name)); + mg = mg_find(sv,'U'); + mg->mg_virtual = (MGVTBL *) malloc(sizeof(MGVTBL)); + mg->mg_virtual->svt_get = (SwigMagicFunc) get; + mg->mg_virtual->svt_set = (SwigMagicFunc) set; + mg->mg_virtual->svt_len = 0; + mg->mg_virtual->svt_clear = 0; + mg->mg_virtual->svt_free = 0; +} + + +SWIGRUNTIME swig_module_info * +SWIG_Perl_GetModule(void) { + static void *type_pointer = (void *)0; + SV *pointer; + + /* first check if pointer already created */ + if (!type_pointer) { + pointer = get_sv("swig_runtime_data::type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, FALSE | GV_ADDMULTI); + if (pointer && SvOK(pointer)) { + type_pointer = INT2PTR(swig_type_info **, SvIV(pointer)); + } + } + + return (swig_module_info *) type_pointer; +} + +SWIGRUNTIME void +SWIG_Perl_SetModule(swig_module_info *module) { + SV *pointer; + + /* create a new pointer */ + pointer = get_sv("swig_runtime_data::type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, TRUE | GV_ADDMULTI); + sv_setiv(pointer, PTR2IV(module)); +} + +#ifdef __cplusplus +} +#endif + +/* Workaround perl5 global namespace pollution. Note that undefining library + * functions like fopen will not solve the problem on all platforms as fopen + * might be a macro on Windows but not necessarily on other operating systems. */ +#ifdef do_open + #undef do_open +#endif +#ifdef do_close + #undef do_close +#endif +#ifdef scalar + #undef scalar +#endif +#ifdef list + #undef list +#endif +#ifdef apply + #undef apply +#endif +#ifdef convert + #undef convert +#endif +#ifdef Error + #undef Error +#endif +#ifdef form + #undef form +#endif +#ifdef vform + #undef vform +#endif +#ifdef LABEL + #undef LABEL +#endif +#ifdef METHOD + #undef METHOD +#endif +#ifdef Move + #undef Move +#endif +#ifdef yylex + #undef yylex +#endif +#ifdef yyparse + #undef yyparse +#endif +#ifdef yyerror + #undef yyerror +#endif +#ifdef invert + #undef invert +#endif +#ifdef ref + #undef ref +#endif +#ifdef read + #undef read +#endif +#ifdef write + #undef write +#endif +#ifdef eof + #undef eof +#endif +#ifdef bool + #undef bool +#endif +#ifdef close + #undef close +#endif +#ifdef rewind + #undef rewind +#endif +#ifdef free + #undef free +#endif +#ifdef malloc + #undef malloc +#endif +#ifdef calloc + #undef calloc +#endif +#ifdef Stat + #undef Stat +#endif +#ifdef check + #undef check +#endif +#ifdef seekdir + #undef seekdir +#endif +#ifdef open + #undef open +#endif +#ifdef readdir + #undef readdir +#endif +#ifdef bind + #undef bind +#endif @@ -1512,35 +1495,38 @@ SWIG_Perl_SetModule(swig_module_info *module) { /* -------- TYPES TABLE (BEGIN) -------- */ -#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_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 SWIGTYPE_p_CallSession swig_types[0] +#define SWIGTYPE_p_DDebugCallback swig_types[1] +#define SWIGTYPE_p_DialogEvent swig_types[2] +#define SWIGTYPE_p_MessagingEvent swig_types[3] +#define SWIGTYPE_p_MessagingSession swig_types[4] +#define SWIGTYPE_p_OptionsEvent swig_types[5] +#define SWIGTYPE_p_OptionsSession swig_types[6] +#define SWIGTYPE_p_ProxyAudioConsumer swig_types[7] +#define SWIGTYPE_p_ProxyAudioProducer swig_types[8] +#define SWIGTYPE_p_PublicationEvent swig_types[9] +#define SWIGTYPE_p_PublicationSession swig_types[10] +#define SWIGTYPE_p_RegistrationEvent swig_types[11] +#define SWIGTYPE_p_RegistrationSession swig_types[12] +#define SWIGTYPE_p_SafeObject swig_types[13] +#define SWIGTYPE_p_SipCallback swig_types[14] +#define SWIGTYPE_p_SipEvent swig_types[15] +#define SWIGTYPE_p_SipMessage swig_types[16] +#define SWIGTYPE_p_SipSession swig_types[17] +#define SWIGTYPE_p_SipStack swig_types[18] +#define SWIGTYPE_p_SipUri swig_types[19] +#define SWIGTYPE_p_StackEvent swig_types[20] +#define SWIGTYPE_p_SubscriptionEvent swig_types[21] +#define SWIGTYPE_p_SubscriptionSession swig_types[22] +#define SWIGTYPE_p_char swig_types[23] +#define SWIGTYPE_p_tsip_event_type_e swig_types[24] +#define SWIGTYPE_p_tsip_message_event_type_e swig_types[25] +#define SWIGTYPE_p_tsip_options_event_type_e swig_types[26] +#define SWIGTYPE_p_tsip_publish_event_type_e swig_types[27] +#define SWIGTYPE_p_tsip_register_event_type_e swig_types[28] +#define SWIGTYPE_p_tsip_subscribe_event_type_e swig_types[29] +static swig_type_info *swig_types[31]; +static swig_module_info swig_module = {swig_types, 30, 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) @@ -1551,7 +1537,7 @@ static swig_module_info swig_module = {swig_types, 27, 0, 0, 0, 0}; #define SWIG_name "tinyWRAPc::boot_tinyWRAP" #define SWIG_prefix "tinyWRAPc::" -#define SWIGVERSION 0x010340 +#define SWIGVERSION 0x010339 #define SWIG_VERSION SWIGVERSION @@ -1656,6 +1642,9 @@ SWIG_From_int SWIG_PERL_DECL_ARGS_1(int value) #include "SipEvent.h" #include "SipSession.h" +#include "ProxyConsumer.h" +#include "ProxyProducer.h" + #include "SipCallback.h" #include "SafeObject.h" #include "SipStack.h" @@ -4043,6 +4032,128 @@ XS(_wrap_SipSession_getId) { } +XS(_wrap_new_CallSession) { + { + SipStack *arg1 = (SipStack *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + CallSession *result = 0 ; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: new_CallSession(Stack);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SipStack, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CallSession" "', argument " "1"" of type '" "SipStack *""'"); + } + arg1 = reinterpret_cast< SipStack * >(argp1); + result = (CallSession *)new CallSession(arg1); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CallSession, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_delete_CallSession) { + { + CallSession *arg1 = (CallSession *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: delete_CallSession(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CallSession, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CallSession" "', argument " "1"" of type '" "CallSession *""'"); + } + arg1 = reinterpret_cast< CallSession * >(argp1); + delete arg1; + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_CallSession_Call) { + { + CallSession *arg1 = (CallSession *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: CallSession_Call(self,remoteUri);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CallSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CallSession_Call" "', argument " "1"" of type '" "CallSession *""'"); + } + arg1 = reinterpret_cast< CallSession * >(argp1); + res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CallSession_Call" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + result = (bool)(arg1)->Call((char const *)arg2); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + XSRETURN(argvi); + fail: + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + SWIG_croak_null(); + } +} + + +XS(_wrap_CallSession_Hangup) { + { + CallSession *arg1 = (CallSession *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: CallSession_Hangup(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CallSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CallSession_Hangup" "', argument " "1"" of type '" "CallSession *""'"); + } + arg1 = reinterpret_cast< CallSession * >(argp1); + result = (bool)(arg1)->Hangup(); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + XS(_wrap_new_MessagingSession) { { SipStack *arg1 = (SipStack *) 0 ; @@ -4634,6 +4745,562 @@ XS(_wrap_SubscriptionSession_UnSubscribe) { } +XS(_wrap_new_ProxyAudioConsumer) { + { + int argvi = 0; + ProxyAudioConsumer *result = 0 ; + dXSARGS; + + if ((items < 0) || (items > 0)) { + SWIG_croak("Usage: new_ProxyAudioConsumer();"); + } + result = (ProxyAudioConsumer *)new ProxyAudioConsumer(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ProxyAudioConsumer, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_delete_ProxyAudioConsumer) { + { + ProxyAudioConsumer *arg1 = (ProxyAudioConsumer *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: delete_ProxyAudioConsumer(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ProxyAudioConsumer, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ProxyAudioConsumer" "', argument " "1"" of type '" "ProxyAudioConsumer *""'"); + } + arg1 = reinterpret_cast< ProxyAudioConsumer * >(argp1); + delete arg1; + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ProxyAudioConsumer_prepare) { + { + ProxyAudioConsumer *arg1 = (ProxyAudioConsumer *) 0 ; + int arg2 ; + int arg3 ; + int arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + int val4 ; + int ecode4 = 0 ; + int argvi = 0; + int result; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: ProxyAudioConsumer_prepare(self,ptime,rate,channels);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ProxyAudioConsumer, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProxyAudioConsumer_prepare" "', argument " "1"" of type '" "ProxyAudioConsumer *""'"); + } + arg1 = reinterpret_cast< ProxyAudioConsumer * >(argp1); + ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ProxyAudioConsumer_prepare" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ProxyAudioConsumer_prepare" "', argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "ProxyAudioConsumer_prepare" "', argument " "4"" of type '" "int""'"); + } + arg4 = static_cast< int >(val4); + result = (int)(arg1)->prepare(arg2,arg3,arg4); + ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; + + + + + XSRETURN(argvi); + fail: + + + + + SWIG_croak_null(); + } +} + + +XS(_wrap_ProxyAudioConsumer_start) { + { + ProxyAudioConsumer *arg1 = (ProxyAudioConsumer *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + int result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ProxyAudioConsumer_start(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ProxyAudioConsumer, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProxyAudioConsumer_start" "', argument " "1"" of type '" "ProxyAudioConsumer *""'"); + } + arg1 = reinterpret_cast< ProxyAudioConsumer * >(argp1); + result = (int)(arg1)->start(); + ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ProxyAudioConsumer_pause) { + { + ProxyAudioConsumer *arg1 = (ProxyAudioConsumer *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + int result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ProxyAudioConsumer_pause(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ProxyAudioConsumer, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProxyAudioConsumer_pause" "', argument " "1"" of type '" "ProxyAudioConsumer *""'"); + } + arg1 = reinterpret_cast< ProxyAudioConsumer * >(argp1); + result = (int)(arg1)->pause(); + ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ProxyAudioConsumer_stop) { + { + ProxyAudioConsumer *arg1 = (ProxyAudioConsumer *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + int result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ProxyAudioConsumer_stop(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ProxyAudioConsumer, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProxyAudioConsumer_stop" "', argument " "1"" of type '" "ProxyAudioConsumer *""'"); + } + arg1 = reinterpret_cast< ProxyAudioConsumer * >(argp1); + result = (int)(arg1)->stop(); + ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ProxyAudioConsumer_setActivate) { + { + ProxyAudioConsumer *arg1 = (ProxyAudioConsumer *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ProxyAudioConsumer_setActivate(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ProxyAudioConsumer, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProxyAudioConsumer_setActivate" "', argument " "1"" of type '" "ProxyAudioConsumer *""'"); + } + arg1 = reinterpret_cast< ProxyAudioConsumer * >(argp1); + (arg1)->setActivate(); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ProxyAudioConsumer_pull) { + { + ProxyAudioConsumer *arg1 = (ProxyAudioConsumer *) 0 ; + void *arg2 = (void *) 0 ; + unsigned int arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + unsigned int val3 ; + int ecode3 = 0 ; + int argvi = 0; + unsigned int result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: ProxyAudioConsumer_pull(self,output,size);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ProxyAudioConsumer, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProxyAudioConsumer_pull" "', argument " "1"" of type '" "ProxyAudioConsumer *""'"); + } + arg1 = reinterpret_cast< ProxyAudioConsumer * >(argp1); + res2 = SWIG_ConvertPtr(ST(1),SWIG_as_voidptrptr(&arg2), 0, 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ProxyAudioConsumer_pull" "', argument " "2"" of type '" "void *""'"); + } + ecode3 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ProxyAudioConsumer_pull" "', argument " "3"" of type '" "unsigned int""'"); + } + arg3 = static_cast< unsigned int >(val3); + result = (unsigned int)(arg1)->pull(arg2,arg3); + ST(argvi) = SWIG_From_unsigned_SS_int SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ; + + + + XSRETURN(argvi); + fail: + + + + SWIG_croak_null(); + } +} + + +XS(_wrap_ProxyAudioConsumer_registerPlugin) { + { + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 0) || (items > 0)) { + SWIG_croak("Usage: ProxyAudioConsumer_registerPlugin();"); + } + result = (bool)ProxyAudioConsumer::registerPlugin(); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_new_ProxyAudioProducer) { + { + int argvi = 0; + ProxyAudioProducer *result = 0 ; + dXSARGS; + + if ((items < 0) || (items > 0)) { + SWIG_croak("Usage: new_ProxyAudioProducer();"); + } + result = (ProxyAudioProducer *)new ProxyAudioProducer(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ProxyAudioProducer, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_delete_ProxyAudioProducer) { + { + ProxyAudioProducer *arg1 = (ProxyAudioProducer *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: delete_ProxyAudioProducer(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ProxyAudioProducer, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ProxyAudioProducer" "', argument " "1"" of type '" "ProxyAudioProducer *""'"); + } + arg1 = reinterpret_cast< ProxyAudioProducer * >(argp1); + delete arg1; + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ProxyAudioProducer_prepare) { + { + ProxyAudioProducer *arg1 = (ProxyAudioProducer *) 0 ; + int arg2 ; + int arg3 ; + int arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + int val4 ; + int ecode4 = 0 ; + int argvi = 0; + int result; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: ProxyAudioProducer_prepare(self,ptime,rate,channels);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ProxyAudioProducer, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProxyAudioProducer_prepare" "', argument " "1"" of type '" "ProxyAudioProducer *""'"); + } + arg1 = reinterpret_cast< ProxyAudioProducer * >(argp1); + ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ProxyAudioProducer_prepare" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ProxyAudioProducer_prepare" "', argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "ProxyAudioProducer_prepare" "', argument " "4"" of type '" "int""'"); + } + arg4 = static_cast< int >(val4); + result = (int)(arg1)->prepare(arg2,arg3,arg4); + ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; + + + + + XSRETURN(argvi); + fail: + + + + + SWIG_croak_null(); + } +} + + +XS(_wrap_ProxyAudioProducer_start) { + { + ProxyAudioProducer *arg1 = (ProxyAudioProducer *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + int result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ProxyAudioProducer_start(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ProxyAudioProducer, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProxyAudioProducer_start" "', argument " "1"" of type '" "ProxyAudioProducer *""'"); + } + arg1 = reinterpret_cast< ProxyAudioProducer * >(argp1); + result = (int)(arg1)->start(); + ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ProxyAudioProducer_pause) { + { + ProxyAudioProducer *arg1 = (ProxyAudioProducer *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + int result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ProxyAudioProducer_pause(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ProxyAudioProducer, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProxyAudioProducer_pause" "', argument " "1"" of type '" "ProxyAudioProducer *""'"); + } + arg1 = reinterpret_cast< ProxyAudioProducer * >(argp1); + result = (int)(arg1)->pause(); + ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ProxyAudioProducer_stop) { + { + ProxyAudioProducer *arg1 = (ProxyAudioProducer *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + int result; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ProxyAudioProducer_stop(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ProxyAudioProducer, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProxyAudioProducer_stop" "', argument " "1"" of type '" "ProxyAudioProducer *""'"); + } + arg1 = reinterpret_cast< ProxyAudioProducer * >(argp1); + result = (int)(arg1)->stop(); + ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ProxyAudioProducer_setActivate) { + { + ProxyAudioProducer *arg1 = (ProxyAudioProducer *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: ProxyAudioProducer_setActivate(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ProxyAudioProducer, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProxyAudioProducer_setActivate" "', argument " "1"" of type '" "ProxyAudioProducer *""'"); + } + arg1 = reinterpret_cast< ProxyAudioProducer * >(argp1); + (arg1)->setActivate(); + ST(argvi) = sv_newmortal(); + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_ProxyAudioProducer_push) { + { + ProxyAudioProducer *arg1 = (ProxyAudioProducer *) 0 ; + void *arg2 = (void *) 0 ; + unsigned int arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + unsigned int val3 ; + int ecode3 = 0 ; + int argvi = 0; + int result; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: ProxyAudioProducer_push(self,buffer,size);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ProxyAudioProducer, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProxyAudioProducer_push" "', argument " "1"" of type '" "ProxyAudioProducer *""'"); + } + arg1 = reinterpret_cast< ProxyAudioProducer * >(argp1); + res2 = SWIG_ConvertPtr(ST(1),SWIG_as_voidptrptr(&arg2), 0, 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ProxyAudioProducer_push" "', argument " "2"" of type '" "void const *""'"); + } + ecode3 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ProxyAudioProducer_push" "', argument " "3"" of type '" "unsigned int""'"); + } + arg3 = static_cast< unsigned int >(val3); + result = (int)(arg1)->push((void const *)arg2,arg3); + ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; + + + + XSRETURN(argvi); + fail: + + + + SWIG_croak_null(); + } +} + + +XS(_wrap_ProxyAudioProducer_registerPlugin) { + { + int argvi = 0; + bool result; + dXSARGS; + + if ((items < 0) || (items > 0)) { + SWIG_croak("Usage: ProxyAudioProducer_registerPlugin();"); + } + result = (bool)ProxyAudioProducer::registerPlugin(); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + XS(_wrap_new_SipCallback) { { int argvi = 0; @@ -5778,6 +6445,9 @@ XS(_wrap_SipStack_stop) { /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ +static void *_p_CallSessionTo_p_SipSession(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((SipSession *) ((CallSession *) x)); +} static void *_p_MessagingSessionTo_p_SipSession(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((SipSession *) ((MessagingSession *) x)); } @@ -5817,12 +6487,15 @@ static void *_p_StackEventTo_p_SipEvent(void *x, int *SWIGUNUSEDPARM(newmemory)) static void *_p_MessagingEventTo_p_SipEvent(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((SipEvent *) ((MessagingEvent *) x)); } +static swig_type_info _swigt__p_CallSession = {"_p_CallSession", "CallSession *", 0, 0, (void*)"tinyWRAP::CallSession", 0}; 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}; static swig_type_info _swigt__p_OptionsEvent = {"_p_OptionsEvent", "OptionsEvent *", 0, 0, (void*)"tinyWRAP::OptionsEvent", 0}; static swig_type_info _swigt__p_OptionsSession = {"_p_OptionsSession", "OptionsSession *", 0, 0, (void*)"tinyWRAP::OptionsSession", 0}; +static swig_type_info _swigt__p_ProxyAudioConsumer = {"_p_ProxyAudioConsumer", "ProxyAudioConsumer *", 0, 0, (void*)"tinyWRAP::ProxyAudioConsumer", 0}; +static swig_type_info _swigt__p_ProxyAudioProducer = {"_p_ProxyAudioProducer", "ProxyAudioProducer *", 0, 0, (void*)"tinyWRAP::ProxyAudioProducer", 0}; static swig_type_info _swigt__p_PublicationEvent = {"_p_PublicationEvent", "PublicationEvent *", 0, 0, (void*)"tinyWRAP::PublicationEvent", 0}; static swig_type_info _swigt__p_PublicationSession = {"_p_PublicationSession", "PublicationSession *", 0, 0, (void*)"tinyWRAP::PublicationSession", 0}; static swig_type_info _swigt__p_RegistrationEvent = {"_p_RegistrationEvent", "RegistrationEvent *", 0, 0, (void*)"tinyWRAP::RegistrationEvent", 0}; @@ -5846,12 +6519,15 @@ 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_CallSession, &_swigt__p_DDebugCallback, &_swigt__p_DialogEvent, &_swigt__p_MessagingEvent, &_swigt__p_MessagingSession, &_swigt__p_OptionsEvent, &_swigt__p_OptionsSession, + &_swigt__p_ProxyAudioConsumer, + &_swigt__p_ProxyAudioProducer, &_swigt__p_PublicationEvent, &_swigt__p_PublicationSession, &_swigt__p_RegistrationEvent, @@ -5875,12 +6551,15 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_tsip_subscribe_event_type_e, }; +static swig_cast_info _swigc__p_CallSession[] = { {&_swigt__p_CallSession, 0, 0, 0},{0, 0, 0, 0}}; 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}}; static swig_cast_info _swigc__p_OptionsEvent[] = { {&_swigt__p_OptionsEvent, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_OptionsSession[] = { {&_swigt__p_OptionsSession, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ProxyAudioConsumer[] = { {&_swigt__p_ProxyAudioConsumer, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ProxyAudioProducer[] = { {&_swigt__p_ProxyAudioProducer, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_PublicationEvent[] = { {&_swigt__p_PublicationEvent, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_PublicationSession[] = { {&_swigt__p_PublicationSession, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_RegistrationEvent[] = { {&_swigt__p_RegistrationEvent, 0, 0, 0},{0, 0, 0, 0}}; @@ -5889,7 +6568,7 @@ static swig_cast_info _swigc__p_SafeObject[] = { {&_swigt__p_SipStack, _p_SipSt static swig_cast_info _swigc__p_SipCallback[] = { {&_swigt__p_SipCallback, 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_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_SipSession[] = { {&_swigt__p_SipSession, 0, 0, 0}, {&_swigt__p_CallSession, _p_CallSessionTo_p_SipSession, 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}}; @@ -5904,12 +6583,15 @@ 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_CallSession, _swigc__p_DDebugCallback, _swigc__p_DialogEvent, _swigc__p_MessagingEvent, _swigc__p_MessagingSession, _swigc__p_OptionsEvent, _swigc__p_OptionsSession, + _swigc__p_ProxyAudioConsumer, + _swigc__p_ProxyAudioProducer, _swigc__p_PublicationEvent, _swigc__p_PublicationSession, _swigc__p_RegistrationEvent, @@ -5996,6 +6678,10 @@ static swig_command_info swig_commands[] = { {"tinyWRAPc::SipSession_setToUri", _wrap_SipSession_setToUri}, {"tinyWRAPc::SipSession_setSilentHangup", _wrap_SipSession_setSilentHangup}, {"tinyWRAPc::SipSession_getId", _wrap_SipSession_getId}, +{"tinyWRAPc::new_CallSession", _wrap_new_CallSession}, +{"tinyWRAPc::delete_CallSession", _wrap_delete_CallSession}, +{"tinyWRAPc::CallSession_Call", _wrap_CallSession_Call}, +{"tinyWRAPc::CallSession_Hangup", _wrap_CallSession_Hangup}, {"tinyWRAPc::new_MessagingSession", _wrap_new_MessagingSession}, {"tinyWRAPc::delete_MessagingSession", _wrap_delete_MessagingSession}, {"tinyWRAPc::MessagingSession_Send", _wrap_MessagingSession_Send}, @@ -6016,6 +6702,24 @@ static swig_command_info swig_commands[] = { {"tinyWRAPc::delete_SubscriptionSession", _wrap_delete_SubscriptionSession}, {"tinyWRAPc::SubscriptionSession_Subscribe", _wrap_SubscriptionSession_Subscribe}, {"tinyWRAPc::SubscriptionSession_UnSubscribe", _wrap_SubscriptionSession_UnSubscribe}, +{"tinyWRAPc::new_ProxyAudioConsumer", _wrap_new_ProxyAudioConsumer}, +{"tinyWRAPc::delete_ProxyAudioConsumer", _wrap_delete_ProxyAudioConsumer}, +{"tinyWRAPc::ProxyAudioConsumer_prepare", _wrap_ProxyAudioConsumer_prepare}, +{"tinyWRAPc::ProxyAudioConsumer_start", _wrap_ProxyAudioConsumer_start}, +{"tinyWRAPc::ProxyAudioConsumer_pause", _wrap_ProxyAudioConsumer_pause}, +{"tinyWRAPc::ProxyAudioConsumer_stop", _wrap_ProxyAudioConsumer_stop}, +{"tinyWRAPc::ProxyAudioConsumer_setActivate", _wrap_ProxyAudioConsumer_setActivate}, +{"tinyWRAPc::ProxyAudioConsumer_pull", _wrap_ProxyAudioConsumer_pull}, +{"tinyWRAPc::ProxyAudioConsumer_registerPlugin", _wrap_ProxyAudioConsumer_registerPlugin}, +{"tinyWRAPc::new_ProxyAudioProducer", _wrap_new_ProxyAudioProducer}, +{"tinyWRAPc::delete_ProxyAudioProducer", _wrap_delete_ProxyAudioProducer}, +{"tinyWRAPc::ProxyAudioProducer_prepare", _wrap_ProxyAudioProducer_prepare}, +{"tinyWRAPc::ProxyAudioProducer_start", _wrap_ProxyAudioProducer_start}, +{"tinyWRAPc::ProxyAudioProducer_pause", _wrap_ProxyAudioProducer_pause}, +{"tinyWRAPc::ProxyAudioProducer_stop", _wrap_ProxyAudioProducer_stop}, +{"tinyWRAPc::ProxyAudioProducer_setActivate", _wrap_ProxyAudioProducer_setActivate}, +{"tinyWRAPc::ProxyAudioProducer_push", _wrap_ProxyAudioProducer_push}, +{"tinyWRAPc::ProxyAudioProducer_registerPlugin", _wrap_ProxyAudioProducer_registerPlugin}, {"tinyWRAPc::new_SipCallback", _wrap_new_SipCallback}, {"tinyWRAPc::delete_SipCallback", _wrap_delete_SipCallback}, {"tinyWRAPc::SipCallback_OnDialogEvent", _wrap_SipCallback_OnDialogEvent}, @@ -6049,242 +6753,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 @@ -6353,205 +7057,208 @@ XS(SWIG_init) { SWIG_TypeClientData(SWIGTYPE_p_RegistrationEvent, (void*) "tinyWRAP::RegistrationEvent"); SWIG_TypeClientData(SWIGTYPE_p_SubscriptionEvent, (void*) "tinyWRAP::SubscriptionEvent"); SWIG_TypeClientData(SWIGTYPE_p_SipSession, (void*) "tinyWRAP::SipSession"); + SWIG_TypeClientData(SWIGTYPE_p_CallSession, (void*) "tinyWRAP::CallSession"); SWIG_TypeClientData(SWIGTYPE_p_MessagingSession, (void*) "tinyWRAP::MessagingSession"); SWIG_TypeClientData(SWIGTYPE_p_OptionsSession, (void*) "tinyWRAP::OptionsSession"); SWIG_TypeClientData(SWIGTYPE_p_PublicationSession, (void*) "tinyWRAP::PublicationSession"); SWIG_TypeClientData(SWIGTYPE_p_RegistrationSession, (void*) "tinyWRAP::RegistrationSession"); SWIG_TypeClientData(SWIGTYPE_p_SubscriptionSession, (void*) "tinyWRAP::SubscriptionSession"); + SWIG_TypeClientData(SWIGTYPE_p_ProxyAudioConsumer, (void*) "tinyWRAP::ProxyAudioConsumer"); + SWIG_TypeClientData(SWIGTYPE_p_ProxyAudioProducer, (void*) "tinyWRAP::ProxyAudioProducer"); SWIG_TypeClientData(SWIGTYPE_p_SipCallback, (void*) "tinyWRAP::SipCallback"); SWIG_TypeClientData(SWIGTYPE_p_SafeObject, (void*) "tinyWRAP::SafeObject"); SWIG_TypeClientData(SWIGTYPE_p_SipStack, (void*) "tinyWRAP::SipStack"); - /*@SWIG:/usr/local/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_event_invite", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_event_invite))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_event_message", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_event_message))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_event_options", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_event_options))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_event_publish", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_event_publish))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_event_register", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_event_register))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_event_subscribe", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_event_subscribe))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_event_dialog", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_event_dialog))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_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.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_event_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.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_event_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.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_event_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.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_event_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.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_event_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.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_event_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.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_event_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.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_event_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.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_event_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.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_event_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 { + /*@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_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 { + /*@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_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 { + /*@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_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 { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_i_register", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_i_register))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_ao_register", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_ao_register))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_i_unregister", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_i_unregister))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_ao_unregister", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_ao_unregister))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_i_subscribe", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_i_subscribe))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_ao_subscribe", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_ao_subscribe))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_i_unsubscribe", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_i_unsubscribe))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_ao_unsubscribe", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_ao_unsubscribe))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_i_notify", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_i_notify))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_ao_notify", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_ao_notify))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_i_publish", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_i_publish))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_ao_publish", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_ao_publish))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_i_unpublish", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_i_unpublish))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_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.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_i_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.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_ao_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.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_i_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.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_ao_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 9ef8f5ad..ec6a7b36 100644 --- a/trunk/bindings/python/tinyWRAP.py +++ b/trunk/bindings/python/tinyWRAP.py @@ -1,5 +1,5 @@ # This file was automatically generated by SWIG (http://www.swig.org). -# Version 1.3.40 +# Version 1.3.39 # # Do not make changes to this file unless you know what you are doing--modify # the SWIG interface file instead. @@ -10,18 +10,12 @@ if version_info >= (2,6,0): def swig_import_helper(): from os.path import dirname import imp - fp = None try: fp, pathname, description = imp.find_module('_tinyWRAP', [dirname(__file__)]) - except ImportError: - import _tinyWRAP - return _tinyWRAP - if fp is not None: - try: - _mod = imp.load_module('_tinyWRAP', fp, pathname, description) - finally: - fp.close() - return _mod + _mod = imp.load_module('_tinyWRAP', fp, pathname, description) + finally: + if fp is not None: fp.close() + return _mod _tinyWRAP = swig_import_helper() del swig_import_helper else: @@ -277,6 +271,25 @@ class SipSession(_object): SipSession_swigregister = _tinyWRAP.SipSession_swigregister SipSession_swigregister(SipSession) +class CallSession(SipSession): + __swig_setmethods__ = {} + for _s in [SipSession]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, CallSession, name, value) + __swig_getmethods__ = {} + for _s in [SipSession]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, CallSession, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _tinyWRAP.new_CallSession(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _tinyWRAP.delete_CallSession + __del__ = lambda self : None; + def Call(self, *args): return _tinyWRAP.CallSession_Call(self, *args) + def Hangup(self): return _tinyWRAP.CallSession_Hangup(self) +CallSession_swigregister = _tinyWRAP.CallSession_swigregister +CallSession_swigregister(CallSession) + class MessagingSession(SipSession): __swig_setmethods__ = {} for _s in [SipSession]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) @@ -372,6 +385,76 @@ class SubscriptionSession(SipSession): SubscriptionSession_swigregister = _tinyWRAP.SubscriptionSession_swigregister SubscriptionSession_swigregister(SubscriptionSession) +class ProxyAudioConsumer(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, ProxyAudioConsumer, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, ProxyAudioConsumer, name) + __repr__ = _swig_repr + def __init__(self): + if self.__class__ == ProxyAudioConsumer: + _self = None + else: + _self = self + this = _tinyWRAP.new_ProxyAudioConsumer(_self, ) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _tinyWRAP.delete_ProxyAudioConsumer + __del__ = lambda self : None; + def prepare(self, *args): return _tinyWRAP.ProxyAudioConsumer_prepare(self, *args) + def start(self): return _tinyWRAP.ProxyAudioConsumer_start(self) + def pause(self): return _tinyWRAP.ProxyAudioConsumer_pause(self) + def stop(self): return _tinyWRAP.ProxyAudioConsumer_stop(self) + def setActivate(self): return _tinyWRAP.ProxyAudioConsumer_setActivate(self) + def pull(self, *args): return _tinyWRAP.ProxyAudioConsumer_pull(self, *args) + __swig_getmethods__["registerPlugin"] = lambda x: _tinyWRAP.ProxyAudioConsumer_registerPlugin + if _newclass:registerPlugin = staticmethod(_tinyWRAP.ProxyAudioConsumer_registerPlugin) + def __disown__(self): + self.this.disown() + _tinyWRAP.disown_ProxyAudioConsumer(self) + return weakref_proxy(self) +ProxyAudioConsumer_swigregister = _tinyWRAP.ProxyAudioConsumer_swigregister +ProxyAudioConsumer_swigregister(ProxyAudioConsumer) + +def ProxyAudioConsumer_registerPlugin(): + return _tinyWRAP.ProxyAudioConsumer_registerPlugin() +ProxyAudioConsumer_registerPlugin = _tinyWRAP.ProxyAudioConsumer_registerPlugin + +class ProxyAudioProducer(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, ProxyAudioProducer, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, ProxyAudioProducer, name) + __repr__ = _swig_repr + def __init__(self): + if self.__class__ == ProxyAudioProducer: + _self = None + else: + _self = self + this = _tinyWRAP.new_ProxyAudioProducer(_self, ) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _tinyWRAP.delete_ProxyAudioProducer + __del__ = lambda self : None; + def prepare(self, *args): return _tinyWRAP.ProxyAudioProducer_prepare(self, *args) + def start(self): return _tinyWRAP.ProxyAudioProducer_start(self) + def pause(self): return _tinyWRAP.ProxyAudioProducer_pause(self) + def stop(self): return _tinyWRAP.ProxyAudioProducer_stop(self) + def setActivate(self): return _tinyWRAP.ProxyAudioProducer_setActivate(self) + def push(self, *args): return _tinyWRAP.ProxyAudioProducer_push(self, *args) + __swig_getmethods__["registerPlugin"] = lambda x: _tinyWRAP.ProxyAudioProducer_registerPlugin + if _newclass:registerPlugin = staticmethod(_tinyWRAP.ProxyAudioProducer_registerPlugin) + def __disown__(self): + self.this.disown() + _tinyWRAP.disown_ProxyAudioProducer(self) + return weakref_proxy(self) +ProxyAudioProducer_swigregister = _tinyWRAP.ProxyAudioProducer_swigregister +ProxyAudioProducer_swigregister(ProxyAudioProducer) + +def ProxyAudioProducer_registerPlugin(): + return _tinyWRAP.ProxyAudioProducer_registerPlugin() +ProxyAudioProducer_registerPlugin = _tinyWRAP.ProxyAudioProducer_registerPlugin + class SipCallback(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, SipCallback, name, value) diff --git a/trunk/bindings/python/tinyWRAP_wrap.cxx b/trunk/bindings/python/tinyWRAP_wrap.cxx index 2a1f556f..36127f1d 100644 --- a/trunk/bindings/python/tinyWRAP_wrap.cxx +++ b/trunk/bindings/python/tinyWRAP_wrap.cxx @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make @@ -36,2642 +36,2605 @@ template T SwigValueInit() { } #endif -/* ----------------------------------------------------------------------------- - * This section contains generic SWIG labels for method/variable - * declarations/attributes, and other compiler dependent labels. - * ----------------------------------------------------------------------------- */ - -/* template workaround for compilers that cannot correctly implement the C++ standard */ -#ifndef SWIGTEMPLATEDISAMBIGUATOR -# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) -# define SWIGTEMPLATEDISAMBIGUATOR template -# elif defined(__HP_aCC) -/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ -/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ -# define SWIGTEMPLATEDISAMBIGUATOR template -# else -# define SWIGTEMPLATEDISAMBIGUATOR -# endif -#endif - -/* inline attribute */ -#ifndef SWIGINLINE -# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) -# define SWIGINLINE inline -# else -# define SWIGINLINE -# endif -#endif - -/* attribute recognised by some compilers to avoid 'unused' warnings */ -#ifndef SWIGUNUSED -# if defined(__GNUC__) -# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) -# define SWIGUNUSED __attribute__ ((__unused__)) -# else -# define SWIGUNUSED -# endif -# elif defined(__ICC) -# define SWIGUNUSED __attribute__ ((__unused__)) -# else -# define SWIGUNUSED -# endif -#endif - -#ifndef SWIG_MSC_UNSUPPRESS_4505 -# if defined(_MSC_VER) -# pragma warning(disable : 4505) /* unreferenced local function has been removed */ -# endif -#endif - -#ifndef SWIGUNUSEDPARM -# ifdef __cplusplus -# define SWIGUNUSEDPARM(p) -# else -# define SWIGUNUSEDPARM(p) p SWIGUNUSED -# endif -#endif - -/* internal SWIG method */ -#ifndef SWIGINTERN -# define SWIGINTERN static SWIGUNUSED -#endif - -/* internal inline SWIG method */ -#ifndef SWIGINTERNINLINE -# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE -#endif - -/* exporting methods */ -#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) -# ifndef GCC_HASCLASSVISIBILITY -# define GCC_HASCLASSVISIBILITY -# endif -#endif - -#ifndef SWIGEXPORT -# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) -# if defined(STATIC_LINKED) -# define SWIGEXPORT -# else -# define SWIGEXPORT __declspec(dllexport) -# endif -# else -# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) -# define SWIGEXPORT __attribute__ ((visibility("default"))) -# else -# define SWIGEXPORT -# endif -# endif -#endif - -/* calling conventions for Windows */ -#ifndef SWIGSTDCALL -# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) -# define SWIGSTDCALL __stdcall -# else -# define SWIGSTDCALL -# endif -#endif - -/* Deal with Microsoft's attempt at deprecating C standard runtime functions */ -#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) -# define _CRT_SECURE_NO_DEPRECATE -#endif - -/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ -#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) -# define _SCL_SECURE_NO_DEPRECATE -#endif - +/* ----------------------------------------------------------------------------- + * This section contains generic SWIG labels for method/variable + * declarations/attributes, and other compiler dependent labels. + * ----------------------------------------------------------------------------- */ + +/* template workaround for compilers that cannot correctly implement the C++ standard */ +#ifndef SWIGTEMPLATEDISAMBIGUATOR +# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) +# define SWIGTEMPLATEDISAMBIGUATOR template +# elif defined(__HP_aCC) +/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ +/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ +# define SWIGTEMPLATEDISAMBIGUATOR template +# else +# define SWIGTEMPLATEDISAMBIGUATOR +# endif +#endif + +/* inline attribute */ +#ifndef SWIGINLINE +# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) +# define SWIGINLINE inline +# else +# define SWIGINLINE +# endif +#endif + +/* attribute recognised by some compilers to avoid 'unused' warnings */ +#ifndef SWIGUNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define SWIGUNUSED __attribute__ ((__unused__)) +# else +# define SWIGUNUSED +# endif +# elif defined(__ICC) +# define SWIGUNUSED __attribute__ ((__unused__)) +# else +# define SWIGUNUSED +# endif +#endif + +#ifndef SWIG_MSC_UNSUPPRESS_4505 +# if defined(_MSC_VER) +# pragma warning(disable : 4505) /* unreferenced local function has been removed */ +# endif +#endif + +#ifndef SWIGUNUSEDPARM +# ifdef __cplusplus +# define SWIGUNUSEDPARM(p) +# else +# define SWIGUNUSEDPARM(p) p SWIGUNUSED +# endif +#endif + +/* internal SWIG method */ +#ifndef SWIGINTERN +# define SWIGINTERN static SWIGUNUSED +#endif + +/* internal inline SWIG method */ +#ifndef SWIGINTERNINLINE +# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE +#endif + +/* exporting methods */ +#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) +# ifndef GCC_HASCLASSVISIBILITY +# define GCC_HASCLASSVISIBILITY +# endif +#endif + +#ifndef SWIGEXPORT +# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# if defined(STATIC_LINKED) +# define SWIGEXPORT +# else +# define SWIGEXPORT __declspec(dllexport) +# endif +# else +# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) +# define SWIGEXPORT __attribute__ ((visibility("default"))) +# else +# define SWIGEXPORT +# endif +# endif +#endif + +/* calling conventions for Windows */ +#ifndef SWIGSTDCALL +# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# define SWIGSTDCALL __stdcall +# else +# define SWIGSTDCALL +# endif +#endif + +/* Deal with Microsoft's attempt at deprecating C standard runtime functions */ +#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) +# define _CRT_SECURE_NO_DEPRECATE +#endif + +/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ +#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) +# define _SCL_SECURE_NO_DEPRECATE +#endif + /* Python.h has to appear first */ #include -/* ----------------------------------------------------------------------------- - * swigrun.swg - * - * This file contains generic C API SWIG runtime support for pointer - * type checking. - * ----------------------------------------------------------------------------- */ - -/* This should only be incremented when either the layout of swig_type_info changes, - or for whatever reason, the runtime changes incompatibly */ -#define SWIG_RUNTIME_VERSION "4" - -/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */ -#ifdef SWIG_TYPE_TABLE -# define SWIG_QUOTE_STRING(x) #x -# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x) -# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE) -#else -# define SWIG_TYPE_TABLE_NAME -#endif - -/* - You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for - creating a static or dynamic library from the SWIG runtime code. - In 99.9% of the cases, SWIG just needs to declare them as 'static'. - - But only do this if strictly necessary, ie, if you have problems - with your compiler or suchlike. -*/ - -#ifndef SWIGRUNTIME -# define SWIGRUNTIME SWIGINTERN -#endif - -#ifndef SWIGRUNTIMEINLINE -# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE -#endif - -/* Generic buffer size */ -#ifndef SWIG_BUFFER_SIZE -# define SWIG_BUFFER_SIZE 1024 -#endif - -/* Flags for pointer conversions */ -#define SWIG_POINTER_DISOWN 0x1 -#define SWIG_CAST_NEW_MEMORY 0x2 - -/* Flags for new pointer objects */ -#define SWIG_POINTER_OWN 0x1 - - -/* - Flags/methods for returning states. - - The SWIG conversion methods, as ConvertPtr, return and integer - that tells if the conversion was successful or not. And if not, - an error code can be returned (see swigerrors.swg for the codes). - - Use the following macros/flags to set or process the returning - states. - - In old versions of SWIG, code such as the following was usually written: - - if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) { - // success code - } else { - //fail code - } - - Now you can be more explicit: - - int res = SWIG_ConvertPtr(obj,vptr,ty.flags); - if (SWIG_IsOK(res)) { - // success code - } else { - // fail code - } - - which is the same really, but now you can also do - - Type *ptr; - int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags); - if (SWIG_IsOK(res)) { - // success code - if (SWIG_IsNewObj(res) { - ... - delete *ptr; - } else { - ... - } - } else { - // fail code - } - - I.e., now SWIG_ConvertPtr can return new objects and you can - identify the case and take care of the deallocation. Of course that - also requires SWIG_ConvertPtr to return new result values, such as - - int SWIG_ConvertPtr(obj, ptr,...) { - if () { - if () { - *ptr = ; - return SWIG_NEWOBJ; - } else { - *ptr = ; - return SWIG_OLDOBJ; - } - } else { - return SWIG_BADOBJ; - } - } - - Of course, returning the plain '0(success)/-1(fail)' still works, but you can be - more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the - SWIG errors code. - - Finally, if the SWIG_CASTRANK_MODE is enabled, the result code - allows to return the 'cast rank', for example, if you have this - - int food(double) - int fooi(int); - - and you call - - food(1) // cast rank '1' (1 -> 1.0) - fooi(1) // cast rank '0' - - just use the SWIG_AddCast()/SWIG_CheckState() -*/ - -#define SWIG_OK (0) -#define SWIG_ERROR (-1) -#define SWIG_IsOK(r) (r >= 0) -#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) - -/* The CastRankLimit says how many bits are used for the cast rank */ -#define SWIG_CASTRANKLIMIT (1 << 8) -/* The NewMask denotes the object was created (using new/malloc) */ -#define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1) -/* The TmpMask is for in/out typemaps that use temporal objects */ -#define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1) -/* Simple returning values */ -#define SWIG_BADOBJ (SWIG_ERROR) -#define SWIG_OLDOBJ (SWIG_OK) -#define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK) -#define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK) -/* Check, add and del mask methods */ -#define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r) -#define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r) -#define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK)) -#define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r) -#define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r) -#define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK)) - -/* Cast-Rank Mode */ -#if defined(SWIG_CASTRANK_MODE) -# ifndef SWIG_TypeRank -# define SWIG_TypeRank unsigned long -# endif -# ifndef SWIG_MAXCASTRANK /* Default cast allowed */ -# define SWIG_MAXCASTRANK (2) -# endif -# define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1) -# define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK) -SWIGINTERNINLINE int SWIG_AddCast(int r) { - return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r; -} -SWIGINTERNINLINE int SWIG_CheckState(int r) { - return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; -} -#else /* no cast-rank mode */ -# define SWIG_AddCast -# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) -#endif - - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -typedef void *(*swig_converter_func)(void *, int *); -typedef struct swig_type_info *(*swig_dycast_func)(void **); - -/* Structure to store information on one type */ -typedef struct swig_type_info { - const char *name; /* mangled name of this type */ - const char *str; /* human readable name of this type */ - swig_dycast_func dcast; /* dynamic cast function down a hierarchy */ - struct swig_cast_info *cast; /* linked list of types that can cast into this type */ - void *clientdata; /* language specific type data */ - int owndata; /* flag if the structure owns the clientdata */ -} swig_type_info; - -/* Structure to store a type and conversion function used for casting */ -typedef struct swig_cast_info { - swig_type_info *type; /* pointer to type that is equivalent to this type */ - swig_converter_func converter; /* function to cast the void pointers */ - struct swig_cast_info *next; /* pointer to next cast in linked list */ - struct swig_cast_info *prev; /* pointer to the previous cast */ -} swig_cast_info; - -/* Structure used to store module information - * Each module generates one structure like this, and the runtime collects - * all of these structures and stores them in a circularly linked list.*/ -typedef struct swig_module_info { - swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */ - size_t size; /* Number of types in this module */ - struct swig_module_info *next; /* Pointer to next element in circularly linked list */ - swig_type_info **type_initial; /* Array of initially generated type structures */ - swig_cast_info **cast_initial; /* Array of initially generated casting structures */ - void *clientdata; /* Language specific module data */ -} swig_module_info; - -/* - Compare two type names skipping the space characters, therefore - "char*" == "char *" and "Class" == "Class", etc. - - Return 0 when the two name types are equivalent, as in - strncmp, but skipping ' '. -*/ -SWIGRUNTIME int -SWIG_TypeNameComp(const char *f1, const char *l1, - const char *f2, const char *l2) { - for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) { - while ((*f1 == ' ') && (f1 != l1)) ++f1; - while ((*f2 == ' ') && (f2 != l2)) ++f2; - if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1; - } - return (int)((l1 - f1) - (l2 - f2)); -} - -/* - Check type equivalence in a name list like ||... - Return 0 if not equal, 1 if equal -*/ -SWIGRUNTIME int -SWIG_TypeEquiv(const char *nb, const char *tb) { - int equiv = 0; - const char* te = tb + strlen(tb); - const char* ne = nb; - while (!equiv && *ne) { - for (nb = ne; *ne; ++ne) { - if (*ne == '|') break; - } - equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; - if (*ne) ++ne; - } - return equiv; -} - -/* - Check type equivalence in a name list like ||... - Return 0 if equal, -1 if nb < tb, 1 if nb > tb -*/ -SWIGRUNTIME int -SWIG_TypeCompare(const char *nb, const char *tb) { - int equiv = 0; - const char* te = tb + strlen(tb); - const char* ne = nb; - while (!equiv && *ne) { - for (nb = ne; *ne; ++ne) { - if (*ne == '|') break; - } - equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; - if (*ne) ++ne; - } - return equiv; -} - - -/* - Check the typename -*/ -SWIGRUNTIME swig_cast_info * -SWIG_TypeCheck(const char *c, swig_type_info *ty) { - if (ty) { - swig_cast_info *iter = ty->cast; - while (iter) { - if (strcmp(iter->type->name, c) == 0) { - if (iter == ty->cast) - return iter; - /* Move iter to the top of the linked list */ - iter->prev->next = iter->next; - if (iter->next) - iter->next->prev = iter->prev; - iter->next = ty->cast; - iter->prev = 0; - if (ty->cast) ty->cast->prev = iter; - ty->cast = iter; - return iter; - } - iter = iter->next; - } - } - return 0; -} - -/* - Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison -*/ -SWIGRUNTIME swig_cast_info * -SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) { - if (ty) { - swig_cast_info *iter = ty->cast; - while (iter) { - if (iter->type == from) { - if (iter == ty->cast) - return iter; - /* Move iter to the top of the linked list */ - iter->prev->next = iter->next; - if (iter->next) - iter->next->prev = iter->prev; - iter->next = ty->cast; - iter->prev = 0; - if (ty->cast) ty->cast->prev = iter; - ty->cast = iter; - return iter; - } - iter = iter->next; - } - } - return 0; -} - -/* - Cast a pointer up an inheritance hierarchy -*/ -SWIGRUNTIMEINLINE void * -SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) { - return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory); -} - -/* - Dynamic pointer casting. Down an inheritance hierarchy -*/ -SWIGRUNTIME swig_type_info * -SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) { - swig_type_info *lastty = ty; - if (!ty || !ty->dcast) return ty; - while (ty && (ty->dcast)) { - ty = (*ty->dcast)(ptr); - if (ty) lastty = ty; - } - return lastty; -} - -/* - Return the name associated with this type -*/ -SWIGRUNTIMEINLINE const char * -SWIG_TypeName(const swig_type_info *ty) { - return ty->name; -} - -/* - Return the pretty name associated with this type, - that is an unmangled type name in a form presentable to the user. -*/ -SWIGRUNTIME const char * -SWIG_TypePrettyName(const swig_type_info *type) { - /* The "str" field contains the equivalent pretty names of the - type, separated by vertical-bar characters. We choose - to print the last name, as it is often (?) the most - specific. */ - if (!type) return NULL; - if (type->str != NULL) { - const char *last_name = type->str; - const char *s; - for (s = type->str; *s; s++) - if (*s == '|') last_name = s+1; - return last_name; - } - else - return type->name; -} - -/* - Set the clientdata field for a type -*/ -SWIGRUNTIME void -SWIG_TypeClientData(swig_type_info *ti, void *clientdata) { - swig_cast_info *cast = ti->cast; - /* if (ti->clientdata == clientdata) return; */ - ti->clientdata = clientdata; - - while (cast) { - if (!cast->converter) { - swig_type_info *tc = cast->type; - if (!tc->clientdata) { - SWIG_TypeClientData(tc, clientdata); - } - } - cast = cast->next; - } -} -SWIGRUNTIME void -SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) { - SWIG_TypeClientData(ti, clientdata); - ti->owndata = 1; -} - -/* - Search for a swig_type_info structure only by mangled name - Search is a O(log #types) - - We start searching at module start, and finish searching when start == end. - Note: if start == end at the beginning of the function, we go all the way around - the circular list. -*/ -SWIGRUNTIME swig_type_info * -SWIG_MangledTypeQueryModule(swig_module_info *start, - swig_module_info *end, - const char *name) { - swig_module_info *iter = start; - do { - if (iter->size) { - register size_t l = 0; - register size_t r = iter->size - 1; - do { - /* since l+r >= 0, we can (>> 1) instead (/ 2) */ - register size_t i = (l + r) >> 1; - const char *iname = iter->types[i]->name; - if (iname) { - register int compare = strcmp(name, iname); - if (compare == 0) { - return iter->types[i]; - } else if (compare < 0) { - if (i) { - r = i - 1; - } else { - break; - } - } else if (compare > 0) { - l = i + 1; - } - } else { - break; /* should never happen */ - } - } while (l <= r); - } - iter = iter->next; - } while (iter != end); - return 0; -} - -/* - Search for a swig_type_info structure for either a mangled name or a human readable name. - It first searches the mangled names of the types, which is a O(log #types) - If a type is not found it then searches the human readable names, which is O(#types). - - We start searching at module start, and finish searching when start == end. - Note: if start == end at the beginning of the function, we go all the way around - the circular list. -*/ -SWIGRUNTIME swig_type_info * -SWIG_TypeQueryModule(swig_module_info *start, - swig_module_info *end, - const char *name) { - /* STEP 1: Search the name field using binary search */ - swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name); - if (ret) { - return ret; - } else { - /* STEP 2: If the type hasn't been found, do a complete search - of the str field (the human readable name) */ - swig_module_info *iter = start; - do { - register size_t i = 0; - for (; i < iter->size; ++i) { - if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name))) - return iter->types[i]; - } - iter = iter->next; - } while (iter != end); - } - - /* neither found a match */ - return 0; -} - -/* - Pack binary data into a string -*/ -SWIGRUNTIME char * -SWIG_PackData(char *c, void *ptr, size_t sz) { - static const char hex[17] = "0123456789abcdef"; - register const unsigned char *u = (unsigned char *) ptr; - register const unsigned char *eu = u + sz; - for (; u != eu; ++u) { - register unsigned char uu = *u; - *(c++) = hex[(uu & 0xf0) >> 4]; - *(c++) = hex[uu & 0xf]; - } - return c; -} - -/* - Unpack binary data from a string -*/ -SWIGRUNTIME const char * -SWIG_UnpackData(const char *c, void *ptr, size_t sz) { - register unsigned char *u = (unsigned char *) ptr; - register const unsigned char *eu = u + sz; - for (; u != eu; ++u) { - register char d = *(c++); - register unsigned char uu; - if ((d >= '0') && (d <= '9')) - uu = ((d - '0') << 4); - else if ((d >= 'a') && (d <= 'f')) - uu = ((d - ('a'-10)) << 4); - else - return (char *) 0; - d = *(c++); - if ((d >= '0') && (d <= '9')) - uu |= (d - '0'); - else if ((d >= 'a') && (d <= 'f')) - uu |= (d - ('a'-10)); - else - return (char *) 0; - *u = uu; - } - return c; -} - -/* - Pack 'void *' into a string buffer. -*/ -SWIGRUNTIME char * -SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) { - char *r = buff; - if ((2*sizeof(void *) + 2) > bsz) return 0; - *(r++) = '_'; - r = SWIG_PackData(r,&ptr,sizeof(void *)); - if (strlen(name) + 1 > (bsz - (r - buff))) return 0; - strcpy(r,name); - return buff; -} - -SWIGRUNTIME const char * -SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) { - if (*c != '_') { - if (strcmp(c,"NULL") == 0) { - *ptr = (void *) 0; - return name; - } else { - return 0; - } - } - return SWIG_UnpackData(++c,ptr,sizeof(void *)); -} - -SWIGRUNTIME char * -SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) { - char *r = buff; - size_t lname = (name ? strlen(name) : 0); - if ((2*sz + 2 + lname) > bsz) return 0; - *(r++) = '_'; - r = SWIG_PackData(r,ptr,sz); - if (lname) { - strncpy(r,name,lname+1); - } else { - *r = 0; - } - return buff; -} - -SWIGRUNTIME const char * -SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { - if (*c != '_') { - if (strcmp(c,"NULL") == 0) { - memset(ptr,0,sz); - return name; - } else { - return 0; - } - } - return SWIG_UnpackData(++c,ptr,sz); -} - -#ifdef __cplusplus -} -#endif - -/* Errors in SWIG */ -#define SWIG_UnknownError -1 -#define SWIG_IOError -2 -#define SWIG_RuntimeError -3 -#define SWIG_IndexError -4 -#define SWIG_TypeError -5 -#define SWIG_DivisionByZero -6 -#define SWIG_OverflowError -7 -#define SWIG_SyntaxError -8 -#define SWIG_ValueError -9 -#define SWIG_SystemError -10 -#define SWIG_AttributeError -11 -#define SWIG_MemoryError -12 -#define SWIG_NullReferenceError -13 - - - -/* Compatibility macros for Python 3 */ -#if PY_VERSION_HEX >= 0x03000000 - -#define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type) -#define PyInt_Check(x) PyLong_Check(x) -#define PyInt_AsLong(x) PyLong_AsLong(x) -#define PyInt_FromLong(x) PyLong_FromLong(x) -#define PyString_Format(fmt, args) PyUnicode_Format(fmt, args) - -#endif - -#ifndef Py_TYPE -# define Py_TYPE(op) ((op)->ob_type) -#endif - -/* SWIG APIs for compatibility of both Python 2 & 3 */ - -#if PY_VERSION_HEX >= 0x03000000 -# define SWIG_Python_str_FromFormat PyUnicode_FromFormat -#else -# define SWIG_Python_str_FromFormat PyString_FromFormat -#endif - - -/* Warning: This function will allocate a new string in Python 3, - * so please call SWIG_Python_str_DelForPy3(x) to free the space. - */ -SWIGINTERN char* -SWIG_Python_str_AsChar(PyObject *str) -{ -#if PY_VERSION_HEX >= 0x03000000 - char *cstr; - char *newstr; - Py_ssize_t len; - str = PyUnicode_AsUTF8String(str); - PyBytes_AsStringAndSize(str, &cstr, &len); - newstr = (char *) malloc(len+1); - memcpy(newstr, cstr, len+1); - Py_XDECREF(str); - return newstr; -#else - return PyString_AsString(str); -#endif -} - -#if PY_VERSION_HEX >= 0x03000000 -# define SWIG_Python_str_DelForPy3(x) free( (void*) (x) ) -#else -# define SWIG_Python_str_DelForPy3(x) -#endif - - -SWIGINTERN PyObject* -SWIG_Python_str_FromChar(const char *c) -{ -#if PY_VERSION_HEX >= 0x03000000 - return PyUnicode_FromString(c); -#else - return PyString_FromString(c); -#endif -} - -/* Add PyOS_snprintf for old Pythons */ -#if PY_VERSION_HEX < 0x02020000 -# if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM) -# define PyOS_snprintf _snprintf -# else -# define PyOS_snprintf snprintf -# endif -#endif - -/* A crude PyString_FromFormat implementation for old Pythons */ -#if PY_VERSION_HEX < 0x02020000 - -#ifndef SWIG_PYBUFFER_SIZE -# define SWIG_PYBUFFER_SIZE 1024 -#endif - -static PyObject * -PyString_FromFormat(const char *fmt, ...) { - va_list ap; - char buf[SWIG_PYBUFFER_SIZE * 2]; - int res; - va_start(ap, fmt); - res = vsnprintf(buf, sizeof(buf), fmt, ap); - va_end(ap); - return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf); -} -#endif - -/* Add PyObject_Del for old Pythons */ -#if PY_VERSION_HEX < 0x01060000 -# define PyObject_Del(op) PyMem_DEL((op)) -#endif -#ifndef PyObject_DEL -# define PyObject_DEL PyObject_Del -#endif - -/* A crude PyExc_StopIteration exception for old Pythons */ -#if PY_VERSION_HEX < 0x02020000 -# ifndef PyExc_StopIteration -# define PyExc_StopIteration PyExc_RuntimeError -# endif -# ifndef PyObject_GenericGetAttr -# define PyObject_GenericGetAttr 0 -# endif -#endif - -/* Py_NotImplemented is defined in 2.1 and up. */ -#if PY_VERSION_HEX < 0x02010000 -# ifndef Py_NotImplemented -# define Py_NotImplemented PyExc_RuntimeError -# endif -#endif - -/* A crude PyString_AsStringAndSize implementation for old Pythons */ -#if PY_VERSION_HEX < 0x02010000 -# ifndef PyString_AsStringAndSize -# define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;} -# endif -#endif - -/* PySequence_Size for old Pythons */ -#if PY_VERSION_HEX < 0x02000000 -# ifndef PySequence_Size -# define PySequence_Size PySequence_Length -# endif -#endif - -/* PyBool_FromLong for old Pythons */ -#if PY_VERSION_HEX < 0x02030000 -static -PyObject *PyBool_FromLong(long ok) -{ - PyObject *result = ok ? Py_True : Py_False; - Py_INCREF(result); - return result; -} -#endif - -/* Py_ssize_t for old Pythons */ -/* This code is as recommended by: */ -/* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */ -#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN) -typedef int Py_ssize_t; -# define PY_SSIZE_T_MAX INT_MAX -# define PY_SSIZE_T_MIN INT_MIN -#endif - -/* ----------------------------------------------------------------------------- - * error manipulation - * ----------------------------------------------------------------------------- */ - -SWIGRUNTIME PyObject* -SWIG_Python_ErrorType(int code) { - PyObject* type = 0; - switch(code) { - case SWIG_MemoryError: - type = PyExc_MemoryError; - break; - case SWIG_IOError: - type = PyExc_IOError; - break; - case SWIG_RuntimeError: - type = PyExc_RuntimeError; - break; - case SWIG_IndexError: - type = PyExc_IndexError; - break; - case SWIG_TypeError: - type = PyExc_TypeError; - break; - case SWIG_DivisionByZero: - type = PyExc_ZeroDivisionError; - break; - case SWIG_OverflowError: - type = PyExc_OverflowError; - break; - case SWIG_SyntaxError: - type = PyExc_SyntaxError; - break; - case SWIG_ValueError: - type = PyExc_ValueError; - break; - case SWIG_SystemError: - type = PyExc_SystemError; - break; - case SWIG_AttributeError: - type = PyExc_AttributeError; - break; - default: - type = PyExc_RuntimeError; - } - return type; -} - - -SWIGRUNTIME void -SWIG_Python_AddErrorMsg(const char* mesg) -{ - PyObject *type = 0; - PyObject *value = 0; - PyObject *traceback = 0; - - if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback); - if (value) { - char *tmp; - PyObject *old_str = PyObject_Str(value); - PyErr_Clear(); - Py_XINCREF(type); - - PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg); - SWIG_Python_str_DelForPy3(tmp); - Py_DECREF(old_str); - Py_DECREF(value); - } else { - PyErr_SetString(PyExc_RuntimeError, mesg); - } -} - -#if defined(SWIG_PYTHON_NO_THREADS) -# if defined(SWIG_PYTHON_THREADS) -# undef SWIG_PYTHON_THREADS -# endif -#endif -#if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */ -# if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL) -# if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */ -# define SWIG_PYTHON_USE_GIL -# endif -# endif -# if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */ -# ifndef SWIG_PYTHON_INITIALIZE_THREADS -# define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads() -# endif -# ifdef __cplusplus /* C++ code */ - class SWIG_Python_Thread_Block { - bool status; - PyGILState_STATE state; - public: - void end() { if (status) { PyGILState_Release(state); status = false;} } - SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {} - ~SWIG_Python_Thread_Block() { end(); } - }; - class SWIG_Python_Thread_Allow { - bool status; - PyThreadState *save; - public: - void end() { if (status) { PyEval_RestoreThread(save); status = false; }} - SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {} - ~SWIG_Python_Thread_Allow() { end(); } - }; -# define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block -# define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end() -# define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow -# define SWIG_PYTHON_THREAD_END_ALLOW _swig_thread_allow.end() -# else /* C code */ -# define SWIG_PYTHON_THREAD_BEGIN_BLOCK PyGILState_STATE _swig_thread_block = PyGILState_Ensure() -# define SWIG_PYTHON_THREAD_END_BLOCK PyGILState_Release(_swig_thread_block) -# define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread() -# define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow) -# endif -# else /* Old thread way, not implemented, user must provide it */ -# if !defined(SWIG_PYTHON_INITIALIZE_THREADS) -# define SWIG_PYTHON_INITIALIZE_THREADS -# endif -# if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK) -# define SWIG_PYTHON_THREAD_BEGIN_BLOCK -# endif -# if !defined(SWIG_PYTHON_THREAD_END_BLOCK) -# define SWIG_PYTHON_THREAD_END_BLOCK -# endif -# if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW) -# define SWIG_PYTHON_THREAD_BEGIN_ALLOW -# endif -# if !defined(SWIG_PYTHON_THREAD_END_ALLOW) -# define SWIG_PYTHON_THREAD_END_ALLOW -# endif -# endif -#else /* No thread support */ -# define SWIG_PYTHON_INITIALIZE_THREADS -# define SWIG_PYTHON_THREAD_BEGIN_BLOCK -# define SWIG_PYTHON_THREAD_END_BLOCK -# define SWIG_PYTHON_THREAD_BEGIN_ALLOW -# define SWIG_PYTHON_THREAD_END_ALLOW -#endif - -/* ----------------------------------------------------------------------------- - * Python API portion that goes into the runtime - * ----------------------------------------------------------------------------- */ - -#ifdef __cplusplus -extern "C" { -#if 0 -} /* cc-mode */ -#endif -#endif - -/* ----------------------------------------------------------------------------- - * Constant declarations - * ----------------------------------------------------------------------------- */ - -/* Constant Types */ -#define SWIG_PY_POINTER 4 -#define SWIG_PY_BINARY 5 - -/* Constant information structure */ -typedef struct swig_const_info { - int type; - char *name; - long lvalue; - double dvalue; - void *pvalue; - swig_type_info **ptype; -} swig_const_info; - - -/* ----------------------------------------------------------------------------- - * Wrapper of PyInstanceMethod_New() used in Python 3 - * It is exported to the generated module, used for -fastproxy - * ----------------------------------------------------------------------------- */ -SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *self, PyObject *func) -{ -#if PY_VERSION_HEX >= 0x03000000 - return PyInstanceMethod_New(func); -#else - return NULL; -#endif -} - -#ifdef __cplusplus -#if 0 -{ /* cc-mode */ -#endif -} -#endif - - -/* ----------------------------------------------------------------------------- - * See the LICENSE file for information on copyright, usage and redistribution - * of SWIG, and the README file for authors - http://www.swig.org/release.html. - * - * pyrun.swg - * - * This file contains the runtime support for Python modules - * and includes code for managing global variables and pointer - * type checking. - * - * ----------------------------------------------------------------------------- */ - -/* Common SWIG API */ - -/* for raw pointers */ -#define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0) -#define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags) -#define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own) -#define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(ptr, type, flags) -#define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty) -#define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src) -#define swig_owntype int - -/* for raw packed data */ -#define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty) -#define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type) - -/* for class or struct pointers */ -#define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags) -#define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags) - -/* for C or C++ function pointers */ -#define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type) -#define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(ptr, type, 0) - -/* for C++ member pointers, ie, member methods */ -#define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty) -#define SWIG_NewMemberObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type) - - -/* Runtime API */ - -#define SWIG_GetModule(clientdata) SWIG_Python_GetModule() -#define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer) -#define SWIG_NewClientData(obj) SwigPyClientData_New(obj) - -#define SWIG_SetErrorObj SWIG_Python_SetErrorObj -#define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg -#define SWIG_ErrorType(code) SWIG_Python_ErrorType(code) -#define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg) -#define SWIG_fail goto fail - - -/* Runtime API implementation */ - -/* Error manipulation */ - -SWIGINTERN void -SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) { - SWIG_PYTHON_THREAD_BEGIN_BLOCK; - PyErr_SetObject(errtype, obj); - Py_DECREF(obj); - SWIG_PYTHON_THREAD_END_BLOCK; -} - -SWIGINTERN void -SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) { - SWIG_PYTHON_THREAD_BEGIN_BLOCK; - PyErr_SetString(errtype, (char *) msg); - SWIG_PYTHON_THREAD_END_BLOCK; -} - -#define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj) - -/* Set a constant value */ - -SWIGINTERN void -SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { - PyDict_SetItemString(d, (char*) name, obj); - Py_DECREF(obj); -} - -/* Append a value to the result obj */ - -SWIGINTERN PyObject* -SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { -#if !defined(SWIG_PYTHON_OUTPUT_TUPLE) - if (!result) { - result = obj; - } else if (result == Py_None) { - Py_DECREF(result); - result = obj; - } else { - if (!PyList_Check(result)) { - PyObject *o2 = result; - result = PyList_New(1); - PyList_SetItem(result, 0, o2); - } - PyList_Append(result,obj); - Py_DECREF(obj); - } - return result; -#else - PyObject* o2; - PyObject* o3; - if (!result) { - result = obj; - } else if (result == Py_None) { - Py_DECREF(result); - result = obj; - } else { - if (!PyTuple_Check(result)) { - o2 = result; - result = PyTuple_New(1); - PyTuple_SET_ITEM(result, 0, o2); - } - o3 = PyTuple_New(1); - PyTuple_SET_ITEM(o3, 0, obj); - o2 = result; - result = PySequence_Concat(o2, o3); - Py_DECREF(o2); - Py_DECREF(o3); - } - return result; -#endif -} - -/* Unpack the argument tuple */ - -SWIGINTERN int -SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs) -{ - if (!args) { - if (!min && !max) { - return 1; - } else { - PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none", - name, (min == max ? "" : "at least "), (int)min); - return 0; - } - } - if (!PyTuple_Check(args)) { - PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple"); - return 0; - } else { - register Py_ssize_t l = PyTuple_GET_SIZE(args); - if (l < min) { - PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", - name, (min == max ? "" : "at least "), (int)min, (int)l); - return 0; - } else if (l > max) { - PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", - name, (min == max ? "" : "at most "), (int)max, (int)l); - return 0; - } else { - register int i; - for (i = 0; i < l; ++i) { - objs[i] = PyTuple_GET_ITEM(args, i); - } - for (; l < max; ++l) { - objs[l] = 0; - } - return i + 1; - } - } -} - -/* A functor is a function object with one single object argument */ -#if PY_VERSION_HEX >= 0x02020000 -#define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL); -#else -#define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunction(functor, "O", obj); -#endif - -/* - Helper for static pointer initialization for both C and C++ code, for example - static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...); -*/ -#ifdef __cplusplus -#define SWIG_STATIC_POINTER(var) var -#else -#define SWIG_STATIC_POINTER(var) var = 0; if (!var) var -#endif - -/* ----------------------------------------------------------------------------- - * Pointer declarations - * ----------------------------------------------------------------------------- */ - -/* Flags for new pointer objects */ -#define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1) -#define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN) - -#define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1) - -#ifdef __cplusplus -extern "C" { -#if 0 -} /* cc-mode */ -#endif -#endif - -/* How to access Py_None */ -#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) -# ifndef SWIG_PYTHON_NO_BUILD_NONE -# ifndef SWIG_PYTHON_BUILD_NONE -# define SWIG_PYTHON_BUILD_NONE -# endif -# endif -#endif - -#ifdef SWIG_PYTHON_BUILD_NONE -# ifdef Py_None -# undef Py_None -# define Py_None SWIG_Py_None() -# endif -SWIGRUNTIMEINLINE PyObject * -_SWIG_Py_None(void) -{ - PyObject *none = Py_BuildValue((char*)""); - Py_DECREF(none); - return none; -} -SWIGRUNTIME PyObject * -SWIG_Py_None(void) -{ - static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None(); - return none; -} -#endif - -/* The python void return value */ - -SWIGRUNTIMEINLINE PyObject * -SWIG_Py_Void(void) -{ - PyObject *none = Py_None; - Py_INCREF(none); - return none; -} - -/* SwigPyClientData */ - -typedef struct { - PyObject *klass; - PyObject *newraw; - PyObject *newargs; - PyObject *destroy; - int delargs; - int implicitconv; -} SwigPyClientData; - -SWIGRUNTIMEINLINE int -SWIG_Python_CheckImplicit(swig_type_info *ty) -{ - SwigPyClientData *data = (SwigPyClientData *)ty->clientdata; - return data ? data->implicitconv : 0; -} - -SWIGRUNTIMEINLINE PyObject * -SWIG_Python_ExceptionType(swig_type_info *desc) { - SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0; - PyObject *klass = data ? data->klass : 0; - return (klass ? klass : PyExc_RuntimeError); -} - - -SWIGRUNTIME SwigPyClientData * -SwigPyClientData_New(PyObject* obj) -{ - if (!obj) { - return 0; - } else { - SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData)); - /* the klass element */ - data->klass = obj; - Py_INCREF(data->klass); - /* the newraw method and newargs arguments used to create a new raw instance */ - if (PyClass_Check(obj)) { - data->newraw = 0; - data->newargs = obj; - Py_INCREF(obj); - } else { -#if (PY_VERSION_HEX < 0x02020000) - data->newraw = 0; -#else - data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__"); -#endif - if (data->newraw) { - Py_INCREF(data->newraw); - data->newargs = PyTuple_New(1); - PyTuple_SetItem(data->newargs, 0, obj); - } else { - data->newargs = obj; - } - Py_INCREF(data->newargs); - } - /* the destroy method, aka as the C++ delete method */ - data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__"); - if (PyErr_Occurred()) { - PyErr_Clear(); - data->destroy = 0; - } - if (data->destroy) { - int flags; - Py_INCREF(data->destroy); - flags = PyCFunction_GET_FLAGS(data->destroy); -#ifdef METH_O - data->delargs = !(flags & (METH_O)); -#else - data->delargs = 0; -#endif - } else { - data->delargs = 0; - } - data->implicitconv = 0; - return data; - } -} - -SWIGRUNTIME void -SwigPyClientData_Del(SwigPyClientData* data) -{ - Py_XDECREF(data->newraw); - Py_XDECREF(data->newargs); - Py_XDECREF(data->destroy); -} - -/* =============== SwigPyObject =====================*/ - -typedef struct { - PyObject_HEAD - void *ptr; - swig_type_info *ty; - int own; - PyObject *next; -} SwigPyObject; - -SWIGRUNTIME PyObject * -SwigPyObject_long(SwigPyObject *v) -{ - return PyLong_FromVoidPtr(v->ptr); -} - -SWIGRUNTIME PyObject * -SwigPyObject_format(const char* fmt, SwigPyObject *v) -{ - PyObject *res = NULL; - PyObject *args = PyTuple_New(1); - if (args) { - if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) { - PyObject *ofmt = SWIG_Python_str_FromChar(fmt); - if (ofmt) { -#if PY_VERSION_HEX >= 0x03000000 - res = PyUnicode_Format(ofmt,args); -#else - res = PyString_Format(ofmt,args); -#endif - Py_DECREF(ofmt); - } - Py_DECREF(args); - } - } - return res; -} - -SWIGRUNTIME PyObject * -SwigPyObject_oct(SwigPyObject *v) -{ - return SwigPyObject_format("%o",v); -} - -SWIGRUNTIME PyObject * -SwigPyObject_hex(SwigPyObject *v) -{ - return SwigPyObject_format("%x",v); -} - -SWIGRUNTIME PyObject * -#ifdef METH_NOARGS -SwigPyObject_repr(SwigPyObject *v) -#else -SwigPyObject_repr(SwigPyObject *v, PyObject *args) -#endif -{ - const char *name = SWIG_TypePrettyName(v->ty); - PyObject *repr = SWIG_Python_str_FromFormat("", name, v); - if (v->next) { -#ifdef METH_NOARGS - PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next); -#else - PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args); -#endif -#if PY_VERSION_HEX >= 0x03000000 - PyObject *joined = PyUnicode_Concat(repr, nrep); - Py_DecRef(repr); - Py_DecRef(nrep); - repr = joined; -#else - PyString_ConcatAndDel(&repr,nrep); -#endif - } - return repr; -} - -SWIGRUNTIME int -SwigPyObject_print(SwigPyObject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) -{ - char *str; -#ifdef METH_NOARGS - PyObject *repr = SwigPyObject_repr(v); -#else - PyObject *repr = SwigPyObject_repr(v, NULL); -#endif - if (repr) { - str = SWIG_Python_str_AsChar(repr); - fputs(str, fp); - SWIG_Python_str_DelForPy3(str); - Py_DECREF(repr); - return 0; - } else { - return 1; - } -} - -SWIGRUNTIME PyObject * -SwigPyObject_str(SwigPyObject *v) -{ - char result[SWIG_BUFFER_SIZE]; - return SWIG_PackVoidPtr(result, v->ptr, v->ty->name, sizeof(result)) ? - SWIG_Python_str_FromChar(result) : 0; -} - -SWIGRUNTIME int -SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w) -{ - void *i = v->ptr; - void *j = w->ptr; - return (i < j) ? -1 : ((i > j) ? 1 : 0); -} - -/* Added for Python 3.x, would it also be useful for Python 2.x? */ -SWIGRUNTIME PyObject* -SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op) -{ - PyObject* res; - if( op != Py_EQ && op != Py_NE ) { - Py_INCREF(Py_NotImplemented); - return Py_NotImplemented; - } - if( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ) - res = Py_True; - else - res = Py_False; - Py_INCREF(res); - return res; -} - - -SWIGRUNTIME PyTypeObject* _PySwigObject_type(void); - -SWIGRUNTIME PyTypeObject* -SwigPyObject_type(void) { - static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigObject_type(); - return type; -} - -SWIGRUNTIMEINLINE int -SwigPyObject_Check(PyObject *op) { - return (Py_TYPE(op) == SwigPyObject_type()) - || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0); -} - -SWIGRUNTIME PyObject * -SwigPyObject_New(void *ptr, swig_type_info *ty, int own); - -SWIGRUNTIME void -SwigPyObject_dealloc(PyObject *v) -{ - SwigPyObject *sobj = (SwigPyObject *) v; - PyObject *next = sobj->next; - if (sobj->own == SWIG_POINTER_OWN) { - swig_type_info *ty = sobj->ty; - SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0; - PyObject *destroy = data ? data->destroy : 0; - if (destroy) { - /* destroy is always a VARARGS method */ - PyObject *res; - if (data->delargs) { - /* we need to create a temporary object to carry the destroy operation */ - PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0); - res = SWIG_Python_CallFunctor(destroy, tmp); - Py_DECREF(tmp); - } else { - PyCFunction meth = PyCFunction_GET_FUNCTION(destroy); - PyObject *mself = PyCFunction_GET_SELF(destroy); - res = ((*meth)(mself, v)); - } - Py_XDECREF(res); - } -#if !defined(SWIG_PYTHON_SILENT_MEMLEAK) - else { - const char *name = SWIG_TypePrettyName(ty); - printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown")); - } -#endif - } - Py_XDECREF(next); - PyObject_DEL(v); -} - -SWIGRUNTIME PyObject* -SwigPyObject_append(PyObject* v, PyObject* next) -{ - SwigPyObject *sobj = (SwigPyObject *) v; -#ifndef METH_O - PyObject *tmp = 0; - if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL; - next = tmp; -#endif - if (!SwigPyObject_Check(next)) { - return NULL; - } - sobj->next = next; - Py_INCREF(next); - return SWIG_Py_Void(); -} - -SWIGRUNTIME PyObject* -#ifdef METH_NOARGS -SwigPyObject_next(PyObject* v) -#else -SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) -#endif -{ - SwigPyObject *sobj = (SwigPyObject *) v; - if (sobj->next) { - Py_INCREF(sobj->next); - return sobj->next; - } else { - return SWIG_Py_Void(); - } -} - -SWIGINTERN PyObject* -#ifdef METH_NOARGS -SwigPyObject_disown(PyObject *v) -#else -SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) -#endif -{ - SwigPyObject *sobj = (SwigPyObject *)v; - sobj->own = 0; - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject* -#ifdef METH_NOARGS -SwigPyObject_acquire(PyObject *v) -#else -SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) -#endif -{ - SwigPyObject *sobj = (SwigPyObject *)v; - sobj->own = SWIG_POINTER_OWN; - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject* -SwigPyObject_own(PyObject *v, PyObject *args) -{ - PyObject *val = 0; -#if (PY_VERSION_HEX < 0x02020000) - if (!PyArg_ParseTuple(args,(char *)"|O:own",&val)) -#else - if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val)) -#endif - { - return NULL; - } - else - { - SwigPyObject *sobj = (SwigPyObject *)v; - PyObject *obj = PyBool_FromLong(sobj->own); - if (val) { -#ifdef METH_NOARGS - if (PyObject_IsTrue(val)) { - SwigPyObject_acquire(v); - } else { - SwigPyObject_disown(v); - } -#else - if (PyObject_IsTrue(val)) { - SwigPyObject_acquire(v,args); - } else { - SwigPyObject_disown(v,args); - } -#endif - } - return obj; - } -} - -#ifdef METH_O -static PyMethodDef -swigobject_methods[] = { - {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"}, - {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS, (char *)"aquires ownership of the pointer"}, - {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, - {(char *)"append", (PyCFunction)SwigPyObject_append, METH_O, (char *)"appends another 'this' object"}, - {(char *)"next", (PyCFunction)SwigPyObject_next, METH_NOARGS, (char *)"returns the next 'this' object"}, - {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_NOARGS, (char *)"returns object representation"}, - {0, 0, 0, 0} -}; -#else -static PyMethodDef -swigobject_methods[] = { - {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_VARARGS, (char *)"releases ownership of the pointer"}, - {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_VARARGS, (char *)"aquires ownership of the pointer"}, - {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, - {(char *)"append", (PyCFunction)SwigPyObject_append, METH_VARARGS, (char *)"appends another 'this' object"}, - {(char *)"next", (PyCFunction)SwigPyObject_next, METH_VARARGS, (char *)"returns the next 'this' object"}, - {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_VARARGS, (char *)"returns object representation"}, - {0, 0, 0, 0} -}; -#endif - -#if PY_VERSION_HEX < 0x02020000 -SWIGINTERN PyObject * -SwigPyObject_getattr(SwigPyObject *sobj,char *name) -{ - return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name); -} -#endif - -SWIGRUNTIME PyTypeObject* -_PySwigObject_type(void) { - static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer"; - - static PyNumberMethods SwigPyObject_as_number = { - (binaryfunc)0, /*nb_add*/ - (binaryfunc)0, /*nb_subtract*/ - (binaryfunc)0, /*nb_multiply*/ - /* nb_divide removed in Python 3 */ -#if PY_VERSION_HEX < 0x03000000 - (binaryfunc)0, /*nb_divide*/ -#endif - (binaryfunc)0, /*nb_remainder*/ - (binaryfunc)0, /*nb_divmod*/ - (ternaryfunc)0,/*nb_power*/ - (unaryfunc)0, /*nb_negative*/ - (unaryfunc)0, /*nb_positive*/ - (unaryfunc)0, /*nb_absolute*/ - (inquiry)0, /*nb_nonzero*/ - 0, /*nb_invert*/ - 0, /*nb_lshift*/ - 0, /*nb_rshift*/ - 0, /*nb_and*/ - 0, /*nb_xor*/ - 0, /*nb_or*/ -#if PY_VERSION_HEX < 0x03000000 - 0, /*nb_coerce*/ -#endif - (unaryfunc)SwigPyObject_long, /*nb_int*/ -#if PY_VERSION_HEX < 0x03000000 - (unaryfunc)SwigPyObject_long, /*nb_long*/ -#else - 0, /*nb_reserved*/ -#endif - (unaryfunc)0, /*nb_float*/ -#if PY_VERSION_HEX < 0x03000000 - (unaryfunc)SwigPyObject_oct, /*nb_oct*/ - (unaryfunc)SwigPyObject_hex, /*nb_hex*/ -#endif -#if PY_VERSION_HEX >= 0x03000000 /* 3.0 */ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */ -#elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */ -#elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */ -#elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */ - 0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */ -#endif - }; - - static PyTypeObject swigpyobject_type; - static int type_init = 0; - if (!type_init) { - const PyTypeObject tmp - = { - /* PyObject header changed in Python 3 */ -#if PY_VERSION_HEX >= 0x03000000 - PyVarObject_HEAD_INIT(&PyType_Type, 0) -#else - PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ -#endif - (char *)"SwigPyObject", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - (destructor)SwigPyObject_dealloc, /* tp_dealloc */ - (printfunc)SwigPyObject_print, /* tp_print */ -#if PY_VERSION_HEX < 0x02020000 - (getattrfunc)SwigPyObject_getattr, /* tp_getattr */ -#else - (getattrfunc)0, /* tp_getattr */ -#endif - (setattrfunc)0, /* tp_setattr */ -#if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */ -#else - (cmpfunc)SwigPyObject_compare, /* tp_compare */ -#endif - (reprfunc)SwigPyObject_repr, /* tp_repr */ - &SwigPyObject_as_number, /* tp_as_number */ - 0, /* tp_as_sequence */ - 0, /* tp_as_mapping */ - (hashfunc)0, /* tp_hash */ - (ternaryfunc)0, /* tp_call */ - (reprfunc)SwigPyObject_str, /* tp_str */ - PyObject_GenericGetAttr, /* tp_getattro */ - 0, /* tp_setattro */ - 0, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT, /* tp_flags */ - swigobject_doc, /* tp_doc */ - 0, /* tp_traverse */ - 0, /* tp_clear */ - (richcmpfunc)SwigPyObject_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ -#if PY_VERSION_HEX >= 0x02020000 - 0, /* tp_iter */ - 0, /* tp_iternext */ - swigobject_methods, /* tp_methods */ - 0, /* tp_members */ - 0, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - 0, /* tp_descr_get */ - 0, /* tp_descr_set */ - 0, /* tp_dictoffset */ - 0, /* tp_init */ - 0, /* tp_alloc */ - 0, /* tp_new */ - 0, /* tp_free */ - 0, /* tp_is_gc */ - 0, /* tp_bases */ - 0, /* tp_mro */ - 0, /* tp_cache */ - 0, /* tp_subclasses */ - 0, /* tp_weaklist */ -#endif -#if PY_VERSION_HEX >= 0x02030000 - 0, /* tp_del */ -#endif -#ifdef COUNT_ALLOCS - 0,0,0,0 /* tp_alloc -> tp_next */ -#endif - }; - swigpyobject_type = tmp; - /* for Python 3 we already assigned ob_type in PyVarObject_HEAD_INIT() */ -#if PY_VERSION_HEX < 0x03000000 - swigpyobject_type.ob_type = &PyType_Type; -#endif - type_init = 1; - } - return &swigpyobject_type; -} - -SWIGRUNTIME PyObject * -SwigPyObject_New(void *ptr, swig_type_info *ty, int own) -{ - SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type()); - if (sobj) { - sobj->ptr = ptr; - sobj->ty = ty; - sobj->own = own; - sobj->next = 0; - } - return (PyObject *)sobj; -} - -/* ----------------------------------------------------------------------------- - * Implements a simple Swig Packed type, and use it instead of string - * ----------------------------------------------------------------------------- */ - -typedef struct { - PyObject_HEAD - void *pack; - swig_type_info *ty; - size_t size; -} SwigPyPacked; - -SWIGRUNTIME int -SwigPyPacked_print(SwigPyPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags)) -{ - char result[SWIG_BUFFER_SIZE]; - fputs("pack, v->size, 0, sizeof(result))) { - fputs("at ", fp); - fputs(result, fp); - } - fputs(v->ty->name,fp); - fputs(">", fp); - return 0; -} - -SWIGRUNTIME PyObject * -SwigPyPacked_repr(SwigPyPacked *v) -{ - char result[SWIG_BUFFER_SIZE]; - if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) { - return SWIG_Python_str_FromFormat("", result, v->ty->name); - } else { - return SWIG_Python_str_FromFormat("", v->ty->name); - } -} - -SWIGRUNTIME PyObject * -SwigPyPacked_str(SwigPyPacked *v) -{ - char result[SWIG_BUFFER_SIZE]; - if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){ - return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name); - } else { - return SWIG_Python_str_FromChar(v->ty->name); - } -} - -SWIGRUNTIME int -SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w) -{ - size_t i = v->size; - size_t j = w->size; - int s = (i < j) ? -1 : ((i > j) ? 1 : 0); - return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size); -} - -SWIGRUNTIME PyTypeObject* _PySwigPacked_type(void); - -SWIGRUNTIME PyTypeObject* -SwigPyPacked_type(void) { - static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigPacked_type(); - return type; -} - -SWIGRUNTIMEINLINE int -SwigPyPacked_Check(PyObject *op) { - return ((op)->ob_type == _PySwigPacked_type()) - || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0); -} - -SWIGRUNTIME void -SwigPyPacked_dealloc(PyObject *v) -{ - if (SwigPyPacked_Check(v)) { - SwigPyPacked *sobj = (SwigPyPacked *) v; - free(sobj->pack); - } - PyObject_DEL(v); -} - -SWIGRUNTIME PyTypeObject* -_PySwigPacked_type(void) { - static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer"; - static PyTypeObject swigpypacked_type; - static int type_init = 0; - if (!type_init) { - const PyTypeObject tmp - = { - /* PyObject header changed in Python 3 */ -#if PY_VERSION_HEX>=0x03000000 - PyVarObject_HEAD_INIT(&PyType_Type, 0) -#else - PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ -#endif - (char *)"SwigPyPacked", /* tp_name */ - sizeof(SwigPyPacked), /* tp_basicsize */ - 0, /* tp_itemsize */ - (destructor)SwigPyPacked_dealloc, /* tp_dealloc */ - (printfunc)SwigPyPacked_print, /* tp_print */ - (getattrfunc)0, /* tp_getattr */ - (setattrfunc)0, /* tp_setattr */ -#if PY_VERSION_HEX>=0x03000000 - 0, /* tp_reserved in 3.0.1 */ -#else - (cmpfunc)SwigPyPacked_compare, /* tp_compare */ -#endif - (reprfunc)SwigPyPacked_repr, /* tp_repr */ - 0, /* tp_as_number */ - 0, /* tp_as_sequence */ - 0, /* tp_as_mapping */ - (hashfunc)0, /* tp_hash */ - (ternaryfunc)0, /* tp_call */ - (reprfunc)SwigPyPacked_str, /* tp_str */ - PyObject_GenericGetAttr, /* tp_getattro */ - 0, /* tp_setattro */ - 0, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT, /* tp_flags */ - swigpacked_doc, /* tp_doc */ - 0, /* tp_traverse */ - 0, /* tp_clear */ - 0, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ -#if PY_VERSION_HEX >= 0x02020000 - 0, /* tp_iter */ - 0, /* tp_iternext */ - 0, /* tp_methods */ - 0, /* tp_members */ - 0, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - 0, /* tp_descr_get */ - 0, /* tp_descr_set */ - 0, /* tp_dictoffset */ - 0, /* tp_init */ - 0, /* tp_alloc */ - 0, /* tp_new */ - 0, /* tp_free */ - 0, /* tp_is_gc */ - 0, /* tp_bases */ - 0, /* tp_mro */ - 0, /* tp_cache */ - 0, /* tp_subclasses */ - 0, /* tp_weaklist */ -#endif -#if PY_VERSION_HEX >= 0x02030000 - 0, /* tp_del */ -#endif -#ifdef COUNT_ALLOCS - 0,0,0,0 /* tp_alloc -> tp_next */ -#endif - }; - swigpypacked_type = tmp; - /* for Python 3 the ob_type already assigned in PyVarObject_HEAD_INIT() */ -#if PY_VERSION_HEX < 0x03000000 - swigpypacked_type.ob_type = &PyType_Type; -#endif - type_init = 1; - } - return &swigpypacked_type; -} - -SWIGRUNTIME PyObject * -SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty) -{ - SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type()); - if (sobj) { - void *pack = malloc(size); - if (pack) { - memcpy(pack, ptr, size); - sobj->pack = pack; - sobj->ty = ty; - sobj->size = size; - } else { - PyObject_DEL((PyObject *) sobj); - sobj = 0; - } - } - return (PyObject *) sobj; -} - -SWIGRUNTIME swig_type_info * -SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size) -{ - if (SwigPyPacked_Check(obj)) { - SwigPyPacked *sobj = (SwigPyPacked *)obj; - if (sobj->size != size) return 0; - memcpy(ptr, sobj->pack, size); - return sobj->ty; - } else { - return 0; - } -} - -/* ----------------------------------------------------------------------------- - * pointers/data manipulation - * ----------------------------------------------------------------------------- */ - -SWIGRUNTIMEINLINE PyObject * -_SWIG_This(void) -{ - return SWIG_Python_str_FromChar("this"); -} - -SWIGRUNTIME PyObject * -SWIG_This(void) -{ - static PyObject *SWIG_STATIC_POINTER(swig_this) = _SWIG_This(); - return swig_this; -} - -/* #define SWIG_PYTHON_SLOW_GETSET_THIS */ - -/* TODO: I don't know how to implement the fast getset in Python 3 right now */ -#if PY_VERSION_HEX>=0x03000000 -#define SWIG_PYTHON_SLOW_GETSET_THIS -#endif - -SWIGRUNTIME SwigPyObject * -SWIG_Python_GetSwigThis(PyObject *pyobj) -{ - if (SwigPyObject_Check(pyobj)) { - return (SwigPyObject *) pyobj; - } else { - PyObject *obj = 0; -#if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000)) - if (PyInstance_Check(pyobj)) { - obj = _PyInstance_Lookup(pyobj, SWIG_This()); - } else { - PyObject **dictptr = _PyObject_GetDictPtr(pyobj); - if (dictptr != NULL) { - PyObject *dict = *dictptr; - obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0; - } else { -#ifdef PyWeakref_CheckProxy - if (PyWeakref_CheckProxy(pyobj)) { - PyObject *wobj = PyWeakref_GET_OBJECT(pyobj); - return wobj ? SWIG_Python_GetSwigThis(wobj) : 0; - } -#endif - obj = PyObject_GetAttr(pyobj,SWIG_This()); - if (obj) { - Py_DECREF(obj); - } else { - if (PyErr_Occurred()) PyErr_Clear(); - return 0; - } - } - } -#else - obj = PyObject_GetAttr(pyobj,SWIG_This()); - if (obj) { - Py_DECREF(obj); - } else { - if (PyErr_Occurred()) PyErr_Clear(); - return 0; - } -#endif - if (obj && !SwigPyObject_Check(obj)) { - /* a PyObject is called 'this', try to get the 'real this' - SwigPyObject from it */ - return SWIG_Python_GetSwigThis(obj); - } - return (SwigPyObject *)obj; - } -} - -/* Acquire a pointer value */ - -SWIGRUNTIME int -SWIG_Python_AcquirePtr(PyObject *obj, int own) { - if (own == SWIG_POINTER_OWN) { - SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj); - if (sobj) { - int oldown = sobj->own; - sobj->own = own; - return oldown; - } - } - return 0; -} - -/* Convert a pointer value */ - -SWIGRUNTIME int -SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) { - if (!obj) return SWIG_ERROR; - if (obj == Py_None) { - if (ptr) *ptr = 0; - return SWIG_OK; - } else { - SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj); - if (own) - *own = 0; - while (sobj) { - void *vptr = sobj->ptr; - if (ty) { - swig_type_info *to = sobj->ty; - if (to == ty) { - /* no type cast needed */ - if (ptr) *ptr = vptr; - break; - } else { - swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); - if (!tc) { - sobj = (SwigPyObject *)sobj->next; - } else { - if (ptr) { - int newmemory = 0; - *ptr = SWIG_TypeCast(tc,vptr,&newmemory); - if (newmemory == SWIG_CAST_NEW_MEMORY) { - assert(own); - if (own) - *own = *own | SWIG_CAST_NEW_MEMORY; - } - } - break; - } - } - } else { - if (ptr) *ptr = vptr; - break; - } - } - if (sobj) { - if (own) - *own = *own | sobj->own; - if (flags & SWIG_POINTER_DISOWN) { - sobj->own = 0; - } - return SWIG_OK; - } else { - int res = SWIG_ERROR; - if (flags & SWIG_POINTER_IMPLICIT_CONV) { - SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0; - if (data && !data->implicitconv) { - PyObject *klass = data->klass; - if (klass) { - PyObject *impconv; - data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/ - impconv = SWIG_Python_CallFunctor(klass, obj); - data->implicitconv = 0; - if (PyErr_Occurred()) { - PyErr_Clear(); - impconv = 0; - } - if (impconv) { - SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv); - if (iobj) { - void *vptr; - res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0); - if (SWIG_IsOK(res)) { - if (ptr) { - *ptr = vptr; - /* transfer the ownership to 'ptr' */ - iobj->own = 0; - res = SWIG_AddCast(res); - res = SWIG_AddNewMask(res); - } else { - res = SWIG_AddCast(res); - } - } - } - Py_DECREF(impconv); - } - } - } - } - return res; - } - } -} - -/* Convert a function ptr value */ - -SWIGRUNTIME int -SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { - if (!PyCFunction_Check(obj)) { - return SWIG_ConvertPtr(obj, ptr, ty, 0); - } else { - void *vptr = 0; - - /* here we get the method pointer for callbacks */ - const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc); - const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0; - if (desc) - desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; - if (!desc) - return SWIG_ERROR; - if (ty) { - swig_cast_info *tc = SWIG_TypeCheck(desc,ty); - if (tc) { - int newmemory = 0; - *ptr = SWIG_TypeCast(tc,vptr,&newmemory); - assert(!newmemory); /* newmemory handling not yet implemented */ - } else { - return SWIG_ERROR; - } - } else { - *ptr = vptr; - } - return SWIG_OK; - } -} - -/* Convert a packed value value */ - -SWIGRUNTIME int -SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) { - swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz); - if (!to) return SWIG_ERROR; - if (ty) { - if (to != ty) { - /* check type cast? */ - swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); - if (!tc) return SWIG_ERROR; - } - } - return SWIG_OK; -} - -/* ----------------------------------------------------------------------------- - * Create a new pointer object - * ----------------------------------------------------------------------------- */ - -/* - Create a new instance object, without calling __init__, and set the - 'this' attribute. -*/ - -SWIGRUNTIME PyObject* -SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) -{ -#if (PY_VERSION_HEX >= 0x02020000) - PyObject *inst = 0; - PyObject *newraw = data->newraw; - if (newraw) { - inst = PyObject_Call(newraw, data->newargs, NULL); - if (inst) { -#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS) - PyObject **dictptr = _PyObject_GetDictPtr(inst); - if (dictptr != NULL) { - PyObject *dict = *dictptr; - if (dict == NULL) { - dict = PyDict_New(); - *dictptr = dict; - PyDict_SetItem(dict, SWIG_This(), swig_this); - } - } -#else - PyObject *key = SWIG_This(); - PyObject_SetAttr(inst, key, swig_this); -#endif - } - } else { -#if PY_VERSION_HEX >= 0x03000000 - inst = PyBaseObject_Type.tp_new((PyTypeObject*) data->newargs, Py_None, Py_None); - PyObject_SetAttr(inst, SWIG_This(), swig_this); - Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG; -#else - PyObject *dict = PyDict_New(); - PyDict_SetItem(dict, SWIG_This(), swig_this); - inst = PyInstance_NewRaw(data->newargs, dict); - Py_DECREF(dict); -#endif - } - return inst; -#else -#if (PY_VERSION_HEX >= 0x02010000) - PyObject *inst; - PyObject *dict = PyDict_New(); - PyDict_SetItem(dict, SWIG_This(), swig_this); - inst = PyInstance_NewRaw(data->newargs, dict); - Py_DECREF(dict); - return (PyObject *) inst; -#else - PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type); - if (inst == NULL) { - return NULL; - } - inst->in_class = (PyClassObject *)data->newargs; - Py_INCREF(inst->in_class); - inst->in_dict = PyDict_New(); - if (inst->in_dict == NULL) { - Py_DECREF(inst); - return NULL; - } -#ifdef Py_TPFLAGS_HAVE_WEAKREFS - inst->in_weakreflist = NULL; -#endif -#ifdef Py_TPFLAGS_GC - PyObject_GC_Init(inst); -#endif - PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this); - return (PyObject *) inst; -#endif -#endif -} - -SWIGRUNTIME void -SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this) -{ - PyObject *dict; -#if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS) - PyObject **dictptr = _PyObject_GetDictPtr(inst); - if (dictptr != NULL) { - dict = *dictptr; - if (dict == NULL) { - dict = PyDict_New(); - *dictptr = dict; - } - PyDict_SetItem(dict, SWIG_This(), swig_this); - return; - } -#endif - dict = PyObject_GetAttrString(inst, (char*)"__dict__"); - PyDict_SetItem(dict, SWIG_This(), swig_this); - Py_DECREF(dict); -} - - -SWIGINTERN PyObject * -SWIG_Python_InitShadowInstance(PyObject *args) { - PyObject *obj[2]; - if (!SWIG_Python_UnpackTuple(args,(char*)"swiginit", 2, 2, obj)) { - return NULL; - } else { - SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]); - if (sthis) { - SwigPyObject_append((PyObject*) sthis, obj[1]); - } else { - SWIG_Python_SetSwigThis(obj[0], obj[1]); - } - return SWIG_Py_Void(); - } -} - -/* Create a new pointer object */ - -SWIGRUNTIME PyObject * -SWIG_Python_NewPointerObj(void *ptr, swig_type_info *type, int flags) { - if (!ptr) { - return SWIG_Py_Void(); - } else { - int own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0; - PyObject *robj = SwigPyObject_New(ptr, type, own); - SwigPyClientData *clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0; - if (clientdata && !(flags & SWIG_POINTER_NOSHADOW)) { - PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj); - if (inst) { - Py_DECREF(robj); - robj = inst; - } - } - return robj; - } -} - -/* Create a new packed object */ - -SWIGRUNTIMEINLINE PyObject * -SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) { - return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void(); -} - -/* -----------------------------------------------------------------------------* - * Get type list - * -----------------------------------------------------------------------------*/ - -#ifdef SWIG_LINK_RUNTIME -void *SWIG_ReturnGlobalTypeList(void *); -#endif - -SWIGRUNTIME swig_module_info * -SWIG_Python_GetModule(void) { - static void *type_pointer = (void *)0; - /* first check if module already created */ - if (!type_pointer) { -#ifdef SWIG_LINK_RUNTIME - type_pointer = SWIG_ReturnGlobalTypeList((void *)0); -#else - type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, - (char*)"type_pointer" SWIG_TYPE_TABLE_NAME); - if (PyErr_Occurred()) { - PyErr_Clear(); - type_pointer = (void *)0; - } -#endif - } - return (swig_module_info *) type_pointer; -} - -#if PY_MAJOR_VERSION < 2 -/* PyModule_AddObject function was introduced in Python 2.0. The following function - is copied out of Python/modsupport.c in python version 2.3.4 */ -SWIGINTERN int -PyModule_AddObject(PyObject *m, char *name, PyObject *o) -{ - PyObject *dict; - if (!PyModule_Check(m)) { - PyErr_SetString(PyExc_TypeError, - "PyModule_AddObject() needs module as first arg"); - return SWIG_ERROR; - } - if (!o) { - PyErr_SetString(PyExc_TypeError, - "PyModule_AddObject() needs non-NULL value"); - return SWIG_ERROR; - } - - dict = PyModule_GetDict(m); - if (dict == NULL) { - /* Internal error -- modules must have a dict! */ - PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__", - PyModule_GetName(m)); - return SWIG_ERROR; - } - if (PyDict_SetItemString(dict, name, o)) - return SWIG_ERROR; - Py_DECREF(o); - return SWIG_OK; -} -#endif - -SWIGRUNTIME void -SWIG_Python_DestroyModule(void *vptr) -{ - swig_module_info *swig_module = (swig_module_info *) vptr; - swig_type_info **types = swig_module->types; - size_t i; - for (i =0; i < swig_module->size; ++i) { - swig_type_info *ty = types[i]; - if (ty->owndata) { - SwigPyClientData *data = (SwigPyClientData *) ty->clientdata; - if (data) SwigPyClientData_Del(data); - } - } - Py_DECREF(SWIG_This()); -} - -SWIGRUNTIME void -SWIG_Python_SetModule(swig_module_info *swig_module) { - static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} };/* Sentinel */ - -#if PY_VERSION_HEX >= 0x03000000 - /* Add a dummy module object into sys.modules */ - PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION); -#else - PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, - swig_empty_runtime_method_table); -#endif - PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule); - if (pointer && module) { - PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer); - } else { - Py_XDECREF(pointer); - } -} - -/* The python cached type query */ -SWIGRUNTIME PyObject * -SWIG_Python_TypeCache(void) { - static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New(); - return cache; -} - -SWIGRUNTIME swig_type_info * -SWIG_Python_TypeQuery(const char *type) -{ - PyObject *cache = SWIG_Python_TypeCache(); - PyObject *key = SWIG_Python_str_FromChar(type); - PyObject *obj = PyDict_GetItem(cache, key); - swig_type_info *descriptor; - if (obj) { - descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj); - } else { - swig_module_info *swig_module = SWIG_Python_GetModule(); - descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type); - if (descriptor) { - obj = PyCObject_FromVoidPtr(descriptor, NULL); - PyDict_SetItem(cache, key, obj); - Py_DECREF(obj); - } - } - Py_DECREF(key); - return descriptor; -} - -/* - For backward compatibility only -*/ -#define SWIG_POINTER_EXCEPTION 0 -#define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg) -#define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags) - -SWIGRUNTIME int -SWIG_Python_AddErrMesg(const char* mesg, int infront) -{ - if (PyErr_Occurred()) { - PyObject *type = 0; - PyObject *value = 0; - PyObject *traceback = 0; - PyErr_Fetch(&type, &value, &traceback); - if (value) { - char *tmp; - PyObject *old_str = PyObject_Str(value); - Py_XINCREF(type); - PyErr_Clear(); - if (infront) { - PyErr_Format(type, "%s %s", mesg, tmp = SWIG_Python_str_AsChar(old_str)); - } else { - PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg); - } - SWIG_Python_str_DelForPy3(tmp); - Py_DECREF(old_str); - } - return 1; - } else { - return 0; - } -} - -SWIGRUNTIME int -SWIG_Python_ArgFail(int argnum) -{ - if (PyErr_Occurred()) { - /* add information about failing argument */ - char mesg[256]; - PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum); - return SWIG_Python_AddErrMesg(mesg, 1); - } else { - return 0; - } -} - -SWIGRUNTIMEINLINE const char * -SwigPyObject_GetDesc(PyObject *self) -{ - SwigPyObject *v = (SwigPyObject *)self; - swig_type_info *ty = v ? v->ty : 0; - return ty ? ty->str : (char*)""; -} - -SWIGRUNTIME void -SWIG_Python_TypeError(const char *type, PyObject *obj) -{ - if (type) { -#if defined(SWIG_COBJECT_TYPES) - if (obj && SwigPyObject_Check(obj)) { - const char *otype = (const char *) SwigPyObject_GetDesc(obj); - if (otype) { - PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received", - type, otype); - return; - } - } else -#endif - { - const char *otype = (obj ? obj->ob_type->tp_name : 0); - if (otype) { - PyObject *str = PyObject_Str(obj); - const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0; - if (cstr) { - PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received", - type, otype, cstr); - SWIG_Python_str_DelForPy3(cstr); - } else { - PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received", - type, otype); - } - Py_XDECREF(str); - return; - } - } - PyErr_Format(PyExc_TypeError, "a '%s' is expected", type); - } else { - PyErr_Format(PyExc_TypeError, "unexpected type is received"); - } -} - - -/* Convert a pointer value, signal an exception on a type mismatch */ -SWIGRUNTIME void * -SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags) { - void *result; - if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) { - PyErr_Clear(); -#if SWIG_POINTER_EXCEPTION - if (flags) { - SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj); - SWIG_Python_ArgFail(argnum); - } -#endif - } - return result; -} - - -#ifdef __cplusplus -#if 0 -{ /* cc-mode */ -#endif -} -#endif +/* ----------------------------------------------------------------------------- + * swigrun.swg + * + * This file contains generic C API SWIG runtime support for pointer + * type checking. + * ----------------------------------------------------------------------------- */ + +/* This should only be incremented when either the layout of swig_type_info changes, + or for whatever reason, the runtime changes incompatibly */ +#define SWIG_RUNTIME_VERSION "4" + +/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */ +#ifdef SWIG_TYPE_TABLE +# define SWIG_QUOTE_STRING(x) #x +# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x) +# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE) +#else +# define SWIG_TYPE_TABLE_NAME +#endif + +/* + You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for + creating a static or dynamic library from the SWIG runtime code. + In 99.9% of the cases, SWIG just needs to declare them as 'static'. + + But only do this if strictly necessary, ie, if you have problems + with your compiler or suchlike. +*/ + +#ifndef SWIGRUNTIME +# define SWIGRUNTIME SWIGINTERN +#endif + +#ifndef SWIGRUNTIMEINLINE +# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE +#endif + +/* Generic buffer size */ +#ifndef SWIG_BUFFER_SIZE +# define SWIG_BUFFER_SIZE 1024 +#endif + +/* Flags for pointer conversions */ +#define SWIG_POINTER_DISOWN 0x1 +#define SWIG_CAST_NEW_MEMORY 0x2 + +/* Flags for new pointer objects */ +#define SWIG_POINTER_OWN 0x1 + + +/* + Flags/methods for returning states. + + The SWIG conversion methods, as ConvertPtr, return and integer + that tells if the conversion was successful or not. And if not, + an error code can be returned (see swigerrors.swg for the codes). + + Use the following macros/flags to set or process the returning + states. + + In old versions of SWIG, code such as the following was usually written: + + if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) { + // success code + } else { + //fail code + } + + Now you can be more explicit: + + int res = SWIG_ConvertPtr(obj,vptr,ty.flags); + if (SWIG_IsOK(res)) { + // success code + } else { + // fail code + } + + which is the same really, but now you can also do + + Type *ptr; + int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags); + if (SWIG_IsOK(res)) { + // success code + if (SWIG_IsNewObj(res) { + ... + delete *ptr; + } else { + ... + } + } else { + // fail code + } + + I.e., now SWIG_ConvertPtr can return new objects and you can + identify the case and take care of the deallocation. Of course that + also requires SWIG_ConvertPtr to return new result values, such as + + int SWIG_ConvertPtr(obj, ptr,...) { + if () { + if () { + *ptr = ; + return SWIG_NEWOBJ; + } else { + *ptr = ; + return SWIG_OLDOBJ; + } + } else { + return SWIG_BADOBJ; + } + } + + Of course, returning the plain '0(success)/-1(fail)' still works, but you can be + more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the + SWIG errors code. + + Finally, if the SWIG_CASTRANK_MODE is enabled, the result code + allows to return the 'cast rank', for example, if you have this + + int food(double) + int fooi(int); + + and you call + + food(1) // cast rank '1' (1 -> 1.0) + fooi(1) // cast rank '0' + + just use the SWIG_AddCast()/SWIG_CheckState() +*/ + +#define SWIG_OK (0) +#define SWIG_ERROR (-1) +#define SWIG_IsOK(r) (r >= 0) +#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) + +/* The CastRankLimit says how many bits are used for the cast rank */ +#define SWIG_CASTRANKLIMIT (1 << 8) +/* The NewMask denotes the object was created (using new/malloc) */ +#define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1) +/* The TmpMask is for in/out typemaps that use temporal objects */ +#define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1) +/* Simple returning values */ +#define SWIG_BADOBJ (SWIG_ERROR) +#define SWIG_OLDOBJ (SWIG_OK) +#define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK) +#define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK) +/* Check, add and del mask methods */ +#define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r) +#define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r) +#define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK)) +#define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r) +#define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r) +#define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK)) + +/* Cast-Rank Mode */ +#if defined(SWIG_CASTRANK_MODE) +# ifndef SWIG_TypeRank +# define SWIG_TypeRank unsigned long +# endif +# ifndef SWIG_MAXCASTRANK /* Default cast allowed */ +# define SWIG_MAXCASTRANK (2) +# endif +# define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1) +# define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK) +SWIGINTERNINLINE int SWIG_AddCast(int r) { + return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r; +} +SWIGINTERNINLINE int SWIG_CheckState(int r) { + return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; +} +#else /* no cast-rank mode */ +# define SWIG_AddCast +# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) +#endif + + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef void *(*swig_converter_func)(void *, int *); +typedef struct swig_type_info *(*swig_dycast_func)(void **); + +/* Structure to store information on one type */ +typedef struct swig_type_info { + const char *name; /* mangled name of this type */ + const char *str; /* human readable name of this type */ + swig_dycast_func dcast; /* dynamic cast function down a hierarchy */ + struct swig_cast_info *cast; /* linked list of types that can cast into this type */ + void *clientdata; /* language specific type data */ + int owndata; /* flag if the structure owns the clientdata */ +} swig_type_info; + +/* Structure to store a type and conversion function used for casting */ +typedef struct swig_cast_info { + swig_type_info *type; /* pointer to type that is equivalent to this type */ + swig_converter_func converter; /* function to cast the void pointers */ + struct swig_cast_info *next; /* pointer to next cast in linked list */ + struct swig_cast_info *prev; /* pointer to the previous cast */ +} swig_cast_info; + +/* Structure used to store module information + * Each module generates one structure like this, and the runtime collects + * all of these structures and stores them in a circularly linked list.*/ +typedef struct swig_module_info { + swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */ + size_t size; /* Number of types in this module */ + struct swig_module_info *next; /* Pointer to next element in circularly linked list */ + swig_type_info **type_initial; /* Array of initially generated type structures */ + swig_cast_info **cast_initial; /* Array of initially generated casting structures */ + void *clientdata; /* Language specific module data */ +} swig_module_info; + +/* + Compare two type names skipping the space characters, therefore + "char*" == "char *" and "Class" == "Class", etc. + + Return 0 when the two name types are equivalent, as in + strncmp, but skipping ' '. +*/ +SWIGRUNTIME int +SWIG_TypeNameComp(const char *f1, const char *l1, + const char *f2, const char *l2) { + for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) { + while ((*f1 == ' ') && (f1 != l1)) ++f1; + while ((*f2 == ' ') && (f2 != l2)) ++f2; + if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1; + } + return (int)((l1 - f1) - (l2 - f2)); +} + +/* + Check type equivalence in a name list like ||... + Return 0 if not equal, 1 if equal +*/ +SWIGRUNTIME int +SWIG_TypeEquiv(const char *nb, const char *tb) { + int equiv = 0; + const char* te = tb + strlen(tb); + const char* ne = nb; + while (!equiv && *ne) { + for (nb = ne; *ne; ++ne) { + if (*ne == '|') break; + } + equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; + if (*ne) ++ne; + } + return equiv; +} + +/* + Check type equivalence in a name list like ||... + Return 0 if equal, -1 if nb < tb, 1 if nb > tb +*/ +SWIGRUNTIME int +SWIG_TypeCompare(const char *nb, const char *tb) { + int equiv = 0; + const char* te = tb + strlen(tb); + const char* ne = nb; + while (!equiv && *ne) { + for (nb = ne; *ne; ++ne) { + if (*ne == '|') break; + } + equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; + if (*ne) ++ne; + } + return equiv; +} + + +/* + Check the typename +*/ +SWIGRUNTIME swig_cast_info * +SWIG_TypeCheck(const char *c, swig_type_info *ty) { + if (ty) { + swig_cast_info *iter = ty->cast; + while (iter) { + if (strcmp(iter->type->name, c) == 0) { + if (iter == ty->cast) + return iter; + /* Move iter to the top of the linked list */ + iter->prev->next = iter->next; + if (iter->next) + iter->next->prev = iter->prev; + iter->next = ty->cast; + iter->prev = 0; + if (ty->cast) ty->cast->prev = iter; + ty->cast = iter; + return iter; + } + iter = iter->next; + } + } + return 0; +} + +/* + Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison +*/ +SWIGRUNTIME swig_cast_info * +SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) { + if (ty) { + swig_cast_info *iter = ty->cast; + while (iter) { + if (iter->type == from) { + if (iter == ty->cast) + return iter; + /* Move iter to the top of the linked list */ + iter->prev->next = iter->next; + if (iter->next) + iter->next->prev = iter->prev; + iter->next = ty->cast; + iter->prev = 0; + if (ty->cast) ty->cast->prev = iter; + ty->cast = iter; + return iter; + } + iter = iter->next; + } + } + return 0; +} + +/* + Cast a pointer up an inheritance hierarchy +*/ +SWIGRUNTIMEINLINE void * +SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) { + return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory); +} + +/* + Dynamic pointer casting. Down an inheritance hierarchy +*/ +SWIGRUNTIME swig_type_info * +SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) { + swig_type_info *lastty = ty; + if (!ty || !ty->dcast) return ty; + while (ty && (ty->dcast)) { + ty = (*ty->dcast)(ptr); + if (ty) lastty = ty; + } + return lastty; +} + +/* + Return the name associated with this type +*/ +SWIGRUNTIMEINLINE const char * +SWIG_TypeName(const swig_type_info *ty) { + return ty->name; +} + +/* + Return the pretty name associated with this type, + that is an unmangled type name in a form presentable to the user. +*/ +SWIGRUNTIME const char * +SWIG_TypePrettyName(const swig_type_info *type) { + /* The "str" field contains the equivalent pretty names of the + type, separated by vertical-bar characters. We choose + to print the last name, as it is often (?) the most + specific. */ + if (!type) return NULL; + if (type->str != NULL) { + const char *last_name = type->str; + const char *s; + for (s = type->str; *s; s++) + if (*s == '|') last_name = s+1; + return last_name; + } + else + return type->name; +} + +/* + Set the clientdata field for a type +*/ +SWIGRUNTIME void +SWIG_TypeClientData(swig_type_info *ti, void *clientdata) { + swig_cast_info *cast = ti->cast; + /* if (ti->clientdata == clientdata) return; */ + ti->clientdata = clientdata; + + while (cast) { + if (!cast->converter) { + swig_type_info *tc = cast->type; + if (!tc->clientdata) { + SWIG_TypeClientData(tc, clientdata); + } + } + cast = cast->next; + } +} +SWIGRUNTIME void +SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) { + SWIG_TypeClientData(ti, clientdata); + ti->owndata = 1; +} + +/* + Search for a swig_type_info structure only by mangled name + Search is a O(log #types) + + We start searching at module start, and finish searching when start == end. + Note: if start == end at the beginning of the function, we go all the way around + the circular list. +*/ +SWIGRUNTIME swig_type_info * +SWIG_MangledTypeQueryModule(swig_module_info *start, + swig_module_info *end, + const char *name) { + swig_module_info *iter = start; + do { + if (iter->size) { + register size_t l = 0; + register size_t r = iter->size - 1; + do { + /* since l+r >= 0, we can (>> 1) instead (/ 2) */ + register size_t i = (l + r) >> 1; + const char *iname = iter->types[i]->name; + if (iname) { + register int compare = strcmp(name, iname); + if (compare == 0) { + return iter->types[i]; + } else if (compare < 0) { + if (i) { + r = i - 1; + } else { + break; + } + } else if (compare > 0) { + l = i + 1; + } + } else { + break; /* should never happen */ + } + } while (l <= r); + } + iter = iter->next; + } while (iter != end); + return 0; +} + +/* + Search for a swig_type_info structure for either a mangled name or a human readable name. + It first searches the mangled names of the types, which is a O(log #types) + If a type is not found it then searches the human readable names, which is O(#types). + + We start searching at module start, and finish searching when start == end. + Note: if start == end at the beginning of the function, we go all the way around + the circular list. +*/ +SWIGRUNTIME swig_type_info * +SWIG_TypeQueryModule(swig_module_info *start, + swig_module_info *end, + const char *name) { + /* STEP 1: Search the name field using binary search */ + swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name); + if (ret) { + return ret; + } else { + /* STEP 2: If the type hasn't been found, do a complete search + of the str field (the human readable name) */ + swig_module_info *iter = start; + do { + register size_t i = 0; + for (; i < iter->size; ++i) { + if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name))) + return iter->types[i]; + } + iter = iter->next; + } while (iter != end); + } + + /* neither found a match */ + return 0; +} + +/* + Pack binary data into a string +*/ +SWIGRUNTIME char * +SWIG_PackData(char *c, void *ptr, size_t sz) { + static const char hex[17] = "0123456789abcdef"; + register const unsigned char *u = (unsigned char *) ptr; + register const unsigned char *eu = u + sz; + for (; u != eu; ++u) { + register unsigned char uu = *u; + *(c++) = hex[(uu & 0xf0) >> 4]; + *(c++) = hex[uu & 0xf]; + } + return c; +} + +/* + Unpack binary data from a string +*/ +SWIGRUNTIME const char * +SWIG_UnpackData(const char *c, void *ptr, size_t sz) { + register unsigned char *u = (unsigned char *) ptr; + register const unsigned char *eu = u + sz; + for (; u != eu; ++u) { + register char d = *(c++); + register unsigned char uu; + if ((d >= '0') && (d <= '9')) + uu = ((d - '0') << 4); + else if ((d >= 'a') && (d <= 'f')) + uu = ((d - ('a'-10)) << 4); + else + return (char *) 0; + d = *(c++); + if ((d >= '0') && (d <= '9')) + uu |= (d - '0'); + else if ((d >= 'a') && (d <= 'f')) + uu |= (d - ('a'-10)); + else + return (char *) 0; + *u = uu; + } + return c; +} + +/* + Pack 'void *' into a string buffer. +*/ +SWIGRUNTIME char * +SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) { + char *r = buff; + if ((2*sizeof(void *) + 2) > bsz) return 0; + *(r++) = '_'; + r = SWIG_PackData(r,&ptr,sizeof(void *)); + if (strlen(name) + 1 > (bsz - (r - buff))) return 0; + strcpy(r,name); + return buff; +} + +SWIGRUNTIME const char * +SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) { + if (*c != '_') { + if (strcmp(c,"NULL") == 0) { + *ptr = (void *) 0; + return name; + } else { + return 0; + } + } + return SWIG_UnpackData(++c,ptr,sizeof(void *)); +} + +SWIGRUNTIME char * +SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) { + char *r = buff; + size_t lname = (name ? strlen(name) : 0); + if ((2*sz + 2 + lname) > bsz) return 0; + *(r++) = '_'; + r = SWIG_PackData(r,ptr,sz); + if (lname) { + strncpy(r,name,lname+1); + } else { + *r = 0; + } + return buff; +} + +SWIGRUNTIME const char * +SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { + if (*c != '_') { + if (strcmp(c,"NULL") == 0) { + memset(ptr,0,sz); + return name; + } else { + return 0; + } + } + return SWIG_UnpackData(++c,ptr,sz); +} + +#ifdef __cplusplus +} +#endif + +/* Errors in SWIG */ +#define SWIG_UnknownError -1 +#define SWIG_IOError -2 +#define SWIG_RuntimeError -3 +#define SWIG_IndexError -4 +#define SWIG_TypeError -5 +#define SWIG_DivisionByZero -6 +#define SWIG_OverflowError -7 +#define SWIG_SyntaxError -8 +#define SWIG_ValueError -9 +#define SWIG_SystemError -10 +#define SWIG_AttributeError -11 +#define SWIG_MemoryError -12 +#define SWIG_NullReferenceError -13 + + + +/* Compatibility marcos for Python 3 */ +#if PY_VERSION_HEX >= 0x03000000 + +#define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type) +#define PyInt_Check(x) PyLong_Check(x) +#define PyInt_AsLong(x) PyLong_AsLong(x) +#define PyInt_FromLong(x) PyLong_FromLong(x) +#define PyString_Format(fmt, args) PyUnicode_Format(fmt, args) + +#endif + +#ifndef Py_TYPE +# define Py_TYPE(op) ((op)->ob_type) +#endif + +/* SWIG APIs for compatibility of both Python 2 & 3 */ + +#if PY_VERSION_HEX >= 0x03000000 +# define SWIG_Python_str_FromFormat PyUnicode_FromFormat +#else +# define SWIG_Python_str_FromFormat PyString_FromFormat +#endif + +SWIGINTERN char* +SWIG_Python_str_AsChar(PyObject *str) +{ +#if PY_VERSION_HEX >= 0x03000000 + str = PyUnicode_AsUTF8String(str); + return PyBytes_AsString(str); +#else + return PyString_AsString(str); +#endif +} + +SWIGINTERN PyObject* +SWIG_Python_str_FromChar(const char *c) +{ +#if PY_VERSION_HEX >= 0x03000000 + return PyUnicode_FromString(c); +#else + return PyString_FromString(c); +#endif +} + +/* Add PyOS_snprintf for old Pythons */ +#if PY_VERSION_HEX < 0x02020000 +# if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM) +# define PyOS_snprintf _snprintf +# else +# define PyOS_snprintf snprintf +# endif +#endif + +/* A crude PyString_FromFormat implementation for old Pythons */ +#if PY_VERSION_HEX < 0x02020000 + +#ifndef SWIG_PYBUFFER_SIZE +# define SWIG_PYBUFFER_SIZE 1024 +#endif + +static PyObject * +PyString_FromFormat(const char *fmt, ...) { + va_list ap; + char buf[SWIG_PYBUFFER_SIZE * 2]; + int res; + va_start(ap, fmt); + res = vsnprintf(buf, sizeof(buf), fmt, ap); + va_end(ap); + return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf); +} +#endif + +/* Add PyObject_Del for old Pythons */ +#if PY_VERSION_HEX < 0x01060000 +# define PyObject_Del(op) PyMem_DEL((op)) +#endif +#ifndef PyObject_DEL +# define PyObject_DEL PyObject_Del +#endif + +/* A crude PyExc_StopIteration exception for old Pythons */ +#if PY_VERSION_HEX < 0x02020000 +# ifndef PyExc_StopIteration +# define PyExc_StopIteration PyExc_RuntimeError +# endif +# ifndef PyObject_GenericGetAttr +# define PyObject_GenericGetAttr 0 +# endif +#endif + +/* Py_NotImplemented is defined in 2.1 and up. */ +#if PY_VERSION_HEX < 0x02010000 +# ifndef Py_NotImplemented +# define Py_NotImplemented PyExc_RuntimeError +# endif +#endif + +/* A crude PyString_AsStringAndSize implementation for old Pythons */ +#if PY_VERSION_HEX < 0x02010000 +# ifndef PyString_AsStringAndSize +# define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;} +# endif +#endif + +/* PySequence_Size for old Pythons */ +#if PY_VERSION_HEX < 0x02000000 +# ifndef PySequence_Size +# define PySequence_Size PySequence_Length +# endif +#endif + +/* PyBool_FromLong for old Pythons */ +#if PY_VERSION_HEX < 0x02030000 +static +PyObject *PyBool_FromLong(long ok) +{ + PyObject *result = ok ? Py_True : Py_False; + Py_INCREF(result); + return result; +} +#endif + +/* Py_ssize_t for old Pythons */ +/* This code is as recommended by: */ +/* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */ +#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN) +typedef int Py_ssize_t; +# define PY_SSIZE_T_MAX INT_MAX +# define PY_SSIZE_T_MIN INT_MIN +#endif + +/* ----------------------------------------------------------------------------- + * error manipulation + * ----------------------------------------------------------------------------- */ + +SWIGRUNTIME PyObject* +SWIG_Python_ErrorType(int code) { + PyObject* type = 0; + switch(code) { + case SWIG_MemoryError: + type = PyExc_MemoryError; + break; + case SWIG_IOError: + type = PyExc_IOError; + break; + case SWIG_RuntimeError: + type = PyExc_RuntimeError; + break; + case SWIG_IndexError: + type = PyExc_IndexError; + break; + case SWIG_TypeError: + type = PyExc_TypeError; + break; + case SWIG_DivisionByZero: + type = PyExc_ZeroDivisionError; + break; + case SWIG_OverflowError: + type = PyExc_OverflowError; + break; + case SWIG_SyntaxError: + type = PyExc_SyntaxError; + break; + case SWIG_ValueError: + type = PyExc_ValueError; + break; + case SWIG_SystemError: + type = PyExc_SystemError; + break; + case SWIG_AttributeError: + type = PyExc_AttributeError; + break; + default: + type = PyExc_RuntimeError; + } + return type; +} + + +SWIGRUNTIME void +SWIG_Python_AddErrorMsg(const char* mesg) +{ + PyObject *type = 0; + PyObject *value = 0; + PyObject *traceback = 0; + + if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback); + if (value) { + PyObject *old_str = PyObject_Str(value); + PyErr_Clear(); + Py_XINCREF(type); + + PyErr_Format(type, "%s %s", SWIG_Python_str_AsChar(old_str), mesg); + Py_DECREF(old_str); + Py_DECREF(value); + } else { + PyErr_SetString(PyExc_RuntimeError, mesg); + } +} + +#if defined(SWIG_PYTHON_NO_THREADS) +# if defined(SWIG_PYTHON_THREADS) +# undef SWIG_PYTHON_THREADS +# endif +#endif +#if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */ +# if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL) +# if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */ +# define SWIG_PYTHON_USE_GIL +# endif +# endif +# if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */ +# ifndef SWIG_PYTHON_INITIALIZE_THREADS +# define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads() +# endif +# ifdef __cplusplus /* C++ code */ + class SWIG_Python_Thread_Block { + bool status; + PyGILState_STATE state; + public: + void end() { if (status) { PyGILState_Release(state); status = false;} } + SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {} + ~SWIG_Python_Thread_Block() { end(); } + }; + class SWIG_Python_Thread_Allow { + bool status; + PyThreadState *save; + public: + void end() { if (status) { PyEval_RestoreThread(save); status = false; }} + SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {} + ~SWIG_Python_Thread_Allow() { end(); } + }; +# define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block +# define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end() +# define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow +# define SWIG_PYTHON_THREAD_END_ALLOW _swig_thread_allow.end() +# else /* C code */ +# define SWIG_PYTHON_THREAD_BEGIN_BLOCK PyGILState_STATE _swig_thread_block = PyGILState_Ensure() +# define SWIG_PYTHON_THREAD_END_BLOCK PyGILState_Release(_swig_thread_block) +# define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread() +# define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow) +# endif +# else /* Old thread way, not implemented, user must provide it */ +# if !defined(SWIG_PYTHON_INITIALIZE_THREADS) +# define SWIG_PYTHON_INITIALIZE_THREADS +# endif +# if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK) +# define SWIG_PYTHON_THREAD_BEGIN_BLOCK +# endif +# if !defined(SWIG_PYTHON_THREAD_END_BLOCK) +# define SWIG_PYTHON_THREAD_END_BLOCK +# endif +# if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW) +# define SWIG_PYTHON_THREAD_BEGIN_ALLOW +# endif +# if !defined(SWIG_PYTHON_THREAD_END_ALLOW) +# define SWIG_PYTHON_THREAD_END_ALLOW +# endif +# endif +#else /* No thread support */ +# define SWIG_PYTHON_INITIALIZE_THREADS +# define SWIG_PYTHON_THREAD_BEGIN_BLOCK +# define SWIG_PYTHON_THREAD_END_BLOCK +# define SWIG_PYTHON_THREAD_BEGIN_ALLOW +# define SWIG_PYTHON_THREAD_END_ALLOW +#endif + +/* ----------------------------------------------------------------------------- + * Python API portion that goes into the runtime + * ----------------------------------------------------------------------------- */ + +#ifdef __cplusplus +extern "C" { +#if 0 +} /* cc-mode */ +#endif +#endif + +/* ----------------------------------------------------------------------------- + * Constant declarations + * ----------------------------------------------------------------------------- */ + +/* Constant Types */ +#define SWIG_PY_POINTER 4 +#define SWIG_PY_BINARY 5 + +/* Constant information structure */ +typedef struct swig_const_info { + int type; + char *name; + long lvalue; + double dvalue; + void *pvalue; + swig_type_info **ptype; +} swig_const_info; + + +/* ----------------------------------------------------------------------------- + * Wrapper of PyInstanceMethod_New() used in Python 3 + * It is exported to the generated module, used for -fastproxy + * ----------------------------------------------------------------------------- */ +SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *self, PyObject *func) +{ +#if PY_VERSION_HEX >= 0x03000000 + return PyInstanceMethod_New(func); +#else + return NULL; +#endif +} + +#ifdef __cplusplus +#if 0 +{ /* cc-mode */ +#endif +} +#endif + + +/* ----------------------------------------------------------------------------- + * See the LICENSE file for information on copyright, usage and redistribution + * of SWIG, and the README file for authors - http://www.swig.org/release.html. + * + * pyrun.swg + * + * This file contains the runtime support for Python modules + * and includes code for managing global variables and pointer + * type checking. + * + * ----------------------------------------------------------------------------- */ + +/* Common SWIG API */ + +/* for raw pointers */ +#define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0) +#define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags) +#define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own) +#define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(ptr, type, flags) +#define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty) +#define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src) +#define swig_owntype int + +/* for raw packed data */ +#define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty) +#define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type) + +/* for class or struct pointers */ +#define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags) +#define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags) + +/* for C or C++ function pointers */ +#define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type) +#define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(ptr, type, 0) + +/* for C++ member pointers, ie, member methods */ +#define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty) +#define SWIG_NewMemberObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type) + + +/* Runtime API */ + +#define SWIG_GetModule(clientdata) SWIG_Python_GetModule() +#define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer) +#define SWIG_NewClientData(obj) SwigPyClientData_New(obj) + +#define SWIG_SetErrorObj SWIG_Python_SetErrorObj +#define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg +#define SWIG_ErrorType(code) SWIG_Python_ErrorType(code) +#define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg) +#define SWIG_fail goto fail + + +/* Runtime API implementation */ + +/* Error manipulation */ + +SWIGINTERN void +SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) { + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + PyErr_SetObject(errtype, obj); + Py_DECREF(obj); + SWIG_PYTHON_THREAD_END_BLOCK; +} + +SWIGINTERN void +SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) { + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + PyErr_SetString(errtype, (char *) msg); + SWIG_PYTHON_THREAD_END_BLOCK; +} + +#define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj) + +/* Set a constant value */ + +SWIGINTERN void +SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { + PyDict_SetItemString(d, (char*) name, obj); + Py_DECREF(obj); +} + +/* Append a value to the result obj */ + +SWIGINTERN PyObject* +SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { +#if !defined(SWIG_PYTHON_OUTPUT_TUPLE) + if (!result) { + result = obj; + } else if (result == Py_None) { + Py_DECREF(result); + result = obj; + } else { + if (!PyList_Check(result)) { + PyObject *o2 = result; + result = PyList_New(1); + PyList_SetItem(result, 0, o2); + } + PyList_Append(result,obj); + Py_DECREF(obj); + } + return result; +#else + PyObject* o2; + PyObject* o3; + if (!result) { + result = obj; + } else if (result == Py_None) { + Py_DECREF(result); + result = obj; + } else { + if (!PyTuple_Check(result)) { + o2 = result; + result = PyTuple_New(1); + PyTuple_SET_ITEM(result, 0, o2); + } + o3 = PyTuple_New(1); + PyTuple_SET_ITEM(o3, 0, obj); + o2 = result; + result = PySequence_Concat(o2, o3); + Py_DECREF(o2); + Py_DECREF(o3); + } + return result; +#endif +} + +/* Unpack the argument tuple */ + +SWIGINTERN int +SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs) +{ + if (!args) { + if (!min && !max) { + return 1; + } else { + PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none", + name, (min == max ? "" : "at least "), (int)min); + return 0; + } + } + if (!PyTuple_Check(args)) { + PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple"); + return 0; + } else { + register Py_ssize_t l = PyTuple_GET_SIZE(args); + if (l < min) { + PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", + name, (min == max ? "" : "at least "), (int)min, (int)l); + return 0; + } else if (l > max) { + PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", + name, (min == max ? "" : "at most "), (int)max, (int)l); + return 0; + } else { + register int i; + for (i = 0; i < l; ++i) { + objs[i] = PyTuple_GET_ITEM(args, i); + } + for (; l < max; ++l) { + objs[l] = 0; + } + return i + 1; + } + } +} + +/* A functor is a function object with one single object argument */ +#if PY_VERSION_HEX >= 0x02020000 +#define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL); +#else +#define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunction(functor, "O", obj); +#endif + +/* + Helper for static pointer initialization for both C and C++ code, for example + static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...); +*/ +#ifdef __cplusplus +#define SWIG_STATIC_POINTER(var) var +#else +#define SWIG_STATIC_POINTER(var) var = 0; if (!var) var +#endif + +/* ----------------------------------------------------------------------------- + * Pointer declarations + * ----------------------------------------------------------------------------- */ + +/* Flags for new pointer objects */ +#define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1) +#define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN) + +#define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1) + +#ifdef __cplusplus +extern "C" { +#if 0 +} /* cc-mode */ +#endif +#endif + +/* How to access Py_None */ +#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# ifndef SWIG_PYTHON_NO_BUILD_NONE +# ifndef SWIG_PYTHON_BUILD_NONE +# define SWIG_PYTHON_BUILD_NONE +# endif +# endif +#endif + +#ifdef SWIG_PYTHON_BUILD_NONE +# ifdef Py_None +# undef Py_None +# define Py_None SWIG_Py_None() +# endif +SWIGRUNTIMEINLINE PyObject * +_SWIG_Py_None(void) +{ + PyObject *none = Py_BuildValue((char*)""); + Py_DECREF(none); + return none; +} +SWIGRUNTIME PyObject * +SWIG_Py_None(void) +{ + static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None(); + return none; +} +#endif + +/* The python void return value */ + +SWIGRUNTIMEINLINE PyObject * +SWIG_Py_Void(void) +{ + PyObject *none = Py_None; + Py_INCREF(none); + return none; +} + +/* SwigPyClientData */ + +typedef struct { + PyObject *klass; + PyObject *newraw; + PyObject *newargs; + PyObject *destroy; + int delargs; + int implicitconv; +} SwigPyClientData; + +SWIGRUNTIMEINLINE int +SWIG_Python_CheckImplicit(swig_type_info *ty) +{ + SwigPyClientData *data = (SwigPyClientData *)ty->clientdata; + return data ? data->implicitconv : 0; +} + +SWIGRUNTIMEINLINE PyObject * +SWIG_Python_ExceptionType(swig_type_info *desc) { + SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0; + PyObject *klass = data ? data->klass : 0; + return (klass ? klass : PyExc_RuntimeError); +} + + +SWIGRUNTIME SwigPyClientData * +SwigPyClientData_New(PyObject* obj) +{ + if (!obj) { + return 0; + } else { + SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData)); + /* the klass element */ + data->klass = obj; + Py_INCREF(data->klass); + /* the newraw method and newargs arguments used to create a new raw instance */ + if (PyClass_Check(obj)) { + data->newraw = 0; + data->newargs = obj; + Py_INCREF(obj); + } else { +#if (PY_VERSION_HEX < 0x02020000) + data->newraw = 0; +#else + data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__"); +#endif + if (data->newraw) { + Py_INCREF(data->newraw); + data->newargs = PyTuple_New(1); + PyTuple_SetItem(data->newargs, 0, obj); + } else { + data->newargs = obj; + } + Py_INCREF(data->newargs); + } + /* the destroy method, aka as the C++ delete method */ + data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__"); + if (PyErr_Occurred()) { + PyErr_Clear(); + data->destroy = 0; + } + if (data->destroy) { + int flags; + Py_INCREF(data->destroy); + flags = PyCFunction_GET_FLAGS(data->destroy); +#ifdef METH_O + data->delargs = !(flags & (METH_O)); +#else + data->delargs = 0; +#endif + } else { + data->delargs = 0; + } + data->implicitconv = 0; + return data; + } +} + +SWIGRUNTIME void +SwigPyClientData_Del(SwigPyClientData* data) +{ + Py_XDECREF(data->newraw); + Py_XDECREF(data->newargs); + Py_XDECREF(data->destroy); +} + +/* =============== SwigPyObject =====================*/ + +typedef struct { + PyObject_HEAD + void *ptr; + swig_type_info *ty; + int own; + PyObject *next; +} SwigPyObject; + +SWIGRUNTIME PyObject * +SwigPyObject_long(SwigPyObject *v) +{ + return PyLong_FromVoidPtr(v->ptr); +} + +SWIGRUNTIME PyObject * +SwigPyObject_format(const char* fmt, SwigPyObject *v) +{ + PyObject *res = NULL; + PyObject *args = PyTuple_New(1); + if (args) { + if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) { + PyObject *ofmt = SWIG_Python_str_FromChar(fmt); + if (ofmt) { +#if PY_VERSION_HEX >= 0x03000000 + res = PyUnicode_Format(ofmt,args); +#else + res = PyString_Format(ofmt,args); +#endif + Py_DECREF(ofmt); + } + Py_DECREF(args); + } + } + return res; +} + +SWIGRUNTIME PyObject * +SwigPyObject_oct(SwigPyObject *v) +{ + return SwigPyObject_format("%o",v); +} + +SWIGRUNTIME PyObject * +SwigPyObject_hex(SwigPyObject *v) +{ + return SwigPyObject_format("%x",v); +} + +SWIGRUNTIME PyObject * +#ifdef METH_NOARGS +SwigPyObject_repr(SwigPyObject *v) +#else +SwigPyObject_repr(SwigPyObject *v, PyObject *args) +#endif +{ + const char *name = SWIG_TypePrettyName(v->ty); + PyObject *hex = SwigPyObject_hex(v); + PyObject *repr = SWIG_Python_str_FromFormat("", name, hex); + Py_DECREF(hex); + if (v->next) { +#ifdef METH_NOARGS + PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next); +#else + PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args); +#endif +#if PY_VERSION_HEX >= 0x03000000 + PyObject *joined = PyUnicode_Concat(repr, nrep); + Py_DecRef(repr); + Py_DecRef(nrep); + repr = joined; +#else + PyString_ConcatAndDel(&repr,nrep); +#endif + } + return repr; +} + +SWIGRUNTIME int +SwigPyObject_print(SwigPyObject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) +{ +#ifdef METH_NOARGS + PyObject *repr = SwigPyObject_repr(v); +#else + PyObject *repr = SwigPyObject_repr(v, NULL); +#endif + if (repr) { + fputs(SWIG_Python_str_AsChar(repr), fp); + Py_DECREF(repr); + return 0; + } else { + return 1; + } +} + +SWIGRUNTIME PyObject * +SwigPyObject_str(SwigPyObject *v) +{ + char result[SWIG_BUFFER_SIZE]; + return SWIG_PackVoidPtr(result, v->ptr, v->ty->name, sizeof(result)) ? + SWIG_Python_str_FromChar(result) : 0; +} + +SWIGRUNTIME int +SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w) +{ + void *i = v->ptr; + void *j = w->ptr; + return (i < j) ? -1 : ((i > j) ? 1 : 0); +} + +/* Added for Python 3.x, whould it also useful for Python 2.x? */ +SWIGRUNTIME PyObject* +SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op) +{ + PyObject* res; + if( op != Py_EQ && op != Py_NE ) { + Py_INCREF(Py_NotImplemented); + return Py_NotImplemented; + } + if( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ) + res = Py_True; + else + res = Py_False; + Py_INCREF(res); + return res; +} + + +SWIGRUNTIME PyTypeObject* _PySwigObject_type(void); + +SWIGRUNTIME PyTypeObject* +SwigPyObject_type(void) { + static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigObject_type(); + return type; +} + +SWIGRUNTIMEINLINE int +SwigPyObject_Check(PyObject *op) { + return (Py_TYPE(op) == SwigPyObject_type()) + || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0); +} + +SWIGRUNTIME PyObject * +SwigPyObject_New(void *ptr, swig_type_info *ty, int own); + +SWIGRUNTIME void +SwigPyObject_dealloc(PyObject *v) +{ + SwigPyObject *sobj = (SwigPyObject *) v; + PyObject *next = sobj->next; + if (sobj->own == SWIG_POINTER_OWN) { + swig_type_info *ty = sobj->ty; + SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0; + PyObject *destroy = data ? data->destroy : 0; + if (destroy) { + /* destroy is always a VARARGS method */ + PyObject *res; + if (data->delargs) { + /* we need to create a temporal object to carry the destroy operation */ + PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0); + res = SWIG_Python_CallFunctor(destroy, tmp); + Py_DECREF(tmp); + } else { + PyCFunction meth = PyCFunction_GET_FUNCTION(destroy); + PyObject *mself = PyCFunction_GET_SELF(destroy); + res = ((*meth)(mself, v)); + } + Py_XDECREF(res); + } +#if !defined(SWIG_PYTHON_SILENT_MEMLEAK) + else { + const char *name = SWIG_TypePrettyName(ty); + printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown")); + } +#endif + } + Py_XDECREF(next); + PyObject_DEL(v); +} + +SWIGRUNTIME PyObject* +SwigPyObject_append(PyObject* v, PyObject* next) +{ + SwigPyObject *sobj = (SwigPyObject *) v; +#ifndef METH_O + PyObject *tmp = 0; + if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL; + next = tmp; +#endif + if (!SwigPyObject_Check(next)) { + return NULL; + } + sobj->next = next; + Py_INCREF(next); + return SWIG_Py_Void(); +} + +SWIGRUNTIME PyObject* +#ifdef METH_NOARGS +SwigPyObject_next(PyObject* v) +#else +SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) +#endif +{ + SwigPyObject *sobj = (SwigPyObject *) v; + if (sobj->next) { + Py_INCREF(sobj->next); + return sobj->next; + } else { + return SWIG_Py_Void(); + } +} + +SWIGINTERN PyObject* +#ifdef METH_NOARGS +SwigPyObject_disown(PyObject *v) +#else +SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) +#endif +{ + SwigPyObject *sobj = (SwigPyObject *)v; + sobj->own = 0; + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject* +#ifdef METH_NOARGS +SwigPyObject_acquire(PyObject *v) +#else +SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) +#endif +{ + SwigPyObject *sobj = (SwigPyObject *)v; + sobj->own = SWIG_POINTER_OWN; + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject* +SwigPyObject_own(PyObject *v, PyObject *args) +{ + PyObject *val = 0; +#if (PY_VERSION_HEX < 0x02020000) + if (!PyArg_ParseTuple(args,(char *)"|O:own",&val)) +#else + if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val)) +#endif + { + return NULL; + } + else + { + SwigPyObject *sobj = (SwigPyObject *)v; + PyObject *obj = PyBool_FromLong(sobj->own); + if (val) { +#ifdef METH_NOARGS + if (PyObject_IsTrue(val)) { + SwigPyObject_acquire(v); + } else { + SwigPyObject_disown(v); + } +#else + if (PyObject_IsTrue(val)) { + SwigPyObject_acquire(v,args); + } else { + SwigPyObject_disown(v,args); + } +#endif + } + return obj; + } +} + +#ifdef METH_O +static PyMethodDef +swigobject_methods[] = { + {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"}, + {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS, (char *)"aquires ownership of the pointer"}, + {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, + {(char *)"append", (PyCFunction)SwigPyObject_append, METH_O, (char *)"appends another 'this' object"}, + {(char *)"next", (PyCFunction)SwigPyObject_next, METH_NOARGS, (char *)"returns the next 'this' object"}, + {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_NOARGS, (char *)"returns object representation"}, + {0, 0, 0, 0} +}; +#else +static PyMethodDef +swigobject_methods[] = { + {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_VARARGS, (char *)"releases ownership of the pointer"}, + {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_VARARGS, (char *)"aquires ownership of the pointer"}, + {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, + {(char *)"append", (PyCFunction)SwigPyObject_append, METH_VARARGS, (char *)"appends another 'this' object"}, + {(char *)"next", (PyCFunction)SwigPyObject_next, METH_VARARGS, (char *)"returns the next 'this' object"}, + {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_VARARGS, (char *)"returns object representation"}, + {0, 0, 0, 0} +}; +#endif + +#if PY_VERSION_HEX < 0x02020000 +SWIGINTERN PyObject * +SwigPyObject_getattr(SwigPyObject *sobj,char *name) +{ + return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name); +} +#endif + +SWIGRUNTIME PyTypeObject* +_PySwigObject_type(void) { + static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer"; + + static PyNumberMethods SwigPyObject_as_number = { + (binaryfunc)0, /*nb_add*/ + (binaryfunc)0, /*nb_subtract*/ + (binaryfunc)0, /*nb_multiply*/ + /* nb_divide removed in Python 3 */ +#if PY_VERSION_HEX < 0x03000000 + (binaryfunc)0, /*nb_divide*/ +#endif + (binaryfunc)0, /*nb_remainder*/ + (binaryfunc)0, /*nb_divmod*/ + (ternaryfunc)0,/*nb_power*/ + (unaryfunc)0, /*nb_negative*/ + (unaryfunc)0, /*nb_positive*/ + (unaryfunc)0, /*nb_absolute*/ + (inquiry)0, /*nb_nonzero*/ + 0, /*nb_invert*/ + 0, /*nb_lshift*/ + 0, /*nb_rshift*/ + 0, /*nb_and*/ + 0, /*nb_xor*/ + 0, /*nb_or*/ +#if PY_VERSION_HEX < 0x03000000 + 0, /*nb_coerce*/ +#endif + (unaryfunc)SwigPyObject_long, /*nb_int*/ + (unaryfunc)SwigPyObject_long, /*nb_long*/ + (unaryfunc)0, /*nb_float*/ +#if PY_VERSION_HEX < 0x03000000 + (unaryfunc)SwigPyObject_oct, /*nb_oct*/ + (unaryfunc)SwigPyObject_hex, /*nb_hex*/ +#endif +#if PY_VERSION_HEX >= 0x03000000 /* 3.0 */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */ +#elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */ +#elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */ +#elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */ + 0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */ +#endif + }; + + static PyTypeObject swigpyobject_type; + static int type_init = 0; + if (!type_init) { + const PyTypeObject tmp + = { + /* PyOjbect header changed in Python 3 */ +#if PY_VERSION_HEX >= 0x03000000 + PyVarObject_HEAD_INIT(&PyType_Type, 0) +#else + PyObject_HEAD_INIT(NULL) + 0, /* ob_size */ +#endif + (char *)"SwigPyObject", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + (destructor)SwigPyObject_dealloc, /* tp_dealloc */ + (printfunc)SwigPyObject_print, /* tp_print */ +#if PY_VERSION_HEX < 0x02020000 + (getattrfunc)SwigPyObject_getattr, /* tp_getattr */ +#else + (getattrfunc)0, /* tp_getattr */ +#endif + (setattrfunc)0, /* tp_setattr */ + (cmpfunc)SwigPyObject_compare, /* tp_compare */ + (reprfunc)SwigPyObject_repr, /* tp_repr */ + &SwigPyObject_as_number, /* tp_as_number */ + 0, /* tp_as_sequence */ + 0, /* tp_as_mapping */ + (hashfunc)0, /* tp_hash */ + (ternaryfunc)0, /* tp_call */ + (reprfunc)SwigPyObject_str, /* tp_str */ + PyObject_GenericGetAttr, /* tp_getattro */ + 0, /* tp_setattro */ + 0, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT, /* tp_flags */ + swigobject_doc, /* tp_doc */ + 0, /* tp_traverse */ + 0, /* tp_clear */ + (richcmpfunc)SwigPyObject_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ +#if PY_VERSION_HEX >= 0x02020000 + 0, /* tp_iter */ + 0, /* tp_iternext */ + swigobject_methods, /* tp_methods */ + 0, /* tp_members */ + 0, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + 0, /* tp_descr_get */ + 0, /* tp_descr_set */ + 0, /* tp_dictoffset */ + 0, /* tp_init */ + 0, /* tp_alloc */ + 0, /* tp_new */ + 0, /* tp_free */ + 0, /* tp_is_gc */ + 0, /* tp_bases */ + 0, /* tp_mro */ + 0, /* tp_cache */ + 0, /* tp_subclasses */ + 0, /* tp_weaklist */ +#endif +#if PY_VERSION_HEX >= 0x02030000 + 0, /* tp_del */ +#endif +#ifdef COUNT_ALLOCS + 0,0,0,0 /* tp_alloc -> tp_next */ +#endif + }; + swigpyobject_type = tmp; + /* for Python 3 we already assigned the ob_type in PyVarObject_HEAD_INIT() */ +#if PY_VERSION_HEX < 0x03000000 + swigpyobject_type.ob_type = &PyType_Type; +#endif + type_init = 1; + } + return &swigpyobject_type; +} + +SWIGRUNTIME PyObject * +SwigPyObject_New(void *ptr, swig_type_info *ty, int own) +{ + SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type()); + if (sobj) { + sobj->ptr = ptr; + sobj->ty = ty; + sobj->own = own; + sobj->next = 0; + } + return (PyObject *)sobj; +} + +/* ----------------------------------------------------------------------------- + * Implements a simple Swig Packed type, and use it instead of string + * ----------------------------------------------------------------------------- */ + +typedef struct { + PyObject_HEAD + void *pack; + swig_type_info *ty; + size_t size; +} SwigPyPacked; + +SWIGRUNTIME int +SwigPyPacked_print(SwigPyPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags)) +{ + char result[SWIG_BUFFER_SIZE]; + fputs("pack, v->size, 0, sizeof(result))) { + fputs("at ", fp); + fputs(result, fp); + } + fputs(v->ty->name,fp); + fputs(">", fp); + return 0; +} + +SWIGRUNTIME PyObject * +SwigPyPacked_repr(SwigPyPacked *v) +{ + char result[SWIG_BUFFER_SIZE]; + if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) { + return SWIG_Python_str_FromFormat("", result, v->ty->name); + } else { + return SWIG_Python_str_FromFormat("", v->ty->name); + } +} + +SWIGRUNTIME PyObject * +SwigPyPacked_str(SwigPyPacked *v) +{ + char result[SWIG_BUFFER_SIZE]; + if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){ + return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name); + } else { + return SWIG_Python_str_FromChar(v->ty->name); + } +} + +SWIGRUNTIME int +SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w) +{ + size_t i = v->size; + size_t j = w->size; + int s = (i < j) ? -1 : ((i > j) ? 1 : 0); + return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size); +} + +SWIGRUNTIME PyTypeObject* _PySwigPacked_type(void); + +SWIGRUNTIME PyTypeObject* +SwigPyPacked_type(void) { + static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigPacked_type(); + return type; +} + +SWIGRUNTIMEINLINE int +SwigPyPacked_Check(PyObject *op) { + return ((op)->ob_type == _PySwigPacked_type()) + || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0); +} + +SWIGRUNTIME void +SwigPyPacked_dealloc(PyObject *v) +{ + if (SwigPyPacked_Check(v)) { + SwigPyPacked *sobj = (SwigPyPacked *) v; + free(sobj->pack); + } + PyObject_DEL(v); +} + +SWIGRUNTIME PyTypeObject* +_PySwigPacked_type(void) { + static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer"; + static PyTypeObject swigpypacked_type; + static int type_init = 0; + if (!type_init) { + const PyTypeObject tmp + = { + /* PyObject header changed in Python 3 */ +#if PY_VERSION_HEX>=0x03000000 + PyVarObject_HEAD_INIT(&PyType_Type, 0) +#else + PyObject_HEAD_INIT(NULL) + 0, /* ob_size */ +#endif + (char *)"SwigPyPacked", /* tp_name */ + sizeof(SwigPyPacked), /* tp_basicsize */ + 0, /* tp_itemsize */ + (destructor)SwigPyPacked_dealloc, /* tp_dealloc */ + (printfunc)SwigPyPacked_print, /* tp_print */ + (getattrfunc)0, /* tp_getattr */ + (setattrfunc)0, /* tp_setattr */ + (cmpfunc)SwigPyPacked_compare, /* tp_compare */ + (reprfunc)SwigPyPacked_repr, /* tp_repr */ + 0, /* tp_as_number */ + 0, /* tp_as_sequence */ + 0, /* tp_as_mapping */ + (hashfunc)0, /* tp_hash */ + (ternaryfunc)0, /* tp_call */ + (reprfunc)SwigPyPacked_str, /* tp_str */ + PyObject_GenericGetAttr, /* tp_getattro */ + 0, /* tp_setattro */ + 0, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT, /* tp_flags */ + swigpacked_doc, /* tp_doc */ + 0, /* tp_traverse */ + 0, /* tp_clear */ + 0, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ +#if PY_VERSION_HEX >= 0x02020000 + 0, /* tp_iter */ + 0, /* tp_iternext */ + 0, /* tp_methods */ + 0, /* tp_members */ + 0, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + 0, /* tp_descr_get */ + 0, /* tp_descr_set */ + 0, /* tp_dictoffset */ + 0, /* tp_init */ + 0, /* tp_alloc */ + 0, /* tp_new */ + 0, /* tp_free */ + 0, /* tp_is_gc */ + 0, /* tp_bases */ + 0, /* tp_mro */ + 0, /* tp_cache */ + 0, /* tp_subclasses */ + 0, /* tp_weaklist */ +#endif +#if PY_VERSION_HEX >= 0x02030000 + 0, /* tp_del */ +#endif +#ifdef COUNT_ALLOCS + 0,0,0,0 /* tp_alloc -> tp_next */ +#endif + }; + swigpypacked_type = tmp; + /* for Python 3 the ob_type already assigned in PyVarObject_HEAD_INIT() */ +#if PY_VERSION_HEX < 0x03000000 + swigpypacked_type.ob_type = &PyType_Type; +#endif + type_init = 1; + } + return &swigpypacked_type; +} + +SWIGRUNTIME PyObject * +SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty) +{ + SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type()); + if (sobj) { + void *pack = malloc(size); + if (pack) { + memcpy(pack, ptr, size); + sobj->pack = pack; + sobj->ty = ty; + sobj->size = size; + } else { + PyObject_DEL((PyObject *) sobj); + sobj = 0; + } + } + return (PyObject *) sobj; +} + +SWIGRUNTIME swig_type_info * +SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size) +{ + if (SwigPyPacked_Check(obj)) { + SwigPyPacked *sobj = (SwigPyPacked *)obj; + if (sobj->size != size) return 0; + memcpy(ptr, sobj->pack, size); + return sobj->ty; + } else { + return 0; + } +} + +/* ----------------------------------------------------------------------------- + * pointers/data manipulation + * ----------------------------------------------------------------------------- */ + +SWIGRUNTIMEINLINE PyObject * +_SWIG_This(void) +{ + return SWIG_Python_str_FromChar("this"); +} + +SWIGRUNTIME PyObject * +SWIG_This(void) +{ + static PyObject *SWIG_STATIC_POINTER(swig_this) = _SWIG_This(); + return swig_this; +} + +/* #define SWIG_PYTHON_SLOW_GETSET_THIS */ + +/* TODO: I don't know how to implement the fast getset in Python 3 right now */ +#if PY_VERSION_HEX>=0x03000000 +#define SWIG_PYTHON_SLOW_GETSET_THIS +#endif + +SWIGRUNTIME SwigPyObject * +SWIG_Python_GetSwigThis(PyObject *pyobj) +{ + if (SwigPyObject_Check(pyobj)) { + return (SwigPyObject *) pyobj; + } else { + PyObject *obj = 0; +#if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000)) + if (PyInstance_Check(pyobj)) { + obj = _PyInstance_Lookup(pyobj, SWIG_This()); + } else { + PyObject **dictptr = _PyObject_GetDictPtr(pyobj); + if (dictptr != NULL) { + PyObject *dict = *dictptr; + obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0; + } else { +#ifdef PyWeakref_CheckProxy + if (PyWeakref_CheckProxy(pyobj)) { + PyObject *wobj = PyWeakref_GET_OBJECT(pyobj); + return wobj ? SWIG_Python_GetSwigThis(wobj) : 0; + } +#endif + obj = PyObject_GetAttr(pyobj,SWIG_This()); + if (obj) { + Py_DECREF(obj); + } else { + if (PyErr_Occurred()) PyErr_Clear(); + return 0; + } + } + } +#else + obj = PyObject_GetAttr(pyobj,SWIG_This()); + if (obj) { + Py_DECREF(obj); + } else { + if (PyErr_Occurred()) PyErr_Clear(); + return 0; + } +#endif + if (obj && !SwigPyObject_Check(obj)) { + /* a PyObject is called 'this', try to get the 'real this' + SwigPyObject from it */ + return SWIG_Python_GetSwigThis(obj); + } + return (SwigPyObject *)obj; + } +} + +/* Acquire a pointer value */ + +SWIGRUNTIME int +SWIG_Python_AcquirePtr(PyObject *obj, int own) { + if (own == SWIG_POINTER_OWN) { + SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj); + if (sobj) { + int oldown = sobj->own; + sobj->own = own; + return oldown; + } + } + return 0; +} + +/* Convert a pointer value */ + +SWIGRUNTIME int +SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) { + if (!obj) return SWIG_ERROR; + if (obj == Py_None) { + if (ptr) *ptr = 0; + return SWIG_OK; + } else { + SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj); + if (own) + *own = 0; + while (sobj) { + void *vptr = sobj->ptr; + if (ty) { + swig_type_info *to = sobj->ty; + if (to == ty) { + /* no type cast needed */ + if (ptr) *ptr = vptr; + break; + } else { + swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); + if (!tc) { + sobj = (SwigPyObject *)sobj->next; + } else { + if (ptr) { + int newmemory = 0; + *ptr = SWIG_TypeCast(tc,vptr,&newmemory); + if (newmemory == SWIG_CAST_NEW_MEMORY) { + assert(own); + if (own) + *own = *own | SWIG_CAST_NEW_MEMORY; + } + } + break; + } + } + } else { + if (ptr) *ptr = vptr; + break; + } + } + if (sobj) { + if (own) + *own = *own | sobj->own; + if (flags & SWIG_POINTER_DISOWN) { + sobj->own = 0; + } + return SWIG_OK; + } else { + int res = SWIG_ERROR; + if (flags & SWIG_POINTER_IMPLICIT_CONV) { + SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0; + if (data && !data->implicitconv) { + PyObject *klass = data->klass; + if (klass) { + PyObject *impconv; + data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/ + impconv = SWIG_Python_CallFunctor(klass, obj); + data->implicitconv = 0; + if (PyErr_Occurred()) { + PyErr_Clear(); + impconv = 0; + } + if (impconv) { + SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv); + if (iobj) { + void *vptr; + res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0); + if (SWIG_IsOK(res)) { + if (ptr) { + *ptr = vptr; + /* transfer the ownership to 'ptr' */ + iobj->own = 0; + res = SWIG_AddCast(res); + res = SWIG_AddNewMask(res); + } else { + res = SWIG_AddCast(res); + } + } + } + Py_DECREF(impconv); + } + } + } + } + return res; + } + } +} + +/* Convert a function ptr value */ + +SWIGRUNTIME int +SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { + if (!PyCFunction_Check(obj)) { + return SWIG_ConvertPtr(obj, ptr, ty, 0); + } else { + void *vptr = 0; + + /* here we get the method pointer for callbacks */ + const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc); + const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0; + if (desc) { + desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; + if (!desc) return SWIG_ERROR; + } + if (ty) { + swig_cast_info *tc = SWIG_TypeCheck(desc,ty); + if (tc) { + int newmemory = 0; + *ptr = SWIG_TypeCast(tc,vptr,&newmemory); + assert(!newmemory); /* newmemory handling not yet implemented */ + } else { + return SWIG_ERROR; + } + } else { + *ptr = vptr; + } + return SWIG_OK; + } +} + +/* Convert a packed value value */ + +SWIGRUNTIME int +SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) { + swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz); + if (!to) return SWIG_ERROR; + if (ty) { + if (to != ty) { + /* check type cast? */ + swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); + if (!tc) return SWIG_ERROR; + } + } + return SWIG_OK; +} + +/* ----------------------------------------------------------------------------- + * Create a new pointer object + * ----------------------------------------------------------------------------- */ + +/* + Create a new instance object, whitout calling __init__, and set the + 'this' attribute. +*/ + +SWIGRUNTIME PyObject* +SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) +{ +#if (PY_VERSION_HEX >= 0x02020000) + PyObject *inst = 0; + PyObject *newraw = data->newraw; + if (newraw) { + inst = PyObject_Call(newraw, data->newargs, NULL); + if (inst) { +#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS) + PyObject **dictptr = _PyObject_GetDictPtr(inst); + if (dictptr != NULL) { + PyObject *dict = *dictptr; + if (dict == NULL) { + dict = PyDict_New(); + *dictptr = dict; + PyDict_SetItem(dict, SWIG_This(), swig_this); + } + } +#else + PyObject *key = SWIG_This(); + PyObject_SetAttr(inst, key, swig_this); +#endif + } + } else { +#if PY_VERSION_HEX >= 0x03000000 + inst = PyBaseObject_Type.tp_new((PyTypeObject*) data->newargs, Py_None, Py_None); + Py_INCREF(data->newargs); + PyObject_SetAttr(inst, SWIG_This(), swig_this); + Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG; +#else + PyObject *dict = PyDict_New(); + PyDict_SetItem(dict, SWIG_This(), swig_this); + inst = PyInstance_NewRaw(data->newargs, dict); + Py_DECREF(dict); +#endif + } + return inst; +#else +#if (PY_VERSION_HEX >= 0x02010000) + PyObject *inst; + PyObject *dict = PyDict_New(); + PyDict_SetItem(dict, SWIG_This(), swig_this); + inst = PyInstance_NewRaw(data->newargs, dict); + Py_DECREF(dict); + return (PyObject *) inst; +#else + PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type); + if (inst == NULL) { + return NULL; + } + inst->in_class = (PyClassObject *)data->newargs; + Py_INCREF(inst->in_class); + inst->in_dict = PyDict_New(); + if (inst->in_dict == NULL) { + Py_DECREF(inst); + return NULL; + } +#ifdef Py_TPFLAGS_HAVE_WEAKREFS + inst->in_weakreflist = NULL; +#endif +#ifdef Py_TPFLAGS_GC + PyObject_GC_Init(inst); +#endif + PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this); + return (PyObject *) inst; +#endif +#endif +} + +SWIGRUNTIME void +SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this) +{ + PyObject *dict; +#if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS) + PyObject **dictptr = _PyObject_GetDictPtr(inst); + if (dictptr != NULL) { + dict = *dictptr; + if (dict == NULL) { + dict = PyDict_New(); + *dictptr = dict; + } + PyDict_SetItem(dict, SWIG_This(), swig_this); + return; + } +#endif + dict = PyObject_GetAttrString(inst, (char*)"__dict__"); + PyDict_SetItem(dict, SWIG_This(), swig_this); + Py_DECREF(dict); +} + + +SWIGINTERN PyObject * +SWIG_Python_InitShadowInstance(PyObject *args) { + PyObject *obj[2]; + if (!SWIG_Python_UnpackTuple(args,(char*)"swiginit", 2, 2, obj)) { + return NULL; + } else { + SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]); + if (sthis) { + SwigPyObject_append((PyObject*) sthis, obj[1]); + } else { + SWIG_Python_SetSwigThis(obj[0], obj[1]); + } + return SWIG_Py_Void(); + } +} + +/* Create a new pointer object */ + +SWIGRUNTIME PyObject * +SWIG_Python_NewPointerObj(void *ptr, swig_type_info *type, int flags) { + if (!ptr) { + return SWIG_Py_Void(); + } else { + int own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0; + PyObject *robj = SwigPyObject_New(ptr, type, own); + SwigPyClientData *clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0; + if (clientdata && !(flags & SWIG_POINTER_NOSHADOW)) { + PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj); + if (inst) { + Py_DECREF(robj); + robj = inst; + } + } + return robj; + } +} + +/* Create a new packed object */ + +SWIGRUNTIMEINLINE PyObject * +SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) { + return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void(); +} + +/* -----------------------------------------------------------------------------* + * Get type list + * -----------------------------------------------------------------------------*/ + +#ifdef SWIG_LINK_RUNTIME +void *SWIG_ReturnGlobalTypeList(void *); +#endif + +SWIGRUNTIME swig_module_info * +SWIG_Python_GetModule(void) { + static void *type_pointer = (void *)0; + /* first check if module already created */ + if (!type_pointer) { +#ifdef SWIG_LINK_RUNTIME + type_pointer = SWIG_ReturnGlobalTypeList((void *)0); +#else + type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, + (char*)"type_pointer" SWIG_TYPE_TABLE_NAME); + if (PyErr_Occurred()) { + PyErr_Clear(); + type_pointer = (void *)0; + } +#endif + } + return (swig_module_info *) type_pointer; +} + +#if PY_MAJOR_VERSION < 2 +/* PyModule_AddObject function was introduced in Python 2.0. The following function + is copied out of Python/modsupport.c in python version 2.3.4 */ +SWIGINTERN int +PyModule_AddObject(PyObject *m, char *name, PyObject *o) +{ + PyObject *dict; + if (!PyModule_Check(m)) { + PyErr_SetString(PyExc_TypeError, + "PyModule_AddObject() needs module as first arg"); + return SWIG_ERROR; + } + if (!o) { + PyErr_SetString(PyExc_TypeError, + "PyModule_AddObject() needs non-NULL value"); + return SWIG_ERROR; + } + + dict = PyModule_GetDict(m); + if (dict == NULL) { + /* Internal error -- modules must have a dict! */ + PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__", + PyModule_GetName(m)); + return SWIG_ERROR; + } + if (PyDict_SetItemString(dict, name, o)) + return SWIG_ERROR; + Py_DECREF(o); + return SWIG_OK; +} +#endif + +SWIGRUNTIME void +SWIG_Python_DestroyModule(void *vptr) +{ + swig_module_info *swig_module = (swig_module_info *) vptr; + swig_type_info **types = swig_module->types; + size_t i; + for (i =0; i < swig_module->size; ++i) { + swig_type_info *ty = types[i]; + if (ty->owndata) { + SwigPyClientData *data = (SwigPyClientData *) ty->clientdata; + if (data) SwigPyClientData_Del(data); + } + } + Py_DECREF(SWIG_This()); +} + +SWIGRUNTIME void +SWIG_Python_SetModule(swig_module_info *swig_module) { + static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} };/* Sentinel */ + +#if PY_VERSION_HEX >= 0x03000000 + /* Add a dummy module object into sys.modules */ + PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION); +#else + PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, + swig_empty_runtime_method_table); +#endif + PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule); + if (pointer && module) { + PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer); + } else { + Py_XDECREF(pointer); + } +} + +/* The python cached type query */ +SWIGRUNTIME PyObject * +SWIG_Python_TypeCache(void) { + static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New(); + return cache; +} + +SWIGRUNTIME swig_type_info * +SWIG_Python_TypeQuery(const char *type) +{ + PyObject *cache = SWIG_Python_TypeCache(); + PyObject *key = SWIG_Python_str_FromChar(type); + PyObject *obj = PyDict_GetItem(cache, key); + swig_type_info *descriptor; + if (obj) { + descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj); + } else { + swig_module_info *swig_module = SWIG_Python_GetModule(); + descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type); + if (descriptor) { + obj = PyCObject_FromVoidPtr(descriptor, NULL); + PyDict_SetItem(cache, key, obj); + Py_DECREF(obj); + } + } + Py_DECREF(key); + return descriptor; +} + +/* + For backward compatibility only +*/ +#define SWIG_POINTER_EXCEPTION 0 +#define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg) +#define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags) + +SWIGRUNTIME int +SWIG_Python_AddErrMesg(const char* mesg, int infront) +{ + if (PyErr_Occurred()) { + PyObject *type = 0; + PyObject *value = 0; + PyObject *traceback = 0; + PyErr_Fetch(&type, &value, &traceback); + if (value) { + PyObject *old_str = PyObject_Str(value); + Py_XINCREF(type); + PyErr_Clear(); + if (infront) { + PyErr_Format(type, "%s %s", mesg, SWIG_Python_str_AsChar(old_str)); + } else { + PyErr_Format(type, "%s %s", SWIG_Python_str_AsChar(old_str), mesg); + } + Py_DECREF(old_str); + } + return 1; + } else { + return 0; + } +} + +SWIGRUNTIME int +SWIG_Python_ArgFail(int argnum) +{ + if (PyErr_Occurred()) { + /* add information about failing argument */ + char mesg[256]; + PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum); + return SWIG_Python_AddErrMesg(mesg, 1); + } else { + return 0; + } +} + +SWIGRUNTIMEINLINE const char * +SwigPyObject_GetDesc(PyObject *self) +{ + SwigPyObject *v = (SwigPyObject *)self; + swig_type_info *ty = v ? v->ty : 0; + return ty ? ty->str : (char*)""; +} + +SWIGRUNTIME void +SWIG_Python_TypeError(const char *type, PyObject *obj) +{ + if (type) { +#if defined(SWIG_COBJECT_TYPES) + if (obj && SwigPyObject_Check(obj)) { + const char *otype = (const char *) SwigPyObject_GetDesc(obj); + if (otype) { + PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received", + type, otype); + return; + } + } else +#endif + { + const char *otype = (obj ? obj->ob_type->tp_name : 0); + if (otype) { + PyObject *str = PyObject_Str(obj); + const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0; + if (cstr) { + PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received", + type, otype, cstr); + } else { + PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received", + type, otype); + } + Py_XDECREF(str); + return; + } + } + PyErr_Format(PyExc_TypeError, "a '%s' is expected", type); + } else { + PyErr_Format(PyExc_TypeError, "unexpected type is received"); + } +} + + +/* Convert a pointer value, signal an exception on a type mismatch */ +SWIGRUNTIME void * +SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags) { + void *result; + if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) { + PyErr_Clear(); + if (flags & SWIG_POINTER_EXCEPTION) { + SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj); + SWIG_Python_ArgFail(argnum); + } + } + return result; +} + + +#ifdef __cplusplus +#if 0 +{ /* cc-mode */ +#endif +} +#endif @@ -2680,513 +2643,516 @@ SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags) #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else -/* ----------------------------------------------------------------------------- - * See the LICENSE file for information on copyright, usage and redistribution - * of SWIG, and the README file for authors - http://www.swig.org/release.html. - * - * director.swg - * - * This file contains support for director classes that proxy - * method calls from C++ to Python extensions. - * ----------------------------------------------------------------------------- */ - -#ifndef SWIG_DIRECTOR_PYTHON_HEADER_ -#define SWIG_DIRECTOR_PYTHON_HEADER_ - -#ifdef __cplusplus - -#include -#include -#include -#include -#include - - -/* - Use -DSWIG_PYTHON_DIRECTOR_NO_VTABLE if you don't want to generate a 'virtual - table', and avoid multiple GetAttr calls to retrieve the python - methods. -*/ - -#ifndef SWIG_PYTHON_DIRECTOR_NO_VTABLE -#ifndef SWIG_PYTHON_DIRECTOR_VTABLE -#define SWIG_PYTHON_DIRECTOR_VTABLE -#endif -#endif - - - -/* - Use -DSWIG_DIRECTOR_NO_UEH if you prefer to avoid the use of the - Undefined Exception Handler provided by swift -*/ -#ifndef SWIG_DIRECTOR_NO_UEH -#ifndef SWIG_DIRECTOR_UEH -#define SWIG_DIRECTOR_UEH -#endif -#endif - - -/* - Use -DSWIG_DIRECTOR_STATIC if you prefer to avoid the use of the - 'Swig' namespace. This could be useful for multi-modules projects. -*/ -#ifdef SWIG_DIRECTOR_STATIC -/* Force anonymous (static) namespace */ -#define Swig -#endif - - -/* - Use -DSWIG_DIRECTOR_NORTTI if you prefer to avoid the use of the - native C++ RTTI and dynamic_cast<>. But be aware that directors - could stop working when using this option. -*/ -#ifdef SWIG_DIRECTOR_NORTTI -/* - When we don't use the native C++ RTTI, we implement a minimal one - only for Directors. -*/ -# ifndef SWIG_DIRECTOR_RTDIR -# define SWIG_DIRECTOR_RTDIR -#include - -namespace Swig { - class Director; - SWIGINTERN std::map& get_rtdir_map() { - static std::map rtdir_map; - return rtdir_map; - } - - SWIGINTERNINLINE void set_rtdir(void *vptr, Director *rtdir) { - get_rtdir_map()[vptr] = rtdir; - } - - SWIGINTERNINLINE Director *get_rtdir(void *vptr) { - std::map::const_iterator pos = get_rtdir_map().find(vptr); - Director *rtdir = (pos != get_rtdir_map().end()) ? pos->second : 0; - return rtdir; - } -} -# endif /* SWIG_DIRECTOR_RTDIR */ - -# define SWIG_DIRECTOR_CAST(Arg) Swig::get_rtdir(static_cast(Arg)) -# define SWIG_DIRECTOR_RGTR(Arg1, Arg2) Swig::set_rtdir(static_cast(Arg1), Arg2) - -#else - -# define SWIG_DIRECTOR_CAST(Arg) dynamic_cast(Arg) -# define SWIG_DIRECTOR_RGTR(Arg1, Arg2) - -#endif /* SWIG_DIRECTOR_NORTTI */ - -extern "C" { - struct swig_type_info; -} - -namespace Swig { - - /* memory handler */ - struct GCItem - { - virtual ~GCItem() {} - - virtual int get_own() const - { - return 0; - } - }; - - struct GCItem_var - { - GCItem_var(GCItem *item = 0) : _item(item) - { - } - - GCItem_var& operator=(GCItem *item) - { - GCItem *tmp = _item; - _item = item; - delete tmp; - return *this; - } - - ~GCItem_var() - { - delete _item; - } - - GCItem * operator->() const - { - return _item; - } - - private: - GCItem *_item; - }; - - struct GCItem_Object : GCItem - { - GCItem_Object(int own) : _own(own) - { - } - - virtual ~GCItem_Object() - { - } - - int get_own() const - { - return _own; - } - - private: - int _own; - }; - - template - struct GCItem_T : GCItem - { - GCItem_T(Type *ptr) : _ptr(ptr) - { - } - - virtual ~GCItem_T() - { - delete _ptr; - } - - private: - Type *_ptr; - }; - - template - struct GCArray_T : GCItem - { - GCArray_T(Type *ptr) : _ptr(ptr) - { - } - - virtual ~GCArray_T() - { - delete[] _ptr; - } - - private: - Type *_ptr; - }; - - /* base class for director exceptions */ - class DirectorException { - protected: - std::string swig_msg; - public: - DirectorException(PyObject *error, const char* hdr ="", const char* msg ="") - : swig_msg(hdr) - { - SWIG_PYTHON_THREAD_BEGIN_BLOCK; - if (strlen(msg)) { - swig_msg += " "; - swig_msg += msg; - } - if (!PyErr_Occurred()) { - PyErr_SetString(error, getMessage()); - } - SWIG_PYTHON_THREAD_END_BLOCK; - } - - const char *getMessage() const - { - return swig_msg.c_str(); - } - - static void raise(PyObject *error, const char *msg) - { - throw DirectorException(error, msg); - } - - static void raise(const char *msg) - { - raise(PyExc_RuntimeError, msg); - } - }; - - /* unknown exception handler */ - class UnknownExceptionHandler - { -#ifdef SWIG_DIRECTOR_UEH - static void handler() { - try { - throw; - } catch (DirectorException& e) { - std::cerr << "Swig Director exception caught:" << std::endl - << e.getMessage() << std::endl; - } catch (std::exception& e) { - std::cerr << "std::exception caught: "<< e.what() << std::endl; - } catch (...) { - std::cerr << "Unknown exception caught." << std::endl; - } - - std::cerr << std::endl - << "Python interpreter traceback:" << std::endl; - PyErr_Print(); - std::cerr << std::endl; - - std::cerr << "This exception was caught by the SWIG unexpected exception handler." << std::endl - << "Try using %feature(\"director:except\") to avoid reaching this point." << std::endl - << std::endl - << "Exception is being re-thrown, program will like abort/terminate." << std::endl; - throw; - } - - public: - - std::unexpected_handler old; - UnknownExceptionHandler(std::unexpected_handler nh = handler) - { - old = std::set_unexpected(nh); - } - - ~UnknownExceptionHandler() - { - std::set_unexpected(old); - } -#endif - }; - - /* type mismatch in the return value from a python method call */ - class DirectorTypeMismatchException : public Swig::DirectorException { - public: - DirectorTypeMismatchException(PyObject *error, const char* msg="") - : Swig::DirectorException(error, "Swig director type mismatch", msg) - { - } - - DirectorTypeMismatchException(const char* msg="") - : Swig::DirectorException(PyExc_TypeError, "Swig director type mismatch", msg) - { - } - - static void raise(PyObject *error, const char *msg) - { - throw DirectorTypeMismatchException(error, msg); - } - - static void raise(const char *msg) - { - throw DirectorTypeMismatchException(msg); - } - }; - - /* any python exception that occurs during a director method call */ - class DirectorMethodException : public Swig::DirectorException { - public: - DirectorMethodException(const char* msg = "") - : DirectorException(PyExc_RuntimeError, "Swig director method error.", msg) - { - } - - static void raise(const char *msg) - { - throw DirectorMethodException(msg); - } - }; - - /* attempt to call a pure virtual method via a director method */ - class DirectorPureVirtualException : public Swig::DirectorException - { - public: - DirectorPureVirtualException(const char* msg = "") - : DirectorException(PyExc_RuntimeError, "Swig director pure virtual method called", msg) - { - } - - static void raise(const char *msg) - { - throw DirectorPureVirtualException(msg); - } - }; - - -#if defined(SWIG_PYTHON_THREADS) -/* __THREAD__ is the old macro to activate some thread support */ -# if !defined(__THREAD__) -# define __THREAD__ 1 -# endif -#endif - -#ifdef __THREAD__ -# include "pythread.h" - class Guard - { - PyThread_type_lock & mutex_; - - public: - Guard(PyThread_type_lock & mutex) : mutex_(mutex) - { - PyThread_acquire_lock(mutex_, WAIT_LOCK); - } - - ~Guard() - { - PyThread_release_lock(mutex_); - } - }; -# define SWIG_GUARD(mutex) Guard _guard(mutex) -#else -# define SWIG_GUARD(mutex) -#endif - - /* director base class */ - class Director { - private: - /* pointer to the wrapped python object */ - PyObject* swig_self; - /* flag indicating whether the object is owned by python or c++ */ - mutable bool swig_disown_flag; - - /* decrement the reference count of the wrapped python object */ - void swig_decref() const { - if (swig_disown_flag) { - SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_DECREF(swig_self); - SWIG_PYTHON_THREAD_END_BLOCK; - } - } - - public: - /* wrap a python object, optionally taking ownership */ - Director(PyObject* self) : swig_self(self), swig_disown_flag(false) { - swig_incref(); - } - - - /* discard our reference at destruction */ - virtual ~Director() { - swig_decref(); - } - - - /* return a pointer to the wrapped python object */ - PyObject *swig_get_self() const { - return swig_self; - } - - /* acquire ownership of the wrapped python object (the sense of "disown" - * is from python) */ - void swig_disown() const { - if (!swig_disown_flag) { - swig_disown_flag=true; - swig_incref(); - } - } - - /* increase the reference count of the wrapped python object */ - void swig_incref() const { - if (swig_disown_flag) { - Py_INCREF(swig_self); - } - } - - /* methods to implement pseudo protected director members */ - virtual bool swig_get_inner(const char* /* name */) const { - return true; - } - - virtual void swig_set_inner(const char* /* name */, bool /* val */) const { - } - - /* ownership management */ - private: - typedef std::map ownership_map; - mutable ownership_map owner; -#ifdef __THREAD__ - static PyThread_type_lock swig_mutex_own; -#endif - - public: - template - void swig_acquire_ownership_array(Type *vptr) const - { - if (vptr) { - SWIG_GUARD(swig_mutex_own); - owner[vptr] = new GCArray_T(vptr); - } - } - - template - void swig_acquire_ownership(Type *vptr) const - { - if (vptr) { - SWIG_GUARD(swig_mutex_own); - owner[vptr] = new GCItem_T(vptr); - } - } - - void swig_acquire_ownership_obj(void *vptr, int own) const - { - if (vptr && own) { - SWIG_GUARD(swig_mutex_own); - owner[vptr] = new GCItem_Object(own); - } - } - - int swig_release_ownership(void *vptr) const - { - int own = 0; - if (vptr) { - SWIG_GUARD(swig_mutex_own); - ownership_map::iterator iter = owner.find(vptr); - if (iter != owner.end()) { - own = iter->second->get_own(); - owner.erase(iter); - } - } - return own; - } - }; - -#ifdef __THREAD__ - PyThread_type_lock Director::swig_mutex_own = PyThread_allocate_lock(); -#endif -} - -#endif /* __cplusplus */ - - -#endif +/* ----------------------------------------------------------------------------- + * See the LICENSE file for information on copyright, usage and redistribution + * of SWIG, and the README file for authors - http://www.swig.org/release.html. + * + * director.swg + * + * This file contains support for director classes that proxy + * method calls from C++ to Python extensions. + * ----------------------------------------------------------------------------- */ + +#ifndef SWIG_DIRECTOR_PYTHON_HEADER_ +#define SWIG_DIRECTOR_PYTHON_HEADER_ + +#ifdef __cplusplus + +#include +#include +#include +#include +#include + + +/* + Use -DSWIG_PYTHON_DIRECTOR_NO_VTABLE if you don't want to generate a 'virtual + table', and avoid multiple GetAttr calls to retrieve the python + methods. +*/ + +#ifndef SWIG_PYTHON_DIRECTOR_NO_VTABLE +#ifndef SWIG_PYTHON_DIRECTOR_VTABLE +#define SWIG_PYTHON_DIRECTOR_VTABLE +#endif +#endif + + + +/* + Use -DSWIG_DIRECTOR_NO_UEH if you prefer to avoid the use of the + Undefined Exception Handler provided by swift +*/ +#ifndef SWIG_DIRECTOR_NO_UEH +#ifndef SWIG_DIRECTOR_UEH +#define SWIG_DIRECTOR_UEH +#endif +#endif + + +/* + Use -DSWIG_DIRECTOR_STATIC if you prefer to avoid the use of the + 'Swig' namespace. This could be usefull for multi-modules projects. +*/ +#ifdef SWIG_DIRECTOR_STATIC +/* Force anonymous (static) namespace */ +#define Swig +#endif + + +/* + Use -DSWIG_DIRECTOR_NORTTI if you prefer to avoid the use of the + native C++ RTTI and dynamic_cast<>. But be aware that directors + could stop working when using this option. +*/ +#ifdef SWIG_DIRECTOR_NORTTI +/* + When we don't use the native C++ RTTI, we implement a minimal one + only for Directors. +*/ +# ifndef SWIG_DIRECTOR_RTDIR +# define SWIG_DIRECTOR_RTDIR +#include + +namespace Swig { + class Director; + SWIGINTERN std::map& get_rtdir_map() { + static std::map rtdir_map; + return rtdir_map; + } + + SWIGINTERNINLINE void set_rtdir(void *vptr, Director *rtdir) { + get_rtdir_map()[vptr] = rtdir; + } + + SWIGINTERNINLINE Director *get_rtdir(void *vptr) { + std::map::const_iterator pos = get_rtdir_map().find(vptr); + Director *rtdir = (pos != get_rtdir_map().end()) ? pos->second : 0; + return rtdir; + } +} +# endif /* SWIG_DIRECTOR_RTDIR */ + +# define SWIG_DIRECTOR_CAST(Arg) Swig::get_rtdir(static_cast(Arg)) +# define SWIG_DIRECTOR_RGTR(Arg1, Arg2) Swig::set_rtdir(static_cast(Arg1), Arg2) + +#else + +# define SWIG_DIRECTOR_CAST(Arg) dynamic_cast(Arg) +# define SWIG_DIRECTOR_RGTR(Arg1, Arg2) + +#endif /* SWIG_DIRECTOR_NORTTI */ + +extern "C" { + struct swig_type_info; +} + +namespace Swig { + + /* memory handler */ + struct GCItem + { + virtual ~GCItem() {} + + virtual int get_own() const + { + return 0; + } + }; + + struct GCItem_var + { + GCItem_var(GCItem *item = 0) : _item(item) + { + } + + GCItem_var& operator=(GCItem *item) + { + GCItem *tmp = _item; + _item = item; + delete tmp; + return *this; + } + + ~GCItem_var() + { + delete _item; + } + + GCItem * operator->() const + { + return _item; + } + + private: + GCItem *_item; + }; + + struct GCItem_Object : GCItem + { + GCItem_Object(int own) : _own(own) + { + } + + virtual ~GCItem_Object() + { + } + + int get_own() const + { + return _own; + } + + private: + int _own; + }; + + template + struct GCItem_T : GCItem + { + GCItem_T(Type *ptr) : _ptr(ptr) + { + } + + virtual ~GCItem_T() + { + delete _ptr; + } + + private: + Type *_ptr; + }; + + template + struct GCArray_T : GCItem + { + GCArray_T(Type *ptr) : _ptr(ptr) + { + } + + virtual ~GCArray_T() + { + delete[] _ptr; + } + + private: + Type *_ptr; + }; + + /* base class for director exceptions */ + class DirectorException { + protected: + std::string swig_msg; + public: + DirectorException(PyObject *error, const char* hdr ="", const char* msg ="") + : swig_msg(hdr) + { + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + if (strlen(msg)) { + swig_msg += " "; + swig_msg += msg; + } + if (!PyErr_Occurred()) { + PyErr_SetString(error, getMessage()); + } + SWIG_PYTHON_THREAD_END_BLOCK; + } + + const char *getMessage() const + { + return swig_msg.c_str(); + } + + static void raise(PyObject *error, const char *msg) + { + throw DirectorException(error, msg); + } + + static void raise(const char *msg) + { + raise(PyExc_RuntimeError, msg); + } + }; + + /* unknown exception handler */ + class UnknownExceptionHandler + { +#ifdef SWIG_DIRECTOR_UEH + static void handler() { + try { + throw; + } catch (DirectorException& e) { + std::cerr << "Swig Director exception caught:" << std::endl + << e.getMessage() << std::endl; + } catch (std::exception& e) { + std::cerr << "std::exception caught: "<< e.what() << std::endl; + } catch (...) { + std::cerr << "Unknown exception caught." << std::endl; + } + + std::cerr << std::endl + << "Python interpreter traceback:" << std::endl; + PyErr_Print(); + std::cerr << std::endl; + + std::cerr << "This exception was caught by the SWIG unexpected exception handler." << std::endl + << "Try using %feature(\"director:except\") to avoid reaching this point." << std::endl + << std::endl + << "Exception is being re-thrown, program will like abort/terminate." << std::endl; + throw; + } + + public: + + std::unexpected_handler old; + UnknownExceptionHandler(std::unexpected_handler nh = handler) + { + old = std::set_unexpected(nh); + } + + ~UnknownExceptionHandler() + { + std::set_unexpected(old); + } +#endif + }; + + /* type mismatch in the return value from a python method call */ + class DirectorTypeMismatchException : public Swig::DirectorException { + public: + DirectorTypeMismatchException(PyObject *error, const char* msg="") + : Swig::DirectorException(error, "Swig director type mismatch", msg) + { + } + + DirectorTypeMismatchException(const char* msg="") + : Swig::DirectorException(PyExc_TypeError, "Swig director type mismatch", msg) + { + } + + static void raise(PyObject *error, const char *msg) + { + throw DirectorTypeMismatchException(error, msg); + } + + static void raise(const char *msg) + { + throw DirectorTypeMismatchException(msg); + } + }; + + /* any python exception that occurs during a director method call */ + class DirectorMethodException : public Swig::DirectorException { + public: + DirectorMethodException(const char* msg = "") + : DirectorException(PyExc_RuntimeError, "Swig director method error.", msg) + { + } + + static void raise(const char *msg) + { + throw DirectorMethodException(msg); + } + }; + + /* attempt to call a pure virtual method via a director method */ + class DirectorPureVirtualException : public Swig::DirectorException + { + public: + DirectorPureVirtualException(const char* msg = "") + : DirectorException(PyExc_RuntimeError, "Swig director pure virtual method called", msg) + { + } + + static void raise(const char *msg) + { + throw DirectorPureVirtualException(msg); + } + }; + + +#if defined(SWIG_PYTHON_THREADS) +/* __THREAD__ is the old macro to activate some thread support */ +# if !defined(__THREAD__) +# define __THREAD__ 1 +# endif +#endif + +#ifdef __THREAD__ +# include "pythread.h" + class Guard + { + PyThread_type_lock & mutex_; + + public: + Guard(PyThread_type_lock & mutex) : mutex_(mutex) + { + PyThread_acquire_lock(mutex_, WAIT_LOCK); + } + + ~Guard() + { + PyThread_release_lock(mutex_); + } + }; +# define SWIG_GUARD(mutex) Guard _guard(mutex) +#else +# define SWIG_GUARD(mutex) +#endif + + /* director base class */ + class Director { + private: + /* pointer to the wrapped python object */ + PyObject* swig_self; + /* flag indicating whether the object is owned by python or c++ */ + mutable bool swig_disown_flag; + + /* decrement the reference count of the wrapped python object */ + void swig_decref() const { + if (swig_disown_flag) { + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + Py_DECREF(swig_self); + SWIG_PYTHON_THREAD_END_BLOCK; + } + } + + public: + /* wrap a python object, optionally taking ownership */ + Director(PyObject* self) : swig_self(self), swig_disown_flag(false) { + swig_incref(); + } + + + /* discard our reference at destruction */ + virtual ~Director() { + swig_decref(); + } + + + /* return a pointer to the wrapped python object */ + PyObject *swig_get_self() const { + return swig_self; + } + + /* acquire ownership of the wrapped python object (the sense of "disown" + * is from python) */ + void swig_disown() const { + if (!swig_disown_flag) { + swig_disown_flag=true; + swig_incref(); + } + } + + /* increase the reference count of the wrapped python object */ + void swig_incref() const { + if (swig_disown_flag) { + Py_INCREF(swig_self); + } + } + + /* methods to implement pseudo protected director members */ + virtual bool swig_get_inner(const char* /* name */) const { + return true; + } + + virtual void swig_set_inner(const char* /* name */, bool /* val */) const { + } + + /* ownership management */ + private: + typedef std::map ownership_map; + mutable ownership_map owner; +#ifdef __THREAD__ + static PyThread_type_lock swig_mutex_own; +#endif + + public: + template + void swig_acquire_ownership_array(Type *vptr) const + { + if (vptr) { + SWIG_GUARD(swig_mutex_own); + owner[vptr] = new GCArray_T(vptr); + } + } + + template + void swig_acquire_ownership(Type *vptr) const + { + if (vptr) { + SWIG_GUARD(swig_mutex_own); + owner[vptr] = new GCItem_T(vptr); + } + } + + void swig_acquire_ownership_obj(void *vptr, int own) const + { + if (vptr && own) { + SWIG_GUARD(swig_mutex_own); + owner[vptr] = new GCItem_Object(own); + } + } + + int swig_release_ownership(void *vptr) const + { + int own = 0; + if (vptr) { + SWIG_GUARD(swig_mutex_own); + ownership_map::iterator iter = owner.find(vptr); + if (iter != owner.end()) { + own = iter->second->get_own(); + owner.erase(iter); + } + } + return own; + } + }; + +#ifdef __THREAD__ + PyThread_type_lock Director::swig_mutex_own = PyThread_allocate_lock(); +#endif +} + +#endif /* __cplusplus */ + + +#endif /* -------- TYPES TABLE (BEGIN) -------- */ -#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_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 SWIGTYPE_p_CallSession swig_types[0] +#define SWIGTYPE_p_DDebugCallback swig_types[1] +#define SWIGTYPE_p_DialogEvent swig_types[2] +#define SWIGTYPE_p_MessagingEvent swig_types[3] +#define SWIGTYPE_p_MessagingSession swig_types[4] +#define SWIGTYPE_p_OptionsEvent swig_types[5] +#define SWIGTYPE_p_OptionsSession swig_types[6] +#define SWIGTYPE_p_ProxyAudioConsumer swig_types[7] +#define SWIGTYPE_p_ProxyAudioProducer swig_types[8] +#define SWIGTYPE_p_PublicationEvent swig_types[9] +#define SWIGTYPE_p_PublicationSession swig_types[10] +#define SWIGTYPE_p_RegistrationEvent swig_types[11] +#define SWIGTYPE_p_RegistrationSession swig_types[12] +#define SWIGTYPE_p_SafeObject swig_types[13] +#define SWIGTYPE_p_SipCallback swig_types[14] +#define SWIGTYPE_p_SipEvent swig_types[15] +#define SWIGTYPE_p_SipMessage swig_types[16] +#define SWIGTYPE_p_SipSession swig_types[17] +#define SWIGTYPE_p_SipStack swig_types[18] +#define SWIGTYPE_p_SipUri swig_types[19] +#define SWIGTYPE_p_StackEvent swig_types[20] +#define SWIGTYPE_p_SubscriptionEvent swig_types[21] +#define SWIGTYPE_p_SubscriptionSession swig_types[22] +#define SWIGTYPE_p_char swig_types[23] +#define SWIGTYPE_p_tsip_event_type_e swig_types[24] +#define SWIGTYPE_p_tsip_message_event_type_e swig_types[25] +#define SWIGTYPE_p_tsip_options_event_type_e swig_types[26] +#define SWIGTYPE_p_tsip_publish_event_type_e swig_types[27] +#define SWIGTYPE_p_tsip_register_event_type_e swig_types[28] +#define SWIGTYPE_p_tsip_subscribe_event_type_e swig_types[29] +static swig_type_info *swig_types[31]; +static swig_module_info swig_module = {swig_types, 30, 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) @@ -3210,7 +3176,7 @@ static swig_module_info swig_module = {swig_types, 27, 0, 0, 0, 0}; #endif #define SWIG_name "_tinyWRAP" -#define SWIGVERSION 0x010340 +#define SWIGVERSION 0x010339 #define SWIG_VERSION SWIGVERSION @@ -3303,27 +3269,19 @@ SWIGINTERN int SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) { #if PY_VERSION_HEX>=0x03000000 - if (PyUnicode_Check(obj)) + if (PyUnicode_Check(obj)) #else - if (PyString_Check(obj)) + if (PyString_Check(obj)) #endif { char *cstr; Py_ssize_t len; #if PY_VERSION_HEX>=0x03000000 - if (!alloc && cptr) { - /* We can't allow converting without allocation, since the internal - representation of string in Python 3 is UCS-2/UCS-4 but we require - a UTF-8 representation. - TODO(bhy) More detailed explanation */ - return SWIG_RuntimeError; - } obj = PyUnicode_AsUTF8String(obj); PyBytes_AsStringAndSize(obj, &cstr, &len); - if(alloc) *alloc = SWIG_NEWOBJ; #else PyString_AsStringAndSize(obj, &cstr, &len); #endif - if (cptr) { + if (cptr) { if (alloc) { /* In python the user should not be able to modify the inner @@ -3348,16 +3306,10 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) *alloc = SWIG_OLDOBJ; } } else { - #if PY_VERSION_HEX>=0x03000000 - assert(0); /* Should never reach here in Python 3 */ - #endif *cptr = SWIG_Python_str_AsChar(obj); } } if (psize) *psize = len + 1; -#if PY_VERSION_HEX>=0x03000000 - Py_XDECREF(obj); -#endif return SWIG_OK; } else { swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); @@ -3393,6 +3345,9 @@ SWIG_From_int (int value) #include "SipEvent.h" #include "SipSession.h" +#include "ProxyConsumer.h" +#include "ProxyProducer.h" + #include "SipCallback.h" #include "SafeObject.h" #include "SipStack.h" @@ -3678,6 +3633,270 @@ SWIG_AsVal_int (PyObject * obj, int *val) #include "tinyWRAP_wrap.h" +SwigDirector_ProxyAudioConsumer::SwigDirector_ProxyAudioConsumer(PyObject *self): ProxyAudioConsumer(), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((ProxyAudioConsumer *)this, this); +} + + + + +SwigDirector_ProxyAudioConsumer::~SwigDirector_ProxyAudioConsumer() { +} + +int SwigDirector_ProxyAudioConsumer::prepare(int ptime, int rate, int channels) { + int c_result; + swig::SwigVar_PyObject obj0; + obj0 = SWIG_From_int(static_cast< int >(ptime)); + swig::SwigVar_PyObject obj1; + obj1 = SWIG_From_int(static_cast< int >(rate)); + swig::SwigVar_PyObject obj2; + obj2 = SWIG_From_int(static_cast< int >(channels)); + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call ProxyAudioConsumer.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 0; + const char * const swig_method_name = "prepare"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::SwigVar_PyObject result = PyObject_CallFunction(method, (char *)"(OOO)" ,(PyObject *)obj0,(PyObject *)obj1,(PyObject *)obj2); +#else + swig::SwigVar_PyObject result = PyObject_CallMethod(swig_get_self(), (char *)"prepare", (char *)"(OOO)" ,(PyObject *)obj0,(PyObject *)obj1,(PyObject *)obj2); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'ProxyAudioConsumer.prepare'"); + } + } + 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_ProxyAudioConsumer::start() { + int c_result; + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call ProxyAudioConsumer.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 1; + const char * const swig_method_name = "start"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::SwigVar_PyObject result = PyObject_CallFunction(method, NULL, NULL); +#else + swig::SwigVar_PyObject result = PyObject_CallMethod(swig_get_self(), (char *) "start", NULL); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'ProxyAudioConsumer.start'"); + } + } + 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_ProxyAudioConsumer::pause() { + int c_result; + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call ProxyAudioConsumer.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 2; + const char * const swig_method_name = "pause"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::SwigVar_PyObject result = PyObject_CallFunction(method, NULL, NULL); +#else + swig::SwigVar_PyObject result = PyObject_CallMethod(swig_get_self(), (char *) "pause", NULL); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'ProxyAudioConsumer.pause'"); + } + } + 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_ProxyAudioConsumer::stop() { + int c_result; + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call ProxyAudioConsumer.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 3; + const char * const swig_method_name = "stop"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::SwigVar_PyObject result = PyObject_CallFunction(method, NULL, NULL); +#else + swig::SwigVar_PyObject result = PyObject_CallMethod(swig_get_self(), (char *) "stop", NULL); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'ProxyAudioConsumer.stop'"); + } + } + 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; +} + + +SwigDirector_ProxyAudioProducer::SwigDirector_ProxyAudioProducer(PyObject *self): ProxyAudioProducer(), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((ProxyAudioProducer *)this, this); +} + + + + +SwigDirector_ProxyAudioProducer::~SwigDirector_ProxyAudioProducer() { +} + +int SwigDirector_ProxyAudioProducer::prepare(int ptime, int rate, int channels) { + int c_result; + swig::SwigVar_PyObject obj0; + obj0 = SWIG_From_int(static_cast< int >(ptime)); + swig::SwigVar_PyObject obj1; + obj1 = SWIG_From_int(static_cast< int >(rate)); + swig::SwigVar_PyObject obj2; + obj2 = SWIG_From_int(static_cast< int >(channels)); + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call ProxyAudioProducer.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 0; + const char * const swig_method_name = "prepare"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::SwigVar_PyObject result = PyObject_CallFunction(method, (char *)"(OOO)" ,(PyObject *)obj0,(PyObject *)obj1,(PyObject *)obj2); +#else + swig::SwigVar_PyObject result = PyObject_CallMethod(swig_get_self(), (char *)"prepare", (char *)"(OOO)" ,(PyObject *)obj0,(PyObject *)obj1,(PyObject *)obj2); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'ProxyAudioProducer.prepare'"); + } + } + 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_ProxyAudioProducer::start() { + int c_result; + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call ProxyAudioProducer.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 1; + const char * const swig_method_name = "start"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::SwigVar_PyObject result = PyObject_CallFunction(method, NULL, NULL); +#else + swig::SwigVar_PyObject result = PyObject_CallMethod(swig_get_self(), (char *) "start", NULL); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'ProxyAudioProducer.start'"); + } + } + 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_ProxyAudioProducer::pause() { + int c_result; + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call ProxyAudioProducer.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 2; + const char * const swig_method_name = "pause"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::SwigVar_PyObject result = PyObject_CallFunction(method, NULL, NULL); +#else + swig::SwigVar_PyObject result = PyObject_CallMethod(swig_get_self(), (char *) "pause", NULL); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'ProxyAudioProducer.pause'"); + } + } + 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_ProxyAudioProducer::stop() { + int c_result; + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call ProxyAudioProducer.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 3; + const char * const swig_method_name = "stop"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::SwigVar_PyObject result = PyObject_CallFunction(method, NULL, NULL); +#else + swig::SwigVar_PyObject result = PyObject_CallMethod(swig_get_self(), (char *) "stop", NULL); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'ProxyAudioProducer.stop'"); + } + } + 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; +} + + SwigDirector_SipCallback::SwigDirector_SipCallback(PyObject *self): SipCallback(), Swig::Director(self) { SWIG_DIRECTOR_RGTR((SipCallback *)this, this); } @@ -5639,6 +5858,112 @@ SWIGINTERN PyObject *SipSession_swigregister(PyObject *SWIGUNUSEDPARM(self), PyO return SWIG_Py_Void(); } +SWIGINTERN PyObject *_wrap_new_CallSession(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SipStack *arg1 = (SipStack *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + CallSession *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_CallSession",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SipStack, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CallSession" "', argument " "1"" of type '" "SipStack *""'"); + } + arg1 = reinterpret_cast< SipStack * >(argp1); + result = (CallSession *)new CallSession(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CallSession, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_CallSession(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CallSession *arg1 = (CallSession *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_CallSession",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CallSession, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CallSession" "', argument " "1"" of type '" "CallSession *""'"); + } + arg1 = reinterpret_cast< CallSession * >(argp1); + delete arg1; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CallSession_Call(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CallSession *arg1 = (CallSession *) 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 ; + bool result; + + if (!PyArg_ParseTuple(args,(char *)"OO:CallSession_Call",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CallSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CallSession_Call" "', argument " "1"" of type '" "CallSession *""'"); + } + arg1 = reinterpret_cast< CallSession * >(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CallSession_Call" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + result = (bool)(arg1)->Call((char const *)arg2); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CallSession_Hangup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CallSession *arg1 = (CallSession *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + bool result; + + if (!PyArg_ParseTuple(args,(char *)"O:CallSession_Hangup",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CallSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CallSession_Hangup" "', argument " "1"" of type '" "CallSession *""'"); + } + arg1 = reinterpret_cast< CallSession * >(argp1); + result = (bool)(arg1)->Hangup(); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *CallSession_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_CallSession, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + SWIGINTERN PyObject *_wrap_new_MessagingSession(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; SipStack *arg1 = (SipStack *) 0 ; @@ -6141,6 +6466,626 @@ SWIGINTERN PyObject *SubscriptionSession_swigregister(PyObject *SWIGUNUSEDPARM(s return SWIG_Py_Void(); } +SWIGINTERN PyObject *_wrap_new_ProxyAudioConsumer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + PyObject *arg1 = (PyObject *) 0 ; + PyObject * obj0 = 0 ; + ProxyAudioConsumer *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_ProxyAudioConsumer",&obj0)) SWIG_fail; + arg1 = obj0; + if ( arg1 != Py_None ) { + /* subclassed */ + result = (ProxyAudioConsumer *)new SwigDirector_ProxyAudioConsumer(arg1); + } else { + result = (ProxyAudioConsumer *)new ProxyAudioConsumer(); + } + + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ProxyAudioConsumer, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_ProxyAudioConsumer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ProxyAudioConsumer *arg1 = (ProxyAudioConsumer *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_ProxyAudioConsumer",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ProxyAudioConsumer, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ProxyAudioConsumer" "', argument " "1"" of type '" "ProxyAudioConsumer *""'"); + } + arg1 = reinterpret_cast< ProxyAudioConsumer * >(argp1); + delete arg1; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ProxyAudioConsumer_prepare(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ProxyAudioConsumer *arg1 = (ProxyAudioConsumer *) 0 ; + int arg2 ; + int arg3 ; + int arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + int val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + Swig::Director *director = 0; + bool upcall = false; + int result; + + if (!PyArg_ParseTuple(args,(char *)"OOOO:ProxyAudioConsumer_prepare",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ProxyAudioConsumer, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProxyAudioConsumer_prepare" "', argument " "1"" of type '" "ProxyAudioConsumer *""'"); + } + arg1 = reinterpret_cast< ProxyAudioConsumer * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ProxyAudioConsumer_prepare" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ProxyAudioConsumer_prepare" "', argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + ecode4 = SWIG_AsVal_int(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "ProxyAudioConsumer_prepare" "', argument " "4"" of type '" "int""'"); + } + arg4 = static_cast< int >(val4); + director = SWIG_DIRECTOR_CAST(arg1); + upcall = (director && (director->swig_get_self()==obj0)); + try { + if (upcall) { + result = (int)(arg1)->ProxyAudioConsumer::prepare(arg2,arg3,arg4); + } else { + result = (int)(arg1)->prepare(arg2,arg3,arg4); + } + } catch (Swig::DirectorException&) { + SWIG_fail; + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ProxyAudioConsumer_start(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ProxyAudioConsumer *arg1 = (ProxyAudioConsumer *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + Swig::Director *director = 0; + bool upcall = false; + int result; + + if (!PyArg_ParseTuple(args,(char *)"O:ProxyAudioConsumer_start",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ProxyAudioConsumer, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProxyAudioConsumer_start" "', argument " "1"" of type '" "ProxyAudioConsumer *""'"); + } + arg1 = reinterpret_cast< ProxyAudioConsumer * >(argp1); + director = SWIG_DIRECTOR_CAST(arg1); + upcall = (director && (director->swig_get_self()==obj0)); + try { + if (upcall) { + result = (int)(arg1)->ProxyAudioConsumer::start(); + } else { + result = (int)(arg1)->start(); + } + } catch (Swig::DirectorException&) { + SWIG_fail; + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ProxyAudioConsumer_pause(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ProxyAudioConsumer *arg1 = (ProxyAudioConsumer *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + Swig::Director *director = 0; + bool upcall = false; + int result; + + if (!PyArg_ParseTuple(args,(char *)"O:ProxyAudioConsumer_pause",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ProxyAudioConsumer, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProxyAudioConsumer_pause" "', argument " "1"" of type '" "ProxyAudioConsumer *""'"); + } + arg1 = reinterpret_cast< ProxyAudioConsumer * >(argp1); + director = SWIG_DIRECTOR_CAST(arg1); + upcall = (director && (director->swig_get_self()==obj0)); + try { + if (upcall) { + result = (int)(arg1)->ProxyAudioConsumer::pause(); + } else { + result = (int)(arg1)->pause(); + } + } catch (Swig::DirectorException&) { + SWIG_fail; + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ProxyAudioConsumer_stop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ProxyAudioConsumer *arg1 = (ProxyAudioConsumer *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + Swig::Director *director = 0; + bool upcall = false; + int result; + + if (!PyArg_ParseTuple(args,(char *)"O:ProxyAudioConsumer_stop",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ProxyAudioConsumer, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProxyAudioConsumer_stop" "', argument " "1"" of type '" "ProxyAudioConsumer *""'"); + } + arg1 = reinterpret_cast< ProxyAudioConsumer * >(argp1); + director = SWIG_DIRECTOR_CAST(arg1); + upcall = (director && (director->swig_get_self()==obj0)); + try { + if (upcall) { + result = (int)(arg1)->ProxyAudioConsumer::stop(); + } else { + result = (int)(arg1)->stop(); + } + } catch (Swig::DirectorException&) { + SWIG_fail; + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ProxyAudioConsumer_setActivate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ProxyAudioConsumer *arg1 = (ProxyAudioConsumer *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ProxyAudioConsumer_setActivate",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ProxyAudioConsumer, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProxyAudioConsumer_setActivate" "', argument " "1"" of type '" "ProxyAudioConsumer *""'"); + } + arg1 = reinterpret_cast< ProxyAudioConsumer * >(argp1); + (arg1)->setActivate(); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ProxyAudioConsumer_pull(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ProxyAudioConsumer *arg1 = (ProxyAudioConsumer *) 0 ; + void *arg2 = (void *) 0 ; + unsigned int arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + unsigned int val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + unsigned int result; + + if (!PyArg_ParseTuple(args,(char *)"OOO:ProxyAudioConsumer_pull",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ProxyAudioConsumer, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProxyAudioConsumer_pull" "', argument " "1"" of type '" "ProxyAudioConsumer *""'"); + } + arg1 = reinterpret_cast< ProxyAudioConsumer * >(argp1); + res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ProxyAudioConsumer_pull" "', argument " "2"" of type '" "void *""'"); + } + ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ProxyAudioConsumer_pull" "', argument " "3"" of type '" "unsigned int""'"); + } + arg3 = static_cast< unsigned int >(val3); + result = (unsigned int)(arg1)->pull(arg2,arg3); + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ProxyAudioConsumer_registerPlugin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + bool result; + + if (!PyArg_ParseTuple(args,(char *)":ProxyAudioConsumer_registerPlugin")) SWIG_fail; + result = (bool)ProxyAudioConsumer::registerPlugin(); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_disown_ProxyAudioConsumer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ProxyAudioConsumer *arg1 = (ProxyAudioConsumer *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:disown_ProxyAudioConsumer",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ProxyAudioConsumer, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_ProxyAudioConsumer" "', argument " "1"" of type '" "ProxyAudioConsumer *""'"); + } + arg1 = reinterpret_cast< ProxyAudioConsumer * >(argp1); + { + Swig::Director *director = SWIG_DIRECTOR_CAST(arg1); + if (director) director->swig_disown(); + } + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *ProxyAudioConsumer_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_ProxyAudioConsumer, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_ProxyAudioProducer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + PyObject *arg1 = (PyObject *) 0 ; + PyObject * obj0 = 0 ; + ProxyAudioProducer *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_ProxyAudioProducer",&obj0)) SWIG_fail; + arg1 = obj0; + if ( arg1 != Py_None ) { + /* subclassed */ + result = (ProxyAudioProducer *)new SwigDirector_ProxyAudioProducer(arg1); + } else { + result = (ProxyAudioProducer *)new ProxyAudioProducer(); + } + + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ProxyAudioProducer, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_ProxyAudioProducer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ProxyAudioProducer *arg1 = (ProxyAudioProducer *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_ProxyAudioProducer",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ProxyAudioProducer, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ProxyAudioProducer" "', argument " "1"" of type '" "ProxyAudioProducer *""'"); + } + arg1 = reinterpret_cast< ProxyAudioProducer * >(argp1); + delete arg1; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ProxyAudioProducer_prepare(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ProxyAudioProducer *arg1 = (ProxyAudioProducer *) 0 ; + int arg2 ; + int arg3 ; + int arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + int val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + Swig::Director *director = 0; + bool upcall = false; + int result; + + if (!PyArg_ParseTuple(args,(char *)"OOOO:ProxyAudioProducer_prepare",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ProxyAudioProducer, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProxyAudioProducer_prepare" "', argument " "1"" of type '" "ProxyAudioProducer *""'"); + } + arg1 = reinterpret_cast< ProxyAudioProducer * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ProxyAudioProducer_prepare" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ProxyAudioProducer_prepare" "', argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + ecode4 = SWIG_AsVal_int(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "ProxyAudioProducer_prepare" "', argument " "4"" of type '" "int""'"); + } + arg4 = static_cast< int >(val4); + director = SWIG_DIRECTOR_CAST(arg1); + upcall = (director && (director->swig_get_self()==obj0)); + try { + if (upcall) { + result = (int)(arg1)->ProxyAudioProducer::prepare(arg2,arg3,arg4); + } else { + result = (int)(arg1)->prepare(arg2,arg3,arg4); + } + } catch (Swig::DirectorException&) { + SWIG_fail; + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ProxyAudioProducer_start(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ProxyAudioProducer *arg1 = (ProxyAudioProducer *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + Swig::Director *director = 0; + bool upcall = false; + int result; + + if (!PyArg_ParseTuple(args,(char *)"O:ProxyAudioProducer_start",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ProxyAudioProducer, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProxyAudioProducer_start" "', argument " "1"" of type '" "ProxyAudioProducer *""'"); + } + arg1 = reinterpret_cast< ProxyAudioProducer * >(argp1); + director = SWIG_DIRECTOR_CAST(arg1); + upcall = (director && (director->swig_get_self()==obj0)); + try { + if (upcall) { + result = (int)(arg1)->ProxyAudioProducer::start(); + } else { + result = (int)(arg1)->start(); + } + } catch (Swig::DirectorException&) { + SWIG_fail; + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ProxyAudioProducer_pause(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ProxyAudioProducer *arg1 = (ProxyAudioProducer *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + Swig::Director *director = 0; + bool upcall = false; + int result; + + if (!PyArg_ParseTuple(args,(char *)"O:ProxyAudioProducer_pause",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ProxyAudioProducer, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProxyAudioProducer_pause" "', argument " "1"" of type '" "ProxyAudioProducer *""'"); + } + arg1 = reinterpret_cast< ProxyAudioProducer * >(argp1); + director = SWIG_DIRECTOR_CAST(arg1); + upcall = (director && (director->swig_get_self()==obj0)); + try { + if (upcall) { + result = (int)(arg1)->ProxyAudioProducer::pause(); + } else { + result = (int)(arg1)->pause(); + } + } catch (Swig::DirectorException&) { + SWIG_fail; + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ProxyAudioProducer_stop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ProxyAudioProducer *arg1 = (ProxyAudioProducer *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + Swig::Director *director = 0; + bool upcall = false; + int result; + + if (!PyArg_ParseTuple(args,(char *)"O:ProxyAudioProducer_stop",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ProxyAudioProducer, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProxyAudioProducer_stop" "', argument " "1"" of type '" "ProxyAudioProducer *""'"); + } + arg1 = reinterpret_cast< ProxyAudioProducer * >(argp1); + director = SWIG_DIRECTOR_CAST(arg1); + upcall = (director && (director->swig_get_self()==obj0)); + try { + if (upcall) { + result = (int)(arg1)->ProxyAudioProducer::stop(); + } else { + result = (int)(arg1)->stop(); + } + } catch (Swig::DirectorException&) { + SWIG_fail; + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ProxyAudioProducer_setActivate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ProxyAudioProducer *arg1 = (ProxyAudioProducer *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ProxyAudioProducer_setActivate",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ProxyAudioProducer, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProxyAudioProducer_setActivate" "', argument " "1"" of type '" "ProxyAudioProducer *""'"); + } + arg1 = reinterpret_cast< ProxyAudioProducer * >(argp1); + (arg1)->setActivate(); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ProxyAudioProducer_push(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ProxyAudioProducer *arg1 = (ProxyAudioProducer *) 0 ; + void *arg2 = (void *) 0 ; + unsigned int arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + unsigned int val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + int result; + + if (!PyArg_ParseTuple(args,(char *)"OOO:ProxyAudioProducer_push",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ProxyAudioProducer, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProxyAudioProducer_push" "', argument " "1"" of type '" "ProxyAudioProducer *""'"); + } + arg1 = reinterpret_cast< ProxyAudioProducer * >(argp1); + res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ProxyAudioProducer_push" "', argument " "2"" of type '" "void const *""'"); + } + ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ProxyAudioProducer_push" "', argument " "3"" of type '" "unsigned int""'"); + } + arg3 = static_cast< unsigned int >(val3); + result = (int)(arg1)->push((void const *)arg2,arg3); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ProxyAudioProducer_registerPlugin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + bool result; + + if (!PyArg_ParseTuple(args,(char *)":ProxyAudioProducer_registerPlugin")) SWIG_fail; + result = (bool)ProxyAudioProducer::registerPlugin(); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_disown_ProxyAudioProducer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ProxyAudioProducer *arg1 = (ProxyAudioProducer *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:disown_ProxyAudioProducer",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ProxyAudioProducer, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_ProxyAudioProducer" "', argument " "1"" of type '" "ProxyAudioProducer *""'"); + } + arg1 = reinterpret_cast< ProxyAudioProducer * >(argp1); + { + Swig::Director *director = SWIG_DIRECTOR_CAST(arg1); + if (director) director->swig_disown(); + } + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *ProxyAudioProducer_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_ProxyAudioProducer, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + SWIGINTERN PyObject *_wrap_new_SipCallback(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; PyObject *arg1 = (PyObject *) 0 ; @@ -6499,7 +7444,7 @@ SWIGINTERN PyObject *_wrap_disown_SipCallback(PyObject *SWIGUNUSEDPARM(self), Py } arg1 = reinterpret_cast< SipCallback * >(argp1); { - Swig::Director *director = dynamic_cast(arg1); + Swig::Director *director = SWIG_DIRECTOR_CAST(arg1); if (director) director->swig_disown(); } @@ -7305,6 +8250,11 @@ static PyMethodDef SwigMethods[] = { { (char *)"SipSession_setSilentHangup", _wrap_SipSession_setSilentHangup, METH_VARARGS, NULL}, { (char *)"SipSession_getId", _wrap_SipSession_getId, METH_VARARGS, NULL}, { (char *)"SipSession_swigregister", SipSession_swigregister, METH_VARARGS, NULL}, + { (char *)"new_CallSession", _wrap_new_CallSession, METH_VARARGS, NULL}, + { (char *)"delete_CallSession", _wrap_delete_CallSession, METH_VARARGS, NULL}, + { (char *)"CallSession_Call", _wrap_CallSession_Call, METH_VARARGS, NULL}, + { (char *)"CallSession_Hangup", _wrap_CallSession_Hangup, METH_VARARGS, NULL}, + { (char *)"CallSession_swigregister", CallSession_swigregister, METH_VARARGS, NULL}, { (char *)"new_MessagingSession", _wrap_new_MessagingSession, METH_VARARGS, NULL}, { (char *)"delete_MessagingSession", _wrap_delete_MessagingSession, METH_VARARGS, NULL}, { (char *)"MessagingSession_Send", _wrap_MessagingSession_Send, METH_VARARGS, NULL}, @@ -7330,6 +8280,28 @@ static PyMethodDef SwigMethods[] = { { (char *)"SubscriptionSession_Subscribe", _wrap_SubscriptionSession_Subscribe, METH_VARARGS, NULL}, { (char *)"SubscriptionSession_UnSubscribe", _wrap_SubscriptionSession_UnSubscribe, METH_VARARGS, NULL}, { (char *)"SubscriptionSession_swigregister", SubscriptionSession_swigregister, METH_VARARGS, NULL}, + { (char *)"new_ProxyAudioConsumer", _wrap_new_ProxyAudioConsumer, METH_VARARGS, NULL}, + { (char *)"delete_ProxyAudioConsumer", _wrap_delete_ProxyAudioConsumer, METH_VARARGS, NULL}, + { (char *)"ProxyAudioConsumer_prepare", _wrap_ProxyAudioConsumer_prepare, METH_VARARGS, NULL}, + { (char *)"ProxyAudioConsumer_start", _wrap_ProxyAudioConsumer_start, METH_VARARGS, NULL}, + { (char *)"ProxyAudioConsumer_pause", _wrap_ProxyAudioConsumer_pause, METH_VARARGS, NULL}, + { (char *)"ProxyAudioConsumer_stop", _wrap_ProxyAudioConsumer_stop, METH_VARARGS, NULL}, + { (char *)"ProxyAudioConsumer_setActivate", _wrap_ProxyAudioConsumer_setActivate, METH_VARARGS, NULL}, + { (char *)"ProxyAudioConsumer_pull", _wrap_ProxyAudioConsumer_pull, METH_VARARGS, NULL}, + { (char *)"ProxyAudioConsumer_registerPlugin", _wrap_ProxyAudioConsumer_registerPlugin, METH_VARARGS, NULL}, + { (char *)"disown_ProxyAudioConsumer", _wrap_disown_ProxyAudioConsumer, METH_VARARGS, NULL}, + { (char *)"ProxyAudioConsumer_swigregister", ProxyAudioConsumer_swigregister, METH_VARARGS, NULL}, + { (char *)"new_ProxyAudioProducer", _wrap_new_ProxyAudioProducer, METH_VARARGS, NULL}, + { (char *)"delete_ProxyAudioProducer", _wrap_delete_ProxyAudioProducer, METH_VARARGS, NULL}, + { (char *)"ProxyAudioProducer_prepare", _wrap_ProxyAudioProducer_prepare, METH_VARARGS, NULL}, + { (char *)"ProxyAudioProducer_start", _wrap_ProxyAudioProducer_start, METH_VARARGS, NULL}, + { (char *)"ProxyAudioProducer_pause", _wrap_ProxyAudioProducer_pause, METH_VARARGS, NULL}, + { (char *)"ProxyAudioProducer_stop", _wrap_ProxyAudioProducer_stop, METH_VARARGS, NULL}, + { (char *)"ProxyAudioProducer_setActivate", _wrap_ProxyAudioProducer_setActivate, METH_VARARGS, NULL}, + { (char *)"ProxyAudioProducer_push", _wrap_ProxyAudioProducer_push, METH_VARARGS, NULL}, + { (char *)"ProxyAudioProducer_registerPlugin", _wrap_ProxyAudioProducer_registerPlugin, METH_VARARGS, NULL}, + { (char *)"disown_ProxyAudioProducer", _wrap_disown_ProxyAudioProducer, METH_VARARGS, NULL}, + { (char *)"ProxyAudioProducer_swigregister", ProxyAudioProducer_swigregister, METH_VARARGS, NULL}, { (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}, @@ -7371,6 +8343,9 @@ static PyMethodDef SwigMethods[] = { /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ +static void *_p_CallSessionTo_p_SipSession(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((SipSession *) ((CallSession *) x)); +} static void *_p_MessagingSessionTo_p_SipSession(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((SipSession *) ((MessagingSession *) x)); } @@ -7410,12 +8385,15 @@ static void *_p_StackEventTo_p_SipEvent(void *x, int *SWIGUNUSEDPARM(newmemory)) static void *_p_MessagingEventTo_p_SipEvent(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((SipEvent *) ((MessagingEvent *) x)); } +static swig_type_info _swigt__p_CallSession = {"_p_CallSession", "CallSession *", 0, 0, (void*)0, 0}; 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}; static swig_type_info _swigt__p_OptionsEvent = {"_p_OptionsEvent", "OptionsEvent *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_OptionsSession = {"_p_OptionsSession", "OptionsSession *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ProxyAudioConsumer = {"_p_ProxyAudioConsumer", "ProxyAudioConsumer *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ProxyAudioProducer = {"_p_ProxyAudioProducer", "ProxyAudioProducer *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_PublicationEvent = {"_p_PublicationEvent", "PublicationEvent *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_PublicationSession = {"_p_PublicationSession", "PublicationSession *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_RegistrationEvent = {"_p_RegistrationEvent", "RegistrationEvent *", 0, 0, (void*)0, 0}; @@ -7439,12 +8417,15 @@ 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_CallSession, &_swigt__p_DDebugCallback, &_swigt__p_DialogEvent, &_swigt__p_MessagingEvent, &_swigt__p_MessagingSession, &_swigt__p_OptionsEvent, &_swigt__p_OptionsSession, + &_swigt__p_ProxyAudioConsumer, + &_swigt__p_ProxyAudioProducer, &_swigt__p_PublicationEvent, &_swigt__p_PublicationSession, &_swigt__p_RegistrationEvent, @@ -7468,12 +8449,15 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_tsip_subscribe_event_type_e, }; +static swig_cast_info _swigc__p_CallSession[] = { {&_swigt__p_CallSession, 0, 0, 0},{0, 0, 0, 0}}; 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}}; static swig_cast_info _swigc__p_OptionsEvent[] = { {&_swigt__p_OptionsEvent, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_OptionsSession[] = { {&_swigt__p_OptionsSession, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ProxyAudioConsumer[] = { {&_swigt__p_ProxyAudioConsumer, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ProxyAudioProducer[] = { {&_swigt__p_ProxyAudioProducer, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_PublicationEvent[] = { {&_swigt__p_PublicationEvent, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_PublicationSession[] = { {&_swigt__p_PublicationSession, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_RegistrationEvent[] = { {&_swigt__p_RegistrationEvent, 0, 0, 0},{0, 0, 0, 0}}; @@ -7482,7 +8466,7 @@ static swig_cast_info _swigc__p_SafeObject[] = { {&_swigt__p_SipStack, _p_SipSt static swig_cast_info _swigc__p_SipCallback[] = { {&_swigt__p_SipCallback, 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_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_SipSession[] = { {&_swigt__p_SipSession, 0, 0, 0}, {&_swigt__p_CallSession, _p_CallSessionTo_p_SipSession, 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}}; @@ -7497,12 +8481,15 @@ 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_CallSession, _swigc__p_DDebugCallback, _swigc__p_DialogEvent, _swigc__p_MessagingEvent, _swigc__p_MessagingSession, _swigc__p_OptionsEvent, _swigc__p_OptionsSession, + _swigc__p_ProxyAudioConsumer, + _swigc__p_ProxyAudioProducer, _swigc__p_PublicationEvent, _swigc__p_PublicationSession, _swigc__p_RegistrationEvent, @@ -7535,242 +8522,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 @@ -7848,11 +8835,9 @@ extern "C" { SWIGINTERN int swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) { - char *tmp; PyObject *str = swig_varlink_str(v); fprintf(fp,"Swig global variables "); - fprintf(fp,"%s\n", tmp = SWIG_Python_str_AsChar(str)); - SWIG_Python_str_DelForPy3(tmp); + fprintf(fp,"%s\n", SWIG_Python_str_AsChar(str)); Py_DECREF(str); return 0; } @@ -7920,7 +8905,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) */ @@ -7931,7 +8916,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 */ @@ -7952,7 +8937,7 @@ extern "C" { #endif }; varlink_type = tmp; - /* for Python 3 we already assigned ob_type in PyVarObject_HEAD_INIT() */ + /* for Python 3 we already assigned the ob_type in PyVarObject_HEAD_INIT() */ #if PY_VERSION_HEX < 0x03000000 varlink_type.ob_type = &PyType_Type; #endif @@ -8088,7 +9073,10 @@ PyObject* void #endif SWIG_init(void) { - PyObject *m, *d; + PyObject *m, *d; + + /* Fix SwigMethods to carry the callback ptrs when needed */ + SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial); #if PY_VERSION_HEX >= 0x03000000 static struct PyModuleDef SWIG_module = { PyModuleDef_HEAD_INIT, @@ -8101,12 +9089,7 @@ SWIG_init(void) { NULL, NULL }; -#endif - /* Fix SwigMethods to carry the callback ptrs when needed */ - SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial); - -#if PY_VERSION_HEX >= 0x03000000 m = PyModule_Create(&SWIG_module); #else m = Py_InitModule((char *) SWIG_name, SwigMethods); diff --git a/trunk/bindings/python/tinyWRAP_wrap.h b/trunk/bindings/python/tinyWRAP_wrap.h index 88ea9203..4b5f7618 100644 --- a/trunk/bindings/python/tinyWRAP_wrap.h +++ b/trunk/bindings/python/tinyWRAP_wrap.h @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.40 + * Version 1.3.39 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make @@ -15,6 +15,102 @@ #include +class SwigDirector_ProxyAudioConsumer : public ProxyAudioConsumer, public Swig::Director { + +public: + SwigDirector_ProxyAudioConsumer(PyObject *self); + virtual ~SwigDirector_ProxyAudioConsumer(); + virtual int prepare(int ptime, int rate, int channels); + virtual int start(); + virtual int pause(); + virtual int stop(); + + +/* 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 ProxyAudioConsumer 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]; +#endif + +}; + + +class SwigDirector_ProxyAudioProducer : public ProxyAudioProducer, public Swig::Director { + +public: + SwigDirector_ProxyAudioProducer(PyObject *self); + virtual ~SwigDirector_ProxyAudioProducer(); + virtual int prepare(int ptime, int rate, int channels); + virtual int start(); + virtual int pause(); + virtual int stop(); + + +/* 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 ProxyAudioProducer 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]; +#endif + +}; + + class SwigDirector_SipCallback : public SipCallback, public Swig::Director { public: diff --git a/trunk/tinyDAV/droid-makefile b/trunk/tinyDAV/droid-makefile index 32a46f66..692de8b7 100644 --- a/trunk/tinyDAV/droid-makefile +++ b/trunk/tinyDAV/droid-makefile @@ -3,8 +3,8 @@ APP := lib$(PROJECT).$(EXT) FFMPEG_CFLAGS := -I../thirdparties/android/include FFMPEG_LDFLAGS := -L../thirdparties/android/lib -lavutil -lswscale -lavcodec -lgcc -CFLAGS := $(CFLAGS_LIB) $(FFMPEG_CFLAGS) -I../tinySAK/src -I../tinyNET/src -I../tinySDP/include -I../tinyMEDIA/include -I./include -LDFLAGS := $(LDFLAGS_LIB) -lm $(FFMPEG_LDFLAGS) -ltinySAK -ltinyNET -ltinySDP -ltinyMEDIA +CFLAGS := $(CFLAGS_LIB) $(FFMPEG_CFLAGS) -I../tinySAK/src -I../tinyNET/src -I../tinySDP/include -I../tinyRTP/include -I../tinyMEDIA/include -I./include +LDFLAGS := $(LDFLAGS_LIB) -lm $(FFMPEG_LDFLAGS) -ltinySAK -ltinyNET -ltinySDP -ltinyRTP -ltinyMEDIA all: $(APP) @@ -12,10 +12,14 @@ OBJS = \ src/tdav.o ### audio -OBJS += src/audio/tdav_session_audio.o +OBJS += src/audio/tdav_consumer_audio.o \ + src/audio/tdav_jitterbuffer.o \ + src/audio/tdav_producer_audio.o \ + src/audio/tdav_session_audio.o - ### codecs -OBJS += src/codecs/g711/tdav_codec_g711.o + ### codecs (G.711) +OBJS += src/codecs/g711/g711.o \ + src/codecs/g711/tdav_codec_g711.o $(APP): $(OBJS) diff --git a/trunk/tinyDAV/include/tinydav/audio/directsound/tdav_consumer_dsound.h b/trunk/tinyDAV/include/tinydav/audio/directsound/tdav_consumer_dsound.h index f6581a57..0bfe9dc2 100644 --- a/trunk/tinyDAV/include/tinydav/audio/directsound/tdav_consumer_dsound.h +++ b/trunk/tinyDAV/include/tinydav/audio/directsound/tdav_consumer_dsound.h @@ -57,7 +57,7 @@ typedef struct tdav_consumer_dsound_s } tdav_consumer_dsound_t; -TINYDAV_GEXTERN const tmedia_consumer_plugin_def_t *tmedia_consumer_dsound_plugin_def_t; +TINYDAV_GEXTERN const tmedia_consumer_plugin_def_t *tdav_consumer_dsound_plugin_def_t; TDAV_END_DECLS diff --git a/trunk/tinyDAV/include/tinydav/audio/directsound/tdav_producer_dsound.h b/trunk/tinyDAV/include/tinydav/audio/directsound/tdav_producer_dsound.h index e69de29b..53d78352 100644 --- a/trunk/tinyDAV/include/tinydav/audio/directsound/tdav_producer_dsound.h +++ b/trunk/tinyDAV/include/tinydav/audio/directsound/tdav_producer_dsound.h @@ -0,0 +1,66 @@ +/* +* Copyright (C) 2009 Mamadou Diop. +* +* Contact: Mamadou Diop +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tdav_producer_dsound.h + * @brief Microsoft DirectSound producer. + * + * @author Mamadou Diop + * + * @date Created: Sat Nov 8 16:54:58 2009 mdiop + */ +#ifndef TINYDAV_PRODUCER_DSOUND_H +#define TINYDAV_PRODUCER_DSOUND_H + +#include "tinydav_config.h" + +#if HAVE_DSOUND_H + +#include "tinydav/audio/tdav_producer_audio.h" + +#include + +TDAV_BEGIN_DECLS + +#define TDAV_DSOUNS_PRODUCER_NOTIF_POS_COUNT 4 + +typedef struct tdav_producer_dsound_s +{ + TDAV_DECLARE_PRODUCER_AUDIO; + + tsk_bool_t started; + tsk_size_t bytes_per_notif; + void* tid[1]; + + LPDIRECTSOUNDCAPTURE device; + LPDIRECTSOUNDCAPTUREBUFFER captureBuffer; + HANDLE notifEvents[TDAV_DSOUNS_PRODUCER_NOTIF_POS_COUNT]; +} +tdav_producer_dsound_t; + +TINYDAV_GEXTERN const tmedia_producer_plugin_def_t *tdav_producer_dsound_plugin_def_t; + + +TDAV_END_DECLS + +#endif /* HAVE_DSOUND_H */ + +#endif /* TINYDAV_PRODUCER_DSOUND_H */ diff --git a/trunk/tinyDAV/include/tinydav/audio/tdav_consumer_audio.h b/trunk/tinyDAV/include/tinydav/audio/tdav_consumer_audio.h index 52deadbd..482b1f8c 100644 --- a/trunk/tinyDAV/include/tinydav/audio/tdav_consumer_audio.h +++ b/trunk/tinyDAV/include/tinydav/audio/tdav_consumer_audio.h @@ -54,22 +54,23 @@ typedef struct tdav_consumer_audio_s struct{ jitterbuffer *jbuffer; uint8_t jcodec; + long ref_timestamp; } jb; TSK_DECLARE_SAFEOBJ; } tdav_consumer_audio_t; -int tdav_consumer_audio_init(tdav_consumer_audio_t* self); -int tdav_consumer_audio_cmp(const tsk_object_t* consumer1, const tsk_object_t* consumer2); +TINYDAV_API int tdav_consumer_audio_init(tdav_consumer_audio_t* self); +TINYDAV_API int tdav_consumer_audio_cmp(const tsk_object_t* consumer1, const tsk_object_t* consumer2); #define tdav_consumer_audio_prepare(self, codec) tmedia_consumer_prepare(TDAV_CONSUMER_AUDIO(self), codec) #define tdav_consumer_audio_start(self) tmedia_consumer_start(TDAV_CONSUMER_AUDIO(self)) #define tdav_consumer_audio_consume(self, buffer, size) tmedia_consumer_consume(TDAV_CONSUMER_AUDIO(self), buffer, size) #define tdav_consumer_audio_pause(self) tmedia_consumer_pause(TDAV_CONSUMER_AUDIO(self)) #define tdav_consumer_audio_stop(self) tmedia_consumer_stop(TDAV_CONSUMER_AUDIO(self)) -int tdav_consumer_audio_put(tdav_consumer_audio_t* self, void** data, const tsk_object_t* proto_hdr); -void* tdav_consumer_audio_get(tdav_consumer_audio_t* self); -int tdav_consumer_audio_deinit(tdav_consumer_audio_t* self); +TINYDAV_API int tdav_consumer_audio_put(tdav_consumer_audio_t* self, void** data, const tsk_object_t* proto_hdr); +TINYDAV_API void* tdav_consumer_audio_get(tdav_consumer_audio_t* self); +TINYDAV_API int tdav_consumer_audio_deinit(tdav_consumer_audio_t* self); #define TDAV_DECLARE_CONSUMER_AUDIO tdav_consumer_audio_t __consumer_audio__ diff --git a/trunk/tinyDAV/include/tinydav/audio/tdav_producer_audio.h b/trunk/tinyDAV/include/tinydav/audio/tdav_producer_audio.h index 31ec99bf..5cb8fc3e 100644 --- a/trunk/tinyDAV/include/tinydav/audio/tdav_producer_audio.h +++ b/trunk/tinyDAV/include/tinydav/audio/tdav_producer_audio.h @@ -51,14 +51,14 @@ typedef struct tdav_producer_audio_s } tdav_producer_audio_t; -int tdav_producer_audio_init(tdav_producer_audio_t* self); -int tdav_producer_audio_cmp(const tsk_object_t* producer1, const tsk_object_t* producer2); +TINYDAV_API int tdav_producer_audio_init(tdav_producer_audio_t* self); +TINYDAV_API int tdav_producer_audio_cmp(const tsk_object_t* producer1, const tsk_object_t* producer2); #define tdav_producer_audio_prepare(self, codec) tmedia_producer_prepare(TMEDIA_PRODUCER(self), codec) #define tmedia_producer_audio_set_callback(self, callback, callback_data) tmedia_producer_set_callback(TMEDIA_PRODUCER(self), callback, callback_data) #define tdav_producer_audio_start(self) tdav_producer_start(TMEDIA_PRODUCER(self)) #define tdav_producer_audio_pause(self) tdav_producer_pause(TMEDIA_PRODUCER(self)) #define tdav_producer_audio_stop(self) tdav_producer_stop(TMEDIA_PRODUCER(self)) -int tdav_producer_audio_deinit(tdav_producer_audio_t* self); +TINYDAV_API int tdav_producer_audio_deinit(tdav_producer_audio_t* self); #define TDAV_DECLARE_PRODUCER_AUDIO tdav_producer_audio_t __producer_audio__ diff --git a/trunk/tinyDAV/include/tinydav/audio/waveapi/tdav_consumer_waveapi.h b/trunk/tinyDAV/include/tinydav/audio/waveapi/tdav_consumer_waveapi.h index 3a8bcd78..e3d16681 100644 --- a/trunk/tinyDAV/include/tinydav/audio/waveapi/tdav_consumer_waveapi.h +++ b/trunk/tinyDAV/include/tinydav/audio/waveapi/tdav_consumer_waveapi.h @@ -59,7 +59,7 @@ typedef struct tdav_consumer_waveapi_s } tdav_consumer_waveapi_t; -TINYDAV_GEXTERN const tmedia_consumer_plugin_def_t *tmedia_consumer_waveapi_plugin_def_t; +TINYDAV_GEXTERN const tmedia_consumer_plugin_def_t *tdav_consumer_waveapi_plugin_def_t; TDAV_END_DECLS diff --git a/trunk/tinyDAV/include/tinydav/audio/waveapi/tdav_producer_waveapi.h b/trunk/tinyDAV/include/tinydav/audio/waveapi/tdav_producer_waveapi.h index 8666f07e..68e89cf5 100644 --- a/trunk/tinyDAV/include/tinydav/audio/waveapi/tdav_producer_waveapi.h +++ b/trunk/tinyDAV/include/tinydav/audio/waveapi/tdav_producer_waveapi.h @@ -59,7 +59,7 @@ typedef struct tdav_producer_waveapi_s } tdav_producer_waveapi_t; -TINYDAV_GEXTERN const tmedia_producer_plugin_def_t *tmedia_producer_waveapi_plugin_def_t; +TINYDAV_GEXTERN const tmedia_producer_plugin_def_t *tdav_producer_waveapi_plugin_def_t; TDAV_END_DECLS diff --git a/trunk/tinyDAV/include/tinydav_config.h b/trunk/tinyDAV/include/tinydav_config.h index 8ec9c427..c4386166 100644 --- a/trunk/tinyDAV/include/tinydav_config.h +++ b/trunk/tinyDAV/include/tinydav_config.h @@ -23,10 +23,6 @@ #ifndef TINYDAV_CONFIG_H #define TINYDAV_CONFIG_H -#if HAVE_CONFIG_H - #include "config.h" -#endif - #ifdef __SYMBIAN32__ #undef _WIN32 /* Because of WINSCW */ #endif diff --git a/trunk/tinyDAV/src/audio/directsound/tdav_consumer_dsound.c b/trunk/tinyDAV/src/audio/directsound/tdav_consumer_dsound.c index 77bb3746..460e04fd 100644 --- a/trunk/tinyDAV/src/audio/directsound/tdav_consumer_dsound.c +++ b/trunk/tinyDAV/src/audio/directsound/tdav_consumer_dsound.c @@ -244,7 +244,7 @@ int tdav_consumer_dsound_start(tmedia_consumer_t* self) return 0; } -int tdav_consumer_dsound_consume(tmedia_consumer_t* self, void** buffer, tsk_size_t size) +int tdav_consumer_dsound_consume(tmedia_consumer_t* self, void** buffer, tsk_size_t size, const tsk_object_t* proto_hdr) { tdav_consumer_dsound_t* dsound = (tdav_consumer_dsound_t*)self; @@ -253,7 +253,7 @@ int tdav_consumer_dsound_consume(tmedia_consumer_t* self, void** buffer, tsk_siz return -1; } /* buffer is already decoded */ - return tdav_consumer_audio_put(TDAV_CONSUMER_AUDIO(dsound), buffer); + return tdav_consumer_audio_put(TDAV_CONSUMER_AUDIO(dsound), buffer, proto_hdr); } int tdav_consumer_dsound_pause(tmedia_consumer_t* self) @@ -296,35 +296,35 @@ int tdav_consumer_dsound_stop(tmedia_consumer_t* self) } -// -// WaveAPI consumer object definition -// -/* constructor */ -static tsk_object_t* tdav_consumer_dsound_ctor(tsk_object_t * self, va_list * app) -{ - tdav_consumer_dsound_t *consumer = self; - if(consumer){ - /* init base */ - tdav_consumer_audio_init(TDAV_CONSUMER_AUDIO(consumer)); - /* init self */ - - } - return self; -} -/* destructor */ -static tsk_object_t* tdav_consumer_dsound_dtor(tsk_object_t * self) -{ - tdav_consumer_dsound_t *dsound = self; - if(dsound){ - tsk_size_t i; - - /* stop */ - if(dsound->started){ - tdav_consumer_dsound_stop(self); - } - - /* deinit base */ - tdav_consumer_audio_deinit(TDAV_CONSUMER_AUDIO(dsound)); +// +// WaveAPI consumer object definition +// +/* constructor */ +static tsk_object_t* tdav_consumer_dsound_ctor(tsk_object_t * self, va_list * app) +{ + tdav_consumer_dsound_t *consumer = self; + if(consumer){ + /* init base */ + tdav_consumer_audio_init(TDAV_CONSUMER_AUDIO(consumer)); + /* init self */ + + } + return self; +} +/* destructor */ +static tsk_object_t* tdav_consumer_dsound_dtor(tsk_object_t * self) +{ + tdav_consumer_dsound_t *dsound = self; + if(dsound){ + tsk_size_t i; + + /* stop */ + if(dsound->started){ + tdav_consumer_dsound_stop(self); + } + + /* deinit base */ + tdav_consumer_audio_deinit(TDAV_CONSUMER_AUDIO(dsound)); /* deinit self */ // Delete secondary buffer if(dsound->primaryBuffer){ @@ -335,26 +335,26 @@ static tsk_object_t* tdav_consumer_dsound_dtor(tsk_object_t * self) } if(dsound->device){ IDirectSound_Release(dsound->device); - } - for(i = 0; inotifEvents)/sizeof(HANDLE); i++){ - if(dsound->notifEvents[i]){ - CloseHandle(dsound->notifEvents[i]); - } - } - } - - return self; -} -/* object definition */ -static const tsk_object_def_t tdav_consumer_dsound_def_s = -{ - sizeof(tdav_consumer_dsound_t), - tdav_consumer_dsound_ctor, - tdav_consumer_dsound_dtor, - tdav_consumer_audio_cmp, -}; -/* plugin definition*/ -static const tmedia_consumer_plugin_def_t tmedia_consumer_dsound_plugin_def_s = + } + for(i = 0; inotifEvents)/sizeof(HANDLE); i++){ + if(dsound->notifEvents[i]){ + CloseHandle(dsound->notifEvents[i]); + } + } + } + + return self; +} +/* object definition */ +static const tsk_object_def_t tdav_consumer_dsound_def_s = +{ + sizeof(tdav_consumer_dsound_t), + tdav_consumer_dsound_ctor, + tdav_consumer_dsound_dtor, + tdav_consumer_audio_cmp, +}; +/* plugin definition*/ +static const tmedia_consumer_plugin_def_t tdav_consumer_dsound_plugin_def_s = { &tdav_consumer_dsound_def_s, @@ -367,7 +367,7 @@ static const tmedia_consumer_plugin_def_t tmedia_consumer_dsound_plugin_def_s = tdav_consumer_dsound_pause, tdav_consumer_dsound_stop }; -const tmedia_consumer_plugin_def_t *tmedia_consumer_dsound_plugin_def_t = &tmedia_consumer_dsound_plugin_def_s; +const tmedia_consumer_plugin_def_t *tdav_consumer_dsound_plugin_def_t = &tdav_consumer_dsound_plugin_def_s; #endif /* HAVE_DSOUND_H */ \ No newline at end of file diff --git a/trunk/tinyDAV/src/audio/directsound/tdav_producer_dsound.c b/trunk/tinyDAV/src/audio/directsound/tdav_producer_dsound.c index e69de29b..d99fee44 100644 --- a/trunk/tinyDAV/src/audio/directsound/tdav_producer_dsound.c +++ b/trunk/tinyDAV/src/audio/directsound/tdav_producer_dsound.c @@ -0,0 +1,317 @@ +/* +* Copyright (C) 2009 Mamadou Diop. +* +* Contact: Mamadou Diop +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tdav_producer_dsound.c + * @brief Microsoft DirectSound producer. + * + * @author Mamadou Diop + * + * @date Created: Sat Nov 8 16:54:58 2009 mdiop + */ +#include "tinydav/audio/directsound/tdav_producer_dsound.h" + +#if HAVE_DSOUND_H + +#if defined(_MSC_VER) +# pragma comment(lib, "dsound.lib") +# pragma comment(lib, "dxguid.lib") +#endif + +#include "tinydav/tdav_win32.h" + +#include "tsk_thread.h" +#include "tsk_memory.h" +#include "tsk_debug.h" + +#include + +static void *__playback_thread(void *param) +{ + tdav_producer_dsound_t* dsound = (tdav_producer_dsound_t*)param; + + HRESULT hr; + LPVOID lpvAudio1, lpvAudio2; + DWORD dwBytesAudio1, dwBytesAudio2; + + TSK_DEBUG_INFO("__record_thread -- START"); + + SetPriorityClass(GetCurrentThread(), REALTIME_PRIORITY_CLASS); + + for(;;){ + DWORD dwEvent = WaitForMultipleObjects(sizeof(dsound->notifEvents)/sizeof(HANDLE), dsound->notifEvents, FALSE, INFINITE); + + if(!dsound->started){ + break; + } + else { + // lock + if((hr = IDirectSoundCaptureBuffer_Lock(dsound->captureBuffer, (dwEvent * dsound->bytes_per_notif), dsound->bytes_per_notif, &lpvAudio1, &dwBytesAudio1, &lpvAudio2, &dwBytesAudio2, 0)) != DS_OK){ + tdav_win32_print_error("IDirectSoundCaptureBuffer_Lock", hr); + goto next; + } + + if(TMEDIA_PRODUCER(dsound)->callback){ + if(lpvAudio2){ + TMEDIA_PRODUCER(dsound)->callback(TMEDIA_PRODUCER(dsound)->callback_data, lpvAudio1, dwBytesAudio1); + TMEDIA_PRODUCER(dsound)->callback(TMEDIA_PRODUCER(dsound)->callback_data, lpvAudio2, dwBytesAudio2); + } + else{ + TMEDIA_PRODUCER(dsound)->callback(TMEDIA_PRODUCER(dsound)->callback_data, lpvAudio1, dwBytesAudio1); + } + } + + // unlock + if((hr = IDirectSoundCaptureBuffer_Unlock(dsound->captureBuffer, lpvAudio1, dwBytesAudio1, lpvAudio2, dwBytesAudio2)) != DS_OK){ + tdav_win32_print_error("IDirectSoundCaptureBuffer_Unlock", hr); + goto next; + } +next:; + } + } + + TSK_DEBUG_INFO("__record_thread -- STOP"); + + + return tsk_null; +} + + + + +/* ============ Media Producer Interface ================= */ +int tdav_producer_dsound_prepare(tmedia_producer_t* self, const tmedia_codec_t* codec) +{ + HRESULT hr; + + WAVEFORMATEX wfx = {0}; + DSCBUFFERDESC dsbd = {0}; + + tdav_producer_dsound_t* dsound = (tdav_producer_dsound_t*)self; + + if(!dsound){ + TSK_DEBUG_ERROR("Invalid parameter"); + return -1; + } + + if(dsound->device || dsound->captureBuffer){ + TSK_DEBUG_ERROR("Producer already prepared"); + return -2; + } + + TDAV_PRODUCER_AUDIO(dsound)->channels = codec->plugin->audio.channels; + TDAV_PRODUCER_AUDIO(dsound)->rate = codec->plugin->rate; + + /* Create capture device */ + if((hr = DirectSoundCaptureCreate(NULL, &dsound->device, NULL) != DS_OK)){ + tdav_win32_print_error("DirectSoundCaptureCreate", hr); + return -3; + } + + /* Creates the capture buffer */ + wfx.wFormatTag = WAVE_FORMAT_PCM; + wfx.nChannels = TDAV_PRODUCER_AUDIO(dsound)->channels; + wfx.nSamplesPerSec = TDAV_PRODUCER_AUDIO(dsound)->rate; + wfx.wBitsPerSample = TDAV_PRODUCER_AUDIO(dsound)->bits_per_sample; + wfx.nBlockAlign = (wfx.nChannels * wfx.wBitsPerSample/8); + wfx.nAvgBytesPerSec = (wfx.nSamplesPerSec * wfx.nBlockAlign); + + /* Average bytes (count) for each notification */ + dsound->bytes_per_notif = ((wfx.nAvgBytesPerSec * TDAV_PRODUCER_AUDIO(dsound)->ptime)/1000); + + dsbd.dwSize = sizeof(DSCBUFFERDESC); + dsbd.dwBufferBytes = (TDAV_DSOUNS_PRODUCER_NOTIF_POS_COUNT * dsound->bytes_per_notif); + dsbd.lpwfxFormat = &wfx; + + if((hr = IDirectSoundCapture_CreateCaptureBuffer(dsound->device, &dsbd, &dsound->captureBuffer, NULL)) != DS_OK){ + tdav_win32_print_error("IDirectSoundCapture_CreateCaptureBuffer", hr); + return -4; + } + + return 0; +} + +int tdav_producer_dsound_start(tmedia_producer_t* self) +{ + tdav_producer_dsound_t* dsound = (tdav_producer_dsound_t*)self; + + tsk_size_t i; + HRESULT hr; + LPDIRECTSOUNDNOTIFY lpDSBNotify; + DSBPOSITIONNOTIFY pPosNotify[TDAV_DSOUNS_PRODUCER_NOTIF_POS_COUNT] = {0}; + + if(!dsound){ + TSK_DEBUG_ERROR("Invalid parameter"); + return -1; + } + + if(!dsound->device || !dsound->captureBuffer){ + TSK_DEBUG_ERROR("Producer not prepared"); + return -2; + } + + if(dsound->started){ + TSK_DEBUG_WARN("Producer already started"); + return 0; + } + + if((hr = IDirectSoundCaptureBuffer_QueryInterface(dsound->captureBuffer, &IID_IDirectSoundNotify, (LPVOID*)&lpDSBNotify)) != DS_OK){ + tdav_win32_print_error("IDirectSoundCaptureBuffer_QueryInterface", hr); + return -3; + } + + /* Events associated to notification points */ + for(i = 0; inotifEvents)/sizeof(HANDLE); i++){ + dsound->notifEvents[i] = CreateEvent(NULL, FALSE, FALSE, NULL); + pPosNotify[i].dwOffset = ((dsound->bytes_per_notif * i) + dsound->bytes_per_notif) - 1; + pPosNotify[i].hEventNotify = dsound->notifEvents[i]; + } + if((hr = IDirectSoundNotify_SetNotificationPositions(lpDSBNotify, TDAV_DSOUNS_PRODUCER_NOTIF_POS_COUNT, pPosNotify)) != DS_OK){ + IDirectSoundNotify_Release(lpDSBNotify); + tdav_win32_print_error("IDirectSoundBuffer_QueryInterface", hr); + return -4; + } + + if((hr = IDirectSoundNotify_Release(lpDSBNotify))){ + tdav_win32_print_error("IDirectSoundNotify_Release", hr); + } + + /* start the reader thread */ + tsk_thread_create(&dsound->tid[0], __playback_thread, dsound); + + /* Start the buffer */ + if((hr = IDirectSoundCaptureBuffer_Start(dsound->captureBuffer, DSBPLAY_LOOPING)) != DS_OK){ + tdav_win32_print_error("IDirectSoundCaptureBuffer_Start", hr); + return -5; + } + + dsound->started = tsk_true; + + return 0; +} + +int tdav_producer_dsound_pause(tmedia_producer_t* self) +{ + return 0; +} + +int tdav_producer_dsound_stop(tmedia_producer_t* self) +{ + tdav_producer_dsound_t* dsound = (tdav_producer_dsound_t*)self; + + HRESULT hr; + + if(!self){ + TSK_DEBUG_ERROR("Invalid parameter"); + return -1; + } + + if(!dsound->started){ + TSK_DEBUG_WARN("Producer not started"); + return 0; + } + + /* should be done here */ + dsound->started = tsk_false; + + /* stop thread */ + if(dsound->tid[0]){ + tsk_thread_join(&(dsound->tid[0])); + } + + if((hr = IDirectSoundCaptureBuffer_Stop(dsound->captureBuffer)) != DS_OK){ + tdav_win32_print_error("IDirectSoundCaptureBuffer_Stop", hr); + } + + return 0; +} + + +// +// WaveAPI producer object definition +// +/* constructor */ +static tsk_object_t* tdav_producer_dsound_ctor(tsk_object_t * self, va_list * app) +{ + tdav_producer_dsound_t *producer = self; + if(producer){ + /* init base */ + tdav_producer_audio_init(TDAV_PRODUCER_AUDIO(producer)); + /* init self */ + + } + return self; +} +/* destructor */ +static tsk_object_t* tdav_producer_dsound_dtor(tsk_object_t * self) +{ + tdav_producer_dsound_t *dsound = self; + if(dsound){ + tsk_size_t i; + + /* stop */ + if(dsound->started){ + tdav_producer_dsound_stop(self); + } + + /* deinit base */ + tdav_producer_audio_deinit(TDAV_PRODUCER_AUDIO(dsound)); + /* deinit self */ + if(dsound->captureBuffer){ + IDirectSoundCaptureBuffer_Release(dsound->captureBuffer); + } + if(dsound->device){ + IDirectSoundCapture_Release(dsound->device); + } + for(i = 0; inotifEvents)/sizeof(HANDLE); i++){ + if(dsound->notifEvents[i]){ + CloseHandle(dsound->notifEvents[i]); + } + } + } + + return self; +} +/* object definition */ +static const tsk_object_def_t tdav_producer_dsound_def_s = +{ + sizeof(tdav_producer_dsound_t), + tdav_producer_dsound_ctor, + tdav_producer_dsound_dtor, + tdav_producer_audio_cmp, +}; +/* plugin definition*/ +static const tmedia_producer_plugin_def_t tdav_producer_dsound_plugin_def_s = +{ + &tdav_producer_dsound_def_s, + + tmedia_audio, + "Microsoft DirectSound producer", + + tdav_producer_dsound_prepare, + tdav_producer_dsound_start, + tdav_producer_dsound_pause, + tdav_producer_dsound_stop +}; +const tmedia_producer_plugin_def_t *tdav_producer_dsound_plugin_def_t = &tdav_producer_dsound_plugin_def_s; + + +#endif /* HAVE_DSOUND_H */ \ No newline at end of file diff --git a/trunk/tinyDAV/src/audio/tdav_consumer_audio.c b/trunk/tinyDAV/src/audio/tdav_consumer_audio.c index 09aa0c23..bf596e6a 100644 --- a/trunk/tinyDAV/src/audio/tdav_consumer_audio.c +++ b/trunk/tinyDAV/src/audio/tdav_consumer_audio.c @@ -35,6 +35,14 @@ #include "tsk_time.h" #include "tsk_debug.h" +#if TSK_UNDER_WINDOWS +# include // timeval +#elif defined(__SYMBIAN32__) +# include <_timeval.h> +#else +# include +#endif + #define TDAV_BITS_PER_SAMPLE_DEFAULT 16 #define TDAV_CHANNELS_DEFAULT 2 #define TDAV_RATE_DEFAULT 8000 @@ -94,9 +102,22 @@ int tdav_consumer_audio_put(tdav_consumer_audio_t* self, void** data, const tsk_ TSK_DEBUG_ERROR("Invalid parameter"); return -1; } + /* synchronize the reference timestamp */ + if(!self->jb.ref_timestamp){ + struct timeval tv; + long ts = (rtp_hdr->timestamp/(self->rate/1000)); + tsk_gettimeofday(&tv, tsk_null); + tv.tv_sec -= (ts / self->rate); + tv.tv_usec -= (ts % self->rate) * 125; + if((tv.tv_usec -= (tv.tv_usec % (self->ptime * 10000))) <0){ + tv.tv_usec += 1000000; + tv.tv_sec -= 1; + } + self->jb.ref_timestamp = (long)tsk_time_get_ms(&tv); + } tsk_safeobj_lock(self); - jb_put(self->jb.jbuffer, *data, JB_TYPE_VOICE, self->ptime, rtp_hdr->timestamp, (long)tsk_time_now(), self->jb.jcodec); + jb_put(self->jb.jbuffer, *data, JB_TYPE_VOICE, self->ptime, (rtp_hdr->timestamp/(self->rate/1000)), (long)(tsk_time_now()-self->jb.ref_timestamp), self->jb.jcodec); *data = tsk_null; tsk_safeobj_unlock(self); diff --git a/trunk/tinyDAV/src/audio/tdav_producer_audio.c b/trunk/tinyDAV/src/audio/tdav_producer_audio.c index bf5a9181..0b140f66 100644 --- a/trunk/tinyDAV/src/audio/tdav_producer_audio.c +++ b/trunk/tinyDAV/src/audio/tdav_producer_audio.c @@ -77,7 +77,7 @@ int tdav_producer_audio_cmp(const tsk_object_t* producer1, const tsk_object_t* p /** Deinitialize a producer */ -int tdav_producer_audio_deinit(self) +int tdav_producer_audio_deinit(tdav_producer_audio_t* self) { int ret; diff --git a/trunk/tinyDAV/src/audio/tdav_session_audio.c b/trunk/tinyDAV/src/audio/tdav_session_audio.c index 2d01ed76..8243c25d 100644 --- a/trunk/tinyDAV/src/audio/tdav_session_audio.c +++ b/trunk/tinyDAV/src/audio/tdav_session_audio.c @@ -53,6 +53,7 @@ static int tdav_session_audio_rtp_cb(const void* callback_data, const struct trt if(audio->consumer){ /* decode data--> FIXME:we should lock negociated codec */ if(TMEDIA_SESSION(audio)->negociated_codec && TMEDIA_SESSION(audio)->negociated_codec->plugin && TMEDIA_SESSION(audio)->negociated_codec->plugin->decode){ + /* decode */ void* out_data = tsk_null; tsk_size_t out_size; out_size = TMEDIA_SESSION(audio)->negociated_codec->plugin->decode(TMEDIA_SESSION(audio)->negociated_codec, packet->payload.data, packet->payload.size, &out_data); @@ -70,7 +71,15 @@ static int tdav_session_audio_producer_cb(const void* callback_data, const void* { tdav_session_audio_t* audio = (tdav_session_audio_t*)callback_data; - if(audio){ + if(audio->rtp_manager && TMEDIA_SESSION(audio)->negociated_codec && TMEDIA_SESSION(audio)->negociated_codec->plugin && TMEDIA_SESSION(audio)->negociated_codec->plugin->encode){ + /* encode */ + void* out_data = tsk_null; + tsk_size_t out_size; + out_size = TMEDIA_SESSION(audio)->negociated_codec->plugin->encode(TMEDIA_SESSION(audio)->negociated_codec, buffer, size, &out_data); + if(out_size){ + trtp_manager_send_rtp(audio->rtp_manager, out_data, out_size, tsk_false); + } + TSK_FREE(out_data); } return 0; diff --git a/trunk/tinyDAV/src/audio/waveapi/tdav_consumer_waveapi.c b/trunk/tinyDAV/src/audio/waveapi/tdav_consumer_waveapi.c index cf1d9236..97be63ef 100644 --- a/trunk/tinyDAV/src/audio/waveapi/tdav_consumer_waveapi.c +++ b/trunk/tinyDAV/src/audio/waveapi/tdav_consumer_waveapi.c @@ -385,7 +385,7 @@ static const tsk_object_def_t tdav_consumer_waveapi_def_s = tdav_consumer_audio_cmp, }; /* plugin definition*/ -static const tmedia_consumer_plugin_def_t tmedia_consumer_waveapi_plugin_def_s = +static const tmedia_consumer_plugin_def_t tdav_consumer_waveapi_plugin_def_s = { &tdav_consumer_waveapi_def_s, @@ -398,6 +398,6 @@ static const tmedia_consumer_plugin_def_t tmedia_consumer_waveapi_plugin_def_s = tdav_consumer_waveapi_pause, tdav_consumer_waveapi_stop }; -const tmedia_consumer_plugin_def_t *tmedia_consumer_waveapi_plugin_def_t = &tmedia_consumer_waveapi_plugin_def_s; +const tmedia_consumer_plugin_def_t *tdav_consumer_waveapi_plugin_def_t = &tdav_consumer_waveapi_plugin_def_s; #endif /* HAVE_WAVE_API */ \ No newline at end of file diff --git a/trunk/tinyDAV/src/audio/waveapi/tdav_producer_waveapi.c b/trunk/tinyDAV/src/audio/waveapi/tdav_producer_waveapi.c index 1f4a948e..a846593e 100644 --- a/trunk/tinyDAV/src/audio/waveapi/tdav_producer_waveapi.c +++ b/trunk/tinyDAV/src/audio/waveapi/tdav_producer_waveapi.c @@ -96,7 +96,7 @@ static int add_wavehdr(tdav_producer_waveapi_t* producer, tsk_size_t index) result = waveInAddBuffer(producer->hWaveIn, producer->hWaveHeaders[index], sizeof(WAVEHDR)); if(result != MMSYSERR_NOERROR){ - print_last_error(result, "waveInWrite"); + print_last_error(result, "waveInAddBuffer"); return -3; } @@ -138,7 +138,7 @@ static int record_wavehdr(tdav_producer_waveapi_t* producer, LPWAVEHDR lpHdr) result = waveInAddBuffer(producer->hWaveIn, lpHdr, sizeof(WAVEHDR)); if(result != MMSYSERR_NOERROR){ - print_last_error(result, "waveInWrite"); + print_last_error(result, "waveInAddBuffer"); return -4; } @@ -317,63 +317,63 @@ int tdav_producer_waveapi_stop(tmedia_producer_t* self) } -// -// WaveAPI producer object definition -// -/* constructor */ -static tsk_object_t* tdav_producer_waveapi_ctor(tsk_object_t * self, va_list * app) -{ - tdav_producer_waveapi_t *producer = self; - if(producer){ - /* init base */ - tdav_producer_audio_init(TDAV_PRODUCER_AUDIO(producer)); - /* init self */ - InitializeCriticalSection(&producer->cs); - } - return self; -} -/* destructor */ -static tsk_object_t* tdav_producer_waveapi_dtor(tsk_object_t * self) -{ - tdav_producer_waveapi_t *producer = self; - if(producer){ - tsk_size_t i; - - /* stop */ - if(producer->started){ - tdav_producer_waveapi_stop(self); - } - - /* deinit base */ - tdav_producer_audio_deinit(TDAV_PRODUCER_AUDIO(producer)); +// +// WaveAPI producer object definition +// +/* constructor */ +static tsk_object_t* tdav_producer_waveapi_ctor(tsk_object_t * self, va_list * app) +{ + tdav_producer_waveapi_t *producer = self; + if(producer){ + /* init base */ + tdav_producer_audio_init(TDAV_PRODUCER_AUDIO(producer)); + /* init self */ + InitializeCriticalSection(&producer->cs); + } + return self; +} +/* destructor */ +static tsk_object_t* tdav_producer_waveapi_dtor(tsk_object_t * self) +{ + tdav_producer_waveapi_t *producer = self; + if(producer){ + tsk_size_t i; + + /* stop */ + if(producer->started){ + tdav_producer_waveapi_stop(self); + } + + /* deinit base */ + tdav_producer_audio_deinit(TDAV_PRODUCER_AUDIO(producer)); /* deinit self */ for(i = 0; i< sizeof(producer->hWaveHeaders)/sizeof(LPWAVEHDR); i++){ free_wavehdr(producer, i); - } - if(producer->hWaveIn){ - waveInClose(producer->hWaveIn); - } - if(producer->events[0]){ - CloseHandle(producer->events[0]); - } - if(producer->events[1]){ - CloseHandle(producer->events[1]); - } - DeleteCriticalSection(&producer->cs); - } - - return self; -} -/* object definition */ -static const tsk_object_def_t tdav_producer_waveapi_def_s = -{ - sizeof(tdav_producer_waveapi_t), - tdav_producer_waveapi_ctor, - tdav_producer_waveapi_dtor, - tdav_producer_audio_cmp, -}; -/* plugin definition*/ -static const tmedia_producer_plugin_def_t tmedia_producer_waveapi_plugin_def_s = + } + if(producer->hWaveIn){ + waveInClose(producer->hWaveIn); + } + if(producer->events[0]){ + CloseHandle(producer->events[0]); + } + if(producer->events[1]){ + CloseHandle(producer->events[1]); + } + DeleteCriticalSection(&producer->cs); + } + + return self; +} +/* object definition */ +static const tsk_object_def_t tdav_producer_waveapi_def_s = +{ + sizeof(tdav_producer_waveapi_t), + tdav_producer_waveapi_ctor, + tdav_producer_waveapi_dtor, + tdav_producer_audio_cmp, +}; +/* plugin definition*/ +static const tmedia_producer_plugin_def_t tdav_producer_waveapi_plugin_def_s = { &tdav_producer_waveapi_def_s, @@ -385,6 +385,6 @@ static const tmedia_producer_plugin_def_t tmedia_producer_waveapi_plugin_def_s = tdav_producer_waveapi_pause, tdav_producer_waveapi_stop }; -const tmedia_producer_plugin_def_t *tmedia_producer_waveapi_plugin_def_t = &tmedia_producer_waveapi_plugin_def_s; +const tmedia_producer_plugin_def_t *tdav_producer_waveapi_plugin_def_t = &tdav_producer_waveapi_plugin_def_s; #endif /* HAVE_WAVE_API */ \ No newline at end of file diff --git a/trunk/tinyDAV/src/codecs/g711/tdav_codec_g711.c b/trunk/tinyDAV/src/codecs/g711/tdav_codec_g711.c index 1a4d1995..5b85c549 100644 --- a/trunk/tinyDAV/src/codecs/g711/tdav_codec_g711.c +++ b/trunk/tinyDAV/src/codecs/g711/tdav_codec_g711.c @@ -123,19 +123,49 @@ const tmedia_codec_plugin_def_t *tdav_codec_g711u_plugin_def_t = &tdav_codec_g71 #define tdav_codec_g711a_fmtp_set tsk_null tsk_size_t tdav_codec_g711a_fmtp_encode(tmedia_codec_t* self, const void* in_data, tsk_size_t in_size, void** out_data) -{ - return 0; -} - -tsk_size_t tdav_codec_g711a_fmtp_decode(tmedia_codec_t* self, const void* in_data, tsk_size_t in_size, void** out_data) { tsk_size_t i; - if(!in_data || !in_size || !out_data){ + if(!self || !in_data || !in_size || !out_data){ TSK_DEBUG_ERROR("Invalid parameter"); return 0; } + /* free old buffer */ + if(*out_data){ + TSK_FREE(*out_data); + } + + /* allocate new buffer */ + if(!(*out_data = tsk_calloc(in_size/2, sizeof(uint8_t)))){ + TSK_DEBUG_ERROR("Failed to allocate new buffer"); + return 0; + } + + for(i = 0; i<(in_size/2); i++){ + ((uint8_t*)*out_data)[i] = linear2alaw(((short*)in_data)[i]); + } + + return (in_size/2); +} + +#if 0 +FILE* file = tsk_null; +int count = 0; +#endif +tsk_size_t tdav_codec_g711a_fmtp_decode(tmedia_codec_t* self, const void* in_data, tsk_size_t in_size, void** out_data) +{ + tsk_size_t i; + + if(!self || !in_data || !in_size || !out_data){ + TSK_DEBUG_ERROR("Invalid parameter"); + return 0; + } +#if 0 + if(!file && count<=1000){ + file = fopen("./g711a.pcm", "wb"); + } +#endif /* free old buffer */ if(*out_data){ TSK_FREE(*out_data); @@ -149,7 +179,15 @@ tsk_size_t tdav_codec_g711a_fmtp_decode(tmedia_codec_t* self, const void* in_dat for(i = 0; i @@ -71,9 +72,9 @@ int tdav_init() /* === Register consumers === */ #if HAVE_DSOUND_H - tmedia_consumer_plugin_register(tmedia_consumer_dsound_plugin_def_t); + tmedia_consumer_plugin_register(tdav_consumer_dsound_plugin_def_t); #elif HAVE_WAVE_API - tmedia_consumer_plugin_register(tmedia_consumer_waveapi_plugin_def_t); + tmedia_consumer_plugin_register(tdav_consumer_waveapi_plugin_def_t); #endif #if HAVE_OSS_H @@ -82,8 +83,9 @@ int tdav_init() /* === Register producers === */ #if HAVE_DSOUND_H + tmedia_producer_plugin_register(tdav_producer_dsound_plugin_def_t); #elif HAVE_WAVE_API - tmedia_producer_plugin_register(tmedia_producer_waveapi_plugin_def_t); + tmedia_producer_plugin_register(tdav_producer_waveapi_plugin_def_t); #endif //if((context_encode = avcodec_alloc_context())){ @@ -113,15 +115,16 @@ int tdav_deinit() /* === unRegister consumers === */ #if HAVE_DSOUND_H - tmedia_consumer_plugin_unregister(tmedia_consumer_dsound_plugin_def_t); + tmedia_consumer_plugin_unregister(tdav_consumer_dsound_plugin_def_t); #elif HAVE_WAVE_API - tmedia_consumer_plugin_unregister(tmedia_consumer_waveapi_plugin_def_t); + tmedia_consumer_plugin_unregister(tdav_consumer_waveapi_plugin_def_t); #endif /* === UnRegister producers === */ #if HAVE_DSOUND_H + tmedia_producer_plugin_unregister(tdav_producer_dsound_plugin_def_t); #elif HAVE_WAVE_API - tmedia_producer_plugin_unregister(tmedia_producer_waveapi_plugin_def_t); + tmedia_producer_plugin_unregister(tdav_producer_waveapi_plugin_def_t); #endif #if HAVE_OSS_H diff --git a/trunk/tinyDAV/tinyDAV.vcproj b/trunk/tinyDAV/tinyDAV.vcproj index d396d1a6..03da0245 100644 --- a/trunk/tinyDAV/tinyDAV.vcproj +++ b/trunk/tinyDAV/tinyDAV.vcproj @@ -296,7 +296,7 @@ > diff --git a/trunk/tinyDEMO/main.sn b/trunk/tinyDEMO/main.sn index 5d54d1f2..cfde2d2f 100644 --- a/trunk/tinyDEMO/main.sn +++ b/trunk/tinyDEMO/main.sn @@ -5,7 +5,7 @@ #++sn --path ./core-colibria.sn # Ericsson -#++sn --path ./core-ericsson.sn +++sn --path ./core-ericsson.sn # Inexbee #++sn --path ./core-inexbee.sn @@ -21,4 +21,4 @@ # SigComp -++sn --path ./sigcomp.sn \ No newline at end of file +#++sn --path ./sigcomp.sn \ No newline at end of file diff --git a/trunk/tinyMEDIA/droid-makefile b/trunk/tinyMEDIA/droid-makefile index e8bce78c..e83a1165 100644 --- a/trunk/tinyMEDIA/droid-makefile +++ b/trunk/tinyMEDIA/droid-makefile @@ -10,6 +10,8 @@ OBJS = \ src/tmedia_codec.o \ src/tmedia_codec_dummy.o \ src/tmedia_common.o \ + src/tmedia_consumer.o \ + src/tmedia_producer.o \ src/tmedia_qos.o \ src/tmedia_session.o \ src/tmedia_session_dummy.o \ diff --git a/trunk/tinyMEDIA/include/tinymedia/tmedia_consumer.h b/trunk/tinyMEDIA/include/tinymedia/tmedia_consumer.h index cba55b4c..de2387ac 100644 --- a/trunk/tinyMEDIA/include/tinymedia/tmedia_consumer.h +++ b/trunk/tinyMEDIA/include/tinymedia/tmedia_consumer.h @@ -35,6 +35,8 @@ #include "tinymedia/tmedia_codec.h" #include "tmedia_common.h" +TMEDIA_BEGIN_DECLS + /**Max number of plugins (consumer types) we can create */ #define TMED_CONSUMER_MAX_PLUGINS 0x0F @@ -86,5 +88,8 @@ TINYMEDIA_API int tmedia_consumer_deinit(tmedia_consumer_t* self); TINYMEDIA_API int tmedia_consumer_plugin_register(const tmedia_consumer_plugin_def_t* plugin); TINYMEDIA_API int tmedia_consumer_plugin_unregister(const tmedia_consumer_plugin_def_t* plugin); +TINYMEDIA_API int tmedia_consumer_plugin_unregister_by_type(tmedia_type_t type); + +TMEDIA_END_DECLS #endif /* TINYMEDIA_CONSUMER_H */ diff --git a/trunk/tinyMEDIA/include/tinymedia/tmedia_producer.h b/trunk/tinyMEDIA/include/tinymedia/tmedia_producer.h index fc5e4c3c..68215713 100644 --- a/trunk/tinyMEDIA/include/tinymedia/tmedia_producer.h +++ b/trunk/tinyMEDIA/include/tinymedia/tmedia_producer.h @@ -35,6 +35,8 @@ #include "tinymedia/tmedia_codec.h" #include "tmedia_common.h" +TMEDIA_BEGIN_DECLS + /**Max number of plugins (producer types) we can create */ #define TMED_PRODUCER_MAX_PLUGINS 0x0F @@ -90,5 +92,8 @@ TINYMEDIA_API int tmedia_producer_deinit(tmedia_producer_t* self); TINYMEDIA_API int tmedia_producer_plugin_register(const tmedia_producer_plugin_def_t* plugin); TINYMEDIA_API int tmedia_producer_plugin_unregister(const tmedia_producer_plugin_def_t* plugin); +TINYMEDIA_API int tmedia_producer_plugin_unregister_by_type(tmedia_type_t type); + +TMEDIA_END_DECLS #endif /* TINYMEDIA_PRODUCER_H */ diff --git a/trunk/tinyMEDIA/include/tinymedia/tmedia_session.h b/trunk/tinyMEDIA/include/tinymedia/tmedia_session.h index 1aaf0fba..de427e1d 100644 --- a/trunk/tinyMEDIA/include/tinymedia/tmedia_session.h +++ b/trunk/tinyMEDIA/include/tinymedia/tmedia_session.h @@ -45,6 +45,9 @@ TMEDIA_BEGIN_DECLS /**Max number of plugins (session types) we can create */ #define TMED_SESSION_MAX_PLUGINS 0x0F +/* Forward declaration */ +enum tmedia_session_param_type_e; + /** Base objct used for all media sessions */ typedef struct tmedia_session_s { diff --git a/trunk/tinyMEDIA/src/tmedia_codec.c b/trunk/tinyMEDIA/src/tmedia_codec.c index cb696076..47a494c1 100644 --- a/trunk/tinyMEDIA/src/tmedia_codec.c +++ b/trunk/tinyMEDIA/src/tmedia_codec.c @@ -127,7 +127,7 @@ int tmedia_codec_plugin_unregister(const tmedia_codec_plugin_def_t* plugin) } /* find the plugin to unregister */ - for(i = 0; itype & type) == __tmedia_consumer_plugins[i]->type){ + __tmedia_consumer_plugins[i] = tsk_null; + found = tsk_true; + break; + } + } + /* compact */ if(found){ for(; i<(TMED_CONSUMER_MAX_PLUGINS - 1); i++){ diff --git a/trunk/tinyMEDIA/src/tmedia_producer.c b/trunk/tinyMEDIA/src/tmedia_producer.c index 743783f7..2e827cb4 100644 --- a/trunk/tinyMEDIA/src/tmedia_producer.c +++ b/trunk/tinyMEDIA/src/tmedia_producer.c @@ -215,7 +215,7 @@ int tmedia_producer_plugin_unregister(const tmedia_producer_plugin_def_t* plugin } /* find the plugin to unregister */ - for(i = 0; itype & type) == __tmedia_producer_plugins[i]->type){ + __tmedia_producer_plugins[i] = tsk_null; + found = tsk_true; + break; + } + } + + /* compact */ + if(found){ + for(; i<(TMED_PRODUCER_MAX_PLUGINS - 1); i++){ + if(__tmedia_producer_plugins[i+1]){ + __tmedia_producer_plugins[i] = __tmedia_producer_plugins[i+1]; + } + else{ + break; + } + } + __tmedia_producer_plugins[i] = tsk_null; + } + return (found ? 0 : -2); +} diff --git a/trunk/tinyMEDIA/src/tmedia_session.c b/trunk/tinyMEDIA/src/tmedia_session.c index 04882e18..c024a954 100644 --- a/trunk/tinyMEDIA/src/tmedia_session.c +++ b/trunk/tinyMEDIA/src/tmedia_session.c @@ -174,7 +174,7 @@ int tmedia_session_plugin_unregister(const tmedia_session_plugin_def_t* plugin) } /* find the plugin to unregister */ - for(i = 0; icsrc_count)); + tsk_buffer_takeownership(buffer, (void**)&data, TRTP_RTP_HEADER_MIN_SIZE + (4 * self->csrc_count)); } return buffer; diff --git a/trunk/tinyRTP/src/trtp_manager.c b/trunk/tinyRTP/src/trtp_manager.c index 464a6d87..42feeaa3 100644 --- a/trunk/tinyRTP/src/trtp_manager.c +++ b/trunk/tinyRTP/src/trtp_manager.c @@ -34,6 +34,8 @@ #include "tsk_memory.h" #include "tsk_debug.h" +// TODO: Add support for outbound DTMF (http://www.ietf.org/rfc/rfc2833.txt) + /* ======================= Transport callback ========================== */ static int trtp_transport_layer_cb(const tnet_transport_event_t* e) { @@ -314,7 +316,7 @@ int trtp_manager_send_rtp(trtp_manager_t* self, const void* data, tsk_size_t siz } if(!self->started){ - TSK_DEBUG_ERROR("RTP/RTCP manager should be started before trying ti send data"); + TSK_DEBUG_ERROR("RTP/RTCP manager should be started before trying to send data"); return -2; } diff --git a/trunk/tinySAK/src/tsk_time.c b/trunk/tinySAK/src/tsk_time.c index 33364e77..61cc7728 100644 --- a/trunk/tinySAK/src/tsk_time.c +++ b/trunk/tinySAK/src/tsk_time.c @@ -29,6 +29,8 @@ */ #include "tsk_time.h" +#include "tsk_debug.h" + #if TSK_UNDER_WINDOWS //# ifdef _WIN32_WCE # include // timeval @@ -61,29 +63,43 @@ struct timezone int tz_dsttime; /* type of dst correction */ }; -#include int gettimeofday(struct timeval *tv, struct timezone *tz) { - #ifdef _WIN32_WCE - struct timeb tb; - ftime (&tb); -#elif defined(__MINGW32__) - //struct __timeb64 tb; - //_ftime64 (&tb); - struct _timeb tb; - _ftime (&tb); -#else - struct __timeb64 tb; - _ftime64_s (&tb); -#endif - - tv->tv_sec = (long)tb.time; // Fix: tv_sec wraps year 2038 (tv.time is ok though) - tv->tv_usec = tb.millitm * 1000L; - if( tz ){ - tz->tz_minuteswest = tb.timezone; /* minutes west of Greenwich */ - tz->tz_dsttime = tb.dstflag; /* type of dst correction */ - } -return 0; + FILETIME ft; + uint64_t tmpres = 0; + static int tzflag = 0; + + if(tv) + { +#ifdef _WIN32_WCE + SYSTEMTIME st; + GetSystemTime(&st); + SystemTimeToFileTime(&st, &ft); +#else + GetSystemTimeAsFileTime(&ft); +#endif + + tmpres |= ft.dwHighDateTime; + tmpres <<= 32; + tmpres |= ft.dwLowDateTime; + + /*converting file time to unix epoch*/ + tmpres /= 10; /*convert into microseconds*/ + tmpres -= DELTA_EPOCH_IN_MICROSECS; + tv->tv_sec = (long)(tmpres / 1000000UL); + tv->tv_usec = (long)(tmpres % 1000000UL); + } + + if (tz){ + if (!tzflag){ + _tzset(); + tzflag++; + } + tz->tz_minuteswest = _timezone / 60; + tz->tz_dsttime = _daylight; + } + + return 0; } #else @@ -104,6 +120,19 @@ int tsk_gettimeofday(struct timeval *tv, struct timezone *tz) return gettimeofday(tv, tz); } +/**@ingroup tsk_time_group +* Gets the number of milliseconds in @a tv +* @retval The number of milliseconds +*/ +uint64_t tsk_time_get_ms(struct timeval* tv) +{ + if(!tv){ + TSK_DEBUG_ERROR("Invalid parameter"); + return 0; + } + return (((uint64_t)tv->tv_sec)*(uint64_t)1000) + (((uint64_t)tv->tv_usec)/(uint64_t)1000); +} + /**@ingroup tsk_time_group * Gets the number of milliseconds since the EPOCH. * @retval The number of milliseconds since EPOCH. @@ -111,9 +140,8 @@ int tsk_gettimeofday(struct timeval *tv, struct timezone *tz) uint64_t tsk_time_epoch() { struct timeval tv; - static const uint64_t thousand = 1000; - gettimeofday(&tv, tsk_null); + gettimeofday(&tv, 0); - return (((uint64_t)tv.tv_sec)*thousand) + (((uint64_t)tv.tv_usec)/thousand); + return (((uint64_t)tv.tv_sec)*(uint64_t)1000) + (((uint64_t)tv.tv_usec)/(uint64_t)1000); } diff --git a/trunk/tinySAK/src/tsk_time.h b/trunk/tinySAK/src/tsk_time.h index 197b3376..95a2ad3c 100644 --- a/trunk/tinySAK/src/tsk_time.h +++ b/trunk/tinySAK/src/tsk_time.h @@ -45,6 +45,7 @@ struct timezone; #define TSK_TIME_MS_2_S(MS) ((MS)/1000) TINYSAK_API int tsk_gettimeofday(struct timeval *tv, struct timezone *tz); +TINYSAK_API uint64_t tsk_time_get_ms(struct timeval *tv); TINYSAK_API uint64_t tsk_time_epoch(); /**@ingroup tsk_time_group diff --git a/trunk/tinySDP/include/tinysdp/tsdp_message.h b/trunk/tinySDP/include/tinysdp/tsdp_message.h index 2c210b7e..8b890af0 100644 --- a/trunk/tinySDP/include/tinysdp/tsdp_message.h +++ b/trunk/tinySDP/include/tinysdp/tsdp_message.h @@ -54,7 +54,7 @@ typedef tsdp_message_t tsdp_caps_t; TINYSDP_API int tsdp_message_add_header(tsdp_message_t *self, const tsdp_header_t *hdr); TINYSDP_API int tsdp_message_add_headers(tsdp_message_t *self, ...); -#if !defined(_MSC_VER) || defined(__GNUC__) +#if defined(__SYMBIAN32__) && 0 static void TSDP_MESSAGE_ADD_HEADER(tsdp_message_t *self, ...) { va_list ap; @@ -63,7 +63,7 @@ static void TSDP_MESSAGE_ADD_HEADER(tsdp_message_t *self, ...) va_start(ap, self); objdef = va_arg(ap, const tsk_object_def_t*); - header = tsk_object_new_2(objdef, &ap); + header = (tsdp_header_t *)tsk_object_new_2(objdef, &ap); va_end(ap); tsdp_message_add_header(self, header); @@ -72,7 +72,7 @@ static void TSDP_MESSAGE_ADD_HEADER(tsdp_message_t *self, ...) #else #define TSDP_MESSAGE_ADD_HEADER(self, objdef, ...) \ { \ - tsdp_header_t *header = tsk_object_new(objdef, __VA_ARGS__); \ + tsdp_header_t *header = (tsdp_header_t *)tsk_object_new(objdef, ##__VA_ARGS__); \ tsdp_message_add_header(self, header); \ tsk_object_unref(header); \ } diff --git a/trunk/tinySIGCOMP/droid-makefile b/trunk/tinySIGCOMP/droid-makefile new file mode 100644 index 00000000..d0b826e2 --- /dev/null +++ b/trunk/tinySIGCOMP/droid-makefile @@ -0,0 +1,59 @@ +APP := lib$(PROJECT).$(EXT) + +CFLAGS := $(CFLAGS_LIB) -I../tinySAK/src -I./include +LDFLAGS := $(LDFLAGS_LIB) -ltinySAK -lm + +all: $(APP) + +OBJS = \ + src/adler32.o\ + src/compress.o\ + src/deflate.o\ + src/tcomp.o\ + src/tcomp_buffer.o\ + src/tcomp_compartment.o\ + src/tcomp_compressordata.o\ + src/tcomp_compressordisp.o\ + src/tcomp_compressor_deflate.o\ + src/tcomp_compressor_dummy.o\ + src/tcomp_decompressordisp.o\ + src/tcomp_deflatedata.o\ + src/tcomp_deflatedata.ghost.o\ + src/tcomp_deflatedata.zlib.o\ + src/tcomp_dicts.o\ + src/tcomp_manager.o\ + src/tcomp_message.o\ + src/tcomp_nackinfo.o\ + src/tcomp_params.o\ + src/tcomp_reqfeed.o\ + src/tcomp_result.o\ + src/tcomp_state.o\ + src/tcomp_statehandler.o\ + src/tcomp_udvm.bytecopy.o\ + src/tcomp_udvm.o\ + src/tcomp_udvm.instructions.o\ + src/tcomp_udvm.nack.o\ + src/tcomp_udvm.operands.o\ + src/tcomp_udvm.statemanagment.o\ + src/trees.o\ + src/zutil.o\ + + + +$(APP): $(OBJS) +ifeq ($(EXT), a) + $(AR) rcs $@ $^ +else + $(CC) $(LDFLAGS) -o $@ $^ +endif + +%.o: %.c + $(CC) -c $(INCLUDE) $(CFLAGS) $< -o $@ + +install: $(APP) + $(ANDROID_SDK_ROOT)/tools/adb remount + $(ANDROID_SDK_ROOT)/tools/adb push $(APP) $(LIB_DIR)/$(APP) + $(ANDROID_SDK_ROOT)/tools/adb shell chmod 777 $(LIB_DIR)/$(APP) + +clean: + @rm -f $(OBJS) $(APP) \ No newline at end of file diff --git a/trunk/tinySIP/droid-makefile b/trunk/tinySIP/droid-makefile index 68898e95..2df2375f 100644 --- a/trunk/tinySIP/droid-makefile +++ b/trunk/tinySIP/droid-makefile @@ -1,7 +1,7 @@ APP := lib$(PROJECT).$(EXT) -CFLAGS := $(CFLAGS_LIB) -I../tinySAK/src -I../tinyNET/src -I../tinyHTTP/include -I../tinyIPSec/src -I../tinySDP/include -I../tinyMEDIA/include -I./include -LDFLAGS := $(LDFLAGS_LIB) -ltinySAK -ltinyNET -ltinyHTTP -ltinyIPSec -ltinySDP -ltinyMEDIA +CFLAGS := $(CFLAGS_LIB) -I../tinySAK/src -I../tinyNET/src -I../tinyHTTP/include -I../tinyIPSec/src -I../tinySIGCOMP/src -I../tinySDP/include -I../tinyMEDIA/include -I./include +LDFLAGS := $(LDFLAGS_LIB) -ltinySAK -ltinyNET -ltinyHTTP -ltinyIPSec -ltinySDP -ltinyMEDIA -ltinySIGCOMP all: $(APP) @@ -149,6 +149,9 @@ OBJS += src/parsers/tsip_parser_header.o\ src/parsers/tsip_parser_message.o\ src/parsers/tsip_parser_uri.o + ### parsers +OBJS += src/sigcomp/tsip_sigcomp.o + ### transactions OBJS += src/transactions/tsip_transac.o\ src/transactions/tsip_transac_ict.o\ diff --git a/trunk/tinySIP/tinySIP.vcproj b/trunk/tinySIP/tinySIP.vcproj index a646a817..6f9e493e 100644 --- a/trunk/tinySIP/tinySIP.vcproj +++ b/trunk/tinySIP/tinySIP.vcproj @@ -772,54 +772,6 @@ > - - - - - - - - - - - - - - - - - - - - - - - - @@ -952,6 +904,54 @@ > + + + + + + + + + + + + + + + + + + + + + + + +