Commit b4c342ef authored by Pekka Pessi's avatar Pekka Pessi

Added NUTAG_CALLSTATE(), enum nua_callstate.

darcs-hash:20050929170521-65a35-f9fb376e3d667b0e65afa01d8af640a9717b4bea.gz
parent e8ccbb4d
......@@ -76,24 +76,12 @@ enum nh_kind {
nh_has_streaming
};
enum nh_session {
init_session, /**< Initial state */
calling_session, /**< INVITE sent */
proceeding_session, /**< 18X received */
received_session, /**< INVITE received */
early_session, /**< 18X sent (w/SDP) */
ready_session, /**< 2XX received or sent */
terminating_session, /**< BYE sent */
terminated_session /**< BYE complete */
};
enum nh_call_state_event_e {
nh_active, /**< Call is activated */
nh_terminated, /**< Call is terminated */
nh_o_sent, /**< O/A-1 offer sent */
nh_a_recv, /**< O/A-2 answer received */
nh_o_recv, /**< O/A-3 offer received */
nh_a_sent /**< O/A-4 answer sent */
enum nh_oa_event {
nua_sdp_none,
nua_sdp_offer_sent, /**< O/A-1 offer sent */
nua_sdp_answer_recv, /**< O/A-2 answer received */
nua_sdp_offer_recv, /**< O/A-3 offer received */
nua_sdp_answer_sent /**< O/A-4 answer sent */
};
typedef struct nua_chat_s nua_chat_t;
......@@ -236,8 +224,8 @@ typedef struct nua_session_state
/** Session-related state */
unsigned ss_active:1; /**< Session is currently active. */
/* enum nh_session */
unsigned ss_state:4; /**< Session status (enum nh_session) */
/* enum nua_callstate */
unsigned ss_state:4; /**< Session status (enum nua_callstate) */
unsigned ss_alerting:1; /**< 180 is sent/received */
......
......@@ -65,6 +65,7 @@ tag_typedef_t nutag_media_session = PTRTAG_TYPEDEF(media_session);
tag_typedef_t nutag_active_audio = INTTAG_TYPEDEF(active_audio);
tag_typedef_t nutag_active_video = INTTAG_TYPEDEF(active_video);
tag_typedef_t nutag_active_chat = INTTAG_TYPEDEF(active_chat);
tag_typedef_t nutag_callstate = INTTAG_TYPEDEF(callstate);
tag_typedef_t nutag_substate = INTTAG_TYPEDEF(substate);
tag_typedef_t nutag_invite_timer = INTTAG_TYPEDEF(invite_timer);
tag_typedef_t nutag_session_timer = INTTAG_TYPEDEF(session_timer);
......
......@@ -1009,6 +1009,43 @@ extern tag_typedef_t nutag_user_agent;
#define NUTAG_USER_AGENT_REF(x) nutag_user_agent_ref, tag_str_vr(&(x))
extern tag_typedef_t nutag_user_agent_ref;
/** Call state
*
* @par Used with
* #nua_i_state
*
* @par Parameter type
* int
*
* @par Values
* - @c nua_callstate_init - Initial state
* - @c nua_callstate_calling - INVITE sent
* - @c nua_callstate_proceeding - 18X received
* - @c nua_callstate_received - INVITE received
* - @c nua_callstate_early - 18X sent (w/SDP)
* - @c nua_callstate_ready - 2XX received or sent
* - @c nua_callstate_terminating - BYE sent
* - @c nua_callstate_terminated - BYE complete
*
* Corresponding tag taking reference parameter is NUTAG_CALLSTATE_REF()
*/
#define NUTAG_CALLSTATE(x) nutag_callstate, tag_int_v(x)
extern tag_typedef_t nutag_callstate;
#define NUTAG_CALLSTATE_REF(x) nutag_callstate_ref, tag_int_vr(&(x))
extern tag_typedef_t nutag_callstate_ref;
enum nua_callstate {
nua_callstate_init, /**< Initial state */
nua_callstate_calling, /**< INVITE sent */
nua_callstate_proceeding, /**< 18X received */
nua_callstate_received, /**< INVITE received */
nua_callstate_early, /**< 18X sent (w/SDP) */
nua_callstate_ready, /**< 2XX received or sent */
nua_callstate_terminating, /**< BYE sent */
nua_callstate_terminated /**< BYE complete */
};
/** Audio session status
*
* @par Used with
......@@ -1116,7 +1153,7 @@ extern tag_typedef_t nutag_substate;
#define NUTAG_SUBSTATE_REF(x) nutag_substate_ref, tag_int_vr(&(x))
extern tag_typedef_t nutag_substate_ref;
enum {
enum nua_substate {
nua_substate_embryonic = 0,
nua_substate_pending,
nua_substate_active,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment