219 lines
3.4 KiB
Plaintext
219 lines
3.4 KiB
Plaintext
|
%{
|
||
|
/*
|
||
|
* Copyright (C) 2009 Mamadou Diop.
|
||
|
*
|
||
|
* Contact: Mamadou Diop <diopmamadou@yahoo.fr>
|
||
|
*
|
||
|
* 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 Lesser General Public License for more details.
|
||
|
*
|
||
|
* You should have received a copy of the GNU General Public License
|
||
|
* along with DOUBANGO.
|
||
|
*
|
||
|
*/
|
||
|
|
||
|
/**@file tsip_dialog_subscribe.sm.
|
||
|
* @brief SIP dialog SUBSCRIBE (RFC 2543).
|
||
|
*
|
||
|
* @author Mamadou Diop <diopmamadou(at)yahoo.fr>
|
||
|
*
|
||
|
* @date Created: Sat Nov 8 16:54:58 2009 mdiop
|
||
|
*/
|
||
|
|
||
|
%}
|
||
|
|
||
|
|
||
|
%class tsip_dialog_subscribe
|
||
|
%header "tinysip/dialogs/tsip_dialog_subscribe.h"
|
||
|
%header "tinysip/tsip_message.h"
|
||
|
%start tsip_dialog_subscribe::Started
|
||
|
%include "tsk_debug.h"
|
||
|
|
||
|
%map tsip_dialog_subscribe
|
||
|
%%
|
||
|
|
||
|
//------------------------
|
||
|
//------------------------
|
||
|
Started
|
||
|
Entry
|
||
|
{
|
||
|
}
|
||
|
Exit
|
||
|
{
|
||
|
}
|
||
|
{
|
||
|
sm_send()
|
||
|
Trying
|
||
|
{
|
||
|
Started_2_Trying_X_send();
|
||
|
}
|
||
|
|
||
|
Default
|
||
|
nil
|
||
|
{
|
||
|
}
|
||
|
}
|
||
|
|
||
|
//------------------------
|
||
|
//------------------------
|
||
|
Trying
|
||
|
Entry
|
||
|
{
|
||
|
}
|
||
|
Exit
|
||
|
{
|
||
|
}
|
||
|
{
|
||
|
sm_1xx(msg: const tsip_message_t*)
|
||
|
nil
|
||
|
{
|
||
|
Trying_2_Trying_X_1xx(msg);
|
||
|
}
|
||
|
|
||
|
sm_2xx(unsubscribeing: int, response: const tsip_response_t*) [unsubscribeing]
|
||
|
Terminated
|
||
|
{
|
||
|
Trying_2_Terminated_X_2xx(response);
|
||
|
}
|
||
|
|
||
|
sm_2xx(unsubscribeing: int, response: const tsip_response_t*) [!unsubscribeing]
|
||
|
Connected
|
||
|
{
|
||
|
Trying_2_Connected_X_2xx(response);
|
||
|
}
|
||
|
|
||
|
sm_401_407_421_494(response: const tsip_response_t*)
|
||
|
nil
|
||
|
{
|
||
|
Trying_2_Trying_X_401_407_421_494(response);
|
||
|
}
|
||
|
|
||
|
sm_423(response: const tsip_response_t*)
|
||
|
nil
|
||
|
{
|
||
|
Trying_2_Trying_X_423(response);
|
||
|
}
|
||
|
|
||
|
sm_300_to_699(response: const tsip_response_t*)
|
||
|
Terminated
|
||
|
{
|
||
|
Trying_2_Terminated_X_300_to_699(response);
|
||
|
}
|
||
|
|
||
|
sm_cancel()
|
||
|
Terminated
|
||
|
{
|
||
|
Trying_2_Terminated_X_cancel();
|
||
|
}
|
||
|
sm_NOTIFY(sterminated: int, request: const tsip_request_t*)
|
||
|
nil
|
||
|
{
|
||
|
Trying_2_Trying_X_NOTIFY(request);
|
||
|
}
|
||
|
|
||
|
Default
|
||
|
nil
|
||
|
{
|
||
|
}
|
||
|
}
|
||
|
|
||
|
//------------------------
|
||
|
//------------------------
|
||
|
Connected
|
||
|
Entry
|
||
|
{
|
||
|
}
|
||
|
Exit
|
||
|
{
|
||
|
}
|
||
|
{
|
||
|
sm_unsubscribe()
|
||
|
Trying
|
||
|
{
|
||
|
Connected_2_Trying_X_unsubscribe();
|
||
|
}
|
||
|
|
||
|
sm_refresh()
|
||
|
Trying
|
||
|
{
|
||
|
Connected_2_Trying_X_refresh();
|
||
|
}
|
||
|
|
||
|
sm_NOTIFY(sterminated: int, request: const tsip_request_t*)[!sterminated]
|
||
|
nil
|
||
|
{
|
||
|
Connected_2_Connected_X_NOTIFY(request);
|
||
|
}
|
||
|
|
||
|
sm_NOTIFY(sterminated: int, request: const tsip_request_t*)[sterminated]
|
||
|
Terminated
|
||
|
{
|
||
|
Connected_2_Terminated_X_NOTIFY(request);
|
||
|
}
|
||
|
|
||
|
Default
|
||
|
nil
|
||
|
{
|
||
|
}
|
||
|
}
|
||
|
|
||
|
//------------------------
|
||
|
//------------------------
|
||
|
Terminated
|
||
|
Entry
|
||
|
{
|
||
|
OnTerminated();
|
||
|
}
|
||
|
|
||
|
Exit
|
||
|
{
|
||
|
}
|
||
|
{
|
||
|
Default
|
||
|
nil
|
||
|
{
|
||
|
}
|
||
|
}
|
||
|
|
||
|
//------------------------
|
||
|
//------------------------
|
||
|
Default
|
||
|
Entry
|
||
|
{
|
||
|
}
|
||
|
Exit
|
||
|
{
|
||
|
}
|
||
|
{
|
||
|
sm_hangup()
|
||
|
Trying
|
||
|
{
|
||
|
Any_2_Trying_X_hangup();
|
||
|
}
|
||
|
|
||
|
sm_transportError()
|
||
|
Terminated
|
||
|
{
|
||
|
Any_2_Terminated_X_transportError();
|
||
|
}
|
||
|
|
||
|
sm_error()
|
||
|
Terminated
|
||
|
{
|
||
|
}
|
||
|
|
||
|
Default
|
||
|
nil
|
||
|
{
|
||
|
}
|
||
|
}
|
||
|
%%
|