diff --git a/trunk/bindings/_common/Common.h b/trunk/bindings/_common/Common.h new file mode 100644 index 00000000..49a2216d --- /dev/null +++ b/trunk/bindings/_common/Common.h @@ -0,0 +1,32 @@ +/* +* 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_COMMON_H +#define TINYWRAP_COMMON_H + +#if ANDROID +# define dyn_cast static_cast +#else +# define dyn_cast dynamic_cast +#endif + +#endif /* TINYWRAP_COMMON_H */ + diff --git a/trunk/bindings/_common/MessagingEvent.cxx b/trunk/bindings/_common/MessagingEvent.cxx new file mode 100644 index 00000000..cf2f53b1 --- /dev/null +++ b/trunk/bindings/_common/MessagingEvent.cxx @@ -0,0 +1,21 @@ +/* +* 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. +* +*/ diff --git a/trunk/bindings/_common/MessagingEvent.h b/trunk/bindings/_common/MessagingEvent.h new file mode 100644 index 00000000..19bf9c76 --- /dev/null +++ b/trunk/bindings/_common/MessagingEvent.h @@ -0,0 +1,27 @@ +/* +* 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_MESSAGINGEVENT_H +#define TINYWRAP_MESSAGINGEVENT_H + + + +#endif /* TINYWRAP_MESSAGINGEVENT_H */ diff --git a/trunk/bindings/_common/RegistrationEvent.cxx b/trunk/bindings/_common/RegistrationEvent.cxx new file mode 100644 index 00000000..b14445c6 --- /dev/null +++ b/trunk/bindings/_common/RegistrationEvent.cxx @@ -0,0 +1,46 @@ +/* +* 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. +* +*/ +#include "RegistrationEvent.h" + +#include "RegistrationSession.h" +#include "Common.h" + +RegistrationEvent::RegistrationEvent() +{ + ::RegistrationEvent(0, tsk_null, tsk_null); +} + +RegistrationEvent::RegistrationEvent(short code, const char* phrase, RegistrationSession* session) +:SipEvent(code, phrase) +{ + this->type = tsip_event_register; + this->session = (session); +} + +RegistrationEvent::~RegistrationEvent() +{ +} + +const RegistrationSession* RegistrationEvent::getSession2() +{ + return dyn_cast(this->session); +} diff --git a/trunk/bindings/_common/RegistrationEvent.h b/trunk/bindings/_common/RegistrationEvent.h new file mode 100644 index 00000000..4f04f613 --- /dev/null +++ b/trunk/bindings/_common/RegistrationEvent.h @@ -0,0 +1,42 @@ +/* +* 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_REGISTRATIONEVENT_H +#define TINYWRAP_REGISTRATIONEVENT_H + +#include "SipEvent.h" + +class RegistrationSession; + +class RegistrationEvent: public SipEvent +{ +public: + RegistrationEvent(); +#if !defined(SWIG) + RegistrationEvent(short code, const char* phrase, RegistrationSession* session); +#endif + virtual ~RegistrationEvent(); + +public: + const RegistrationSession* getSession2(); +}; + +#endif /* TINYWRAP_REGISTRATIONEVENT_H */ diff --git a/trunk/bindings/_common/RegistrationSession.cxx b/trunk/bindings/_common/RegistrationSession.cxx new file mode 100644 index 00000000..f1ea0ee4 --- /dev/null +++ b/trunk/bindings/_common/RegistrationSession.cxx @@ -0,0 +1,45 @@ +/* +* 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. +* +*/ +#include "RegistrationSession.h" + +RegistrationSession::RegistrationSession(SipStack* Stack) +: SipSession(Stack) +{ +} + +bool RegistrationSession::Register(unsigned expires) +{ + int ret = tsip_action_REGISTER(this->handle, + TSIP_ACTION_SET_NULL()); + return (ret == 0); +} + +bool RegistrationSession::UnRegister() +{ + int ret = tsip_action_UNREGISTER(this->handle, + TSIP_ACTION_SET_NULL()); + return (ret == 0); +} + +RegistrationSession::~RegistrationSession() +{ +} diff --git a/trunk/bindings/_common/RegistrationSession.h b/trunk/bindings/_common/RegistrationSession.h new file mode 100644 index 00000000..51155146 --- /dev/null +++ b/trunk/bindings/_common/RegistrationSession.h @@ -0,0 +1,33 @@ +/* +* 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. +* +*/ +#include "SipSession.h" + +class RegistrationSession : public SipSession +{ +public: /* ctor() and dtor() */ + RegistrationSession(SipStack* Stack); + virtual ~RegistrationSession(); + +public: /* Public functions */ + bool Register(unsigned expires); + bool UnRegister(); +}; diff --git a/trunk/bindings/_common/SafeObject.cxx b/trunk/bindings/_common/SafeObject.cxx new file mode 100644 index 00000000..0ed14e0c --- /dev/null +++ b/trunk/bindings/_common/SafeObject.cxx @@ -0,0 +1,42 @@ +/* +* 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. +* +*/ +#include "SafeObject.h" + +SafeObject::SafeObject() +{ + this->mutex = tsk_mutex_create(); +} + +int SafeObject::Lock() +{ + return tsk_mutex_lock(this->mutex); +} + +int SafeObject::UnLock() +{ + return tsk_mutex_unlock(this->mutex); +} + +SafeObject::~SafeObject() +{ + tsk_mutex_destroy(&this->mutex); +} diff --git a/trunk/bindings/_common/SafeObject.h b/trunk/bindings/_common/SafeObject.h new file mode 100644 index 00000000..f0b95159 --- /dev/null +++ b/trunk/bindings/_common/SafeObject.h @@ -0,0 +1,41 @@ +/* +* 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_SAFEOBJECT_H +#define TINYWRAP_SAFEOBJECT_H + +#include "tsk_mutex.h" + +class SafeObject +{ +public: + SafeObject(); + virtual ~SafeObject(); + +/* protected: */ + int Lock(); + int UnLock(); + +private: + tsk_mutex_handle_t *mutex; +}; + +#endif /* TINYWRAP_SAFEOBJECT_H */ diff --git a/trunk/bindings/_common/SipCallback.cxx b/trunk/bindings/_common/SipCallback.cxx new file mode 100644 index 00000000..4db95f52 --- /dev/null +++ b/trunk/bindings/_common/SipCallback.cxx @@ -0,0 +1,31 @@ +/* +* 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. +* +*/ +#include "SipCallback.h" + + + + + + + + + diff --git a/trunk/bindings/_common/SipCallback.h b/trunk/bindings/_common/SipCallback.h new file mode 100644 index 00000000..27527091 --- /dev/null +++ b/trunk/bindings/_common/SipCallback.h @@ -0,0 +1,38 @@ +/* +* 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_SIPCALLBACK_H +#define TINYWRAP_SIPCALLBACK_H + +class RegistrationEvent; + +class SipCallback +{ +public: + SipCallback() { } + virtual ~SipCallback() {} + virtual int OnRegistrationChanged(const RegistrationEvent* e) { return -1; } + +private: + +}; + +#endif /* TINYWRAP_SIPCALLBACK_H */ diff --git a/trunk/bindings/_common/SipEvent.cxx b/trunk/bindings/_common/SipEvent.cxx new file mode 100644 index 00000000..43b9cd77 --- /dev/null +++ b/trunk/bindings/_common/SipEvent.cxx @@ -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. +* +*/ +#include "SipEvent.h" +#include "SipSession.h" + +SipEvent::SipEvent() +{ + ::SipEvent(0, tsk_null); +} + +SipEvent::SipEvent(short code, const char* phrase) +{ + this->code = code; + this->phrase = tsk_strdup(phrase); + this->session = tsk_null; +} + + +short SipEvent::getCode() +{ + return this->code; +} + +const char* SipEvent::getPhrase() +{ + return this->phrase; +} + +tsip_event_type_t SipEvent::getType() +{ + return this->type; +} + +const SipSession* SipEvent::getSession() +{ + return this->session; +} + +SipEvent::~SipEvent() +{ + TSK_FREE(this->phrase); + /* Do not delete the session => you are not the owner (from stack callback) */ +} + diff --git a/trunk/bindings/_common/SipEvent.h b/trunk/bindings/_common/SipEvent.h new file mode 100644 index 00000000..e45171a7 --- /dev/null +++ b/trunk/bindings/_common/SipEvent.h @@ -0,0 +1,51 @@ +/* +* 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_SIPEVENT_H +#define TINYWRAP_SIPEVENT_H + +#include "tinysip.h" + +class SipSession; + +class SipEvent +{ +public: + SipEvent(); + SipEvent(short code, const char* phrase); + virtual ~SipEvent(); + +public: + short getCode(); + const char* getPhrase(); + tsip_event_type_t getType(); + const SipSession* getSession(); + + +protected: + short code; + char* phrase; + tsip_event_type_t type; + const SipSession* session; +}; + + +#endif /* TINYWRAP_SIPEVENT_H */ diff --git a/trunk/bindings/_common/SipSession.cxx b/trunk/bindings/_common/SipSession.cxx new file mode 100644 index 00000000..d7a0a624 --- /dev/null +++ b/trunk/bindings/_common/SipSession.cxx @@ -0,0 +1,107 @@ +/* +* 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. +* +*/ +#include "SipSession.h" +#include "SipStack.h" + +SipSession::SipSession(SipStack* Stack) +{ + this->handle = tsip_ssession_create(Stack->getHandle(), + TSIP_SSESSION_SET_CONTEXT(this), + TSIP_SSESSION_SET_NULL()); +} + +SipSession::~SipSession() +{ + tsip_ssession_set(this->handle, + TSIP_SSESSION_SET_CONTEXT(tsk_null), + TSIP_SSESSION_SET_NULL()); + + TSK_OBJECT_SAFE_FREE(this->handle); +} + +bool SipSession::addHeader(const char* name, const char* value) +{ + int ret = tsip_ssession_set(this->handle, + TSIP_SSESSION_SET_HEADER(name, value), + TSIP_SSESSION_SET_NULL()); + return (ret == 0); +} + +bool SipSession::removeHeader(const char* name) +{ + int ret = tsip_ssession_set(this->handle, + TSIP_SSESSION_UNSET_HEADER(name), + TSIP_SSESSION_SET_NULL()); + return (ret == 0); +} + +bool SipSession::addCaps(const char* name, const char* value) +{ + int ret = tsip_ssession_set(this->handle, + TSIP_SSESSION_SET_CAPS(name, value), + TSIP_SSESSION_SET_NULL()); + return (ret == 0); +} + +bool SipSession::addCaps(const char* name) +{ + int ret = tsip_ssession_set(this->handle, + TSIP_SSESSION_SET_CAPS(name, tsk_null), + TSIP_SSESSION_SET_NULL()); + return (ret == 0); +} + +bool SipSession::removeCaps(const char* name) +{ + int ret = tsip_ssession_set(this->handle, + TSIP_SSESSION_UNSET_CAPS(name), + TSIP_SSESSION_SET_NULL()); + return (ret == 0); +} + +bool SipSession::setExpires(unsigned expires) +{ + /* FIXME: */ + tsk_istr_t str; + tsk_itoa(expires, &str); + int ret = tsip_ssession_set(this->handle, + TSIP_SSESSION_SET_OPTION(TSIP_SSESSION_OPTION_EXPIRES, str), + TSIP_SSESSION_SET_NULL()); + return (ret == 0); +} + +bool SipSession::setFromUri(const char* fromUri) +{ + int ret = tsip_ssession_set(this->handle, + TSIP_SSESSION_SET_OPTION(TSIP_SSESSION_OPTION_FROM, fromUri), + TSIP_SSESSION_SET_NULL()); + return (ret == 0); +} + +bool SipSession::setToUri(const char* toUri) +{ + int ret = tsip_ssession_set(this->handle, + TSIP_SSESSION_SET_OPTION(TSIP_SSESSION_OPTION_TO, toUri), + TSIP_SSESSION_SET_NULL()); + return (ret == 0); +} + diff --git a/trunk/bindings/_common/SipSession.h b/trunk/bindings/_common/SipSession.h new file mode 100644 index 00000000..43d7f8fa --- /dev/null +++ b/trunk/bindings/_common/SipSession.h @@ -0,0 +1,50 @@ +/* +* 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_SIPSESSION_H +#define TINYWRAP_SIPSESSION_H + +#include "tinysip.h" + +class SipStack; + +class SipSession +{ +public: + SipSession(SipStack* Stack); + virtual ~SipSession(); + +public: + bool addHeader(const char* name, const char* value); + bool removeHeader(const char* name); + bool addCaps(const char* name, const char* value); + bool addCaps(const char* name); + bool removeCaps(const char* name); + bool setExpires(unsigned expires); + bool setFromUri(const char* fromUri); + bool setToUri(const char* toUri); + /* bool setPayload(const void* payload, unsigned size); */ + +protected: + tsip_ssession_handle_t* handle; +}; + +#endif /* TINYWRAP_SIPSESSION_H */ diff --git a/trunk/bindings/_common/SipStack.cxx b/trunk/bindings/_common/SipStack.cxx new file mode 100644 index 00000000..6f2bb076 --- /dev/null +++ b/trunk/bindings/_common/SipStack.cxx @@ -0,0 +1,222 @@ +/* +* 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. +* +*/ +#include "SipStack.h" + +#include "SipSession.h" +#include "RegistrationEvent.h" +#include "RegistrationSession.h" + +#include "Common.h" + +unsigned SipStack::count = 0; + +/* === ANSI-C functions (local use) === */ +int stack_callback(const tsip_event_t *sipevent); +int session_handle_event(const tsip_event_t *sipevent); + +/* === default values === */ +#ifndef DEFAULT_LOCAL_IP +//# ifdef ANDROID /* On the emulator */ +//# define DEFAULT_LOCAL_IP "10.0.2.15" +//# else +# define DEFAULT_LOCAL_IP TNET_SOCKET_HOST_ANY +//# endif +#endif + +SipStack::SipStack(SipCallback* callback_, const char* realm_uri, const char* impi_uri, const char* impu_uri) +:SafeObject() +{ + this->callback = callback_; + + /* Initialize network layer */ + if(SipStack::count == 0){ + tnet_startup(); + } + + /* Creates stack handle */ + this->handle = tsip_stack_create(stack_callback, realm_uri, impi_uri, impu_uri, + TSIP_STACK_SET_LOCAL_IP(DEFAULT_LOCAL_IP), + TSIP_STACK_SET_USERDATA(this), /* used as context */ + TSIP_STACK_SET_NULL()); + + SipStack::count++; +} + +SipStack::~SipStack() +{ + this->Stop(); + + /* Destroy stack handle */ + TSK_OBJECT_SAFE_FREE(this->handle); + + /* DeInitialize the network layer (only if last stack) */ + if(--SipStack::count == 0){ + tnet_cleanup(); + } +} + +bool SipStack::Start() +{ + int ret = tsip_stack_start(this->handle); + return (ret == 0); +} + +bool SipStack::setProxyCSCF(const char* fqdn, unsigned port, const char* transport, const char* ipversion) +{ + int ret = tsip_stack_set(this->handle, + TSIP_STACK_SET_PROXY_CSCF(fqdn, port, transport, ipversion), + TSIP_STACK_SET_NULL()); + return (ret == 0); +} + +bool SipStack::setLocalIP(const char* ip) +{ + int ret = tsip_stack_set(this->handle, + TSIP_STACK_SET_LOCAL_IP(ip), + TSIP_STACK_SET_NULL()); + return (ret == 0); +} + +bool SipStack::setLocalPort(unsigned port) +{ + int ret = tsip_stack_set(this->handle, + TSIP_STACK_SET_LOCAL_PORT(port), + TSIP_STACK_SET_NULL()); + return (ret == 0); +} + +bool SipStack::addHeader(const char* name, const char* value) +{ + int ret = tsip_stack_set(this->handle, + TSIP_STACK_SET_HEADER(name, value), + TSIP_STACK_SET_NULL()); + return (ret == 0); +} + +bool SipStack::removeHeader(const char* name) +{ + int ret = tsip_stack_set(this->handle, + TSIP_STACK_UNSET_HEADER(name), + TSIP_STACK_SET_NULL()); + return (ret == 0); +} + +bool SipStack::Stop() +{ + int ret = tsip_stack_stop(this->handle); + return (ret == 0); +} + +tsip_stack_handle_t* SipStack::getHandle() +{ + return this->handle; +} + +SipCallback* SipStack::getCallback() +{ + return this->callback; +} + +int stack_callback(const tsip_event_t *sipevent) +{ + int ret = 0; + SipStack* Stack = tsk_null; + SipSession* Session = tsk_null; + SipEvent* e = tsk_null; + + if(!sipevent){ /* should never happen ...but who know? */ + TSK_DEBUG_WARN("Null SIP event."); + return -1; + } + else{ + /* retrive the stack from the context */ + if((Stack = (SipStack*)sipevent->user_data)){ + Session = dyn_cast((SipSession*)tsip_ssession_get_context(sipevent->ss)); + } + } + + if(!Stack || !Session){ + TSK_DEBUG_WARN("Invalid SIP event."); + return -2; + } + + Stack->Lock(); + + switch(sipevent->type){ + case tsip_event_register: + { /* REGISTER */ + if(Stack->getCallback()){ + e = new RegistrationEvent(sipevent->code, sipevent->phrase, dyn_cast(Session)); + Stack->getCallback()->OnRegistrationChanged((const RegistrationEvent*)e); + } + //ret = register_handle_event(sipevent); + break; + } + case tsip_event_invite: + { /* INVITE */ + //ret = invite_handle_event(sipevent); + break; + } + case tsip_event_message: + { /* MESSAGE */ + //ret = message_handle_event(sipevent); + break; + } + case tsip_event_options: + { /* OPTIONS */ + //ret = options_handle_event(sipevent); + break; + } + case tsip_event_publish: + { /* PUBLISH */ + //ret = publish_handle_event(sipevent); + break; + } + case tsip_event_subscribe: + { /* SUBSCRIBE */ + //ret = subscribe_handle_event(sipevent); + break; + } + + case tsip_event_dialog: + { /* Common to all dialogs */ + //ret = session_handle_event(sipevent); + break; + } + + default: + { /* Unsupported */ + TSK_DEBUG_WARN("%d not supported as SIP event.", sipevent->type); + ret = -3; + break; + } + } + + Stack->UnLock(); + + if(e){ + delete e; + } + + return ret; +} + diff --git a/trunk/bindings/_common/SipStack.h b/trunk/bindings/_common/SipStack.h new file mode 100644 index 00000000..efc058dc --- /dev/null +++ b/trunk/bindings/_common/SipStack.h @@ -0,0 +1,60 @@ +/* +* 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_SIPSTACK_H +#define TINYWRAP_SIPSTACK_H + +#include "SipCallback.h" +#include "SafeObject.h" + +#include "tinysip.h" + +class SipStack: public SafeObject +{ +public: /* ctor() and dtor() */ + SipStack(SipCallback* callback, const char* realm_uri, const char* impi_uri, const char* impu_uri); + ~SipStack(); + +public: /* API functions */ + bool Start(); + + bool setProxyCSCF(const char* fqdn, unsigned port, const char* transport, const char* ipversion); + bool setLocalIP(const char* ip); + bool setLocalPort(unsigned port); + bool addHeader(const char* name, const char* value); + bool removeHeader(const char* name); + + bool Stop(); + +public: /* Public helper function */ +#if !defined(SWIG) + tsip_stack_handle_t* getHandle(); + SipCallback* getCallback(); +#endif + +private: + SipCallback* callback; + tsip_stack_handle_t *handle; + + static unsigned count; +}; + +#endif /* TINYWRAP_SIPSTACK_H */ diff --git a/trunk/bindings/_common/SubsciptionSession.cxx b/trunk/bindings/_common/SubsciptionSession.cxx new file mode 100644 index 00000000..66ef7962 --- /dev/null +++ b/trunk/bindings/_common/SubsciptionSession.cxx @@ -0,0 +1,23 @@ +/* +* 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. +* +*/ + + diff --git a/trunk/bindings/_common/SubscriptionEvent.cxx b/trunk/bindings/_common/SubscriptionEvent.cxx new file mode 100644 index 00000000..cd8c9abb --- /dev/null +++ b/trunk/bindings/_common/SubscriptionEvent.cxx @@ -0,0 +1,22 @@ +/* +* 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. +* +*/ + diff --git a/trunk/bindings/_common/SubscriptionEvent.h b/trunk/bindings/_common/SubscriptionEvent.h new file mode 100644 index 00000000..43e8e340 --- /dev/null +++ b/trunk/bindings/_common/SubscriptionEvent.h @@ -0,0 +1,27 @@ +/* +* 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_SUBSCRIPTIONEVENT_H +#define TINYWRAP_SUBSCRIPTIONEVENT_H + + + +#endif /* TINYWRAP_SUBSCRIPTIONEVENT_H */ diff --git a/trunk/bindings/_common/SubscriptionSession.h b/trunk/bindings/_common/SubscriptionSession.h new file mode 100644 index 00000000..b1a9e6e5 --- /dev/null +++ b/trunk/bindings/_common/SubscriptionSession.h @@ -0,0 +1,27 @@ +/* +* 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_SUBSCRIPTIONSESSION_H +#define TINYWRAP_SUBSCRIPTIONSESSION_H + + + +#endif /* TINYWRAP_SUBSCRIPTIONSESSION_H */ diff --git a/trunk/bindings/_common/tinyWRAP.i b/trunk/bindings/_common/tinyWRAP.i new file mode 100644 index 00000000..75b9b277 --- /dev/null +++ b/trunk/bindings/_common/tinyWRAP.i @@ -0,0 +1,42 @@ +/* File : tinyWRAP.i */ +%module(directors="1") tinyWRAP +%{ +#include "SipEvent.h" +#include "SipSession.h" +#include "RegistrationEvent.h" +#include "RegistrationSession.h" +#include "SubscriptionEvent.h" +#include "SubscriptionSession.h" +#include "SipCallback.h" +#include "SafeObject.h" +#include "SipStack.h" +%} + +/* turn on director wrapping Callback */ +%feature("director") SipCallback; + +%nodefaultctor; +%include "SipEvent.h" +%include "SipSession.h" +%include "RegistrationEvent.h" +%include "RegistrationSession.h" +%include "SubscriptionEvent.h" +%include "SubscriptionSession.h" +%include "SipCallback.h" +%include "SafeObject.h" +%include "SipStack.h" +%clearnodefaultctor; + +/* ====== From "tinySIP\include\tinysip\tsip_event.h" ====== */ +typedef enum tsip_event_type_e +{ + tsip_event_invite, + tsip_event_message, + tsip_event_options, + tsip_event_publish, + tsip_event_register, + tsip_event_subscribe, + + tsip_event_dialog +} +tsip_event_type_t; \ No newline at end of file diff --git a/trunk/bindings/autogen.sh b/trunk/bindings/autogen.sh new file mode 100644 index 00000000..777d89cd --- /dev/null +++ b/trunk/bindings/autogen.sh @@ -0,0 +1,7 @@ +# CSharp +echo "CSharp..." +swig -c++ -csharp -outdir csharp -o csharp/tinyWRAP_wrap.cxx _common/tinyWRAP.i + +# Java +echo "Java..." +swig -c++ -java -package org.doubango.tinyWRAP -outdir java -o java/tinyWRAP_wrap.cxx _common/tinyWRAP.i \ No newline at end of file diff --git a/trunk/bindings/csharp/RegistrationEvent.cs b/trunk/bindings/csharp/RegistrationEvent.cs new file mode 100644 index 00000000..c1793d5b --- /dev/null +++ b/trunk/bindings/csharp/RegistrationEvent.cs @@ -0,0 +1,51 @@ +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 1.3.40 + * + * Do not make changes to this file unless you know what you are doing--modify + * the SWIG interface file instead. + * ----------------------------------------------------------------------------- */ + + +using System; +using System.Runtime.InteropServices; + +public class RegistrationEvent : SipEvent { + private HandleRef swigCPtr; + + internal RegistrationEvent(IntPtr cPtr, bool cMemoryOwn) : base(tinyWRAPPINVOKE.RegistrationEventUpcast(cPtr), cMemoryOwn) { + swigCPtr = new HandleRef(this, cPtr); + } + + internal static HandleRef getCPtr(RegistrationEvent obj) { + return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr; + } + + ~RegistrationEvent() { + Dispose(); + } + + 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); + } + GC.SuppressFinalize(this); + base.Dispose(); + } + } + + public RegistrationEvent() : this(tinyWRAPPINVOKE.new_RegistrationEvent(), true) { + } + + public RegistrationSession getSession2() { + IntPtr cPtr = tinyWRAPPINVOKE.RegistrationEvent_getSession2(swigCPtr); + RegistrationSession ret = (cPtr == IntPtr.Zero) ? null : new RegistrationSession(cPtr, false); + return ret; + } + +} diff --git a/trunk/bindings/csharp/RegistrationSession.cs b/trunk/bindings/csharp/RegistrationSession.cs new file mode 100644 index 00000000..8f10b006 --- /dev/null +++ b/trunk/bindings/csharp/RegistrationSession.cs @@ -0,0 +1,55 @@ +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 1.3.40 + * + * Do not make changes to this file unless you know what you are doing--modify + * the SWIG interface file instead. + * ----------------------------------------------------------------------------- */ + + +using System; +using System.Runtime.InteropServices; + +public class RegistrationSession : SipSession { + private HandleRef swigCPtr; + + internal RegistrationSession(IntPtr cPtr, bool cMemoryOwn) : base(tinyWRAPPINVOKE.RegistrationSessionUpcast(cPtr), cMemoryOwn) { + swigCPtr = new HandleRef(this, cPtr); + } + + internal static HandleRef getCPtr(RegistrationSession obj) { + return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr; + } + + ~RegistrationSession() { + Dispose(); + } + + 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); + } + GC.SuppressFinalize(this); + base.Dispose(); + } + } + + public RegistrationSession(SipStack Stack) : this(tinyWRAPPINVOKE.new_RegistrationSession(SipStack.getCPtr(Stack)), true) { + } + + public bool Register(uint expires) { + bool ret = tinyWRAPPINVOKE.RegistrationSession_Register(swigCPtr, expires); + return ret; + } + + public bool UnRegister() { + bool ret = tinyWRAPPINVOKE.RegistrationSession_UnRegister(swigCPtr); + return ret; + } + +} diff --git a/trunk/bindings/csharp/SafeObject.cs b/trunk/bindings/csharp/SafeObject.cs new file mode 100644 index 00000000..b180e878 --- /dev/null +++ b/trunk/bindings/csharp/SafeObject.cs @@ -0,0 +1,56 @@ +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 1.3.40 + * + * Do not make changes to this file unless you know what you are doing--modify + * the SWIG interface file instead. + * ----------------------------------------------------------------------------- */ + + +using System; +using System.Runtime.InteropServices; + +public class SafeObject : IDisposable { + private HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal SafeObject(IntPtr cPtr, bool cMemoryOwn) { + swigCMemOwn = cMemoryOwn; + swigCPtr = new HandleRef(this, cPtr); + } + + internal static HandleRef getCPtr(SafeObject obj) { + return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr; + } + + ~SafeObject() { + Dispose(); + } + + 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); + } + GC.SuppressFinalize(this); + } + } + + public SafeObject() : this(tinyWRAPPINVOKE.new_SafeObject(), true) { + } + + public int Lock() { + int ret = tinyWRAPPINVOKE.SafeObject_Lock(swigCPtr); + return ret; + } + + public int UnLock() { + int ret = tinyWRAPPINVOKE.SafeObject_UnLock(swigCPtr); + return ret; + } + +} diff --git a/trunk/bindings/csharp/SipCallback.cs b/trunk/bindings/csharp/SipCallback.cs new file mode 100644 index 00000000..1079a4dc --- /dev/null +++ b/trunk/bindings/csharp/SipCallback.cs @@ -0,0 +1,73 @@ +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 1.3.40 + * + * Do not make changes to this file unless you know what you are doing--modify + * the SWIG interface file instead. + * ----------------------------------------------------------------------------- */ + + +using System; +using System.Runtime.InteropServices; + +public class SipCallback : IDisposable { + private HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal SipCallback(IntPtr cPtr, bool cMemoryOwn) { + swigCMemOwn = cMemoryOwn; + swigCPtr = new HandleRef(this, cPtr); + } + + internal static HandleRef getCPtr(SipCallback obj) { + return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr; + } + + ~SipCallback() { + Dispose(); + } + + 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); + } + GC.SuppressFinalize(this); + } + } + + public SipCallback() : this(tinyWRAPPINVOKE.new_SipCallback(), true) { + SwigDirectorConnect(); + } + + public virtual int OnRegistrationChanged(RegistrationEvent e) { + int ret = ((this.GetType() == typeof(SipCallback)) ? tinyWRAPPINVOKE.SipCallback_OnRegistrationChanged(swigCPtr, RegistrationEvent.getCPtr(e)) : tinyWRAPPINVOKE.SipCallback_OnRegistrationChangedSwigExplicitSipCallback(swigCPtr, RegistrationEvent.getCPtr(e))); + return ret; + } + + private void SwigDirectorConnect() { + if (SwigDerivedClassHasMethod("OnRegistrationChanged", swigMethodTypes0)) + swigDelegate0 = new SwigDelegateSipCallback_0(SwigDirectorOnRegistrationChanged); + tinyWRAPPINVOKE.SipCallback_director_connect(swigCPtr, swigDelegate0); + } + + 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(SipCallback)); + return hasDerivedMethod; + } + + private int SwigDirectorOnRegistrationChanged(IntPtr e) { + return OnRegistrationChanged((e == IntPtr.Zero) ? null : new RegistrationEvent(e, false)); + } + + public delegate int SwigDelegateSipCallback_0(IntPtr e); + + private SwigDelegateSipCallback_0 swigDelegate0; + + private static Type[] swigMethodTypes0 = new Type[] { typeof(RegistrationEvent) }; +} diff --git a/trunk/bindings/csharp/SipEvent.cs b/trunk/bindings/csharp/SipEvent.cs new file mode 100644 index 00000000..8b57cc4b --- /dev/null +++ b/trunk/bindings/csharp/SipEvent.cs @@ -0,0 +1,70 @@ +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 1.3.40 + * + * Do not make changes to this file unless you know what you are doing--modify + * the SWIG interface file instead. + * ----------------------------------------------------------------------------- */ + + +using System; +using System.Runtime.InteropServices; + +public class SipEvent : IDisposable { + private HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal SipEvent(IntPtr cPtr, bool cMemoryOwn) { + swigCMemOwn = cMemoryOwn; + swigCPtr = new HandleRef(this, cPtr); + } + + internal static HandleRef getCPtr(SipEvent obj) { + return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr; + } + + ~SipEvent() { + Dispose(); + } + + 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); + } + GC.SuppressFinalize(this); + } + } + + public SipEvent() : this(tinyWRAPPINVOKE.new_SipEvent__SWIG_0(), true) { + } + + public SipEvent(short code, string phrase) : this(tinyWRAPPINVOKE.new_SipEvent__SWIG_1(code, phrase), true) { + } + + public short getCode() { + short ret = tinyWRAPPINVOKE.SipEvent_getCode(swigCPtr); + return ret; + } + + public string getPhrase() { + string ret = tinyWRAPPINVOKE.SipEvent_getPhrase(swigCPtr); + return ret; + } + + public tsip_event_type_t getType() { + tsip_event_type_t ret = (tsip_event_type_t)tinyWRAPPINVOKE.SipEvent_getType(swigCPtr); + return ret; + } + + public SipSession getSession() { + IntPtr cPtr = tinyWRAPPINVOKE.SipEvent_getSession(swigCPtr); + SipSession ret = (cPtr == IntPtr.Zero) ? null : new SipSession(cPtr, false); + return ret; + } + +} diff --git a/trunk/bindings/csharp/SipEventType.cs b/trunk/bindings/csharp/SipEventType.cs new file mode 100644 index 00000000..acc9afe3 --- /dev/null +++ b/trunk/bindings/csharp/SipEventType.cs @@ -0,0 +1,18 @@ +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 1.3.40 + * + * Do not make changes to this file unless you know what you are doing--modify + * the SWIG interface file instead. + * ----------------------------------------------------------------------------- */ + + +public enum SipEventType { + E_INVITE = tsip_event_invite, + E_MESSAGE = tsip_event_message, + E_OPTIONS = tsip_event_options, + E_PUBLISH = tsip_event_publish, + E_REGISTER = tsip_event_register, + E_SUBSCRIBE = tsip_event_subscribe, + E_DIALOG = tsip_event_dialog +} diff --git a/trunk/bindings/csharp/SipSession.cs b/trunk/bindings/csharp/SipSession.cs new file mode 100644 index 00000000..a7b265f8 --- /dev/null +++ b/trunk/bindings/csharp/SipSession.cs @@ -0,0 +1,86 @@ +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 1.3.40 + * + * Do not make changes to this file unless you know what you are doing--modify + * the SWIG interface file instead. + * ----------------------------------------------------------------------------- */ + + +using System; +using System.Runtime.InteropServices; + +public class SipSession : IDisposable { + private HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal SipSession(IntPtr cPtr, bool cMemoryOwn) { + swigCMemOwn = cMemoryOwn; + swigCPtr = new HandleRef(this, cPtr); + } + + internal static HandleRef getCPtr(SipSession obj) { + return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr; + } + + ~SipSession() { + Dispose(); + } + + 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); + } + GC.SuppressFinalize(this); + } + } + + public SipSession(SipStack Stack) : this(tinyWRAPPINVOKE.new_SipSession(SipStack.getCPtr(Stack)), true) { + } + + public bool addHeader(string name, string value) { + bool ret = tinyWRAPPINVOKE.SipSession_addHeader(swigCPtr, name, value); + return ret; + } + + public bool removeHeader(string name) { + bool ret = tinyWRAPPINVOKE.SipSession_removeHeader(swigCPtr, name); + return ret; + } + + public bool addCaps(string name, string value) { + bool ret = tinyWRAPPINVOKE.SipSession_addCaps__SWIG_0(swigCPtr, name, value); + return ret; + } + + public bool addCaps(string name) { + bool ret = tinyWRAPPINVOKE.SipSession_addCaps__SWIG_1(swigCPtr, name); + return ret; + } + + public bool removeCaps(string name) { + bool ret = tinyWRAPPINVOKE.SipSession_removeCaps(swigCPtr, name); + return ret; + } + + public bool setExpires(uint expires) { + bool ret = tinyWRAPPINVOKE.SipSession_setExpires(swigCPtr, expires); + return ret; + } + + public bool setFromUri(string fromUri) { + bool ret = tinyWRAPPINVOKE.SipSession_setFromUri(swigCPtr, fromUri); + return ret; + } + + public bool setToUri(string toUri) { + bool ret = tinyWRAPPINVOKE.SipSession_setToUri(swigCPtr, toUri); + return ret; + } + +} diff --git a/trunk/bindings/csharp/SipStack.cs b/trunk/bindings/csharp/SipStack.cs new file mode 100644 index 00000000..3c3758d8 --- /dev/null +++ b/trunk/bindings/csharp/SipStack.cs @@ -0,0 +1,80 @@ +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 1.3.40 + * + * Do not make changes to this file unless you know what you are doing--modify + * the SWIG interface file instead. + * ----------------------------------------------------------------------------- */ + + +using System; +using System.Runtime.InteropServices; + +public class SipStack : SafeObject { + private HandleRef swigCPtr; + + internal SipStack(IntPtr cPtr, bool cMemoryOwn) : base(tinyWRAPPINVOKE.SipStackUpcast(cPtr), cMemoryOwn) { + swigCPtr = new HandleRef(this, cPtr); + } + + internal static HandleRef getCPtr(SipStack obj) { + return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr; + } + + ~SipStack() { + Dispose(); + } + + 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); + } + GC.SuppressFinalize(this); + base.Dispose(); + } + } + + public SipStack(SipCallback callback, string realm_uri, string impi_uri, string impu_uri) : this(tinyWRAPPINVOKE.new_SipStack(SipCallback.getCPtr(callback), realm_uri, impi_uri, impu_uri), true) { + } + + public bool Start() { + bool ret = tinyWRAPPINVOKE.SipStack_Start(swigCPtr); + return ret; + } + + public bool setProxyCSCF(string fqdn, uint port, string transport, string ipversion) { + bool ret = tinyWRAPPINVOKE.SipStack_setProxyCSCF(swigCPtr, fqdn, port, transport, ipversion); + return ret; + } + + public bool setLocalIP(string ip) { + bool ret = tinyWRAPPINVOKE.SipStack_setLocalIP(swigCPtr, ip); + return ret; + } + + public bool setLocalPort(uint port) { + bool ret = tinyWRAPPINVOKE.SipStack_setLocalPort(swigCPtr, port); + return ret; + } + + public bool addHeader(string name, string value) { + bool ret = tinyWRAPPINVOKE.SipStack_addHeader(swigCPtr, name, value); + return ret; + } + + public bool removeHeader(string name) { + bool ret = tinyWRAPPINVOKE.SipStack_removeHeader(swigCPtr, name); + return ret; + } + + public bool Stop() { + bool ret = tinyWRAPPINVOKE.SipStack_Stop(swigCPtr); + return ret; + } + +} diff --git a/trunk/bindings/csharp/test/Program.cs b/trunk/bindings/csharp/test/Program.cs new file mode 100644 index 00000000..6b1bad01 --- /dev/null +++ b/trunk/bindings/csharp/test/Program.cs @@ -0,0 +1,67 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace test +{ + class Program + { + const String REALM = "ericsson.com"; + const String USER = "mamadou"; + const String PROXY_CSCF_IP = "192.168.0.13"; + const uint PROXY_CSCF_PORT = 5081; + + static void Main(string[] args) + { + Boolean success; + + /* Create call back */ + callback = new MyCallback(); + /* Create and configure the IMS/LTE stack */ + stack = new SipStack(callback, String.Format("sip:{0}", REALM), String.Format("{0}@{1}", USER, REALM), String.Format("sip:{0}@{1}", USER, REALM)); + stack.addHeader("Privacy", "INVITE, ACK, CANCEL, BYE, MESSAGE, OPTIONS, NOTIFY, PRACK, UPDATE, REFER"); + stack.addHeader("P-Access-Network-Info", "ADSL;utran-cell-id-3gpp=00000000"); + stack.addHeader("User-Agent", "IM-client/OMA1.0 doubango/v1.0.0"); + + /* Sets Proxy-CSCF */ + success = stack.setProxyCSCF(PROXY_CSCF_IP, PROXY_CSCF_PORT, "tcp", "ipv4"); + /* Starts the stack */ + success = stack.Start(); + + /* Send REGISTER */ + regSession = new RegistrationSession(stack); + regSession.addCaps("+g.oma.sip-im"); + regSession.addCaps("+g.3gpp.smsip"); + regSession.addCaps("language", "\"en,fr\""); + regSession.Register(35); + + Console.Read(); + } + + static RegistrationSession regSession; + static MyCallback callback; + static SipStack stack; + } + + + public class MyCallback : SipCallback + { + public MyCallback() + : base() + { + } + + public override int OnRegistrationChanged(RegistrationEvent e) + { + short code = e.getCode(); + tsip_event_type_t type = e.getType(); + + RegistrationSession session = (e.getSession2() as RegistrationSession); + + Console.WriteLine("OnRegistrationChanged() ==> {0}:{1}", code, e.getPhrase()); + + return 0; + } + } +} diff --git a/trunk/bindings/csharp/test/Properties/AssemblyInfo.cs b/trunk/bindings/csharp/test/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..a5f9dc90 --- /dev/null +++ b/trunk/bindings/csharp/test/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("test")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("test")] +[assembly: AssemblyCopyright("Copyright © 2010")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("1903970d-f108-480c-bd31-9b394c9e9fa9")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/trunk/bindings/csharp/test/test.csproj b/trunk/bindings/csharp/test/test.csproj new file mode 100644 index 00000000..0bdd388f --- /dev/null +++ b/trunk/bindings/csharp/test/test.csproj @@ -0,0 +1,89 @@ + + + + Debug + AnyCPU + 9.0.21022 + 2.0 + {CE53BD89-639D-4F7D-BC47-FB82A294AFDC} + Exe + Properties + test + test + v3.5 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + 3.5 + + + 3.5 + + + 3.5 + + + + + + + RegistrationEvent.cs + + + RegistrationSession.cs + + + SafeObject.cs + + + SipCallback.cs + + + SipEvent.cs + + + SipSession.cs + + + SipStack.cs + + + tinyWRAP.cs + + + tinyWRAPPINVOKE.cs + + + tsip_event_type_t.cs + + + + + + + \ No newline at end of file diff --git a/trunk/bindings/csharp/test/test.csproj.user b/trunk/bindings/csharp/test/test.csproj.user new file mode 100644 index 00000000..209cfef8 --- /dev/null +++ b/trunk/bindings/csharp/test/test.csproj.user @@ -0,0 +1,6 @@ + + + true + C:\Projects\Doubango\bindings\csharp\Debug\ + + \ No newline at end of file diff --git a/trunk/bindings/csharp/tinyWRAP.cs b/trunk/bindings/csharp/tinyWRAP.cs new file mode 100644 index 00000000..08e00520 --- /dev/null +++ b/trunk/bindings/csharp/tinyWRAP.cs @@ -0,0 +1,14 @@ +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 1.3.40 + * + * Do not make changes to this file unless you know what you are doing--modify + * the SWIG interface file instead. + * ----------------------------------------------------------------------------- */ + + +using System; +using System.Runtime.InteropServices; + +public class tinyWRAP { +} diff --git a/trunk/bindings/csharp/tinyWRAP.ncb b/trunk/bindings/csharp/tinyWRAP.ncb new file mode 100644 index 00000000..fbd17446 Binary files /dev/null and b/trunk/bindings/csharp/tinyWRAP.ncb differ diff --git a/trunk/bindings/csharp/tinyWRAP.sln b/trunk/bindings/csharp/tinyWRAP.sln new file mode 100644 index 00000000..24597ffe --- /dev/null +++ b/trunk/bindings/csharp/tinyWRAP.sln @@ -0,0 +1,310 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tinyWRAP", "tinyWRAP.vcproj", "{6B60DF14-D5D7-4654-B8F9-1CBC8892CFC8}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "test", "test\test.csproj", "{CE53BD89-639D-4F7D-BC47-FB82A294AFDC}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tinySAK", "..\..\tinySAK\tinySAK.vcproj", "{6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tinyNET", "..\..\tinyNET\tinyNET.vcproj", "{7522A458-92F4-4259-B906-E84C2A65D9F1}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tinyHTTP", "..\..\tinyHTTP\tinyHTTP.vcproj", "{B3E45009-C7C3-4090-837C-2D30C9058443}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tinySIP", "..\..\tinySIP\tinySIP.vcproj", "{4CE20732-9978-4A88-B586-CFEFCB63E82D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tinySDP", "..\..\tinySDP\tinySDP.vcproj", "{E45DB518-6562-4033-80E8-60030F0B169F}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tinyMEDIA", "..\..\tinyMEDIA\tinyMEDIA.vcproj", "{52814B0D-7DCA-45B8-9A16-8B147040D619}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tinyIPSec", "..\..\tinyIPSec\tinyIPSec.vcproj", "{002FF064-588F-402E-A096-C8D033F49F40}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|Mixed Platforms = Debug|Mixed Platforms + Debug|Win32 = Debug|Win32 + Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + Release|Any CPU = Release|Any CPU + Release|Mixed Platforms = Release|Mixed Platforms + Release|Win32 = Release|Win32 + Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + Static_Debug|Any CPU = Static_Debug|Any CPU + Static_Debug|Mixed Platforms = Static_Debug|Mixed Platforms + Static_Debug|Win32 = Static_Debug|Win32 + Static_Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) = Static_Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + Static_Release|Any CPU = Static_Release|Any CPU + Static_Release|Mixed Platforms = Static_Release|Mixed Platforms + Static_Release|Win32 = Static_Release|Win32 + Static_Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) = Static_Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {6B60DF14-D5D7-4654-B8F9-1CBC8892CFC8}.Debug|Any CPU.ActiveCfg = Debug|Win32 + {6B60DF14-D5D7-4654-B8F9-1CBC8892CFC8}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {6B60DF14-D5D7-4654-B8F9-1CBC8892CFC8}.Debug|Mixed Platforms.Build.0 = Debug|Win32 + {6B60DF14-D5D7-4654-B8F9-1CBC8892CFC8}.Debug|Win32.ActiveCfg = Debug|Win32 + {6B60DF14-D5D7-4654-B8F9-1CBC8892CFC8}.Debug|Win32.Build.0 = Debug|Win32 + {6B60DF14-D5D7-4654-B8F9-1CBC8892CFC8}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 + {6B60DF14-D5D7-4654-B8F9-1CBC8892CFC8}.Release|Any CPU.ActiveCfg = Release|Win32 + {6B60DF14-D5D7-4654-B8F9-1CBC8892CFC8}.Release|Mixed Platforms.ActiveCfg = Release|Win32 + {6B60DF14-D5D7-4654-B8F9-1CBC8892CFC8}.Release|Mixed Platforms.Build.0 = Release|Win32 + {6B60DF14-D5D7-4654-B8F9-1CBC8892CFC8}.Release|Win32.ActiveCfg = Release|Win32 + {6B60DF14-D5D7-4654-B8F9-1CBC8892CFC8}.Release|Win32.Build.0 = Release|Win32 + {6B60DF14-D5D7-4654-B8F9-1CBC8892CFC8}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 + {6B60DF14-D5D7-4654-B8F9-1CBC8892CFC8}.Static_Debug|Any CPU.ActiveCfg = Debug|Win32 + {6B60DF14-D5D7-4654-B8F9-1CBC8892CFC8}.Static_Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {6B60DF14-D5D7-4654-B8F9-1CBC8892CFC8}.Static_Debug|Mixed Platforms.Build.0 = Debug|Win32 + {6B60DF14-D5D7-4654-B8F9-1CBC8892CFC8}.Static_Debug|Win32.ActiveCfg = Debug|Win32 + {6B60DF14-D5D7-4654-B8F9-1CBC8892CFC8}.Static_Debug|Win32.Build.0 = Debug|Win32 + {6B60DF14-D5D7-4654-B8F9-1CBC8892CFC8}.Static_Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 + {6B60DF14-D5D7-4654-B8F9-1CBC8892CFC8}.Static_Release|Any CPU.ActiveCfg = Release|Win32 + {6B60DF14-D5D7-4654-B8F9-1CBC8892CFC8}.Static_Release|Mixed Platforms.ActiveCfg = Release|Win32 + {6B60DF14-D5D7-4654-B8F9-1CBC8892CFC8}.Static_Release|Mixed Platforms.Build.0 = Release|Win32 + {6B60DF14-D5D7-4654-B8F9-1CBC8892CFC8}.Static_Release|Win32.ActiveCfg = Release|Win32 + {6B60DF14-D5D7-4654-B8F9-1CBC8892CFC8}.Static_Release|Win32.Build.0 = Release|Win32 + {6B60DF14-D5D7-4654-B8F9-1CBC8892CFC8}.Static_Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 + {CE53BD89-639D-4F7D-BC47-FB82A294AFDC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CE53BD89-639D-4F7D-BC47-FB82A294AFDC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CE53BD89-639D-4F7D-BC47-FB82A294AFDC}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {CE53BD89-639D-4F7D-BC47-FB82A294AFDC}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {CE53BD89-639D-4F7D-BC47-FB82A294AFDC}.Debug|Win32.ActiveCfg = Debug|Any CPU + {CE53BD89-639D-4F7D-BC47-FB82A294AFDC}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Any CPU + {CE53BD89-639D-4F7D-BC47-FB82A294AFDC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CE53BD89-639D-4F7D-BC47-FB82A294AFDC}.Release|Any CPU.Build.0 = Release|Any CPU + {CE53BD89-639D-4F7D-BC47-FB82A294AFDC}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {CE53BD89-639D-4F7D-BC47-FB82A294AFDC}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {CE53BD89-639D-4F7D-BC47-FB82A294AFDC}.Release|Win32.ActiveCfg = Release|Any CPU + {CE53BD89-639D-4F7D-BC47-FB82A294AFDC}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Any CPU + {CE53BD89-639D-4F7D-BC47-FB82A294AFDC}.Static_Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CE53BD89-639D-4F7D-BC47-FB82A294AFDC}.Static_Debug|Any CPU.Build.0 = Debug|Any CPU + {CE53BD89-639D-4F7D-BC47-FB82A294AFDC}.Static_Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {CE53BD89-639D-4F7D-BC47-FB82A294AFDC}.Static_Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {CE53BD89-639D-4F7D-BC47-FB82A294AFDC}.Static_Debug|Win32.ActiveCfg = Debug|Any CPU + {CE53BD89-639D-4F7D-BC47-FB82A294AFDC}.Static_Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Any CPU + {CE53BD89-639D-4F7D-BC47-FB82A294AFDC}.Static_Release|Any CPU.ActiveCfg = Release|Any CPU + {CE53BD89-639D-4F7D-BC47-FB82A294AFDC}.Static_Release|Any CPU.Build.0 = Release|Any CPU + {CE53BD89-639D-4F7D-BC47-FB82A294AFDC}.Static_Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {CE53BD89-639D-4F7D-BC47-FB82A294AFDC}.Static_Release|Mixed Platforms.Build.0 = Release|Any CPU + {CE53BD89-639D-4F7D-BC47-FB82A294AFDC}.Static_Release|Win32.ActiveCfg = Release|Any CPU + {CE53BD89-639D-4F7D-BC47-FB82A294AFDC}.Static_Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Any CPU + {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Debug|Any CPU.ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Debug|Mixed Platforms.Build.0 = Debug|Win32 + {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Debug|Mixed Platforms.Deploy.0 = Debug|Win32 + {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Debug|Win32.ActiveCfg = Debug|Win32 + {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Debug|Win32.Build.0 = Debug|Win32 + {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Release|Any CPU.ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Release|Mixed Platforms.ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Release|Mixed Platforms.Build.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Release|Mixed Platforms.Deploy.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Release|Win32.ActiveCfg = Release|Win32 + {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Release|Win32.Build.0 = Release|Win32 + {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Static_Debug|Any CPU.ActiveCfg = Static_Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Static_Debug|Mixed Platforms.ActiveCfg = Static_Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Static_Debug|Mixed Platforms.Build.0 = Static_Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Static_Debug|Mixed Platforms.Deploy.0 = Static_Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Static_Debug|Win32.ActiveCfg = Static_Debug|Win32 + {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Static_Debug|Win32.Build.0 = Static_Debug|Win32 + {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Static_Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Static_Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Static_Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Static_Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Static_Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Static_Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Static_Release|Any CPU.ActiveCfg = Static_Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Static_Release|Mixed Platforms.ActiveCfg = Static_Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Static_Release|Mixed Platforms.Build.0 = Static_Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Static_Release|Mixed Platforms.Deploy.0 = Static_Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Static_Release|Win32.ActiveCfg = Static_Release|Win32 + {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Static_Release|Win32.Build.0 = Static_Release|Win32 + {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Static_Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Static_Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Static_Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Static_Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Static_Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Static_Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {7522A458-92F4-4259-B906-E84C2A65D9F1}.Debug|Any CPU.ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {7522A458-92F4-4259-B906-E84C2A65D9F1}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {7522A458-92F4-4259-B906-E84C2A65D9F1}.Debug|Mixed Platforms.Build.0 = Debug|Win32 + {7522A458-92F4-4259-B906-E84C2A65D9F1}.Debug|Mixed Platforms.Deploy.0 = Debug|Win32 + {7522A458-92F4-4259-B906-E84C2A65D9F1}.Debug|Win32.ActiveCfg = Debug|Win32 + {7522A458-92F4-4259-B906-E84C2A65D9F1}.Debug|Win32.Build.0 = Debug|Win32 + {7522A458-92F4-4259-B906-E84C2A65D9F1}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {7522A458-92F4-4259-B906-E84C2A65D9F1}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {7522A458-92F4-4259-B906-E84C2A65D9F1}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {7522A458-92F4-4259-B906-E84C2A65D9F1}.Release|Any CPU.ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {7522A458-92F4-4259-B906-E84C2A65D9F1}.Release|Mixed Platforms.ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {7522A458-92F4-4259-B906-E84C2A65D9F1}.Release|Mixed Platforms.Build.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {7522A458-92F4-4259-B906-E84C2A65D9F1}.Release|Mixed Platforms.Deploy.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {7522A458-92F4-4259-B906-E84C2A65D9F1}.Release|Win32.ActiveCfg = Release|Win32 + {7522A458-92F4-4259-B906-E84C2A65D9F1}.Release|Win32.Build.0 = Release|Win32 + {7522A458-92F4-4259-B906-E84C2A65D9F1}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {7522A458-92F4-4259-B906-E84C2A65D9F1}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {7522A458-92F4-4259-B906-E84C2A65D9F1}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {7522A458-92F4-4259-B906-E84C2A65D9F1}.Static_Debug|Any CPU.ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {7522A458-92F4-4259-B906-E84C2A65D9F1}.Static_Debug|Mixed Platforms.ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {7522A458-92F4-4259-B906-E84C2A65D9F1}.Static_Debug|Mixed Platforms.Build.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {7522A458-92F4-4259-B906-E84C2A65D9F1}.Static_Debug|Mixed Platforms.Deploy.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {7522A458-92F4-4259-B906-E84C2A65D9F1}.Static_Debug|Win32.ActiveCfg = Debug|Win32 + {7522A458-92F4-4259-B906-E84C2A65D9F1}.Static_Debug|Win32.Build.0 = Debug|Win32 + {7522A458-92F4-4259-B906-E84C2A65D9F1}.Static_Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {7522A458-92F4-4259-B906-E84C2A65D9F1}.Static_Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {7522A458-92F4-4259-B906-E84C2A65D9F1}.Static_Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {7522A458-92F4-4259-B906-E84C2A65D9F1}.Static_Release|Any CPU.ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {7522A458-92F4-4259-B906-E84C2A65D9F1}.Static_Release|Mixed Platforms.ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {7522A458-92F4-4259-B906-E84C2A65D9F1}.Static_Release|Mixed Platforms.Build.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {7522A458-92F4-4259-B906-E84C2A65D9F1}.Static_Release|Mixed Platforms.Deploy.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {7522A458-92F4-4259-B906-E84C2A65D9F1}.Static_Release|Win32.ActiveCfg = Release|Win32 + {7522A458-92F4-4259-B906-E84C2A65D9F1}.Static_Release|Win32.Build.0 = Release|Win32 + {7522A458-92F4-4259-B906-E84C2A65D9F1}.Static_Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {7522A458-92F4-4259-B906-E84C2A65D9F1}.Static_Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {7522A458-92F4-4259-B906-E84C2A65D9F1}.Static_Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {B3E45009-C7C3-4090-837C-2D30C9058443}.Debug|Any CPU.ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {B3E45009-C7C3-4090-837C-2D30C9058443}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {B3E45009-C7C3-4090-837C-2D30C9058443}.Debug|Mixed Platforms.Build.0 = Debug|Win32 + {B3E45009-C7C3-4090-837C-2D30C9058443}.Debug|Mixed Platforms.Deploy.0 = Debug|Win32 + {B3E45009-C7C3-4090-837C-2D30C9058443}.Debug|Win32.ActiveCfg = Debug|Win32 + {B3E45009-C7C3-4090-837C-2D30C9058443}.Debug|Win32.Build.0 = Debug|Win32 + {B3E45009-C7C3-4090-837C-2D30C9058443}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {B3E45009-C7C3-4090-837C-2D30C9058443}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {B3E45009-C7C3-4090-837C-2D30C9058443}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {B3E45009-C7C3-4090-837C-2D30C9058443}.Release|Any CPU.ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {B3E45009-C7C3-4090-837C-2D30C9058443}.Release|Mixed Platforms.ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {B3E45009-C7C3-4090-837C-2D30C9058443}.Release|Mixed Platforms.Build.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {B3E45009-C7C3-4090-837C-2D30C9058443}.Release|Mixed Platforms.Deploy.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {B3E45009-C7C3-4090-837C-2D30C9058443}.Release|Win32.ActiveCfg = Release|Win32 + {B3E45009-C7C3-4090-837C-2D30C9058443}.Release|Win32.Build.0 = Release|Win32 + {B3E45009-C7C3-4090-837C-2D30C9058443}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {B3E45009-C7C3-4090-837C-2D30C9058443}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {B3E45009-C7C3-4090-837C-2D30C9058443}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {B3E45009-C7C3-4090-837C-2D30C9058443}.Static_Debug|Any CPU.ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {B3E45009-C7C3-4090-837C-2D30C9058443}.Static_Debug|Mixed Platforms.ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {B3E45009-C7C3-4090-837C-2D30C9058443}.Static_Debug|Mixed Platforms.Build.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {B3E45009-C7C3-4090-837C-2D30C9058443}.Static_Debug|Mixed Platforms.Deploy.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {B3E45009-C7C3-4090-837C-2D30C9058443}.Static_Debug|Win32.ActiveCfg = Debug|Win32 + {B3E45009-C7C3-4090-837C-2D30C9058443}.Static_Debug|Win32.Build.0 = Debug|Win32 + {B3E45009-C7C3-4090-837C-2D30C9058443}.Static_Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {B3E45009-C7C3-4090-837C-2D30C9058443}.Static_Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {B3E45009-C7C3-4090-837C-2D30C9058443}.Static_Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {B3E45009-C7C3-4090-837C-2D30C9058443}.Static_Release|Any CPU.ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {B3E45009-C7C3-4090-837C-2D30C9058443}.Static_Release|Mixed Platforms.ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {B3E45009-C7C3-4090-837C-2D30C9058443}.Static_Release|Mixed Platforms.Build.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {B3E45009-C7C3-4090-837C-2D30C9058443}.Static_Release|Mixed Platforms.Deploy.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {B3E45009-C7C3-4090-837C-2D30C9058443}.Static_Release|Win32.ActiveCfg = Release|Win32 + {B3E45009-C7C3-4090-837C-2D30C9058443}.Static_Release|Win32.Build.0 = Release|Win32 + {B3E45009-C7C3-4090-837C-2D30C9058443}.Static_Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {B3E45009-C7C3-4090-837C-2D30C9058443}.Static_Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {B3E45009-C7C3-4090-837C-2D30C9058443}.Static_Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {4CE20732-9978-4A88-B586-CFEFCB63E82D}.Debug|Any CPU.ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {4CE20732-9978-4A88-B586-CFEFCB63E82D}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {4CE20732-9978-4A88-B586-CFEFCB63E82D}.Debug|Mixed Platforms.Build.0 = Debug|Win32 + {4CE20732-9978-4A88-B586-CFEFCB63E82D}.Debug|Mixed Platforms.Deploy.0 = Debug|Win32 + {4CE20732-9978-4A88-B586-CFEFCB63E82D}.Debug|Win32.ActiveCfg = Debug|Win32 + {4CE20732-9978-4A88-B586-CFEFCB63E82D}.Debug|Win32.Build.0 = Debug|Win32 + {4CE20732-9978-4A88-B586-CFEFCB63E82D}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {4CE20732-9978-4A88-B586-CFEFCB63E82D}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {4CE20732-9978-4A88-B586-CFEFCB63E82D}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {4CE20732-9978-4A88-B586-CFEFCB63E82D}.Release|Any CPU.ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {4CE20732-9978-4A88-B586-CFEFCB63E82D}.Release|Mixed Platforms.ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {4CE20732-9978-4A88-B586-CFEFCB63E82D}.Release|Mixed Platforms.Build.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {4CE20732-9978-4A88-B586-CFEFCB63E82D}.Release|Mixed Platforms.Deploy.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {4CE20732-9978-4A88-B586-CFEFCB63E82D}.Release|Win32.ActiveCfg = Release|Win32 + {4CE20732-9978-4A88-B586-CFEFCB63E82D}.Release|Win32.Build.0 = Release|Win32 + {4CE20732-9978-4A88-B586-CFEFCB63E82D}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {4CE20732-9978-4A88-B586-CFEFCB63E82D}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {4CE20732-9978-4A88-B586-CFEFCB63E82D}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {4CE20732-9978-4A88-B586-CFEFCB63E82D}.Static_Debug|Any CPU.ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {4CE20732-9978-4A88-B586-CFEFCB63E82D}.Static_Debug|Mixed Platforms.ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {4CE20732-9978-4A88-B586-CFEFCB63E82D}.Static_Debug|Mixed Platforms.Build.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {4CE20732-9978-4A88-B586-CFEFCB63E82D}.Static_Debug|Mixed Platforms.Deploy.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {4CE20732-9978-4A88-B586-CFEFCB63E82D}.Static_Debug|Win32.ActiveCfg = Debug|Win32 + {4CE20732-9978-4A88-B586-CFEFCB63E82D}.Static_Debug|Win32.Build.0 = Debug|Win32 + {4CE20732-9978-4A88-B586-CFEFCB63E82D}.Static_Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {4CE20732-9978-4A88-B586-CFEFCB63E82D}.Static_Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {4CE20732-9978-4A88-B586-CFEFCB63E82D}.Static_Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {4CE20732-9978-4A88-B586-CFEFCB63E82D}.Static_Release|Any CPU.ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {4CE20732-9978-4A88-B586-CFEFCB63E82D}.Static_Release|Mixed Platforms.ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {4CE20732-9978-4A88-B586-CFEFCB63E82D}.Static_Release|Mixed Platforms.Build.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {4CE20732-9978-4A88-B586-CFEFCB63E82D}.Static_Release|Mixed Platforms.Deploy.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {4CE20732-9978-4A88-B586-CFEFCB63E82D}.Static_Release|Win32.ActiveCfg = Release|Win32 + {4CE20732-9978-4A88-B586-CFEFCB63E82D}.Static_Release|Win32.Build.0 = Release|Win32 + {4CE20732-9978-4A88-B586-CFEFCB63E82D}.Static_Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {4CE20732-9978-4A88-B586-CFEFCB63E82D}.Static_Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {4CE20732-9978-4A88-B586-CFEFCB63E82D}.Static_Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {E45DB518-6562-4033-80E8-60030F0B169F}.Debug|Any CPU.ActiveCfg = Debug|Win32 + {E45DB518-6562-4033-80E8-60030F0B169F}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {E45DB518-6562-4033-80E8-60030F0B169F}.Debug|Mixed Platforms.Build.0 = Debug|Win32 + {E45DB518-6562-4033-80E8-60030F0B169F}.Debug|Win32.ActiveCfg = Debug|Win32 + {E45DB518-6562-4033-80E8-60030F0B169F}.Debug|Win32.Build.0 = Debug|Win32 + {E45DB518-6562-4033-80E8-60030F0B169F}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 + {E45DB518-6562-4033-80E8-60030F0B169F}.Release|Any CPU.ActiveCfg = Release|Win32 + {E45DB518-6562-4033-80E8-60030F0B169F}.Release|Mixed Platforms.ActiveCfg = Release|Win32 + {E45DB518-6562-4033-80E8-60030F0B169F}.Release|Mixed Platforms.Build.0 = Release|Win32 + {E45DB518-6562-4033-80E8-60030F0B169F}.Release|Win32.ActiveCfg = Release|Win32 + {E45DB518-6562-4033-80E8-60030F0B169F}.Release|Win32.Build.0 = Release|Win32 + {E45DB518-6562-4033-80E8-60030F0B169F}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 + {E45DB518-6562-4033-80E8-60030F0B169F}.Static_Debug|Any CPU.ActiveCfg = Debug|Win32 + {E45DB518-6562-4033-80E8-60030F0B169F}.Static_Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {E45DB518-6562-4033-80E8-60030F0B169F}.Static_Debug|Mixed Platforms.Build.0 = Debug|Win32 + {E45DB518-6562-4033-80E8-60030F0B169F}.Static_Debug|Win32.ActiveCfg = Debug|Win32 + {E45DB518-6562-4033-80E8-60030F0B169F}.Static_Debug|Win32.Build.0 = Debug|Win32 + {E45DB518-6562-4033-80E8-60030F0B169F}.Static_Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 + {E45DB518-6562-4033-80E8-60030F0B169F}.Static_Release|Any CPU.ActiveCfg = Release|Win32 + {E45DB518-6562-4033-80E8-60030F0B169F}.Static_Release|Mixed Platforms.ActiveCfg = Release|Win32 + {E45DB518-6562-4033-80E8-60030F0B169F}.Static_Release|Mixed Platforms.Build.0 = Release|Win32 + {E45DB518-6562-4033-80E8-60030F0B169F}.Static_Release|Win32.ActiveCfg = Release|Win32 + {E45DB518-6562-4033-80E8-60030F0B169F}.Static_Release|Win32.Build.0 = Release|Win32 + {E45DB518-6562-4033-80E8-60030F0B169F}.Static_Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 + {52814B0D-7DCA-45B8-9A16-8B147040D619}.Debug|Any CPU.ActiveCfg = Debug|Win32 + {52814B0D-7DCA-45B8-9A16-8B147040D619}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {52814B0D-7DCA-45B8-9A16-8B147040D619}.Debug|Mixed Platforms.Build.0 = Debug|Win32 + {52814B0D-7DCA-45B8-9A16-8B147040D619}.Debug|Win32.ActiveCfg = Debug|Win32 + {52814B0D-7DCA-45B8-9A16-8B147040D619}.Debug|Win32.Build.0 = Debug|Win32 + {52814B0D-7DCA-45B8-9A16-8B147040D619}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 + {52814B0D-7DCA-45B8-9A16-8B147040D619}.Release|Any CPU.ActiveCfg = Release|Win32 + {52814B0D-7DCA-45B8-9A16-8B147040D619}.Release|Mixed Platforms.ActiveCfg = Release|Win32 + {52814B0D-7DCA-45B8-9A16-8B147040D619}.Release|Mixed Platforms.Build.0 = Release|Win32 + {52814B0D-7DCA-45B8-9A16-8B147040D619}.Release|Win32.ActiveCfg = Release|Win32 + {52814B0D-7DCA-45B8-9A16-8B147040D619}.Release|Win32.Build.0 = Release|Win32 + {52814B0D-7DCA-45B8-9A16-8B147040D619}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 + {52814B0D-7DCA-45B8-9A16-8B147040D619}.Static_Debug|Any CPU.ActiveCfg = Debug|Win32 + {52814B0D-7DCA-45B8-9A16-8B147040D619}.Static_Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {52814B0D-7DCA-45B8-9A16-8B147040D619}.Static_Debug|Mixed Platforms.Build.0 = Debug|Win32 + {52814B0D-7DCA-45B8-9A16-8B147040D619}.Static_Debug|Win32.ActiveCfg = Debug|Win32 + {52814B0D-7DCA-45B8-9A16-8B147040D619}.Static_Debug|Win32.Build.0 = Debug|Win32 + {52814B0D-7DCA-45B8-9A16-8B147040D619}.Static_Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 + {52814B0D-7DCA-45B8-9A16-8B147040D619}.Static_Release|Any CPU.ActiveCfg = Release|Win32 + {52814B0D-7DCA-45B8-9A16-8B147040D619}.Static_Release|Mixed Platforms.ActiveCfg = Release|Win32 + {52814B0D-7DCA-45B8-9A16-8B147040D619}.Static_Release|Mixed Platforms.Build.0 = Release|Win32 + {52814B0D-7DCA-45B8-9A16-8B147040D619}.Static_Release|Win32.ActiveCfg = Release|Win32 + {52814B0D-7DCA-45B8-9A16-8B147040D619}.Static_Release|Win32.Build.0 = Release|Win32 + {52814B0D-7DCA-45B8-9A16-8B147040D619}.Static_Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 + {002FF064-588F-402E-A096-C8D033F49F40}.Debug|Any CPU.ActiveCfg = Debug|Win32 + {002FF064-588F-402E-A096-C8D033F49F40}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {002FF064-588F-402E-A096-C8D033F49F40}.Debug|Mixed Platforms.Build.0 = Debug|Win32 + {002FF064-588F-402E-A096-C8D033F49F40}.Debug|Win32.ActiveCfg = Debug|Win32 + {002FF064-588F-402E-A096-C8D033F49F40}.Debug|Win32.Build.0 = Debug|Win32 + {002FF064-588F-402E-A096-C8D033F49F40}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 + {002FF064-588F-402E-A096-C8D033F49F40}.Release|Any CPU.ActiveCfg = Release|Win32 + {002FF064-588F-402E-A096-C8D033F49F40}.Release|Mixed Platforms.ActiveCfg = Release|Win32 + {002FF064-588F-402E-A096-C8D033F49F40}.Release|Mixed Platforms.Build.0 = Release|Win32 + {002FF064-588F-402E-A096-C8D033F49F40}.Release|Win32.ActiveCfg = Release|Win32 + {002FF064-588F-402E-A096-C8D033F49F40}.Release|Win32.Build.0 = Release|Win32 + {002FF064-588F-402E-A096-C8D033F49F40}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 + {002FF064-588F-402E-A096-C8D033F49F40}.Static_Debug|Any CPU.ActiveCfg = Debug|Win32 + {002FF064-588F-402E-A096-C8D033F49F40}.Static_Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {002FF064-588F-402E-A096-C8D033F49F40}.Static_Debug|Mixed Platforms.Build.0 = Debug|Win32 + {002FF064-588F-402E-A096-C8D033F49F40}.Static_Debug|Win32.ActiveCfg = Debug|Win32 + {002FF064-588F-402E-A096-C8D033F49F40}.Static_Debug|Win32.Build.0 = Debug|Win32 + {002FF064-588F-402E-A096-C8D033F49F40}.Static_Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 + {002FF064-588F-402E-A096-C8D033F49F40}.Static_Release|Any CPU.ActiveCfg = Release|Win32 + {002FF064-588F-402E-A096-C8D033F49F40}.Static_Release|Mixed Platforms.ActiveCfg = Release|Win32 + {002FF064-588F-402E-A096-C8D033F49F40}.Static_Release|Mixed Platforms.Build.0 = Release|Win32 + {002FF064-588F-402E-A096-C8D033F49F40}.Static_Release|Win32.ActiveCfg = Release|Win32 + {002FF064-588F-402E-A096-C8D033F49F40}.Static_Release|Win32.Build.0 = Release|Win32 + {002FF064-588F-402E-A096-C8D033F49F40}.Static_Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/trunk/bindings/csharp/tinyWRAP.suo b/trunk/bindings/csharp/tinyWRAP.suo new file mode 100644 index 00000000..1db927fc Binary files /dev/null and b/trunk/bindings/csharp/tinyWRAP.suo differ diff --git a/trunk/bindings/csharp/tinyWRAP.vcproj b/trunk/bindings/csharp/tinyWRAP.vcproj new file mode 100644 index 00000000..2984500a --- /dev/null +++ b/trunk/bindings/csharp/tinyWRAP.vcproj @@ -0,0 +1,288 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trunk/bindings/csharp/tinyWRAPPINVOKE.cs b/trunk/bindings/csharp/tinyWRAPPINVOKE.cs new file mode 100644 index 00000000..d4145164 --- /dev/null +++ b/trunk/bindings/csharp/tinyWRAPPINVOKE.cs @@ -0,0 +1,321 @@ +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 1.3.40 + * + * Do not make changes to this file unless you know what you are doing--modify + * the SWIG interface file instead. + * ----------------------------------------------------------------------------- */ + + +using System; +using System.Runtime.InteropServices; + +class tinyWRAPPINVOKE { + + protected class SWIGExceptionHelper { + + public delegate void ExceptionDelegate(string message); + public delegate void ExceptionArgumentDelegate(string message, string paramName); + + static ExceptionDelegate applicationDelegate = new ExceptionDelegate(SetPendingApplicationException); + static ExceptionDelegate arithmeticDelegate = new ExceptionDelegate(SetPendingArithmeticException); + static ExceptionDelegate divideByZeroDelegate = new ExceptionDelegate(SetPendingDivideByZeroException); + static ExceptionDelegate indexOutOfRangeDelegate = new ExceptionDelegate(SetPendingIndexOutOfRangeException); + static ExceptionDelegate invalidCastDelegate = new ExceptionDelegate(SetPendingInvalidCastException); + static ExceptionDelegate invalidOperationDelegate = new ExceptionDelegate(SetPendingInvalidOperationException); + static ExceptionDelegate ioDelegate = new ExceptionDelegate(SetPendingIOException); + static ExceptionDelegate nullReferenceDelegate = new ExceptionDelegate(SetPendingNullReferenceException); + static ExceptionDelegate outOfMemoryDelegate = new ExceptionDelegate(SetPendingOutOfMemoryException); + static ExceptionDelegate overflowDelegate = new ExceptionDelegate(SetPendingOverflowException); + static ExceptionDelegate systemDelegate = new ExceptionDelegate(SetPendingSystemException); + + static ExceptionArgumentDelegate argumentDelegate = new ExceptionArgumentDelegate(SetPendingArgumentException); + static ExceptionArgumentDelegate argumentNullDelegate = new ExceptionArgumentDelegate(SetPendingArgumentNullException); + static ExceptionArgumentDelegate argumentOutOfRangeDelegate = new ExceptionArgumentDelegate(SetPendingArgumentOutOfRangeException); + + [DllImport("tinyWRAP", EntryPoint="SWIGRegisterExceptionCallbacks_tinyWRAP")] + public static extern void SWIGRegisterExceptionCallbacks_tinyWRAP( + ExceptionDelegate applicationDelegate, + ExceptionDelegate arithmeticDelegate, + ExceptionDelegate divideByZeroDelegate, + ExceptionDelegate indexOutOfRangeDelegate, + ExceptionDelegate invalidCastDelegate, + ExceptionDelegate invalidOperationDelegate, + ExceptionDelegate ioDelegate, + ExceptionDelegate nullReferenceDelegate, + ExceptionDelegate outOfMemoryDelegate, + ExceptionDelegate overflowDelegate, + ExceptionDelegate systemExceptionDelegate); + + [DllImport("tinyWRAP", EntryPoint="SWIGRegisterExceptionArgumentCallbacks_tinyWRAP")] + public static extern void SWIGRegisterExceptionCallbacksArgument_tinyWRAP( + ExceptionArgumentDelegate argumentDelegate, + ExceptionArgumentDelegate argumentNullDelegate, + ExceptionArgumentDelegate argumentOutOfRangeDelegate); + + static void SetPendingApplicationException(string message) { + SWIGPendingException.Set(new System.ApplicationException(message, SWIGPendingException.Retrieve())); + } + static void SetPendingArithmeticException(string message) { + SWIGPendingException.Set(new System.ArithmeticException(message, SWIGPendingException.Retrieve())); + } + static void SetPendingDivideByZeroException(string message) { + SWIGPendingException.Set(new System.DivideByZeroException(message, SWIGPendingException.Retrieve())); + } + static void SetPendingIndexOutOfRangeException(string message) { + SWIGPendingException.Set(new System.IndexOutOfRangeException(message, SWIGPendingException.Retrieve())); + } + static void SetPendingInvalidCastException(string message) { + SWIGPendingException.Set(new System.InvalidCastException(message, SWIGPendingException.Retrieve())); + } + static void SetPendingInvalidOperationException(string message) { + SWIGPendingException.Set(new System.InvalidOperationException(message, SWIGPendingException.Retrieve())); + } + static void SetPendingIOException(string message) { + SWIGPendingException.Set(new System.IO.IOException(message, SWIGPendingException.Retrieve())); + } + static void SetPendingNullReferenceException(string message) { + SWIGPendingException.Set(new System.NullReferenceException(message, SWIGPendingException.Retrieve())); + } + static void SetPendingOutOfMemoryException(string message) { + SWIGPendingException.Set(new System.OutOfMemoryException(message, SWIGPendingException.Retrieve())); + } + static void SetPendingOverflowException(string message) { + SWIGPendingException.Set(new System.OverflowException(message, SWIGPendingException.Retrieve())); + } + static void SetPendingSystemException(string message) { + SWIGPendingException.Set(new System.SystemException(message, SWIGPendingException.Retrieve())); + } + + static void SetPendingArgumentException(string message, string paramName) { + SWIGPendingException.Set(new System.ArgumentException(message, paramName, SWIGPendingException.Retrieve())); + } + static void SetPendingArgumentNullException(string message, string paramName) { + Exception e = SWIGPendingException.Retrieve(); + if (e != null) message = message + " Inner Exception: " + e.Message; + SWIGPendingException.Set(new System.ArgumentNullException(paramName, message)); + } + static void SetPendingArgumentOutOfRangeException(string message, string paramName) { + Exception e = SWIGPendingException.Retrieve(); + if (e != null) message = message + " Inner Exception: " + e.Message; + SWIGPendingException.Set(new System.ArgumentOutOfRangeException(paramName, message)); + } + + static SWIGExceptionHelper() { + SWIGRegisterExceptionCallbacks_tinyWRAP( + applicationDelegate, + arithmeticDelegate, + divideByZeroDelegate, + indexOutOfRangeDelegate, + invalidCastDelegate, + invalidOperationDelegate, + ioDelegate, + nullReferenceDelegate, + outOfMemoryDelegate, + overflowDelegate, + systemDelegate); + + SWIGRegisterExceptionCallbacksArgument_tinyWRAP( + argumentDelegate, + argumentNullDelegate, + argumentOutOfRangeDelegate); + } + } + + protected static SWIGExceptionHelper swigExceptionHelper = new SWIGExceptionHelper(); + + public class SWIGPendingException { + [ThreadStatic] + private static Exception pendingException = null; + private static int numExceptionsPending = 0; + + public static bool Pending { + get { + bool pending = false; + if (numExceptionsPending > 0) + if (pendingException != null) + pending = true; + return pending; + } + } + + public static void Set(Exception e) { + if (pendingException != null) + throw new ApplicationException("FATAL: An earlier pending exception from unmanaged code was missed and thus not thrown (" + pendingException.ToString() + ")", e); + pendingException = e; + lock(typeof(tinyWRAPPINVOKE)) { + numExceptionsPending++; + } + } + + public static Exception Retrieve() { + Exception e = null; + if (numExceptionsPending > 0) { + if (pendingException != null) { + e = pendingException; + pendingException = null; + lock(typeof(tinyWRAPPINVOKE)) { + numExceptionsPending--; + } + } + } + return e; + } + } + + + protected class SWIGStringHelper { + + public delegate string SWIGStringDelegate(string message); + static SWIGStringDelegate stringDelegate = new SWIGStringDelegate(CreateString); + + [DllImport("tinyWRAP", EntryPoint="SWIGRegisterStringCallback_tinyWRAP")] + public static extern void SWIGRegisterStringCallback_tinyWRAP(SWIGStringDelegate stringDelegate); + + static string CreateString(string cString) { + return cString; + } + + static SWIGStringHelper() { + SWIGRegisterStringCallback_tinyWRAP(stringDelegate); + } + } + + static protected SWIGStringHelper swigStringHelper = new SWIGStringHelper(); + + + [DllImport("tinyWRAP", EntryPoint="CSharp_new_SipEvent__SWIG_0")] + public static extern IntPtr new_SipEvent__SWIG_0(); + + [DllImport("tinyWRAP", EntryPoint="CSharp_new_SipEvent__SWIG_1")] + public static extern IntPtr new_SipEvent__SWIG_1(short jarg1, string jarg2); + + [DllImport("tinyWRAP", EntryPoint="CSharp_delete_SipEvent")] + public static extern void delete_SipEvent(HandleRef jarg1); + + [DllImport("tinyWRAP", EntryPoint="CSharp_SipEvent_getCode")] + public static extern short SipEvent_getCode(HandleRef jarg1); + + [DllImport("tinyWRAP", EntryPoint="CSharp_SipEvent_getPhrase")] + public static extern string SipEvent_getPhrase(HandleRef jarg1); + + [DllImport("tinyWRAP", EntryPoint="CSharp_SipEvent_getType")] + public static extern int SipEvent_getType(HandleRef jarg1); + + [DllImport("tinyWRAP", EntryPoint="CSharp_SipEvent_getSession")] + public static extern IntPtr SipEvent_getSession(HandleRef jarg1); + + [DllImport("tinyWRAP", EntryPoint="CSharp_new_SipSession")] + public static extern IntPtr new_SipSession(HandleRef jarg1); + + [DllImport("tinyWRAP", EntryPoint="CSharp_delete_SipSession")] + public static extern void delete_SipSession(HandleRef jarg1); + + [DllImport("tinyWRAP", EntryPoint="CSharp_SipSession_addHeader")] + public static extern bool SipSession_addHeader(HandleRef jarg1, string jarg2, string jarg3); + + [DllImport("tinyWRAP", EntryPoint="CSharp_SipSession_removeHeader")] + public static extern bool SipSession_removeHeader(HandleRef jarg1, string jarg2); + + [DllImport("tinyWRAP", EntryPoint="CSharp_SipSession_addCaps__SWIG_0")] + public static extern bool SipSession_addCaps__SWIG_0(HandleRef jarg1, string jarg2, string jarg3); + + [DllImport("tinyWRAP", EntryPoint="CSharp_SipSession_addCaps__SWIG_1")] + public static extern bool SipSession_addCaps__SWIG_1(HandleRef jarg1, string jarg2); + + [DllImport("tinyWRAP", EntryPoint="CSharp_SipSession_removeCaps")] + public static extern bool SipSession_removeCaps(HandleRef jarg1, string jarg2); + + [DllImport("tinyWRAP", EntryPoint="CSharp_SipSession_setExpires")] + public static extern bool SipSession_setExpires(HandleRef jarg1, uint jarg2); + + [DllImport("tinyWRAP", EntryPoint="CSharp_SipSession_setFromUri")] + public static extern bool SipSession_setFromUri(HandleRef jarg1, string jarg2); + + [DllImport("tinyWRAP", EntryPoint="CSharp_SipSession_setToUri")] + public static extern bool SipSession_setToUri(HandleRef jarg1, string jarg2); + + [DllImport("tinyWRAP", EntryPoint="CSharp_new_RegistrationEvent")] + public static extern IntPtr new_RegistrationEvent(); + + [DllImport("tinyWRAP", EntryPoint="CSharp_delete_RegistrationEvent")] + public static extern void delete_RegistrationEvent(HandleRef jarg1); + + [DllImport("tinyWRAP", EntryPoint="CSharp_RegistrationEvent_getSession2")] + public static extern IntPtr RegistrationEvent_getSession2(HandleRef jarg1); + + [DllImport("tinyWRAP", EntryPoint="CSharp_new_RegistrationSession")] + public static extern IntPtr new_RegistrationSession(HandleRef jarg1); + + [DllImport("tinyWRAP", EntryPoint="CSharp_delete_RegistrationSession")] + public static extern void delete_RegistrationSession(HandleRef jarg1); + + [DllImport("tinyWRAP", EntryPoint="CSharp_RegistrationSession_Register")] + public static extern bool RegistrationSession_Register(HandleRef jarg1, uint jarg2); + + [DllImport("tinyWRAP", EntryPoint="CSharp_RegistrationSession_UnRegister")] + public static extern bool RegistrationSession_UnRegister(HandleRef jarg1); + + [DllImport("tinyWRAP", EntryPoint="CSharp_new_SipCallback")] + public static extern IntPtr new_SipCallback(); + + [DllImport("tinyWRAP", EntryPoint="CSharp_delete_SipCallback")] + public static extern void delete_SipCallback(HandleRef jarg1); + + [DllImport("tinyWRAP", EntryPoint="CSharp_SipCallback_OnRegistrationChanged")] + public static extern int SipCallback_OnRegistrationChanged(HandleRef jarg1, HandleRef jarg2); + + [DllImport("tinyWRAP", EntryPoint="CSharp_SipCallback_OnRegistrationChangedSwigExplicitSipCallback")] + public static extern int SipCallback_OnRegistrationChangedSwigExplicitSipCallback(HandleRef jarg1, HandleRef jarg2); + + [DllImport("tinyWRAP", EntryPoint="CSharp_SipCallback_director_connect")] + public static extern void SipCallback_director_connect(HandleRef jarg1, SipCallback.SwigDelegateSipCallback_0 delegate0); + + [DllImport("tinyWRAP", EntryPoint="CSharp_new_SafeObject")] + public static extern IntPtr new_SafeObject(); + + [DllImport("tinyWRAP", EntryPoint="CSharp_delete_SafeObject")] + public static extern void delete_SafeObject(HandleRef jarg1); + + [DllImport("tinyWRAP", EntryPoint="CSharp_SafeObject_Lock")] + public static extern int SafeObject_Lock(HandleRef jarg1); + + [DllImport("tinyWRAP", EntryPoint="CSharp_SafeObject_UnLock")] + public static extern int SafeObject_UnLock(HandleRef jarg1); + + [DllImport("tinyWRAP", EntryPoint="CSharp_new_SipStack")] + public static extern IntPtr new_SipStack(HandleRef jarg1, string jarg2, string jarg3, string jarg4); + + [DllImport("tinyWRAP", EntryPoint="CSharp_delete_SipStack")] + public static extern void delete_SipStack(HandleRef jarg1); + + [DllImport("tinyWRAP", EntryPoint="CSharp_SipStack_Start")] + public static extern bool SipStack_Start(HandleRef jarg1); + + [DllImport("tinyWRAP", EntryPoint="CSharp_SipStack_setProxyCSCF")] + public static extern bool SipStack_setProxyCSCF(HandleRef jarg1, string jarg2, uint jarg3, string jarg4, string jarg5); + + [DllImport("tinyWRAP", EntryPoint="CSharp_SipStack_setLocalIP")] + public static extern bool SipStack_setLocalIP(HandleRef jarg1, string jarg2); + + [DllImport("tinyWRAP", EntryPoint="CSharp_SipStack_setLocalPort")] + public static extern bool SipStack_setLocalPort(HandleRef jarg1, uint jarg2); + + [DllImport("tinyWRAP", EntryPoint="CSharp_SipStack_addHeader")] + public static extern bool SipStack_addHeader(HandleRef jarg1, string jarg2, string jarg3); + + [DllImport("tinyWRAP", EntryPoint="CSharp_SipStack_removeHeader")] + public static extern bool SipStack_removeHeader(HandleRef jarg1, string jarg2); + + [DllImport("tinyWRAP", EntryPoint="CSharp_SipStack_Stop")] + public static extern bool SipStack_Stop(HandleRef jarg1); + + [DllImport("tinyWRAP", EntryPoint="CSharp_RegistrationEventUpcast")] + public static extern IntPtr RegistrationEventUpcast(IntPtr objectRef); + + [DllImport("tinyWRAP", EntryPoint="CSharp_RegistrationSessionUpcast")] + public static extern IntPtr RegistrationSessionUpcast(IntPtr objectRef); + + [DllImport("tinyWRAP", EntryPoint="CSharp_SipStackUpcast")] + public static extern IntPtr SipStackUpcast(IntPtr objectRef); +} diff --git a/trunk/bindings/csharp/tinyWRAP_wrap.cxx b/trunk/bindings/csharp/tinyWRAP_wrap.cxx new file mode 100644 index 00000000..f0011583 --- /dev/null +++ b/trunk/bindings/csharp/tinyWRAP_wrap.cxx @@ -0,0 +1,921 @@ +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 1.3.40 + * + * This file is not intended to be easily readable and contains a number of + * coding conventions designed to improve portability and efficiency. Do not make + * changes to this file unless you know what you are doing--modify the SWIG + * interface file instead. + * ----------------------------------------------------------------------------- */ + +#define SWIGCSHARP +#define SWIG_DIRECTORS + + +#ifdef __cplusplus +/* SwigValueWrapper is described in swig.swg */ +template class SwigValueWrapper { + struct SwigMovePointer { + T *ptr; + SwigMovePointer(T *p) : ptr(p) { } + ~SwigMovePointer() { delete ptr; } + SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; } + } pointer; + SwigValueWrapper& operator=(const SwigValueWrapper& rhs); + SwigValueWrapper(const SwigValueWrapper& rhs); +public: + SwigValueWrapper() : pointer(0) { } + SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; } + operator T&() const { return *pointer.ptr; } + T *operator&() { return pointer.ptr; } +}; + +template T SwigValueInit() { + return T(); +} +#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 +#include +#include + + +/* Support for throwing C# exceptions from C/C++. There are two types: + * Exceptions that take a message and ArgumentExceptions that take a message and a parameter name. */ +typedef enum { + SWIG_CSharpApplicationException, + SWIG_CSharpArithmeticException, + SWIG_CSharpDivideByZeroException, + SWIG_CSharpIndexOutOfRangeException, + SWIG_CSharpInvalidCastException, + SWIG_CSharpInvalidOperationException, + SWIG_CSharpIOException, + SWIG_CSharpNullReferenceException, + SWIG_CSharpOutOfMemoryException, + SWIG_CSharpOverflowException, + SWIG_CSharpSystemException +} SWIG_CSharpExceptionCodes; + +typedef enum { + SWIG_CSharpArgumentException, + SWIG_CSharpArgumentNullException, + SWIG_CSharpArgumentOutOfRangeException +} SWIG_CSharpExceptionArgumentCodes; + +typedef void (SWIGSTDCALL* SWIG_CSharpExceptionCallback_t)(const char *); +typedef void (SWIGSTDCALL* SWIG_CSharpExceptionArgumentCallback_t)(const char *, const char *); + +typedef struct { + SWIG_CSharpExceptionCodes code; + SWIG_CSharpExceptionCallback_t callback; +} SWIG_CSharpException_t; + +typedef struct { + SWIG_CSharpExceptionArgumentCodes code; + SWIG_CSharpExceptionArgumentCallback_t callback; +} SWIG_CSharpExceptionArgument_t; + +static SWIG_CSharpException_t SWIG_csharp_exceptions[] = { + { SWIG_CSharpApplicationException, NULL }, + { SWIG_CSharpArithmeticException, NULL }, + { SWIG_CSharpDivideByZeroException, NULL }, + { SWIG_CSharpIndexOutOfRangeException, NULL }, + { SWIG_CSharpInvalidCastException, NULL }, + { SWIG_CSharpInvalidOperationException, NULL }, + { SWIG_CSharpIOException, NULL }, + { SWIG_CSharpNullReferenceException, NULL }, + { SWIG_CSharpOutOfMemoryException, NULL }, + { SWIG_CSharpOverflowException, NULL }, + { SWIG_CSharpSystemException, NULL } +}; + +static SWIG_CSharpExceptionArgument_t SWIG_csharp_exceptions_argument[] = { + { SWIG_CSharpArgumentException, NULL }, + { SWIG_CSharpArgumentNullException, NULL }, + { SWIG_CSharpArgumentOutOfRangeException, NULL } +}; + +static void SWIGUNUSED SWIG_CSharpSetPendingException(SWIG_CSharpExceptionCodes code, const char *msg) { + SWIG_CSharpExceptionCallback_t callback = SWIG_csharp_exceptions[SWIG_CSharpApplicationException].callback; + if ((size_t)code < sizeof(SWIG_csharp_exceptions)/sizeof(SWIG_CSharpException_t)) { + callback = SWIG_csharp_exceptions[code].callback; + } + callback(msg); +} + +static void SWIGUNUSED SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpExceptionArgumentCodes code, const char *msg, const char *param_name) { + SWIG_CSharpExceptionArgumentCallback_t callback = SWIG_csharp_exceptions_argument[SWIG_CSharpArgumentException].callback; + if ((size_t)code < sizeof(SWIG_csharp_exceptions_argument)/sizeof(SWIG_CSharpExceptionArgument_t)) { + callback = SWIG_csharp_exceptions_argument[code].callback; + } + callback(msg, param_name); +} + + +#ifdef __cplusplus +extern "C" +#endif +SWIGEXPORT void SWIGSTDCALL SWIGRegisterExceptionCallbacks_tinyWRAP( + SWIG_CSharpExceptionCallback_t applicationCallback, + SWIG_CSharpExceptionCallback_t arithmeticCallback, + SWIG_CSharpExceptionCallback_t divideByZeroCallback, + SWIG_CSharpExceptionCallback_t indexOutOfRangeCallback, + SWIG_CSharpExceptionCallback_t invalidCastCallback, + SWIG_CSharpExceptionCallback_t invalidOperationCallback, + SWIG_CSharpExceptionCallback_t ioCallback, + SWIG_CSharpExceptionCallback_t nullReferenceCallback, + SWIG_CSharpExceptionCallback_t outOfMemoryCallback, + SWIG_CSharpExceptionCallback_t overflowCallback, + SWIG_CSharpExceptionCallback_t systemCallback) { + SWIG_csharp_exceptions[SWIG_CSharpApplicationException].callback = applicationCallback; + SWIG_csharp_exceptions[SWIG_CSharpArithmeticException].callback = arithmeticCallback; + SWIG_csharp_exceptions[SWIG_CSharpDivideByZeroException].callback = divideByZeroCallback; + SWIG_csharp_exceptions[SWIG_CSharpIndexOutOfRangeException].callback = indexOutOfRangeCallback; + SWIG_csharp_exceptions[SWIG_CSharpInvalidCastException].callback = invalidCastCallback; + SWIG_csharp_exceptions[SWIG_CSharpInvalidOperationException].callback = invalidOperationCallback; + SWIG_csharp_exceptions[SWIG_CSharpIOException].callback = ioCallback; + SWIG_csharp_exceptions[SWIG_CSharpNullReferenceException].callback = nullReferenceCallback; + SWIG_csharp_exceptions[SWIG_CSharpOutOfMemoryException].callback = outOfMemoryCallback; + SWIG_csharp_exceptions[SWIG_CSharpOverflowException].callback = overflowCallback; + SWIG_csharp_exceptions[SWIG_CSharpSystemException].callback = systemCallback; +} + +#ifdef __cplusplus +extern "C" +#endif +SWIGEXPORT void SWIGSTDCALL SWIGRegisterExceptionArgumentCallbacks_tinyWRAP( + SWIG_CSharpExceptionArgumentCallback_t argumentCallback, + SWIG_CSharpExceptionArgumentCallback_t argumentNullCallback, + SWIG_CSharpExceptionArgumentCallback_t argumentOutOfRangeCallback) { + SWIG_csharp_exceptions_argument[SWIG_CSharpArgumentException].callback = argumentCallback; + SWIG_csharp_exceptions_argument[SWIG_CSharpArgumentNullException].callback = argumentNullCallback; + SWIG_csharp_exceptions_argument[SWIG_CSharpArgumentOutOfRangeException].callback = argumentOutOfRangeCallback; +} + + +/* Callback for returning strings to C# without leaking memory */ +typedef char * (SWIGSTDCALL* SWIG_CSharpStringHelperCallback)(const char *); +static SWIG_CSharpStringHelperCallback SWIG_csharp_string_callback = NULL; + + +#ifdef __cplusplus +extern "C" +#endif +SWIGEXPORT void SWIGSTDCALL SWIGRegisterStringCallback_tinyWRAP(SWIG_CSharpStringHelperCallback callback) { + SWIG_csharp_string_callback = callback; +} + + +/* Contract support */ + +#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 */ + + + +#include "SipEvent.h" +#include "SipSession.h" +#include "RegistrationEvent.h" +#include "RegistrationSession.h" +#include "SubscriptionEvent.h" +#include "SubscriptionSession.h" +#include "SipCallback.h" +#include "SafeObject.h" +#include "SipStack.h" + + + +/* --------------------------------------------------- + * C++ director class methods + * --------------------------------------------------- */ + +#include "csharp/tinyWRAP_wrap.h" + +SwigDirector_SipCallback::SwigDirector_SipCallback() : SipCallback(), Swig::Director() { + swig_init_callbacks(); +} + +SwigDirector_SipCallback::~SwigDirector_SipCallback() { + +} + + +int SwigDirector_SipCallback::OnRegistrationChanged(RegistrationEvent const *e) { + int c_result = SwigValueInit< int >() ; + int jresult = 0 ; + void * je = 0 ; + + if (!swig_callbackOnRegistrationChanged) { + return SipCallback::OnRegistrationChanged(e); + } else { + je = (void *) e; + jresult = (int) swig_callbackOnRegistrationChanged(je); + c_result = (int)jresult; + } + return c_result; +} + +void SwigDirector_SipCallback::swig_connect_director(SWIG_Callback0_t callbackOnRegistrationChanged) { + swig_callbackOnRegistrationChanged = callbackOnRegistrationChanged; +} + +void SwigDirector_SipCallback::swig_init_callbacks() { + swig_callbackOnRegistrationChanged = 0; +} + + +#ifdef __cplusplus +extern "C" { +#endif + +SWIGEXPORT void * SWIGSTDCALL CSharp_new_SipEvent__SWIG_0() { + void * jresult ; + SipEvent *result = 0 ; + + result = (SipEvent *)new SipEvent(); + jresult = (void *)result; + return jresult; +} + + +SWIGEXPORT void * SWIGSTDCALL CSharp_new_SipEvent__SWIG_1(short jarg1, char * jarg2) { + void * jresult ; + short arg1 ; + char *arg2 = (char *) 0 ; + SipEvent *result = 0 ; + + arg1 = (short)jarg1; + arg2 = (char *)jarg2; + result = (SipEvent *)new SipEvent(arg1,(char const *)arg2); + jresult = (void *)result; + return jresult; +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_delete_SipEvent(void * jarg1) { + SipEvent *arg1 = (SipEvent *) 0 ; + + arg1 = (SipEvent *)jarg1; + delete arg1; +} + + +SWIGEXPORT short SWIGSTDCALL CSharp_SipEvent_getCode(void * jarg1) { + short jresult ; + SipEvent *arg1 = (SipEvent *) 0 ; + short result; + + arg1 = (SipEvent *)jarg1; + result = (short)(arg1)->getCode(); + jresult = result; + return jresult; +} + + +SWIGEXPORT char * SWIGSTDCALL CSharp_SipEvent_getPhrase(void * jarg1) { + char * jresult ; + SipEvent *arg1 = (SipEvent *) 0 ; + char *result = 0 ; + + arg1 = (SipEvent *)jarg1; + result = (char *)(arg1)->getPhrase(); + jresult = SWIG_csharp_string_callback((const char *)result); + return jresult; +} + + +SWIGEXPORT int SWIGSTDCALL CSharp_SipEvent_getType(void * jarg1) { + int jresult ; + SipEvent *arg1 = (SipEvent *) 0 ; + tsip_event_type_t result; + + arg1 = (SipEvent *)jarg1; + result = (tsip_event_type_t)(arg1)->getType(); + jresult = result; + return jresult; +} + + +SWIGEXPORT void * SWIGSTDCALL CSharp_SipEvent_getSession(void * jarg1) { + void * jresult ; + SipEvent *arg1 = (SipEvent *) 0 ; + SipSession *result = 0 ; + + arg1 = (SipEvent *)jarg1; + result = (SipSession *)(arg1)->getSession(); + jresult = (void *)result; + return jresult; +} + + +SWIGEXPORT void * SWIGSTDCALL CSharp_new_SipSession(void * jarg1) { + void * jresult ; + SipStack *arg1 = (SipStack *) 0 ; + SipSession *result = 0 ; + + arg1 = (SipStack *)jarg1; + result = (SipSession *)new SipSession(arg1); + jresult = (void *)result; + return jresult; +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_delete_SipSession(void * jarg1) { + SipSession *arg1 = (SipSession *) 0 ; + + arg1 = (SipSession *)jarg1; + delete arg1; +} + + +SWIGEXPORT unsigned int SWIGSTDCALL CSharp_SipSession_addHeader(void * jarg1, char * jarg2, char * jarg3) { + unsigned int jresult ; + SipSession *arg1 = (SipSession *) 0 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; + bool result; + + arg1 = (SipSession *)jarg1; + arg2 = (char *)jarg2; + arg3 = (char *)jarg3; + result = (bool)(arg1)->addHeader((char const *)arg2,(char const *)arg3); + jresult = result; + return jresult; +} + + +SWIGEXPORT unsigned int SWIGSTDCALL CSharp_SipSession_removeHeader(void * jarg1, char * jarg2) { + unsigned int jresult ; + SipSession *arg1 = (SipSession *) 0 ; + char *arg2 = (char *) 0 ; + bool result; + + arg1 = (SipSession *)jarg1; + arg2 = (char *)jarg2; + result = (bool)(arg1)->removeHeader((char const *)arg2); + jresult = result; + return jresult; +} + + +SWIGEXPORT unsigned int SWIGSTDCALL CSharp_SipSession_addCaps__SWIG_0(void * jarg1, char * jarg2, char * jarg3) { + unsigned int jresult ; + SipSession *arg1 = (SipSession *) 0 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; + bool result; + + arg1 = (SipSession *)jarg1; + arg2 = (char *)jarg2; + arg3 = (char *)jarg3; + result = (bool)(arg1)->addCaps((char const *)arg2,(char const *)arg3); + jresult = result; + return jresult; +} + + +SWIGEXPORT unsigned int SWIGSTDCALL CSharp_SipSession_addCaps__SWIG_1(void * jarg1, char * jarg2) { + unsigned int jresult ; + SipSession *arg1 = (SipSession *) 0 ; + char *arg2 = (char *) 0 ; + bool result; + + arg1 = (SipSession *)jarg1; + arg2 = (char *)jarg2; + result = (bool)(arg1)->addCaps((char const *)arg2); + jresult = result; + return jresult; +} + + +SWIGEXPORT unsigned int SWIGSTDCALL CSharp_SipSession_removeCaps(void * jarg1, char * jarg2) { + unsigned int jresult ; + SipSession *arg1 = (SipSession *) 0 ; + char *arg2 = (char *) 0 ; + bool result; + + arg1 = (SipSession *)jarg1; + arg2 = (char *)jarg2; + result = (bool)(arg1)->removeCaps((char const *)arg2); + jresult = result; + return jresult; +} + + +SWIGEXPORT unsigned int SWIGSTDCALL CSharp_SipSession_setExpires(void * jarg1, unsigned int jarg2) { + unsigned int jresult ; + SipSession *arg1 = (SipSession *) 0 ; + unsigned int arg2 ; + bool result; + + arg1 = (SipSession *)jarg1; + arg2 = (unsigned int)jarg2; + result = (bool)(arg1)->setExpires(arg2); + jresult = result; + return jresult; +} + + +SWIGEXPORT unsigned int SWIGSTDCALL CSharp_SipSession_setFromUri(void * jarg1, char * jarg2) { + unsigned int jresult ; + SipSession *arg1 = (SipSession *) 0 ; + char *arg2 = (char *) 0 ; + bool result; + + arg1 = (SipSession *)jarg1; + arg2 = (char *)jarg2; + result = (bool)(arg1)->setFromUri((char const *)arg2); + jresult = result; + return jresult; +} + + +SWIGEXPORT unsigned int SWIGSTDCALL CSharp_SipSession_setToUri(void * jarg1, char * jarg2) { + unsigned int jresult ; + SipSession *arg1 = (SipSession *) 0 ; + char *arg2 = (char *) 0 ; + bool result; + + arg1 = (SipSession *)jarg1; + arg2 = (char *)jarg2; + result = (bool)(arg1)->setToUri((char const *)arg2); + jresult = result; + return jresult; +} + + +SWIGEXPORT void * SWIGSTDCALL CSharp_new_RegistrationEvent() { + void * jresult ; + RegistrationEvent *result = 0 ; + + result = (RegistrationEvent *)new RegistrationEvent(); + jresult = (void *)result; + return jresult; +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_delete_RegistrationEvent(void * jarg1) { + RegistrationEvent *arg1 = (RegistrationEvent *) 0 ; + + arg1 = (RegistrationEvent *)jarg1; + delete arg1; +} + + +SWIGEXPORT void * SWIGSTDCALL CSharp_RegistrationEvent_getSession2(void * jarg1) { + void * jresult ; + RegistrationEvent *arg1 = (RegistrationEvent *) 0 ; + RegistrationSession *result = 0 ; + + arg1 = (RegistrationEvent *)jarg1; + result = (RegistrationSession *)(arg1)->getSession2(); + jresult = (void *)result; + return jresult; +} + + +SWIGEXPORT void * SWIGSTDCALL CSharp_new_RegistrationSession(void * jarg1) { + void * jresult ; + SipStack *arg1 = (SipStack *) 0 ; + RegistrationSession *result = 0 ; + + arg1 = (SipStack *)jarg1; + result = (RegistrationSession *)new RegistrationSession(arg1); + jresult = (void *)result; + return jresult; +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_delete_RegistrationSession(void * jarg1) { + RegistrationSession *arg1 = (RegistrationSession *) 0 ; + + arg1 = (RegistrationSession *)jarg1; + delete arg1; +} + + +SWIGEXPORT unsigned int SWIGSTDCALL CSharp_RegistrationSession_Register(void * jarg1, unsigned int jarg2) { + unsigned int jresult ; + RegistrationSession *arg1 = (RegistrationSession *) 0 ; + unsigned int arg2 ; + bool result; + + arg1 = (RegistrationSession *)jarg1; + arg2 = (unsigned int)jarg2; + result = (bool)(arg1)->Register(arg2); + jresult = result; + return jresult; +} + + +SWIGEXPORT unsigned int SWIGSTDCALL CSharp_RegistrationSession_UnRegister(void * jarg1) { + unsigned int jresult ; + RegistrationSession *arg1 = (RegistrationSession *) 0 ; + bool result; + + arg1 = (RegistrationSession *)jarg1; + result = (bool)(arg1)->UnRegister(); + jresult = result; + return jresult; +} + + +SWIGEXPORT void * SWIGSTDCALL CSharp_new_SipCallback() { + void * jresult ; + SipCallback *result = 0 ; + + result = (SipCallback *)new SwigDirector_SipCallback(); + jresult = (void *)result; + return jresult; +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_delete_SipCallback(void * jarg1) { + SipCallback *arg1 = (SipCallback *) 0 ; + + arg1 = (SipCallback *)jarg1; + delete arg1; +} + + +SWIGEXPORT int SWIGSTDCALL CSharp_SipCallback_OnRegistrationChanged(void * jarg1, void * jarg2) { + int jresult ; + SipCallback *arg1 = (SipCallback *) 0 ; + RegistrationEvent *arg2 = (RegistrationEvent *) 0 ; + int result; + + arg1 = (SipCallback *)jarg1; + arg2 = (RegistrationEvent *)jarg2; + result = (int)(arg1)->OnRegistrationChanged((RegistrationEvent const *)arg2); + jresult = result; + return jresult; +} + + +SWIGEXPORT int SWIGSTDCALL CSharp_SipCallback_OnRegistrationChangedSwigExplicitSipCallback(void * jarg1, void * jarg2) { + int jresult ; + SipCallback *arg1 = (SipCallback *) 0 ; + RegistrationEvent *arg2 = (RegistrationEvent *) 0 ; + int result; + + arg1 = (SipCallback *)jarg1; + arg2 = (RegistrationEvent *)jarg2; + result = (int)(arg1)->SipCallback::OnRegistrationChanged((RegistrationEvent const *)arg2); + jresult = result; + return jresult; +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_SipCallback_director_connect(void *objarg, SwigDirector_SipCallback::SWIG_Callback0_t callback0) { + SipCallback *obj = (SipCallback *)objarg; + SwigDirector_SipCallback *director = dynamic_cast(obj); + if (director) { + director->swig_connect_director(callback0); + } +} + + +SWIGEXPORT void * SWIGSTDCALL CSharp_new_SafeObject() { + void * jresult ; + SafeObject *result = 0 ; + + result = (SafeObject *)new SafeObject(); + jresult = (void *)result; + return jresult; +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_delete_SafeObject(void * jarg1) { + SafeObject *arg1 = (SafeObject *) 0 ; + + arg1 = (SafeObject *)jarg1; + delete arg1; +} + + +SWIGEXPORT int SWIGSTDCALL CSharp_SafeObject_Lock(void * jarg1) { + int jresult ; + SafeObject *arg1 = (SafeObject *) 0 ; + int result; + + arg1 = (SafeObject *)jarg1; + result = (int)(arg1)->Lock(); + jresult = result; + return jresult; +} + + +SWIGEXPORT int SWIGSTDCALL CSharp_SafeObject_UnLock(void * jarg1) { + int jresult ; + SafeObject *arg1 = (SafeObject *) 0 ; + int result; + + arg1 = (SafeObject *)jarg1; + result = (int)(arg1)->UnLock(); + jresult = result; + return jresult; +} + + +SWIGEXPORT void * SWIGSTDCALL CSharp_new_SipStack(void * jarg1, char * jarg2, char * jarg3, char * jarg4) { + void * jresult ; + SipCallback *arg1 = (SipCallback *) 0 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; + char *arg4 = (char *) 0 ; + SipStack *result = 0 ; + + arg1 = (SipCallback *)jarg1; + arg2 = (char *)jarg2; + arg3 = (char *)jarg3; + arg4 = (char *)jarg4; + result = (SipStack *)new SipStack(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4); + jresult = (void *)result; + return jresult; +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_delete_SipStack(void * jarg1) { + SipStack *arg1 = (SipStack *) 0 ; + + arg1 = (SipStack *)jarg1; + delete arg1; +} + + +SWIGEXPORT unsigned int SWIGSTDCALL CSharp_SipStack_Start(void * jarg1) { + unsigned int jresult ; + SipStack *arg1 = (SipStack *) 0 ; + bool result; + + arg1 = (SipStack *)jarg1; + result = (bool)(arg1)->Start(); + jresult = result; + return jresult; +} + + +SWIGEXPORT unsigned int SWIGSTDCALL CSharp_SipStack_setProxyCSCF(void * jarg1, char * jarg2, unsigned int jarg3, char * jarg4, char * jarg5) { + unsigned int jresult ; + SipStack *arg1 = (SipStack *) 0 ; + char *arg2 = (char *) 0 ; + unsigned int arg3 ; + char *arg4 = (char *) 0 ; + char *arg5 = (char *) 0 ; + bool result; + + arg1 = (SipStack *)jarg1; + arg2 = (char *)jarg2; + arg3 = (unsigned int)jarg3; + arg4 = (char *)jarg4; + arg5 = (char *)jarg5; + result = (bool)(arg1)->setProxyCSCF((char const *)arg2,arg3,(char const *)arg4,(char const *)arg5); + jresult = result; + return jresult; +} + + +SWIGEXPORT unsigned int SWIGSTDCALL CSharp_SipStack_setLocalIP(void * jarg1, char * jarg2) { + unsigned int jresult ; + SipStack *arg1 = (SipStack *) 0 ; + char *arg2 = (char *) 0 ; + bool result; + + arg1 = (SipStack *)jarg1; + arg2 = (char *)jarg2; + result = (bool)(arg1)->setLocalIP((char const *)arg2); + jresult = result; + return jresult; +} + + +SWIGEXPORT unsigned int SWIGSTDCALL CSharp_SipStack_setLocalPort(void * jarg1, unsigned int jarg2) { + unsigned int jresult ; + SipStack *arg1 = (SipStack *) 0 ; + unsigned int arg2 ; + bool result; + + arg1 = (SipStack *)jarg1; + arg2 = (unsigned int)jarg2; + result = (bool)(arg1)->setLocalPort(arg2); + jresult = result; + return jresult; +} + + +SWIGEXPORT unsigned int SWIGSTDCALL CSharp_SipStack_addHeader(void * jarg1, char * jarg2, char * jarg3) { + unsigned int jresult ; + SipStack *arg1 = (SipStack *) 0 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; + bool result; + + arg1 = (SipStack *)jarg1; + arg2 = (char *)jarg2; + arg3 = (char *)jarg3; + result = (bool)(arg1)->addHeader((char const *)arg2,(char const *)arg3); + jresult = result; + return jresult; +} + + +SWIGEXPORT unsigned int SWIGSTDCALL CSharp_SipStack_removeHeader(void * jarg1, char * jarg2) { + unsigned int jresult ; + SipStack *arg1 = (SipStack *) 0 ; + char *arg2 = (char *) 0 ; + bool result; + + arg1 = (SipStack *)jarg1; + arg2 = (char *)jarg2; + result = (bool)(arg1)->removeHeader((char const *)arg2); + jresult = result; + return jresult; +} + + +SWIGEXPORT unsigned int SWIGSTDCALL CSharp_SipStack_Stop(void * jarg1) { + unsigned int jresult ; + SipStack *arg1 = (SipStack *) 0 ; + bool result; + + arg1 = (SipStack *)jarg1; + result = (bool)(arg1)->Stop(); + jresult = result; + return jresult; +} + + +SWIGEXPORT SipEvent * SWIGSTDCALL CSharp_RegistrationEventUpcast(RegistrationEvent *objectRef) { + return (SipEvent *)objectRef; +} + +SWIGEXPORT SipSession * SWIGSTDCALL CSharp_RegistrationSessionUpcast(RegistrationSession *objectRef) { + return (SipSession *)objectRef; +} + +SWIGEXPORT SafeObject * SWIGSTDCALL CSharp_SipStackUpcast(SipStack *objectRef) { + return (SafeObject *)objectRef; +} + +#ifdef __cplusplus +} +#endif + diff --git a/trunk/bindings/csharp/tinyWRAP_wrap.h b/trunk/bindings/csharp/tinyWRAP_wrap.h new file mode 100644 index 00000000..48085686 --- /dev/null +++ b/trunk/bindings/csharp/tinyWRAP_wrap.h @@ -0,0 +1,30 @@ +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 1.3.40 + * + * This file is not intended to be easily readable and contains a number of + * coding conventions designed to improve portability and efficiency. Do not make + * changes to this file unless you know what you are doing--modify the SWIG + * interface file instead. + * ----------------------------------------------------------------------------- */ + +#ifndef SWIG_tinyWRAP_WRAP_H_ +#define SWIG_tinyWRAP_WRAP_H_ + +class SwigDirector_SipCallback : public SipCallback, public Swig::Director { + +public: + SwigDirector_SipCallback(); + virtual ~SwigDirector_SipCallback(); + virtual int OnRegistrationChanged(RegistrationEvent const *e); + + typedef int (SWIGSTDCALL* SWIG_Callback0_t)(void *); + void swig_connect_director(SWIG_Callback0_t callbackOnRegistrationChanged); + +private: + SWIG_Callback0_t swig_callbackOnRegistrationChanged; + void swig_init_callbacks(); +}; + + +#endif diff --git a/trunk/bindings/csharp/tsip_event_type_t.cs b/trunk/bindings/csharp/tsip_event_type_t.cs new file mode 100644 index 00000000..b15cce8a --- /dev/null +++ b/trunk/bindings/csharp/tsip_event_type_t.cs @@ -0,0 +1,18 @@ +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 1.3.40 + * + * Do not make changes to this file unless you know what you are doing--modify + * the SWIG interface file instead. + * ----------------------------------------------------------------------------- */ + + +public enum tsip_event_type_t { + tsip_event_invite, + tsip_event_message, + tsip_event_options, + tsip_event_publish, + tsip_event_register, + tsip_event_subscribe, + tsip_event_dialog +} diff --git a/trunk/bindings/java/RegistrationEvent.java b/trunk/bindings/java/RegistrationEvent.java new file mode 100644 index 00000000..d6f22815 --- /dev/null +++ b/trunk/bindings/java/RegistrationEvent.java @@ -0,0 +1,47 @@ +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 1.3.40 + * + * Do not make changes to this file unless you know what you are doing--modify + * the SWIG interface file instead. + * ----------------------------------------------------------------------------- */ + +package org.doubango.tinyWRAP; + +public class RegistrationEvent extends SipEvent { + private long swigCPtr; + + protected RegistrationEvent(long cPtr, boolean cMemoryOwn) { + super(tinyWRAPJNI.SWIGRegistrationEventUpcast(cPtr), cMemoryOwn); + swigCPtr = cPtr; + } + + protected static long getCPtr(RegistrationEvent obj) { + return (obj == null) ? 0 : obj.swigCPtr; + } + + protected void finalize() { + delete(); + } + + public synchronized void delete() { + if (swigCPtr != 0) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_RegistrationEvent(swigCPtr); + } + swigCPtr = 0; + } + super.delete(); + } + + public RegistrationEvent() { + this(tinyWRAPJNI.new_RegistrationEvent(), true); + } + + public RegistrationSession getSession2() { + long cPtr = tinyWRAPJNI.RegistrationEvent_getSession2(swigCPtr, this); + return (cPtr == 0) ? null : new RegistrationSession(cPtr, false); + } + +} diff --git a/trunk/bindings/java/RegistrationSession.java b/trunk/bindings/java/RegistrationSession.java new file mode 100644 index 00000000..be5f97c5 --- /dev/null +++ b/trunk/bindings/java/RegistrationSession.java @@ -0,0 +1,50 @@ +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 1.3.40 + * + * Do not make changes to this file unless you know what you are doing--modify + * the SWIG interface file instead. + * ----------------------------------------------------------------------------- */ + +package org.doubango.tinyWRAP; + +public class RegistrationSession extends SipSession { + private long swigCPtr; + + protected RegistrationSession(long cPtr, boolean cMemoryOwn) { + super(tinyWRAPJNI.SWIGRegistrationSessionUpcast(cPtr), cMemoryOwn); + swigCPtr = cPtr; + } + + protected static long getCPtr(RegistrationSession obj) { + return (obj == null) ? 0 : obj.swigCPtr; + } + + protected void finalize() { + delete(); + } + + public synchronized void delete() { + if (swigCPtr != 0) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_RegistrationSession(swigCPtr); + } + swigCPtr = 0; + } + super.delete(); + } + + public RegistrationSession(SipStack Stack) { + this(tinyWRAPJNI.new_RegistrationSession(SipStack.getCPtr(Stack), Stack), true); + } + + public boolean Register(long expires) { + return tinyWRAPJNI.RegistrationSession_Register(swigCPtr, this, expires); + } + + public boolean UnRegister() { + return tinyWRAPJNI.RegistrationSession_UnRegister(swigCPtr, this); + } + +} diff --git a/trunk/bindings/java/SafeObject.java b/trunk/bindings/java/SafeObject.java new file mode 100644 index 00000000..889a845b --- /dev/null +++ b/trunk/bindings/java/SafeObject.java @@ -0,0 +1,50 @@ +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 1.3.40 + * + * Do not make changes to this file unless you know what you are doing--modify + * the SWIG interface file instead. + * ----------------------------------------------------------------------------- */ + +package org.doubango.tinyWRAP; + +public class SafeObject { + private long swigCPtr; + protected boolean swigCMemOwn; + + protected SafeObject(long cPtr, boolean cMemoryOwn) { + swigCMemOwn = cMemoryOwn; + swigCPtr = cPtr; + } + + protected static long getCPtr(SafeObject obj) { + return (obj == null) ? 0 : obj.swigCPtr; + } + + protected void finalize() { + delete(); + } + + public synchronized void delete() { + if (swigCPtr != 0) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SafeObject(swigCPtr); + } + swigCPtr = 0; + } + } + + public SafeObject() { + this(tinyWRAPJNI.new_SafeObject(), true); + } + + public int Lock() { + return tinyWRAPJNI.SafeObject_Lock(swigCPtr, this); + } + + public int UnLock() { + return tinyWRAPJNI.SafeObject_UnLock(swigCPtr, this); + } + +} diff --git a/trunk/bindings/java/SipCallback.java b/trunk/bindings/java/SipCallback.java new file mode 100644 index 00000000..4774e3e2 --- /dev/null +++ b/trunk/bindings/java/SipCallback.java @@ -0,0 +1,62 @@ +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 1.3.40 + * + * Do not make changes to this file unless you know what you are doing--modify + * the SWIG interface file instead. + * ----------------------------------------------------------------------------- */ + +package org.doubango.tinyWRAP; + +public class SipCallback { + private long swigCPtr; + protected boolean swigCMemOwn; + + protected SipCallback(long cPtr, boolean cMemoryOwn) { + swigCMemOwn = cMemoryOwn; + swigCPtr = cPtr; + } + + protected static long getCPtr(SipCallback obj) { + return (obj == null) ? 0 : obj.swigCPtr; + } + + protected void finalize() { + delete(); + } + + public synchronized void delete() { + if (swigCPtr != 0) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SipCallback(swigCPtr); + } + swigCPtr = 0; + } + } + + protected void swigDirectorDisconnect() { + swigCMemOwn = false; + delete(); + } + + public void swigReleaseOwnership() { + swigCMemOwn = false; + tinyWRAPJNI.SipCallback_change_ownership(this, swigCPtr, false); + } + + public void swigTakeOwnership() { + swigCMemOwn = true; + tinyWRAPJNI.SipCallback_change_ownership(this, swigCPtr, true); + } + + public SipCallback() { + this(tinyWRAPJNI.new_SipCallback(), true); + tinyWRAPJNI.SipCallback_director_connect(this, swigCPtr, swigCMemOwn, true); + } + + public int OnRegistrationChanged(RegistrationEvent e) { + return (getClass() == SipCallback.class) ? tinyWRAPJNI.SipCallback_OnRegistrationChanged(swigCPtr, this, RegistrationEvent.getCPtr(e), e) : tinyWRAPJNI.SipCallback_OnRegistrationChangedSwigExplicitSipCallback(swigCPtr, this, RegistrationEvent.getCPtr(e), e); + } + +} diff --git a/trunk/bindings/java/SipEvent.java b/trunk/bindings/java/SipEvent.java new file mode 100644 index 00000000..f1619d52 --- /dev/null +++ b/trunk/bindings/java/SipEvent.java @@ -0,0 +1,63 @@ +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 1.3.40 + * + * Do not make changes to this file unless you know what you are doing--modify + * the SWIG interface file instead. + * ----------------------------------------------------------------------------- */ + +package org.doubango.tinyWRAP; + +public class SipEvent { + private long swigCPtr; + protected boolean swigCMemOwn; + + protected SipEvent(long cPtr, boolean cMemoryOwn) { + swigCMemOwn = cMemoryOwn; + swigCPtr = cPtr; + } + + protected static long getCPtr(SipEvent obj) { + return (obj == null) ? 0 : obj.swigCPtr; + } + + protected void finalize() { + delete(); + } + + public synchronized void delete() { + if (swigCPtr != 0) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SipEvent(swigCPtr); + } + swigCPtr = 0; + } + } + + public SipEvent() { + this(tinyWRAPJNI.new_SipEvent__SWIG_0(), true); + } + + public SipEvent(short code, String phrase) { + this(tinyWRAPJNI.new_SipEvent__SWIG_1(code, phrase), true); + } + + public short getCode() { + return tinyWRAPJNI.SipEvent_getCode(swigCPtr, this); + } + + public String getPhrase() { + return tinyWRAPJNI.SipEvent_getPhrase(swigCPtr, this); + } + + public tsip_event_type_t getType() { + return tsip_event_type_t.swigToEnum(tinyWRAPJNI.SipEvent_getType(swigCPtr, this)); + } + + public SipSession getSession() { + long cPtr = tinyWRAPJNI.SipEvent_getSession(swigCPtr, this); + return (cPtr == 0) ? null : new SipSession(cPtr, false); + } + +} diff --git a/trunk/bindings/java/SipSession.java b/trunk/bindings/java/SipSession.java new file mode 100644 index 00000000..71a15b07 --- /dev/null +++ b/trunk/bindings/java/SipSession.java @@ -0,0 +1,74 @@ +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 1.3.40 + * + * Do not make changes to this file unless you know what you are doing--modify + * the SWIG interface file instead. + * ----------------------------------------------------------------------------- */ + +package org.doubango.tinyWRAP; + +public class SipSession { + private long swigCPtr; + protected boolean swigCMemOwn; + + protected SipSession(long cPtr, boolean cMemoryOwn) { + swigCMemOwn = cMemoryOwn; + swigCPtr = cPtr; + } + + protected static long getCPtr(SipSession obj) { + return (obj == null) ? 0 : obj.swigCPtr; + } + + protected void finalize() { + delete(); + } + + public synchronized void delete() { + if (swigCPtr != 0) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SipSession(swigCPtr); + } + swigCPtr = 0; + } + } + + public SipSession(SipStack Stack) { + this(tinyWRAPJNI.new_SipSession(SipStack.getCPtr(Stack), Stack), true); + } + + public boolean addHeader(String name, String value) { + return tinyWRAPJNI.SipSession_addHeader(swigCPtr, this, name, value); + } + + public boolean removeHeader(String name) { + return tinyWRAPJNI.SipSession_removeHeader(swigCPtr, this, name); + } + + public boolean addCaps(String name, String value) { + return tinyWRAPJNI.SipSession_addCaps__SWIG_0(swigCPtr, this, name, value); + } + + public boolean addCaps(String name) { + return tinyWRAPJNI.SipSession_addCaps__SWIG_1(swigCPtr, this, name); + } + + public boolean removeCaps(String name) { + return tinyWRAPJNI.SipSession_removeCaps(swigCPtr, this, name); + } + + public boolean setExpires(long expires) { + return tinyWRAPJNI.SipSession_setExpires(swigCPtr, this, expires); + } + + public boolean setFromUri(String fromUri) { + return tinyWRAPJNI.SipSession_setFromUri(swigCPtr, this, fromUri); + } + + public boolean setToUri(String toUri) { + return tinyWRAPJNI.SipSession_setToUri(swigCPtr, this, toUri); + } + +} diff --git a/trunk/bindings/java/SipStack.java b/trunk/bindings/java/SipStack.java new file mode 100644 index 00000000..95e1b72b --- /dev/null +++ b/trunk/bindings/java/SipStack.java @@ -0,0 +1,70 @@ +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 1.3.40 + * + * Do not make changes to this file unless you know what you are doing--modify + * the SWIG interface file instead. + * ----------------------------------------------------------------------------- */ + +package org.doubango.tinyWRAP; + +public class SipStack extends SafeObject { + private long swigCPtr; + + protected SipStack(long cPtr, boolean cMemoryOwn) { + super(tinyWRAPJNI.SWIGSipStackUpcast(cPtr), cMemoryOwn); + swigCPtr = cPtr; + } + + protected static long getCPtr(SipStack obj) { + return (obj == null) ? 0 : obj.swigCPtr; + } + + protected void finalize() { + delete(); + } + + public synchronized void delete() { + if (swigCPtr != 0) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SipStack(swigCPtr); + } + swigCPtr = 0; + } + super.delete(); + } + + public SipStack(SipCallback callback, String realm_uri, String impi_uri, String impu_uri) { + this(tinyWRAPJNI.new_SipStack(SipCallback.getCPtr(callback), callback, realm_uri, impi_uri, impu_uri), true); + } + + public boolean Start() { + return tinyWRAPJNI.SipStack_Start(swigCPtr, this); + } + + public boolean setProxyCSCF(String fqdn, long port, String transport, String ipversion) { + return tinyWRAPJNI.SipStack_setProxyCSCF(swigCPtr, this, fqdn, port, transport, ipversion); + } + + public boolean setLocalIP(String ip) { + return tinyWRAPJNI.SipStack_setLocalIP(swigCPtr, this, ip); + } + + public boolean setLocalPort(long port) { + return tinyWRAPJNI.SipStack_setLocalPort(swigCPtr, this, port); + } + + public boolean addHeader(String name, String value) { + return tinyWRAPJNI.SipStack_addHeader(swigCPtr, this, name, value); + } + + public boolean removeHeader(String name) { + return tinyWRAPJNI.SipStack_removeHeader(swigCPtr, this, name); + } + + public boolean Stop() { + return tinyWRAPJNI.SipStack_Stop(swigCPtr, this); + } + +} diff --git a/trunk/bindings/java/droid-makefile b/trunk/bindings/java/droid-makefile new file mode 100644 index 00000000..a846f7e0 --- /dev/null +++ b/trunk/bindings/java/droid-makefile @@ -0,0 +1,40 @@ +APP := lib$(PROJECT).so + +CFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions -I../_common -I../. -I../../tinySAK/src -I../../tinyNET/src -I../../tinyHTTP/include -I../../tinySIP/include +LDFLAGS := $(LDFLAGS) -Wl,-soname,lib$(PROJECT).so,-Bsymbolic,-shared,--whole-archive -lstdc++ -ltinySAK -ltinyNET -ltinySIP + + + +all: $(APP) + +OBJS = tinyWRAP_wrap.o\ + ../_common/MessagingEvent.o \ + ../_common/RegistrationEvent.o \ + ../_common/RegistrationSession.o \ + ../_common/SafeObject.o \ + ../_common/SipCallback.o \ + ../_common/SipEvent.o \ + ../_common/SipSession.o \ + ../_common/SipStack.o \ + ../_common/SubsciptionSession.o \ + ../_common/SubscriptionEvent.o + +$(APP): $(OBJS) + $(CPP) $(LDFLAGS) -o $@ $^ + +%.o: %.cxx + $(CPP) -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) + +shell: + $(ANDROID_SDK_ROOT)/tools/adb shell + +run: + $(ANDROID_SDK_ROOT)/tools/adb shell $(LIB_DIR)/$(APP) + +clean: + @rm -f $(OBJS) $(APP) \ No newline at end of file diff --git a/trunk/bindings/java/droid-test/.classpath b/trunk/bindings/java/droid-test/.classpath new file mode 100644 index 00000000..6e9239ff --- /dev/null +++ b/trunk/bindings/java/droid-test/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/trunk/bindings/java/droid-test/.project b/trunk/bindings/java/droid-test/.project new file mode 100644 index 00000000..a7b7b4a6 --- /dev/null +++ b/trunk/bindings/java/droid-test/.project @@ -0,0 +1,33 @@ + + + droid-test + + + + + + com.android.ide.eclipse.adt.ResourceManagerBuilder + + + + + com.android.ide.eclipse.adt.PreCompilerBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + com.android.ide.eclipse.adt.ApkBuilder + + + + + + com.android.ide.eclipse.adt.AndroidNature + org.eclipse.jdt.core.javanature + + diff --git a/trunk/bindings/java/droid-test/.settings/org.eclipse.jdt.core.prefs b/trunk/bindings/java/droid-test/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..40549878 --- /dev/null +++ b/trunk/bindings/java/droid-test/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,5 @@ +#Fri May 14 02:59:01 CEST 2010 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 +org.eclipse.jdt.core.compiler.compliance=1.5 +org.eclipse.jdt.core.compiler.source=1.5 diff --git a/trunk/bindings/java/droid-test/AndroidManifest.xml b/trunk/bindings/java/droid-test/AndroidManifest.xml new file mode 100644 index 00000000..171d995b --- /dev/null +++ b/trunk/bindings/java/droid-test/AndroidManifest.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/trunk/bindings/java/droid-test/default.properties b/trunk/bindings/java/droid-test/default.properties new file mode 100644 index 00000000..128c6ef1 --- /dev/null +++ b/trunk/bindings/java/droid-test/default.properties @@ -0,0 +1,13 @@ +# This file is automatically generated by Android Tools. +# Do not modify this file -- YOUR CHANGES WILL BE ERASED! +# +# This file must be checked in Version Control Systems. +# +# To customize properties used by the Ant build system use, +# "build.properties", and override values to adapt the script to your +# project structure. + +# Indicates whether an apk should be generated for each density. +split.density=false +# Project target. +target=android-7 diff --git a/trunk/bindings/java/droid-test/src/org/doubango/tinyWRAP/Main.java b/trunk/bindings/java/droid-test/src/org/doubango/tinyWRAP/Main.java new file mode 100644 index 00000000..95cedfb0 --- /dev/null +++ b/trunk/bindings/java/droid-test/src/org/doubango/tinyWRAP/Main.java @@ -0,0 +1,94 @@ +package org.doubango.tinyWRAP; + +import android.app.Activity; +import android.os.Bundle; + +public class Main extends Activity { + final String REALM = "ericsson.com"; + final String USER = "mamadou"; + final String PROXY_CSCF_IP = "192.168.0.13"; + final int PROXY_CSCF_PORT = 5081; + + /** Called when the activity is first created. */ + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.main); + + boolean success; + + /* Create call back */ + callback = new MyCallback(); + /* Create and configure the IMS/LTE stack */ + stack = new SipStack(callback, String.format("sip:%s", REALM), String.format("%s@%s", USER, REALM), String.format("sip:%s@%s", USER, REALM)); + stack.addHeader("Privacy", "INVITE, ACK, CANCEL, BYE, MESSAGE, OPTIONS, NOTIFY, PRACK, UPDATE, REFER"); + stack.addHeader("P-Access-Network-Info", "ADSL;utran-cell-id-3gpp=00000000"); + stack.addHeader("User-Agent", "IM-client/OMA1.0 doubango/v1.0.0"); + + /* Sets Proxy-CSCF */ + success = stack.setProxyCSCF(PROXY_CSCF_IP, PROXY_CSCF_PORT, "udp", "ipv4"); + /* Sets Local IP */ + success = stack.setLocalIP("10.0.2.15"); + success = stack.setLocalPort(5060); + /* Starts the stack */ + success = stack.Start(); + + /* Send REGISTER */ + regSession = new RegistrationSession(stack); + regSession.addCaps("+g.oma.sip-im"); + regSession.addCaps("+g.3gpp.smsip"); + regSession.addCaps("language", "\"en,fr\""); + if((success = regSession.Register(35))){ + } + + + } + + + static RegistrationSession regSession; + static MyCallback callback; + static SipStack stack; + + + + static { + try { + System.loadLibrary("tinySAK"); + System.loadLibrary("tinyNET"); + System.loadLibrary("tinyIPSec"); + System.loadLibrary("tinyHTTP"); + System.loadLibrary("tinySDP"); + System.loadLibrary("tinyMEDIA"); + System.loadLibrary("tinySIP"); + System.loadLibrary("tinyWRAP"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load.\n" + e); + System.exit(1); + } + catch(Exception e){ + e.printStackTrace(); + } + } +} + + +class MyCallback extends SipCallback +{ + public MyCallback() + { + super(); + } + + public int OnRegistrationChanged(RegistrationEvent e) + { + short code = e.getCode(); + //tsip_event_type_t type = e.getType(); + + //RegistrationSession session = (RegistrationSession) e.getSession(); + + System.out.println("Code=" + code); + System.out.println("Phrase=" + e.getPhrase()); + + return 0; + } +} \ No newline at end of file diff --git a/trunk/bindings/java/droid-test/src/org/doubango/tinyWRAP/RegistrationEvent.java b/trunk/bindings/java/droid-test/src/org/doubango/tinyWRAP/RegistrationEvent.java new file mode 100644 index 00000000..d6f22815 --- /dev/null +++ b/trunk/bindings/java/droid-test/src/org/doubango/tinyWRAP/RegistrationEvent.java @@ -0,0 +1,47 @@ +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 1.3.40 + * + * Do not make changes to this file unless you know what you are doing--modify + * the SWIG interface file instead. + * ----------------------------------------------------------------------------- */ + +package org.doubango.tinyWRAP; + +public class RegistrationEvent extends SipEvent { + private long swigCPtr; + + protected RegistrationEvent(long cPtr, boolean cMemoryOwn) { + super(tinyWRAPJNI.SWIGRegistrationEventUpcast(cPtr), cMemoryOwn); + swigCPtr = cPtr; + } + + protected static long getCPtr(RegistrationEvent obj) { + return (obj == null) ? 0 : obj.swigCPtr; + } + + protected void finalize() { + delete(); + } + + public synchronized void delete() { + if (swigCPtr != 0) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_RegistrationEvent(swigCPtr); + } + swigCPtr = 0; + } + super.delete(); + } + + public RegistrationEvent() { + this(tinyWRAPJNI.new_RegistrationEvent(), true); + } + + public RegistrationSession getSession2() { + long cPtr = tinyWRAPJNI.RegistrationEvent_getSession2(swigCPtr, this); + return (cPtr == 0) ? null : new RegistrationSession(cPtr, false); + } + +} diff --git a/trunk/bindings/java/droid-test/src/org/doubango/tinyWRAP/RegistrationSession.java b/trunk/bindings/java/droid-test/src/org/doubango/tinyWRAP/RegistrationSession.java new file mode 100644 index 00000000..be5f97c5 --- /dev/null +++ b/trunk/bindings/java/droid-test/src/org/doubango/tinyWRAP/RegistrationSession.java @@ -0,0 +1,50 @@ +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 1.3.40 + * + * Do not make changes to this file unless you know what you are doing--modify + * the SWIG interface file instead. + * ----------------------------------------------------------------------------- */ + +package org.doubango.tinyWRAP; + +public class RegistrationSession extends SipSession { + private long swigCPtr; + + protected RegistrationSession(long cPtr, boolean cMemoryOwn) { + super(tinyWRAPJNI.SWIGRegistrationSessionUpcast(cPtr), cMemoryOwn); + swigCPtr = cPtr; + } + + protected static long getCPtr(RegistrationSession obj) { + return (obj == null) ? 0 : obj.swigCPtr; + } + + protected void finalize() { + delete(); + } + + public synchronized void delete() { + if (swigCPtr != 0) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_RegistrationSession(swigCPtr); + } + swigCPtr = 0; + } + super.delete(); + } + + public RegistrationSession(SipStack Stack) { + this(tinyWRAPJNI.new_RegistrationSession(SipStack.getCPtr(Stack), Stack), true); + } + + public boolean Register(long expires) { + return tinyWRAPJNI.RegistrationSession_Register(swigCPtr, this, expires); + } + + public boolean UnRegister() { + return tinyWRAPJNI.RegistrationSession_UnRegister(swigCPtr, this); + } + +} diff --git a/trunk/bindings/java/droid-test/src/org/doubango/tinyWRAP/SafeObject.java b/trunk/bindings/java/droid-test/src/org/doubango/tinyWRAP/SafeObject.java new file mode 100644 index 00000000..889a845b --- /dev/null +++ b/trunk/bindings/java/droid-test/src/org/doubango/tinyWRAP/SafeObject.java @@ -0,0 +1,50 @@ +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 1.3.40 + * + * Do not make changes to this file unless you know what you are doing--modify + * the SWIG interface file instead. + * ----------------------------------------------------------------------------- */ + +package org.doubango.tinyWRAP; + +public class SafeObject { + private long swigCPtr; + protected boolean swigCMemOwn; + + protected SafeObject(long cPtr, boolean cMemoryOwn) { + swigCMemOwn = cMemoryOwn; + swigCPtr = cPtr; + } + + protected static long getCPtr(SafeObject obj) { + return (obj == null) ? 0 : obj.swigCPtr; + } + + protected void finalize() { + delete(); + } + + public synchronized void delete() { + if (swigCPtr != 0) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SafeObject(swigCPtr); + } + swigCPtr = 0; + } + } + + public SafeObject() { + this(tinyWRAPJNI.new_SafeObject(), true); + } + + public int Lock() { + return tinyWRAPJNI.SafeObject_Lock(swigCPtr, this); + } + + public int UnLock() { + return tinyWRAPJNI.SafeObject_UnLock(swigCPtr, this); + } + +} diff --git a/trunk/bindings/java/droid-test/src/org/doubango/tinyWRAP/SipCallback.java b/trunk/bindings/java/droid-test/src/org/doubango/tinyWRAP/SipCallback.java new file mode 100644 index 00000000..22af0f56 --- /dev/null +++ b/trunk/bindings/java/droid-test/src/org/doubango/tinyWRAP/SipCallback.java @@ -0,0 +1,62 @@ +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 1.3.40 + * + * Do not make changes to this file unless you know what you are doing--modify + * the SWIG interface file instead. + * ----------------------------------------------------------------------------- */ + +package org.doubango.tinyWRAP; + +public class SipCallback { + private long swigCPtr; + protected boolean swigCMemOwn; + + protected SipCallback(long cPtr, boolean cMemoryOwn) { + swigCMemOwn = cMemoryOwn; + swigCPtr = cPtr; + } + + protected static long getCPtr(SipCallback obj) { + return (obj == null) ? 0 : obj.swigCPtr; + } + + protected void finalize() { + delete(); + } + + public synchronized void delete() { + if (swigCPtr != 0) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SipCallback(swigCPtr); + } + swigCPtr = 0; + } + } + + protected void swigDirectorDisconnect() { + swigCMemOwn = false; + delete(); + } + + public void swigReleaseOwnership() { + swigCMemOwn = false; + tinyWRAPJNI.SipCallback_change_ownership(this, swigCPtr, false); + } + + public void swigTakeOwnership() { + swigCMemOwn = true; + tinyWRAPJNI.SipCallback_change_ownership(this, swigCPtr, true); + } + + public SipCallback() { + this(tinyWRAPJNI.new_SipCallback(), true); + tinyWRAPJNI.SipCallback_director_connect(this, swigCPtr, swigCMemOwn, false); + } + + public int OnRegistrationChanged(RegistrationEvent e) { + return (getClass() == SipCallback.class) ? tinyWRAPJNI.SipCallback_OnRegistrationChanged(swigCPtr, this, RegistrationEvent.getCPtr(e), e) : tinyWRAPJNI.SipCallback_OnRegistrationChangedSwigExplicitSipCallback(swigCPtr, this, RegistrationEvent.getCPtr(e), e); + } + +} diff --git a/trunk/bindings/java/droid-test/src/org/doubango/tinyWRAP/SipEvent.java b/trunk/bindings/java/droid-test/src/org/doubango/tinyWRAP/SipEvent.java new file mode 100644 index 00000000..f1619d52 --- /dev/null +++ b/trunk/bindings/java/droid-test/src/org/doubango/tinyWRAP/SipEvent.java @@ -0,0 +1,63 @@ +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 1.3.40 + * + * Do not make changes to this file unless you know what you are doing--modify + * the SWIG interface file instead. + * ----------------------------------------------------------------------------- */ + +package org.doubango.tinyWRAP; + +public class SipEvent { + private long swigCPtr; + protected boolean swigCMemOwn; + + protected SipEvent(long cPtr, boolean cMemoryOwn) { + swigCMemOwn = cMemoryOwn; + swigCPtr = cPtr; + } + + protected static long getCPtr(SipEvent obj) { + return (obj == null) ? 0 : obj.swigCPtr; + } + + protected void finalize() { + delete(); + } + + public synchronized void delete() { + if (swigCPtr != 0) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SipEvent(swigCPtr); + } + swigCPtr = 0; + } + } + + public SipEvent() { + this(tinyWRAPJNI.new_SipEvent__SWIG_0(), true); + } + + public SipEvent(short code, String phrase) { + this(tinyWRAPJNI.new_SipEvent__SWIG_1(code, phrase), true); + } + + public short getCode() { + return tinyWRAPJNI.SipEvent_getCode(swigCPtr, this); + } + + public String getPhrase() { + return tinyWRAPJNI.SipEvent_getPhrase(swigCPtr, this); + } + + public tsip_event_type_t getType() { + return tsip_event_type_t.swigToEnum(tinyWRAPJNI.SipEvent_getType(swigCPtr, this)); + } + + public SipSession getSession() { + long cPtr = tinyWRAPJNI.SipEvent_getSession(swigCPtr, this); + return (cPtr == 0) ? null : new SipSession(cPtr, false); + } + +} diff --git a/trunk/bindings/java/droid-test/src/org/doubango/tinyWRAP/SipSession.java b/trunk/bindings/java/droid-test/src/org/doubango/tinyWRAP/SipSession.java new file mode 100644 index 00000000..71a15b07 --- /dev/null +++ b/trunk/bindings/java/droid-test/src/org/doubango/tinyWRAP/SipSession.java @@ -0,0 +1,74 @@ +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 1.3.40 + * + * Do not make changes to this file unless you know what you are doing--modify + * the SWIG interface file instead. + * ----------------------------------------------------------------------------- */ + +package org.doubango.tinyWRAP; + +public class SipSession { + private long swigCPtr; + protected boolean swigCMemOwn; + + protected SipSession(long cPtr, boolean cMemoryOwn) { + swigCMemOwn = cMemoryOwn; + swigCPtr = cPtr; + } + + protected static long getCPtr(SipSession obj) { + return (obj == null) ? 0 : obj.swigCPtr; + } + + protected void finalize() { + delete(); + } + + public synchronized void delete() { + if (swigCPtr != 0) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SipSession(swigCPtr); + } + swigCPtr = 0; + } + } + + public SipSession(SipStack Stack) { + this(tinyWRAPJNI.new_SipSession(SipStack.getCPtr(Stack), Stack), true); + } + + public boolean addHeader(String name, String value) { + return tinyWRAPJNI.SipSession_addHeader(swigCPtr, this, name, value); + } + + public boolean removeHeader(String name) { + return tinyWRAPJNI.SipSession_removeHeader(swigCPtr, this, name); + } + + public boolean addCaps(String name, String value) { + return tinyWRAPJNI.SipSession_addCaps__SWIG_0(swigCPtr, this, name, value); + } + + public boolean addCaps(String name) { + return tinyWRAPJNI.SipSession_addCaps__SWIG_1(swigCPtr, this, name); + } + + public boolean removeCaps(String name) { + return tinyWRAPJNI.SipSession_removeCaps(swigCPtr, this, name); + } + + public boolean setExpires(long expires) { + return tinyWRAPJNI.SipSession_setExpires(swigCPtr, this, expires); + } + + public boolean setFromUri(String fromUri) { + return tinyWRAPJNI.SipSession_setFromUri(swigCPtr, this, fromUri); + } + + public boolean setToUri(String toUri) { + return tinyWRAPJNI.SipSession_setToUri(swigCPtr, this, toUri); + } + +} diff --git a/trunk/bindings/java/droid-test/src/org/doubango/tinyWRAP/SipStack.java b/trunk/bindings/java/droid-test/src/org/doubango/tinyWRAP/SipStack.java new file mode 100644 index 00000000..95e1b72b --- /dev/null +++ b/trunk/bindings/java/droid-test/src/org/doubango/tinyWRAP/SipStack.java @@ -0,0 +1,70 @@ +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 1.3.40 + * + * Do not make changes to this file unless you know what you are doing--modify + * the SWIG interface file instead. + * ----------------------------------------------------------------------------- */ + +package org.doubango.tinyWRAP; + +public class SipStack extends SafeObject { + private long swigCPtr; + + protected SipStack(long cPtr, boolean cMemoryOwn) { + super(tinyWRAPJNI.SWIGSipStackUpcast(cPtr), cMemoryOwn); + swigCPtr = cPtr; + } + + protected static long getCPtr(SipStack obj) { + return (obj == null) ? 0 : obj.swigCPtr; + } + + protected void finalize() { + delete(); + } + + public synchronized void delete() { + if (swigCPtr != 0) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SipStack(swigCPtr); + } + swigCPtr = 0; + } + super.delete(); + } + + public SipStack(SipCallback callback, String realm_uri, String impi_uri, String impu_uri) { + this(tinyWRAPJNI.new_SipStack(SipCallback.getCPtr(callback), callback, realm_uri, impi_uri, impu_uri), true); + } + + public boolean Start() { + return tinyWRAPJNI.SipStack_Start(swigCPtr, this); + } + + public boolean setProxyCSCF(String fqdn, long port, String transport, String ipversion) { + return tinyWRAPJNI.SipStack_setProxyCSCF(swigCPtr, this, fqdn, port, transport, ipversion); + } + + public boolean setLocalIP(String ip) { + return tinyWRAPJNI.SipStack_setLocalIP(swigCPtr, this, ip); + } + + public boolean setLocalPort(long port) { + return tinyWRAPJNI.SipStack_setLocalPort(swigCPtr, this, port); + } + + public boolean addHeader(String name, String value) { + return tinyWRAPJNI.SipStack_addHeader(swigCPtr, this, name, value); + } + + public boolean removeHeader(String name) { + return tinyWRAPJNI.SipStack_removeHeader(swigCPtr, this, name); + } + + public boolean Stop() { + return tinyWRAPJNI.SipStack_Stop(swigCPtr, this); + } + +} diff --git a/trunk/bindings/java/droid-test/src/org/doubango/tinyWRAP/tinyWRAP.java b/trunk/bindings/java/droid-test/src/org/doubango/tinyWRAP/tinyWRAP.java new file mode 100644 index 00000000..7e76b139 --- /dev/null +++ b/trunk/bindings/java/droid-test/src/org/doubango/tinyWRAP/tinyWRAP.java @@ -0,0 +1,12 @@ +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 1.3.40 + * + * Do not make changes to this file unless you know what you are doing--modify + * the SWIG interface file instead. + * ----------------------------------------------------------------------------- */ + +package org.doubango.tinyWRAP; + +public class tinyWRAP { +} diff --git a/trunk/bindings/java/droid-test/src/org/doubango/tinyWRAP/tinyWRAPJNI.java b/trunk/bindings/java/droid-test/src/org/doubango/tinyWRAP/tinyWRAPJNI.java new file mode 100644 index 00000000..92804894 --- /dev/null +++ b/trunk/bindings/java/droid-test/src/org/doubango/tinyWRAP/tinyWRAPJNI.java @@ -0,0 +1,67 @@ +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 1.3.40 + * + * Do not make changes to this file unless you know what you are doing--modify + * the SWIG interface file instead. + * ----------------------------------------------------------------------------- */ + +package org.doubango.tinyWRAP; + +class tinyWRAPJNI { + public final static native long new_SipEvent__SWIG_0(); + public final static native long new_SipEvent__SWIG_1(short jarg1, String jarg2); + public final static native void delete_SipEvent(long jarg1); + public final static native short SipEvent_getCode(long jarg1, SipEvent jarg1_); + public final static native String SipEvent_getPhrase(long jarg1, SipEvent jarg1_); + public final static native int SipEvent_getType(long jarg1, SipEvent jarg1_); + public final static native long SipEvent_getSession(long jarg1, SipEvent jarg1_); + public final static native long new_SipSession(long jarg1, SipStack jarg1_); + public final static native void delete_SipSession(long jarg1); + public final static native boolean SipSession_addHeader(long jarg1, SipSession jarg1_, String jarg2, String jarg3); + public final static native boolean SipSession_removeHeader(long jarg1, SipSession jarg1_, String jarg2); + public final static native boolean SipSession_addCaps__SWIG_0(long jarg1, SipSession jarg1_, String jarg2, String jarg3); + public final static native boolean SipSession_addCaps__SWIG_1(long jarg1, SipSession jarg1_, String jarg2); + public final static native boolean SipSession_removeCaps(long jarg1, SipSession jarg1_, String jarg2); + public final static native boolean SipSession_setExpires(long jarg1, SipSession jarg1_, long jarg2); + public final static native boolean SipSession_setFromUri(long jarg1, SipSession jarg1_, String jarg2); + public final static native boolean SipSession_setToUri(long jarg1, SipSession jarg1_, String jarg2); + public final static native long new_RegistrationEvent(); + public final static native void delete_RegistrationEvent(long jarg1); + public final static native long RegistrationEvent_getSession2(long jarg1, RegistrationEvent jarg1_); + public final static native long new_RegistrationSession(long jarg1, SipStack jarg1_); + public final static native void delete_RegistrationSession(long jarg1); + public final static native boolean RegistrationSession_Register(long jarg1, RegistrationSession jarg1_, long jarg2); + public final static native boolean RegistrationSession_UnRegister(long jarg1, RegistrationSession jarg1_); + public final static native long new_SipCallback(); + public final static native void delete_SipCallback(long jarg1); + public final static native int SipCallback_OnRegistrationChanged(long jarg1, SipCallback jarg1_, long jarg2, RegistrationEvent jarg2_); + public final static native int SipCallback_OnRegistrationChangedSwigExplicitSipCallback(long jarg1, SipCallback jarg1_, long jarg2, RegistrationEvent jarg2_); + public final static native void SipCallback_director_connect(SipCallback obj, long cptr, boolean mem_own, boolean weak_global); + public final static native void SipCallback_change_ownership(SipCallback obj, long cptr, boolean take_or_release); + public final static native long new_SafeObject(); + public final static native void delete_SafeObject(long jarg1); + public final static native int SafeObject_Lock(long jarg1, SafeObject jarg1_); + public final static native int SafeObject_UnLock(long jarg1, SafeObject jarg1_); + public final static native long new_SipStack(long jarg1, SipCallback jarg1_, String jarg2, String jarg3, String jarg4); + public final static native void delete_SipStack(long jarg1); + public final static native boolean SipStack_Start(long jarg1, SipStack jarg1_); + public final static native boolean SipStack_setProxyCSCF(long jarg1, SipStack jarg1_, String jarg2, long jarg3, String jarg4, String jarg5); + public final static native boolean SipStack_setLocalIP(long jarg1, SipStack jarg1_, String jarg2); + public final static native boolean SipStack_setLocalPort(long jarg1, SipStack jarg1_, long jarg2); + public final static native boolean SipStack_addHeader(long jarg1, SipStack jarg1_, String jarg2, String jarg3); + public final static native boolean SipStack_removeHeader(long jarg1, SipStack jarg1_, String jarg2); + public final static native boolean SipStack_Stop(long jarg1, SipStack jarg1_); + public final static native long SWIGRegistrationEventUpcast(long jarg1); + public final static native long SWIGRegistrationSessionUpcast(long jarg1); + public final static native long SWIGSipStackUpcast(long jarg1); + + public static int SwigDirector_SipCallback_OnRegistrationChanged(SipCallback self, long e) { + return self.OnRegistrationChanged((e == 0) ? null : new RegistrationEvent(e, false)); + } + + private final static native void swig_module_init(); + static { + swig_module_init(); + } +} diff --git a/trunk/bindings/java/droid-test/src/org/doubango/tinyWRAP/tsip_event_type_t.java b/trunk/bindings/java/droid-test/src/org/doubango/tinyWRAP/tsip_event_type_t.java new file mode 100644 index 00000000..ecd1321f --- /dev/null +++ b/trunk/bindings/java/droid-test/src/org/doubango/tinyWRAP/tsip_event_type_t.java @@ -0,0 +1,59 @@ +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 1.3.40 + * + * Do not make changes to this file unless you know what you are doing--modify + * the SWIG interface file instead. + * ----------------------------------------------------------------------------- */ + +package org.doubango.tinyWRAP; + +public final class tsip_event_type_t { + public final static tsip_event_type_t tsip_event_invite = new tsip_event_type_t("tsip_event_invite"); + public final static tsip_event_type_t tsip_event_message = new tsip_event_type_t("tsip_event_message"); + public final static tsip_event_type_t tsip_event_options = new tsip_event_type_t("tsip_event_options"); + public final static tsip_event_type_t tsip_event_publish = new tsip_event_type_t("tsip_event_publish"); + public final static tsip_event_type_t tsip_event_register = new tsip_event_type_t("tsip_event_register"); + public final static tsip_event_type_t tsip_event_subscribe = new tsip_event_type_t("tsip_event_subscribe"); + public final static tsip_event_type_t tsip_event_dialog = new tsip_event_type_t("tsip_event_dialog"); + + public final int swigValue() { + return swigValue; + } + + public String toString() { + return swigName; + } + + public static tsip_event_type_t swigToEnum(int swigValue) { + if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue) + return swigValues[swigValue]; + for (int i = 0; i < swigValues.length; i++) + if (swigValues[i].swigValue == swigValue) + return swigValues[i]; + throw new IllegalArgumentException("No enum " + tsip_event_type_t.class + " with value " + swigValue); + } + + private tsip_event_type_t(String swigName) { + this.swigName = swigName; + this.swigValue = swigNext++; + } + + private tsip_event_type_t(String swigName, int swigValue) { + this.swigName = swigName; + this.swigValue = swigValue; + swigNext = swigValue+1; + } + + private tsip_event_type_t(String swigName, tsip_event_type_t swigEnum) { + this.swigName = swigName; + this.swigValue = swigEnum.swigValue; + swigNext = this.swigValue+1; + } + + private static tsip_event_type_t[] swigValues = { tsip_event_invite, tsip_event_message, tsip_event_options, tsip_event_publish, tsip_event_register, tsip_event_subscribe, tsip_event_dialog }; + private static int swigNext = 0; + private final int swigValue; + private final String swigName; +} + diff --git a/trunk/bindings/java/tinyWRAP.java b/trunk/bindings/java/tinyWRAP.java new file mode 100644 index 00000000..7e76b139 --- /dev/null +++ b/trunk/bindings/java/tinyWRAP.java @@ -0,0 +1,12 @@ +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 1.3.40 + * + * Do not make changes to this file unless you know what you are doing--modify + * the SWIG interface file instead. + * ----------------------------------------------------------------------------- */ + +package org.doubango.tinyWRAP; + +public class tinyWRAP { +} diff --git a/trunk/bindings/java/tinyWRAPJNI.java b/trunk/bindings/java/tinyWRAPJNI.java new file mode 100644 index 00000000..92804894 --- /dev/null +++ b/trunk/bindings/java/tinyWRAPJNI.java @@ -0,0 +1,67 @@ +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 1.3.40 + * + * Do not make changes to this file unless you know what you are doing--modify + * the SWIG interface file instead. + * ----------------------------------------------------------------------------- */ + +package org.doubango.tinyWRAP; + +class tinyWRAPJNI { + public final static native long new_SipEvent__SWIG_0(); + public final static native long new_SipEvent__SWIG_1(short jarg1, String jarg2); + public final static native void delete_SipEvent(long jarg1); + public final static native short SipEvent_getCode(long jarg1, SipEvent jarg1_); + public final static native String SipEvent_getPhrase(long jarg1, SipEvent jarg1_); + public final static native int SipEvent_getType(long jarg1, SipEvent jarg1_); + public final static native long SipEvent_getSession(long jarg1, SipEvent jarg1_); + public final static native long new_SipSession(long jarg1, SipStack jarg1_); + public final static native void delete_SipSession(long jarg1); + public final static native boolean SipSession_addHeader(long jarg1, SipSession jarg1_, String jarg2, String jarg3); + public final static native boolean SipSession_removeHeader(long jarg1, SipSession jarg1_, String jarg2); + public final static native boolean SipSession_addCaps__SWIG_0(long jarg1, SipSession jarg1_, String jarg2, String jarg3); + public final static native boolean SipSession_addCaps__SWIG_1(long jarg1, SipSession jarg1_, String jarg2); + public final static native boolean SipSession_removeCaps(long jarg1, SipSession jarg1_, String jarg2); + public final static native boolean SipSession_setExpires(long jarg1, SipSession jarg1_, long jarg2); + public final static native boolean SipSession_setFromUri(long jarg1, SipSession jarg1_, String jarg2); + public final static native boolean SipSession_setToUri(long jarg1, SipSession jarg1_, String jarg2); + public final static native long new_RegistrationEvent(); + public final static native void delete_RegistrationEvent(long jarg1); + public final static native long RegistrationEvent_getSession2(long jarg1, RegistrationEvent jarg1_); + public final static native long new_RegistrationSession(long jarg1, SipStack jarg1_); + public final static native void delete_RegistrationSession(long jarg1); + public final static native boolean RegistrationSession_Register(long jarg1, RegistrationSession jarg1_, long jarg2); + public final static native boolean RegistrationSession_UnRegister(long jarg1, RegistrationSession jarg1_); + public final static native long new_SipCallback(); + public final static native void delete_SipCallback(long jarg1); + public final static native int SipCallback_OnRegistrationChanged(long jarg1, SipCallback jarg1_, long jarg2, RegistrationEvent jarg2_); + public final static native int SipCallback_OnRegistrationChangedSwigExplicitSipCallback(long jarg1, SipCallback jarg1_, long jarg2, RegistrationEvent jarg2_); + public final static native void SipCallback_director_connect(SipCallback obj, long cptr, boolean mem_own, boolean weak_global); + public final static native void SipCallback_change_ownership(SipCallback obj, long cptr, boolean take_or_release); + public final static native long new_SafeObject(); + public final static native void delete_SafeObject(long jarg1); + public final static native int SafeObject_Lock(long jarg1, SafeObject jarg1_); + public final static native int SafeObject_UnLock(long jarg1, SafeObject jarg1_); + public final static native long new_SipStack(long jarg1, SipCallback jarg1_, String jarg2, String jarg3, String jarg4); + public final static native void delete_SipStack(long jarg1); + public final static native boolean SipStack_Start(long jarg1, SipStack jarg1_); + public final static native boolean SipStack_setProxyCSCF(long jarg1, SipStack jarg1_, String jarg2, long jarg3, String jarg4, String jarg5); + public final static native boolean SipStack_setLocalIP(long jarg1, SipStack jarg1_, String jarg2); + public final static native boolean SipStack_setLocalPort(long jarg1, SipStack jarg1_, long jarg2); + public final static native boolean SipStack_addHeader(long jarg1, SipStack jarg1_, String jarg2, String jarg3); + public final static native boolean SipStack_removeHeader(long jarg1, SipStack jarg1_, String jarg2); + public final static native boolean SipStack_Stop(long jarg1, SipStack jarg1_); + public final static native long SWIGRegistrationEventUpcast(long jarg1); + public final static native long SWIGRegistrationSessionUpcast(long jarg1); + public final static native long SWIGSipStackUpcast(long jarg1); + + public static int SwigDirector_SipCallback_OnRegistrationChanged(SipCallback self, long e) { + return self.OnRegistrationChanged((e == 0) ? null : new RegistrationEvent(e, false)); + } + + private final static native void swig_module_init(); + static { + swig_module_init(); + } +} diff --git a/trunk/bindings/java/tinyWRAP_wrap.cxx b/trunk/bindings/java/tinyWRAP_wrap.cxx new file mode 100644 index 00000000..76440769 --- /dev/null +++ b/trunk/bindings/java/tinyWRAP_wrap.cxx @@ -0,0 +1,1289 @@ +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 1.3.40 + * + * This file is not intended to be easily readable and contains a number of + * coding conventions designed to improve portability and efficiency. Do not make + * changes to this file unless you know what you are doing--modify the SWIG + * interface file instead. + * ----------------------------------------------------------------------------- */ + +#define SWIGJAVA +#define SWIG_DIRECTORS + + +#ifdef __cplusplus +/* SwigValueWrapper is described in swig.swg */ +template class SwigValueWrapper { + struct SwigMovePointer { + T *ptr; + SwigMovePointer(T *p) : ptr(p) { } + ~SwigMovePointer() { delete ptr; } + SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; } + } pointer; + SwigValueWrapper& operator=(const SwigValueWrapper& rhs); + SwigValueWrapper(const SwigValueWrapper& rhs); +public: + SwigValueWrapper() : pointer(0) { } + SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; } + operator T&() const { return *pointer.ptr; } + T *operator&() { return pointer.ptr; } +}; + +template T SwigValueInit() { + return T(); +} +#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 */ +#if defined(__GNUC__) && !defined(__INTEL_COMPILER) + typedef long long __int64; +#endif + +/* Fix for jlong on 64-bit x86 Solaris */ +#if defined(__x86_64) +# ifdef _LP64 +# undef _LP64 +# endif +#endif + +#include +#include +#include + + +/* Support for throwing Java exceptions */ +typedef enum { + SWIG_JavaOutOfMemoryError = 1, + SWIG_JavaIOException, + SWIG_JavaRuntimeException, + SWIG_JavaIndexOutOfBoundsException, + SWIG_JavaArithmeticException, + SWIG_JavaIllegalArgumentException, + SWIG_JavaNullPointerException, + SWIG_JavaDirectorPureVirtual, + SWIG_JavaUnknownError +} SWIG_JavaExceptionCodes; + +typedef struct { + SWIG_JavaExceptionCodes code; + const char *java_exception; +} SWIG_JavaExceptions_t; + + +static void SWIGUNUSED SWIG_JavaThrowException(JNIEnv *jenv, SWIG_JavaExceptionCodes code, const char *msg) { + jclass excep; + static const SWIG_JavaExceptions_t java_exceptions[] = { + { SWIG_JavaOutOfMemoryError, "java/lang/OutOfMemoryError" }, + { SWIG_JavaIOException, "java/io/IOException" }, + { SWIG_JavaRuntimeException, "java/lang/RuntimeException" }, + { SWIG_JavaIndexOutOfBoundsException, "java/lang/IndexOutOfBoundsException" }, + { SWIG_JavaArithmeticException, "java/lang/ArithmeticException" }, + { SWIG_JavaIllegalArgumentException, "java/lang/IllegalArgumentException" }, + { SWIG_JavaNullPointerException, "java/lang/NullPointerException" }, + { SWIG_JavaDirectorPureVirtual, "java/lang/RuntimeException" }, + { SWIG_JavaUnknownError, "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) + except_ptr++; + + jenv->ExceptionClear(); + excep = jenv->FindClass(except_ptr->java_exception); + if (excep) + jenv->ThrowNew(excep, msg); +} + + +/* Contract support */ + +#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(&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[1]; +} + +#include "SipEvent.h" +#include "SipSession.h" +#include "RegistrationEvent.h" +#include "RegistrationSession.h" +#include "SubscriptionEvent.h" +#include "SubscriptionSession.h" +#include "SipCallback.h" +#include "SafeObject.h" +#include "SipStack.h" + + + +/* --------------------------------------------------- + * C++ director class methods + * --------------------------------------------------- */ + +#include "java/tinyWRAP_wrap.h" + +SwigDirector_SipCallback::SwigDirector_SipCallback(JNIEnv *jenv) : SipCallback(), Swig::Director(jenv) { +} + +SwigDirector_SipCallback::~SwigDirector_SipCallback() { + swig_disconnect_director_self("swigDirectorDisconnect"); +} + + +int SwigDirector_SipCallback::OnRegistrationChanged(RegistrationEvent const *e) { + int c_result = SwigValueInit< int >() ; + jint jresult = 0 ; + JNIEnvWrapper swigjnienv(this) ; + JNIEnv * jenv = swigjnienv.getJNIEnv() ; + jobject swigjobj = (jobject) NULL ; + jlong je = 0 ; + + if (!swig_override[0]) { + return SipCallback::OnRegistrationChanged(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[0], swigjobj, je); + if (jenv->ExceptionOccurred()) return c_result; + c_result = (int)jresult; + } else { + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null upcall object"); + } + if (swigjobj) jenv->DeleteLocalRef(swigjobj); + return c_result; +} + +void SwigDirector_SipCallback::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[] = { + { + "OnRegistrationChanged", "(Lorg/doubango/tinyWRAP/RegistrationEvent;)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/SipCallback"); + if (!baseclass) return; + baseclass = (jclass) jenv->NewGlobalRef(baseclass); + } + bool derived = (jenv->IsSameObject(baseclass, jcls) ? false : true); + for (int i = 0; i < 1; ++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(); + } + } + } +} + + + +#ifdef __cplusplus +extern "C" { +#endif + +SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_new_1SipEvent_1_1SWIG_10(JNIEnv *jenv, jclass jcls) { + jlong jresult = 0 ; + SipEvent *result = 0 ; + + (void)jenv; + (void)jcls; + result = (SipEvent *)new SipEvent(); + *(SipEvent **)&jresult = result; + return jresult; +} + + +SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_new_1SipEvent_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jshort jarg1, jstring jarg2) { + jlong jresult = 0 ; + short arg1 ; + char *arg2 = (char *) 0 ; + SipEvent *result = 0 ; + + (void)jenv; + (void)jcls; + arg1 = (short)jarg1; + arg2 = 0; + if (jarg2) { + arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0); + if (!arg2) return 0; + } + result = (SipEvent *)new SipEvent(arg1,(char const *)arg2); + *(SipEvent **)&jresult = result; + if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); + return jresult; +} + + +SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_delete_1SipEvent(JNIEnv *jenv, jclass jcls, jlong jarg1) { + SipEvent *arg1 = (SipEvent *) 0 ; + + (void)jenv; + (void)jcls; + arg1 = *(SipEvent **)&jarg1; + delete arg1; +} + + +SWIGEXPORT jshort JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipEvent_1getCode(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { + jshort jresult = 0 ; + SipEvent *arg1 = (SipEvent *) 0 ; + short result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(SipEvent **)&jarg1; + result = (short)(arg1)->getCode(); + jresult = (jshort)result; + return jresult; +} + + +SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipEvent_1getPhrase(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { + jstring jresult = 0 ; + SipEvent *arg1 = (SipEvent *) 0 ; + char *result = 0 ; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(SipEvent **)&jarg1; + result = (char *)(arg1)->getPhrase(); + if (result) jresult = jenv->NewStringUTF((const char *)result); + return jresult; +} + + +SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipEvent_1getType(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { + jint jresult = 0 ; + SipEvent *arg1 = (SipEvent *) 0 ; + tsip_event_type_t result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(SipEvent **)&jarg1; + result = (tsip_event_type_t)(arg1)->getType(); + jresult = (jint)result; + return jresult; +} + + +SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipEvent_1getSession(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { + jlong jresult = 0 ; + SipEvent *arg1 = (SipEvent *) 0 ; + SipSession *result = 0 ; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(SipEvent **)&jarg1; + result = (SipSession *)(arg1)->getSession(); + *(SipSession **)&jresult = result; + return jresult; +} + + +SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_new_1SipSession(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { + jlong jresult = 0 ; + SipStack *arg1 = (SipStack *) 0 ; + SipSession *result = 0 ; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(SipStack **)&jarg1; + result = (SipSession *)new SipSession(arg1); + *(SipSession **)&jresult = result; + return jresult; +} + + +SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_delete_1SipSession(JNIEnv *jenv, jclass jcls, jlong jarg1) { + SipSession *arg1 = (SipSession *) 0 ; + + (void)jenv; + (void)jcls; + arg1 = *(SipSession **)&jarg1; + delete arg1; +} + + +SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipSession_1addHeader(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3) { + jboolean jresult = 0 ; + SipSession *arg1 = (SipSession *) 0 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; + bool result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(SipSession **)&jarg1; + arg2 = 0; + if (jarg2) { + arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0); + if (!arg2) return 0; + } + arg3 = 0; + if (jarg3) { + arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0); + if (!arg3) return 0; + } + result = (bool)(arg1)->addHeader((char const *)arg2,(char const *)arg3); + jresult = (jboolean)result; + if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); + if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3); + return jresult; +} + + +SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipSession_1removeHeader(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) { + jboolean jresult = 0 ; + SipSession *arg1 = (SipSession *) 0 ; + char *arg2 = (char *) 0 ; + bool result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(SipSession **)&jarg1; + arg2 = 0; + if (jarg2) { + arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0); + if (!arg2) return 0; + } + result = (bool)(arg1)->removeHeader((char const *)arg2); + jresult = (jboolean)result; + if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); + return jresult; +} + + +SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipSession_1addCaps_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3) { + jboolean jresult = 0 ; + SipSession *arg1 = (SipSession *) 0 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; + bool result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(SipSession **)&jarg1; + arg2 = 0; + if (jarg2) { + arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0); + if (!arg2) return 0; + } + arg3 = 0; + if (jarg3) { + arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0); + if (!arg3) return 0; + } + result = (bool)(arg1)->addCaps((char const *)arg2,(char const *)arg3); + jresult = (jboolean)result; + if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); + if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3); + return jresult; +} + + +SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipSession_1addCaps_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) { + jboolean jresult = 0 ; + SipSession *arg1 = (SipSession *) 0 ; + char *arg2 = (char *) 0 ; + bool result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(SipSession **)&jarg1; + arg2 = 0; + if (jarg2) { + arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0); + if (!arg2) return 0; + } + result = (bool)(arg1)->addCaps((char const *)arg2); + jresult = (jboolean)result; + if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); + return jresult; +} + + +SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipSession_1removeCaps(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) { + jboolean jresult = 0 ; + SipSession *arg1 = (SipSession *) 0 ; + char *arg2 = (char *) 0 ; + bool result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(SipSession **)&jarg1; + arg2 = 0; + if (jarg2) { + arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0); + if (!arg2) return 0; + } + result = (bool)(arg1)->removeCaps((char const *)arg2); + jresult = (jboolean)result; + if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); + return jresult; +} + + +SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipSession_1setExpires(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2) { + jboolean jresult = 0 ; + SipSession *arg1 = (SipSession *) 0 ; + unsigned int arg2 ; + bool result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(SipSession **)&jarg1; + arg2 = (unsigned int)jarg2; + result = (bool)(arg1)->setExpires(arg2); + jresult = (jboolean)result; + return jresult; +} + + +SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipSession_1setFromUri(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) { + jboolean jresult = 0 ; + SipSession *arg1 = (SipSession *) 0 ; + char *arg2 = (char *) 0 ; + bool result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(SipSession **)&jarg1; + arg2 = 0; + if (jarg2) { + arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0); + if (!arg2) return 0; + } + result = (bool)(arg1)->setFromUri((char const *)arg2); + jresult = (jboolean)result; + if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); + return jresult; +} + + +SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipSession_1setToUri(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) { + jboolean jresult = 0 ; + SipSession *arg1 = (SipSession *) 0 ; + char *arg2 = (char *) 0 ; + bool result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(SipSession **)&jarg1; + arg2 = 0; + if (jarg2) { + arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0); + if (!arg2) return 0; + } + result = (bool)(arg1)->setToUri((char const *)arg2); + jresult = (jboolean)result; + if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); + return jresult; +} + + +SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_new_1RegistrationEvent(JNIEnv *jenv, jclass jcls) { + jlong jresult = 0 ; + RegistrationEvent *result = 0 ; + + (void)jenv; + (void)jcls; + result = (RegistrationEvent *)new RegistrationEvent(); + *(RegistrationEvent **)&jresult = result; + return jresult; +} + + +SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_delete_1RegistrationEvent(JNIEnv *jenv, jclass jcls, jlong jarg1) { + RegistrationEvent *arg1 = (RegistrationEvent *) 0 ; + + (void)jenv; + (void)jcls; + arg1 = *(RegistrationEvent **)&jarg1; + delete arg1; +} + + +SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_RegistrationEvent_1getSession2(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { + jlong jresult = 0 ; + RegistrationEvent *arg1 = (RegistrationEvent *) 0 ; + RegistrationSession *result = 0 ; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(RegistrationEvent **)&jarg1; + result = (RegistrationSession *)(arg1)->getSession2(); + *(RegistrationSession **)&jresult = result; + return jresult; +} + + +SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_new_1RegistrationSession(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { + jlong jresult = 0 ; + SipStack *arg1 = (SipStack *) 0 ; + RegistrationSession *result = 0 ; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(SipStack **)&jarg1; + result = (RegistrationSession *)new RegistrationSession(arg1); + *(RegistrationSession **)&jresult = result; + return jresult; +} + + +SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_delete_1RegistrationSession(JNIEnv *jenv, jclass jcls, jlong jarg1) { + RegistrationSession *arg1 = (RegistrationSession *) 0 ; + + (void)jenv; + (void)jcls; + arg1 = *(RegistrationSession **)&jarg1; + delete arg1; +} + + +SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_RegistrationSession_1Register(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2) { + jboolean jresult = 0 ; + RegistrationSession *arg1 = (RegistrationSession *) 0 ; + unsigned int arg2 ; + bool result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(RegistrationSession **)&jarg1; + arg2 = (unsigned int)jarg2; + result = (bool)(arg1)->Register(arg2); + jresult = (jboolean)result; + return jresult; +} + + +SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_RegistrationSession_1UnRegister(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { + jboolean jresult = 0 ; + RegistrationSession *arg1 = (RegistrationSession *) 0 ; + bool result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(RegistrationSession **)&jarg1; + result = (bool)(arg1)->UnRegister(); + jresult = (jboolean)result; + return jresult; +} + + +SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_new_1SipCallback(JNIEnv *jenv, jclass jcls) { + jlong jresult = 0 ; + SipCallback *result = 0 ; + + (void)jenv; + (void)jcls; + result = (SipCallback *)new SwigDirector_SipCallback(jenv); + *(SipCallback **)&jresult = result; + return jresult; +} + + +SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_delete_1SipCallback(JNIEnv *jenv, jclass jcls, jlong jarg1) { + SipCallback *arg1 = (SipCallback *) 0 ; + + (void)jenv; + (void)jcls; + arg1 = *(SipCallback **)&jarg1; + delete arg1; +} + + +SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipCallback_1OnRegistrationChanged(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) { + jint jresult = 0 ; + SipCallback *arg1 = (SipCallback *) 0 ; + RegistrationEvent *arg2 = (RegistrationEvent *) 0 ; + int result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + (void)jarg2_; + arg1 = *(SipCallback **)&jarg1; + arg2 = *(RegistrationEvent **)&jarg2; + result = (int)(arg1)->OnRegistrationChanged((RegistrationEvent const *)arg2); + jresult = (jint)result; + return jresult; +} + + +SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipCallback_1OnRegistrationChangedSwigExplicitSipCallback(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) { + jint jresult = 0 ; + SipCallback *arg1 = (SipCallback *) 0 ; + RegistrationEvent *arg2 = (RegistrationEvent *) 0 ; + int result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + (void)jarg2_; + arg1 = *(SipCallback **)&jarg1; + arg2 = *(RegistrationEvent **)&jarg2; + result = (int)(arg1)->SipCallback::OnRegistrationChanged((RegistrationEvent const *)arg2); + jresult = (jint)result; + return jresult; +} + + +SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipCallback_1director_1connect(JNIEnv *jenv, jclass jcls, jobject jself, jlong objarg, jboolean jswig_mem_own, jboolean jweak_global) { + SipCallback *obj = *((SipCallback **)&objarg); + (void)jcls; + SwigDirector_SipCallback *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_SipCallback_1change_1ownership(JNIEnv *jenv, jclass jcls, jobject jself, jlong objarg, jboolean jtake_or_release) { + SipCallback *obj = *((SipCallback **)&objarg); + SwigDirector_SipCallback *director = static_cast(obj); + (void)jcls; + if (director) { + director->swig_java_change_ownership(jenv, jself, jtake_or_release ? true : false); + } +} + + +SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_new_1SafeObject(JNIEnv *jenv, jclass jcls) { + jlong jresult = 0 ; + SafeObject *result = 0 ; + + (void)jenv; + (void)jcls; + result = (SafeObject *)new SafeObject(); + *(SafeObject **)&jresult = result; + return jresult; +} + + +SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_delete_1SafeObject(JNIEnv *jenv, jclass jcls, jlong jarg1) { + SafeObject *arg1 = (SafeObject *) 0 ; + + (void)jenv; + (void)jcls; + arg1 = *(SafeObject **)&jarg1; + delete arg1; +} + + +SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SafeObject_1Lock(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { + jint jresult = 0 ; + SafeObject *arg1 = (SafeObject *) 0 ; + int result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(SafeObject **)&jarg1; + result = (int)(arg1)->Lock(); + jresult = (jint)result; + return jresult; +} + + +SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SafeObject_1UnLock(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { + jint jresult = 0 ; + SafeObject *arg1 = (SafeObject *) 0 ; + int result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(SafeObject **)&jarg1; + result = (int)(arg1)->UnLock(); + jresult = (jint)result; + return jresult; +} + + +SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_new_1SipStack(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3, jstring jarg4) { + jlong jresult = 0 ; + SipCallback *arg1 = (SipCallback *) 0 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; + char *arg4 = (char *) 0 ; + SipStack *result = 0 ; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(SipCallback **)&jarg1; + arg2 = 0; + if (jarg2) { + arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0); + if (!arg2) return 0; + } + arg3 = 0; + if (jarg3) { + arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0); + if (!arg3) return 0; + } + arg4 = 0; + if (jarg4) { + arg4 = (char *)jenv->GetStringUTFChars(jarg4, 0); + if (!arg4) return 0; + } + result = (SipStack *)new SipStack(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4); + *(SipStack **)&jresult = result; + if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); + if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3); + if (arg4) jenv->ReleaseStringUTFChars(jarg4, (const char *)arg4); + return jresult; +} + + +SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_delete_1SipStack(JNIEnv *jenv, jclass jcls, jlong jarg1) { + SipStack *arg1 = (SipStack *) 0 ; + + (void)jenv; + (void)jcls; + arg1 = *(SipStack **)&jarg1; + delete arg1; +} + + +SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipStack_1Start(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { + jboolean jresult = 0 ; + SipStack *arg1 = (SipStack *) 0 ; + bool result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(SipStack **)&jarg1; + result = (bool)(arg1)->Start(); + jresult = (jboolean)result; + return jresult; +} + + +SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipStack_1setProxyCSCF(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jlong jarg3, jstring jarg4, jstring jarg5) { + jboolean jresult = 0 ; + SipStack *arg1 = (SipStack *) 0 ; + char *arg2 = (char *) 0 ; + unsigned int arg3 ; + char *arg4 = (char *) 0 ; + char *arg5 = (char *) 0 ; + bool result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(SipStack **)&jarg1; + arg2 = 0; + if (jarg2) { + arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0); + if (!arg2) return 0; + } + arg3 = (unsigned int)jarg3; + arg4 = 0; + if (jarg4) { + arg4 = (char *)jenv->GetStringUTFChars(jarg4, 0); + if (!arg4) return 0; + } + arg5 = 0; + if (jarg5) { + arg5 = (char *)jenv->GetStringUTFChars(jarg5, 0); + if (!arg5) return 0; + } + result = (bool)(arg1)->setProxyCSCF((char const *)arg2,arg3,(char const *)arg4,(char const *)arg5); + jresult = (jboolean)result; + if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); + if (arg4) jenv->ReleaseStringUTFChars(jarg4, (const char *)arg4); + if (arg5) jenv->ReleaseStringUTFChars(jarg5, (const char *)arg5); + return jresult; +} + + +SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipStack_1setLocalIP(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) { + jboolean jresult = 0 ; + SipStack *arg1 = (SipStack *) 0 ; + char *arg2 = (char *) 0 ; + bool result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(SipStack **)&jarg1; + arg2 = 0; + if (jarg2) { + arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0); + if (!arg2) return 0; + } + result = (bool)(arg1)->setLocalIP((char const *)arg2); + jresult = (jboolean)result; + if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); + return jresult; +} + + +SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipStack_1setLocalPort(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2) { + jboolean jresult = 0 ; + SipStack *arg1 = (SipStack *) 0 ; + unsigned int arg2 ; + bool result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(SipStack **)&jarg1; + arg2 = (unsigned int)jarg2; + result = (bool)(arg1)->setLocalPort(arg2); + jresult = (jboolean)result; + return jresult; +} + + +SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipStack_1addHeader(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3) { + jboolean jresult = 0 ; + SipStack *arg1 = (SipStack *) 0 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; + bool result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(SipStack **)&jarg1; + arg2 = 0; + if (jarg2) { + arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0); + if (!arg2) return 0; + } + arg3 = 0; + if (jarg3) { + arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0); + if (!arg3) return 0; + } + result = (bool)(arg1)->addHeader((char const *)arg2,(char const *)arg3); + jresult = (jboolean)result; + if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); + if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3); + return jresult; +} + + +SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipStack_1removeHeader(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) { + jboolean jresult = 0 ; + SipStack *arg1 = (SipStack *) 0 ; + char *arg2 = (char *) 0 ; + bool result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(SipStack **)&jarg1; + arg2 = 0; + if (jarg2) { + arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0); + if (!arg2) return 0; + } + result = (bool)(arg1)->removeHeader((char const *)arg2); + jresult = (jboolean)result; + if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); + return jresult; +} + + +SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipStack_1Stop(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { + jboolean jresult = 0 ; + SipStack *arg1 = (SipStack *) 0 ; + bool result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(SipStack **)&jarg1; + result = (bool)(arg1)->Stop(); + jresult = (jboolean)result; + return jresult; +} + + +SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SWIGRegistrationEventUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jlong baseptr = 0; + (void)jenv; + (void)jcls; + *(SipEvent **)&baseptr = *(RegistrationEvent **)&jarg1; + return baseptr; +} + +SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SWIGRegistrationSessionUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jlong baseptr = 0; + (void)jenv; + (void)jcls; + *(SipSession **)&baseptr = *(RegistrationSession **)&jarg1; + return baseptr; +} + +SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SWIGSipStackUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jlong baseptr = 0; + (void)jenv; + (void)jcls; + *(SafeObject **)&baseptr = *(SipStack **)&jarg1; + return baseptr; +} + +SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_swig_1module_1init(JNIEnv *jenv, jclass jcls) { + int i; + + static struct { + const char *method; + const char *signature; + } methods[1] = { + { + "SwigDirector_SipCallback_OnRegistrationChanged", "(Lorg/doubango/tinyWRAP/SipCallback;J)I" + } + }; + Swig::jclass_tinyWRAPJNI = (jclass) jenv->NewGlobalRef(jcls); + if (!Swig::jclass_tinyWRAPJNI) return; + for (i = 0; i < (int) (sizeof(methods)/sizeof(methods[0])); ++i) { + Swig::director_methids[i] = jenv->GetStaticMethodID(jcls, methods[i].method, methods[i].signature); + if (!Swig::director_methids[i]) return; + } +} + + +#ifdef __cplusplus +} +#endif + diff --git a/trunk/bindings/java/tinyWRAP_wrap.h b/trunk/bindings/java/tinyWRAP_wrap.h new file mode 100644 index 00000000..3f14422f --- /dev/null +++ b/trunk/bindings/java/tinyWRAP_wrap.h @@ -0,0 +1,30 @@ +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 1.3.40 + * + * This file is not intended to be easily readable and contains a number of + * coding conventions designed to improve portability and efficiency. Do not make + * changes to this file unless you know what you are doing--modify the SWIG + * interface file instead. + * ----------------------------------------------------------------------------- */ + +#ifndef SWIG_tinyWRAP_WRAP_H_ +#define SWIG_tinyWRAP_WRAP_H_ + +class SwigDirector_SipCallback : public SipCallback, public Swig::Director { + +public: + void swig_connect_director(JNIEnv *jenv, jobject jself, jclass jcls, bool swig_mem_own, bool weak_global); + SwigDirector_SipCallback(JNIEnv *jenv); + virtual ~SwigDirector_SipCallback(); + virtual int OnRegistrationChanged(RegistrationEvent const *e); +public: + bool swig_overrides(int n) { + return (n < 1 ? swig_override[n] : false); + } +protected: + bool swig_override[1]; +}; + + +#endif diff --git a/trunk/bindings/java/tsip_event_type_t.java b/trunk/bindings/java/tsip_event_type_t.java new file mode 100644 index 00000000..ecd1321f --- /dev/null +++ b/trunk/bindings/java/tsip_event_type_t.java @@ -0,0 +1,59 @@ +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 1.3.40 + * + * Do not make changes to this file unless you know what you are doing--modify + * the SWIG interface file instead. + * ----------------------------------------------------------------------------- */ + +package org.doubango.tinyWRAP; + +public final class tsip_event_type_t { + public final static tsip_event_type_t tsip_event_invite = new tsip_event_type_t("tsip_event_invite"); + public final static tsip_event_type_t tsip_event_message = new tsip_event_type_t("tsip_event_message"); + public final static tsip_event_type_t tsip_event_options = new tsip_event_type_t("tsip_event_options"); + public final static tsip_event_type_t tsip_event_publish = new tsip_event_type_t("tsip_event_publish"); + public final static tsip_event_type_t tsip_event_register = new tsip_event_type_t("tsip_event_register"); + public final static tsip_event_type_t tsip_event_subscribe = new tsip_event_type_t("tsip_event_subscribe"); + public final static tsip_event_type_t tsip_event_dialog = new tsip_event_type_t("tsip_event_dialog"); + + public final int swigValue() { + return swigValue; + } + + public String toString() { + return swigName; + } + + public static tsip_event_type_t swigToEnum(int swigValue) { + if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue) + return swigValues[swigValue]; + for (int i = 0; i < swigValues.length; i++) + if (swigValues[i].swigValue == swigValue) + return swigValues[i]; + throw new IllegalArgumentException("No enum " + tsip_event_type_t.class + " with value " + swigValue); + } + + private tsip_event_type_t(String swigName) { + this.swigName = swigName; + this.swigValue = swigNext++; + } + + private tsip_event_type_t(String swigName, int swigValue) { + this.swigName = swigName; + this.swigValue = swigValue; + swigNext = swigValue+1; + } + + private tsip_event_type_t(String swigName, tsip_event_type_t swigEnum) { + this.swigName = swigName; + this.swigValue = swigEnum.swigValue; + swigNext = this.swigValue+1; + } + + private static tsip_event_type_t[] swigValues = { tsip_event_invite, tsip_event_message, tsip_event_options, tsip_event_publish, tsip_event_register, tsip_event_subscribe, tsip_event_dialog }; + private static int swigNext = 0; + private final int swigValue; + private final String swigName; +} +