diff options
Diffstat (limited to 'tinySIP/include/tinysip/dialogs')
11 files changed, 301 insertions, 317 deletions
diff --git a/tinySIP/include/tinysip/dialogs/tsip_dialog.h b/tinySIP/include/tinysip/dialogs/tsip_dialog.h index e6280b9..e9e8c0c 100755 --- a/tinySIP/include/tinysip/dialogs/tsip_dialog.h +++ b/tinySIP/include/tinysip/dialogs/tsip_dialog.h @@ -2,19 +2,19 @@ * Copyright (C) 2010-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. * @@ -61,7 +61,7 @@ TSIP_BEGIN_DECLS // TX MUST be in seconds #define TSIP_DIALOG_TIMER_SCHEDULE(name, TX) \ - self->timer##TX.id = tsk_timer_mgr_global_schedule(self->timer##TX.timeout, TSK_TIMER_CALLBACK_F(tsip_dialog_##name##_timer_callback), self) + self->timer##TX.id = tsk_timer_mgr_global_schedule(self->timer##TX.timeout, TSK_TIMER_CALLBACK_F(tsip_dialog_##name##_timer_callback), self) #define TSIP_DIALOG_SIGNAL(self, code, phrase) \ tsip_event_signal(tsip_event_dialog, TSIP_DIALOG(self)->ss, code, phrase) @@ -79,38 +79,35 @@ TSIP_BEGIN_DECLS typedef uint64_t tsip_dialog_id_t; -typedef enum tsip_dialog_state_e -{ - tsip_initial, - tsip_early, - tsip_established, - tsip_terminated +typedef enum tsip_dialog_state_e { + tsip_initial, + tsip_early, + tsip_established, + tsip_terminated } tsip_dialog_state_t; -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, - tsip_dialog_SUBSCRIBE, +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, + tsip_dialog_SUBSCRIBE, } tsip_dialog_type_t; -typedef enum tsip_dialog_event_type_e -{ - tsip_dialog_i_msg, - tsip_dialog_o_msg, - tsip_dialog_transac_ok, - tsip_dialog_canceled, - tsip_dialog_terminated, - tsip_dialog_timedout, - tsip_dialog_error, - tsip_dialog_transport_error, +typedef enum tsip_dialog_event_type_e { + tsip_dialog_i_msg, + tsip_dialog_o_msg, + tsip_dialog_transac_ok, + tsip_dialog_canceled, + tsip_dialog_terminated, + tsip_dialog_timedout, + tsip_dialog_error, + tsip_dialog_transport_error, } tsip_dialog_event_type_t; @@ -119,53 +116,52 @@ typedef int (*tsip_dialog_event_callback_f)(const void *arg, tsip_dialog_event_t /*================================ */ -typedef struct tsip_dialog_s -{ - TSK_DECLARE_OBJECT; - - tsip_dialog_type_t type; - tsip_dialog_id_t id; - - tsk_fsm_t* fsm; - - tsip_ssession_t* ss; - tsip_action_t* curr_action; - - tsip_dialog_state_t state; - - tsk_bool_t initialized; - tsk_bool_t running; - - tnet_fd_t connected_fd; - - struct{ - char* phrase; - short code; - tsip_message_t* message; - } last_error; - - char* tag_local; - tsip_uri_t* uri_local; - char* tag_remote; - tsip_uri_t* uri_remote; - - tsip_uri_t* uri_remote_target; - struct sockaddr_storage remote_addr; // Only valid for Dgram - - uint32_t cseq_value; - char* cseq_method; - - int64_t expires; /* in milliseconds */ - - char* callid; - - tsip_header_Record_Routes_L_t *record_routes; - - tsip_challenges_L_t *challenges; - - tsip_dialog_event_callback_f callback; - - TSK_DECLARE_SAFEOBJ; +typedef struct tsip_dialog_s { + TSK_DECLARE_OBJECT; + + tsip_dialog_type_t type; + tsip_dialog_id_t id; + + tsk_fsm_t* fsm; + + tsip_ssession_t* ss; + tsip_action_t* curr_action; + + tsip_dialog_state_t state; + + tsk_bool_t initialized; + tsk_bool_t running; + + tnet_fd_t connected_fd; + + struct { + char* phrase; + short code; + tsip_message_t* message; + } last_error; + + char* tag_local; + tsip_uri_t* uri_local; + char* tag_remote; + tsip_uri_t* uri_remote; + + tsip_uri_t* uri_remote_target; + struct sockaddr_storage remote_addr; // Only valid for Dgram + + uint32_t cseq_value; + char* cseq_method; + + int64_t expires; /* in milliseconds */ + + char* callid; + + tsip_header_Record_Routes_L_t *record_routes; + + tsip_challenges_L_t *challenges; + + tsip_dialog_event_callback_f callback; + + TSK_DECLARE_SAFEOBJ; } tsip_dialog_t; diff --git a/tinySIP/include/tinysip/dialogs/tsip_dialog_info.h b/tinySIP/include/tinysip/dialogs/tsip_dialog_info.h index 94fe6ad..1c54442 100755 --- a/tinySIP/include/tinysip/dialogs/tsip_dialog_info.h +++ b/tinySIP/include/tinysip/dialogs/tsip_dialog_info.h @@ -2,19 +2,19 @@ * 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. * @@ -40,11 +40,10 @@ 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; +typedef struct tsip_dialog_info { + TSIP_DECLARE_DIALOG; + /**< Last incoming message. */ + struct tsip_message_s* last_iMessage; } tsip_dialog_info_t; diff --git a/tinySIP/include/tinysip/dialogs/tsip_dialog_invite.common.h b/tinySIP/include/tinysip/dialogs/tsip_dialog_invite.common.h index 1496ca7..15494ad 100755 --- a/tinySIP/include/tinysip/dialogs/tsip_dialog_invite.common.h +++ b/tinySIP/include/tinysip/dialogs/tsip_dialog_invite.common.h @@ -2,19 +2,19 @@ * Copyright (C) 2010-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. * @@ -40,75 +40,73 @@ #define TSIP_DIALOG_INVITE_ICE_CONNCHECK_TIMEOUT 16000 /* ======================== actions ======================== */ -typedef enum _fsm_action_e -{ - _fsm_action_accept = tsip_atype_accept, - _fsm_action_reject = tsip_atype_hangup, - _fsm_action_dtmf_send = tsip_atype_dtmf_send, - _fsm_action_msrp_send_msg = tsip_atype_lmessage, - _fsm_action_oINVITE = tsip_atype_invite, - _fsm_action_oCANCEL = tsip_atype_cancel, - _fsm_action_oHold = tsip_atype_hold, - _fsm_action_oResume = tsip_atype_resume, - _fsm_action_oECT = tsip_atype_ect, - _fsm_action_iECT_ACCEPT = tsip_atype_ect_accept, - _fsm_action_iECT_REJECT = tsip_atype_ect_reject, - _fsm_action_iECT_lNOTIFY = tsip_atype_ect_lnotify, - _fsm_action_oINFO = tsip_atype_info_send, - _fsm_action_oBYE = tsip_atype_hangup, - _fsm_action_oShutdown = tsip_atype_shutdown, - _fsm_action_transporterror = tsip_atype_transport_error, - - _fsm_action_iINVITE = 0xFF, - _fsm_action_oUPDATE, - _fsm_action_iUPDATE, - _fsm_action_iCANCEL, - _fsm_action_iPRACK, - _fsm_action_oPRACK, - _fsm_action_iACK, - _fsm_action_oACK, - _fsm_action_iOPTIONS, - _fsm_action_oOPTIONS, - _fsm_action_iBYE, - _fsm_action_iREFER, - _fsm_action_iINFO, - _fsm_action_iNOTIFY, - - _fsm_action_timer100rel, - _fsm_action_timerRefresh, - _fsm_action_timerRSVP, - - _fsm_action_i1xx, - _fsm_action_i2xx, - _fsm_action_i300_to_i699, - _fsm_action_i401_i407, - _fsm_action_i422, - - _fsm_action_shutdown_timedout, /* Any -> Terminated */ - _fsm_action_error, +typedef enum _fsm_action_e { + _fsm_action_accept = tsip_atype_accept, + _fsm_action_reject = tsip_atype_hangup, + _fsm_action_dtmf_send = tsip_atype_dtmf_send, + _fsm_action_msrp_send_msg = tsip_atype_lmessage, + _fsm_action_oINVITE = tsip_atype_invite, + _fsm_action_oCANCEL = tsip_atype_cancel, + _fsm_action_oHold = tsip_atype_hold, + _fsm_action_oResume = tsip_atype_resume, + _fsm_action_oECT = tsip_atype_ect, + _fsm_action_iECT_ACCEPT = tsip_atype_ect_accept, + _fsm_action_iECT_REJECT = tsip_atype_ect_reject, + _fsm_action_iECT_lNOTIFY = tsip_atype_ect_lnotify, + _fsm_action_oINFO = tsip_atype_info_send, + _fsm_action_oBYE = tsip_atype_hangup, + _fsm_action_oShutdown = tsip_atype_shutdown, + _fsm_action_transporterror = tsip_atype_transport_error, + + _fsm_action_iINVITE = 0xFF, + _fsm_action_oUPDATE, + _fsm_action_iUPDATE, + _fsm_action_iCANCEL, + _fsm_action_iPRACK, + _fsm_action_oPRACK, + _fsm_action_iACK, + _fsm_action_oACK, + _fsm_action_iOPTIONS, + _fsm_action_oOPTIONS, + _fsm_action_iBYE, + _fsm_action_iREFER, + _fsm_action_iINFO, + _fsm_action_iNOTIFY, + + _fsm_action_timer100rel, + _fsm_action_timerRefresh, + _fsm_action_timerRSVP, + + _fsm_action_i1xx, + _fsm_action_i2xx, + _fsm_action_i300_to_i699, + _fsm_action_i401_i407, + _fsm_action_i422, + + _fsm_action_shutdown_timedout, /* Any -> Terminated */ + _fsm_action_error, } _fsm_action_t; /* ======================== states ======================== */ -typedef enum _fsm_state_e -{ - _fsm_state_Started, - _fsm_state_Outgoing, - _fsm_state_Incoming, - _fsm_state_Trying, - _fsm_state_Ringing, - _fsm_state_Cancelling, - _fsm_state_InProgress, - - _fsm_state_Holding, - _fsm_state_Resuming, - - _fsm_state_oECTing, - _fsm_state_iECTing, - _fsm_state_iECTreq, - - _fsm_state_Connected, - _fsm_state_Terminated +typedef enum _fsm_state_e { + _fsm_state_Started, + _fsm_state_Outgoing, + _fsm_state_Incoming, + _fsm_state_Trying, + _fsm_state_Ringing, + _fsm_state_Cancelling, + _fsm_state_InProgress, + + _fsm_state_Holding, + _fsm_state_Resuming, + + _fsm_state_oECTing, + _fsm_state_iECTing, + _fsm_state_iECTreq, + + _fsm_state_Connected, + _fsm_state_Terminated } _fsm_state_t; diff --git a/tinySIP/include/tinysip/dialogs/tsip_dialog_invite.h b/tinySIP/include/tinysip/dialogs/tsip_dialog_invite.h index b3bbfea..0a90e4d 100755 --- a/tinySIP/include/tinysip/dialogs/tsip_dialog_invite.h +++ b/tinySIP/include/tinysip/dialogs/tsip_dialog_invite.h @@ -2,19 +2,19 @@ * Copyright (C) 2010-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. * @@ -40,80 +40,79 @@ TSIP_BEGIN_DECLS #define TSIP_DIALOG_INVITE(self) ((tsip_dialog_invite_t*)(self)) -typedef struct tsip_dialog_invite -{ - TSIP_DECLARE_DIALOG; - - tsk_bool_t support_update; /**< Indicates whether the remote party support UPDATE */ - tsk_bool_t is_client; - tsk_bool_t is_transf; - tsk_bool_t refersub; - tsk_bool_t use_rtcp; - tsk_bool_t use_rtcpmux; +typedef struct tsip_dialog_invite { + TSIP_DECLARE_DIALOG; + + tsk_bool_t support_update; /**< Indicates whether the remote party support UPDATE */ + tsk_bool_t is_client; + tsk_bool_t is_transf; + tsk_bool_t refersub; + tsk_bool_t use_rtcp; + tsk_bool_t use_rtcpmux; tsk_bool_t is_initial_iack_pending; // we're waiting for the initial incoming ACK (for the 200 OK) to ensure the session tsk_bool_t is_cancelling; // whether we're cancelling the outgoing INVITE - uint32_t rseq; - uint32_t cseq_out_media_update; // CSeq for the last media update request (INVITE or UPDATE). - uint64_t last_out_fastupdate_time; - - tsip_timer_t timershutdown; - tsip_timer_t timer100rel; - - tsip_response_t* last_o1xxrel; - tsip_request_t* last_iInvite; - tsip_request_t* last_oInvite; - tsip_request_t* last_iRefer; - tmedia_session_mgr_t* msession_mgr; /**< Media session Manager */ - - struct tsip_ssession_s* ss_transf; - - /* ICE */ - struct{ - tmedia_type_t media_type; - tsk_bool_t is_jingle; - tsk_bool_t start_smgr; - struct tnet_ice_ctx_s *ctx_audio; - struct tnet_ice_ctx_s *ctx_video; - tsk_fsm_action_id last_action_id; - tsip_action_t* last_action; - tsip_message_t* last_message; - int32_t last_sdp_ro_ver; - } ice; - - /* Session Timers */ - struct{ - tsip_timer_t timer; - char* refresher; - uint64_t minse; - tsk_bool_t is_refresher; - } stimers; - /* QoS (Preconditions) */ - struct{ - tsip_timer_t timer; - enum tmedia_qos_stype_e type; - enum tmedia_qos_strength_e strength; - } qos; - /* Hold/Resume */ - struct{ - unsigned remote:1; - unsigned local:1; - } hold; - - struct{ - unsigned _100rel:1; - unsigned precondition:1; - unsigned timer:1; - unsigned norefersub:1; - unsigned ice:1; - } supported; - - struct{ - unsigned _100rel:1; - unsigned precondition:1; - unsigned timer:1; - unsigned norefersub; - unsigned ice:1; - } required; + uint32_t rseq; + uint32_t cseq_out_media_update; // CSeq for the last media update request (INVITE or UPDATE). + uint64_t last_out_fastupdate_time; + + tsip_timer_t timershutdown; + tsip_timer_t timer100rel; + + tsip_response_t* last_o1xxrel; + tsip_request_t* last_iInvite; + tsip_request_t* last_oInvite; + tsip_request_t* last_iRefer; + tmedia_session_mgr_t* msession_mgr; /**< Media session Manager */ + + struct tsip_ssession_s* ss_transf; + + /* ICE */ + struct { + tmedia_type_t media_type; + tsk_bool_t is_jingle; + tsk_bool_t start_smgr; + struct tnet_ice_ctx_s *ctx_audio; + struct tnet_ice_ctx_s *ctx_video; + tsk_fsm_action_id last_action_id; + tsip_action_t* last_action; + tsip_message_t* last_message; + int32_t last_sdp_ro_ver; + } ice; + + /* Session Timers */ + struct { + tsip_timer_t timer; + char* refresher; + uint64_t minse; + tsk_bool_t is_refresher; + } stimers; + /* QoS (Preconditions) */ + struct { + tsip_timer_t timer; + enum tmedia_qos_stype_e type; + enum tmedia_qos_strength_e strength; + } qos; + /* Hold/Resume */ + struct { + unsigned remote:1; + unsigned local:1; + } hold; + + struct { + unsigned _100rel:1; + unsigned precondition:1; + unsigned timer:1; + unsigned norefersub:1; + unsigned ice:1; + } supported; + + struct { + unsigned _100rel:1; + unsigned precondition:1; + unsigned timer:1; + unsigned norefersub; + unsigned ice:1; + } required; } tsip_dialog_invite_t; diff --git a/tinySIP/include/tinysip/dialogs/tsip_dialog_layer.h b/tinySIP/include/tinysip/dialogs/tsip_dialog_layer.h index 3539361..0a73a3b 100755 --- a/tinySIP/include/tinysip/dialogs/tsip_dialog_layer.h +++ b/tinySIP/include/tinysip/dialogs/tsip_dialog_layer.h @@ -2,19 +2,19 @@ * Copyright (C) 2010-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. * @@ -41,21 +41,20 @@ TSIP_BEGIN_DECLS -typedef struct tsip_dialog_layer_s -{ - TSK_DECLARE_OBJECT; +typedef struct tsip_dialog_layer_s { + TSK_DECLARE_OBJECT; - const tsip_stack_t *stack; + const tsip_stack_t *stack; - tsip_dialogs_L_t *dialogs; + tsip_dialogs_L_t *dialogs; - struct{ - tsk_bool_t inprogress; - tsk_bool_t phase2; /* whether unregistering? */ - tsk_condwait_handle_t* condwait; - } shutdown; + struct { + tsk_bool_t inprogress; + tsk_bool_t phase2; /* whether unregistering? */ + tsk_condwait_handle_t* condwait; + } shutdown; - TSK_DECLARE_SAFEOBJ; + TSK_DECLARE_SAFEOBJ; } tsip_dialog_layer_t; diff --git a/tinySIP/include/tinysip/dialogs/tsip_dialog_message.h b/tinySIP/include/tinysip/dialogs/tsip_dialog_message.h index 904af54..77bc5cb 100755 --- a/tinySIP/include/tinysip/dialogs/tsip_dialog_message.h +++ b/tinySIP/include/tinysip/dialogs/tsip_dialog_message.h @@ -2,19 +2,19 @@ * Copyright (C) 2010-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. * @@ -40,11 +40,10 @@ struct tsip_message_s; #define TSIP_DIALOG_MESSAGE(self) ((tsip_dialog_message_t*)(self)) -typedef struct tsip_dialog_message -{ - TSIP_DECLARE_DIALOG; - /**< Last incoming or outgoing message. */ - struct tsip_message_s* request; +typedef struct tsip_dialog_message { + TSIP_DECLARE_DIALOG; + /**< Last incoming or outgoing message. */ + struct tsip_message_s* request; } tsip_dialog_message_t; diff --git a/tinySIP/include/tinysip/dialogs/tsip_dialog_options.h b/tinySIP/include/tinysip/dialogs/tsip_dialog_options.h index e092a32..db8837c 100755 --- a/tinySIP/include/tinysip/dialogs/tsip_dialog_options.h +++ b/tinySIP/include/tinysip/dialogs/tsip_dialog_options.h @@ -2,19 +2,19 @@ * Copyright (C) 2010-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. * @@ -37,11 +37,10 @@ TSIP_BEGIN_DECLS #define TSIP_DIALOG_OPTIONS(self) ((tsip_dialog_options_t*)(self)) -typedef struct tsip_dialog_options -{ - TSIP_DECLARE_DIALOG; - /**< Last incoming message. */ - struct tsip_message_s* last_iMessage; +typedef struct tsip_dialog_options { + TSIP_DECLARE_DIALOG; + /**< Last incoming message. */ + struct tsip_message_s* last_iMessage; } tsip_dialog_options_t; diff --git a/tinySIP/include/tinysip/dialogs/tsip_dialog_publish.h b/tinySIP/include/tinysip/dialogs/tsip_dialog_publish.h index b4ef37b..6919508 100755 --- a/tinySIP/include/tinysip/dialogs/tsip_dialog_publish.h +++ b/tinySIP/include/tinysip/dialogs/tsip_dialog_publish.h @@ -2,19 +2,19 @@ * Copyright (C) 2010-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. * @@ -37,15 +37,14 @@ TSIP_BEGIN_DECLS #define TSIP_DIALOG_PUBLISH(self) ((tsip_dialog_publish_t*)(self)) -typedef struct tsip_dialog_publish -{ - TSIP_DECLARE_DIALOG; - - tsip_timer_t timerrefresh; - tsip_timer_t timershutdown; +typedef struct tsip_dialog_publish { + TSIP_DECLARE_DIALOG; + + tsip_timer_t timerrefresh; + tsip_timer_t timershutdown; - tsk_bool_t unpublishing; - char* etag; + tsk_bool_t unpublishing; + char* etag; } tsip_dialog_publish_t; diff --git a/tinySIP/include/tinysip/dialogs/tsip_dialog_register.common.h b/tinySIP/include/tinysip/dialogs/tsip_dialog_register.common.h index 94e4897..e99df2b 100755 --- a/tinySIP/include/tinysip/dialogs/tsip_dialog_register.common.h +++ b/tinySIP/include/tinysip/dialogs/tsip_dialog_register.common.h @@ -2,19 +2,19 @@ * Copyright (C) 2010-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 publishd 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. * @@ -31,37 +31,35 @@ /* ======================== actions ======================== */ -typedef enum _fsm_action_e -{ - _fsm_action_accept = tsip_atype_accept, - _fsm_action_reject = tsip_atype_hangup, - _fsm_action_hangup = tsip_atype_hangup, - _fsm_action_oREGISTER = tsip_atype_register, - _fsm_action_cancel = tsip_atype_cancel, - _fsm_action_shutdown = tsip_atype_shutdown, - _fsm_action_transporterror = tsip_atype_transport_error, +typedef enum _fsm_action_e { + _fsm_action_accept = tsip_atype_accept, + _fsm_action_reject = tsip_atype_hangup, + _fsm_action_hangup = tsip_atype_hangup, + _fsm_action_oREGISTER = tsip_atype_register, + _fsm_action_cancel = tsip_atype_cancel, + _fsm_action_shutdown = tsip_atype_shutdown, + _fsm_action_transporterror = tsip_atype_transport_error, - _fsm_action_1xx = 0xFF, - _fsm_action_2xx, - _fsm_action_401_407_421_494, - _fsm_action_423, - _fsm_action_300_to_699, + _fsm_action_1xx = 0xFF, + _fsm_action_2xx, + _fsm_action_401_407_421_494, + _fsm_action_423, + _fsm_action_300_to_699, - _fsm_action_iREGISTER, + _fsm_action_iREGISTER, - _fsm_action_shutdown_timedout, /* Any -> Terminated */ - _fsm_action_error, + _fsm_action_shutdown_timedout, /* Any -> Terminated */ + _fsm_action_error, } _fsm_action_t; /* ======================== states ======================== */ -typedef enum _fsm_state_e -{ - _fsm_state_Started, - _fsm_state_InProgress, // Outgoing (Client) - _fsm_state_Incoming, // Incoming (Server) - _fsm_state_Connected, - _fsm_state_Terminated +typedef enum _fsm_state_e { + _fsm_state_Started, + _fsm_state_InProgress, // Outgoing (Client) + _fsm_state_Incoming, // Incoming (Server) + _fsm_state_Connected, + _fsm_state_Terminated } _fsm_state_t; diff --git a/tinySIP/include/tinysip/dialogs/tsip_dialog_register.h b/tinySIP/include/tinysip/dialogs/tsip_dialog_register.h index d2acf1a..bfb72ed 100755 --- a/tinySIP/include/tinysip/dialogs/tsip_dialog_register.h +++ b/tinySIP/include/tinysip/dialogs/tsip_dialog_register.h @@ -2,19 +2,19 @@ * Copyright (C) 2010-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. * @@ -38,17 +38,16 @@ TSIP_BEGIN_DECLS #define TSIP_DIALOG_REGISTER(self) ((tsip_dialog_register_t*)(self)) /**< SIP REGISTER dialog */ -typedef struct tsip_dialog_register -{ - TSIP_DECLARE_DIALOG; +typedef struct tsip_dialog_register { + TSIP_DECLARE_DIALOG; - tsip_timer_t timerrefresh; - tsip_timer_t timershutdown; + tsip_timer_t timerrefresh; + tsip_timer_t timershutdown; - tsip_request_t* last_iRegister; + tsip_request_t* last_iRegister; - tsk_bool_t unregistering; - tsk_bool_t is_server; + tsk_bool_t unregistering; + tsk_bool_t is_server; } tsip_dialog_register_t; diff --git a/tinySIP/include/tinysip/dialogs/tsip_dialog_subscribe.h b/tinySIP/include/tinysip/dialogs/tsip_dialog_subscribe.h index c7db35b..4e66b33 100755 --- a/tinySIP/include/tinysip/dialogs/tsip_dialog_subscribe.h +++ b/tinySIP/include/tinysip/dialogs/tsip_dialog_subscribe.h @@ -2,19 +2,19 @@ * Copyright (C) 2010-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. * @@ -37,14 +37,13 @@ TSIP_BEGIN_DECLS #define TSIP_DIALOG_SUBSCRIBE(self) ((tsip_dialog_subscribe_t*)(self)) -typedef struct tsip_dialog_subscribe -{ - TSIP_DECLARE_DIALOG; - - tsip_timer_t timerrefresh; - tsip_timer_t timershutdown; +typedef struct tsip_dialog_subscribe { + TSIP_DECLARE_DIALOG; + + tsip_timer_t timerrefresh; + tsip_timer_t timershutdown; - tsk_bool_t unsubscribing; + tsk_bool_t unsubscribing; } tsip_dialog_subscribe_t; |