Commit 516e9365 authored by Pekka Pessi's avatar Pekka Pessi

nua: added NUTAG_WITH(), NUTAG_WITH_THIS(), NUTAG_WITH_SAVED().

darcs-hash:20061003073402-65a35-9893626737bb8c02e1e73cf5712cfb4110573ad2.gz
parent ec1bfdcf
......@@ -1226,6 +1226,18 @@ void nua_event(nua_t *root_magic, su_msg_r sumsg, event_t *e)
su_msg_destroy(nua->nua_current);
}
/** Get current request message. */
msg_t *nua_current_request(nua_t const *nua)
{
return nua && nua->nua_current ? su_msg_data(nua->nua_current)->e_msg : NULL;
}
/** Get request message from saved nua event. */
msg_t *nua_saved_event_request(nua_saved_event_t const *saved)
{
return saved ? su_msg_data(saved)->e_msg : NULL;
}
/** Save nua event and its arguments */
int nua_save_event(nua_t *nua, nua_saved_event_t return_saved[1])
{
......
......@@ -142,5 +142,7 @@ tag_typedef_t nutag_service_route_enable =
tag_typedef_t nutag_detect_network_updates = UINTTAG_TYPEDEF(detect_network_updates);
tag_typedef_t nutag_with = PTRTAG_TYPEDEF(with);
tag_typedef_t _nutag_add_contact = BOOLTAG_TYPEDEF(add_contact);
tag_typedef_t _nutag_copy = BOOLTAG_TYPEDEF(copy);
......@@ -122,6 +122,21 @@ SOFIAPUBVAR tag_typedef_t nutag_address;
#define NUTAG_ADDRESS_REF(x) nutag_address_ref, tag_str_vr(&(x))
SOFIAPUBVAR tag_typedef_t nutag_address_ref;
/**Specify request to respond to.
*
* @par Parameter type
* msg_t *
*
* @par Values
* Pointer to a request message.
*/
#define NUTAG_WITH(x) NUTAG_WITH, tag_ptr_v(x)
SOFIAPUBVAR tag_typedef_t nutag_with;
#define NUTAG_WITH_THIS(nua) NUTAG_WITH, tag_ptr_v(nua_current_request((nua)))
#define NUTAG_WITH_SAVED(e) NUTAG_WITH, tag_ptr_v(nua_saved_event_request((e)))
/**Set request retry count.
*
* Retry count determines how many times stack will automatically retry
......
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