Fix issue 50 (Add support for SIP INFO).
This commit is contained in:
parent
546fe46f0c
commit
c8892e253c
|
@ -58,6 +58,13 @@ bool ActionConfig::addHeader(const char* name, const char* value)
|
|||
TSIP_ACTION_SET_NULL()) == 0);
|
||||
}
|
||||
|
||||
bool ActionConfig::addPayload(const void* payload, unsigned len)
|
||||
{
|
||||
return (tsip_action_set(m_pHandle,
|
||||
TSIP_ACTION_SET_PAYLOAD(payload, len),
|
||||
TSIP_ACTION_SET_NULL()) == 0);
|
||||
}
|
||||
|
||||
ActionConfig* ActionConfig::setResponseLine(short code, const char* phrase)
|
||||
{
|
||||
int32_t _code = code;
|
||||
|
|
|
@ -32,6 +32,7 @@ public:
|
|||
virtual ~ActionConfig();
|
||||
|
||||
bool addHeader(const char* name, const char* value);
|
||||
bool addPayload(const void* payload, unsigned len);
|
||||
|
||||
ActionConfig* setResponseLine(short code, const char* phrase);
|
||||
ActionConfig* setMediaString(twrap_media_type_t type, const char* key, const char* value);
|
||||
|
|
|
@ -27,6 +27,7 @@ class StackEvent;
|
|||
|
||||
class InviteEvent;
|
||||
class MessagingEvent;
|
||||
class InfoEvent;
|
||||
class OptionsEvent;
|
||||
class PublicationEvent;
|
||||
class RegistrationEvent;
|
||||
|
@ -42,6 +43,7 @@ public:
|
|||
|
||||
virtual int OnInviteEvent(const InviteEvent* e) { return -1; }
|
||||
virtual int OnMessagingEvent(const MessagingEvent* e) { return -1; }
|
||||
virtual int OnInfoEvent(const InfoEvent* e) { return -1; }
|
||||
virtual int OnOptionsEvent(const OptionsEvent* e) { return -1; }
|
||||
virtual int OnPublicationEvent(const PublicationEvent* e) { return -1; }
|
||||
virtual int OnRegistrationEvent(const RegistrationEvent* e) { return -1; }
|
||||
|
|
|
@ -193,6 +193,42 @@ MessagingSession* MessagingEvent::takeSessionOwnership() const
|
|||
return tsk_null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* ======================== InfoEvent ========================*/
|
||||
InfoEvent::InfoEvent(const tsip_event_t *_sipevent)
|
||||
:SipEvent(_sipevent)
|
||||
{
|
||||
}
|
||||
|
||||
InfoEvent::~InfoEvent()
|
||||
{
|
||||
}
|
||||
|
||||
tsip_info_event_type_t InfoEvent::getType() const
|
||||
{
|
||||
return TSIP_INFO_EVENT(this->sipevent)->type;
|
||||
}
|
||||
|
||||
const InfoSession* InfoEvent::getSession() const
|
||||
{
|
||||
return dyn_cast<const InfoSession*>(this->getBaseSession());
|
||||
}
|
||||
|
||||
InfoSession* InfoEvent::takeSessionOwnership() const
|
||||
{
|
||||
if(this->sipevent && this->sipevent->ss && !tsip_ssession_have_ownership(this->sipevent->ss)){
|
||||
SipStack* stack = this->getStack();
|
||||
if(stack){
|
||||
/* The constructor will call take_ownerhip() */
|
||||
return new InfoSession(stack, this->sipevent->ss);
|
||||
}
|
||||
}
|
||||
return tsk_null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* ======================== OptionsEvent ========================*/
|
||||
OptionsEvent::OptionsEvent(const tsip_event_t *_sipevent)
|
||||
:SipEvent(_sipevent)
|
||||
|
|
|
@ -32,6 +32,7 @@ class InviteSession;
|
|||
class CallSession;
|
||||
class MsrpSession;
|
||||
class MessagingSession;
|
||||
class InfoSession;
|
||||
class OptionsSession;
|
||||
class PublicationSession;
|
||||
class RegistrationSession;
|
||||
|
@ -126,6 +127,22 @@ public: /* Public API functions */
|
|||
MessagingSession* takeSessionOwnership() const;
|
||||
};
|
||||
|
||||
/* ======================== InfoEvent ========================*/
|
||||
class InfoEvent: public SipEvent
|
||||
{
|
||||
public:
|
||||
#if !defined(SWIG)
|
||||
InfoEvent(const tsip_event_t *sipevent);
|
||||
#endif
|
||||
virtual ~InfoEvent();
|
||||
|
||||
public: /* Public API functions */
|
||||
tsip_info_event_type_t getType() const;
|
||||
const InfoSession* getSession() const;
|
||||
InfoSession* takeSessionOwnership() const;
|
||||
};
|
||||
|
||||
|
||||
|
||||
/* ======================== OptionsEvent ========================*/
|
||||
class OptionsEvent: public SipEvent
|
||||
|
|
|
@ -114,6 +114,14 @@ bool SipMessage::isResponse()
|
|||
return TSIP_MESSAGE_IS_RESPONSE(m_pSipMessage);
|
||||
}
|
||||
|
||||
tsip_request_type_t SipMessage::getRequestType()
|
||||
{
|
||||
if(TSIP_MESSAGE_IS_REQUEST(m_pSipMessage)){
|
||||
return (m_pSipMessage)->line.request.request_type;
|
||||
}
|
||||
return tsip_NONE;
|
||||
}
|
||||
|
||||
short SipMessage::getResponseCode()
|
||||
{
|
||||
return TSIP_RESPONSE_CODE(m_pSipMessage);
|
||||
|
|
|
@ -50,6 +50,7 @@ public:
|
|||
virtual ~SipMessage();
|
||||
|
||||
bool isResponse();
|
||||
tsip_request_type_t getRequestType();
|
||||
short getResponseCode();
|
||||
char* getSipHeaderValue(const char* name, unsigned index = 0);
|
||||
char* getSipHeaderParamValue(const char* name, const char* param, unsigned index = 0);
|
||||
|
|
|
@ -240,7 +240,7 @@ bool InviteSession::hangup(ActionConfig* config/*=tsk_null*/)
|
|||
#else
|
||||
bool InviteSession::hangup(ActionConfig* config/*=tsk_null*/)
|
||||
{
|
||||
return (tsip_action_BYE(m_pHandle,
|
||||
return (tsip_api_invite_send_bye(m_pHandle,
|
||||
TSIP_ACTION_SET_NULL()) == 0);
|
||||
}
|
||||
#endif
|
||||
|
@ -251,7 +251,7 @@ static void *__droid_reject(void *param)
|
|||
twrap_async_action_t* asyn_action = (twrap_async_action_t*)param;
|
||||
const tsip_action_handle_t* action_cfg = asyn_action->config ? asyn_action->config->getHandle() : tsk_null;
|
||||
|
||||
tsip_action_REJECT(asyn_action->session,
|
||||
tsip_api_common_reject(asyn_action->session,
|
||||
TSIP_ACTION_SET_CONFIG(action_cfg),
|
||||
TSIP_ACTION_SET_NULL());
|
||||
|
||||
|
@ -279,7 +279,7 @@ bool InviteSession::reject(ActionConfig* config/*=tsk_null*/)
|
|||
{
|
||||
const tsip_action_handle_t* action_cfg = config ? config->getHandle() : tsk_null;
|
||||
|
||||
return (tsip_action_REJECT(m_pHandle,
|
||||
return (tsip_api_common_reject(m_pHandle,
|
||||
TSIP_ACTION_SET_CONFIG(action_cfg),
|
||||
TSIP_ACTION_SET_NULL()) == 0);
|
||||
}
|
||||
|
@ -291,7 +291,7 @@ static void *__droid_accept(void *param)
|
|||
twrap_async_action_t* asyn_action = (twrap_async_action_t*)param;
|
||||
const tsip_action_handle_t* action_cfg = asyn_action->config ? asyn_action->config->getHandle() : tsk_null;
|
||||
|
||||
tsip_action_ACCEPT(asyn_action->session,
|
||||
tsip_api_common_accept(asyn_action->session,
|
||||
TSIP_ACTION_SET_CONFIG(action_cfg),
|
||||
TSIP_ACTION_SET_NULL());
|
||||
|
||||
|
@ -320,12 +320,30 @@ bool InviteSession::accept(ActionConfig* config/*=tsk_null*/)
|
|||
{
|
||||
const tsip_action_handle_t* action_cfg = config ? config->getHandle() : tsk_null;
|
||||
|
||||
return (tsip_action_ACCEPT(m_pHandle,
|
||||
return (tsip_api_common_accept(m_pHandle,
|
||||
TSIP_ACTION_SET_CONFIG(action_cfg),
|
||||
TSIP_ACTION_SET_NULL()) == 0);
|
||||
}
|
||||
#endif
|
||||
|
||||
bool InviteSession::sendInfo(const void* payload, unsigned len, ActionConfig* config/*=tsk_null*/)
|
||||
{
|
||||
int ret;
|
||||
const tsip_action_handle_t* action_cfg = config ? config->getHandle() : tsk_null;
|
||||
if(payload && len){
|
||||
ret = tsip_api_invite_send_info(m_pHandle,
|
||||
TSIP_ACTION_SET_PAYLOAD(payload, len),
|
||||
TSIP_ACTION_SET_CONFIG(action_cfg),
|
||||
TSIP_ACTION_SET_NULL());
|
||||
}
|
||||
else{
|
||||
ret = tsip_api_invite_send_info(m_pHandle,
|
||||
TSIP_ACTION_SET_CONFIG(action_cfg),
|
||||
TSIP_ACTION_SET_NULL());
|
||||
}
|
||||
return (ret == 0);
|
||||
}
|
||||
|
||||
const MediaSessionMgr* InviteSession::getMediaMgr()
|
||||
{
|
||||
if(!m_pMediaMgr && m_pHandle){
|
||||
|
@ -414,7 +432,7 @@ bool CallSession::callAudio(const SipUri* remoteUri, ActionConfig* config/*=tsk_
|
|||
return true;
|
||||
#else
|
||||
const tsip_action_handle_t* action_cfg = config ? config->getHandle() : tsk_null;
|
||||
return (tsip_action_INVITE(m_pHandle, tmedia_audio,
|
||||
return (tsip_api_invite_send_invite(m_pHandle, tmedia_audio,
|
||||
TSIP_ACTION_SET_CONFIG(action_cfg),
|
||||
TSIP_ACTION_SET_NULL()) == 0);
|
||||
#endif
|
||||
|
@ -444,7 +462,7 @@ bool CallSession::callAudioVideo(const SipUri* remoteUri, ActionConfig* config/*
|
|||
return true;
|
||||
#else
|
||||
const tsip_action_handle_t* action_cfg = config ? config->getHandle() : tsk_null;
|
||||
return (tsip_action_INVITE(m_pHandle, (tmedia_type_t)(tmedia_audio | tmedia_video),
|
||||
return (tsip_api_invite_send_invite(m_pHandle, (tmedia_type_t)(tmedia_audio | tmedia_video),
|
||||
TSIP_ACTION_SET_CONFIG(action_cfg),
|
||||
TSIP_ACTION_SET_NULL()) == 0);
|
||||
#endif
|
||||
|
@ -474,7 +492,7 @@ bool CallSession::callVideo(const SipUri* remoteUri, ActionConfig* config/*=tsk_
|
|||
return true;
|
||||
#else
|
||||
const tsip_action_handle_t* action_cfg = config ? config->getHandle() : tsk_null;
|
||||
return (tsip_action_INVITE(m_pHandle, tmedia_video,
|
||||
return (tsip_api_invite_send_invite(m_pHandle, tmedia_video,
|
||||
TSIP_ACTION_SET_CONFIG(action_cfg),
|
||||
TSIP_ACTION_SET_NULL()) == 0);
|
||||
#endif
|
||||
|
@ -534,7 +552,7 @@ bool CallSession::hold(ActionConfig* config/*=tsk_null*/)
|
|||
{
|
||||
const tsip_action_handle_t* action_cfg = config ? config->getHandle() : tsk_null;
|
||||
|
||||
return (tsip_action_HOLD(m_pHandle, tmedia_all,
|
||||
return (tsip_api_invite_send_hold(m_pHandle, tmedia_all,
|
||||
TSIP_ACTION_SET_CONFIG(action_cfg),
|
||||
TSIP_ACTION_SET_NULL()) ==0 );
|
||||
}
|
||||
|
@ -543,14 +561,14 @@ bool CallSession::resume(ActionConfig* config/*=tsk_null*/)
|
|||
{
|
||||
const tsip_action_handle_t* action_cfg = config ? config->getHandle() : tsk_null;
|
||||
|
||||
return (tsip_action_RESUME(m_pHandle, tmedia_all,
|
||||
return (tsip_api_invite_send_resume(m_pHandle, tmedia_all,
|
||||
TSIP_ACTION_SET_CONFIG(action_cfg),
|
||||
TSIP_ACTION_SET_NULL()) == 0);
|
||||
}
|
||||
|
||||
bool CallSession::sendDTMF(int number)
|
||||
{
|
||||
return (tsip_action_DTMF(m_pHandle, number,
|
||||
return (tsip_api_invite_send_dtmf(m_pHandle, number,
|
||||
TSIP_ACTION_SET_NULL()) == 0);
|
||||
}
|
||||
|
||||
|
@ -601,7 +619,7 @@ bool MsrpSession::callMsrp(const SipUri* remoteUri, ActionConfig* config/*=tsk_n
|
|||
TSIP_SSESSION_SET_TO_OBJ(remoteUri->getWrappedUri()),
|
||||
TSIP_SSESSION_SET_NULL());
|
||||
|
||||
return (tsip_action_INVITE(m_pHandle, tmedia_msrp,
|
||||
return (tsip_api_invite_send_invite(m_pHandle, tmedia_msrp,
|
||||
TSIP_ACTION_SET_CONFIG(action_cfg),
|
||||
TSIP_ACTION_SET_NULL()) == 0);
|
||||
}
|
||||
|
@ -620,7 +638,7 @@ bool MsrpSession::sendMessage(const void* payload, unsigned len, ActionConfig* c
|
|||
{
|
||||
const tsip_action_handle_t* action_cfg = config ? config->getHandle() : tsk_null;
|
||||
|
||||
return (tsip_action_LARGE_MESSAGE(m_pHandle,
|
||||
return (tsip_api_invite_send_large_message(m_pHandle,
|
||||
TSIP_ACTION_SET_PAYLOAD(payload, len),
|
||||
TSIP_ACTION_SET_CONFIG(action_cfg),
|
||||
TSIP_ACTION_SET_NULL()) == 0);
|
||||
|
@ -651,13 +669,13 @@ bool MessagingSession::send(const void* payload, unsigned len, ActionConfig* con
|
|||
int ret;
|
||||
const tsip_action_handle_t* action_cfg = config ? config->getHandle() : tsk_null;
|
||||
if(payload && len){
|
||||
ret = tsip_action_MESSAGE(m_pHandle,
|
||||
ret = tsip_api_message_send_message(m_pHandle,
|
||||
TSIP_ACTION_SET_PAYLOAD(payload, len),
|
||||
TSIP_ACTION_SET_CONFIG(action_cfg),
|
||||
TSIP_ACTION_SET_NULL());
|
||||
}
|
||||
else{
|
||||
ret = tsip_action_PUBLISH(m_pHandle,
|
||||
ret = tsip_api_message_send_message(m_pHandle,
|
||||
TSIP_ACTION_SET_NULL());
|
||||
}
|
||||
return (ret == 0);
|
||||
|
@ -666,7 +684,7 @@ bool MessagingSession::send(const void* payload, unsigned len, ActionConfig* con
|
|||
bool MessagingSession::accept(ActionConfig* config/*=tsk_null*/)
|
||||
{
|
||||
const tsip_action_handle_t* action_cfg = config ? config->getHandle() : tsk_null;
|
||||
return (tsip_action_ACCEPT(m_pHandle,
|
||||
return (tsip_api_common_accept(m_pHandle,
|
||||
TSIP_ACTION_SET_CONFIG(action_cfg),
|
||||
TSIP_ACTION_SET_NULL()) == 0);
|
||||
}
|
||||
|
@ -674,12 +692,64 @@ bool MessagingSession::accept(ActionConfig* config/*=tsk_null*/)
|
|||
bool MessagingSession::reject(ActionConfig* config/*=tsk_null*/)
|
||||
{
|
||||
const tsip_action_handle_t* action_cfg = config ? config->getHandle() : tsk_null;
|
||||
return (tsip_action_REJECT(m_pHandle,
|
||||
return (tsip_api_common_reject(m_pHandle,
|
||||
TSIP_ACTION_SET_CONFIG(action_cfg),
|
||||
TSIP_ACTION_SET_NULL()) == 0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* ======================== InfoSession ========================*/
|
||||
InfoSession::InfoSession(SipStack* pStack)
|
||||
: SipSession(pStack)
|
||||
{
|
||||
}
|
||||
|
||||
InfoSession::InfoSession(SipStack* pStack, tsip_ssession_handle_t* pHandle)
|
||||
: SipSession(pStack, pHandle)
|
||||
{
|
||||
}
|
||||
|
||||
InfoSession::~InfoSession()
|
||||
{
|
||||
}
|
||||
|
||||
bool InfoSession::send(const void* payload, unsigned len, ActionConfig* config/*=tsk_null*/)
|
||||
{
|
||||
int ret;
|
||||
const tsip_action_handle_t* action_cfg = config ? config->getHandle() : tsk_null;
|
||||
if(payload && len){
|
||||
ret = tsip_api_info_send_info(m_pHandle,
|
||||
TSIP_ACTION_SET_PAYLOAD(payload, len),
|
||||
TSIP_ACTION_SET_CONFIG(action_cfg),
|
||||
TSIP_ACTION_SET_NULL());
|
||||
}
|
||||
else{
|
||||
ret = tsip_api_info_send_info(m_pHandle,
|
||||
TSIP_ACTION_SET_NULL());
|
||||
}
|
||||
return (ret == 0);
|
||||
}
|
||||
|
||||
bool InfoSession::accept(ActionConfig* config/*=tsk_null*/)
|
||||
{
|
||||
const tsip_action_handle_t* action_cfg = config ? config->getHandle() : tsk_null;
|
||||
return (tsip_api_common_accept(m_pHandle,
|
||||
TSIP_ACTION_SET_CONFIG(action_cfg),
|
||||
TSIP_ACTION_SET_NULL()) == 0);
|
||||
}
|
||||
|
||||
bool InfoSession::reject(ActionConfig* config/*=tsk_null*/)
|
||||
{
|
||||
const tsip_action_handle_t* action_cfg = config ? config->getHandle() : tsk_null;
|
||||
return (tsip_api_common_reject(m_pHandle,
|
||||
TSIP_ACTION_SET_CONFIG(action_cfg),
|
||||
TSIP_ACTION_SET_NULL()) == 0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* ======================== OptionsSession ========================*/
|
||||
OptionsSession::OptionsSession(SipStack* pStack)
|
||||
: SipSession(pStack)
|
||||
|
@ -698,7 +768,7 @@ OptionsSession::~OptionsSession()
|
|||
bool OptionsSession::send(ActionConfig* config/*=tsk_null*/)
|
||||
{
|
||||
const tsip_action_handle_t* action_cfg = config ? config->getHandle() : tsk_null;
|
||||
return (tsip_action_OPTIONS(m_pHandle,
|
||||
return (tsip_api_options_send_options(m_pHandle,
|
||||
TSIP_ACTION_SET_CONFIG(action_cfg),
|
||||
TSIP_ACTION_SET_NULL()) == 0);
|
||||
}
|
||||
|
@ -706,7 +776,7 @@ bool OptionsSession::send(ActionConfig* config/*=tsk_null*/)
|
|||
bool OptionsSession::accept(ActionConfig* config/*=tsk_null*/)
|
||||
{
|
||||
const tsip_action_handle_t* action_cfg = config ? config->getHandle() : tsk_null;
|
||||
return (tsip_action_ACCEPT(m_pHandle,
|
||||
return (tsip_api_common_accept(m_pHandle,
|
||||
TSIP_ACTION_SET_CONFIG(action_cfg),
|
||||
TSIP_ACTION_SET_NULL()) == 0);
|
||||
}
|
||||
|
@ -714,7 +784,7 @@ bool OptionsSession::accept(ActionConfig* config/*=tsk_null*/)
|
|||
bool OptionsSession::reject(ActionConfig* config/*=tsk_null*/)
|
||||
{
|
||||
const tsip_action_handle_t* action_cfg = config ? config->getHandle() : tsk_null;
|
||||
return (tsip_action_REJECT(m_pHandle,
|
||||
return (tsip_api_common_reject(m_pHandle,
|
||||
TSIP_ACTION_SET_CONFIG(action_cfg),
|
||||
TSIP_ACTION_SET_NULL()) == 0);
|
||||
}
|
||||
|
@ -737,12 +807,12 @@ bool PublicationSession::publish(const void* payload, unsigned len, ActionConfig
|
|||
int ret;
|
||||
const tsip_action_handle_t* action_cfg = config ? config->getHandle() : tsk_null;
|
||||
if(payload && len){
|
||||
ret = tsip_action_PUBLISH(m_pHandle,
|
||||
ret = tsip_api_publish_send_publish(m_pHandle,
|
||||
TSIP_ACTION_SET_PAYLOAD(payload, len),
|
||||
TSIP_ACTION_SET_NULL());
|
||||
}
|
||||
else{
|
||||
ret = tsip_action_PUBLISH(m_pHandle,
|
||||
ret = tsip_api_publish_send_publish(m_pHandle,
|
||||
TSIP_ACTION_SET_CONFIG(action_cfg),
|
||||
TSIP_ACTION_SET_NULL());
|
||||
}
|
||||
|
@ -752,7 +822,7 @@ bool PublicationSession::publish(const void* payload, unsigned len, ActionConfig
|
|||
bool PublicationSession::unPublish(ActionConfig* config/*=tsk_null*/)
|
||||
{
|
||||
const tsip_action_handle_t* action_cfg = config ? config->getHandle() : tsk_null;
|
||||
return (tsip_action_UNPUBLISH(m_pHandle,
|
||||
return (tsip_api_publish_send_unpublish(m_pHandle,
|
||||
TSIP_ACTION_SET_CONFIG(action_cfg),
|
||||
TSIP_ACTION_SET_NULL()) == 0);
|
||||
}
|
||||
|
@ -777,13 +847,13 @@ RegistrationSession::~RegistrationSession()
|
|||
|
||||
bool RegistrationSession::register_()
|
||||
{
|
||||
return (tsip_action_REGISTER(m_pHandle,
|
||||
return (tsip_api_register_send_register(m_pHandle,
|
||||
TSIP_ACTION_SET_NULL()) == 0);
|
||||
}
|
||||
|
||||
bool RegistrationSession::unRegister()
|
||||
{
|
||||
return (tsip_action_UNREGISTER(m_pHandle,
|
||||
return (tsip_api_register_send_unregister(m_pHandle,
|
||||
TSIP_ACTION_SET_NULL()) == 0);
|
||||
}
|
||||
|
||||
|
@ -791,7 +861,7 @@ bool RegistrationSession::accept(ActionConfig* config/*=tsk_null*/)
|
|||
{
|
||||
const tsip_action_handle_t* action_cfg = config ? config->getHandle() : tsk_null;
|
||||
|
||||
return (tsip_action_ACCEPT(m_pHandle,
|
||||
return (tsip_api_common_accept(m_pHandle,
|
||||
TSIP_ACTION_SET_CONFIG(action_cfg),
|
||||
TSIP_ACTION_SET_NULL()) == 0);
|
||||
}
|
||||
|
@ -800,7 +870,7 @@ bool RegistrationSession::reject(ActionConfig* config/*=tsk_null*/)
|
|||
{
|
||||
const tsip_action_handle_t* action_cfg = config ? config->getHandle() : tsk_null;
|
||||
|
||||
return (tsip_action_REJECT(m_pHandle,
|
||||
return (tsip_api_common_reject(m_pHandle,
|
||||
TSIP_ACTION_SET_CONFIG(action_cfg),
|
||||
TSIP_ACTION_SET_NULL()) == 0);
|
||||
}
|
||||
|
@ -818,12 +888,12 @@ SubscriptionSession::~SubscriptionSession()
|
|||
|
||||
bool SubscriptionSession::subscribe()
|
||||
{
|
||||
return (tsip_action_SUBSCRIBE(m_pHandle,
|
||||
return (tsip_api_subscribe_send_subscribe(m_pHandle,
|
||||
TSIP_ACTION_SET_NULL()) == 0);
|
||||
}
|
||||
|
||||
bool SubscriptionSession::unSubscribe()
|
||||
{
|
||||
return (tsip_action_UNSUBSCRIBE(m_pHandle,
|
||||
return (tsip_api_subscribe_send_unsubscribe(m_pHandle,
|
||||
TSIP_ACTION_SET_NULL()) == 0);
|
||||
}
|
||||
|
|
|
@ -84,6 +84,7 @@ public: /* Public functions */
|
|||
bool accept(ActionConfig* config=tsk_null);
|
||||
bool hangup(ActionConfig* config=tsk_null);
|
||||
bool reject(ActionConfig* config=tsk_null);
|
||||
bool sendInfo(const void* payload, unsigned len, ActionConfig* config=tsk_null);
|
||||
const MediaSessionMgr* getMediaMgr();
|
||||
|
||||
private:
|
||||
|
@ -162,6 +163,22 @@ public: /* Public functions */
|
|||
bool reject(ActionConfig* config=tsk_null);
|
||||
};
|
||||
|
||||
/* ======================== InfoSession ========================*/
|
||||
class InfoSession : public SipSession
|
||||
{
|
||||
public: /* ctor() and dtor() */
|
||||
InfoSession(SipStack* pStack);
|
||||
#if !defined(SWIG)
|
||||
InfoSession(SipStack* pStack, tsip_ssession_handle_t* pHandle);
|
||||
#endif
|
||||
virtual ~InfoSession();
|
||||
|
||||
public: /* Public functions */
|
||||
bool send(const void* payload, unsigned len, ActionConfig* config=tsk_null);
|
||||
bool accept(ActionConfig* config=tsk_null);
|
||||
bool reject(ActionConfig* config=tsk_null);
|
||||
};
|
||||
|
||||
/* ======================== OptionsSession ========================*/
|
||||
class OptionsSession : public SipSession
|
||||
{
|
||||
|
|
|
@ -493,6 +493,14 @@ static int stack_callback(const tsip_event_t *sipevent)
|
|||
}
|
||||
break;
|
||||
}
|
||||
case tsip_event_info:
|
||||
{ /* INFO */
|
||||
if(sipStack->getCallback()){
|
||||
e = new InfoEvent(sipevent);
|
||||
sipStack->getCallback()->OnInfoEvent((const InfoEvent*)e);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case tsip_event_options:
|
||||
{ /* OPTIONS */
|
||||
if(sipStack->getCallback()){
|
||||
|
|
|
@ -45,6 +45,27 @@
|
|||
|
||||
|
||||
|
||||
/* ====== From "tinySIP\include\tinysip\tsip_messag_common.h" ====== */
|
||||
typedef enum tsip_request_type_e
|
||||
{
|
||||
tsip_NONE = 0,
|
||||
|
||||
tsip_ACK,
|
||||
tsip_BYE,
|
||||
tsip_CANCEL,
|
||||
tsip_INVITE,
|
||||
tsip_OPTIONS,
|
||||
tsip_REGISTER,
|
||||
tsip_SUBSCRIBE,
|
||||
tsip_NOTIFY,
|
||||
tsip_REFER,
|
||||
tsip_INFO,
|
||||
tsip_UPDATE,
|
||||
tsip_MESSAGE,
|
||||
tsip_PUBLISH,
|
||||
tsip_PRACK
|
||||
}
|
||||
tsip_request_type_t;
|
||||
|
||||
|
||||
/* ====== From "tinySIP\include\tinysip\tsip_event.h" ====== */
|
||||
|
@ -52,6 +73,7 @@ typedef enum tsip_event_type_e
|
|||
{
|
||||
tsip_event_invite,
|
||||
tsip_event_message,
|
||||
tsip_event_info,
|
||||
tsip_event_options,
|
||||
tsip_event_publish,
|
||||
tsip_event_register,
|
||||
|
@ -128,6 +150,14 @@ typedef enum tsip_message_event_type_e
|
|||
}
|
||||
tsip_message_event_type_t;
|
||||
|
||||
/* ====== From "tinySIP\include\tinysip\tsip_api_info.h" ====== */
|
||||
typedef enum tsip_info_event_type_e
|
||||
{
|
||||
tsip_i_info,
|
||||
tsip_ao_info,
|
||||
}
|
||||
tsip_info_event_type_t;
|
||||
|
||||
/* ====== From "tinySIP\include\tinysip\tsip_api_options.h" ====== */
|
||||
typedef enum tsip_options_event_type_e
|
||||
{
|
||||
|
|
|
@ -47,6 +47,11 @@ public class ActionConfig : IDisposable {
|
|||
return ret;
|
||||
}
|
||||
|
||||
public bool addPayload(byte[] payload, uint len) {
|
||||
bool ret = tinyWRAPPINVOKE.ActionConfig_addPayload(swigCPtr, payload, len);
|
||||
return ret;
|
||||
}
|
||||
|
||||
public ActionConfig setResponseLine(short code, string phrase) {
|
||||
IntPtr cPtr = tinyWRAPPINVOKE.ActionConfig_setResponseLine(swigCPtr, code, phrase);
|
||||
ActionConfig ret = (cPtr == IntPtr.Zero) ? null : new ActionConfig(cPtr, false);
|
||||
|
|
|
@ -0,0 +1,60 @@
|
|||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 1.3.39
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
namespace org.doubango.tinyWRAP {
|
||||
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
public class InfoEvent : SipEvent {
|
||||
private HandleRef swigCPtr;
|
||||
|
||||
internal InfoEvent(IntPtr cPtr, bool cMemoryOwn) : base(tinyWRAPPINVOKE.InfoEventUpcast(cPtr), cMemoryOwn) {
|
||||
swigCPtr = new HandleRef(this, cPtr);
|
||||
}
|
||||
|
||||
internal static HandleRef getCPtr(InfoEvent obj) {
|
||||
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
|
||||
}
|
||||
|
||||
~InfoEvent() {
|
||||
Dispose();
|
||||
}
|
||||
|
||||
public override void Dispose() {
|
||||
lock(this) {
|
||||
if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
tinyWRAPPINVOKE.delete_InfoEvent(swigCPtr);
|
||||
}
|
||||
swigCPtr = new HandleRef(null, IntPtr.Zero);
|
||||
GC.SuppressFinalize(this);
|
||||
base.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
public tsip_info_event_type_t getType() {
|
||||
tsip_info_event_type_t ret = (tsip_info_event_type_t)tinyWRAPPINVOKE.InfoEvent_getType(swigCPtr);
|
||||
return ret;
|
||||
}
|
||||
|
||||
public InfoSession getSession() {
|
||||
IntPtr cPtr = tinyWRAPPINVOKE.InfoEvent_getSession(swigCPtr);
|
||||
InfoSession ret = (cPtr == IntPtr.Zero) ? null : new InfoSession(cPtr, false);
|
||||
return ret;
|
||||
}
|
||||
|
||||
public InfoSession takeSessionOwnership() {
|
||||
IntPtr cPtr = tinyWRAPPINVOKE.InfoEvent_takeSessionOwnership(swigCPtr);
|
||||
InfoSession ret = (cPtr == IntPtr.Zero) ? null : new InfoSession(cPtr, false);
|
||||
return ret;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,76 @@
|
|||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 1.3.39
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
namespace org.doubango.tinyWRAP {
|
||||
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
public class InfoSession : SipSession {
|
||||
private HandleRef swigCPtr;
|
||||
|
||||
internal InfoSession(IntPtr cPtr, bool cMemoryOwn) : base(tinyWRAPPINVOKE.InfoSessionUpcast(cPtr), cMemoryOwn) {
|
||||
swigCPtr = new HandleRef(this, cPtr);
|
||||
}
|
||||
|
||||
internal static HandleRef getCPtr(InfoSession obj) {
|
||||
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
|
||||
}
|
||||
|
||||
~InfoSession() {
|
||||
Dispose();
|
||||
}
|
||||
|
||||
public override void Dispose() {
|
||||
lock(this) {
|
||||
if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
tinyWRAPPINVOKE.delete_InfoSession(swigCPtr);
|
||||
}
|
||||
swigCPtr = new HandleRef(null, IntPtr.Zero);
|
||||
GC.SuppressFinalize(this);
|
||||
base.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
public InfoSession(SipStack pStack) : this(tinyWRAPPINVOKE.new_InfoSession(SipStack.getCPtr(pStack)), true) {
|
||||
}
|
||||
|
||||
public bool send(byte[] payload, uint len, ActionConfig config) {
|
||||
bool ret = tinyWRAPPINVOKE.InfoSession_send__SWIG_0(swigCPtr, payload, len, ActionConfig.getCPtr(config));
|
||||
return ret;
|
||||
}
|
||||
|
||||
public bool send(byte[] payload, uint len) {
|
||||
bool ret = tinyWRAPPINVOKE.InfoSession_send__SWIG_1(swigCPtr, payload, len);
|
||||
return ret;
|
||||
}
|
||||
|
||||
public bool accept(ActionConfig config) {
|
||||
bool ret = tinyWRAPPINVOKE.InfoSession_accept__SWIG_0(swigCPtr, ActionConfig.getCPtr(config));
|
||||
return ret;
|
||||
}
|
||||
|
||||
public bool accept() {
|
||||
bool ret = tinyWRAPPINVOKE.InfoSession_accept__SWIG_1(swigCPtr);
|
||||
return ret;
|
||||
}
|
||||
|
||||
public bool reject(ActionConfig config) {
|
||||
bool ret = tinyWRAPPINVOKE.InfoSession_reject__SWIG_0(swigCPtr, ActionConfig.getCPtr(config));
|
||||
return ret;
|
||||
}
|
||||
|
||||
public bool reject() {
|
||||
bool ret = tinyWRAPPINVOKE.InfoSession_reject__SWIG_1(swigCPtr);
|
||||
return ret;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -71,6 +71,16 @@ public class InviteSession : SipSession {
|
|||
return ret;
|
||||
}
|
||||
|
||||
public bool sendInfo(byte[] payload, uint len, ActionConfig config) {
|
||||
bool ret = tinyWRAPPINVOKE.InviteSession_sendInfo__SWIG_0(swigCPtr, payload, len, ActionConfig.getCPtr(config));
|
||||
return ret;
|
||||
}
|
||||
|
||||
public bool sendInfo(byte[] payload, uint len) {
|
||||
bool ret = tinyWRAPPINVOKE.InviteSession_sendInfo__SWIG_1(swigCPtr, payload, len);
|
||||
return ret;
|
||||
}
|
||||
|
||||
public MediaSessionMgr getMediaMgr() {
|
||||
IntPtr cPtr = tinyWRAPPINVOKE.InviteSession_getMediaMgr(swigCPtr);
|
||||
MediaSessionMgr ret = (cPtr == IntPtr.Zero) ? null : new MediaSessionMgr(cPtr, false);
|
||||
|
|
|
@ -63,6 +63,11 @@ public class SipCallback : IDisposable {
|
|||
return ret;
|
||||
}
|
||||
|
||||
public virtual int OnInfoEvent(InfoEvent e) {
|
||||
int ret = ((this.GetType() == typeof(SipCallback)) ? tinyWRAPPINVOKE.SipCallback_OnInfoEvent(swigCPtr, InfoEvent.getCPtr(e)) : tinyWRAPPINVOKE.SipCallback_OnInfoEventSwigExplicitSipCallback(swigCPtr, InfoEvent.getCPtr(e)));
|
||||
return ret;
|
||||
}
|
||||
|
||||
public virtual int OnOptionsEvent(OptionsEvent e) {
|
||||
int ret = ((this.GetType() == typeof(SipCallback)) ? tinyWRAPPINVOKE.SipCallback_OnOptionsEvent(swigCPtr, OptionsEvent.getCPtr(e)) : tinyWRAPPINVOKE.SipCallback_OnOptionsEventSwigExplicitSipCallback(swigCPtr, OptionsEvent.getCPtr(e)));
|
||||
return ret;
|
||||
|
@ -92,15 +97,17 @@ public class SipCallback : IDisposable {
|
|||
swigDelegate2 = new SwigDelegateSipCallback_2(SwigDirectorOnInviteEvent);
|
||||
if (SwigDerivedClassHasMethod("OnMessagingEvent", swigMethodTypes3))
|
||||
swigDelegate3 = new SwigDelegateSipCallback_3(SwigDirectorOnMessagingEvent);
|
||||
if (SwigDerivedClassHasMethod("OnOptionsEvent", swigMethodTypes4))
|
||||
swigDelegate4 = new SwigDelegateSipCallback_4(SwigDirectorOnOptionsEvent);
|
||||
if (SwigDerivedClassHasMethod("OnPublicationEvent", swigMethodTypes5))
|
||||
swigDelegate5 = new SwigDelegateSipCallback_5(SwigDirectorOnPublicationEvent);
|
||||
if (SwigDerivedClassHasMethod("OnRegistrationEvent", swigMethodTypes6))
|
||||
swigDelegate6 = new SwigDelegateSipCallback_6(SwigDirectorOnRegistrationEvent);
|
||||
if (SwigDerivedClassHasMethod("OnSubscriptionEvent", swigMethodTypes7))
|
||||
swigDelegate7 = new SwigDelegateSipCallback_7(SwigDirectorOnSubscriptionEvent);
|
||||
tinyWRAPPINVOKE.SipCallback_director_connect(swigCPtr, swigDelegate0, swigDelegate1, swigDelegate2, swigDelegate3, swigDelegate4, swigDelegate5, swigDelegate6, swigDelegate7);
|
||||
if (SwigDerivedClassHasMethod("OnInfoEvent", swigMethodTypes4))
|
||||
swigDelegate4 = new SwigDelegateSipCallback_4(SwigDirectorOnInfoEvent);
|
||||
if (SwigDerivedClassHasMethod("OnOptionsEvent", swigMethodTypes5))
|
||||
swigDelegate5 = new SwigDelegateSipCallback_5(SwigDirectorOnOptionsEvent);
|
||||
if (SwigDerivedClassHasMethod("OnPublicationEvent", swigMethodTypes6))
|
||||
swigDelegate6 = new SwigDelegateSipCallback_6(SwigDirectorOnPublicationEvent);
|
||||
if (SwigDerivedClassHasMethod("OnRegistrationEvent", swigMethodTypes7))
|
||||
swigDelegate7 = new SwigDelegateSipCallback_7(SwigDirectorOnRegistrationEvent);
|
||||
if (SwigDerivedClassHasMethod("OnSubscriptionEvent", swigMethodTypes8))
|
||||
swigDelegate8 = new SwigDelegateSipCallback_8(SwigDirectorOnSubscriptionEvent);
|
||||
tinyWRAPPINVOKE.SipCallback_director_connect(swigCPtr, swigDelegate0, swigDelegate1, swigDelegate2, swigDelegate3, swigDelegate4, swigDelegate5, swigDelegate6, swigDelegate7, swigDelegate8);
|
||||
}
|
||||
|
||||
private bool SwigDerivedClassHasMethod(string methodName, Type[] methodTypes) {
|
||||
|
@ -125,6 +132,10 @@ public class SipCallback : IDisposable {
|
|||
return OnMessagingEvent((e == IntPtr.Zero) ? null : new MessagingEvent(e, false));
|
||||
}
|
||||
|
||||
private int SwigDirectorOnInfoEvent(IntPtr e) {
|
||||
return OnInfoEvent((e == IntPtr.Zero) ? null : new InfoEvent(e, false));
|
||||
}
|
||||
|
||||
private int SwigDirectorOnOptionsEvent(IntPtr e) {
|
||||
return OnOptionsEvent((e == IntPtr.Zero) ? null : new OptionsEvent(e, false));
|
||||
}
|
||||
|
@ -149,6 +160,7 @@ public class SipCallback : IDisposable {
|
|||
public delegate int SwigDelegateSipCallback_5(IntPtr e);
|
||||
public delegate int SwigDelegateSipCallback_6(IntPtr e);
|
||||
public delegate int SwigDelegateSipCallback_7(IntPtr e);
|
||||
public delegate int SwigDelegateSipCallback_8(IntPtr e);
|
||||
|
||||
private SwigDelegateSipCallback_0 swigDelegate0;
|
||||
private SwigDelegateSipCallback_1 swigDelegate1;
|
||||
|
@ -158,15 +170,17 @@ public class SipCallback : IDisposable {
|
|||
private SwigDelegateSipCallback_5 swigDelegate5;
|
||||
private SwigDelegateSipCallback_6 swigDelegate6;
|
||||
private SwigDelegateSipCallback_7 swigDelegate7;
|
||||
private SwigDelegateSipCallback_8 swigDelegate8;
|
||||
|
||||
private static Type[] swigMethodTypes0 = new Type[] { typeof(DialogEvent) };
|
||||
private static Type[] swigMethodTypes1 = new Type[] { typeof(StackEvent) };
|
||||
private static Type[] swigMethodTypes2 = new Type[] { typeof(InviteEvent) };
|
||||
private static Type[] swigMethodTypes3 = new Type[] { typeof(MessagingEvent) };
|
||||
private static Type[] swigMethodTypes4 = new Type[] { typeof(OptionsEvent) };
|
||||
private static Type[] swigMethodTypes5 = new Type[] { typeof(PublicationEvent) };
|
||||
private static Type[] swigMethodTypes6 = new Type[] { typeof(RegistrationEvent) };
|
||||
private static Type[] swigMethodTypes7 = new Type[] { typeof(SubscriptionEvent) };
|
||||
private static Type[] swigMethodTypes4 = new Type[] { typeof(InfoEvent) };
|
||||
private static Type[] swigMethodTypes5 = new Type[] { typeof(OptionsEvent) };
|
||||
private static Type[] swigMethodTypes6 = new Type[] { typeof(PublicationEvent) };
|
||||
private static Type[] swigMethodTypes7 = new Type[] { typeof(RegistrationEvent) };
|
||||
private static Type[] swigMethodTypes8 = new Type[] { typeof(SubscriptionEvent) };
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -57,6 +57,11 @@ public class SipMessage : IDisposable {
|
|||
return ret;
|
||||
}
|
||||
|
||||
public tsip_request_type_t getRequestType() {
|
||||
tsip_request_type_t ret = (tsip_request_type_t)tinyWRAPPINVOKE.SipMessage_getRequestType(swigCPtr);
|
||||
return ret;
|
||||
}
|
||||
|
||||
public short getResponseCode() {
|
||||
short ret = tinyWRAPPINVOKE.SipMessage_getResponseCode(swigCPtr);
|
||||
return ret;
|
||||
|
|
|
@ -245,6 +245,9 @@ class tinyWRAPPINVOKE {
|
|||
[DllImport("tinyWRAP", EntryPoint="CSharp_ActionConfig_addHeader")]
|
||||
public static extern bool ActionConfig_addHeader(HandleRef jarg1, string jarg2, string jarg3);
|
||||
|
||||
[DllImport("tinyWRAP", EntryPoint="CSharp_ActionConfig_addPayload")]
|
||||
public static extern bool ActionConfig_addPayload(HandleRef jarg1, byte[] jarg2, uint jarg3);
|
||||
|
||||
[DllImport("tinyWRAP", EntryPoint="CSharp_ActionConfig_setResponseLine")]
|
||||
public static extern IntPtr ActionConfig_setResponseLine(HandleRef jarg1, short jarg2, string jarg3);
|
||||
|
||||
|
@ -455,6 +458,9 @@ class tinyWRAPPINVOKE {
|
|||
[DllImport("tinyWRAP", EntryPoint="CSharp_SipMessage_isResponse")]
|
||||
public static extern bool SipMessage_isResponse(HandleRef jarg1);
|
||||
|
||||
[DllImport("tinyWRAP", EntryPoint="CSharp_SipMessage_getRequestType")]
|
||||
public static extern int SipMessage_getRequestType(HandleRef jarg1);
|
||||
|
||||
[DllImport("tinyWRAP", EntryPoint="CSharp_SipMessage_getResponseCode")]
|
||||
public static extern short SipMessage_getResponseCode(HandleRef jarg1);
|
||||
|
||||
|
@ -530,6 +536,18 @@ class tinyWRAPPINVOKE {
|
|||
[DllImport("tinyWRAP", EntryPoint="CSharp_MessagingEvent_takeSessionOwnership")]
|
||||
public static extern IntPtr MessagingEvent_takeSessionOwnership(HandleRef jarg1);
|
||||
|
||||
[DllImport("tinyWRAP", EntryPoint="CSharp_delete_InfoEvent")]
|
||||
public static extern void delete_InfoEvent(HandleRef jarg1);
|
||||
|
||||
[DllImport("tinyWRAP", EntryPoint="CSharp_InfoEvent_getType")]
|
||||
public static extern int InfoEvent_getType(HandleRef jarg1);
|
||||
|
||||
[DllImport("tinyWRAP", EntryPoint="CSharp_InfoEvent_getSession")]
|
||||
public static extern IntPtr InfoEvent_getSession(HandleRef jarg1);
|
||||
|
||||
[DllImport("tinyWRAP", EntryPoint="CSharp_InfoEvent_takeSessionOwnership")]
|
||||
public static extern IntPtr InfoEvent_takeSessionOwnership(HandleRef jarg1);
|
||||
|
||||
[DllImport("tinyWRAP", EntryPoint="CSharp_delete_OptionsEvent")]
|
||||
public static extern void delete_OptionsEvent(HandleRef jarg1);
|
||||
|
||||
|
@ -647,6 +665,12 @@ class tinyWRAPPINVOKE {
|
|||
[DllImport("tinyWRAP", EntryPoint="CSharp_InviteSession_reject__SWIG_1")]
|
||||
public static extern bool InviteSession_reject__SWIG_1(HandleRef jarg1);
|
||||
|
||||
[DllImport("tinyWRAP", EntryPoint="CSharp_InviteSession_sendInfo__SWIG_0")]
|
||||
public static extern bool InviteSession_sendInfo__SWIG_0(HandleRef jarg1, byte[] jarg2, uint jarg3, HandleRef jarg4);
|
||||
|
||||
[DllImport("tinyWRAP", EntryPoint="CSharp_InviteSession_sendInfo__SWIG_1")]
|
||||
public static extern bool InviteSession_sendInfo__SWIG_1(HandleRef jarg1, byte[] jarg2, uint jarg3);
|
||||
|
||||
[DllImport("tinyWRAP", EntryPoint="CSharp_InviteSession_getMediaMgr")]
|
||||
public static extern IntPtr InviteSession_getMediaMgr(HandleRef jarg1);
|
||||
|
||||
|
@ -773,6 +797,30 @@ class tinyWRAPPINVOKE {
|
|||
[DllImport("tinyWRAP", EntryPoint="CSharp_MessagingSession_reject__SWIG_1")]
|
||||
public static extern bool MessagingSession_reject__SWIG_1(HandleRef jarg1);
|
||||
|
||||
[DllImport("tinyWRAP", EntryPoint="CSharp_new_InfoSession")]
|
||||
public static extern IntPtr new_InfoSession(HandleRef jarg1);
|
||||
|
||||
[DllImport("tinyWRAP", EntryPoint="CSharp_delete_InfoSession")]
|
||||
public static extern void delete_InfoSession(HandleRef jarg1);
|
||||
|
||||
[DllImport("tinyWRAP", EntryPoint="CSharp_InfoSession_send__SWIG_0")]
|
||||
public static extern bool InfoSession_send__SWIG_0(HandleRef jarg1, byte[] jarg2, uint jarg3, HandleRef jarg4);
|
||||
|
||||
[DllImport("tinyWRAP", EntryPoint="CSharp_InfoSession_send__SWIG_1")]
|
||||
public static extern bool InfoSession_send__SWIG_1(HandleRef jarg1, byte[] jarg2, uint jarg3);
|
||||
|
||||
[DllImport("tinyWRAP", EntryPoint="CSharp_InfoSession_accept__SWIG_0")]
|
||||
public static extern bool InfoSession_accept__SWIG_0(HandleRef jarg1, HandleRef jarg2);
|
||||
|
||||
[DllImport("tinyWRAP", EntryPoint="CSharp_InfoSession_accept__SWIG_1")]
|
||||
public static extern bool InfoSession_accept__SWIG_1(HandleRef jarg1);
|
||||
|
||||
[DllImport("tinyWRAP", EntryPoint="CSharp_InfoSession_reject__SWIG_0")]
|
||||
public static extern bool InfoSession_reject__SWIG_0(HandleRef jarg1, HandleRef jarg2);
|
||||
|
||||
[DllImport("tinyWRAP", EntryPoint="CSharp_InfoSession_reject__SWIG_1")]
|
||||
public static extern bool InfoSession_reject__SWIG_1(HandleRef jarg1);
|
||||
|
||||
[DllImport("tinyWRAP", EntryPoint="CSharp_new_OptionsSession")]
|
||||
public static extern IntPtr new_OptionsSession(HandleRef jarg1);
|
||||
|
||||
|
@ -1223,6 +1271,12 @@ class tinyWRAPPINVOKE {
|
|||
[DllImport("tinyWRAP", EntryPoint="CSharp_SipCallback_OnMessagingEventSwigExplicitSipCallback")]
|
||||
public static extern int SipCallback_OnMessagingEventSwigExplicitSipCallback(HandleRef jarg1, HandleRef jarg2);
|
||||
|
||||
[DllImport("tinyWRAP", EntryPoint="CSharp_SipCallback_OnInfoEvent")]
|
||||
public static extern int SipCallback_OnInfoEvent(HandleRef jarg1, HandleRef jarg2);
|
||||
|
||||
[DllImport("tinyWRAP", EntryPoint="CSharp_SipCallback_OnInfoEventSwigExplicitSipCallback")]
|
||||
public static extern int SipCallback_OnInfoEventSwigExplicitSipCallback(HandleRef jarg1, HandleRef jarg2);
|
||||
|
||||
[DllImport("tinyWRAP", EntryPoint="CSharp_SipCallback_OnOptionsEvent")]
|
||||
public static extern int SipCallback_OnOptionsEvent(HandleRef jarg1, HandleRef jarg2);
|
||||
|
||||
|
@ -1248,7 +1302,7 @@ class tinyWRAPPINVOKE {
|
|||
public static extern int SipCallback_OnSubscriptionEventSwigExplicitSipCallback(HandleRef jarg1, HandleRef jarg2);
|
||||
|
||||
[DllImport("tinyWRAP", EntryPoint="CSharp_SipCallback_director_connect")]
|
||||
public static extern void SipCallback_director_connect(HandleRef jarg1, SipCallback.SwigDelegateSipCallback_0 delegate0, SipCallback.SwigDelegateSipCallback_1 delegate1, SipCallback.SwigDelegateSipCallback_2 delegate2, SipCallback.SwigDelegateSipCallback_3 delegate3, SipCallback.SwigDelegateSipCallback_4 delegate4, SipCallback.SwigDelegateSipCallback_5 delegate5, SipCallback.SwigDelegateSipCallback_6 delegate6, SipCallback.SwigDelegateSipCallback_7 delegate7);
|
||||
public static extern void SipCallback_director_connect(HandleRef jarg1, SipCallback.SwigDelegateSipCallback_0 delegate0, SipCallback.SwigDelegateSipCallback_1 delegate1, SipCallback.SwigDelegateSipCallback_2 delegate2, SipCallback.SwigDelegateSipCallback_3 delegate3, SipCallback.SwigDelegateSipCallback_4 delegate4, SipCallback.SwigDelegateSipCallback_5 delegate5, SipCallback.SwigDelegateSipCallback_6 delegate6, SipCallback.SwigDelegateSipCallback_7 delegate7, SipCallback.SwigDelegateSipCallback_8 delegate8);
|
||||
|
||||
[DllImport("tinyWRAP", EntryPoint="CSharp_new_SafeObject")]
|
||||
public static extern IntPtr new_SafeObject();
|
||||
|
@ -1721,6 +1775,9 @@ class tinyWRAPPINVOKE {
|
|||
[DllImport("tinyWRAP", EntryPoint="CSharp_MessagingEventUpcast")]
|
||||
public static extern IntPtr MessagingEventUpcast(IntPtr objectRef);
|
||||
|
||||
[DllImport("tinyWRAP", EntryPoint="CSharp_InfoEventUpcast")]
|
||||
public static extern IntPtr InfoEventUpcast(IntPtr objectRef);
|
||||
|
||||
[DllImport("tinyWRAP", EntryPoint="CSharp_OptionsEventUpcast")]
|
||||
public static extern IntPtr OptionsEventUpcast(IntPtr objectRef);
|
||||
|
||||
|
@ -1745,6 +1802,9 @@ class tinyWRAPPINVOKE {
|
|||
[DllImport("tinyWRAP", EntryPoint="CSharp_MessagingSessionUpcast")]
|
||||
public static extern IntPtr MessagingSessionUpcast(IntPtr objectRef);
|
||||
|
||||
[DllImport("tinyWRAP", EntryPoint="CSharp_InfoSessionUpcast")]
|
||||
public static extern IntPtr InfoSessionUpcast(IntPtr objectRef);
|
||||
|
||||
[DllImport("tinyWRAP", EntryPoint="CSharp_OptionsSessionUpcast")]
|
||||
public static extern IntPtr OptionsSessionUpcast(IntPtr objectRef);
|
||||
|
||||
|
|
|
@ -936,6 +936,21 @@ int SwigDirector_SipCallback::OnMessagingEvent(MessagingEvent const *e) {
|
|||
return c_result;
|
||||
}
|
||||
|
||||
int SwigDirector_SipCallback::OnInfoEvent(InfoEvent const *e) {
|
||||
int c_result = SwigValueInit< int >() ;
|
||||
int jresult = 0 ;
|
||||
void * je = 0 ;
|
||||
|
||||
if (!swig_callbackOnInfoEvent) {
|
||||
return SipCallback::OnInfoEvent(e);
|
||||
} else {
|
||||
je = (void *) e;
|
||||
jresult = (int) swig_callbackOnInfoEvent(je);
|
||||
c_result = (int)jresult;
|
||||
}
|
||||
return c_result;
|
||||
}
|
||||
|
||||
int SwigDirector_SipCallback::OnOptionsEvent(OptionsEvent const *e) {
|
||||
int c_result = SwigValueInit< int >() ;
|
||||
int jresult = 0 ;
|
||||
|
@ -996,11 +1011,12 @@ int SwigDirector_SipCallback::OnSubscriptionEvent(SubscriptionEvent const *e) {
|
|||
return c_result;
|
||||
}
|
||||
|
||||
void SwigDirector_SipCallback::swig_connect_director(SWIG_Callback0_t callbackOnDialogEvent, SWIG_Callback1_t callbackOnStackEvent, SWIG_Callback2_t callbackOnInviteEvent, SWIG_Callback3_t callbackOnMessagingEvent, SWIG_Callback4_t callbackOnOptionsEvent, SWIG_Callback5_t callbackOnPublicationEvent, SWIG_Callback6_t callbackOnRegistrationEvent, SWIG_Callback7_t callbackOnSubscriptionEvent) {
|
||||
void SwigDirector_SipCallback::swig_connect_director(SWIG_Callback0_t callbackOnDialogEvent, SWIG_Callback1_t callbackOnStackEvent, SWIG_Callback2_t callbackOnInviteEvent, SWIG_Callback3_t callbackOnMessagingEvent, SWIG_Callback4_t callbackOnInfoEvent, SWIG_Callback5_t callbackOnOptionsEvent, SWIG_Callback6_t callbackOnPublicationEvent, SWIG_Callback7_t callbackOnRegistrationEvent, SWIG_Callback8_t callbackOnSubscriptionEvent) {
|
||||
swig_callbackOnDialogEvent = callbackOnDialogEvent;
|
||||
swig_callbackOnStackEvent = callbackOnStackEvent;
|
||||
swig_callbackOnInviteEvent = callbackOnInviteEvent;
|
||||
swig_callbackOnMessagingEvent = callbackOnMessagingEvent;
|
||||
swig_callbackOnInfoEvent = callbackOnInfoEvent;
|
||||
swig_callbackOnOptionsEvent = callbackOnOptionsEvent;
|
||||
swig_callbackOnPublicationEvent = callbackOnPublicationEvent;
|
||||
swig_callbackOnRegistrationEvent = callbackOnRegistrationEvent;
|
||||
|
@ -1012,6 +1028,7 @@ void SwigDirector_SipCallback::swig_init_callbacks() {
|
|||
swig_callbackOnStackEvent = 0;
|
||||
swig_callbackOnInviteEvent = 0;
|
||||
swig_callbackOnMessagingEvent = 0;
|
||||
swig_callbackOnInfoEvent = 0;
|
||||
swig_callbackOnOptionsEvent = 0;
|
||||
swig_callbackOnPublicationEvent = 0;
|
||||
swig_callbackOnRegistrationEvent = 0;
|
||||
|
@ -1344,6 +1361,22 @@ SWIGEXPORT unsigned int SWIGSTDCALL CSharp_ActionConfig_addHeader(void * jarg1,
|
|||
}
|
||||
|
||||
|
||||
SWIGEXPORT unsigned int SWIGSTDCALL CSharp_ActionConfig_addPayload(void * jarg1, void * jarg2, unsigned int jarg3) {
|
||||
unsigned int jresult ;
|
||||
ActionConfig *arg1 = (ActionConfig *) 0 ;
|
||||
void *arg2 = (void *) 0 ;
|
||||
unsigned int arg3 ;
|
||||
bool result;
|
||||
|
||||
arg1 = (ActionConfig *)jarg1;
|
||||
arg2 = jarg2;
|
||||
arg3 = (unsigned int)jarg3;
|
||||
result = (bool)(arg1)->addPayload((void const *)arg2,arg3);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void * SWIGSTDCALL CSharp_ActionConfig_setResponseLine(void * jarg1, short jarg2, char * jarg3) {
|
||||
void * jresult ;
|
||||
ActionConfig *arg1 = (ActionConfig *) 0 ;
|
||||
|
@ -2235,6 +2268,18 @@ SWIGEXPORT unsigned int SWIGSTDCALL CSharp_SipMessage_isResponse(void * jarg1) {
|
|||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_SipMessage_getRequestType(void * jarg1) {
|
||||
int jresult ;
|
||||
SipMessage *arg1 = (SipMessage *) 0 ;
|
||||
tsip_request_type_t result;
|
||||
|
||||
arg1 = (SipMessage *)jarg1;
|
||||
result = (tsip_request_type_t)(arg1)->getRequestType();
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT short SWIGSTDCALL CSharp_SipMessage_getResponseCode(void * jarg1) {
|
||||
short jresult ;
|
||||
SipMessage *arg1 = (SipMessage *) 0 ;
|
||||
|
@ -2539,6 +2584,50 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_MessagingEvent_takeSessionOwnership(void *
|
|||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_delete_InfoEvent(void * jarg1) {
|
||||
InfoEvent *arg1 = (InfoEvent *) 0 ;
|
||||
|
||||
arg1 = (InfoEvent *)jarg1;
|
||||
delete arg1;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_InfoEvent_getType(void * jarg1) {
|
||||
int jresult ;
|
||||
InfoEvent *arg1 = (InfoEvent *) 0 ;
|
||||
tsip_info_event_type_t result;
|
||||
|
||||
arg1 = (InfoEvent *)jarg1;
|
||||
result = (tsip_info_event_type_t)((InfoEvent const *)arg1)->getType();
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void * SWIGSTDCALL CSharp_InfoEvent_getSession(void * jarg1) {
|
||||
void * jresult ;
|
||||
InfoEvent *arg1 = (InfoEvent *) 0 ;
|
||||
InfoSession *result = 0 ;
|
||||
|
||||
arg1 = (InfoEvent *)jarg1;
|
||||
result = (InfoSession *)((InfoEvent const *)arg1)->getSession();
|
||||
jresult = (void *)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void * SWIGSTDCALL CSharp_InfoEvent_takeSessionOwnership(void * jarg1) {
|
||||
void * jresult ;
|
||||
InfoEvent *arg1 = (InfoEvent *) 0 ;
|
||||
InfoSession *result = 0 ;
|
||||
|
||||
arg1 = (InfoEvent *)jarg1;
|
||||
result = (InfoSession *)((InfoEvent const *)arg1)->takeSessionOwnership();
|
||||
jresult = (void *)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_delete_OptionsEvent(void * jarg1) {
|
||||
OptionsEvent *arg1 = (OptionsEvent *) 0 ;
|
||||
|
||||
|
@ -3017,6 +3106,40 @@ SWIGEXPORT unsigned int SWIGSTDCALL CSharp_InviteSession_reject__SWIG_1(void * j
|
|||
}
|
||||
|
||||
|
||||
SWIGEXPORT unsigned int SWIGSTDCALL CSharp_InviteSession_sendInfo__SWIG_0(void * jarg1, void * jarg2, unsigned int jarg3, void * jarg4) {
|
||||
unsigned int jresult ;
|
||||
InviteSession *arg1 = (InviteSession *) 0 ;
|
||||
void *arg2 = (void *) 0 ;
|
||||
unsigned int arg3 ;
|
||||
ActionConfig *arg4 = (ActionConfig *) 0 ;
|
||||
bool result;
|
||||
|
||||
arg1 = (InviteSession *)jarg1;
|
||||
arg2 = jarg2;
|
||||
arg3 = (unsigned int)jarg3;
|
||||
arg4 = (ActionConfig *)jarg4;
|
||||
result = (bool)(arg1)->sendInfo((void const *)arg2,arg3,arg4);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT unsigned int SWIGSTDCALL CSharp_InviteSession_sendInfo__SWIG_1(void * jarg1, void * jarg2, unsigned int jarg3) {
|
||||
unsigned int jresult ;
|
||||
InviteSession *arg1 = (InviteSession *) 0 ;
|
||||
void *arg2 = (void *) 0 ;
|
||||
unsigned int arg3 ;
|
||||
bool result;
|
||||
|
||||
arg1 = (InviteSession *)jarg1;
|
||||
arg2 = jarg2;
|
||||
arg3 = (unsigned int)jarg3;
|
||||
result = (bool)(arg1)->sendInfo((void const *)arg2,arg3);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void * SWIGSTDCALL CSharp_InviteSession_getMediaMgr(void * jarg1) {
|
||||
void * jresult ;
|
||||
InviteSession *arg1 = (InviteSession *) 0 ;
|
||||
|
@ -3603,6 +3726,112 @@ SWIGEXPORT unsigned int SWIGSTDCALL CSharp_MessagingSession_reject__SWIG_1(void
|
|||
}
|
||||
|
||||
|
||||
SWIGEXPORT void * SWIGSTDCALL CSharp_new_InfoSession(void * jarg1) {
|
||||
void * jresult ;
|
||||
SipStack *arg1 = (SipStack *) 0 ;
|
||||
InfoSession *result = 0 ;
|
||||
|
||||
arg1 = (SipStack *)jarg1;
|
||||
result = (InfoSession *)new InfoSession(arg1);
|
||||
jresult = (void *)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_delete_InfoSession(void * jarg1) {
|
||||
InfoSession *arg1 = (InfoSession *) 0 ;
|
||||
|
||||
arg1 = (InfoSession *)jarg1;
|
||||
delete arg1;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT unsigned int SWIGSTDCALL CSharp_InfoSession_send__SWIG_0(void * jarg1, void * jarg2, unsigned int jarg3, void * jarg4) {
|
||||
unsigned int jresult ;
|
||||
InfoSession *arg1 = (InfoSession *) 0 ;
|
||||
void *arg2 = (void *) 0 ;
|
||||
unsigned int arg3 ;
|
||||
ActionConfig *arg4 = (ActionConfig *) 0 ;
|
||||
bool result;
|
||||
|
||||
arg1 = (InfoSession *)jarg1;
|
||||
arg2 = jarg2;
|
||||
arg3 = (unsigned int)jarg3;
|
||||
arg4 = (ActionConfig *)jarg4;
|
||||
result = (bool)(arg1)->send((void const *)arg2,arg3,arg4);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT unsigned int SWIGSTDCALL CSharp_InfoSession_send__SWIG_1(void * jarg1, void * jarg2, unsigned int jarg3) {
|
||||
unsigned int jresult ;
|
||||
InfoSession *arg1 = (InfoSession *) 0 ;
|
||||
void *arg2 = (void *) 0 ;
|
||||
unsigned int arg3 ;
|
||||
bool result;
|
||||
|
||||
arg1 = (InfoSession *)jarg1;
|
||||
arg2 = jarg2;
|
||||
arg3 = (unsigned int)jarg3;
|
||||
result = (bool)(arg1)->send((void const *)arg2,arg3);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT unsigned int SWIGSTDCALL CSharp_InfoSession_accept__SWIG_0(void * jarg1, void * jarg2) {
|
||||
unsigned int jresult ;
|
||||
InfoSession *arg1 = (InfoSession *) 0 ;
|
||||
ActionConfig *arg2 = (ActionConfig *) 0 ;
|
||||
bool result;
|
||||
|
||||
arg1 = (InfoSession *)jarg1;
|
||||
arg2 = (ActionConfig *)jarg2;
|
||||
result = (bool)(arg1)->accept(arg2);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT unsigned int SWIGSTDCALL CSharp_InfoSession_accept__SWIG_1(void * jarg1) {
|
||||
unsigned int jresult ;
|
||||
InfoSession *arg1 = (InfoSession *) 0 ;
|
||||
bool result;
|
||||
|
||||
arg1 = (InfoSession *)jarg1;
|
||||
result = (bool)(arg1)->accept();
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT unsigned int SWIGSTDCALL CSharp_InfoSession_reject__SWIG_0(void * jarg1, void * jarg2) {
|
||||
unsigned int jresult ;
|
||||
InfoSession *arg1 = (InfoSession *) 0 ;
|
||||
ActionConfig *arg2 = (ActionConfig *) 0 ;
|
||||
bool result;
|
||||
|
||||
arg1 = (InfoSession *)jarg1;
|
||||
arg2 = (ActionConfig *)jarg2;
|
||||
result = (bool)(arg1)->reject(arg2);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT unsigned int SWIGSTDCALL CSharp_InfoSession_reject__SWIG_1(void * jarg1) {
|
||||
unsigned int jresult ;
|
||||
InfoSession *arg1 = (InfoSession *) 0 ;
|
||||
bool result;
|
||||
|
||||
arg1 = (InfoSession *)jarg1;
|
||||
result = (bool)(arg1)->reject();
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void * SWIGSTDCALL CSharp_new_OptionsSession(void * jarg1) {
|
||||
void * jresult ;
|
||||
SipStack *arg1 = (SipStack *) 0 ;
|
||||
|
@ -5470,6 +5699,34 @@ SWIGEXPORT int SWIGSTDCALL CSharp_SipCallback_OnMessagingEventSwigExplicitSipCal
|
|||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_SipCallback_OnInfoEvent(void * jarg1, void * jarg2) {
|
||||
int jresult ;
|
||||
SipCallback *arg1 = (SipCallback *) 0 ;
|
||||
InfoEvent *arg2 = (InfoEvent *) 0 ;
|
||||
int result;
|
||||
|
||||
arg1 = (SipCallback *)jarg1;
|
||||
arg2 = (InfoEvent *)jarg2;
|
||||
result = (int)(arg1)->OnInfoEvent((InfoEvent const *)arg2);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_SipCallback_OnInfoEventSwigExplicitSipCallback(void * jarg1, void * jarg2) {
|
||||
int jresult ;
|
||||
SipCallback *arg1 = (SipCallback *) 0 ;
|
||||
InfoEvent *arg2 = (InfoEvent *) 0 ;
|
||||
int result;
|
||||
|
||||
arg1 = (SipCallback *)jarg1;
|
||||
arg2 = (InfoEvent *)jarg2;
|
||||
result = (int)(arg1)->SipCallback::OnInfoEvent((InfoEvent const *)arg2);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_SipCallback_OnOptionsEvent(void * jarg1, void * jarg2) {
|
||||
int jresult ;
|
||||
SipCallback *arg1 = (SipCallback *) 0 ;
|
||||
|
@ -5582,11 +5839,11 @@ SWIGEXPORT int SWIGSTDCALL CSharp_SipCallback_OnSubscriptionEventSwigExplicitSip
|
|||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_SipCallback_director_connect(void *objarg, SwigDirector_SipCallback::SWIG_Callback0_t callback0, SwigDirector_SipCallback::SWIG_Callback1_t callback1, SwigDirector_SipCallback::SWIG_Callback2_t callback2, SwigDirector_SipCallback::SWIG_Callback3_t callback3, SwigDirector_SipCallback::SWIG_Callback4_t callback4, SwigDirector_SipCallback::SWIG_Callback5_t callback5, SwigDirector_SipCallback::SWIG_Callback6_t callback6, SwigDirector_SipCallback::SWIG_Callback7_t callback7) {
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_SipCallback_director_connect(void *objarg, SwigDirector_SipCallback::SWIG_Callback0_t callback0, SwigDirector_SipCallback::SWIG_Callback1_t callback1, SwigDirector_SipCallback::SWIG_Callback2_t callback2, SwigDirector_SipCallback::SWIG_Callback3_t callback3, SwigDirector_SipCallback::SWIG_Callback4_t callback4, SwigDirector_SipCallback::SWIG_Callback5_t callback5, SwigDirector_SipCallback::SWIG_Callback6_t callback6, SwigDirector_SipCallback::SWIG_Callback7_t callback7, SwigDirector_SipCallback::SWIG_Callback8_t callback8) {
|
||||
SipCallback *obj = (SipCallback *)objarg;
|
||||
SwigDirector_SipCallback *director = dynamic_cast<SwigDirector_SipCallback *>(obj);
|
||||
if (director) {
|
||||
director->swig_connect_director(callback0, callback1, callback2, callback3, callback4, callback5, callback6, callback7);
|
||||
director->swig_connect_director(callback0, callback1, callback2, callback3, callback4, callback5, callback6, callback7, callback8);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -7607,6 +7864,10 @@ SWIGEXPORT SipEvent * SWIGSTDCALL CSharp_MessagingEventUpcast(MessagingEvent *ob
|
|||
return (SipEvent *)objectRef;
|
||||
}
|
||||
|
||||
SWIGEXPORT SipEvent * SWIGSTDCALL CSharp_InfoEventUpcast(InfoEvent *objectRef) {
|
||||
return (SipEvent *)objectRef;
|
||||
}
|
||||
|
||||
SWIGEXPORT SipEvent * SWIGSTDCALL CSharp_OptionsEventUpcast(OptionsEvent *objectRef) {
|
||||
return (SipEvent *)objectRef;
|
||||
}
|
||||
|
@ -7639,6 +7900,10 @@ SWIGEXPORT SipSession * SWIGSTDCALL CSharp_MessagingSessionUpcast(MessagingSessi
|
|||
return (SipSession *)objectRef;
|
||||
}
|
||||
|
||||
SWIGEXPORT SipSession * SWIGSTDCALL CSharp_InfoSessionUpcast(InfoSession *objectRef) {
|
||||
return (SipSession *)objectRef;
|
||||
}
|
||||
|
||||
SWIGEXPORT SipSession * SWIGSTDCALL CSharp_OptionsSessionUpcast(OptionsSession *objectRef) {
|
||||
return (SipSession *)objectRef;
|
||||
}
|
||||
|
|
|
@ -164,6 +164,7 @@ public:
|
|||
virtual int OnStackEvent(StackEvent const *e);
|
||||
virtual int OnInviteEvent(InviteEvent const *e);
|
||||
virtual int OnMessagingEvent(MessagingEvent const *e);
|
||||
virtual int OnInfoEvent(InfoEvent const *e);
|
||||
virtual int OnOptionsEvent(OptionsEvent const *e);
|
||||
virtual int OnPublicationEvent(PublicationEvent const *e);
|
||||
virtual int OnRegistrationEvent(RegistrationEvent const *e);
|
||||
|
@ -177,17 +178,19 @@ public:
|
|||
typedef int (SWIGSTDCALL* SWIG_Callback5_t)(void *);
|
||||
typedef int (SWIGSTDCALL* SWIG_Callback6_t)(void *);
|
||||
typedef int (SWIGSTDCALL* SWIG_Callback7_t)(void *);
|
||||
void swig_connect_director(SWIG_Callback0_t callbackOnDialogEvent, SWIG_Callback1_t callbackOnStackEvent, SWIG_Callback2_t callbackOnInviteEvent, SWIG_Callback3_t callbackOnMessagingEvent, SWIG_Callback4_t callbackOnOptionsEvent, SWIG_Callback5_t callbackOnPublicationEvent, SWIG_Callback6_t callbackOnRegistrationEvent, SWIG_Callback7_t callbackOnSubscriptionEvent);
|
||||
typedef int (SWIGSTDCALL* SWIG_Callback8_t)(void *);
|
||||
void swig_connect_director(SWIG_Callback0_t callbackOnDialogEvent, SWIG_Callback1_t callbackOnStackEvent, SWIG_Callback2_t callbackOnInviteEvent, SWIG_Callback3_t callbackOnMessagingEvent, SWIG_Callback4_t callbackOnInfoEvent, SWIG_Callback5_t callbackOnOptionsEvent, SWIG_Callback6_t callbackOnPublicationEvent, SWIG_Callback7_t callbackOnRegistrationEvent, SWIG_Callback8_t callbackOnSubscriptionEvent);
|
||||
|
||||
private:
|
||||
SWIG_Callback0_t swig_callbackOnDialogEvent;
|
||||
SWIG_Callback1_t swig_callbackOnStackEvent;
|
||||
SWIG_Callback2_t swig_callbackOnInviteEvent;
|
||||
SWIG_Callback3_t swig_callbackOnMessagingEvent;
|
||||
SWIG_Callback4_t swig_callbackOnOptionsEvent;
|
||||
SWIG_Callback5_t swig_callbackOnPublicationEvent;
|
||||
SWIG_Callback6_t swig_callbackOnRegistrationEvent;
|
||||
SWIG_Callback7_t swig_callbackOnSubscriptionEvent;
|
||||
SWIG_Callback4_t swig_callbackOnInfoEvent;
|
||||
SWIG_Callback5_t swig_callbackOnOptionsEvent;
|
||||
SWIG_Callback6_t swig_callbackOnPublicationEvent;
|
||||
SWIG_Callback7_t swig_callbackOnRegistrationEvent;
|
||||
SWIG_Callback8_t swig_callbackOnSubscriptionEvent;
|
||||
void swig_init_callbacks();
|
||||
};
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@ namespace org.doubango.tinyWRAP {
|
|||
public enum tsip_event_type_t {
|
||||
tsip_event_invite,
|
||||
tsip_event_message,
|
||||
tsip_event_info,
|
||||
tsip_event_options,
|
||||
tsip_event_publish,
|
||||
tsip_event_register,
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 1.3.39
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
namespace org.doubango.tinyWRAP {
|
||||
|
||||
public enum tsip_info_event_type_t {
|
||||
tsip_i_info,
|
||||
tsip_ao_info
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 1.3.39
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
namespace org.doubango.tinyWRAP {
|
||||
|
||||
public enum tsip_request_type_t {
|
||||
tsip_NONE = 0,
|
||||
tsip_ACK,
|
||||
tsip_BYE,
|
||||
tsip_CANCEL,
|
||||
tsip_INVITE,
|
||||
tsip_OPTIONS,
|
||||
tsip_REGISTER,
|
||||
tsip_SUBSCRIBE,
|
||||
tsip_NOTIFY,
|
||||
tsip_REFER,
|
||||
tsip_INFO,
|
||||
tsip_UPDATE,
|
||||
tsip_MESSAGE,
|
||||
tsip_PUBLISH,
|
||||
tsip_PRACK
|
||||
}
|
||||
|
||||
}
|
|
@ -41,6 +41,10 @@ public class ActionConfig {
|
|||
return tinyWRAPJNI.ActionConfig_addHeader(swigCPtr, this, name, value);
|
||||
}
|
||||
|
||||
public boolean addPayload(java.nio.ByteBuffer payload, long len) {
|
||||
return tinyWRAPJNI.ActionConfig_addPayload(swigCPtr, this, payload, len);
|
||||
}
|
||||
|
||||
public ActionConfig setResponseLine(short code, String phrase) {
|
||||
long cPtr = tinyWRAPJNI.ActionConfig_setResponseLine(swigCPtr, this, code, phrase);
|
||||
return (cPtr == 0) ? null : new ActionConfig(cPtr, false);
|
||||
|
|
|
@ -0,0 +1,50 @@
|
|||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 1.3.39
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package org.doubango.tinyWRAP;
|
||||
|
||||
public class InfoEvent extends SipEvent {
|
||||
private long swigCPtr;
|
||||
|
||||
protected InfoEvent(long cPtr, boolean cMemoryOwn) {
|
||||
super(tinyWRAPJNI.SWIGInfoEventUpcast(cPtr), cMemoryOwn);
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(InfoEvent obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if(swigCPtr != 0 && swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
tinyWRAPJNI.delete_InfoEvent(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
super.delete();
|
||||
}
|
||||
|
||||
public tsip_info_event_type_t getType() {
|
||||
return tsip_info_event_type_t.swigToEnum(tinyWRAPJNI.InfoEvent_getType(swigCPtr, this));
|
||||
}
|
||||
|
||||
public InfoSession getSession() {
|
||||
long cPtr = tinyWRAPJNI.InfoEvent_getSession(swigCPtr, this);
|
||||
return (cPtr == 0) ? null : new InfoSession(cPtr, false);
|
||||
}
|
||||
|
||||
public InfoSession takeSessionOwnership() {
|
||||
long cPtr = tinyWRAPJNI.InfoEvent_takeSessionOwnership(swigCPtr, this);
|
||||
return (cPtr == 0) ? null : new InfoSession(cPtr, false);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,64 @@
|
|||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 1.3.39
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package org.doubango.tinyWRAP;
|
||||
|
||||
public class InfoSession extends SipSession {
|
||||
private long swigCPtr;
|
||||
|
||||
protected InfoSession(long cPtr, boolean cMemoryOwn) {
|
||||
super(tinyWRAPJNI.SWIGInfoSessionUpcast(cPtr), cMemoryOwn);
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(InfoSession obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if(swigCPtr != 0 && swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
tinyWRAPJNI.delete_InfoSession(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
super.delete();
|
||||
}
|
||||
|
||||
public InfoSession(SipStack pStack) {
|
||||
this(tinyWRAPJNI.new_InfoSession(SipStack.getCPtr(pStack), pStack), true);
|
||||
}
|
||||
|
||||
public boolean send(java.nio.ByteBuffer payload, long len, ActionConfig config) {
|
||||
return tinyWRAPJNI.InfoSession_send__SWIG_0(swigCPtr, this, payload, len, ActionConfig.getCPtr(config), config);
|
||||
}
|
||||
|
||||
public boolean send(java.nio.ByteBuffer payload, long len) {
|
||||
return tinyWRAPJNI.InfoSession_send__SWIG_1(swigCPtr, this, payload, len);
|
||||
}
|
||||
|
||||
public boolean accept(ActionConfig config) {
|
||||
return tinyWRAPJNI.InfoSession_accept__SWIG_0(swigCPtr, this, ActionConfig.getCPtr(config), config);
|
||||
}
|
||||
|
||||
public boolean accept() {
|
||||
return tinyWRAPJNI.InfoSession_accept__SWIG_1(swigCPtr, this);
|
||||
}
|
||||
|
||||
public boolean reject(ActionConfig config) {
|
||||
return tinyWRAPJNI.InfoSession_reject__SWIG_0(swigCPtr, this, ActionConfig.getCPtr(config), config);
|
||||
}
|
||||
|
||||
public boolean reject() {
|
||||
return tinyWRAPJNI.InfoSession_reject__SWIG_1(swigCPtr, this);
|
||||
}
|
||||
|
||||
}
|
|
@ -61,6 +61,14 @@ public class InviteSession extends SipSession {
|
|||
return tinyWRAPJNI.InviteSession_reject__SWIG_1(swigCPtr, this);
|
||||
}
|
||||
|
||||
public boolean sendInfo(java.nio.ByteBuffer payload, long len, ActionConfig config) {
|
||||
return tinyWRAPJNI.InviteSession_sendInfo__SWIG_0(swigCPtr, this, payload, len, ActionConfig.getCPtr(config), config);
|
||||
}
|
||||
|
||||
public boolean sendInfo(java.nio.ByteBuffer payload, long len) {
|
||||
return tinyWRAPJNI.InviteSession_sendInfo__SWIG_1(swigCPtr, this, payload, len);
|
||||
}
|
||||
|
||||
public MediaSessionMgr getMediaMgr() {
|
||||
long cPtr = tinyWRAPJNI.InviteSession_getMediaMgr(swigCPtr, this);
|
||||
return (cPtr == 0) ? null : new MediaSessionMgr(cPtr, false);
|
||||
|
|
|
@ -69,6 +69,10 @@ public class SipCallback {
|
|||
return (getClass() == SipCallback.class) ? tinyWRAPJNI.SipCallback_OnMessagingEvent(swigCPtr, this, MessagingEvent.getCPtr(e), e) : tinyWRAPJNI.SipCallback_OnMessagingEventSwigExplicitSipCallback(swigCPtr, this, MessagingEvent.getCPtr(e), e);
|
||||
}
|
||||
|
||||
public int OnInfoEvent(InfoEvent e) {
|
||||
return (getClass() == SipCallback.class) ? tinyWRAPJNI.SipCallback_OnInfoEvent(swigCPtr, this, InfoEvent.getCPtr(e), e) : tinyWRAPJNI.SipCallback_OnInfoEventSwigExplicitSipCallback(swigCPtr, this, InfoEvent.getCPtr(e), e);
|
||||
}
|
||||
|
||||
public int OnOptionsEvent(OptionsEvent e) {
|
||||
return (getClass() == SipCallback.class) ? tinyWRAPJNI.SipCallback_OnOptionsEvent(swigCPtr, this, OptionsEvent.getCPtr(e), e) : tinyWRAPJNI.SipCallback_OnOptionsEventSwigExplicitSipCallback(swigCPtr, this, OptionsEvent.getCPtr(e), e);
|
||||
}
|
||||
|
|
|
@ -53,6 +53,10 @@ public class SipMessage {
|
|||
return tinyWRAPJNI.SipMessage_isResponse(swigCPtr, this);
|
||||
}
|
||||
|
||||
public tsip_request_type_t getRequestType() {
|
||||
return tsip_request_type_t.swigToEnum(tinyWRAPJNI.SipMessage_getRequestType(swigCPtr, this));
|
||||
}
|
||||
|
||||
public short getResponseCode() {
|
||||
return tinyWRAPJNI.SipMessage_getResponseCode(swigCPtr, this);
|
||||
}
|
||||
|
|
|
@ -41,6 +41,10 @@ public class ActionConfig {
|
|||
return tinyWRAPJNI.ActionConfig_addHeader(swigCPtr, this, name, value);
|
||||
}
|
||||
|
||||
public boolean addPayload(java.nio.ByteBuffer payload, long len) {
|
||||
return tinyWRAPJNI.ActionConfig_addPayload(swigCPtr, this, payload, len);
|
||||
}
|
||||
|
||||
public ActionConfig setResponseLine(short code, String phrase) {
|
||||
long cPtr = tinyWRAPJNI.ActionConfig_setResponseLine(swigCPtr, this, code, phrase);
|
||||
return (cPtr == 0) ? null : new ActionConfig(cPtr, false);
|
||||
|
|
|
@ -0,0 +1,50 @@
|
|||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 1.3.39
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package org.doubango.tinyWRAP;
|
||||
|
||||
public class InfoEvent extends SipEvent {
|
||||
private long swigCPtr;
|
||||
|
||||
protected InfoEvent(long cPtr, boolean cMemoryOwn) {
|
||||
super(tinyWRAPJNI.SWIGInfoEventUpcast(cPtr), cMemoryOwn);
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(InfoEvent obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if(swigCPtr != 0 && swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
tinyWRAPJNI.delete_InfoEvent(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
super.delete();
|
||||
}
|
||||
|
||||
public tsip_info_event_type_t getType() {
|
||||
return tsip_info_event_type_t.swigToEnum(tinyWRAPJNI.InfoEvent_getType(swigCPtr, this));
|
||||
}
|
||||
|
||||
public InfoSession getSession() {
|
||||
long cPtr = tinyWRAPJNI.InfoEvent_getSession(swigCPtr, this);
|
||||
return (cPtr == 0) ? null : new InfoSession(cPtr, false);
|
||||
}
|
||||
|
||||
public InfoSession takeSessionOwnership() {
|
||||
long cPtr = tinyWRAPJNI.InfoEvent_takeSessionOwnership(swigCPtr, this);
|
||||
return (cPtr == 0) ? null : new InfoSession(cPtr, false);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,64 @@
|
|||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 1.3.39
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package org.doubango.tinyWRAP;
|
||||
|
||||
public class InfoSession extends SipSession {
|
||||
private long swigCPtr;
|
||||
|
||||
protected InfoSession(long cPtr, boolean cMemoryOwn) {
|
||||
super(tinyWRAPJNI.SWIGInfoSessionUpcast(cPtr), cMemoryOwn);
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(InfoSession obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if(swigCPtr != 0 && swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
tinyWRAPJNI.delete_InfoSession(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
super.delete();
|
||||
}
|
||||
|
||||
public InfoSession(SipStack pStack) {
|
||||
this(tinyWRAPJNI.new_InfoSession(SipStack.getCPtr(pStack), pStack), true);
|
||||
}
|
||||
|
||||
public boolean send(java.nio.ByteBuffer payload, long len, ActionConfig config) {
|
||||
return tinyWRAPJNI.InfoSession_send__SWIG_0(swigCPtr, this, payload, len, ActionConfig.getCPtr(config), config);
|
||||
}
|
||||
|
||||
public boolean send(java.nio.ByteBuffer payload, long len) {
|
||||
return tinyWRAPJNI.InfoSession_send__SWIG_1(swigCPtr, this, payload, len);
|
||||
}
|
||||
|
||||
public boolean accept(ActionConfig config) {
|
||||
return tinyWRAPJNI.InfoSession_accept__SWIG_0(swigCPtr, this, ActionConfig.getCPtr(config), config);
|
||||
}
|
||||
|
||||
public boolean accept() {
|
||||
return tinyWRAPJNI.InfoSession_accept__SWIG_1(swigCPtr, this);
|
||||
}
|
||||
|
||||
public boolean reject(ActionConfig config) {
|
||||
return tinyWRAPJNI.InfoSession_reject__SWIG_0(swigCPtr, this, ActionConfig.getCPtr(config), config);
|
||||
}
|
||||
|
||||
public boolean reject() {
|
||||
return tinyWRAPJNI.InfoSession_reject__SWIG_1(swigCPtr, this);
|
||||
}
|
||||
|
||||
}
|
|
@ -61,6 +61,14 @@ public class InviteSession extends SipSession {
|
|||
return tinyWRAPJNI.InviteSession_reject__SWIG_1(swigCPtr, this);
|
||||
}
|
||||
|
||||
public boolean sendInfo(java.nio.ByteBuffer payload, long len, ActionConfig config) {
|
||||
return tinyWRAPJNI.InviteSession_sendInfo__SWIG_0(swigCPtr, this, payload, len, ActionConfig.getCPtr(config), config);
|
||||
}
|
||||
|
||||
public boolean sendInfo(java.nio.ByteBuffer payload, long len) {
|
||||
return tinyWRAPJNI.InviteSession_sendInfo__SWIG_1(swigCPtr, this, payload, len);
|
||||
}
|
||||
|
||||
public MediaSessionMgr getMediaMgr() {
|
||||
long cPtr = tinyWRAPJNI.InviteSession_getMediaMgr(swigCPtr, this);
|
||||
return (cPtr == 0) ? null : new MediaSessionMgr(cPtr, false);
|
||||
|
|
|
@ -69,6 +69,10 @@ public class SipCallback {
|
|||
return (getClass() == SipCallback.class) ? tinyWRAPJNI.SipCallback_OnMessagingEvent(swigCPtr, this, MessagingEvent.getCPtr(e), e) : tinyWRAPJNI.SipCallback_OnMessagingEventSwigExplicitSipCallback(swigCPtr, this, MessagingEvent.getCPtr(e), e);
|
||||
}
|
||||
|
||||
public int OnInfoEvent(InfoEvent e) {
|
||||
return (getClass() == SipCallback.class) ? tinyWRAPJNI.SipCallback_OnInfoEvent(swigCPtr, this, InfoEvent.getCPtr(e), e) : tinyWRAPJNI.SipCallback_OnInfoEventSwigExplicitSipCallback(swigCPtr, this, InfoEvent.getCPtr(e), e);
|
||||
}
|
||||
|
||||
public int OnOptionsEvent(OptionsEvent e) {
|
||||
return (getClass() == SipCallback.class) ? tinyWRAPJNI.SipCallback_OnOptionsEvent(swigCPtr, this, OptionsEvent.getCPtr(e), e) : tinyWRAPJNI.SipCallback_OnOptionsEventSwigExplicitSipCallback(swigCPtr, this, OptionsEvent.getCPtr(e), e);
|
||||
}
|
||||
|
|
|
@ -53,6 +53,10 @@ public class SipMessage {
|
|||
return tinyWRAPJNI.SipMessage_isResponse(swigCPtr, this);
|
||||
}
|
||||
|
||||
public tsip_request_type_t getRequestType() {
|
||||
return tsip_request_type_t.swigToEnum(tinyWRAPJNI.SipMessage_getRequestType(swigCPtr, this));
|
||||
}
|
||||
|
||||
public short getResponseCode() {
|
||||
return tinyWRAPJNI.SipMessage_getResponseCode(swigCPtr, this);
|
||||
}
|
||||
|
|
|
@ -30,6 +30,7 @@ class tinyWRAPJNI {
|
|||
public final static native long new_ActionConfig();
|
||||
public final static native void delete_ActionConfig(long jarg1);
|
||||
public final static native boolean ActionConfig_addHeader(long jarg1, ActionConfig jarg1_, String jarg2, String jarg3);
|
||||
public final static native boolean ActionConfig_addPayload(long jarg1, ActionConfig jarg1_, java.nio.ByteBuffer jarg2, long jarg3);
|
||||
public final static native long ActionConfig_setResponseLine(long jarg1, ActionConfig jarg1_, short jarg2, String jarg3);
|
||||
public final static native long ActionConfig_setMediaString(long jarg1, ActionConfig jarg1_, int jarg2, String jarg3, String jarg4);
|
||||
public final static native long ActionConfig_setMediaInt(long jarg1, ActionConfig jarg1_, int jarg2, String jarg3, int jarg4);
|
||||
|
@ -100,6 +101,7 @@ class tinyWRAPJNI {
|
|||
public final static native long new_SipMessage();
|
||||
public final static native void delete_SipMessage(long jarg1);
|
||||
public final static native boolean SipMessage_isResponse(long jarg1, SipMessage jarg1_);
|
||||
public final static native int SipMessage_getRequestType(long jarg1, SipMessage jarg1_);
|
||||
public final static native short SipMessage_getResponseCode(long jarg1, SipMessage jarg1_);
|
||||
public final static native String SipMessage_getSipHeaderValue__SWIG_0(long jarg1, SipMessage jarg1_, String jarg2, long jarg3);
|
||||
public final static native String SipMessage_getSipHeaderValue__SWIG_1(long jarg1, SipMessage jarg1_, String jarg2);
|
||||
|
@ -125,6 +127,10 @@ class tinyWRAPJNI {
|
|||
public final static native int MessagingEvent_getType(long jarg1, MessagingEvent jarg1_);
|
||||
public final static native long MessagingEvent_getSession(long jarg1, MessagingEvent jarg1_);
|
||||
public final static native long MessagingEvent_takeSessionOwnership(long jarg1, MessagingEvent jarg1_);
|
||||
public final static native void delete_InfoEvent(long jarg1);
|
||||
public final static native int InfoEvent_getType(long jarg1, InfoEvent jarg1_);
|
||||
public final static native long InfoEvent_getSession(long jarg1, InfoEvent jarg1_);
|
||||
public final static native long InfoEvent_takeSessionOwnership(long jarg1, InfoEvent jarg1_);
|
||||
public final static native void delete_OptionsEvent(long jarg1);
|
||||
public final static native int OptionsEvent_getType(long jarg1, OptionsEvent jarg1_);
|
||||
public final static native long OptionsEvent_getSession(long jarg1, OptionsEvent jarg1_);
|
||||
|
@ -164,6 +170,8 @@ class tinyWRAPJNI {
|
|||
public final static native boolean InviteSession_hangup__SWIG_1(long jarg1, InviteSession jarg1_);
|
||||
public final static native boolean InviteSession_reject__SWIG_0(long jarg1, InviteSession jarg1_, long jarg2, ActionConfig jarg2_);
|
||||
public final static native boolean InviteSession_reject__SWIG_1(long jarg1, InviteSession jarg1_);
|
||||
public final static native boolean InviteSession_sendInfo__SWIG_0(long jarg1, InviteSession jarg1_, java.nio.ByteBuffer jarg2, long jarg3, long jarg4, ActionConfig jarg4_);
|
||||
public final static native boolean InviteSession_sendInfo__SWIG_1(long jarg1, InviteSession jarg1_, java.nio.ByteBuffer jarg2, long jarg3);
|
||||
public final static native long InviteSession_getMediaMgr(long jarg1, InviteSession jarg1_);
|
||||
public final static native long new_CallSession(long jarg1, SipStack jarg1_);
|
||||
public final static native void delete_CallSession(long jarg1);
|
||||
|
@ -206,6 +214,14 @@ class tinyWRAPJNI {
|
|||
public final static native boolean MessagingSession_accept__SWIG_1(long jarg1, MessagingSession jarg1_);
|
||||
public final static native boolean MessagingSession_reject__SWIG_0(long jarg1, MessagingSession jarg1_, long jarg2, ActionConfig jarg2_);
|
||||
public final static native boolean MessagingSession_reject__SWIG_1(long jarg1, MessagingSession jarg1_);
|
||||
public final static native long new_InfoSession(long jarg1, SipStack jarg1_);
|
||||
public final static native void delete_InfoSession(long jarg1);
|
||||
public final static native boolean InfoSession_send__SWIG_0(long jarg1, InfoSession jarg1_, java.nio.ByteBuffer jarg2, long jarg3, long jarg4, ActionConfig jarg4_);
|
||||
public final static native boolean InfoSession_send__SWIG_1(long jarg1, InfoSession jarg1_, java.nio.ByteBuffer jarg2, long jarg3);
|
||||
public final static native boolean InfoSession_accept__SWIG_0(long jarg1, InfoSession jarg1_, long jarg2, ActionConfig jarg2_);
|
||||
public final static native boolean InfoSession_accept__SWIG_1(long jarg1, InfoSession jarg1_);
|
||||
public final static native boolean InfoSession_reject__SWIG_0(long jarg1, InfoSession jarg1_, long jarg2, ActionConfig jarg2_);
|
||||
public final static native boolean InfoSession_reject__SWIG_1(long jarg1, InfoSession jarg1_);
|
||||
public final static native long new_OptionsSession(long jarg1, SipStack jarg1_);
|
||||
public final static native void delete_OptionsSession(long jarg1);
|
||||
public final static native boolean OptionsSession_send__SWIG_0(long jarg1, OptionsSession jarg1_, long jarg2, ActionConfig jarg2_);
|
||||
|
@ -361,6 +377,8 @@ class tinyWRAPJNI {
|
|||
public final static native int SipCallback_OnInviteEventSwigExplicitSipCallback(long jarg1, SipCallback jarg1_, long jarg2, InviteEvent jarg2_);
|
||||
public final static native int SipCallback_OnMessagingEvent(long jarg1, SipCallback jarg1_, long jarg2, MessagingEvent jarg2_);
|
||||
public final static native int SipCallback_OnMessagingEventSwigExplicitSipCallback(long jarg1, SipCallback jarg1_, long jarg2, MessagingEvent jarg2_);
|
||||
public final static native int SipCallback_OnInfoEvent(long jarg1, SipCallback jarg1_, long jarg2, InfoEvent jarg2_);
|
||||
public final static native int SipCallback_OnInfoEventSwigExplicitSipCallback(long jarg1, SipCallback jarg1_, long jarg2, InfoEvent jarg2_);
|
||||
public final static native int SipCallback_OnOptionsEvent(long jarg1, SipCallback jarg1_, long jarg2, OptionsEvent jarg2_);
|
||||
public final static native int SipCallback_OnOptionsEventSwigExplicitSipCallback(long jarg1, SipCallback jarg1_, long jarg2, OptionsEvent jarg2_);
|
||||
public final static native int SipCallback_OnPublicationEvent(long jarg1, SipCallback jarg1_, long jarg2, PublicationEvent jarg2_);
|
||||
|
@ -515,6 +533,7 @@ class tinyWRAPJNI {
|
|||
public final static native long SWIGStackEventUpcast(long jarg1);
|
||||
public final static native long SWIGInviteEventUpcast(long jarg1);
|
||||
public final static native long SWIGMessagingEventUpcast(long jarg1);
|
||||
public final static native long SWIGInfoEventUpcast(long jarg1);
|
||||
public final static native long SWIGOptionsEventUpcast(long jarg1);
|
||||
public final static native long SWIGPublicationEventUpcast(long jarg1);
|
||||
public final static native long SWIGRegistrationEventUpcast(long jarg1);
|
||||
|
@ -523,6 +542,7 @@ class tinyWRAPJNI {
|
|||
public final static native long SWIGCallSessionUpcast(long jarg1);
|
||||
public final static native long SWIGMsrpSessionUpcast(long jarg1);
|
||||
public final static native long SWIGMessagingSessionUpcast(long jarg1);
|
||||
public final static native long SWIGInfoSessionUpcast(long jarg1);
|
||||
public final static native long SWIGOptionsSessionUpcast(long jarg1);
|
||||
public final static native long SWIGPublicationSessionUpcast(long jarg1);
|
||||
public final static native long SWIGRegistrationSessionUpcast(long jarg1);
|
||||
|
@ -617,6 +637,9 @@ class tinyWRAPJNI {
|
|||
public static int SwigDirector_SipCallback_OnMessagingEvent(SipCallback self, long e) {
|
||||
return self.OnMessagingEvent((e == 0) ? null : new MessagingEvent(e, false));
|
||||
}
|
||||
public static int SwigDirector_SipCallback_OnInfoEvent(SipCallback self, long e) {
|
||||
return self.OnInfoEvent((e == 0) ? null : new InfoEvent(e, false));
|
||||
}
|
||||
public static int SwigDirector_SipCallback_OnOptionsEvent(SipCallback self, long e) {
|
||||
return self.OnOptionsEvent((e == 0) ? null : new OptionsEvent(e, false));
|
||||
}
|
||||
|
|
|
@ -403,7 +403,7 @@ namespace Swig {
|
|||
|
||||
namespace Swig {
|
||||
static jclass jclass_tinyWRAPJNI = NULL;
|
||||
static jmethodID director_methids[34];
|
||||
static jmethodID director_methids[35];
|
||||
}
|
||||
|
||||
#include <stdint.h> // Use the C99 official header
|
||||
|
@ -1490,7 +1490,7 @@ int SwigDirector_SipCallback::OnMessagingEvent(MessagingEvent const *e) {
|
|||
return c_result;
|
||||
}
|
||||
|
||||
int SwigDirector_SipCallback::OnOptionsEvent(OptionsEvent const *e) {
|
||||
int SwigDirector_SipCallback::OnInfoEvent(InfoEvent const *e) {
|
||||
int c_result = SwigValueInit< int >() ;
|
||||
jint jresult = 0 ;
|
||||
JNIEnvWrapper swigjnienv(this) ;
|
||||
|
@ -1499,12 +1499,36 @@ int SwigDirector_SipCallback::OnOptionsEvent(OptionsEvent const *e) {
|
|||
jlong je = 0 ;
|
||||
|
||||
if (!swig_override[4]) {
|
||||
return SipCallback::OnInfoEvent(e);
|
||||
}
|
||||
swigjobj = swig_get_self(jenv);
|
||||
if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) {
|
||||
*((InfoEvent **)&je) = (InfoEvent *) e;
|
||||
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[28], swigjobj, je);
|
||||
if (jenv->ExceptionOccurred()) return c_result;
|
||||
c_result = (int)jresult;
|
||||
} else {
|
||||
SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null upcall object");
|
||||
}
|
||||
if (swigjobj) jenv->DeleteLocalRef(swigjobj);
|
||||
return c_result;
|
||||
}
|
||||
|
||||
int SwigDirector_SipCallback::OnOptionsEvent(OptionsEvent 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[5]) {
|
||||
return SipCallback::OnOptionsEvent(e);
|
||||
}
|
||||
swigjobj = swig_get_self(jenv);
|
||||
if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) {
|
||||
*((OptionsEvent **)&je) = (OptionsEvent *) e;
|
||||
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[28], swigjobj, je);
|
||||
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[29], swigjobj, je);
|
||||
if (jenv->ExceptionOccurred()) return c_result;
|
||||
c_result = (int)jresult;
|
||||
} else {
|
||||
|
@ -1522,13 +1546,13 @@ int SwigDirector_SipCallback::OnPublicationEvent(PublicationEvent const *e) {
|
|||
jobject swigjobj = (jobject) NULL ;
|
||||
jlong je = 0 ;
|
||||
|
||||
if (!swig_override[5]) {
|
||||
if (!swig_override[6]) {
|
||||
return SipCallback::OnPublicationEvent(e);
|
||||
}
|
||||
swigjobj = swig_get_self(jenv);
|
||||
if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) {
|
||||
*((PublicationEvent **)&je) = (PublicationEvent *) e;
|
||||
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[29], swigjobj, je);
|
||||
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[30], swigjobj, je);
|
||||
if (jenv->ExceptionOccurred()) return c_result;
|
||||
c_result = (int)jresult;
|
||||
} else {
|
||||
|
@ -1546,13 +1570,13 @@ int SwigDirector_SipCallback::OnRegistrationEvent(RegistrationEvent const *e) {
|
|||
jobject swigjobj = (jobject) NULL ;
|
||||
jlong je = 0 ;
|
||||
|
||||
if (!swig_override[6]) {
|
||||
if (!swig_override[7]) {
|
||||
return SipCallback::OnRegistrationEvent(e);
|
||||
}
|
||||
swigjobj = swig_get_self(jenv);
|
||||
if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) {
|
||||
*((RegistrationEvent **)&je) = (RegistrationEvent *) e;
|
||||
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[30], swigjobj, je);
|
||||
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[31], swigjobj, je);
|
||||
if (jenv->ExceptionOccurred()) return c_result;
|
||||
c_result = (int)jresult;
|
||||
} else {
|
||||
|
@ -1570,13 +1594,13 @@ int SwigDirector_SipCallback::OnSubscriptionEvent(SubscriptionEvent const *e) {
|
|||
jobject swigjobj = (jobject) NULL ;
|
||||
jlong je = 0 ;
|
||||
|
||||
if (!swig_override[7]) {
|
||||
if (!swig_override[8]) {
|
||||
return SipCallback::OnSubscriptionEvent(e);
|
||||
}
|
||||
swigjobj = swig_get_self(jenv);
|
||||
if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) {
|
||||
*((SubscriptionEvent **)&je) = (SubscriptionEvent *) e;
|
||||
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[31], swigjobj, je);
|
||||
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[32], swigjobj, je);
|
||||
if (jenv->ExceptionOccurred()) return c_result;
|
||||
c_result = (int)jresult;
|
||||
} else {
|
||||
|
@ -1604,6 +1628,9 @@ void SwigDirector_SipCallback::swig_connect_director(JNIEnv *jenv, jobject jself
|
|||
{
|
||||
"OnMessagingEvent", "(Lorg/doubango/tinyWRAP/MessagingEvent;)I", NULL
|
||||
},
|
||||
{
|
||||
"OnInfoEvent", "(Lorg/doubango/tinyWRAP/InfoEvent;)I", NULL
|
||||
},
|
||||
{
|
||||
"OnOptionsEvent", "(Lorg/doubango/tinyWRAP/OptionsEvent;)I", NULL
|
||||
},
|
||||
|
@ -1627,7 +1654,7 @@ void SwigDirector_SipCallback::swig_connect_director(JNIEnv *jenv, jobject jself
|
|||
baseclass = (jclass) jenv->NewGlobalRef(baseclass);
|
||||
}
|
||||
bool derived = (jenv->IsSameObject(baseclass, jcls) ? false : true);
|
||||
for (int i = 0; i < 8; ++i) {
|
||||
for (int i = 0; i < 9; ++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;
|
||||
|
@ -1665,7 +1692,7 @@ int SwigDirector_XcapCallback::onEvent(XcapEvent const *e) const {
|
|||
swigjobj = swig_get_self(jenv);
|
||||
if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) {
|
||||
*((XcapEvent **)&je) = (XcapEvent *) e;
|
||||
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[32], swigjobj, je);
|
||||
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[33], swigjobj, je);
|
||||
if (jenv->ExceptionOccurred()) return c_result;
|
||||
c_result = (int)jresult;
|
||||
} else {
|
||||
|
@ -1733,7 +1760,7 @@ int SwigDirector_MsrpCallback::OnEvent(MsrpEvent const *e) {
|
|||
swigjobj = swig_get_self(jenv);
|
||||
if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) {
|
||||
*((MsrpEvent **)&je) = (MsrpEvent *) e;
|
||||
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[33], swigjobj, je);
|
||||
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[34], swigjobj, je);
|
||||
if (jenv->ExceptionOccurred()) return c_result;
|
||||
c_result = (int)jresult;
|
||||
} else {
|
||||
|
@ -2157,6 +2184,27 @@ SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ActionConfig_
|
|||
}
|
||||
|
||||
|
||||
SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ActionConfig_1addPayload(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jbyteArray jarg2, jlong jarg3) {
|
||||
jboolean jresult = 0 ;
|
||||
ActionConfig *arg1 = (ActionConfig *) 0 ;
|
||||
void *arg2 = (void *) 0 ;
|
||||
unsigned int arg3 ;
|
||||
bool result;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
(void)jarg1_;
|
||||
arg1 = *(ActionConfig **)&jarg1;
|
||||
|
||||
arg2 = jenv->GetDirectBufferAddress(jarg2);
|
||||
|
||||
arg3 = (unsigned int)jarg3;
|
||||
result = (bool)(arg1)->addPayload((void const *)arg2,arg3);
|
||||
jresult = (jboolean)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ActionConfig_1setResponseLine(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jshort jarg2, jstring jarg3) {
|
||||
jlong jresult = 0 ;
|
||||
ActionConfig *arg1 = (ActionConfig *) 0 ;
|
||||
|
@ -3351,6 +3399,21 @@ SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipMessage_1i
|
|||
}
|
||||
|
||||
|
||||
SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipMessage_1getRequestType(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
|
||||
jint jresult = 0 ;
|
||||
SipMessage *arg1 = (SipMessage *) 0 ;
|
||||
tsip_request_type_t result;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
(void)jarg1_;
|
||||
arg1 = *(SipMessage **)&jarg1;
|
||||
result = (tsip_request_type_t)(arg1)->getRequestType();
|
||||
jresult = (jint)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT jshort JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipMessage_1getResponseCode(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
|
||||
jshort jresult = 0 ;
|
||||
SipMessage *arg1 = (SipMessage *) 0 ;
|
||||
|
@ -3757,6 +3820,61 @@ SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_MessagingEvent_1
|
|||
}
|
||||
|
||||
|
||||
SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_delete_1InfoEvent(JNIEnv *jenv, jclass jcls, jlong jarg1) {
|
||||
InfoEvent *arg1 = (InfoEvent *) 0 ;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
arg1 = *(InfoEvent **)&jarg1;
|
||||
delete arg1;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_InfoEvent_1getType(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
|
||||
jint jresult = 0 ;
|
||||
InfoEvent *arg1 = (InfoEvent *) 0 ;
|
||||
tsip_info_event_type_t result;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
(void)jarg1_;
|
||||
arg1 = *(InfoEvent **)&jarg1;
|
||||
result = (tsip_info_event_type_t)((InfoEvent const *)arg1)->getType();
|
||||
jresult = (jint)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_InfoEvent_1getSession(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
|
||||
jlong jresult = 0 ;
|
||||
InfoEvent *arg1 = (InfoEvent *) 0 ;
|
||||
InfoSession *result = 0 ;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
(void)jarg1_;
|
||||
arg1 = *(InfoEvent **)&jarg1;
|
||||
result = (InfoSession *)((InfoEvent const *)arg1)->getSession();
|
||||
*(InfoSession **)&jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_InfoEvent_1takeSessionOwnership(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
|
||||
jlong jresult = 0 ;
|
||||
InfoEvent *arg1 = (InfoEvent *) 0 ;
|
||||
InfoSession *result = 0 ;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
(void)jarg1_;
|
||||
arg1 = *(InfoEvent **)&jarg1;
|
||||
result = (InfoSession *)((InfoEvent const *)arg1)->takeSessionOwnership();
|
||||
*(InfoSession **)&jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_delete_1OptionsEvent(JNIEnv *jenv, jclass jcls, jlong jarg1) {
|
||||
OptionsEvent *arg1 = (OptionsEvent *) 0 ;
|
||||
|
||||
|
@ -4401,6 +4519,51 @@ SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_InviteSession
|
|||
}
|
||||
|
||||
|
||||
SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_InviteSession_1sendInfo_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jbyteArray jarg2, jlong jarg3, jlong jarg4, jobject jarg4_) {
|
||||
jboolean jresult = 0 ;
|
||||
InviteSession *arg1 = (InviteSession *) 0 ;
|
||||
void *arg2 = (void *) 0 ;
|
||||
unsigned int arg3 ;
|
||||
ActionConfig *arg4 = (ActionConfig *) 0 ;
|
||||
bool result;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
(void)jarg1_;
|
||||
(void)jarg4_;
|
||||
arg1 = *(InviteSession **)&jarg1;
|
||||
|
||||
arg2 = jenv->GetDirectBufferAddress(jarg2);
|
||||
|
||||
arg3 = (unsigned int)jarg3;
|
||||
arg4 = *(ActionConfig **)&jarg4;
|
||||
result = (bool)(arg1)->sendInfo((void const *)arg2,arg3,arg4);
|
||||
jresult = (jboolean)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_InviteSession_1sendInfo_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jbyteArray jarg2, jlong jarg3) {
|
||||
jboolean jresult = 0 ;
|
||||
InviteSession *arg1 = (InviteSession *) 0 ;
|
||||
void *arg2 = (void *) 0 ;
|
||||
unsigned int arg3 ;
|
||||
bool result;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
(void)jarg1_;
|
||||
arg1 = *(InviteSession **)&jarg1;
|
||||
|
||||
arg2 = jenv->GetDirectBufferAddress(jarg2);
|
||||
|
||||
arg3 = (unsigned int)jarg3;
|
||||
result = (bool)(arg1)->sendInfo((void const *)arg2,arg3);
|
||||
jresult = (jboolean)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_InviteSession_1getMediaMgr(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
|
||||
jlong jresult = 0 ;
|
||||
InviteSession *arg1 = (InviteSession *) 0 ;
|
||||
|
@ -5188,6 +5351,142 @@ SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_MessagingSess
|
|||
}
|
||||
|
||||
|
||||
SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_new_1InfoSession(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
|
||||
jlong jresult = 0 ;
|
||||
SipStack *arg1 = (SipStack *) 0 ;
|
||||
InfoSession *result = 0 ;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
(void)jarg1_;
|
||||
arg1 = *(SipStack **)&jarg1;
|
||||
result = (InfoSession *)new InfoSession(arg1);
|
||||
*(InfoSession **)&jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_delete_1InfoSession(JNIEnv *jenv, jclass jcls, jlong jarg1) {
|
||||
InfoSession *arg1 = (InfoSession *) 0 ;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
arg1 = *(InfoSession **)&jarg1;
|
||||
delete arg1;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_InfoSession_1send_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jbyteArray jarg2, jlong jarg3, jlong jarg4, jobject jarg4_) {
|
||||
jboolean jresult = 0 ;
|
||||
InfoSession *arg1 = (InfoSession *) 0 ;
|
||||
void *arg2 = (void *) 0 ;
|
||||
unsigned int arg3 ;
|
||||
ActionConfig *arg4 = (ActionConfig *) 0 ;
|
||||
bool result;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
(void)jarg1_;
|
||||
(void)jarg4_;
|
||||
arg1 = *(InfoSession **)&jarg1;
|
||||
|
||||
arg2 = jenv->GetDirectBufferAddress(jarg2);
|
||||
|
||||
arg3 = (unsigned int)jarg3;
|
||||
arg4 = *(ActionConfig **)&jarg4;
|
||||
result = (bool)(arg1)->send((void const *)arg2,arg3,arg4);
|
||||
jresult = (jboolean)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_InfoSession_1send_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jbyteArray jarg2, jlong jarg3) {
|
||||
jboolean jresult = 0 ;
|
||||
InfoSession *arg1 = (InfoSession *) 0 ;
|
||||
void *arg2 = (void *) 0 ;
|
||||
unsigned int arg3 ;
|
||||
bool result;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
(void)jarg1_;
|
||||
arg1 = *(InfoSession **)&jarg1;
|
||||
|
||||
arg2 = jenv->GetDirectBufferAddress(jarg2);
|
||||
|
||||
arg3 = (unsigned int)jarg3;
|
||||
result = (bool)(arg1)->send((void const *)arg2,arg3);
|
||||
jresult = (jboolean)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_InfoSession_1accept_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
|
||||
jboolean jresult = 0 ;
|
||||
InfoSession *arg1 = (InfoSession *) 0 ;
|
||||
ActionConfig *arg2 = (ActionConfig *) 0 ;
|
||||
bool result;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
(void)jarg1_;
|
||||
(void)jarg2_;
|
||||
arg1 = *(InfoSession **)&jarg1;
|
||||
arg2 = *(ActionConfig **)&jarg2;
|
||||
result = (bool)(arg1)->accept(arg2);
|
||||
jresult = (jboolean)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_InfoSession_1accept_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
|
||||
jboolean jresult = 0 ;
|
||||
InfoSession *arg1 = (InfoSession *) 0 ;
|
||||
bool result;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
(void)jarg1_;
|
||||
arg1 = *(InfoSession **)&jarg1;
|
||||
result = (bool)(arg1)->accept();
|
||||
jresult = (jboolean)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_InfoSession_1reject_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
|
||||
jboolean jresult = 0 ;
|
||||
InfoSession *arg1 = (InfoSession *) 0 ;
|
||||
ActionConfig *arg2 = (ActionConfig *) 0 ;
|
||||
bool result;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
(void)jarg1_;
|
||||
(void)jarg2_;
|
||||
arg1 = *(InfoSession **)&jarg1;
|
||||
arg2 = *(ActionConfig **)&jarg2;
|
||||
result = (bool)(arg1)->reject(arg2);
|
||||
jresult = (jboolean)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_InfoSession_1reject_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
|
||||
jboolean jresult = 0 ;
|
||||
InfoSession *arg1 = (InfoSession *) 0 ;
|
||||
bool result;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
(void)jarg1_;
|
||||
arg1 = *(InfoSession **)&jarg1;
|
||||
result = (bool)(arg1)->reject();
|
||||
jresult = (jboolean)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_new_1OptionsSession(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
|
||||
jlong jresult = 0 ;
|
||||
SipStack *arg1 = (SipStack *) 0 ;
|
||||
|
@ -7817,6 +8116,42 @@ SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipCallback_1OnMe
|
|||
}
|
||||
|
||||
|
||||
SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipCallback_1OnInfoEvent(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
|
||||
jint jresult = 0 ;
|
||||
SipCallback *arg1 = (SipCallback *) 0 ;
|
||||
InfoEvent *arg2 = (InfoEvent *) 0 ;
|
||||
int result;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
(void)jarg1_;
|
||||
(void)jarg2_;
|
||||
arg1 = *(SipCallback **)&jarg1;
|
||||
arg2 = *(InfoEvent **)&jarg2;
|
||||
result = (int)(arg1)->OnInfoEvent((InfoEvent const *)arg2);
|
||||
jresult = (jint)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipCallback_1OnInfoEventSwigExplicitSipCallback(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
|
||||
jint jresult = 0 ;
|
||||
SipCallback *arg1 = (SipCallback *) 0 ;
|
||||
InfoEvent *arg2 = (InfoEvent *) 0 ;
|
||||
int result;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
(void)jarg1_;
|
||||
(void)jarg2_;
|
||||
arg1 = *(SipCallback **)&jarg1;
|
||||
arg2 = *(InfoEvent **)&jarg2;
|
||||
result = (int)(arg1)->SipCallback::OnInfoEvent((InfoEvent const *)arg2);
|
||||
jresult = (jint)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipCallback_1OnOptionsEvent(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
|
||||
jint jresult = 0 ;
|
||||
SipCallback *arg1 = (SipCallback *) 0 ;
|
||||
|
@ -10834,6 +11169,14 @@ SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SWIGMessagingEve
|
|||
return baseptr;
|
||||
}
|
||||
|
||||
SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SWIGInfoEventUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) {
|
||||
jlong baseptr = 0;
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
*(SipEvent **)&baseptr = *(InfoEvent **)&jarg1;
|
||||
return baseptr;
|
||||
}
|
||||
|
||||
SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SWIGOptionsEventUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) {
|
||||
jlong baseptr = 0;
|
||||
(void)jenv;
|
||||
|
@ -10898,6 +11241,14 @@ SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SWIGMessagingSes
|
|||
return baseptr;
|
||||
}
|
||||
|
||||
SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SWIGInfoSessionUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) {
|
||||
jlong baseptr = 0;
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
*(SipSession **)&baseptr = *(InfoSession **)&jarg1;
|
||||
return baseptr;
|
||||
}
|
||||
|
||||
SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SWIGOptionsSessionUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) {
|
||||
jlong baseptr = 0;
|
||||
(void)jenv;
|
||||
|
@ -10976,7 +11327,7 @@ SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_swig_1module_1ini
|
|||
static struct {
|
||||
const char *method;
|
||||
const char *signature;
|
||||
} methods[34] = {
|
||||
} methods[35] = {
|
||||
{
|
||||
"SwigDirector_DDebugCallback_OnDebugInfo", "(Lorg/doubango/tinyWRAP/DDebugCallback;Ljava/lang/String;)I"
|
||||
},
|
||||
|
@ -11061,6 +11412,9 @@ SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_swig_1module_1ini
|
|||
{
|
||||
"SwigDirector_SipCallback_OnMessagingEvent", "(Lorg/doubango/tinyWRAP/SipCallback;J)I"
|
||||
},
|
||||
{
|
||||
"SwigDirector_SipCallback_OnInfoEvent", "(Lorg/doubango/tinyWRAP/SipCallback;J)I"
|
||||
},
|
||||
{
|
||||
"SwigDirector_SipCallback_OnOptionsEvent", "(Lorg/doubango/tinyWRAP/SipCallback;J)I"
|
||||
},
|
||||
|
|
|
@ -129,16 +129,17 @@ public:
|
|||
virtual int OnStackEvent(StackEvent const *e);
|
||||
virtual int OnInviteEvent(InviteEvent const *e);
|
||||
virtual int OnMessagingEvent(MessagingEvent const *e);
|
||||
virtual int OnInfoEvent(InfoEvent const *e);
|
||||
virtual int OnOptionsEvent(OptionsEvent const *e);
|
||||
virtual int OnPublicationEvent(PublicationEvent const *e);
|
||||
virtual int OnRegistrationEvent(RegistrationEvent const *e);
|
||||
virtual int OnSubscriptionEvent(SubscriptionEvent const *e);
|
||||
public:
|
||||
bool swig_overrides(int n) {
|
||||
return (n < 8 ? swig_override[n] : false);
|
||||
return (n < 9 ? swig_override[n] : false);
|
||||
}
|
||||
protected:
|
||||
bool swig_override[8];
|
||||
bool swig_override[9];
|
||||
};
|
||||
|
||||
class SwigDirector_XcapCallback : public XcapCallback, public Swig::Director {
|
||||
|
|
|
@ -11,6 +11,7 @@ package org.doubango.tinyWRAP;
|
|||
public enum tsip_event_type_t {
|
||||
tsip_event_invite,
|
||||
tsip_event_message,
|
||||
tsip_event_info,
|
||||
tsip_event_options,
|
||||
tsip_event_publish,
|
||||
tsip_event_register,
|
||||
|
|
|
@ -0,0 +1,52 @@
|
|||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 1.3.39
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package org.doubango.tinyWRAP;
|
||||
|
||||
public enum tsip_info_event_type_t {
|
||||
tsip_i_info,
|
||||
tsip_ao_info;
|
||||
|
||||
public final int swigValue() {
|
||||
return swigValue;
|
||||
}
|
||||
|
||||
public static tsip_info_event_type_t swigToEnum(int swigValue) {
|
||||
tsip_info_event_type_t[] swigValues = tsip_info_event_type_t.class.getEnumConstants();
|
||||
if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
|
||||
return swigValues[swigValue];
|
||||
for (tsip_info_event_type_t swigEnum : swigValues)
|
||||
if (swigEnum.swigValue == swigValue)
|
||||
return swigEnum;
|
||||
throw new IllegalArgumentException("No enum " + tsip_info_event_type_t.class + " with value " + swigValue);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private tsip_info_event_type_t() {
|
||||
this.swigValue = SwigNext.next++;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private tsip_info_event_type_t(int swigValue) {
|
||||
this.swigValue = swigValue;
|
||||
SwigNext.next = swigValue+1;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private tsip_info_event_type_t(tsip_info_event_type_t swigEnum) {
|
||||
this.swigValue = swigEnum.swigValue;
|
||||
SwigNext.next = this.swigValue+1;
|
||||
}
|
||||
|
||||
private final int swigValue;
|
||||
|
||||
private static class SwigNext {
|
||||
private static int next = 0;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 1.3.39
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package org.doubango.tinyWRAP;
|
||||
|
||||
public enum tsip_request_type_t {
|
||||
tsip_NONE(0),
|
||||
tsip_ACK,
|
||||
tsip_BYE,
|
||||
tsip_CANCEL,
|
||||
tsip_INVITE,
|
||||
tsip_OPTIONS,
|
||||
tsip_REGISTER,
|
||||
tsip_SUBSCRIBE,
|
||||
tsip_NOTIFY,
|
||||
tsip_REFER,
|
||||
tsip_INFO,
|
||||
tsip_UPDATE,
|
||||
tsip_MESSAGE,
|
||||
tsip_PUBLISH,
|
||||
tsip_PRACK;
|
||||
|
||||
public final int swigValue() {
|
||||
return swigValue;
|
||||
}
|
||||
|
||||
public static tsip_request_type_t swigToEnum(int swigValue) {
|
||||
tsip_request_type_t[] swigValues = tsip_request_type_t.class.getEnumConstants();
|
||||
if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
|
||||
return swigValues[swigValue];
|
||||
for (tsip_request_type_t swigEnum : swigValues)
|
||||
if (swigEnum.swigValue == swigValue)
|
||||
return swigEnum;
|
||||
throw new IllegalArgumentException("No enum " + tsip_request_type_t.class + " with value " + swigValue);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private tsip_request_type_t() {
|
||||
this.swigValue = SwigNext.next++;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private tsip_request_type_t(int swigValue) {
|
||||
this.swigValue = swigValue;
|
||||
SwigNext.next = swigValue+1;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private tsip_request_type_t(tsip_request_type_t swigEnum) {
|
||||
this.swigValue = swigEnum.swigValue;
|
||||
SwigNext.next = this.swigValue+1;
|
||||
}
|
||||
|
||||
private final int swigValue;
|
||||
|
||||
private static class SwigNext {
|
||||
private static int next = 0;
|
||||
}
|
||||
}
|
||||
|
|
@ -30,6 +30,7 @@ class tinyWRAPJNI {
|
|||
public final static native long new_ActionConfig();
|
||||
public final static native void delete_ActionConfig(long jarg1);
|
||||
public final static native boolean ActionConfig_addHeader(long jarg1, ActionConfig jarg1_, String jarg2, String jarg3);
|
||||
public final static native boolean ActionConfig_addPayload(long jarg1, ActionConfig jarg1_, java.nio.ByteBuffer jarg2, long jarg3);
|
||||
public final static native long ActionConfig_setResponseLine(long jarg1, ActionConfig jarg1_, short jarg2, String jarg3);
|
||||
public final static native long ActionConfig_setMediaString(long jarg1, ActionConfig jarg1_, int jarg2, String jarg3, String jarg4);
|
||||
public final static native long ActionConfig_setMediaInt(long jarg1, ActionConfig jarg1_, int jarg2, String jarg3, int jarg4);
|
||||
|
@ -100,6 +101,7 @@ class tinyWRAPJNI {
|
|||
public final static native long new_SipMessage();
|
||||
public final static native void delete_SipMessage(long jarg1);
|
||||
public final static native boolean SipMessage_isResponse(long jarg1, SipMessage jarg1_);
|
||||
public final static native int SipMessage_getRequestType(long jarg1, SipMessage jarg1_);
|
||||
public final static native short SipMessage_getResponseCode(long jarg1, SipMessage jarg1_);
|
||||
public final static native String SipMessage_getSipHeaderValue__SWIG_0(long jarg1, SipMessage jarg1_, String jarg2, long jarg3);
|
||||
public final static native String SipMessage_getSipHeaderValue__SWIG_1(long jarg1, SipMessage jarg1_, String jarg2);
|
||||
|
@ -125,6 +127,10 @@ class tinyWRAPJNI {
|
|||
public final static native int MessagingEvent_getType(long jarg1, MessagingEvent jarg1_);
|
||||
public final static native long MessagingEvent_getSession(long jarg1, MessagingEvent jarg1_);
|
||||
public final static native long MessagingEvent_takeSessionOwnership(long jarg1, MessagingEvent jarg1_);
|
||||
public final static native void delete_InfoEvent(long jarg1);
|
||||
public final static native int InfoEvent_getType(long jarg1, InfoEvent jarg1_);
|
||||
public final static native long InfoEvent_getSession(long jarg1, InfoEvent jarg1_);
|
||||
public final static native long InfoEvent_takeSessionOwnership(long jarg1, InfoEvent jarg1_);
|
||||
public final static native void delete_OptionsEvent(long jarg1);
|
||||
public final static native int OptionsEvent_getType(long jarg1, OptionsEvent jarg1_);
|
||||
public final static native long OptionsEvent_getSession(long jarg1, OptionsEvent jarg1_);
|
||||
|
@ -164,6 +170,8 @@ class tinyWRAPJNI {
|
|||
public final static native boolean InviteSession_hangup__SWIG_1(long jarg1, InviteSession jarg1_);
|
||||
public final static native boolean InviteSession_reject__SWIG_0(long jarg1, InviteSession jarg1_, long jarg2, ActionConfig jarg2_);
|
||||
public final static native boolean InviteSession_reject__SWIG_1(long jarg1, InviteSession jarg1_);
|
||||
public final static native boolean InviteSession_sendInfo__SWIG_0(long jarg1, InviteSession jarg1_, java.nio.ByteBuffer jarg2, long jarg3, long jarg4, ActionConfig jarg4_);
|
||||
public final static native boolean InviteSession_sendInfo__SWIG_1(long jarg1, InviteSession jarg1_, java.nio.ByteBuffer jarg2, long jarg3);
|
||||
public final static native long InviteSession_getMediaMgr(long jarg1, InviteSession jarg1_);
|
||||
public final static native long new_CallSession(long jarg1, SipStack jarg1_);
|
||||
public final static native void delete_CallSession(long jarg1);
|
||||
|
@ -206,6 +214,14 @@ class tinyWRAPJNI {
|
|||
public final static native boolean MessagingSession_accept__SWIG_1(long jarg1, MessagingSession jarg1_);
|
||||
public final static native boolean MessagingSession_reject__SWIG_0(long jarg1, MessagingSession jarg1_, long jarg2, ActionConfig jarg2_);
|
||||
public final static native boolean MessagingSession_reject__SWIG_1(long jarg1, MessagingSession jarg1_);
|
||||
public final static native long new_InfoSession(long jarg1, SipStack jarg1_);
|
||||
public final static native void delete_InfoSession(long jarg1);
|
||||
public final static native boolean InfoSession_send__SWIG_0(long jarg1, InfoSession jarg1_, java.nio.ByteBuffer jarg2, long jarg3, long jarg4, ActionConfig jarg4_);
|
||||
public final static native boolean InfoSession_send__SWIG_1(long jarg1, InfoSession jarg1_, java.nio.ByteBuffer jarg2, long jarg3);
|
||||
public final static native boolean InfoSession_accept__SWIG_0(long jarg1, InfoSession jarg1_, long jarg2, ActionConfig jarg2_);
|
||||
public final static native boolean InfoSession_accept__SWIG_1(long jarg1, InfoSession jarg1_);
|
||||
public final static native boolean InfoSession_reject__SWIG_0(long jarg1, InfoSession jarg1_, long jarg2, ActionConfig jarg2_);
|
||||
public final static native boolean InfoSession_reject__SWIG_1(long jarg1, InfoSession jarg1_);
|
||||
public final static native long new_OptionsSession(long jarg1, SipStack jarg1_);
|
||||
public final static native void delete_OptionsSession(long jarg1);
|
||||
public final static native boolean OptionsSession_send__SWIG_0(long jarg1, OptionsSession jarg1_, long jarg2, ActionConfig jarg2_);
|
||||
|
@ -361,6 +377,8 @@ class tinyWRAPJNI {
|
|||
public final static native int SipCallback_OnInviteEventSwigExplicitSipCallback(long jarg1, SipCallback jarg1_, long jarg2, InviteEvent jarg2_);
|
||||
public final static native int SipCallback_OnMessagingEvent(long jarg1, SipCallback jarg1_, long jarg2, MessagingEvent jarg2_);
|
||||
public final static native int SipCallback_OnMessagingEventSwigExplicitSipCallback(long jarg1, SipCallback jarg1_, long jarg2, MessagingEvent jarg2_);
|
||||
public final static native int SipCallback_OnInfoEvent(long jarg1, SipCallback jarg1_, long jarg2, InfoEvent jarg2_);
|
||||
public final static native int SipCallback_OnInfoEventSwigExplicitSipCallback(long jarg1, SipCallback jarg1_, long jarg2, InfoEvent jarg2_);
|
||||
public final static native int SipCallback_OnOptionsEvent(long jarg1, SipCallback jarg1_, long jarg2, OptionsEvent jarg2_);
|
||||
public final static native int SipCallback_OnOptionsEventSwigExplicitSipCallback(long jarg1, SipCallback jarg1_, long jarg2, OptionsEvent jarg2_);
|
||||
public final static native int SipCallback_OnPublicationEvent(long jarg1, SipCallback jarg1_, long jarg2, PublicationEvent jarg2_);
|
||||
|
@ -515,6 +533,7 @@ class tinyWRAPJNI {
|
|||
public final static native long SWIGStackEventUpcast(long jarg1);
|
||||
public final static native long SWIGInviteEventUpcast(long jarg1);
|
||||
public final static native long SWIGMessagingEventUpcast(long jarg1);
|
||||
public final static native long SWIGInfoEventUpcast(long jarg1);
|
||||
public final static native long SWIGOptionsEventUpcast(long jarg1);
|
||||
public final static native long SWIGPublicationEventUpcast(long jarg1);
|
||||
public final static native long SWIGRegistrationEventUpcast(long jarg1);
|
||||
|
@ -523,6 +542,7 @@ class tinyWRAPJNI {
|
|||
public final static native long SWIGCallSessionUpcast(long jarg1);
|
||||
public final static native long SWIGMsrpSessionUpcast(long jarg1);
|
||||
public final static native long SWIGMessagingSessionUpcast(long jarg1);
|
||||
public final static native long SWIGInfoSessionUpcast(long jarg1);
|
||||
public final static native long SWIGOptionsSessionUpcast(long jarg1);
|
||||
public final static native long SWIGPublicationSessionUpcast(long jarg1);
|
||||
public final static native long SWIGRegistrationSessionUpcast(long jarg1);
|
||||
|
@ -617,6 +637,9 @@ class tinyWRAPJNI {
|
|||
public static int SwigDirector_SipCallback_OnMessagingEvent(SipCallback self, long e) {
|
||||
return self.OnMessagingEvent((e == 0) ? null : new MessagingEvent(e, false));
|
||||
}
|
||||
public static int SwigDirector_SipCallback_OnInfoEvent(SipCallback self, long e) {
|
||||
return self.OnInfoEvent((e == 0) ? null : new InfoEvent(e, false));
|
||||
}
|
||||
public static int SwigDirector_SipCallback_OnOptionsEvent(SipCallback self, long e) {
|
||||
return self.OnOptionsEvent((e == 0) ? null : new OptionsEvent(e, false));
|
||||
}
|
||||
|
|
|
@ -403,7 +403,7 @@ namespace Swig {
|
|||
|
||||
namespace Swig {
|
||||
static jclass jclass_tinyWRAPJNI = NULL;
|
||||
static jmethodID director_methids[34];
|
||||
static jmethodID director_methids[35];
|
||||
}
|
||||
|
||||
#include <stdint.h> // Use the C99 official header
|
||||
|
@ -1490,7 +1490,7 @@ int SwigDirector_SipCallback::OnMessagingEvent(MessagingEvent const *e) {
|
|||
return c_result;
|
||||
}
|
||||
|
||||
int SwigDirector_SipCallback::OnOptionsEvent(OptionsEvent const *e) {
|
||||
int SwigDirector_SipCallback::OnInfoEvent(InfoEvent const *e) {
|
||||
int c_result = SwigValueInit< int >() ;
|
||||
jint jresult = 0 ;
|
||||
JNIEnvWrapper swigjnienv(this) ;
|
||||
|
@ -1499,12 +1499,36 @@ int SwigDirector_SipCallback::OnOptionsEvent(OptionsEvent const *e) {
|
|||
jlong je = 0 ;
|
||||
|
||||
if (!swig_override[4]) {
|
||||
return SipCallback::OnInfoEvent(e);
|
||||
}
|
||||
swigjobj = swig_get_self(jenv);
|
||||
if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) {
|
||||
*((InfoEvent **)&je) = (InfoEvent *) e;
|
||||
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[28], swigjobj, je);
|
||||
if (jenv->ExceptionOccurred()) return c_result;
|
||||
c_result = (int)jresult;
|
||||
} else {
|
||||
SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null upcall object");
|
||||
}
|
||||
if (swigjobj) jenv->DeleteLocalRef(swigjobj);
|
||||
return c_result;
|
||||
}
|
||||
|
||||
int SwigDirector_SipCallback::OnOptionsEvent(OptionsEvent 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[5]) {
|
||||
return SipCallback::OnOptionsEvent(e);
|
||||
}
|
||||
swigjobj = swig_get_self(jenv);
|
||||
if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) {
|
||||
*((OptionsEvent **)&je) = (OptionsEvent *) e;
|
||||
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[28], swigjobj, je);
|
||||
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[29], swigjobj, je);
|
||||
if (jenv->ExceptionOccurred()) return c_result;
|
||||
c_result = (int)jresult;
|
||||
} else {
|
||||
|
@ -1522,13 +1546,13 @@ int SwigDirector_SipCallback::OnPublicationEvent(PublicationEvent const *e) {
|
|||
jobject swigjobj = (jobject) NULL ;
|
||||
jlong je = 0 ;
|
||||
|
||||
if (!swig_override[5]) {
|
||||
if (!swig_override[6]) {
|
||||
return SipCallback::OnPublicationEvent(e);
|
||||
}
|
||||
swigjobj = swig_get_self(jenv);
|
||||
if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) {
|
||||
*((PublicationEvent **)&je) = (PublicationEvent *) e;
|
||||
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[29], swigjobj, je);
|
||||
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[30], swigjobj, je);
|
||||
if (jenv->ExceptionOccurred()) return c_result;
|
||||
c_result = (int)jresult;
|
||||
} else {
|
||||
|
@ -1546,13 +1570,13 @@ int SwigDirector_SipCallback::OnRegistrationEvent(RegistrationEvent const *e) {
|
|||
jobject swigjobj = (jobject) NULL ;
|
||||
jlong je = 0 ;
|
||||
|
||||
if (!swig_override[6]) {
|
||||
if (!swig_override[7]) {
|
||||
return SipCallback::OnRegistrationEvent(e);
|
||||
}
|
||||
swigjobj = swig_get_self(jenv);
|
||||
if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) {
|
||||
*((RegistrationEvent **)&je) = (RegistrationEvent *) e;
|
||||
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[30], swigjobj, je);
|
||||
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[31], swigjobj, je);
|
||||
if (jenv->ExceptionOccurred()) return c_result;
|
||||
c_result = (int)jresult;
|
||||
} else {
|
||||
|
@ -1570,13 +1594,13 @@ int SwigDirector_SipCallback::OnSubscriptionEvent(SubscriptionEvent const *e) {
|
|||
jobject swigjobj = (jobject) NULL ;
|
||||
jlong je = 0 ;
|
||||
|
||||
if (!swig_override[7]) {
|
||||
if (!swig_override[8]) {
|
||||
return SipCallback::OnSubscriptionEvent(e);
|
||||
}
|
||||
swigjobj = swig_get_self(jenv);
|
||||
if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) {
|
||||
*((SubscriptionEvent **)&je) = (SubscriptionEvent *) e;
|
||||
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[31], swigjobj, je);
|
||||
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[32], swigjobj, je);
|
||||
if (jenv->ExceptionOccurred()) return c_result;
|
||||
c_result = (int)jresult;
|
||||
} else {
|
||||
|
@ -1604,6 +1628,9 @@ void SwigDirector_SipCallback::swig_connect_director(JNIEnv *jenv, jobject jself
|
|||
{
|
||||
"OnMessagingEvent", "(Lorg/doubango/tinyWRAP/MessagingEvent;)I", NULL
|
||||
},
|
||||
{
|
||||
"OnInfoEvent", "(Lorg/doubango/tinyWRAP/InfoEvent;)I", NULL
|
||||
},
|
||||
{
|
||||
"OnOptionsEvent", "(Lorg/doubango/tinyWRAP/OptionsEvent;)I", NULL
|
||||
},
|
||||
|
@ -1627,7 +1654,7 @@ void SwigDirector_SipCallback::swig_connect_director(JNIEnv *jenv, jobject jself
|
|||
baseclass = (jclass) jenv->NewGlobalRef(baseclass);
|
||||
}
|
||||
bool derived = (jenv->IsSameObject(baseclass, jcls) ? false : true);
|
||||
for (int i = 0; i < 8; ++i) {
|
||||
for (int i = 0; i < 9; ++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;
|
||||
|
@ -1665,7 +1692,7 @@ int SwigDirector_XcapCallback::onEvent(XcapEvent const *e) const {
|
|||
swigjobj = swig_get_self(jenv);
|
||||
if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) {
|
||||
*((XcapEvent **)&je) = (XcapEvent *) e;
|
||||
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[32], swigjobj, je);
|
||||
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[33], swigjobj, je);
|
||||
if (jenv->ExceptionOccurred()) return c_result;
|
||||
c_result = (int)jresult;
|
||||
} else {
|
||||
|
@ -1733,7 +1760,7 @@ int SwigDirector_MsrpCallback::OnEvent(MsrpEvent const *e) {
|
|||
swigjobj = swig_get_self(jenv);
|
||||
if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) {
|
||||
*((MsrpEvent **)&je) = (MsrpEvent *) e;
|
||||
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[33], swigjobj, je);
|
||||
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[34], swigjobj, je);
|
||||
if (jenv->ExceptionOccurred()) return c_result;
|
||||
c_result = (int)jresult;
|
||||
} else {
|
||||
|
@ -2157,6 +2184,27 @@ SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ActionConfig_
|
|||
}
|
||||
|
||||
|
||||
SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ActionConfig_1addPayload(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jbyteArray jarg2, jlong jarg3) {
|
||||
jboolean jresult = 0 ;
|
||||
ActionConfig *arg1 = (ActionConfig *) 0 ;
|
||||
void *arg2 = (void *) 0 ;
|
||||
unsigned int arg3 ;
|
||||
bool result;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
(void)jarg1_;
|
||||
arg1 = *(ActionConfig **)&jarg1;
|
||||
|
||||
arg2 = jenv->GetDirectBufferAddress(jarg2);
|
||||
|
||||
arg3 = (unsigned int)jarg3;
|
||||
result = (bool)(arg1)->addPayload((void const *)arg2,arg3);
|
||||
jresult = (jboolean)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ActionConfig_1setResponseLine(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jshort jarg2, jstring jarg3) {
|
||||
jlong jresult = 0 ;
|
||||
ActionConfig *arg1 = (ActionConfig *) 0 ;
|
||||
|
@ -3351,6 +3399,21 @@ SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipMessage_1i
|
|||
}
|
||||
|
||||
|
||||
SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipMessage_1getRequestType(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
|
||||
jint jresult = 0 ;
|
||||
SipMessage *arg1 = (SipMessage *) 0 ;
|
||||
tsip_request_type_t result;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
(void)jarg1_;
|
||||
arg1 = *(SipMessage **)&jarg1;
|
||||
result = (tsip_request_type_t)(arg1)->getRequestType();
|
||||
jresult = (jint)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT jshort JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipMessage_1getResponseCode(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
|
||||
jshort jresult = 0 ;
|
||||
SipMessage *arg1 = (SipMessage *) 0 ;
|
||||
|
@ -3757,6 +3820,61 @@ SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_MessagingEvent_1
|
|||
}
|
||||
|
||||
|
||||
SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_delete_1InfoEvent(JNIEnv *jenv, jclass jcls, jlong jarg1) {
|
||||
InfoEvent *arg1 = (InfoEvent *) 0 ;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
arg1 = *(InfoEvent **)&jarg1;
|
||||
delete arg1;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_InfoEvent_1getType(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
|
||||
jint jresult = 0 ;
|
||||
InfoEvent *arg1 = (InfoEvent *) 0 ;
|
||||
tsip_info_event_type_t result;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
(void)jarg1_;
|
||||
arg1 = *(InfoEvent **)&jarg1;
|
||||
result = (tsip_info_event_type_t)((InfoEvent const *)arg1)->getType();
|
||||
jresult = (jint)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_InfoEvent_1getSession(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
|
||||
jlong jresult = 0 ;
|
||||
InfoEvent *arg1 = (InfoEvent *) 0 ;
|
||||
InfoSession *result = 0 ;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
(void)jarg1_;
|
||||
arg1 = *(InfoEvent **)&jarg1;
|
||||
result = (InfoSession *)((InfoEvent const *)arg1)->getSession();
|
||||
*(InfoSession **)&jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_InfoEvent_1takeSessionOwnership(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
|
||||
jlong jresult = 0 ;
|
||||
InfoEvent *arg1 = (InfoEvent *) 0 ;
|
||||
InfoSession *result = 0 ;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
(void)jarg1_;
|
||||
arg1 = *(InfoEvent **)&jarg1;
|
||||
result = (InfoSession *)((InfoEvent const *)arg1)->takeSessionOwnership();
|
||||
*(InfoSession **)&jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_delete_1OptionsEvent(JNIEnv *jenv, jclass jcls, jlong jarg1) {
|
||||
OptionsEvent *arg1 = (OptionsEvent *) 0 ;
|
||||
|
||||
|
@ -4401,6 +4519,51 @@ SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_InviteSession
|
|||
}
|
||||
|
||||
|
||||
SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_InviteSession_1sendInfo_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jbyteArray jarg2, jlong jarg3, jlong jarg4, jobject jarg4_) {
|
||||
jboolean jresult = 0 ;
|
||||
InviteSession *arg1 = (InviteSession *) 0 ;
|
||||
void *arg2 = (void *) 0 ;
|
||||
unsigned int arg3 ;
|
||||
ActionConfig *arg4 = (ActionConfig *) 0 ;
|
||||
bool result;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
(void)jarg1_;
|
||||
(void)jarg4_;
|
||||
arg1 = *(InviteSession **)&jarg1;
|
||||
|
||||
arg2 = jenv->GetDirectBufferAddress(jarg2);
|
||||
|
||||
arg3 = (unsigned int)jarg3;
|
||||
arg4 = *(ActionConfig **)&jarg4;
|
||||
result = (bool)(arg1)->sendInfo((void const *)arg2,arg3,arg4);
|
||||
jresult = (jboolean)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_InviteSession_1sendInfo_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jbyteArray jarg2, jlong jarg3) {
|
||||
jboolean jresult = 0 ;
|
||||
InviteSession *arg1 = (InviteSession *) 0 ;
|
||||
void *arg2 = (void *) 0 ;
|
||||
unsigned int arg3 ;
|
||||
bool result;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
(void)jarg1_;
|
||||
arg1 = *(InviteSession **)&jarg1;
|
||||
|
||||
arg2 = jenv->GetDirectBufferAddress(jarg2);
|
||||
|
||||
arg3 = (unsigned int)jarg3;
|
||||
result = (bool)(arg1)->sendInfo((void const *)arg2,arg3);
|
||||
jresult = (jboolean)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_InviteSession_1getMediaMgr(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
|
||||
jlong jresult = 0 ;
|
||||
InviteSession *arg1 = (InviteSession *) 0 ;
|
||||
|
@ -5188,6 +5351,142 @@ SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_MessagingSess
|
|||
}
|
||||
|
||||
|
||||
SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_new_1InfoSession(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
|
||||
jlong jresult = 0 ;
|
||||
SipStack *arg1 = (SipStack *) 0 ;
|
||||
InfoSession *result = 0 ;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
(void)jarg1_;
|
||||
arg1 = *(SipStack **)&jarg1;
|
||||
result = (InfoSession *)new InfoSession(arg1);
|
||||
*(InfoSession **)&jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_delete_1InfoSession(JNIEnv *jenv, jclass jcls, jlong jarg1) {
|
||||
InfoSession *arg1 = (InfoSession *) 0 ;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
arg1 = *(InfoSession **)&jarg1;
|
||||
delete arg1;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_InfoSession_1send_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jbyteArray jarg2, jlong jarg3, jlong jarg4, jobject jarg4_) {
|
||||
jboolean jresult = 0 ;
|
||||
InfoSession *arg1 = (InfoSession *) 0 ;
|
||||
void *arg2 = (void *) 0 ;
|
||||
unsigned int arg3 ;
|
||||
ActionConfig *arg4 = (ActionConfig *) 0 ;
|
||||
bool result;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
(void)jarg1_;
|
||||
(void)jarg4_;
|
||||
arg1 = *(InfoSession **)&jarg1;
|
||||
|
||||
arg2 = jenv->GetDirectBufferAddress(jarg2);
|
||||
|
||||
arg3 = (unsigned int)jarg3;
|
||||
arg4 = *(ActionConfig **)&jarg4;
|
||||
result = (bool)(arg1)->send((void const *)arg2,arg3,arg4);
|
||||
jresult = (jboolean)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_InfoSession_1send_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jbyteArray jarg2, jlong jarg3) {
|
||||
jboolean jresult = 0 ;
|
||||
InfoSession *arg1 = (InfoSession *) 0 ;
|
||||
void *arg2 = (void *) 0 ;
|
||||
unsigned int arg3 ;
|
||||
bool result;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
(void)jarg1_;
|
||||
arg1 = *(InfoSession **)&jarg1;
|
||||
|
||||
arg2 = jenv->GetDirectBufferAddress(jarg2);
|
||||
|
||||
arg3 = (unsigned int)jarg3;
|
||||
result = (bool)(arg1)->send((void const *)arg2,arg3);
|
||||
jresult = (jboolean)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_InfoSession_1accept_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
|
||||
jboolean jresult = 0 ;
|
||||
InfoSession *arg1 = (InfoSession *) 0 ;
|
||||
ActionConfig *arg2 = (ActionConfig *) 0 ;
|
||||
bool result;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
(void)jarg1_;
|
||||
(void)jarg2_;
|
||||
arg1 = *(InfoSession **)&jarg1;
|
||||
arg2 = *(ActionConfig **)&jarg2;
|
||||
result = (bool)(arg1)->accept(arg2);
|
||||
jresult = (jboolean)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_InfoSession_1accept_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
|
||||
jboolean jresult = 0 ;
|
||||
InfoSession *arg1 = (InfoSession *) 0 ;
|
||||
bool result;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
(void)jarg1_;
|
||||
arg1 = *(InfoSession **)&jarg1;
|
||||
result = (bool)(arg1)->accept();
|
||||
jresult = (jboolean)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_InfoSession_1reject_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
|
||||
jboolean jresult = 0 ;
|
||||
InfoSession *arg1 = (InfoSession *) 0 ;
|
||||
ActionConfig *arg2 = (ActionConfig *) 0 ;
|
||||
bool result;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
(void)jarg1_;
|
||||
(void)jarg2_;
|
||||
arg1 = *(InfoSession **)&jarg1;
|
||||
arg2 = *(ActionConfig **)&jarg2;
|
||||
result = (bool)(arg1)->reject(arg2);
|
||||
jresult = (jboolean)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_InfoSession_1reject_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
|
||||
jboolean jresult = 0 ;
|
||||
InfoSession *arg1 = (InfoSession *) 0 ;
|
||||
bool result;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
(void)jarg1_;
|
||||
arg1 = *(InfoSession **)&jarg1;
|
||||
result = (bool)(arg1)->reject();
|
||||
jresult = (jboolean)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_new_1OptionsSession(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
|
||||
jlong jresult = 0 ;
|
||||
SipStack *arg1 = (SipStack *) 0 ;
|
||||
|
@ -7817,6 +8116,42 @@ SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipCallback_1OnMe
|
|||
}
|
||||
|
||||
|
||||
SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipCallback_1OnInfoEvent(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
|
||||
jint jresult = 0 ;
|
||||
SipCallback *arg1 = (SipCallback *) 0 ;
|
||||
InfoEvent *arg2 = (InfoEvent *) 0 ;
|
||||
int result;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
(void)jarg1_;
|
||||
(void)jarg2_;
|
||||
arg1 = *(SipCallback **)&jarg1;
|
||||
arg2 = *(InfoEvent **)&jarg2;
|
||||
result = (int)(arg1)->OnInfoEvent((InfoEvent const *)arg2);
|
||||
jresult = (jint)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipCallback_1OnInfoEventSwigExplicitSipCallback(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
|
||||
jint jresult = 0 ;
|
||||
SipCallback *arg1 = (SipCallback *) 0 ;
|
||||
InfoEvent *arg2 = (InfoEvent *) 0 ;
|
||||
int result;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
(void)jarg1_;
|
||||
(void)jarg2_;
|
||||
arg1 = *(SipCallback **)&jarg1;
|
||||
arg2 = *(InfoEvent **)&jarg2;
|
||||
result = (int)(arg1)->SipCallback::OnInfoEvent((InfoEvent const *)arg2);
|
||||
jresult = (jint)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipCallback_1OnOptionsEvent(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
|
||||
jint jresult = 0 ;
|
||||
SipCallback *arg1 = (SipCallback *) 0 ;
|
||||
|
@ -10834,6 +11169,14 @@ SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SWIGMessagingEve
|
|||
return baseptr;
|
||||
}
|
||||
|
||||
SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SWIGInfoEventUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) {
|
||||
jlong baseptr = 0;
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
*(SipEvent **)&baseptr = *(InfoEvent **)&jarg1;
|
||||
return baseptr;
|
||||
}
|
||||
|
||||
SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SWIGOptionsEventUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) {
|
||||
jlong baseptr = 0;
|
||||
(void)jenv;
|
||||
|
@ -10898,6 +11241,14 @@ SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SWIGMessagingSes
|
|||
return baseptr;
|
||||
}
|
||||
|
||||
SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SWIGInfoSessionUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) {
|
||||
jlong baseptr = 0;
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
*(SipSession **)&baseptr = *(InfoSession **)&jarg1;
|
||||
return baseptr;
|
||||
}
|
||||
|
||||
SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SWIGOptionsSessionUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) {
|
||||
jlong baseptr = 0;
|
||||
(void)jenv;
|
||||
|
@ -10976,7 +11327,7 @@ SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_swig_1module_1ini
|
|||
static struct {
|
||||
const char *method;
|
||||
const char *signature;
|
||||
} methods[34] = {
|
||||
} methods[35] = {
|
||||
{
|
||||
"SwigDirector_DDebugCallback_OnDebugInfo", "(Lorg/doubango/tinyWRAP/DDebugCallback;Ljava/lang/String;)I"
|
||||
},
|
||||
|
@ -11061,6 +11412,9 @@ SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_swig_1module_1ini
|
|||
{
|
||||
"SwigDirector_SipCallback_OnMessagingEvent", "(Lorg/doubango/tinyWRAP/SipCallback;J)I"
|
||||
},
|
||||
{
|
||||
"SwigDirector_SipCallback_OnInfoEvent", "(Lorg/doubango/tinyWRAP/SipCallback;J)I"
|
||||
},
|
||||
{
|
||||
"SwigDirector_SipCallback_OnOptionsEvent", "(Lorg/doubango/tinyWRAP/SipCallback;J)I"
|
||||
},
|
||||
|
|
|
@ -129,16 +129,17 @@ public:
|
|||
virtual int OnStackEvent(StackEvent const *e);
|
||||
virtual int OnInviteEvent(InviteEvent const *e);
|
||||
virtual int OnMessagingEvent(MessagingEvent const *e);
|
||||
virtual int OnInfoEvent(InfoEvent const *e);
|
||||
virtual int OnOptionsEvent(OptionsEvent const *e);
|
||||
virtual int OnPublicationEvent(PublicationEvent const *e);
|
||||
virtual int OnRegistrationEvent(RegistrationEvent const *e);
|
||||
virtual int OnSubscriptionEvent(SubscriptionEvent const *e);
|
||||
public:
|
||||
bool swig_overrides(int n) {
|
||||
return (n < 8 ? swig_override[n] : false);
|
||||
return (n < 9 ? swig_override[n] : false);
|
||||
}
|
||||
protected:
|
||||
bool swig_override[8];
|
||||
bool swig_override[9];
|
||||
};
|
||||
|
||||
class SwigDirector_XcapCallback : public XcapCallback, public Swig::Director {
|
||||
|
|
|
@ -11,6 +11,7 @@ package org.doubango.tinyWRAP;
|
|||
public enum tsip_event_type_t {
|
||||
tsip_event_invite,
|
||||
tsip_event_message,
|
||||
tsip_event_info,
|
||||
tsip_event_options,
|
||||
tsip_event_publish,
|
||||
tsip_event_register,
|
||||
|
|
|
@ -0,0 +1,52 @@
|
|||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 1.3.39
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package org.doubango.tinyWRAP;
|
||||
|
||||
public enum tsip_info_event_type_t {
|
||||
tsip_i_info,
|
||||
tsip_ao_info;
|
||||
|
||||
public final int swigValue() {
|
||||
return swigValue;
|
||||
}
|
||||
|
||||
public static tsip_info_event_type_t swigToEnum(int swigValue) {
|
||||
tsip_info_event_type_t[] swigValues = tsip_info_event_type_t.class.getEnumConstants();
|
||||
if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
|
||||
return swigValues[swigValue];
|
||||
for (tsip_info_event_type_t swigEnum : swigValues)
|
||||
if (swigEnum.swigValue == swigValue)
|
||||
return swigEnum;
|
||||
throw new IllegalArgumentException("No enum " + tsip_info_event_type_t.class + " with value " + swigValue);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private tsip_info_event_type_t() {
|
||||
this.swigValue = SwigNext.next++;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private tsip_info_event_type_t(int swigValue) {
|
||||
this.swigValue = swigValue;
|
||||
SwigNext.next = swigValue+1;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private tsip_info_event_type_t(tsip_info_event_type_t swigEnum) {
|
||||
this.swigValue = swigEnum.swigValue;
|
||||
SwigNext.next = this.swigValue+1;
|
||||
}
|
||||
|
||||
private final int swigValue;
|
||||
|
||||
private static class SwigNext {
|
||||
private static int next = 0;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 1.3.39
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package org.doubango.tinyWRAP;
|
||||
|
||||
public enum tsip_request_type_t {
|
||||
tsip_NONE(0),
|
||||
tsip_ACK,
|
||||
tsip_BYE,
|
||||
tsip_CANCEL,
|
||||
tsip_INVITE,
|
||||
tsip_OPTIONS,
|
||||
tsip_REGISTER,
|
||||
tsip_SUBSCRIBE,
|
||||
tsip_NOTIFY,
|
||||
tsip_REFER,
|
||||
tsip_INFO,
|
||||
tsip_UPDATE,
|
||||
tsip_MESSAGE,
|
||||
tsip_PUBLISH,
|
||||
tsip_PRACK;
|
||||
|
||||
public final int swigValue() {
|
||||
return swigValue;
|
||||
}
|
||||
|
||||
public static tsip_request_type_t swigToEnum(int swigValue) {
|
||||
tsip_request_type_t[] swigValues = tsip_request_type_t.class.getEnumConstants();
|
||||
if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
|
||||
return swigValues[swigValue];
|
||||
for (tsip_request_type_t swigEnum : swigValues)
|
||||
if (swigEnum.swigValue == swigValue)
|
||||
return swigEnum;
|
||||
throw new IllegalArgumentException("No enum " + tsip_request_type_t.class + " with value " + swigValue);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private tsip_request_type_t() {
|
||||
this.swigValue = SwigNext.next++;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private tsip_request_type_t(int swigValue) {
|
||||
this.swigValue = swigValue;
|
||||
SwigNext.next = swigValue+1;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private tsip_request_type_t(tsip_request_type_t swigEnum) {
|
||||
this.swigValue = swigEnum.swigValue;
|
||||
SwigNext.next = this.swigValue+1;
|
||||
}
|
||||
|
||||
private final int swigValue;
|
||||
|
||||
private static class SwigNext {
|
||||
private static int next = 0;
|
||||
}
|
||||
}
|
||||
|
|
@ -157,6 +157,7 @@ sub DESTROY {
|
|||
}
|
||||
|
||||
*addHeader = *tinyWRAPc::ActionConfig_addHeader;
|
||||
*addPayload = *tinyWRAPc::ActionConfig_addPayload;
|
||||
*setResponseLine = *tinyWRAPc::ActionConfig_setResponseLine;
|
||||
*setMediaString = *tinyWRAPc::ActionConfig_setMediaString;
|
||||
*setMediaInt = *tinyWRAPc::ActionConfig_setMediaInt;
|
||||
|
@ -418,6 +419,7 @@ sub DESTROY {
|
|||
}
|
||||
|
||||
*isResponse = *tinyWRAPc::SipMessage_isResponse;
|
||||
*getRequestType = *tinyWRAPc::SipMessage_getRequestType;
|
||||
*getResponseCode = *tinyWRAPc::SipMessage_getResponseCode;
|
||||
*getSipHeaderValue = *tinyWRAPc::SipMessage_getSipHeaderValue;
|
||||
*getSipHeaderParamValue = *tinyWRAPc::SipMessage_getSipHeaderParamValue;
|
||||
|
@ -604,6 +606,40 @@ sub ACQUIRE {
|
|||
}
|
||||
|
||||
|
||||
############# Class : tinyWRAP::InfoEvent ##############
|
||||
|
||||
package tinyWRAP::InfoEvent;
|
||||
use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
|
||||
@ISA = qw( tinyWRAP::SipEvent tinyWRAP );
|
||||
%OWNER = ();
|
||||
%ITERATORS = ();
|
||||
sub DESTROY {
|
||||
return unless $_[0]->isa('HASH');
|
||||
my $self = tied(%{$_[0]});
|
||||
return unless defined $self;
|
||||
delete $ITERATORS{$self};
|
||||
if (exists $OWNER{$self}) {
|
||||
tinyWRAPc::delete_InfoEvent($self);
|
||||
delete $OWNER{$self};
|
||||
}
|
||||
}
|
||||
|
||||
*getType = *tinyWRAPc::InfoEvent_getType;
|
||||
*getSession = *tinyWRAPc::InfoEvent_getSession;
|
||||
*takeSessionOwnership = *tinyWRAPc::InfoEvent_takeSessionOwnership;
|
||||
sub DISOWN {
|
||||
my $self = shift;
|
||||
my $ptr = tied(%$self);
|
||||
delete $OWNER{$ptr};
|
||||
}
|
||||
|
||||
sub ACQUIRE {
|
||||
my $self = shift;
|
||||
my $ptr = tied(%$self);
|
||||
$OWNER{$ptr} = 1;
|
||||
}
|
||||
|
||||
|
||||
############# Class : tinyWRAP::OptionsEvent ##############
|
||||
|
||||
package tinyWRAP::OptionsEvent;
|
||||
|
@ -814,6 +850,7 @@ sub DESTROY {
|
|||
*accept = *tinyWRAPc::InviteSession_accept;
|
||||
*hangup = *tinyWRAPc::InviteSession_hangup;
|
||||
*reject = *tinyWRAPc::InviteSession_reject;
|
||||
*sendInfo = *tinyWRAPc::InviteSession_sendInfo;
|
||||
*getMediaMgr = *tinyWRAPc::InviteSession_getMediaMgr;
|
||||
sub DISOWN {
|
||||
my $self = shift;
|
||||
|
@ -955,6 +992,46 @@ sub ACQUIRE {
|
|||
}
|
||||
|
||||
|
||||
############# Class : tinyWRAP::InfoSession ##############
|
||||
|
||||
package tinyWRAP::InfoSession;
|
||||
use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
|
||||
@ISA = qw( tinyWRAP::SipSession tinyWRAP );
|
||||
%OWNER = ();
|
||||
%ITERATORS = ();
|
||||
sub new {
|
||||
my $pkg = shift;
|
||||
my $self = tinyWRAPc::new_InfoSession(@_);
|
||||
bless $self, $pkg if defined($self);
|
||||
}
|
||||
|
||||
sub DESTROY {
|
||||
return unless $_[0]->isa('HASH');
|
||||
my $self = tied(%{$_[0]});
|
||||
return unless defined $self;
|
||||
delete $ITERATORS{$self};
|
||||
if (exists $OWNER{$self}) {
|
||||
tinyWRAPc::delete_InfoSession($self);
|
||||
delete $OWNER{$self};
|
||||
}
|
||||
}
|
||||
|
||||
*send = *tinyWRAPc::InfoSession_send;
|
||||
*accept = *tinyWRAPc::InfoSession_accept;
|
||||
*reject = *tinyWRAPc::InfoSession_reject;
|
||||
sub DISOWN {
|
||||
my $self = shift;
|
||||
my $ptr = tied(%$self);
|
||||
delete $OWNER{$ptr};
|
||||
}
|
||||
|
||||
sub ACQUIRE {
|
||||
my $self = shift;
|
||||
my $ptr = tied(%$self);
|
||||
$OWNER{$ptr} = 1;
|
||||
}
|
||||
|
||||
|
||||
############# Class : tinyWRAP::OptionsSession ##############
|
||||
|
||||
package tinyWRAP::OptionsSession;
|
||||
|
@ -1612,6 +1689,7 @@ sub DESTROY {
|
|||
*OnStackEvent = *tinyWRAPc::SipCallback_OnStackEvent;
|
||||
*OnInviteEvent = *tinyWRAPc::SipCallback_OnInviteEvent;
|
||||
*OnMessagingEvent = *tinyWRAPc::SipCallback_OnMessagingEvent;
|
||||
*OnInfoEvent = *tinyWRAPc::SipCallback_OnInfoEvent;
|
||||
*OnOptionsEvent = *tinyWRAPc::SipCallback_OnOptionsEvent;
|
||||
*OnPublicationEvent = *tinyWRAPc::SipCallback_OnPublicationEvent;
|
||||
*OnRegistrationEvent = *tinyWRAPc::SipCallback_OnRegistrationEvent;
|
||||
|
@ -2213,8 +2291,24 @@ package tinyWRAP;
|
|||
*twrap_proxy_plugin_video_producer = *tinyWRAPc::twrap_proxy_plugin_video_producer;
|
||||
*twrap_proxy_plugin_audio_consumer = *tinyWRAPc::twrap_proxy_plugin_audio_consumer;
|
||||
*twrap_proxy_plugin_video_consumer = *tinyWRAPc::twrap_proxy_plugin_video_consumer;
|
||||
*tsip_NONE = *tinyWRAPc::tsip_NONE;
|
||||
*tsip_ACK = *tinyWRAPc::tsip_ACK;
|
||||
*tsip_BYE = *tinyWRAPc::tsip_BYE;
|
||||
*tsip_CANCEL = *tinyWRAPc::tsip_CANCEL;
|
||||
*tsip_INVITE = *tinyWRAPc::tsip_INVITE;
|
||||
*tsip_OPTIONS = *tinyWRAPc::tsip_OPTIONS;
|
||||
*tsip_REGISTER = *tinyWRAPc::tsip_REGISTER;
|
||||
*tsip_SUBSCRIBE = *tinyWRAPc::tsip_SUBSCRIBE;
|
||||
*tsip_NOTIFY = *tinyWRAPc::tsip_NOTIFY;
|
||||
*tsip_REFER = *tinyWRAPc::tsip_REFER;
|
||||
*tsip_INFO = *tinyWRAPc::tsip_INFO;
|
||||
*tsip_UPDATE = *tinyWRAPc::tsip_UPDATE;
|
||||
*tsip_MESSAGE = *tinyWRAPc::tsip_MESSAGE;
|
||||
*tsip_PUBLISH = *tinyWRAPc::tsip_PUBLISH;
|
||||
*tsip_PRACK = *tinyWRAPc::tsip_PRACK;
|
||||
*tsip_event_invite = *tinyWRAPc::tsip_event_invite;
|
||||
*tsip_event_message = *tinyWRAPc::tsip_event_message;
|
||||
*tsip_event_info = *tinyWRAPc::tsip_event_info;
|
||||
*tsip_event_options = *tinyWRAPc::tsip_event_options;
|
||||
*tsip_event_publish = *tinyWRAPc::tsip_event_publish;
|
||||
*tsip_event_register = *tinyWRAPc::tsip_event_register;
|
||||
|
@ -2252,6 +2346,8 @@ package tinyWRAP;
|
|||
*tsip_ao_unpublish = *tinyWRAPc::tsip_ao_unpublish;
|
||||
*tsip_i_message = *tinyWRAPc::tsip_i_message;
|
||||
*tsip_ao_message = *tinyWRAPc::tsip_ao_message;
|
||||
*tsip_i_info = *tinyWRAPc::tsip_i_info;
|
||||
*tsip_ao_info = *tinyWRAPc::tsip_ao_info;
|
||||
*tsip_i_options = *tinyWRAPc::tsip_i_options;
|
||||
*tsip_ao_options = *tinyWRAPc::tsip_ao_options;
|
||||
*tsip_i_newcall = *tinyWRAPc::tsip_i_newcall;
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -131,6 +131,7 @@ class ActionConfig(_object):
|
|||
__swig_destroy__ = _tinyWRAP.delete_ActionConfig
|
||||
__del__ = lambda self : None;
|
||||
def addHeader(self, *args): return _tinyWRAP.ActionConfig_addHeader(self, *args)
|
||||
def addPayload(self, *args): return _tinyWRAP.ActionConfig_addPayload(self, *args)
|
||||
def setResponseLine(self, *args): return _tinyWRAP.ActionConfig_setResponseLine(self, *args)
|
||||
def setMediaString(self, *args): return _tinyWRAP.ActionConfig_setMediaString(self, *args)
|
||||
def setMediaInt(self, *args): return _tinyWRAP.ActionConfig_setMediaInt(self, *args)
|
||||
|
@ -401,6 +402,7 @@ class SipMessage(_object):
|
|||
__swig_destroy__ = _tinyWRAP.delete_SipMessage
|
||||
__del__ = lambda self : None;
|
||||
def isResponse(self): return _tinyWRAP.SipMessage_isResponse(self)
|
||||
def getRequestType(self): return _tinyWRAP.SipMessage_getRequestType(self)
|
||||
def getResponseCode(self): return _tinyWRAP.SipMessage_getResponseCode(self)
|
||||
def getSipHeaderValue(self, *args): return _tinyWRAP.SipMessage_getSipHeaderValue(self, *args)
|
||||
def getSipHeaderParamValue(self, *args): return _tinyWRAP.SipMessage_getSipHeaderParamValue(self, *args)
|
||||
|
@ -490,6 +492,23 @@ class MessagingEvent(SipEvent):
|
|||
MessagingEvent_swigregister = _tinyWRAP.MessagingEvent_swigregister
|
||||
MessagingEvent_swigregister(MessagingEvent)
|
||||
|
||||
class InfoEvent(SipEvent):
|
||||
__swig_setmethods__ = {}
|
||||
for _s in [SipEvent]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
|
||||
__setattr__ = lambda self, name, value: _swig_setattr(self, InfoEvent, name, value)
|
||||
__swig_getmethods__ = {}
|
||||
for _s in [SipEvent]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
|
||||
__getattr__ = lambda self, name: _swig_getattr(self, InfoEvent, name)
|
||||
def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined")
|
||||
__repr__ = _swig_repr
|
||||
__swig_destroy__ = _tinyWRAP.delete_InfoEvent
|
||||
__del__ = lambda self : None;
|
||||
def getType(self): return _tinyWRAP.InfoEvent_getType(self)
|
||||
def getSession(self): return _tinyWRAP.InfoEvent_getSession(self)
|
||||
def takeSessionOwnership(self): return _tinyWRAP.InfoEvent_takeSessionOwnership(self)
|
||||
InfoEvent_swigregister = _tinyWRAP.InfoEvent_swigregister
|
||||
InfoEvent_swigregister(InfoEvent)
|
||||
|
||||
class OptionsEvent(SipEvent):
|
||||
__swig_setmethods__ = {}
|
||||
for _s in [SipEvent]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
|
||||
|
@ -600,6 +619,7 @@ class InviteSession(SipSession):
|
|||
def accept(self, *args): return _tinyWRAP.InviteSession_accept(self, *args)
|
||||
def hangup(self, *args): return _tinyWRAP.InviteSession_hangup(self, *args)
|
||||
def reject(self, *args): return _tinyWRAP.InviteSession_reject(self, *args)
|
||||
def sendInfo(self, *args): return _tinyWRAP.InviteSession_sendInfo(self, *args)
|
||||
def getMediaMgr(self): return _tinyWRAP.InviteSession_getMediaMgr(self)
|
||||
InviteSession_swigregister = _tinyWRAP.InviteSession_swigregister
|
||||
InviteSession_swigregister(InviteSession)
|
||||
|
@ -671,6 +691,26 @@ class MessagingSession(SipSession):
|
|||
MessagingSession_swigregister = _tinyWRAP.MessagingSession_swigregister
|
||||
MessagingSession_swigregister(MessagingSession)
|
||||
|
||||
class InfoSession(SipSession):
|
||||
__swig_setmethods__ = {}
|
||||
for _s in [SipSession]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
|
||||
__setattr__ = lambda self, name, value: _swig_setattr(self, InfoSession, name, value)
|
||||
__swig_getmethods__ = {}
|
||||
for _s in [SipSession]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
|
||||
__getattr__ = lambda self, name: _swig_getattr(self, InfoSession, name)
|
||||
__repr__ = _swig_repr
|
||||
def __init__(self, *args):
|
||||
this = _tinyWRAP.new_InfoSession(*args)
|
||||
try: self.this.append(this)
|
||||
except: self.this = this
|
||||
__swig_destroy__ = _tinyWRAP.delete_InfoSession
|
||||
__del__ = lambda self : None;
|
||||
def send(self, *args): return _tinyWRAP.InfoSession_send(self, *args)
|
||||
def accept(self, *args): return _tinyWRAP.InfoSession_accept(self, *args)
|
||||
def reject(self, *args): return _tinyWRAP.InfoSession_reject(self, *args)
|
||||
InfoSession_swigregister = _tinyWRAP.InfoSession_swigregister
|
||||
InfoSession_swigregister(InfoSession)
|
||||
|
||||
class OptionsSession(SipSession):
|
||||
__swig_setmethods__ = {}
|
||||
for _s in [SipSession]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
|
||||
|
@ -1094,6 +1134,7 @@ class SipCallback(_object):
|
|||
def OnStackEvent(self, *args): return _tinyWRAP.SipCallback_OnStackEvent(self, *args)
|
||||
def OnInviteEvent(self, *args): return _tinyWRAP.SipCallback_OnInviteEvent(self, *args)
|
||||
def OnMessagingEvent(self, *args): return _tinyWRAP.SipCallback_OnMessagingEvent(self, *args)
|
||||
def OnInfoEvent(self, *args): return _tinyWRAP.SipCallback_OnInfoEvent(self, *args)
|
||||
def OnOptionsEvent(self, *args): return _tinyWRAP.SipCallback_OnOptionsEvent(self, *args)
|
||||
def OnPublicationEvent(self, *args): return _tinyWRAP.SipCallback_OnPublicationEvent(self, *args)
|
||||
def OnRegistrationEvent(self, *args): return _tinyWRAP.SipCallback_OnRegistrationEvent(self, *args)
|
||||
|
@ -1214,8 +1255,24 @@ def SipStack_isCodecSupported(*args):
|
|||
return _tinyWRAP.SipStack_isCodecSupported(*args)
|
||||
SipStack_isCodecSupported = _tinyWRAP.SipStack_isCodecSupported
|
||||
|
||||
tsip_NONE = _tinyWRAP.tsip_NONE
|
||||
tsip_ACK = _tinyWRAP.tsip_ACK
|
||||
tsip_BYE = _tinyWRAP.tsip_BYE
|
||||
tsip_CANCEL = _tinyWRAP.tsip_CANCEL
|
||||
tsip_INVITE = _tinyWRAP.tsip_INVITE
|
||||
tsip_OPTIONS = _tinyWRAP.tsip_OPTIONS
|
||||
tsip_REGISTER = _tinyWRAP.tsip_REGISTER
|
||||
tsip_SUBSCRIBE = _tinyWRAP.tsip_SUBSCRIBE
|
||||
tsip_NOTIFY = _tinyWRAP.tsip_NOTIFY
|
||||
tsip_REFER = _tinyWRAP.tsip_REFER
|
||||
tsip_INFO = _tinyWRAP.tsip_INFO
|
||||
tsip_UPDATE = _tinyWRAP.tsip_UPDATE
|
||||
tsip_MESSAGE = _tinyWRAP.tsip_MESSAGE
|
||||
tsip_PUBLISH = _tinyWRAP.tsip_PUBLISH
|
||||
tsip_PRACK = _tinyWRAP.tsip_PRACK
|
||||
tsip_event_invite = _tinyWRAP.tsip_event_invite
|
||||
tsip_event_message = _tinyWRAP.tsip_event_message
|
||||
tsip_event_info = _tinyWRAP.tsip_event_info
|
||||
tsip_event_options = _tinyWRAP.tsip_event_options
|
||||
tsip_event_publish = _tinyWRAP.tsip_event_publish
|
||||
tsip_event_register = _tinyWRAP.tsip_event_register
|
||||
|
@ -1253,6 +1310,8 @@ tsip_i_unpublish = _tinyWRAP.tsip_i_unpublish
|
|||
tsip_ao_unpublish = _tinyWRAP.tsip_ao_unpublish
|
||||
tsip_i_message = _tinyWRAP.tsip_i_message
|
||||
tsip_ao_message = _tinyWRAP.tsip_ao_message
|
||||
tsip_i_info = _tinyWRAP.tsip_i_info
|
||||
tsip_ao_info = _tinyWRAP.tsip_ao_info
|
||||
tsip_i_options = _tinyWRAP.tsip_i_options
|
||||
tsip_ao_options = _tinyWRAP.tsip_ao_options
|
||||
tsip_i_newcall = _tinyWRAP.tsip_i_newcall
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -312,6 +312,7 @@ public:
|
|||
virtual int OnStackEvent(StackEvent const *e);
|
||||
virtual int OnInviteEvent(InviteEvent const *e);
|
||||
virtual int OnMessagingEvent(MessagingEvent const *e);
|
||||
virtual int OnInfoEvent(InfoEvent const *e);
|
||||
virtual int OnOptionsEvent(OptionsEvent const *e);
|
||||
virtual int OnPublicationEvent(PublicationEvent const *e);
|
||||
virtual int OnRegistrationEvent(RegistrationEvent const *e);
|
||||
|
@ -349,7 +350,7 @@ private:
|
|||
return method;
|
||||
}
|
||||
private:
|
||||
mutable swig::SwigVar_PyObject vtable[8];
|
||||
mutable swig::SwigVar_PyObject vtable[9];
|
||||
#endif
|
||||
|
||||
};
|
||||
|
|
|
@ -733,24 +733,24 @@ int session_hangup(tsip_ssession_id_t sid)
|
|||
if((session = session_get_by_sid(ctx->sessions, sid))){
|
||||
switch(session->type){
|
||||
case st_invite:
|
||||
tsip_action_BYE(session->handle,
|
||||
tsip_api_invite_send_bye(session->handle,
|
||||
/* You can add your parameters */
|
||||
TSIP_ACTION_SET_NULL());
|
||||
break;
|
||||
case st_message:
|
||||
break;
|
||||
case st_publish:
|
||||
tsip_action_UNPUBLISH(session->handle,
|
||||
tsip_api_publish_send_unpublish(session->handle,
|
||||
/* You can add your parameters */
|
||||
TSIP_ACTION_SET_NULL());
|
||||
break;
|
||||
case st_register:
|
||||
tsip_action_UNREGISTER(session->handle,
|
||||
tsip_api_register_send_unregister(session->handle,
|
||||
/* You can add your parameters */
|
||||
TSIP_ACTION_SET_NULL());
|
||||
break;
|
||||
case st_subscribe:
|
||||
tsip_action_UNSUBSCRIBE(session->handle,
|
||||
tsip_api_subscribe_send_unsubscribe(session->handle,
|
||||
/* You can add your parameters */
|
||||
TSIP_ACTION_SET_NULL());
|
||||
break;
|
||||
|
|
|
@ -74,9 +74,9 @@ int invite_handle_event(const tsip_event_t *_event)
|
|||
case tsip_i_newcall:
|
||||
{ /* New call */
|
||||
tmedia_type_t media_type = tsip_ssession_get_mediatype(session);
|
||||
tsip_action_ACCEPT(session->handle,
|
||||
tsip_api_common_accept(session->handle,
|
||||
TSIP_ACTION_SET_NULL());
|
||||
/*tsip_action_REJECT(session->handle,
|
||||
/*tsip_api_common_reject(session->handle,
|
||||
TSIP_ACTION_SET_NULL());*/
|
||||
break;
|
||||
}
|
||||
|
@ -152,7 +152,7 @@ tsip_ssession_id_t invite_handle_cmd(cmd_type_t cmd, const opts_L_t* opts)
|
|||
case cmd_audiovideo:
|
||||
{ /* Make Audio/Video call */
|
||||
tsip_action_handle_t* action_config = action_get_config(opts);
|
||||
tsip_action_INVITE(session->handle, (cmd == cmd_audio) ? tmedia_audio : (tmedia_audio|tmedia_video),
|
||||
tsip_api_invite_send_invite(session->handle, (cmd == cmd_audio) ? tmedia_audio : (tmedia_audio|tmedia_video),
|
||||
TSIP_ACTION_SET_CONFIG(action_config),
|
||||
/* Any other TSIP_ACTION_SET_*() macros */
|
||||
TSIP_ACTION_SET_NULL());
|
||||
|
@ -173,7 +173,7 @@ tsip_ssession_id_t invite_handle_cmd(cmd_type_t cmd, const opts_L_t* opts)
|
|||
TSIP_SSESSION_SET_NULL());
|
||||
|
||||
/* Send INVITE */
|
||||
tsip_action_INVITE(session->handle, tmedia_msrp,
|
||||
tsip_api_invite_send_invite(session->handle, tmedia_msrp,
|
||||
TSIP_ACTION_SET_CONFIG(action_config),
|
||||
|
||||
TSIP_ACTION_SET_MEDIA(
|
||||
|
@ -197,7 +197,7 @@ tsip_ssession_id_t invite_handle_cmd(cmd_type_t cmd, const opts_L_t* opts)
|
|||
{
|
||||
const opt_t* opt = opt_get_by_type(opts, opt_event); // existance already checked
|
||||
tsip_action_handle_t* action_config = action_get_config(opts);
|
||||
tsip_action_DTMF(session->handle, atoi(opt->value),
|
||||
tsip_api_invite_send_dtmf(session->handle, atoi(opt->value),
|
||||
TSIP_ACTION_SET_CONFIG(action_config),
|
||||
/* Any other TSIP_ACTION_SET_*() macros */
|
||||
TSIP_ACTION_SET_NULL());
|
||||
|
@ -209,7 +209,7 @@ tsip_ssession_id_t invite_handle_cmd(cmd_type_t cmd, const opts_L_t* opts)
|
|||
{ /* Explict Call Transfer */
|
||||
const opt_t* opt = opt_get_by_type(opts, opt_to); // existance already checked
|
||||
tsip_action_handle_t* action_config = action_get_config(opts);
|
||||
tsip_action_ECT(session->handle, opt? opt->value : "sip:anonymous@example.com",
|
||||
tsip_api_invite_send_ect(session->handle, opt? opt->value : "sip:anonymous@example.com",
|
||||
TSIP_ACTION_SET_CONFIG(action_config),
|
||||
/* Any other TSIP_ACTION_SET_*() macros */
|
||||
TSIP_ACTION_SET_NULL());
|
||||
|
@ -220,7 +220,7 @@ tsip_ssession_id_t invite_handle_cmd(cmd_type_t cmd, const opts_L_t* opts)
|
|||
case cmd_hold:
|
||||
{ /* Put the session on hold state */
|
||||
tsip_action_handle_t* action_config = action_get_config(opts);
|
||||
tsip_action_HOLD(session->handle, tmedia_all,
|
||||
tsip_api_invite_send_hold(session->handle, tmedia_all,
|
||||
TSIP_ACTION_SET_CONFIG(action_config),
|
||||
/* Any other TSIP_ACTION_SET_*() macros */
|
||||
TSIP_ACTION_SET_NULL());
|
||||
|
@ -230,7 +230,7 @@ tsip_ssession_id_t invite_handle_cmd(cmd_type_t cmd, const opts_L_t* opts)
|
|||
case cmd_resume:
|
||||
{ /* Put the session on hold state */
|
||||
tsip_action_handle_t* action_config = action_get_config(opts);
|
||||
tsip_action_RESUME(session->handle, tmedia_all,
|
||||
tsip_api_invite_send_resume(session->handle, tmedia_all,
|
||||
TSIP_ACTION_SET_CONFIG(action_config),
|
||||
/* Any other TSIP_ACTION_SET_*() macros */
|
||||
TSIP_ACTION_SET_NULL());
|
||||
|
|
|
@ -49,9 +49,9 @@ int message_handle_event(const tsip_event_t *_event)
|
|||
}
|
||||
else{
|
||||
/* it's a "server-side-session" (incoming MESSAGE) */
|
||||
session_t* _session;
|
||||
if((_session = session_server_create(st_message, _event->ss)) && (session = _session)){
|
||||
tsk_list_push_back_data(ctx->sessions, (void**)&_session);
|
||||
session_t* _session;
|
||||
if((_session = session_server_create(st_message, _event->ss)) && (session = _session)){
|
||||
tsk_list_push_back_data(ctx->sessions, (void**)&_session);
|
||||
}
|
||||
else{
|
||||
TSK_DEBUG_ERROR("Failed to create \"sever-side-session\".");
|
||||
|
@ -84,13 +84,13 @@ int message_handle_event(const tsip_event_t *_event)
|
|||
}
|
||||
/* accept() the MESSAGE to terminate the dialog */
|
||||
if(tsk_striequals("plain/text", content_type) || tsk_striequals("text/html", content_type)){
|
||||
tsip_action_ACCEPT(session->handle,
|
||||
tsip_api_common_accept(session->handle,
|
||||
TSIP_ACTION_SET_HEADER("Info", "I've accept()ed your message"),// just for test
|
||||
TSIP_ACTION_SET_NULL());
|
||||
}
|
||||
/* reject() the MESSAGE to terminate the dialog */
|
||||
else{
|
||||
tsip_action_REJECT(session->handle,
|
||||
tsip_api_common_reject(session->handle,
|
||||
TSIP_ACTION_SET_HEADER("Info", "I've reject()ed your message"),// just for test
|
||||
TSIP_ACTION_SET_HEADER("In-Reply-To", "apb03a0s09dkjdfglkj49112"),// just for test
|
||||
TSIP_ACTION_SET_NULL());
|
||||
|
@ -126,7 +126,7 @@ tsip_ssession_id_t message_handle_cmd(cmd_type_t cmd, const opts_L_t* opts)
|
|||
case cmd_message:
|
||||
{ /* Send SIP MESSAGE */
|
||||
tsip_action_handle_t* action_config = action_get_config(opts);
|
||||
tsip_action_MESSAGE(session->handle,
|
||||
tsip_api_message_send_message(session->handle,
|
||||
TSIP_ACTION_SET_CONFIG(action_config),
|
||||
/* Any other TSIP_ACTION_SET_*() macros */
|
||||
TSIP_ACTION_SET_NULL());
|
||||
|
@ -184,7 +184,7 @@ tsip_ssession_id_t message_handle_cmd(cmd_type_t cmd, const opts_L_t* opts)
|
|||
}
|
||||
|
||||
/* Send the message */
|
||||
tsip_action_MESSAGE(session->handle,
|
||||
tsip_api_message_send_message(session->handle,
|
||||
/* TSIP_ACTION_SET_HEADER("Content-Type", "application/vnd.3gpp.sms"), */
|
||||
/* TSIP_ACTION_SET_HEADER("Transfer-Encoding", "binary"),*/
|
||||
TSIP_ACTION_SET_PAYLOAD(binary_pay->data, binary_pay->size),
|
||||
|
|
|
@ -71,7 +71,7 @@ tsip_ssession_id_t options_handle_cmd(cmd_type_t cmd, const opts_L_t* opts)
|
|||
case cmd_options:
|
||||
{ /* Send SIP OPTIONS */
|
||||
tsip_action_handle_t* action_config = action_get_config(opts);
|
||||
tsip_action_OPTIONS(session->handle,
|
||||
tsip_api_options_send_options(session->handle,
|
||||
TSIP_ACTION_SET_CONFIG(action_config),
|
||||
/* Any other TSIP_ACTION_SET_*() macros */
|
||||
TSIP_ACTION_SET_NULL());
|
||||
|
|
|
@ -100,7 +100,7 @@ tsip_ssession_id_t publish_handle_cmd(cmd_type_t cmd, const opts_L_t* opts)
|
|||
case cmd_publish:
|
||||
{ /* Send SIP PUBLISH */
|
||||
tsip_action_handle_t* action_config = action_get_config(opts);
|
||||
tsip_action_PUBLISH(session->handle,
|
||||
tsip_api_publish_send_publish(session->handle,
|
||||
TSIP_ACTION_SET_CONFIG(action_config),
|
||||
/* Any other TSIP_ACTION_SET_*() macros */
|
||||
TSIP_ACTION_SET_NULL());
|
||||
|
|
|
@ -104,7 +104,7 @@ tsip_ssession_id_t register_handle_cmd(cmd_type_t cmd, const opts_L_t* opts)
|
|||
case cmd_register:
|
||||
{ /* Send SIP REGISTER */
|
||||
tsip_action_handle_t* action_config = action_get_config(opts);
|
||||
tsip_action_REGISTER(session->handle,
|
||||
tsip_api_register_send_register(session->handle,
|
||||
TSIP_ACTION_SET_CONFIG(action_config),
|
||||
/* Any other TSIP_ACTION_SET_*() macros */
|
||||
TSIP_ACTION_SET_NULL());
|
||||
|
|
|
@ -112,7 +112,7 @@ tsip_ssession_id_t subscribe_handle_cmd(cmd_type_t cmd, const opts_L_t* opts)
|
|||
case cmd_subscribe:
|
||||
{ /* Send SIP SUBSCRIBE */
|
||||
tsip_action_handle_t* action_config = action_get_config(opts);
|
||||
tsip_action_SUBSCRIBE(session->handle,
|
||||
tsip_api_subscribe_send_subscribe(session->handle,
|
||||
TSIP_ACTION_SET_CONFIG(action_config),
|
||||
/* Any other TSIP_ACTION_SET_*() macros */
|
||||
TSIP_ACTION_SET_NULL());
|
||||
|
|
|
@ -16,6 +16,7 @@ OBJS = \
|
|||
|
||||
### api
|
||||
OBJS += src/api/tsip_api_common.o\
|
||||
src/api/tsip_api_info.o\
|
||||
src/api/tsip_api_invite.o\
|
||||
src/api/tsip_api_message.o\
|
||||
src/api/tsip_api_options.o\
|
||||
|
@ -30,6 +31,7 @@ OBJS += src/authentication/tsip_challenge.o\
|
|||
|
||||
### dialogs
|
||||
OBJS += src/dialogs/tsip_dialog.o\
|
||||
src/dialogs/tsip_dialog_info.o\
|
||||
src/dialogs/tsip_dialog_invite.o\
|
||||
src/dialogs/tsip_dialog_invite.cdiv.o\
|
||||
src/dialogs/tsip_dialog_invite.client.o\
|
||||
|
|
|
@ -59,6 +59,7 @@
|
|||
#include "tinysip/api/tsip_api_common.h"
|
||||
#include "tinysip/api/tsip_api_invite.h"
|
||||
#include "tinysip/api/tsip_api_message.h"
|
||||
#include "tinysip/api/tsip_api_info.h"
|
||||
#include "tinysip/api/tsip_api_options.h"
|
||||
#include "tinysip/api/tsip_api_publish.h"
|
||||
#include "tinysip/api/tsip_api_register.h"
|
||||
|
|
|
@ -36,9 +36,16 @@
|
|||
|
||||
TSIP_BEGIN_DECLS
|
||||
|
||||
TINYSIP_API int tsip_action_REJECT(const tsip_ssession_handle_t *ss, ...);
|
||||
TINYSIP_API int tsip_action_HANGUP(const tsip_ssession_handle_t *ss, ...);
|
||||
TINYSIP_API int tsip_action_ACCEPT(const tsip_ssession_handle_t *ss, ...);
|
||||
TINYSIP_API int tsip_api_common_reject(const tsip_ssession_handle_t *ss, ...);
|
||||
TINYSIP_API int tsip_api_common_hangup(const tsip_ssession_handle_t *ss, ...);
|
||||
TINYSIP_API int tsip_api_common_accept(const tsip_ssession_handle_t *ss, ...);
|
||||
|
||||
|
||||
#if 1 // Backward Compatibility
|
||||
# define tsip_action_REJECT tsip_api_common_reject
|
||||
# define tsip_action_HANGUP tsip_api_common_hangup
|
||||
# define tsip_action_ACCEPT tsip_api_common_accept
|
||||
#endif
|
||||
|
||||
TSIP_END_DECLS
|
||||
|
||||
|
|
|
@ -0,0 +1,64 @@
|
|||
/* Copyright (C) 2011 Doubango Telecom <http://www.doubango.org>
|
||||
* Copyright (C) 2011 Mamadou Diop.
|
||||
*
|
||||
* Contact: Mamadou Diop <diopmamadou(at)doubango(dot)org>
|
||||
*
|
||||
* This file is part of Open Source Doubango Framework.
|
||||
*
|
||||
* DOUBANGO is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* DOUBANGO is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with DOUBANGO.
|
||||
*
|
||||
*/
|
||||
|
||||
/**@file tsip_api_info.h
|
||||
* @brief Public info (INFO) functions.
|
||||
*
|
||||
* @author Mamadou Diop <diopmamadou(at)doubango(dot)org>
|
||||
*
|
||||
|
||||
*/
|
||||
#ifndef TINYSIP_TSIP_INFO_H
|
||||
#define TINYSIP_TSIP_INFO_H
|
||||
|
||||
#include "tinysip_config.h"
|
||||
|
||||
#include "tinysip/tsip_event.h"
|
||||
|
||||
TSIP_BEGIN_DECLS
|
||||
|
||||
#define TSIP_INFO_EVENT(self) ((tsip_info_event_t*)(self))
|
||||
|
||||
typedef enum tsip_info_event_type_e
|
||||
{
|
||||
tsip_i_info,
|
||||
tsip_ao_info,
|
||||
}
|
||||
tsip_info_event_type_t;
|
||||
|
||||
typedef struct tsip_info_event_e
|
||||
{
|
||||
TSIP_DECLARE_EVENT;
|
||||
|
||||
tsip_info_event_type_t type;
|
||||
}
|
||||
tsip_info_event_t;
|
||||
|
||||
int tsip_info_event_signal(tsip_info_event_type_t type, tsip_ssession_handle_t* ss, short status_code, const char *phrase, const struct tsip_message_s* sipmessage);
|
||||
|
||||
TINYSIP_API int tsip_api_info_send_info(const tsip_ssession_handle_t *ss, ...);
|
||||
|
||||
TINYSIP_GEXTERN const tsk_object_def_t *tsip_info_event_def_t;
|
||||
|
||||
TSIP_END_DECLS
|
||||
|
||||
#endif /* TINYSIP_TSIP_INFO_H */
|
|
@ -92,18 +92,30 @@ tsip_invite_event_t;
|
|||
|
||||
int tsip_invite_event_signal(tsip_invite_event_type_t type, tsip_ssession_handle_t* ss, short status_code, const char *phrase, const struct tsip_message_s* sipmessage);
|
||||
|
||||
TINYSIP_API int tsip_action_INVITE(const tsip_ssession_handle_t *ss, tmedia_type_t type, ...);
|
||||
TINYSIP_API int tsip_action_HOLD(const tsip_ssession_handle_t *ss, tmedia_type_t type, ...);
|
||||
TINYSIP_API int tsip_action_RESUME(const tsip_ssession_handle_t *ss, tmedia_type_t type, ...);
|
||||
TINYSIP_API int tsip_action_LARGE_MESSAGE(const tsip_ssession_handle_t *ss, ...);
|
||||
TINYSIP_API int tsip_action_ECT(const tsip_ssession_handle_t *ss, const char* toUri, ...);
|
||||
TINYSIP_API int tsip_action_SOS(const tsip_ssession_handle_t *ss, ...);
|
||||
TINYSIP_API int tsip_action_DTMF(const tsip_ssession_handle_t *ss, int event, ...);
|
||||
TINYSIP_API int tsip_action_BYE(const tsip_ssession_handle_t *ss, ...);
|
||||
|
||||
TINYSIP_API int tsip_api_invite_send_invite(const tsip_ssession_handle_t *ss, tmedia_type_t type, ...);
|
||||
TINYSIP_API int tsip_api_invite_send_info(const tsip_ssession_handle_t *ss, ...);
|
||||
TINYSIP_API int tsip_api_invite_send_hold(const tsip_ssession_handle_t *ss, tmedia_type_t type, ...);
|
||||
TINYSIP_API int tsip_api_invite_send_resume(const tsip_ssession_handle_t *ss, tmedia_type_t type, ...);
|
||||
TINYSIP_API int tsip_api_invite_send_large_message(const tsip_ssession_handle_t *ss, ...);
|
||||
TINYSIP_API int tsip_api_invite_send_ect(const tsip_ssession_handle_t *ss, const char* toUri, ...);
|
||||
TINYSIP_API int tsip_api_invite_send_sos(const tsip_ssession_handle_t *ss, ...);
|
||||
TINYSIP_API int tsip_api_invite_send_dtmf(const tsip_ssession_handle_t *ss, int event, ...);
|
||||
TINYSIP_API int tsip_api_invite_send_bye(const tsip_ssession_handle_t *ss, ...);
|
||||
|
||||
TINYSIP_GEXTERN const tsk_object_def_t *tsip_invite_event_def_t;
|
||||
|
||||
#if 1 // Backward Compatibility
|
||||
# define tsip_action_INVITE tsip_api_invite_send_invite
|
||||
# define tsip_action_HOLD tsip_api_invite_send_hold
|
||||
# define tsip_action_RESUME tsip_api_invite_send_resume
|
||||
# define tsip_action_LARGE_MESSAGE tsip_api_invite_send_large_message
|
||||
# define tsip_action_ECT tsip_api_invite_send_ect
|
||||
# define tsip_action_SOS tsip_api_invite_send_sos
|
||||
# define tsip_action_DTMF tsip_api_invite_send_dtmf
|
||||
# define tsip_action_BYE tsip_api_invite_send_bye
|
||||
#endif
|
||||
|
||||
|
||||
TSIP_END_DECLS
|
||||
|
||||
#endif /* TINYSIP_TSIP_INVITE_H */
|
||||
|
|
|
@ -55,10 +55,14 @@ tsip_message_event_t;
|
|||
|
||||
int tsip_message_event_signal(tsip_message_event_type_t type, tsip_ssession_handle_t* ss, short status_code, const char *phrase, const struct tsip_message_s* sipmessage);
|
||||
|
||||
TINYSIP_API int tsip_action_MESSAGE(const tsip_ssession_handle_t *ss, ...);
|
||||
TINYSIP_API int tsip_api_message_send_message(const tsip_ssession_handle_t *ss, ...);
|
||||
|
||||
TINYSIP_GEXTERN const tsk_object_def_t *tsip_message_event_def_t;
|
||||
|
||||
#if 1 // Backward Compatibility
|
||||
# define tsip_action_MESSAGE tsip_api_message_send_message
|
||||
#endif
|
||||
|
||||
TSIP_END_DECLS
|
||||
|
||||
#endif /* TINYSIP_TSIP_MESSAGE_H */
|
||||
|
|
|
@ -57,10 +57,14 @@ tsip_options_event_t;
|
|||
|
||||
int tsip_options_event_signal(tsip_options_event_type_t type, tsip_ssession_handle_t* ss, short status_code, const char *phrase, const struct tsip_message_s* sipmessage);
|
||||
|
||||
TINYSIP_API int tsip_action_OPTIONS(const tsip_ssession_handle_t *ss, ...);
|
||||
TINYSIP_API int tsip_api_options_send_options(const tsip_ssession_handle_t *ss, ...);
|
||||
|
||||
TINYSIP_GEXTERN const tsk_object_def_t *tsip_options_event_def_t;
|
||||
|
||||
#if 1 // Backward Compatibility
|
||||
# define tsip_action_OPTIONS tsip_api_options_send_options
|
||||
#endif
|
||||
|
||||
TSIP_END_DECLS
|
||||
|
||||
#endif /* TINYSIP_TSIP_OPTIONS_H */
|
||||
|
|
|
@ -58,11 +58,16 @@ tsip_publish_event_t;
|
|||
|
||||
int tsip_publish_event_signal(tsip_publish_event_type_t type, tsip_ssession_handle_t* ss, short status_code, const char *phrase, const struct tsip_message_s* sipmessage);
|
||||
|
||||
TINYSIP_API int tsip_action_PUBLISH(const tsip_ssession_handle_t *ss, ...);
|
||||
TINYSIP_API int tsip_action_UNPUBLISH(const tsip_ssession_handle_t *ss, ...);
|
||||
TINYSIP_API int tsip_api_publish_send_publish(const tsip_ssession_handle_t *ss, ...);
|
||||
TINYSIP_API int tsip_api_publish_send_unpublish(const tsip_ssession_handle_t *ss, ...);
|
||||
|
||||
TINYSIP_GEXTERN const tsk_object_def_t *tsip_publish_event_def_t;
|
||||
|
||||
#if 1 // Backward Compatibility
|
||||
# define tsip_action_PUBLISH tsip_api_publish_send_publish
|
||||
# define tsip_action_UNPUBLISH tsip_api_publish_send_unpublish
|
||||
#endif
|
||||
|
||||
TSIP_END_DECLS
|
||||
|
||||
#endif /* TINYSIP_TSIP_PUBLISH_H */
|
||||
|
|
|
@ -60,11 +60,16 @@ tsip_register_event_t;
|
|||
|
||||
int tsip_register_event_signal(tsip_register_event_type_t type, tsip_ssession_t* ss, short status_code, const char *phrase, const struct tsip_message_s* sipmessage);
|
||||
|
||||
TINYSIP_API int tsip_action_REGISTER(const tsip_ssession_handle_t *ss, ...);
|
||||
TINYSIP_API int tsip_action_UNREGISTER(const tsip_ssession_handle_t *ss, ...);
|
||||
TINYSIP_API int tsip_api_register_send_register(const tsip_ssession_handle_t *ss, ...);
|
||||
TINYSIP_API int tsip_api_register_send_unregister(const tsip_ssession_handle_t *ss, ...);
|
||||
|
||||
TINYSIP_GEXTERN const tsk_object_def_t *tsip_register_event_def_t;
|
||||
|
||||
#if 1 // Backward Compatibility
|
||||
# define tsip_action_REGISTER tsip_api_register_send_register
|
||||
# define tsip_action_UNREGISTER tsip_api_register_send_unregister
|
||||
#endif
|
||||
|
||||
TSIP_END_DECLS
|
||||
|
||||
#endif /* TINYSIP_TSIP_REGISTER_H */
|
||||
|
|
|
@ -61,11 +61,16 @@ tsip_subscribe_event_t;
|
|||
|
||||
int tsip_subscribe_event_signal(tsip_subscribe_event_type_t type, tsip_ssession_t* ss, short status_code, const char *phrase, const struct tsip_message_s* sipmessage);
|
||||
|
||||
TINYSIP_API int tsip_action_SUBSCRIBE(const tsip_ssession_handle_t *ss, ...);
|
||||
TINYSIP_API int tsip_action_UNSUBSCRIBE(const tsip_ssession_handle_t *ss, ...);
|
||||
TINYSIP_API int tsip_api_subscribe_send_subscribe(const tsip_ssession_handle_t *ss, ...);
|
||||
TINYSIP_API int tsip_api_subscribe_send_unsubscribe(const tsip_ssession_handle_t *ss, ...);
|
||||
|
||||
TINYSIP_GEXTERN const tsk_object_def_t *tsip_subscribe_event_def_t;
|
||||
|
||||
#if 1 // Backward Compatibility
|
||||
# define tsip_action_SUBSCRIBE tsip_api_subscribe_send_subscribe
|
||||
# define tsip_action_UNSUBSCRIBE tsip_api_subscribe_send_unsubscribe
|
||||
#endif
|
||||
|
||||
TSIP_END_DECLS
|
||||
|
||||
#endif /* TINYSIP_TSIP_SUBSCRIBE_H */
|
||||
|
|
|
@ -85,6 +85,7 @@ typedef enum tsip_dialog_type_e
|
|||
tsip_dialog_unknown,
|
||||
tsip_dialog_INVITE,
|
||||
tsip_dialog_MESSAGE,
|
||||
tsip_dialog_INFO,
|
||||
tsip_dialog_OPTIONS,
|
||||
tsip_dialog_PUBLISH,
|
||||
tsip_dialog_REGISTER,
|
||||
|
|
|
@ -0,0 +1,57 @@
|
|||
/* Copyright (C) 2011 Doubango Telecom <http://www.doubango.org>
|
||||
* Copyright (C) 2011 Mamadou Diop.
|
||||
*
|
||||
* Contact: Mamadou Diop <diopmamadou(at)doubango(dot)org>
|
||||
*
|
||||
* This file is part of Open Source Doubango Framework.
|
||||
*
|
||||
* DOUBANGO is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* DOUBANGO is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with DOUBANGO.
|
||||
*
|
||||
*/
|
||||
|
||||
/**@file tsip_dialog_info.h
|
||||
* @brief SIP dialog INFO.
|
||||
*
|
||||
* @author Mamadou Diop <diopmamadou(at)doubango.org>
|
||||
*
|
||||
|
||||
*/
|
||||
#ifndef TINYSIP_DIALOG_INFO_H
|
||||
#define TINYSIP_DIALOG_INFO_H
|
||||
|
||||
#include "tinysip_config.h"
|
||||
#include "tinysip/dialogs/tsip_dialog.h"
|
||||
|
||||
TSIP_BEGIN_DECLS
|
||||
|
||||
/* Forward declaration */
|
||||
struct tsip_message_s;
|
||||
|
||||
#define TSIP_DIALOG_INFO(self) ((tsip_dialog_info_t*)(self))
|
||||
|
||||
typedef struct tsip_dialog_info
|
||||
{
|
||||
TSIP_DECLARE_DIALOG;
|
||||
/**< Last incoming message. */
|
||||
struct tsip_message_s* last_iMessage;
|
||||
}
|
||||
tsip_dialog_info_t;
|
||||
|
||||
tsip_dialog_info_t* tsip_dialog_info_create(const tsip_ssession_handle_t* ss);
|
||||
|
||||
TINYSIP_GEXTERN const tsk_object_def_t *tsip_dialog_info_def_t;
|
||||
|
||||
TSIP_END_DECLS
|
||||
|
||||
#endif /* TINYSIP_DIALOG_INFO_H */
|
|
@ -48,7 +48,8 @@ typedef enum _fsm_action_e
|
|||
_fsm_action_oCANCEL = tsip_atype_cancel,
|
||||
_fsm_action_oHold = tsip_atype_hold,
|
||||
_fsm_action_oResume = tsip_atype_resume,
|
||||
_fdm_action_oREFER = tsip_atype_ect,
|
||||
_fsm_action_oREFER = tsip_atype_ect,
|
||||
_fsm_action_oINFO = tsip_atype_info_send,
|
||||
_fsm_action_oBYE = tsip_atype_hangup,
|
||||
_fsm_action_oShutdown = tsip_atype_shutdown,
|
||||
|
||||
|
@ -64,6 +65,7 @@ typedef enum _fsm_action_e
|
|||
_fsm_action_oOPTIONS,
|
||||
_fsm_action_iBYE,
|
||||
_fsm_action_iREFER,
|
||||
_fsm_action_iINFO,
|
||||
|
||||
_fsm_action_timer100rel,
|
||||
_fsm_action_timerRefresh,
|
||||
|
|
|
@ -65,6 +65,9 @@ typedef enum tsip_action_type_e
|
|||
/* === MESSAGE === */
|
||||
tsip_atype_message_send, /**< Sends SIP MESSAGE request */
|
||||
|
||||
/* === INFO === */
|
||||
tsip_atype_info_send, /**< Sends SIP INFO request */
|
||||
|
||||
/* === PUBLISH === */
|
||||
tsip_atype_publish, /**< Sends SIP PUBLISH request */
|
||||
//! Unpublish by sending SIP PUBLISH request with expires value equals to zero
|
||||
|
|
|
@ -42,6 +42,7 @@ typedef enum tsip_event_type_e
|
|||
{
|
||||
tsip_event_invite,
|
||||
tsip_event_message,
|
||||
tsip_event_info,
|
||||
tsip_event_options,
|
||||
tsip_event_publish,
|
||||
tsip_event_register,
|
||||
|
|
|
@ -113,6 +113,7 @@ typedef enum tsip_message_type_e
|
|||
}
|
||||
tsip_message_type_t;
|
||||
|
||||
// SWIG
|
||||
typedef enum tsip_request_type_e
|
||||
{
|
||||
tsip_NONE = 0,
|
||||
|
|
|
@ -37,11 +37,11 @@
|
|||
/* Internal functions */
|
||||
extern tsip_action_t* _tsip_action_create(tsip_action_type_t type, va_list* app);
|
||||
/* Local functions */
|
||||
int _tsip_action_ANY(const tsip_ssession_handle_t *ss, tsip_action_type_t type, va_list* app);
|
||||
int _tsip_api_common_any(const tsip_ssession_handle_t *ss, tsip_action_type_t type, va_list* app);
|
||||
|
||||
/* internal function used to execute any user action
|
||||
* can only handle session with dialogs */
|
||||
int _tsip_action_ANY(const tsip_ssession_handle_t *ss, tsip_action_type_t type, va_list* app)
|
||||
int _tsip_api_common_any(const tsip_ssession_handle_t *ss, tsip_action_type_t type, va_list* app)
|
||||
{
|
||||
int ret = -1;
|
||||
tsip_action_t* action;
|
||||
|
@ -74,13 +74,13 @@ int _tsip_action_ANY(const tsip_ssession_handle_t *ss, tsip_action_type_t type,
|
|||
* MUST always ends with @ref TSIP_ACTION_SET_NULL().
|
||||
* @retval Zero if succeed and non-zero error code otherwise.
|
||||
*/
|
||||
int tsip_action_REJECT(const tsip_ssession_handle_t *ss, ...)
|
||||
int tsip_api_common_reject(const tsip_ssession_handle_t *ss, ...)
|
||||
{
|
||||
int ret = -1;
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, ss);
|
||||
if((ret = _tsip_action_ANY(ss, tsip_atype_reject, &ap))){
|
||||
if((ret = _tsip_api_common_any(ss, tsip_atype_reject, &ap))){
|
||||
TSK_DEBUG_ERROR("Reject() failed.");
|
||||
}
|
||||
va_end(ap);
|
||||
|
@ -96,13 +96,13 @@ int tsip_action_REJECT(const tsip_ssession_handle_t *ss, ...)
|
|||
* MUST always ends with @ref TSIP_ACTION_SET_NULL().
|
||||
* @retval Zero if succeed and non-zero error code otherwise.
|
||||
*/
|
||||
int tsip_action_HANGUP(const tsip_ssession_handle_t *ss, ...)
|
||||
int tsip_api_common_hangup(const tsip_ssession_handle_t *ss, ...)
|
||||
{
|
||||
int ret = -1;
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, ss);
|
||||
if((ret = _tsip_action_ANY(ss, tsip_atype_hangup, &ap))){
|
||||
if((ret = _tsip_api_common_any(ss, tsip_atype_hangup, &ap))){
|
||||
TSK_DEBUG_ERROR("Hang-up() failed.");
|
||||
}
|
||||
va_end(ap);
|
||||
|
@ -117,13 +117,13 @@ int tsip_action_HANGUP(const tsip_ssession_handle_t *ss, ...)
|
|||
* MUST always ends with @ref TSIP_ACTION_SET_NULL().
|
||||
* @retval Zero if succeed and non-zero error code otherwise.
|
||||
*/
|
||||
int tsip_action_ACCEPT(const tsip_ssession_handle_t *ss, ...)
|
||||
int tsip_api_common_accept(const tsip_ssession_handle_t *ss, ...)
|
||||
{
|
||||
int ret = -1;
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, ss);
|
||||
if((ret = _tsip_action_ANY(ss, tsip_atype_accept, &ap))){
|
||||
if((ret = _tsip_api_common_any(ss, tsip_atype_accept, &ap))){
|
||||
TSK_DEBUG_ERROR("Accept() failed.");
|
||||
}
|
||||
va_end(ap);
|
||||
|
|
|
@ -0,0 +1,134 @@
|
|||
/* Copyright (C) 2011 Doubango Telecom <http://www.doubango.org>
|
||||
* Copyright (C) 2011 Mamadou Diop.
|
||||
*
|
||||
* Contact: Mamadou Diop <diopmamadou(at)doubango(dot)org>
|
||||
*
|
||||
* This file is part of Open Source Doubango Framework.
|
||||
*
|
||||
* DOUBANGO is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* DOUBANGO is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with DOUBANGO.
|
||||
*
|
||||
*/
|
||||
|
||||
/**@file tsip_api_info.c
|
||||
* @brief Public short messaging (MESSAGE) functions.
|
||||
*
|
||||
* @author Mamadou Diop <diopmamadou(at)doubango.org>
|
||||
*
|
||||
|
||||
*/
|
||||
#include "tinysip/api/tsip_api_info.h"
|
||||
|
||||
#include "tinysip/dialogs/tsip_dialog_layer.h"
|
||||
#include "tinysip/dialogs/tsip_dialog_message.h"
|
||||
|
||||
#include "tsip.h"
|
||||
|
||||
#include "tsk_runnable.h"
|
||||
#include "tsk_debug.h"
|
||||
|
||||
#define TSIP_INFO_EVENT_CREATE( type) tsk_object_new(tsip_info_event_def_t, type)
|
||||
|
||||
extern tsip_action_t* _tsip_action_create(tsip_action_type_t type, va_list* app);
|
||||
|
||||
int tsip_info_event_signal(tsip_info_event_type_t type, tsip_ssession_handle_t* ss, short status_code, const char *phrase, const tsip_message_t* sipmessage)
|
||||
{
|
||||
tsip_info_event_t* sipevent = TSIP_INFO_EVENT_CREATE(type);
|
||||
tsip_event_init(TSIP_EVENT(sipevent), ss, status_code, phrase, sipmessage, tsip_event_info);
|
||||
|
||||
TSK_RUNNABLE_ENQUEUE_OBJECT(TSK_RUNNABLE(TSIP_SSESSION(ss)->stack), sipevent);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int tsip_api_info_send_info(const tsip_ssession_handle_t *ss, ...)
|
||||
{
|
||||
const tsip_ssession_t* _ss;
|
||||
va_list ap;
|
||||
tsip_action_t* action;
|
||||
tsip_dialog_t* dialog;
|
||||
int ret = -1;
|
||||
|
||||
if(!(_ss = ss) || !_ss->stack){
|
||||
TSK_DEBUG_ERROR("Invalid parameter.");
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Checks if the stack has been started */
|
||||
if(!TSK_RUNNABLE(_ss->stack)->started){
|
||||
TSK_DEBUG_ERROR("Stack not started.");
|
||||
return -2;
|
||||
}
|
||||
|
||||
/* action */
|
||||
va_start(ap, ss);
|
||||
if((action = _tsip_action_create(tsip_atype_info_send, &ap))){
|
||||
if(!(dialog = tsip_dialog_layer_find_by_ss(_ss->stack->layer_dialog, ss))){
|
||||
dialog = tsip_dialog_layer_new(_ss->stack->layer_dialog, tsip_dialog_INFO, ss);
|
||||
}
|
||||
ret = tsip_dialog_fsm_act(dialog, action->type, tsk_null, action);
|
||||
|
||||
tsk_object_unref(dialog);
|
||||
TSK_OBJECT_SAFE_FREE(action);
|
||||
}
|
||||
va_end(ap);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//========================================================
|
||||
// SIP MESSAGE event object definition
|
||||
//
|
||||
static tsk_object_t* tsip_info_event_ctor(tsk_object_t * self, va_list * app)
|
||||
{
|
||||
tsip_info_event_t *sipevent = self;
|
||||
if(sipevent){
|
||||
sipevent->type = va_arg(*app, tsip_info_event_type_t);
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
static tsk_object_t* tsip_info_event_dtor(tsk_object_t * self)
|
||||
{
|
||||
tsip_info_event_t *sipevent = self;
|
||||
if(sipevent){
|
||||
tsip_event_deinit(TSIP_EVENT(sipevent));
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
static int tsip_info_event_cmp(const tsk_object_t *obj1, const tsk_object_t *obj2)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
static const tsk_object_def_t tsip_info_event_def_s =
|
||||
{
|
||||
sizeof(tsip_info_event_t),
|
||||
tsip_info_event_ctor,
|
||||
tsip_info_event_dtor,
|
||||
tsip_info_event_cmp,
|
||||
};
|
||||
const tsk_object_def_t *tsip_info_event_def_t = &tsip_info_event_def_s;
|
|
@ -41,7 +41,7 @@
|
|||
#define TSIP_INVITE_EVENT_CREATE( type) tsk_object_new(tsip_invite_event_def_t, type)
|
||||
|
||||
extern tsip_action_t* _tsip_action_create(tsip_action_type_t type, va_list* app);
|
||||
extern int _tsip_action_ANY(const tsip_ssession_handle_t *ss, tsip_action_type_t type, va_list* app);
|
||||
extern int _tsip_api_common_any(const tsip_ssession_handle_t *ss, tsip_action_type_t type, va_list* app);
|
||||
|
||||
int tsip_invite_event_signal(tsip_invite_event_type_t type, tsip_ssession_handle_t* ss, short status_code, const char *phrase, const tsip_message_t* sipmessage)
|
||||
{
|
||||
|
@ -53,7 +53,7 @@ int tsip_invite_event_signal(tsip_invite_event_type_t type, tsip_ssession_handle
|
|||
return 0;
|
||||
}
|
||||
|
||||
int tsip_action_INVITE(const tsip_ssession_handle_t *ss, tmedia_type_t type, ...)
|
||||
int tsip_api_invite_send_invite(const tsip_ssession_handle_t *ss, tmedia_type_t type, ...)
|
||||
{
|
||||
const tsip_ssession_t* _ss;
|
||||
va_list ap;
|
||||
|
@ -96,7 +96,38 @@ int tsip_action_INVITE(const tsip_ssession_handle_t *ss, tmedia_type_t type, ...
|
|||
return ret;
|
||||
}
|
||||
|
||||
int tsip_action_HOLD(const tsip_ssession_handle_t *ss, tmedia_type_t type, ...)
|
||||
int tsip_api_invite_send_info(const tsip_ssession_handle_t *ss, ...)
|
||||
{
|
||||
int ret = -1;
|
||||
tsip_action_t* action;
|
||||
const tsip_ssession_t* _ss;
|
||||
va_list ap;
|
||||
|
||||
/* Checks for validity */
|
||||
if(!(_ss = ss) || !_ss->stack){
|
||||
TSK_DEBUG_ERROR("Invalid parameter.");
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Checks if the stack has been started */
|
||||
if(!TSK_RUNNABLE(_ss->stack)->started){
|
||||
TSK_DEBUG_ERROR("Stack not started.");
|
||||
return -2;
|
||||
}
|
||||
|
||||
va_start(ap, ss);
|
||||
/* execute action */
|
||||
if((action = _tsip_action_create(tsip_atype_info_send, &ap))){
|
||||
/* Perform action */
|
||||
ret = tsip_ssession_handle(_ss, action);
|
||||
TSK_OBJECT_SAFE_FREE(action);
|
||||
}
|
||||
va_end(ap);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int tsip_api_invite_send_hold(const tsip_ssession_handle_t *ss, tmedia_type_t type, ...)
|
||||
{
|
||||
int ret = -1;
|
||||
tsip_action_t* action;
|
||||
|
@ -129,7 +160,7 @@ int tsip_action_HOLD(const tsip_ssession_handle_t *ss, tmedia_type_t type, ...)
|
|||
return ret;
|
||||
}
|
||||
|
||||
int tsip_action_RESUME(const tsip_ssession_handle_t *ss, tmedia_type_t type, ...)
|
||||
int tsip_api_invite_send_resume(const tsip_ssession_handle_t *ss, tmedia_type_t type, ...)
|
||||
{
|
||||
int ret = -1;
|
||||
tsip_action_t* action;
|
||||
|
@ -162,13 +193,13 @@ int tsip_action_RESUME(const tsip_ssession_handle_t *ss, tmedia_type_t type, ...
|
|||
return ret;
|
||||
}
|
||||
|
||||
int tsip_action_LARGE_MESSAGE(const tsip_ssession_handle_t *ss, ...)
|
||||
int tsip_api_invite_send_large_message(const tsip_ssession_handle_t *ss, ...)
|
||||
{
|
||||
int ret = -1;
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, ss);
|
||||
if((ret = _tsip_action_ANY(ss, tsip_atype_lmessage, &ap))){
|
||||
if((ret = _tsip_api_common_any(ss, tsip_atype_lmessage, &ap))){
|
||||
TSK_DEBUG_ERROR("Failed to send MSRP message");
|
||||
}
|
||||
va_end(ap);
|
||||
|
@ -176,7 +207,7 @@ int tsip_action_LARGE_MESSAGE(const tsip_ssession_handle_t *ss, ...)
|
|||
return ret;
|
||||
}
|
||||
|
||||
int tsip_action_ECT(const tsip_ssession_handle_t *ss, const char* toUri, ...)
|
||||
int tsip_api_invite_send_ect(const tsip_ssession_handle_t *ss, const char* toUri, ...)
|
||||
{
|
||||
int ret = -1;
|
||||
tsip_action_t* action;
|
||||
|
@ -209,7 +240,7 @@ int tsip_action_ECT(const tsip_ssession_handle_t *ss, const char* toUri, ...)
|
|||
return ret;
|
||||
}
|
||||
|
||||
int tsip_action_DTMF(const tsip_ssession_handle_t *ss, int event, ...)
|
||||
int tsip_api_invite_send_dtmf(const tsip_ssession_handle_t *ss, int event, ...)
|
||||
{
|
||||
int ret = -1;
|
||||
tsip_action_t* action;
|
||||
|
@ -242,13 +273,13 @@ int tsip_action_DTMF(const tsip_ssession_handle_t *ss, int event, ...)
|
|||
return ret;
|
||||
}
|
||||
|
||||
int tsip_action_BYE(const tsip_ssession_handle_t *ss, ...)
|
||||
int tsip_api_invite_send_bye(const tsip_ssession_handle_t *ss, ...)
|
||||
{
|
||||
int ret = -1;
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, ss);
|
||||
if((ret = _tsip_action_ANY(ss, tsip_atype_bye, &ap))){
|
||||
if((ret = _tsip_api_common_any(ss, tsip_atype_bye, &ap))){
|
||||
TSK_DEBUG_ERROR("Bye() failed.");
|
||||
}
|
||||
va_end(ap);
|
||||
|
|
|
@ -51,7 +51,7 @@ int tsip_message_event_signal(tsip_message_event_type_t type, tsip_ssession_hand
|
|||
return 0;
|
||||
}
|
||||
|
||||
int tsip_action_MESSAGE(const tsip_ssession_handle_t *ss, ...)
|
||||
int tsip_api_message_send_message(const tsip_ssession_handle_t *ss, ...)
|
||||
{
|
||||
const tsip_ssession_t* _ss;
|
||||
va_list ap;
|
||||
|
|
|
@ -51,7 +51,7 @@ int tsip_options_event_signal(tsip_options_event_type_t type, tsip_ssession_hand
|
|||
return 0;
|
||||
}
|
||||
|
||||
int tsip_action_OPTIONS(const tsip_ssession_handle_t *ss, ...)
|
||||
int tsip_api_options_send_options(const tsip_ssession_handle_t *ss, ...)
|
||||
{
|
||||
const tsip_ssession_t* _ss;
|
||||
va_list ap;
|
||||
|
|
|
@ -51,7 +51,7 @@ int tsip_publish_event_signal(tsip_publish_event_type_t type, tsip_ssession_hand
|
|||
return 0;
|
||||
}
|
||||
|
||||
int tsip_action_PUBLISH(const tsip_ssession_handle_t *ss, ...)
|
||||
int tsip_api_publish_send_publish(const tsip_ssession_handle_t *ss, ...)
|
||||
{
|
||||
const tsip_ssession_t* _ss;
|
||||
va_list ap;
|
||||
|
@ -85,7 +85,7 @@ int tsip_action_PUBLISH(const tsip_ssession_handle_t *ss, ...)
|
|||
return ret;
|
||||
}
|
||||
|
||||
int tsip_action_UNPUBLISH(const tsip_ssession_handle_t *ss, ...)
|
||||
int tsip_api_publish_send_unpublish(const tsip_ssession_handle_t *ss, ...)
|
||||
{
|
||||
const tsip_ssession_t* _ss;
|
||||
va_list ap;
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
|
||||
/* Internal functions */
|
||||
extern tsip_action_t* _tsip_action_create(tsip_action_type_t type, va_list* app);
|
||||
extern int _tsip_action_ANY(const tsip_ssession_handle_t *ss, tsip_action_type_t type, va_list* app);
|
||||
extern int _tsip_api_common_any(const tsip_ssession_handle_t *ss, tsip_action_type_t type, va_list* app);
|
||||
|
||||
/* internal function used to signal evant from REGISTER dialog to user app */
|
||||
int tsip_register_event_signal(tsip_register_event_type_t type, tsip_ssession_t* ss, short status_code, const char *phrase, const tsip_message_t* sipmessage)
|
||||
|
@ -62,9 +62,9 @@ int tsip_register_event_signal(tsip_register_event_type_t type, tsip_ssession_t*
|
|||
* @param ... Any TSIP_ACTION_SET_*() macros. e.g. @ref TSIP_ACTION_SET_HEADER().
|
||||
* MUST always ends with @ref TSIP_ACTION_SET_NULL().
|
||||
* @retval Zero if succeed and non-zero error code otherwise.
|
||||
* @sa @ref tsip_action_UNREGISTER
|
||||
* @sa @ref tsip_api_register_send_unregister
|
||||
*/
|
||||
int tsip_action_REGISTER(const tsip_ssession_handle_t *ss, ...)
|
||||
int tsip_api_register_send_register(const tsip_ssession_handle_t *ss, ...)
|
||||
{
|
||||
const tsip_ssession_t* _ss;
|
||||
va_list ap;
|
||||
|
@ -105,15 +105,15 @@ int tsip_action_REGISTER(const tsip_ssession_handle_t *ss, ...)
|
|||
* @param ... Any TSIP_ACTION_SET_*() macros. e.g. @ref TSIP_ACTION_SET_HEADER().
|
||||
* MUST always ends with @ref TSIP_ACTION_SET_NULL().
|
||||
* @retval Zero if succeed and non-zero error code otherwise.
|
||||
* @sa @ref tsip_action_REGISTER
|
||||
* @sa @ref tsip_api_register_send_register
|
||||
*/
|
||||
int tsip_action_UNREGISTER(const tsip_ssession_handle_t *ss, ...)
|
||||
int tsip_api_register_send_unregister(const tsip_ssession_handle_t *ss, ...)
|
||||
{
|
||||
int ret = -1;
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, ss);
|
||||
if((ret = _tsip_action_ANY(ss, tsip_atype_unregister, &ap))){
|
||||
if((ret = _tsip_api_common_any(ss, tsip_atype_unregister, &ap))){
|
||||
TSK_DEBUG_ERROR("unREGISTER() failed.");
|
||||
}
|
||||
va_end(ap);
|
||||
|
|
|
@ -52,7 +52,7 @@ int tsip_subscribe_event_signal(tsip_subscribe_event_type_t type, tsip_ssession_
|
|||
return 0;
|
||||
}
|
||||
|
||||
int tsip_action_SUBSCRIBE(const tsip_ssession_handle_t *ss, ...)
|
||||
int tsip_api_subscribe_send_subscribe(const tsip_ssession_handle_t *ss, ...)
|
||||
{
|
||||
const tsip_ssession_t* _ss;
|
||||
va_list ap;
|
||||
|
@ -86,7 +86,7 @@ int tsip_action_SUBSCRIBE(const tsip_ssession_handle_t *ss, ...)
|
|||
return ret;
|
||||
}
|
||||
|
||||
int tsip_action_UNSUBSCRIBE(const tsip_ssession_handle_t *ss, ...)
|
||||
int tsip_api_subscribe_send_unsubscribe(const tsip_ssession_handle_t *ss, ...)
|
||||
{
|
||||
const tsip_ssession_t* _ss;
|
||||
va_list ap;
|
||||
|
|
|
@ -0,0 +1,555 @@
|
|||
/* Copyright (C) 2011 Doubango Telecom <http://www.doubango.org>
|
||||
* Copyright (C) 2011 Mamadou Diop.
|
||||
*
|
||||
* Contact: Mamadou Diop <diopmamadou(at)doubango(dot)org>
|
||||
*
|
||||
* This file is part of Open Source Doubango Framework.
|
||||
*
|
||||
* DOUBANGO is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* DOUBANGO is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with DOUBANGO.
|
||||
*
|
||||
*/
|
||||
|
||||
/**@file tsip_dialog_info.c
|
||||
* @brief SIP dialog message (Client side).
|
||||
*
|
||||
* @author Mamadou Diop <diopmamadou(at)doubango.org>
|
||||
*
|
||||
|
||||
*/
|
||||
#include "tinysip/dialogs/tsip_dialog_info.h"
|
||||
#include "tinysip/parsers/tsip_parser_uri.h"
|
||||
|
||||
#include "tinysip/api/tsip_api_info.h"
|
||||
|
||||
#include "tinysip/headers/tsip_header_Dummy.h"
|
||||
#include "tinysip/headers/tsip_header_Min_Expires.h"
|
||||
|
||||
#include "tinysip/transactions/tsip_transac_layer.h"
|
||||
|
||||
#include "tsk_memory.h"
|
||||
#include "tsk_debug.h"
|
||||
#include "tsk_time.h"
|
||||
|
||||
#define DEBUG_STATE_MACHINE 1
|
||||
#define TSIP_DIALOG_INFO_SIGNAL(self, type, code, phrase, message) \
|
||||
tsip_info_event_signal(type, TSIP_DIALOG(self)->ss, code, phrase, message)
|
||||
|
||||
/* ======================== internal functions ======================== */
|
||||
static int send_INFO(tsip_dialog_info_t *self);
|
||||
static int tsip_dialog_info_OnTerminated(tsip_dialog_info_t *self);
|
||||
|
||||
/* ======================== transitions ======================== */
|
||||
static int tsip_dialog_info_Started_2_Sending_X_sendINFO(va_list *app);
|
||||
static int tsip_dialog_info_Started_2_Receiving_X_recvINFO(va_list *app);
|
||||
static int tsip_dialog_info_Sending_2_Sending_X_1xx(va_list *app);
|
||||
static int tsip_dialog_info_Sending_2_Terminated_X_2xx(va_list *app);
|
||||
static int tsip_dialog_info_Sending_2_Sending_X_401_407_421_494(va_list *app);
|
||||
static int tsip_dialog_info_Sending_2_Terminated_X_300_to_699(va_list *app);
|
||||
static int tsip_dialog_info_Sending_2_Terminated_X_cancel(va_list *app);
|
||||
static int tsip_dialog_info_Receiving_2_Terminated_X_accept(va_list *app);
|
||||
static int tsip_dialog_info_Receiving_2_Terminated_X_reject(va_list *app);
|
||||
static int tsip_dialog_info_Any_2_Terminated_X_transportError(va_list *app);
|
||||
static int tsip_dialog_info_Any_2_Terminated_X_Error(va_list *app);
|
||||
|
||||
/* ======================== conds ======================== */
|
||||
|
||||
/* ======================== actions ======================== */
|
||||
typedef enum _fsm_action_e
|
||||
{
|
||||
_fsm_action_sendINFO = tsip_atype_info_send,
|
||||
_fsm_action_accept = tsip_atype_accept,
|
||||
_fsm_action_reject = tsip_atype_reject,
|
||||
_fsm_action_cancel = tsip_atype_cancel,
|
||||
_fsm_action_shutdown = tsip_atype_shutdown,
|
||||
|
||||
_fsm_action_receiveINFO = 0xFF,
|
||||
_fsm_action_1xx,
|
||||
_fsm_action_2xx,
|
||||
_fsm_action_401_407_421_494,
|
||||
_fsm_action_300_to_699,
|
||||
_fsm_action_transporterror,
|
||||
_fsm_action_error,
|
||||
}
|
||||
_fsm_action_t;
|
||||
|
||||
/* ======================== states ======================== */
|
||||
typedef enum _fsm_state_e
|
||||
{
|
||||
_fsm_state_Started,
|
||||
_fsm_state_Sending,
|
||||
_fsm_state_Receiving,
|
||||
_fsm_state_Terminated
|
||||
}
|
||||
_fsm_state_t;
|
||||
|
||||
|
||||
static int tsip_dialog_info_event_callback(const tsip_dialog_info_t *self, tsip_dialog_event_type_t type, const tsip_message_t *msg)
|
||||
{
|
||||
int ret = -1;
|
||||
|
||||
switch(type)
|
||||
{
|
||||
case tsip_dialog_i_msg:
|
||||
{
|
||||
if(msg)
|
||||
{
|
||||
if(TSIP_MESSAGE_IS_RESPONSE(msg))
|
||||
{
|
||||
if(TSIP_RESPONSE_IS_1XX(msg)){
|
||||
ret = tsip_dialog_fsm_act(TSIP_DIALOG(self), _fsm_action_1xx, msg, tsk_null);
|
||||
}
|
||||
else if(TSIP_RESPONSE_IS_2XX(msg)){
|
||||
ret = tsip_dialog_fsm_act(TSIP_DIALOG(self), _fsm_action_2xx, msg, tsk_null);
|
||||
}
|
||||
else if(TSIP_RESPONSE_CODE(msg) == 401 || TSIP_RESPONSE_CODE(msg) == 407 || TSIP_RESPONSE_CODE(msg) == 421 || TSIP_RESPONSE_CODE(msg) == 494){
|
||||
ret = tsip_dialog_fsm_act(TSIP_DIALOG(self), _fsm_action_401_407_421_494, msg, tsk_null);
|
||||
}
|
||||
else if(TSIP_RESPONSE_IS_3456(msg)){
|
||||
ret = tsip_dialog_fsm_act(TSIP_DIALOG(self), _fsm_action_300_to_699, msg, tsk_null);
|
||||
}
|
||||
else{ /* Should never happen */
|
||||
ret = tsip_dialog_fsm_act(TSIP_DIALOG(self), _fsm_action_error, msg, tsk_null);
|
||||
}
|
||||
}
|
||||
else if (TSIP_REQUEST_IS_INFO(msg)){ /* have been checked by dialog layer...but */
|
||||
// REQUEST ==> Incoming INFO
|
||||
ret = tsip_dialog_fsm_act(TSIP_DIALOG(self), _fsm_action_receiveINFO, msg, tsk_null);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case tsip_dialog_canceled:
|
||||
{
|
||||
ret = tsip_dialog_fsm_act(TSIP_DIALOG(self), _fsm_action_cancel, msg, tsk_null);
|
||||
break;
|
||||
}
|
||||
|
||||
case tsip_dialog_terminated:
|
||||
case tsip_dialog_timedout:
|
||||
case tsip_dialog_error:
|
||||
case tsip_dialog_transport_error:
|
||||
{
|
||||
ret = tsip_dialog_fsm_act(TSIP_DIALOG(self), _fsm_action_transporterror, msg, tsk_null);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
tsip_dialog_info_t* tsip_dialog_info_create(const tsip_ssession_handle_t* ss)
|
||||
{
|
||||
return tsk_object_new(tsip_dialog_info_def_t, ss);
|
||||
}
|
||||
|
||||
int tsip_dialog_info_init(tsip_dialog_info_t *self)
|
||||
{
|
||||
//const tsk_param_t* param;
|
||||
|
||||
/* Initialize the state machine. */
|
||||
tsk_fsm_set(TSIP_DIALOG_GET_FSM(self),
|
||||
|
||||
/*=======================
|
||||
* === Started ===
|
||||
*/
|
||||
// Started -> (send) -> Sending
|
||||
TSK_FSM_ADD_ALWAYS(_fsm_state_Started, _fsm_action_sendINFO, _fsm_state_Sending, tsip_dialog_info_Started_2_Sending_X_sendINFO, "tsip_dialog_info_Started_2_Sending_X_sendINFO"),
|
||||
// Started -> (receive) -> Receiving
|
||||
TSK_FSM_ADD_ALWAYS(_fsm_state_Started, _fsm_action_receiveINFO, _fsm_state_Receiving, tsip_dialog_info_Started_2_Receiving_X_recvINFO, "tsip_dialog_info_Started_2_Receiving_X_recvINFO"),
|
||||
// Started -> (Any) -> Started
|
||||
TSK_FSM_ADD_ALWAYS_NOTHING(_fsm_state_Started, "tsip_dialog_info_Started_2_Started_X_any"),
|
||||
|
||||
|
||||
/*=======================
|
||||
* === Sending ===
|
||||
*/
|
||||
// Sending -> (1xx) -> Sending
|
||||
TSK_FSM_ADD_ALWAYS(_fsm_state_Sending, _fsm_action_1xx, _fsm_state_Sending, tsip_dialog_info_Sending_2_Sending_X_1xx, "tsip_dialog_info_Sending_2_Sending_X_1xx"),
|
||||
// Sending -> (2xx) -> Terminated
|
||||
TSK_FSM_ADD_ALWAYS(_fsm_state_Sending, _fsm_action_2xx, _fsm_state_Terminated, tsip_dialog_info_Sending_2_Terminated_X_2xx, "tsip_dialog_info_Sending_2_Terminated_X_2xx"),
|
||||
// Sending -> (401/407/421/494) -> Sending
|
||||
TSK_FSM_ADD_ALWAYS(_fsm_state_Sending, _fsm_action_401_407_421_494, _fsm_state_Sending, tsip_dialog_info_Sending_2_Sending_X_401_407_421_494, "tsip_dialog_info_Sending_2_Sending_X_401_407_421_494"),
|
||||
// Sending -> (300_to_699) -> Terminated
|
||||
TSK_FSM_ADD_ALWAYS(_fsm_state_Sending, _fsm_action_300_to_699, _fsm_state_Terminated, tsip_dialog_info_Sending_2_Terminated_X_300_to_699, "tsip_dialog_info_Sending_2_Terminated_X_300_to_699"),
|
||||
// Sending -> (cancel) -> Terminated
|
||||
TSK_FSM_ADD_ALWAYS(_fsm_state_Sending, _fsm_action_cancel, _fsm_state_Terminated, tsip_dialog_info_Sending_2_Terminated_X_cancel, "tsip_dialog_info_Sending_2_Terminated_X_cancel"),
|
||||
// Sending -> (shutdown) -> Terminated
|
||||
TSK_FSM_ADD_ALWAYS(_fsm_state_Sending, _fsm_action_shutdown, _fsm_state_Terminated, tsk_null, "tsip_dialog_info_Sending_2_Terminated_X_shutdown"),
|
||||
// Sending -> (Any) -> Sending
|
||||
TSK_FSM_ADD_ALWAYS_NOTHING(_fsm_state_Sending, "tsip_dialog_info_Sending_2_Sending_X_any"),
|
||||
|
||||
/*=======================
|
||||
* === Receiving ===
|
||||
*/
|
||||
// Receiving -> (accept) -> Terminated
|
||||
TSK_FSM_ADD_ALWAYS(_fsm_state_Receiving, _fsm_action_accept, _fsm_state_Terminated, tsip_dialog_info_Receiving_2_Terminated_X_accept, "tsip_dialog_info_Receiving_2_Terminated_X_accept"),
|
||||
// Receiving -> (rejected) -> Terminated
|
||||
TSK_FSM_ADD_ALWAYS(_fsm_state_Receiving, _fsm_action_reject, _fsm_state_Terminated, tsip_dialog_info_Receiving_2_Terminated_X_reject, "tsip_dialog_info_Receiving_2_Terminated_X_reject"),
|
||||
// Receiving -> (Any) -> Receiving
|
||||
TSK_FSM_ADD_ALWAYS_NOTHING(_fsm_state_Receiving, "tsip_dialog_info_Receiving_2_Receiving_X_any"),
|
||||
|
||||
/*=======================
|
||||
* === Any ===
|
||||
*/
|
||||
// Any -> (transport error) -> Terminated
|
||||
TSK_FSM_ADD_ALWAYS(tsk_fsm_state_any, _fsm_action_transporterror, _fsm_state_Terminated, tsip_dialog_info_Any_2_Terminated_X_transportError, "tsip_dialog_info_Any_2_Terminated_X_transportError"),
|
||||
// Any -> (transport error) -> Terminated
|
||||
TSK_FSM_ADD_ALWAYS(tsk_fsm_state_any, _fsm_action_error, _fsm_state_Terminated, tsip_dialog_info_Any_2_Terminated_X_Error, "tsip_dialog_info_Any_2_Terminated_X_Error"),
|
||||
|
||||
TSK_FSM_ADD_NULL());
|
||||
|
||||
TSIP_DIALOG(self)->callback = TSIP_DIALOG_EVENT_CALLBACK_F(tsip_dialog_info_event_callback);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------
|
||||
// == STATE MACHINE BEGIN ==
|
||||
//--------------------------------------------------------
|
||||
|
||||
|
||||
/* Started -> (sendINFO) -> Sending
|
||||
*/
|
||||
int tsip_dialog_info_Started_2_Sending_X_sendINFO(va_list *app)
|
||||
{
|
||||
tsip_dialog_info_t *self;
|
||||
const tsip_action_t* action;
|
||||
|
||||
self = va_arg(*app, tsip_dialog_info_t *);
|
||||
va_arg(*app, tsip_message_t *);
|
||||
action = va_arg(*app, const tsip_action_t *);
|
||||
|
||||
TSIP_DIALOG(self)->running = tsk_true;
|
||||
tsip_dialog_set_curr_action(TSIP_DIALOG(self), action);
|
||||
|
||||
return send_INFO(self);
|
||||
}
|
||||
|
||||
/* Started -> (recvINFO) -> Receiving
|
||||
*/
|
||||
int tsip_dialog_info_Started_2_Receiving_X_recvINFO(va_list *app)
|
||||
{
|
||||
tsip_dialog_info_t *self = va_arg(*app, tsip_dialog_info_t *);
|
||||
const tsip_request_t *request = va_arg(*app, const tsip_request_t *);
|
||||
|
||||
/* Alert the user. */
|
||||
TSIP_DIALOG_INFO_SIGNAL(self, tsip_i_info,
|
||||
tsip_event_code_dialog_request_incoming, "Incoming Request.", request);
|
||||
|
||||
/* Update last incoming INFO */
|
||||
TSK_OBJECT_SAFE_FREE(self->last_iMessage);
|
||||
self->last_iMessage = tsk_object_ref((void*)request);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Sending -> (1xx) -> Sending
|
||||
*/
|
||||
int tsip_dialog_info_Sending_2_Sending_X_1xx(va_list *app)
|
||||
{
|
||||
/*tsip_dialog_info_t *self = va_arg(*app, tsip_dialog_info_t *);*/
|
||||
/*const tsip_response_t *response = va_arg(*app, const tsip_response_t *);*/
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Sending -> (2xx) -> Sending
|
||||
*/
|
||||
int tsip_dialog_info_Sending_2_Terminated_X_2xx(va_list *app)
|
||||
{
|
||||
tsip_dialog_info_t *self = va_arg(*app, tsip_dialog_info_t *);
|
||||
const tsip_response_t *response = va_arg(*app, const tsip_response_t *);
|
||||
|
||||
/* Alert the user. */
|
||||
TSIP_DIALOG_INFO_SIGNAL(self, tsip_ao_info,
|
||||
TSIP_RESPONSE_CODE(response), TSIP_RESPONSE_PHRASE(response), response);
|
||||
|
||||
/* Reset curr action */
|
||||
tsip_dialog_set_curr_action(TSIP_DIALOG(self), tsk_null);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Sending -> (401/407/421/494) -> Sending
|
||||
*/
|
||||
int tsip_dialog_info_Sending_2_Sending_X_401_407_421_494(va_list *app)
|
||||
{
|
||||
tsip_dialog_info_t *self = va_arg(*app, tsip_dialog_info_t *);
|
||||
const tsip_response_t *response = va_arg(*app, const tsip_response_t *);
|
||||
int ret;
|
||||
|
||||
if((ret = tsip_dialog_update(TSIP_DIALOG(self), response))){
|
||||
// Alert the user
|
||||
TSIP_DIALOG_INFO_SIGNAL(self, tsip_ao_info,
|
||||
TSIP_RESPONSE_CODE(response), TSIP_RESPONSE_PHRASE(response), response);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
return send_INFO(self);
|
||||
}
|
||||
|
||||
/* Sending -> (300 to 699) -> Terminated
|
||||
*/
|
||||
int tsip_dialog_info_Sending_2_Terminated_X_300_to_699(va_list *app)
|
||||
{
|
||||
tsip_dialog_info_t *self = va_arg(*app, tsip_dialog_info_t *);
|
||||
const tsip_response_t *response = va_arg(*app, const tsip_response_t *);
|
||||
|
||||
/* set last error (or info) */
|
||||
tsip_dialog_set_lasterror(TSIP_DIALOG(self), TSIP_RESPONSE_PHRASE(response), TSIP_RESPONSE_CODE(response));
|
||||
|
||||
/* Alert the user. */
|
||||
TSIP_DIALOG_INFO_SIGNAL(self, tsip_ao_info,
|
||||
TSIP_RESPONSE_CODE(response), TSIP_RESPONSE_PHRASE(response), response);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Sending -> (cancel) -> Terminated
|
||||
*/
|
||||
int tsip_dialog_info_Sending_2_Terminated_X_cancel(va_list *app)
|
||||
{
|
||||
tsip_dialog_info_t *self = va_arg(*app, tsip_dialog_info_t *);
|
||||
/* const tsip_message_t *message = va_arg(*app, const tsip_message_t *); */
|
||||
|
||||
/* RFC 3261 - 9.1 Client Behavior
|
||||
A CANCEL request SHOULD NOT be sent to cancel a request other than INVITE.
|
||||
*/
|
||||
|
||||
/* Cancel all transactions associated to this dialog (will also be done when the dialog is destroyed (worth nothing)) */
|
||||
tsip_transac_layer_cancel_by_dialog(TSIP_DIALOG_GET_STACK(self)->layer_transac, TSIP_DIALOG(self));
|
||||
|
||||
/* Alert the user */
|
||||
TSIP_DIALOG_SIGNAL(self, tsip_event_code_dialog_request_cancelled, "INFO cancelled");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Receiving -> (accept) -> Terminated
|
||||
*/
|
||||
int tsip_dialog_info_Receiving_2_Terminated_X_accept(va_list *app)
|
||||
{
|
||||
tsip_dialog_info_t *self;
|
||||
const tsip_action_t* action;
|
||||
|
||||
self = va_arg(*app, tsip_dialog_info_t *);
|
||||
va_arg(*app, tsip_message_t *);
|
||||
action = va_arg(*app, const tsip_action_t *);
|
||||
|
||||
if(!self->last_iMessage){
|
||||
TSK_DEBUG_ERROR("There is non INFO to accept()");
|
||||
/* Not an error ...but do not update current action */
|
||||
}
|
||||
else{
|
||||
tsip_response_t *response;
|
||||
int ret;
|
||||
|
||||
/* curr_action is only used for outgoing requests */
|
||||
/* tsip_dialog_set_curr_action(TSIP_DIALOG(self), action); */
|
||||
|
||||
/* send 200 OK */
|
||||
if((response = tsip_dialog_response_new(TSIP_DIALOG(self), 200, "OK", self->last_iMessage))){
|
||||
tsip_dialog_apply_action(response, action); /* apply action params to "this" response */
|
||||
if((ret = tsip_dialog_response_send(TSIP_DIALOG(self), response))){
|
||||
TSK_DEBUG_ERROR("Failed to send SIP response.");
|
||||
TSK_OBJECT_SAFE_FREE(response);
|
||||
return ret;
|
||||
}
|
||||
TSK_OBJECT_SAFE_FREE(response);
|
||||
}
|
||||
else{
|
||||
TSK_DEBUG_ERROR("Failed to create SIP response.");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Receiving -> (reject) -> Terminated
|
||||
*/
|
||||
int tsip_dialog_info_Receiving_2_Terminated_X_reject(va_list *app)
|
||||
{
|
||||
tsip_dialog_info_t *self;
|
||||
const tsip_action_t* action;
|
||||
|
||||
self = va_arg(*app, tsip_dialog_info_t *);
|
||||
va_arg(*app, tsip_message_t *);
|
||||
action = va_arg(*app, const tsip_action_t *);
|
||||
|
||||
if(!self->last_iMessage){
|
||||
TSK_DEBUG_ERROR("There is non INFO to reject()");
|
||||
/* Not an error ...but do not update current action */
|
||||
}
|
||||
else{
|
||||
tsip_response_t *response;
|
||||
int ret;
|
||||
|
||||
/* curr_action is only used for outgoing requests */
|
||||
/* tsip_dialog_set_curr_action(TSIP_DIALOG(self), action); */
|
||||
|
||||
/* send 486 Rejected */
|
||||
if((response = tsip_dialog_response_new(TSIP_DIALOG(self), 486, "Rejected", self->last_iMessage))){
|
||||
tsip_dialog_apply_action(response, action); /* apply action params to "this" response */
|
||||
if((ret = tsip_dialog_response_send(TSIP_DIALOG(self), response))){
|
||||
TSK_DEBUG_ERROR("Failed to send SIP response.");
|
||||
TSK_OBJECT_SAFE_FREE(response);
|
||||
return ret;
|
||||
}
|
||||
TSK_OBJECT_SAFE_FREE(response);
|
||||
}
|
||||
else{
|
||||
TSK_DEBUG_ERROR("Failed to create SIP response.");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Any -> (transport error) -> Terminated
|
||||
*/
|
||||
int tsip_dialog_info_Any_2_Terminated_X_transportError(va_list *app)
|
||||
{
|
||||
/*tsip_dialog_info_t *self = va_arg(*app, tsip_dialog_info_t *);*/
|
||||
/*const tsip_message_t *message = va_arg(*app, const tsip_message_t *);*/
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Any -> (error) -> Terminated
|
||||
*/
|
||||
int tsip_dialog_info_Any_2_Terminated_X_Error(va_list *app)
|
||||
{
|
||||
/*tsip_dialog_info_t *self = va_arg(*app, tsip_dialog_info_t *);*/
|
||||
/*const tsip_message_t *message = va_arg(*app, const tsip_message_t *);*/
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
// == STATE MACHINE END ==
|
||||
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
int send_INFO(tsip_dialog_info_t *self)
|
||||
{
|
||||
tsip_request_t* request = tsk_null;
|
||||
int ret = -1;
|
||||
|
||||
if(!self){
|
||||
return -1;
|
||||
}
|
||||
|
||||
if(!(request = tsip_dialog_request_new(TSIP_DIALOG(self), "INFO"))){
|
||||
return -2;
|
||||
}
|
||||
|
||||
/* apply action params to the request */
|
||||
if(TSIP_DIALOG(self)->curr_action){
|
||||
tsip_dialog_apply_action(request, TSIP_DIALOG(self)->curr_action);
|
||||
}
|
||||
|
||||
ret = tsip_dialog_request_send(TSIP_DIALOG(self), request);
|
||||
TSK_OBJECT_SAFE_FREE(request);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
int tsip_dialog_info_OnTerminated(tsip_dialog_info_t *self)
|
||||
{
|
||||
TSK_DEBUG_INFO("=== INFO Dialog terminated ===");
|
||||
|
||||
/* Alert the user */
|
||||
TSIP_DIALOG_SIGNAL(self, tsip_event_code_dialog_terminated,
|
||||
TSIP_DIALOG(self)->last_error.phrase ? TSIP_DIALOG(self)->last_error.phrase : "Dialog terminated");
|
||||
|
||||
/* Remove from the dialog layer. */
|
||||
return tsip_dialog_remove(TSIP_DIALOG(self));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//========================================================
|
||||
// SIP dialog INFO object definition
|
||||
//
|
||||
static tsk_object_t* tsip_dialog_info_ctor(tsk_object_t * self, va_list * app)
|
||||
{
|
||||
tsip_dialog_info_t *dialog = self;
|
||||
if(dialog){
|
||||
tsip_ssession_handle_t *ss = va_arg(*app, tsip_ssession_handle_t *);
|
||||
|
||||
/* Initialize base class */
|
||||
tsip_dialog_init(TSIP_DIALOG(self), tsip_dialog_INFO, tsk_null, ss, _fsm_state_Started, _fsm_state_Terminated);
|
||||
|
||||
/* FSM */
|
||||
TSIP_DIALOG_GET_FSM(self)->debug = DEBUG_STATE_MACHINE;
|
||||
tsk_fsm_set_callback_terminated(TSIP_DIALOG_GET_FSM(self), TSK_FSM_ONTERMINATED_F(tsip_dialog_info_OnTerminated), (const void*)dialog);
|
||||
|
||||
/* Initialize the class itself */
|
||||
tsip_dialog_info_init(self);
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
static tsk_object_t* tsip_dialog_info_dtor(tsk_object_t * self)
|
||||
{
|
||||
tsip_dialog_info_t *dialog = self;
|
||||
if(dialog){
|
||||
/* DeInitialize base class (will cancel all transactions) */
|
||||
tsip_dialog_deinit(TSIP_DIALOG(self));
|
||||
|
||||
/* DeInitialize self */
|
||||
TSK_OBJECT_SAFE_FREE(dialog->last_iMessage);
|
||||
|
||||
TSK_DEBUG_INFO("*** INFO Dialog destroyed ***");
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
static int tsip_dialog_info_cmp(const tsk_object_t *obj1, const tsk_object_t *obj2)
|
||||
{
|
||||
return tsip_dialog_cmp(obj1, obj2);
|
||||
}
|
||||
|
||||
static const tsk_object_def_t tsip_dialog_info_def_s =
|
||||
{
|
||||
sizeof(tsip_dialog_info_t),
|
||||
tsip_dialog_info_ctor,
|
||||
tsip_dialog_info_dtor,
|
||||
tsip_dialog_info_cmp,
|
||||
};
|
||||
const tsk_object_def_t *tsip_dialog_info_def_t = &tsip_dialog_info_def_s;
|
|
@ -33,6 +33,7 @@
|
|||
|
||||
#include "tinysip/dialogs/tsip_dialog_invite.common.h"
|
||||
|
||||
#include "tinysip/transactions/tsip_transac_layer.h"
|
||||
#include "tinysip/transports/tsip_transport_layer.h"
|
||||
|
||||
#include "tinysip/headers/tsip_header_Allow.h"
|
||||
|
@ -103,6 +104,8 @@ static int x0000_Connected_2_Connected_X_oINVITE(va_list *app);
|
|||
|
||||
|
||||
static int x0000_Any_2_Any_X_i1xx(va_list *app);
|
||||
static int x0000_Any_2_Any_X_oINFO(va_list *app);
|
||||
static int x0000_Any_2_Any_X_iINFO(va_list *app);
|
||||
static int x0000_Any_2_Any_X_i401_407_INVITEorUPDATE(va_list *app);
|
||||
static int x0000_Any_2_Any_X_i2xxINVITEorUPDATE(va_list *app);
|
||||
|
||||
|
@ -199,6 +202,9 @@ int tsip_dialog_invite_event_callback(const tsip_dialog_invite_t *self, tsip_dia
|
|||
else if(TSIP_REQUEST_IS_CANCEL(msg)){ // CANCEL
|
||||
ret = tsip_dialog_fsm_act(TSIP_DIALOG(self), _fsm_action_iCANCEL, msg, tsk_null);
|
||||
}
|
||||
else if(TSIP_REQUEST_IS_INFO(msg)){ // INFO
|
||||
ret = tsip_dialog_fsm_act(TSIP_DIALOG(self), _fsm_action_iINFO, msg, tsk_null);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -210,8 +216,15 @@ int tsip_dialog_invite_event_callback(const tsip_dialog_invite_t *self, tsip_dia
|
|||
break;
|
||||
}
|
||||
|
||||
case tsip_dialog_terminated:
|
||||
case tsip_dialog_timedout:
|
||||
{
|
||||
// Do nothing if request type is "INFO"
|
||||
if(!TSIP_MESSAGE_IS_REQUEST(msg) || !TSIP_REQUEST_IS_INFO(msg)){
|
||||
ret = tsip_dialog_fsm_act(TSIP_DIALOG(self), _fsm_action_transporterror, msg, tsk_null);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case tsip_dialog_terminated:
|
||||
case tsip_dialog_error:
|
||||
case tsip_dialog_transport_error:
|
||||
{
|
||||
|
@ -318,6 +331,10 @@ int tsip_dialog_invite_init(tsip_dialog_invite_t *self)
|
|||
*/
|
||||
// Any -> (i1xx) -> Any
|
||||
TSK_FSM_ADD_ALWAYS(tsk_fsm_state_any, _fsm_action_i1xx, tsk_fsm_state_any, x0000_Any_2_Any_X_i1xx, "x0000_Any_2_Any_X_i1xx"),
|
||||
// Any -> (oINFO) -> Any
|
||||
TSK_FSM_ADD_ALWAYS(tsk_fsm_state_any, _fsm_action_oINFO, tsk_fsm_state_any, x0000_Any_2_Any_X_oINFO, "x0000_Any_2_Any_X_oINFO"),
|
||||
// Any -> (iINFO) -> Any
|
||||
TSK_FSM_ADD_ALWAYS(tsk_fsm_state_any, _fsm_action_iINFO, tsk_fsm_state_any, x0000_Any_2_Any_X_iINFO, "x0000_Any_2_Any_X_iINFO"),
|
||||
// Any -> (i401/407)
|
||||
//
|
||||
// Any -> (iPRACK) -> Any
|
||||
|
@ -813,6 +830,46 @@ int x0000_Any_2_Any_X_i1xx(va_list *app)
|
|||
return ret;
|
||||
}
|
||||
|
||||
/* Any -> (oINFO) -> Any */
|
||||
int x0000_Any_2_Any_X_oINFO(va_list *app)
|
||||
{
|
||||
tsip_dialog_invite_t *self;
|
||||
const tsip_action_t* action;
|
||||
tsip_request_t* rINFO;
|
||||
|
||||
self = va_arg(*app, tsip_dialog_invite_t *);
|
||||
va_arg(*app, const tsip_message_t *);
|
||||
action = va_arg(*app, const tsip_action_t *);
|
||||
|
||||
if((rINFO = tsip_dialog_request_new(TSIP_DIALOG(self), "INFO"))){
|
||||
int ret;
|
||||
if(action){
|
||||
ret = tsip_dialog_apply_action(TSIP_MESSAGE(rINFO), action);
|
||||
}
|
||||
ret = tsip_dialog_request_send(TSIP_DIALOG(self), rINFO);
|
||||
TSK_OBJECT_SAFE_FREE(rINFO);
|
||||
return ret;
|
||||
}
|
||||
else{
|
||||
TSK_DEBUG_ERROR("Failed to create new INFO request");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
int x0000_Any_2_Any_X_iINFO(va_list *app)
|
||||
{
|
||||
tsip_dialog_invite_t * self = va_arg(*app, tsip_dialog_invite_t *);
|
||||
tsip_request_t* rINFO = (tsip_request_t*)va_arg(*app, const tsip_message_t *);
|
||||
|
||||
if(rINFO){
|
||||
send_RESPONSE(self, rINFO, 200, "Ok", tsk_false);
|
||||
TSIP_DIALOG_INVITE_SIGNAL(self, tsip_i_request,
|
||||
tsip_event_code_dialog_request_incoming, "Incoming Request", rINFO);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int x9998_Any_2_Any_X_transportError(va_list *app)
|
||||
{
|
||||
tsip_dialog_invite_t *self = va_arg(*app, tsip_dialog_invite_t *);
|
||||
|
@ -1355,6 +1412,11 @@ int tsip_dialog_invite_OnTerminated(tsip_dialog_invite_t *self)
|
|||
{
|
||||
TSK_DEBUG_INFO("=== INVITE Dialog terminated ===");
|
||||
|
||||
/* Cancel all transactions associated to this dialog (will also be done when the dialog is destroyed )
|
||||
worth nothing to do it here in order to cancel in-dialog request (such as INFO, REFER...)
|
||||
*/
|
||||
tsip_transac_layer_cancel_by_dialog(TSIP_DIALOG_GET_STACK(self)->layer_transac, TSIP_DIALOG(self));
|
||||
|
||||
/* stop session manager */
|
||||
if(self->msession_mgr && self->msession_mgr->started){
|
||||
tmedia_session_mgr_stop(self->msession_mgr);
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
|
||||
#include "tinysip/dialogs/tsip_dialog_invite.h"
|
||||
#include "tinysip/dialogs/tsip_dialog_message.h"
|
||||
#include "tinysip/dialogs/tsip_dialog_info.h"
|
||||
#include "tinysip/dialogs/tsip_dialog_options.h"
|
||||
#include "tinysip/dialogs/tsip_dialog_publish.h"
|
||||
#include "tinysip/dialogs/tsip_dialog_register.h"
|
||||
|
@ -274,6 +275,14 @@ tsip_dialog_t* tsip_dialog_layer_new(tsip_dialog_layer_t *self, tsip_dialog_type
|
|||
}
|
||||
break;
|
||||
}
|
||||
case tsip_dialog_INFO:
|
||||
{
|
||||
if((dialog = (tsip_dialog_t*)tsip_dialog_info_create(ss))){
|
||||
ret = tsk_object_ref(dialog);
|
||||
tsk_list_push_back_data(self->dialogs, (void**)&dialog);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case tsip_dialog_OPTIONS:
|
||||
{
|
||||
if((dialog = (tsip_dialog_t*)tsip_dialog_options_create(ss))){
|
||||
|
@ -399,6 +408,13 @@ int tsip_dialog_layer_handle_incoming_msg(const tsip_dialog_layer_t *self, const
|
|||
}
|
||||
break;
|
||||
}
|
||||
case tsip_INFO:
|
||||
{ /* Server incoming INFO */
|
||||
if((ss = tsip_ssession_create_2(self->stack, message))){
|
||||
newdialog = (tsip_dialog_t*)tsip_dialog_info_create(ss);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case tsip_OPTIONS:
|
||||
{ /* Server incoming OPTIONS */
|
||||
if((ss = tsip_ssession_create_2(self->stack, message))){
|
||||
|
|
|
@ -94,7 +94,7 @@ typedef enum _fsm_state_e
|
|||
_fsm_state_t;
|
||||
|
||||
|
||||
int tsip_dialog_message_event_callback(const tsip_dialog_message_t *self, tsip_dialog_event_type_t type, const tsip_message_t *msg)
|
||||
static int tsip_dialog_message_event_callback(const tsip_dialog_message_t *self, tsip_dialog_event_type_t type, const tsip_message_t *msg)
|
||||
{
|
||||
int ret = -1;
|
||||
|
||||
|
@ -292,7 +292,7 @@ int tsip_dialog_message_Sending_2_Sending_X_401_407_421_494(va_list *app)
|
|||
int ret;
|
||||
|
||||
if((ret = tsip_dialog_update(TSIP_DIALOG(self), response))){
|
||||
/* Alert the user. */
|
||||
// Alert the user
|
||||
TSIP_DIALOG_MESSAGE_SIGNAL(self, tsip_ao_message,
|
||||
TSIP_RESPONSE_CODE(response), TSIP_RESPONSE_PHRASE(response), response);
|
||||
|
||||
|
|
|
@ -400,7 +400,7 @@ int tsip_transac_nict_Trying_2_Terminated_X_timerF(va_list *app)
|
|||
|
||||
/* Timers will be canceled by "tsip_transac_nict_OnTerminated" */
|
||||
|
||||
TSIP_TRANSAC(self)->dialog->callback(TSIP_TRANSAC(self)->dialog, tsip_dialog_timedout, tsk_null);
|
||||
TSIP_TRANSAC(self)->dialog->callback(TSIP_TRANSAC(self)->dialog, tsip_dialog_timedout, self->request);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -414,7 +414,7 @@ int tsip_transac_nict_Trying_2_Terminated_X_transportError(va_list *app)
|
|||
|
||||
/* Timers will be canceled by "tsip_transac_nict_OnTerminated" */
|
||||
|
||||
TSIP_TRANSAC(self)->dialog->callback(TSIP_TRANSAC(self)->dialog, tsip_dialog_transport_error, tsk_null);
|
||||
TSIP_TRANSAC(self)->dialog->callback(TSIP_TRANSAC(self)->dialog, tsip_dialog_transport_error, self->request);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -608,6 +608,10 @@
|
|||
RelativePath=".\src\dialogs\tsip_dialog.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\dialogs\tsip_dialog_info.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\dialogs\tsip_dialog_invite.c"
|
||||
>
|
||||
|
@ -704,6 +708,10 @@
|
|||
RelativePath=".\src\api\tsip_api_common.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\api\tsip_api_info.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\api\tsip_api_invite.c"
|
||||
>
|
||||
|
@ -1286,6 +1294,10 @@
|
|||
RelativePath=".\include\tinysip\dialogs\tsip_dialog.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\include\tinysip\dialogs\tsip_dialog_info.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\include\tinysip\dialogs\tsip_dialog_invite.common.h"
|
||||
>
|
||||
|
@ -1346,6 +1358,10 @@
|
|||
RelativePath=".\include\tinysip\api\tsip_api_common.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\include\tinysip\api\tsip_api_info.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\include\tinysip\api\tsip_api_invite.h"
|
||||
>
|
||||
|
|
Loading…
Reference in New Issue